瀏覽代碼

org.el (org-set-property): Minor enhancement.

* org.el (org-set-property): Perform the correct check against
`org-properties-postprocess-alist'.

Thanks to Bill Wishon for spotting this.
Bastien Guerry 13 年之前
父節點
當前提交
491ce5491d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -14716,10 +14716,10 @@ in the current file."
   (interactive (list nil nil))
   (let* ((property (or property (org-read-property-name)))
 	 (value (or value (org-read-property-value property)))
-	 (fn (assoc property org-properties-postprocess-alist)))
+	 (fn (cadr (assoc property org-properties-postprocess-alist))))
     (setq org-last-set-property property)
     ;; Possibly postprocess the inserted value:
-    (when fn (setq value (funcall (cadr fn) value)))
+    (when fn (setq value (funcall fn value)))
     (unless (equal (org-entry-get nil property) value)
       (org-entry-put nil property value))))