[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *cvs-commit* gets used as PCVS buffer
From: |
David Kastrup |
Subject: |
Re: *cvs-commit* gets used as PCVS buffer |
Date: |
Wed, 04 May 2005 20:17:20 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>>>>>> "David" == David Kastrup <address@hidden> writes:
>
> Ahh... I think I finally got it. Does the patch below fix the problem?
> I believe it should. The only problem is that I can't figure out what this
> code was supposed to do, so it may break something.
>
> --- pcvs.el 02 mai 2005 11:41:42 -0400 1.80
> +++ pcvs.el 04 mai 2005 13:44:29 -0400
> @@ -1438,12 +1438,10 @@
> ;; displayed in the wrong minibuffer).
> (cvs-mode!)
> (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
> - (lbd list-buffers-directory)
> (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
> 'log-edit)))
> (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf)
> (set (make-local-variable 'cvs-minor-wrap-function)
> 'cvs-commit-minor-wrap)
> - (set (make-local-variable 'list-buffers-directory) lbd)
> (run-hooks 'cvs-mode-commit-hook)))
>
> (defun cvs-commit-minor-wrap (buf f)
> @@ -1494,14 +1492,12 @@
> ;; displayed in the wrong minibuffer).
> (cvs-mode!)
> (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
> - (lbd list-buffers-directory)
> (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
> 'log-edit)))
> (funcall setupfun 'cvs-do-edit-log nil 'cvs-edit-log-filelist buf)
> (when text (erase-buffer) (insert text))
> (set (make-local-variable 'cvs-edit-log-revision) rev)
> (set (make-local-variable 'cvs-minor-wrap-function)
> 'cvs-edit-log-minor-wrap)
> - (set (make-local-variable 'list-buffers-directory) lbd)
> ;; (run-hooks 'cvs-mode-commit-hook)
> ))
Well, I guess this is rather obvious. This transfers the original
value of list-buffers-directory to a buffer-local copy of the commit
buffer so that changes to list-buffers-directory done while the commit
is in progress don't affect the operation of the commit.
I do this sort of local variable value copying to the process buffer
when doing start-process quite a bit in AUCTeX.
I have no clue on what list-buffers-directory actually does, it is
defined in menu-bar.el defaulting to nil, and it completely baffles me
that this should have the given effect or what it is intended for.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum