[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setf buffer-file-name
From: |
Stefan Monnier |
Subject: |
Re: setf buffer-file-name |
Date: |
Mon, 07 Apr 2008 15:10:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> (A) Should cl-macs.el patches go to you or
> to <address@hidden> or someplace like that?
You can report any bug in the code of Emacs with M-x report-emacs-bug.
I do not know if Dave still worries about CL, but indeed if he does not
we should fix the cl*.el headers to say "Maintainer: FSF".
> (B) Should (with-current-buffer nil ...)
> keep the same buffer current rather than error?
I don't see a strong need to make it work as you suggest.
It's pretty easy to use (or <foo> (current-buffer)) for the few cases
where this might be useful.
> (1) Documented defsetf simple form third argument.
Thanks.
> ;;; Some more Emacs-related place types.
> -(defsetf buffer-file-name set-visited-file-name t)
> +(defsetf buffer-file-name (&optional buf) (filename)
> + (list 'progn
> + (list 'if buf
> + (list 'with-current-buffer buf
> + (list 'set-visited-file-name filename))
> + (list 'set-visited-file-name filename))
> + filename))
Actually, while your patch is correct, I wonder if using
set-visited-file-name is really a good idea here. Yes, it's probably
the cleanest way to set buffer-file-name in some cases, but it does
a lot more than just set buffer-file-name, so I'm not sure if it should
be hidden as a mere "setf".
I.e., I suggest to remove this defsetf altogether.
Stefan