Philipp Stephani <p.stephani2@gmail.com> writes:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((buffer (current-buffer)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; `unquote-then-quote' is only=
used for the
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; `verify-visited-file-modtime'=
; action, which takes a buffer
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; as only optional argument.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-current-buffer (or (car argum=
ents) buffer)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((buffer-file-name (sub=
string buffer-file-name 2)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Make sure to hide =
the temporary buffer change from the
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; underlying operati=
on.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-current-buffer =
buffer
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(apply operati=
on arguments))))))
I think this could be simplified by using the buffer-file-name function:
=C2=A0 =C2=A0 ;; `unquote-then-quote' is only used for the
=C2=A0 =C2=A0 ;; `verify-visited-file-modtime' action, which takes a bu=
ffer
=C2=A0 =C2=A0 ;; as only optional argument.
=C2=A0 =C2=A0 (let ((buffer-file-name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(substring (buffer-file-name (car =
arguments)) 2)))
=C2=A0 =C2=A0 =C2=A0 (apply operation arguments))
=
That's not the same, it will set the file name of the wrong =
buffer.=C2=A0