From ced90464dd2b095a9f38c5bd756dd2aed6d4ef90 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 8 Aug 2012 15:19:24 +0200 Subject: [PATCH] org.el (org-entry-get): Don't use `org-flet' * org.el (org-entry-get): Don't use `org-flet'. --- lisp/org.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 349b44a39..2935045fa 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14471,12 +14471,11 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy." ;; We need a special property. Use `org-entry-properties' to ;; retrieve it, but specify the wanted property (cdr (assoc property (org-entry-properties nil 'special property))) - (let ((range (org-get-property-block)) - (props (list (or (assoc property org-file-properties) - (assoc property org-global-properties) - (assoc property org-global-properties-fixed)))) - val) - (org-flet ((ap (key) + (let* ((range (org-get-property-block)) + (props (list (or (assoc property org-file-properties) + (assoc property org-global-properties) + (assoc property org-global-properties-fixed)))) + (ap (lambda (key) (when (re-search-forward (org-re-property key) (cdr range) t) (setq props @@ -14485,12 +14484,13 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy." (if (match-end 1) (org-match-string-no-properties 1) "") props))))) + val) (when (and range (goto-char (car range))) - (ap property) + (funcall ap property) (goto-char (car range)) - (while (ap (concat property "+"))) + (while (funcall ap (concat property "+"))) (setq val (cdr (assoc property props))) - (when val (if literal-nil val (org-not-nil val)))))))))) + (when val (if literal-nil val (org-not-nil val))))))))) (defun org-property-or-variable-value (var &optional inherit) "Check if there is a property fixing the value of VAR.