[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-c
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-candidates thinko |
Date: |
Thu, 25 Feb 2021 08:32:04 -0500 (EST) |
branch: externals/ivy-hydra
commit 25b63213e4070dd6aa7e7860d3afdb570c90de7d
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Fix recent counsel-recentf-candidates thinko
* counsel.el (counsel-recentf-candidates): Move declare-function to
where it's needed and where it doesn't change the semantics of the
top-level 'if' conditional. Spotted by Akira Tamamori.
Simplify time comparison by using time-less-p.
Re: #2523
---
counsel.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/counsel.el b/counsel.el
index e6657f7..4e79e04 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2265,18 +2265,21 @@ the files in said list, sorting the combined list by
file access
time."
(if (and counsel-recentf-include-xdg-list
(>= emacs-major-version 26))
- (declare-function file-attribute-access-time "files" (attributes))
(delete-dups
- (sort (append (mapcar #'substring-no-properties recentf-list)
- (counsel--recentf-get-xdg-recent-files))
+ (sort (nconc (mapcar #'substring-no-properties recentf-list)
+ (counsel--recentf-get-xdg-recent-files))
(lambda (file1 file2)
(cond ((file-remote-p file1)
nil)
- ((file-remote-p file2)
- t)
+ ((file-remote-p file2))
(t
- (> (time-to-seconds (file-attribute-access-time
(file-attributes file1)))
- (time-to-seconds (file-attribute-access-time
(file-attributes file2)))))))))
+ ;; Added in Emacs 26.1.
+ (declare-function file-attribute-access-time "files"
+ (attributes))
+ (time-less-p (file-attribute-access-time
+ (file-attributes file2))
+ (file-attribute-access-time
+ (file-attributes file1))))))))
(mapcar #'substring-no-properties recentf-list)))
(defun counsel--strip-prefix (prefix str)
- [elpa] externals/ivy-hydra 3915890 172/395: ivy.el (ivy-format-function-line): Add doc about :extend t, (continued)
- [elpa] externals/ivy-hydra 3915890 172/395: ivy.el (ivy-format-function-line): Add doc about :extend t, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ea1e4f3 165/395: ivy.el (ivy-avy): Add a warning for M-x, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40b4705 160/395: ivy.el (ivy--dynamic-collection-cands): Handle the case of coll 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c782b48 161/395: ivy.el (ivy-read-action-by-key): Fix for Emacs27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1933f6d 178/395: ivy.el (ivy-resume): Don't re-calculate for :dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-smart-case-flag): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 73c9773 180/395: Fix ripgrep pcre2 feature detection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 640b83d 182/395: counsel.el (counsel-rg-base-command): Fix missing space, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d5225a1 187/395: swiper.el (swiper--isearch-unwind): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93be68a 183/395: swiper.el (swiper-isearch-format-function): Fix for ivy-resume, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-candidates thinko,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string predicates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from ivy-auto-shrink-minibuffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbers for "M-o w" and "M-o i", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f2852fc 207/395: Clean up compatibility code, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1d25cdd 209/395: Revert ".dir-locals.el: Simplify outline-regexp", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dc60eac 201/395: ivy.el (ivy-read-action-by-key): Fix keys to quit action selection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 251c219 193/395: Enable setting the display function with ivy-configure, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ee2a537 204/395: * counsel.el (counsel-mark--get-evil-candidates): Fix typo, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eeb14b1 213/395: ivy-test.el (ivy-read-history): Add a test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1bf5b98 234/395: ivy.el: Fix next-error randomly jumping to previous match, Basil L. Contovounesios, 2021/02/25