At Sat, 02 Jul 2011 10:40:31 -0400, Nick Dokos wrote: > > David Maus wrote: > > > > #+begin_src emacs-lisp > > (defmacro org-without-partial-completion (&rest body) > > `(when (and (boundp 'partial-completion-mode) > > (fboundp 'partial-completion-mode)) > > (unwind-protect > > (progn > > (partial-completion-mode -1) > > ,@body) > > (partial-completion-mode 1)))) > > #+end_src > > > > This avoids leaking if 'body happens to uses a symbol 'pc-mode-p in a > > different context. > > > > Won't this turn on the mode even if it was off before the macro ws called? > And if so, isn't that a problem? Yes and yes. (and (boundp 'partial-completion-mode) partial-completion-mode (fboundp 'partial-completion-mode)) Is the right condition. Bound, non-nil and callable. @Bastien: Pushed fix for this to master. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de