0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:07:49 +00:00

org.el (org-entry-get): Don't use `org-flet'

* org.el (org-entry-get): Don't use `org-flet'.
This commit is contained in:
Bastien Guerry 2012-08-08 15:19:24 +02:00
parent d70cf44e7b
commit ced90464dd

View file

@ -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 ;; We need a special property. Use `org-entry-properties' to
;; retrieve it, but specify the wanted property ;; retrieve it, but specify the wanted property
(cdr (assoc property (org-entry-properties nil 'special property))) (cdr (assoc property (org-entry-properties nil 'special property)))
(let ((range (org-get-property-block)) (let* ((range (org-get-property-block))
(props (list (or (assoc property org-file-properties) (props (list (or (assoc property org-file-properties)
(assoc property org-global-properties) (assoc property org-global-properties)
(assoc property org-global-properties-fixed)))) (assoc property org-global-properties-fixed))))
val) (ap (lambda (key)
(org-flet ((ap (key)
(when (re-search-forward (when (re-search-forward
(org-re-property key) (cdr range) t) (org-re-property key) (cdr range) t)
(setq props (setq props
@ -14485,12 +14484,13 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
(if (match-end 1) (if (match-end 1)
(org-match-string-no-properties 1) "") (org-match-string-no-properties 1) "")
props))))) props)))))
val)
(when (and range (goto-char (car range))) (when (and range (goto-char (car range)))
(ap property) (funcall ap property)
(goto-char (car range)) (goto-char (car range))
(while (ap (concat property "+"))) (while (funcall ap (concat property "+")))
(setq val (cdr (assoc property props))) (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) (defun org-property-or-variable-value (var &optional inherit)
"Check if there is a property fixing the value of VAR. "Check if there is a property fixing the value of VAR.