Steve Youngs wrote:
APPROVE COMMIT
|--==> "VB" == Vaclav Barta <vbar(a)comp.cz> writes:
VB> 2002-03-04 Vaclav Barta <vbar(a)comp.cz>
VB> * jde.el: use get-file-buffer to map pathname to buffer
Thanks very much for the patch, Vaclav. I'll apply this shortly.
Er, I've
been looking at JDE upstream, and it seems (I didn't test) that
the problem is already fixed in a new beta (2.2.9beta9.1). I do think
the fix is sub-optimal - it uses (the same) lambda in
jde-save-close-buffer and jde-save-variable, where get-file-buffer could
IMHO be used instead - but I'm not sure whether such details are worth
gold-plating... Perhaps there are compatibility problems with
get-file-buffer?
Bye
Vasek
P.S.: on the other hand, looking at the jde-save-variable again, how is
it
supposed to work? The fixed (note the comment) lambda is
(lambda (buf)
(let* ((directory-sep-char ?/) ;; XEmacs defaults to backslash
(buf-file-name (buffer-file-name buf)))
(and buf-file-name
(string= (car project)
(expand-file-name buf-file-name)))))
Apparently buffer-file-name depends on the value of directory-sep-char
(not that it's documented); but isn't directory-sep-char above declared
just locally, i.e. a different variable from the global one?