unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>,
	emacs-devel@gnu.org
Subject: Re: Misc. minor compile.el issues
Date: Fri, 06 Dec 2002 15:14:21 -0500	[thread overview]
Message-ID: <200212062014.gB6KELU09529@rum.cs.yale.edu> (raw)
In-Reply-To: 5xisy6j44w.fsf@kfs2.cua.dk

> > > Related to this, I would like the setup function to be able to
> > > access the buffer and/or window for the compilation process (e.g.
> > > to set buffer-local variables).
> > 
> > AFAIK, you can use (current-buffer).  No need for `outbuf'.
> > Am I missing something ?
> 
> AFAICS, the setup function is (typically) not called with
> current-buffer == outbuf.

Huh?  The only place where it is called seems to be in:

      (with-current-buffer outbuf
	(compilation-mode name-of-mode)
	;; In what way is it non-ergonomic ?  -stef
	;; (toggle-read-only 1) ;;; Non-ergonomic.
	(set (make-local-variable 'compilation-parse-errors-function) parser)
	(set (make-local-variable 'compilation-error-message) error-message)
	(set (make-local-variable 'compilation-error-regexp-alist)
	     error-regexp-alist)
	(set (make-local-variable 'compilation-enter-directory-regexp-alist)
	     enter-regexp-alist)
	(set (make-local-variable 'compilation-leave-directory-regexp-alist)
	     leave-regexp-alist)
	(set (make-local-variable 'compilation-file-regexp-alist)
	     file-regexp-alist)
	(set (make-local-variable 'compilation-nomessage-regexp-alist)
	     nomessage-regexp-alist)
	(set (make-local-variable 'compilation-arguments)
	     (list command error-message
		   name-of-mode parser
		   error-regexp-alist name-function
		   enter-regexp-alist leave-regexp-alist
		   file-regexp-alist nomessage-regexp-alist))
        ;; This proves a good idea if the buffer's going to scroll
        ;; with lazy-lock on.
        (set (make-local-variable 'lazy-lock-defer-on-scrolling) t)
	(setq default-directory thisdir
	      compilation-directory-stack (list default-directory))
	(set-window-start outwin (point-min))
	(or (eq outwin (selected-window))
	    (set-window-point outwin (point-min)))
	(compilation-set-window-height outwin)
	(if compilation-process-setup-function
	    (funcall compilation-process-setup-function))

I don't see anything between the with-current-buffer and the call
to compilation-process-setup-function which could change current-buffer.


	Stefan

  reply	other threads:[~2002-12-06 20:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06  0:34 Misc. minor compile.el issues Kim F. Storm
2002-12-06 16:55 ` Stefan Monnier
2002-12-06 20:15   ` Kim F. Storm
2002-12-06 20:14     ` Stefan Monnier [this message]
2002-12-07  1:49       ` Kim F. Storm
2002-12-09 15:31         ` Stefan Monnier
2002-12-07 21:26 ` Richard Stallman
2002-12-08  1:38   ` Kim F. Storm
2002-12-09 20:21     ` Richard Stallman
2002-12-10  0:51       ` Kim F. Storm

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200212062014.gB6KELU09529@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).