[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Misc. minor compile.el issues
From: |
Stefan Monnier |
Subject: |
Re: Misc. minor compile.el issues |
Date: |
Fri, 06 Dec 2002 15:14:21 -0500 |
> > > 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
Re: Misc. minor compile.el issues, Richard Stallman, 2002/12/07