Vaclav Barta writes: > Steve Youngs wrote: > > APPROVE COMMIT > > |--==> "VB" == Vaclav Barta <[EMAIL PROTECTED]> writes: > > VB> 2002-03-04 Vaclav Barta <[EMAIL PROTECTED]> > > 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? >
I assume that I used the lambda expression originally because I wasn't aware of get-file-buffer. I looked up get-file-buffer and found a reference to find-buffer-visiting, which seems even more suitable so I am going to try Vasek's patch, but substituting find-buffer-visiting. > 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? > Yes, it shadows the global value allowing me to ensure that for the purposes of this one function that Emacs/XEmacs uses forward slashes when returning the path, thus "normalizing the path" for the sake of comparison. Paul
