all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: possible `with-current-buffer' bug
Date: Sun, 06 Feb 2011 20:10:27 +0100	[thread overview]
Message-ID: <87mxm9rnbw.fsf@escher.home> (raw)
In-Reply-To: AANLkTikQarBKkLnJWi0Cf1uWRLVkp3Nqatd1P5t+i=Rw@mail.gmail.com

On Mon, 7 Feb 2011 01:30:30 +0800 Le Wang <l26wang@gmail.com> wrote:

> Hi,
>
>
> Could someone follow these steps and tell me if I'm going insane?
>  "compilation-disable-input" seems to be set by with-current-buffer.
>
> 1. emacs -Q
>
> 2. paste into scratch:
>
> (require 'compile)
>
> (defun foo ()
>   (interactive)
>   (compilation-start "blahasdfasdf" 'grep-mode))
>
> 3. M-x eval-current-buffer
> 4. M-x foo
> 5. (confirm "compilation-disable-input" is nil) C-h v
> compilation-disable-input
> 5. (instrument compilation-start and step through it) C-h f compilation-start
> C-x o <tab> <return> M-x edebug-defun M-x foo
>
> As soon as I get inside the first "(with-current-buffer () ... " form, the
> value of "compilation-disable-input" changes from nil to t.  I''ve seen this
> with NTEmacs 23.2.1 and CVS build 20110112.

See grep.el:

(define-compilation-mode grep-mode "Grep"
  "Sets `grep-last-buffer' and `compilation-window-height'."
  (setq grep-last-buffer (current-buffer))
  (set (make-local-variable 'tool-bar-map) grep-mode-tool-bar-map)
  (set (make-local-variable 'compilation-error-face)
       grep-hit-face)
  (set (make-local-variable 'compilation-error-regexp-alist)
       grep-regexp-alist)
  (set (make-local-variable 'compilation-process-setup-function)
       'grep-process-setup)
  (set (make-local-variable 'compilation-disable-input) t))
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Steve Berman




  reply	other threads:[~2011-02-06 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 17:30 possible `with-current-buffer' bug Le Wang
2011-02-06 19:10 ` Stephen Berman [this message]
2011-02-07  7:26   ` Le Wang
2011-02-07  8:44     ` Tassilo Horn
2011-02-07  9:23       ` Le Wang
2011-02-07  9:43         ` Tassilo Horn
2011-02-07  9:44         ` Thierry Volpiatto
2011-02-07 10:16         ` Eli Zaretskii
2011-02-07 12:10           ` Le Wang

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

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

  git send-email \
    --in-reply-to=87mxm9rnbw.fsf@escher.home \
    --to=stephen.berman@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.