bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

save-buffer sets global 'dir' variable to nil


From: Jonas Jarnestrom
Subject: save-buffer sets global 'dir' variable to nil
Date: Mon, 5 Nov 2001 19:48:43 +0100 (MET)

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.6.1 (sparc-sun-solaris2.6, X toolkit)
 of Fri Mar  3 2000 on iris
configured using `configure  --with-gcc --with-pop --with-x-toolkit=lucid 
--bindir=/usr/local/bin --libexecdir=/usr/local/libexec'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


Perhaps not a show stopper, but not a clean behavior.
I first thought my code was erring, but it turned out to be
save-buffer that fucked up my 'dir' argument.

My code:

(defun cs-tmp-edit-file (rfile dir action &optional framename vobp)
  (and (buffer-modified-p)
       (not (ding))
       (y-or-n-p "Buffer is modified, save your changes? ")
       (save-buffer))
  (or rfile
      (setq rfile (cs-get-file-in-dir-with-mouse dir framename vobp)))
  <---------snipped---------------->

If save-buffer is executed, dir is reset to nil on the call to next
func.
Or simpler:

(setq dir "jonas")
(save-buffer)
dir  ; evaluates to nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]