aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-11-21 19:07:21 +0000
committerStefan Monnier2008-11-21 19:07:21 +0000
commit3889f0fa5fc6489aa2e0e236581838c29f59dc7d (patch)
treeb99709d2d65b77dddfb2dd384e91e9cc5e4f4406
parentcbe5b0eb180dacdf376c2977c2bafce67ea16bbf (diff)
downloademacs-3889f0fa5fc6489aa2e0e236581838c29f59dc7d.tar.gz
emacs-3889f0fa5fc6489aa2e0e236581838c29f59dc7d.zip
(bookmark-buffer-file-name): Also abbreviate dired-dir.
Suggested by Toru TSUNEYOSHI.
-rw-r--r--lisp/ChangeLog22
-rw-r--r--lisp/bookmark.el22
2 files changed, 24 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 86ae44ebf9a..46716b2e4c1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,15 +1,20 @@
12008-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * bookmark.el (bookmark-buffer-file-name): Also abbreviate dired-dir.
4 Suggested by Toru TSUNEYOSHI.
5
12008-11-21 Shigeru Fukaya <shigeru.fukaya@gmail.com> 62008-11-21 Shigeru Fukaya <shigeru.fukaya@gmail.com>
2 7
3 * byte-opt.el (byte-compile-butlast): Move up in file. 8 * byte-opt.el (byte-compile-butlast): Move up in file.
4 (byte-optimize-plus): Don't call 9 (byte-optimize-plus): Don't call
5 byte-optimize-delay-constants-math (bug#1334). Use 10 byte-optimize-delay-constants-math (bug#1334).
6 byte-optimize-predicate to optimize constants. 11 Use byte-optimize-predicate to optimize constants.
7 (byte-optimize-minus): Don't call 12 (byte-optimize-minus): Don't call
8 byte-optimize-delay-constants-math. Remove zero arguments first 13 byte-optimize-delay-constants-math. Remove zero arguments first
9 if possible. Call byte-optimize-predicate to optimize constants. 14 if possible. Call byte-optimize-predicate to optimize constants.
10 (byte-optimize-multiply): Remove optimizations for arguments of 0 15 (byte-optimize-multiply): Remove optimizations for arguments of 0
11 and 2, which may be inaccurate. Optimize (* x -1) to (- x). Call 16 and 2, which may be inaccurate. Optimize (* x -1) to (- x).
12 byte-optimize-predicate. 17 Call byte-optimize-predicate.
13 (byte-optimize-divide): Leave runtime errors unchanged. 18 (byte-optimize-divide): Leave runtime errors unchanged.
14 Optimize (/ x 1) to (+ x 0). Remove optimizations for arguments of 19 Optimize (/ x 1) to (+ x 0). Remove optimizations for arguments of
15 0 and 2.0, which may be inaccurate. Call byte-optimize-predicate. 20 0 and 2.0, which may be inaccurate. Call byte-optimize-predicate.
@@ -275,8 +280,7 @@
275 280
2762008-11-16 Chong Yidong <cyd@stupidchicken.com> 2812008-11-16 Chong Yidong <cyd@stupidchicken.com>
277 282
278 * subr.el (read-passwd): Use read-event instead of 283 * subr.el (read-passwd): Use read-event instead of read-char-exclusive.
279 read-char-exclusive.
280 284
2812008-11-16 Stefan Monnier <monnier@iro.umontreal.ca> 2852008-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
282 286
@@ -368,7 +372,7 @@
368 * emulation/viper-init.el (viper-ESC-keyseq-timeout): Make it into a 372 * emulation/viper-init.el (viper-ESC-keyseq-timeout): Make it into a
369 function instead of a variable. 373 function instead of a variable.
370 374
371 * emulation/viper-util.el (viper-fast-keysequence-p): Changed to use 375 * emulation/viper-util.el (viper-fast-keysequence-p): Change to use
372 viper-ESC-keyseq-timeout as a function. 376 viper-ESC-keyseq-timeout as a function.
373 (viper-get-saved-cursor-color-in-replace-mode): Use defun instead of 377 (viper-get-saved-cursor-color-in-replace-mode): Use defun instead of
374 defsubst. 378 defsubst.
@@ -13611,8 +13615,8 @@
13611 13615
136122008-03-01 Glenn Morris <rgm@gnu.org> 136162008-03-01 Glenn Morris <rgm@gnu.org>
13613 13617
13614 * emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Restore 13618 * emacs-lisp/bytecomp.el (byte-compile-maybe-guarded):
13615 code commented out 2007-11-10. 13619 Restore code commented out 2007-11-10.
13616 13620
13617 * emulation/edt.el (zmacs-region-stays): Define for compiler once only. 13621 * emulation/edt.el (zmacs-region-stays): Define for compiler once only.
13618 13622
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 8a48cf3e18b..1ae32d1fb0e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -888,17 +888,17 @@ Default to file name if it's nil."
888 888
889(defun bookmark-buffer-file-name () 889(defun bookmark-buffer-file-name ()
890 "Return the current buffer's file in a way useful for bookmarks." 890 "Return the current buffer's file in a way useful for bookmarks."
891 (cond 891 ;; Abbreviate the path, both so it's shorter and so it's more
892 (buffer-file-name 892 ;; portable. E.g., the user's home dir might be a different
893 ;; Abbreviate the path, both so it's shorter and so it's more 893 ;; path on different machines, but "~/" will still reach it.
894 ;; portable. E.g., the user's home dir might be a different 894 (abbreviate-file-name
895 ;; path on different machines, but "~/" will still reach it. 895 (cond
896 (abbreviate-file-name buffer-file-name)) 896 (buffer-file-name buffer-file-name)
897 ((and (boundp 'dired-directory) dired-directory) 897 ((and (boundp 'dired-directory) dired-directory)
898 (if (stringp dired-directory) 898 (if (stringp dired-directory)
899 dired-directory 899 dired-directory
900 (car dired-directory))) 900 (car dired-directory)))
901 (t (error "Buffer not visiting a file or directory")))) 901 (t (error "Buffer not visiting a file or directory")))))
902 902
903 903
904(defun bookmark-maybe-load-default-file () 904(defun bookmark-maybe-load-default-file ()