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