aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-07-17 16:14:25 +0000
committerThien-Thi Nguyen2007-07-17 16:14:25 +0000
commit089fb40e2782ed51463cc062f37fb4adbe26f83c (patch)
tree97b5392c4ed4f10c757bddf11f10f56eadd7dfb7
parent23fe28f248284aeaefc144cbe6fbd3884992f938 (diff)
downloademacs-089fb40e2782ed51463cc062f37fb4adbe26f83c.tar.gz
emacs-089fb40e2782ed51463cc062f37fb4adbe26f83c.zip
(bookmark-maybe-sort-alist): Don't modify bookmark-alist.
Instead, if not sorting, simply return it. (bookmark-bmenu-list): Call bookmark-maybe-sort-alist for its return value, not for its side effect.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/bookmark.el11
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 062f1ce1dcc..30b8a11c088 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12007-07-17 Thien-Thi Nguyen <ttn@gnuvola.org>
2
3 * bookmark.el (bookmark-show-all-annotations):
4 Make sure each inserted annotation ends with newline.
5
6 (bookmark-maybe-sort-alist): Don't modify
7 bookmark-alist. Instead, if not sorting, simply return it.
8 (bookmark-bmenu-list): Call bookmark-maybe-sort-alist
9 for its return value, not for its side effect.
10
12007-07-17 Dan Nicolaescu <dann@ics.uci.edu> 112007-07-17 Dan Nicolaescu <dann@ics.uci.edu>
2 12
3 * vc.el: Add more info about the vc-registered function. 13 * vc.el: Add more info about the vc-registered function.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 816ed8b182e..d0c131e386e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1044,10 +1044,10 @@ For example, if this is a Info buffer, return the Info file's name."
1044 ;;Return the bookmark-alist for display. If the bookmark-sort-flag 1044 ;;Return the bookmark-alist for display. If the bookmark-sort-flag
1045 ;;is non-nil, then return a sorted copy of the alist. 1045 ;;is non-nil, then return a sorted copy of the alist.
1046 (if bookmark-sort-flag 1046 (if bookmark-sort-flag
1047 (setq bookmark-alist 1047 (sort (copy-alist bookmark-alist)
1048 (sort (copy-alist bookmark-alist) 1048 (function
1049 (function 1049 (lambda (x y) (string-lessp (car x) (car y)))))
1050 (lambda (x y) (string-lessp (car x) (car y)))))))) 1050 bookmark-alist))
1051 1051
1052 1052
1053(defvar bookmark-after-jump-hook nil 1053(defvar bookmark-after-jump-hook nil
@@ -1568,7 +1568,6 @@ deletion, or > if it is flagged for displaying."
1568 (insert "% Bookmark\n- --------\n") 1568 (insert "% Bookmark\n- --------\n")
1569 (add-text-properties (point-min) (point) 1569 (add-text-properties (point-min) (point)
1570 '(font-lock-face bookmark-menu-heading)) 1570 '(font-lock-face bookmark-menu-heading))
1571 (bookmark-maybe-sort-alist)
1572 (mapcar 1571 (mapcar
1573 (lambda (full-record) 1572 (lambda (full-record)
1574 ;; if a bookmark has an annotation, prepend a "*" 1573 ;; if a bookmark has an annotation, prepend a "*"
@@ -1591,7 +1590,7 @@ deletion, or > if it is flagged for displaying."
1591 help-echo "mouse-2: go to this bookmark in other window"))) 1590 help-echo "mouse-2: go to this bookmark in other window")))
1592 (insert "\n") 1591 (insert "\n")
1593 ))) 1592 )))
1594 bookmark-alist)) 1593 (bookmark-maybe-sort-alist)))
1595 (goto-char (point-min)) 1594 (goto-char (point-min))
1596 (forward-line 2) 1595 (forward-line 2)
1597 (bookmark-bmenu-mode) 1596 (bookmark-bmenu-mode)