From: Mark Wooding Date: Wed, 26 Aug 2020 12:02:30 +0000 (+0100) Subject: el/dot-emacs.el: Replace `directory-name-p' by a circumlocution. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/f74fc666ec8a9c60df691d70930dff5fae52853b?ds=inline;hp=--cc el/dot-emacs.el: Replace `directory-name-p' by a circumlocution. I hadn't noticed that this function doesn't exist in Emacs 24. --- f74fc666ec8a9c60df691d70930dff5fae52853b diff --git a/el/dot-emacs.el b/el/dot-emacs.el index c138bda..dafedfd 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -617,7 +617,7 @@ (defadvice rename-file (after mdw-rename-buffers (from to &optional forcep) (unless mdw-inhibit-rename-buffer (let ((buffer (get-file-buffer from))) (when buffer - (let ((to (if (not (directory-name-p to)) to + (let ((to (if (not (string= (file-name-nondirectory to) "")) to (concat to (file-name-nondirectory from))))) (with-current-buffer buffer (set-visited-file-name to nil t)))))))