From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Typo in 'org-without-partial-completion' Date: Sat, 02 Jul 2011 10:40:31 -0400 Message-ID: <9904.1309617631@alphaville.dokosmarshall.org> References: <87wrg3k7io.fsf@gnu.org> <871uybdsqf.wl%dmaus@ictsoc.de> <87iprl9lv6.wl%dmaus@ictsoc.de> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd1NO-0003by-3x for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:40:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qd1NM-0001wN-T8 for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:40:54 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:62523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd1NM-0001wH-HR for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:40:52 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LNP00IYTNFJSTA5@vms173003.mailsrvcs.net> for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 09:40:37 -0500 (CDT) In-reply-to: Message from David Maus of "Sat, 02 Jul 2011 09:34:37 +0200." <87iprl9lv6.wl%dmaus@ictsoc.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: Bastien , emacs-orgmode@gnu.org, Paul Sexton , nicholas.dokos@hp.com 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? Nick