el/dot-emacs.el: Replace `directory-name-p' by a circumlocution.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 26 Aug 2020 12:02:30 +0000 (13:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 26 Aug 2020 12:15:37 +0000 (13:15 +0100)
I hadn't noticed that this function doesn't exist in Emacs 24.

el/dot-emacs.el

index c138bda..dafedfd 100644 (file)
@@ -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)))))))