[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 c3466099c5 3/3: Org regexp style fixes
From: |
Mattias Engdegård |
Subject: |
emacs-29 c3466099c5 3/3: Org regexp style fixes |
Date: |
Wed, 30 Nov 2022 07:26:19 -0500 (EST) |
branch: emacs-29
commit c3466099c5f44c52ec73a1bbbb2b42de6f29ac7f
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Org regexp style fixes
* lisp/org/org-element.el (org-element--get-node-properties):
Escape literal `+`.
* lisp/org/org-persist.el (org-persist-load:index):
Replace line-start with string-start when the latter is meant.
---
lisp/org/org-element.el | 2 +-
lisp/org/org-persist.el | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index bc2fa0b985..a290b4121f 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -1040,7 +1040,7 @@ parse properties for property drawer at point."
(property-value (match-string-no-properties 3)))
(cond
((and (plist-member properties property-name-symbol)
- (string-match-p "+$" property-name))
+ (string-match-p "\\+$" property-name))
(let ((val (plist-get properties property-name-symbol)))
(if (listp val)
(setq properties
diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el
index 3435bef264..d60fdc657a 100644
--- a/lisp/org/org-persist.el
+++ b/lisp/org/org-persist.el
@@ -593,7 +593,8 @@ COLLECTION is the plist holding data collection."
(mapc (lambda (collection) (org-persist--add-to-index collection
'hash)) org-persist--index)
(setq org-persist--index nil)
(when (file-exists-p org-persist-directory)
- (dolist (file (directory-files org-persist-directory 'absolute
"^[^.][^.]"))
+ (dolist (file (directory-files org-persist-directory 'absolute
+ "\\`[^.][^.]"))
(if (file-directory-p file)
(delete-directory file t)
(delete-file file))))