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://git.distorted.org.uk/~mdw/profile/commitdiff_plain/f74fc666ec8a9c60df691d70930dff5fae52853b el/dot-emacs.el: Replace `directory-name-p' by a circumlocution. I hadn't noticed that this function doesn't exist in Emacs 24. --- 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 @@ Don't do this if `mdw-inhibit-rename-buffer' is non-nil." (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)))))))