[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy cb28d176c5 04/13: Refactor swiper-font-lock-ensure
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy cb28d176c5 04/13: Refactor swiper-font-lock-ensure |
Date: |
Sat, 22 Mar 2025 12:22:47 -0400 (EDT) |
branch: externals/ivy
commit cb28d176c513e1c62575fcd1a40335ec2891d7d6
Author: Basil L. Contovounesios <basil@contovou.net>
Commit: Basil L. Contovounesios <basil@contovou.net>
Refactor swiper-font-lock-ensure
* swiper.el (swiper-font-lock-ensure-p): Fix sense of docstring.
(swiper-font-lock-ensure): Use static-if.
---
swiper.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/swiper.el b/swiper.el
index edeee0e995..88ab0e0d37 100644
--- a/swiper.el
+++ b/swiper.el
@@ -481,7 +481,7 @@ such as `scroll-conservatively' are set to a high value.")
"List of major-modes that are incompatible with `font-lock-ensure'.")
(defun swiper-font-lock-ensure-p ()
- "Return non-nil if we should `font-lock-ensure'."
+ "Return non-nil if we should not `font-lock-ensure'."
(or (derived-mode-p 'magit-mode)
(bound-and-true-p magit-blame-mode)
(memq major-mode swiper-font-lock-exclude)
@@ -489,12 +489,13 @@ such as `scroll-conservatively' are set to a high value.")
(defun swiper-font-lock-ensure ()
"Ensure the entire buffer is highlighted."
- (unless (swiper-font-lock-ensure-p)
- (unless (or (> (buffer-size) 100000) (null font-lock-mode))
- (if (fboundp 'font-lock-ensure)
- ;; Added in Emacs 25.1.
- (font-lock-ensure)
- (with-no-warnings (font-lock-fontify-buffer))))))
+ (unless (or (swiper-font-lock-ensure-p)
+ (> (buffer-size) 100000)
+ (not font-lock-mode))
+ (static-if (fboundp 'font-lock-ensure)
+ ;; Added in Emacs 25.1.
+ (font-lock-ensure)
+ (font-lock-fontify-buffer))))
(defvar swiper--format-spec ""
"Store the current candidates format spec.")
- [elpa] externals/ivy updated (dda3649f70 -> 3059155fdc), Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy cb28d176c5 04/13: Refactor swiper-font-lock-ensure,
Basil L. Contovounesios <=
- [elpa] externals/ivy a6417c86d4 01/13: Pacify old Counsel byte-compilation warnings, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy 8518e16e06 05/13: Use function-put in more places, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy cf418815b3 03/13: Fix counsel-search decoding and docs, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy eb488d7108 02/13: Fix some Counsel actions, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy 3780e2e7b2 06/13: Function-quote keymap definitions, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy b56a915889 08/13: Use regular Outline comment headings, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy 35d1e9ad16 09/13: Clean up Make target scripts, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy e8915418d8 10/13: Address check-declare warnings, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy 847ba97f6b 11/13: Tweak some documentation, Basil L. Contovounesios, 2025/03/22
- [elpa] externals/ivy 9c625c46d5 12/13: Merge branch 'master' into externals/ivy, Basil L. Contovounesios, 2025/03/22