Emacs: apply "expand-filename" on "default-directory".
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sat, 22 Jul 2006 23:35:16 +0900
changeset 2668 7a32b7e6c563
parent 2667 92ba858ed640
child 2669 b013c9daae69
Emacs: apply "expand-filename" on "default-directory". "default-directory" may has home directory("~") relative path in some runtime environment(or emacs revision ?), so expand-filename is required.
contrib/mercurial.el
--- a/contrib/mercurial.el	Sat Jul 22 23:30:19 2006 +0900
+++ b/contrib/mercurial.el	Sat Jul 22 23:35:16 2006 +0900
@@ -380,7 +380,9 @@
   (save-excursion
     (while hg-prev-buffer
       (set-buffer hg-prev-buffer))
-    (let ((path (or default (buffer-file-name) default-directory)))
+    (let ((path (or default
+                    (buffer-file-name)
+                    (expand-file-name default-directory))))
       (if (or (not path) current-prefix-arg)
           (expand-file-name
            (eval (list* 'read-file-name