]> code.delx.au - gnu-emacs/commitdiff
(bookmark-maybe-sort-alist): Don't modify bookmark-alist.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Tue, 17 Jul 2007 16:14:25 +0000 (16:14 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Tue, 17 Jul 2007 16:14:25 +0000 (16:14 +0000)
Instead, if not sorting, simply return it.
(bookmark-bmenu-list): Call bookmark-maybe-sort-alist
for its return value, not for its side effect.

lisp/ChangeLog
lisp/bookmark.el

index 062f1ce1dcca0345821384774f2a03f0c767ef4c..30b8a11c088d2f6304978b189018d6c57ab00ed6 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-17  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+       * bookmark.el (bookmark-show-all-annotations):
+       Make sure each inserted annotation ends with newline.
+
+       (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.
+
 2007-07-17  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc.el: Add more info about the vc-registered function.
index 816ed8b182e22d04e3e11e043a78ce0a4920eb1c..d0c131e386ef981069f738f5b9e6b6867c0ce1c8 100644 (file)
@@ -1044,10 +1044,10 @@ For example, if this is a Info buffer, return the Info file's name."
   ;;Return the bookmark-alist for display.  If the bookmark-sort-flag
   ;;is non-nil, then return a sorted copy of the alist.
   (if bookmark-sort-flag
-      (setq bookmark-alist
-            (sort (copy-alist bookmark-alist)
-                  (function
-                   (lambda (x y) (string-lessp (car x) (car y))))))))
+      (sort (copy-alist bookmark-alist)
+            (function
+             (lambda (x y) (string-lessp (car x) (car y)))))
+    bookmark-alist))
 
 
 (defvar bookmark-after-jump-hook nil
@@ -1568,7 +1568,6 @@ deletion, or > if it is flagged for displaying."
     (insert "% Bookmark\n- --------\n")
     (add-text-properties (point-min) (point)
                         '(font-lock-face bookmark-menu-heading))
-    (bookmark-maybe-sort-alist)
     (mapcar
      (lambda (full-record)
        ;; if a bookmark has an annotation, prepend a "*"
@@ -1591,7 +1590,7 @@ deletion, or > if it is flagged for displaying."
                  help-echo "mouse-2: go to this bookmark in other window")))
           (insert "\n")
           )))
-     bookmark-alist))
+     (bookmark-maybe-sort-alist)))
   (goto-char (point-min))
   (forward-line 2)
   (bookmark-bmenu-mode)