Переглянути джерело

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

* org.el (org-entry-get): Don't use `org-flet'.
Bastien Guerry 12 роки тому
батько
коміт
ced90464dd
1 змінених файлів з 9 додано та 9 видалено
  1. 9 9
      lisp/org.el

+ 9 - 9
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.