[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/marginalia 0bca060531 07/15: Minor simplification
From: |
ELPA Syncer |
Subject: |
[elpa] externals/marginalia 0bca060531 07/15: Minor simplification |
Date: |
Sun, 9 Jan 2022 15:57:54 -0500 (EST) |
branch: externals/marginalia
commit 0bca06053174e6e1761ef13790fd2ebcd1852b3c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Minor simplification
---
marginalia.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/marginalia.el b/marginalia.el
index 960145c581..55bee8f004 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -946,10 +946,9 @@ looking for a regexp that matches the prompt."
(defun marginalia--cache-reset ()
"Reset the cache."
- (when marginalia--cache
- (setq marginalia--cache (and (> marginalia--cache-size 0)
- (cons nil (make-hash-table :test #'equal
- :size
marginalia--cache-size))))))
+ (setq marginalia--cache (and marginalia--cache (> marginalia--cache-size 0)
+ (cons nil (make-hash-table :test #'equal
+ :size
marginalia--cache-size)))))
(defun marginalia--cached (fun key)
"Cached application of function FUN with KEY.
@@ -961,7 +960,7 @@ Selectrum."
(let ((ht (cdr marginalia--cache)))
(or (gethash key ht)
(let ((val (funcall fun key)))
- (setcar marginalia--cache (cons key (car marginalia--cache)))
+ (push key (car marginalia--cache))
(puthash key val ht)
(when (>= (hash-table-count ht) marginalia--cache-size)
(let ((end (last (car marginalia--cache) 2)))
- [elpa] externals/marginalia e13d5ac71b 13/15: marginalia--field: Allow float value for :truncate, (continued)
- [elpa] externals/marginalia e13d5ac71b 13/15: marginalia--field: Allow float value for :truncate, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 5a0678d88c 02/15: Deprecate marginalia-separator-threshold, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 709ed9b97e 01/15: marginalia--field: Remove support for :format, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 5f6ba12ff5 04/15: Deprecate and remove most of the current alignment implementation, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia b5ea8e5ce8 09/15: Indentation, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 4391877773 12/15: Rename marginalia-truncate-width to marginalia-field-width, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 1a2495203d 15/15: Colorize truncation ellipsis, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 55c5d3f1b3 03/15: Define the annotation-function in terms of the affixation-function, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia a35476942f 11/15: Hack in better alignment support, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 87e03d7d39 06/15: Inline marginalia--context, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 0bca060531 07/15: Minor simplification,
ELPA Syncer <=
- [elpa] externals/marginalia a21f59a077 10/15: Extract marginalia--affixate, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 80a03d480f 08/15: Simplification, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia ebc6edc2f7 14/15: Perfect the file annotation alignment, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia fa48dbe318 05/15: Remove unnecessary concat, ELPA Syncer, 2022/01/09