emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH 2/3] Use save-match-data macro instead of let.


From: Mikael Fornius
Subject: [Orgmode] [PATCH 2/3] Use save-match-data macro instead of let.
Date: Thu, 10 Jun 2010 16:54:50 +0200

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]