emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: David Maus <dmaus@ictsoc.de>
Cc: Bastien <bzg@altern.org>,
	emacs-orgmode@gnu.org, Paul Sexton <psexton@xnet.co.nz>,
	nicholas.dokos@hp.com
Subject: Re: Typo in 'org-without-partial-completion'
Date: Sat, 02 Jul 2011 10:40:31 -0400	[thread overview]
Message-ID: <9904.1309617631@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from David Maus <dmaus@ictsoc.de> of "Sat, 02 Jul 2011 09:34:37 +0200." <87iprl9lv6.wl%dmaus@ictsoc.de>

David Maus <dmaus@ictsoc.de> 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

  parent reply	other threads:[~2011-07-02 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 21:08 Typo in 'org-without-partial-completion' Paul Sexton
2011-06-28 16:48 ` Bastien
2011-06-30  9:12 ` Bastien
2011-06-30 19:28   ` David Maus
2011-07-02  7:34     ` David Maus
2011-07-02  9:26       ` Bastien
2011-07-02 13:50         ` David Maus
2011-07-02 14:40       ` Nick Dokos [this message]
2011-07-02 14:55         ` David Maus
2011-07-03 10:44           ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9904.1309617631@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=bzg@altern.org \
    --cc=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=psexton@xnet.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).