From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Typo in 'org-without-partial-completion' Date: Sat, 02 Jul 2011 16:55:56 +0200 Message-ID: <87sjqozq83.wl%dmaus@ictsoc.de> References: <87wrg3k7io.fsf@gnu.org> <871uybdsqf.wl%dmaus@ictsoc.de> <87iprl9lv6.wl%dmaus@ictsoc.de> <9904.1309617631@alphaville.dokosmarshall.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sat_Jul__2_16:55:56_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd1c5-0005o7-5U for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qd1c4-0003xW-7D for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:56:05 -0400 Received: from app1a.xlhost.de ([213.202.242.161]:47673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd1c4-0003xN-1E for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 10:56:04 -0400 In-Reply-To: <9904.1309617631@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: David Maus , emacs-orgmode@gnu.org, Paul Sexton , Bastien --pgp-sign-Multipart_Sat_Jul__2_16:55:56_2011-1 Content-Type: text/plain; charset=US-ASCII 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 --pgp-sign-Multipart_Sat_Jul__2_16:55:56_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAk4PMXwACgkQma24O1pEeOaTLwEA1hbfAGBmltTrzsyOOLVuqDYf JqLQLYsaXFsiMWGri2YA/1s09d2fkoN7SBUbEYBlVBNK5ZRswsvAwFfPmkaj4j+O =Oju1 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sat_Jul__2_16:55:56_2011-1--