chiark / gitweb /
el/dot-emacs.el: Add machinery for not renaming buffers along with files.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 7 May 2020 00:09:46 +0000 (01:09 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 7 May 2020 00:09:46 +0000 (01:09 +0100)
commit52ffecb1e30140d89c6cf8de707dbb300d5c82e4
treeaa3f2baaa9231da706bac2f616c6620128a3f1c2
parent7437df33f8f384b2f1d374df3ec2a499cfdcce27
el/dot-emacs.el: Add machinery for not renaming buffers along with files.

For example: if `backup-by-copying' is nil (which it is for me), then
`backup-buffer' will rename the file to its backup name -- and then
we'll be left visiting the backup file, which is obviously hopeless.

Add a variable `mdw-inhibit-rename-buffer' which instructs the
`rename-file' advice not to rename the buffer as well, and a new macro
`mdw-advise-to-inhibit-rename-buffer' to advise various functions to set
this variable while they're operating.
el/dot-emacs.el