From: Mikael Fornius <mfo@abc.se>
To: emacs-orgmode@gnu.org
Cc: Mikael Fornius <mfo@abc.se>
Subject: [PATCH 2/3] Use save-match-data macro instead of let.
Date: Thu, 10 Jun 2010 16:54:50 +0200 [thread overview]
Message-ID: <1276181691-7544-3-git-send-email-mfo@abc.se> (raw)
In-Reply-To: <1276181691-7544-1-git-send-email-mfo@abc.se>
* org.el (org-at-property-p): Use save-match-data macro instead of let.
---
lisp/org.el | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 2a2cef9..7715ad7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13198,12 +13198,11 @@ allowed value."
(save-excursion
(beginning-of-line 1)
(when (looking-at (org-re "^[ \t]*\\(:\\([[:alpha:]][[:alnum:]_-]*\\):\\)[ \t]*\\(.*\\)"))
- (let ((match (match-data)) ;; Keep match-data for use by calling
- (p (point)) ;; procedures.
- (range (unless (org-before-first-heading-p)
- (org-get-property-block))))
- (prog1 (and range (<= (car range) p) (< p (cdr range)))
- (set-match-data match))))))
+ (save-match-data ;; Used by calling procedures
+ (let ((p (point))
+ (range (unless (org-before-first-heading-p)
+ (org-get-property-block))))
+ (and range (<= (car range) p) (< p (cdr range))))))))
(defun org-get-property-block (&optional beg end force)
"Return the (beg . end) range of the body of the property drawer.
--
1.7.1
next prev parent reply other threads:[~2010-06-10 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 14:54 [PATCH 0/3] No sub/superscript in property keys and two small fixes Mikael Fornius
2010-06-10 14:54 ` [PATCH 1/3] Removed unused test function Mikael Fornius
2010-06-10 14:54 ` Mikael Fornius [this message]
2010-06-10 14:54 ` [PATCH 3/3] Do not fontify subscripts of property keys Mikael Fornius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276181691-7544-3-git-send-email-mfo@abc.se \
--to=mfo@abc.se \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.