[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fccde52158: Place bookmarks without last-modified at the end
From: |
Lars Ingebrigtsen |
Subject: |
master fccde52158: Place bookmarks without last-modified at the end |
Date: |
Wed, 1 Jun 2022 11:33:12 -0400 (EDT) |
branch: master
commit fccde521585c708a9108517204b3e9a88c25ab2f
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Place bookmarks without last-modified at the end
* lisp/bookmark.el (bookmark-sort-flag): Typo fix in doc string.
(bookmark-maybe-sort-alist): Fix sorting when there's no last
modified.
---
lisp/bookmark.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 8e251e9de8..849303fac7 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -120,7 +120,7 @@ nil means they will be displayed in LIFO order (that is,
most
recently created ones come first, oldest ones come last).
`last-modified' means that bookmarks will be displayed sorted
-from most recently set to last recently set.
+from most recently set to least recently set.
Other values means that bookmarks will be displayed sorted by
bookmark name."
@@ -520,8 +520,11 @@ is ordered from most recently created to least recently
created bookmark."
(sort copy (lambda (x y) (string-lessp (car x) (car y)))))
((eq bookmark-sort-flag 'last-modified)
(sort copy (lambda (x y)
- (time-less-p (bookmark-get-last-modified y)
- (bookmark-get-last-modified x)))))
+ (let ((tx (bookmark-get-last-modified x))
+ (ty (bookmark-get-last-modified y)))
+ (cond ((null tx) nil)
+ ((null ty) t)
+ (t (time-less-p ty tx)))))))
(t copy))))
(defun bookmark-completing-read (prompt &optional default)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fccde52158: Place bookmarks without last-modified at the end,
Lars Ingebrigtsen <=