emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/bookmark.el,v


From: Karl Fogel
Subject: [Emacs-diffs] Changes to emacs/lisp/bookmark.el,v
Date: Mon, 15 Jan 2007 20:04:27 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Karl Fogel <kfogel>     07/01/15 20:04:26

Index: bookmark.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/bookmark.el,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- bookmark.el 6 Feb 2006 14:33:32 -0000       1.87
+++ bookmark.el 15 Jan 2007 20:04:25 -0000      1.88
@@ -1007,14 +1007,18 @@
 (defun bookmark-buffer-file-name ()
   "Return the current buffer's file in a way useful for bookmarks.
 For example, if this is a Info buffer, return the Info file's name."
-  (if (eq major-mode 'Info-mode)
-        Info-current-file
-    (or
-     buffer-file-name
-     (if (and (boundp 'dired-directory) dired-directory)
+  (cond
+   ((eq major-mode 'Info-mode)
+    Info-current-file)
+   (buffer-file-name
+    ;; Abbreviate the path, both so it's shorter and so it's more
+    ;; portable.  E.g., the user's home dir might be a different
+    ;; path on different machines, but "~/" will still reach it.
+    (abbreviate-file-name buffer-file-name))
+   ((and (boundp 'dired-directory) dired-directory)
          (if (stringp dired-directory)
              dired-directory
-           (car dired-directory))))))
+      (car dired-directory)))))
 
 
 (defun bookmark-maybe-load-default-file ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]