Przeglądaj źródła

Bugfix `org-without-partial-completion' (again).

Er... We need to call ,@body when partial-completion-mode is nil.
Bastien Guerry 13 lat temu
rodzic
commit
da086f9606
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      lisp/org-macs.el

+ 4 - 3
lisp/org-macs.el

@@ -112,13 +112,14 @@ Also, do not record undo information."
        (org-move-to-column _col))))
 
 (defmacro org-without-partial-completion (&rest body)
-  `(when (and (boundp 'partial-completion-mode)
-	      (fboundp 'partial-completion-mode))
+  `(if (and (boundp 'partial-completion-mode)
+	    (fboundp 'partial-completion-mode))
      (unwind-protect
 	 (progn
 	   (partial-completion-mode -1)
 	   ,@body)
-       (partial-completion-mode 1))))
+       (partial-completion-mode 1))
+     ,@body))
 
 (defmacro org-maybe-intangible (props)
   "Add '(intangible t) to PROPS if Emacs version is earlier than Emacs 22.