[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 02073c4f1c 285/333: Remove buffer-list-update-ho
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 02073c4f1c 285/333: Remove buffer-list-update-hook. |
Date: |
Tue, 27 Feb 2024 13:00:45 -0500 (EST) |
branch: externals/lentic
commit 02073c4f1c376c99511e0e637a15ed0da18405a8
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Remove buffer-list-update-hook.
The hook function is too computationally intensive, and has mostly been
obsoleted because the display is updated explicitly in most places.
Closes #42.
---
lentic-mode.el | 10 ++--------
lentic.el | 10 ++++++++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lentic-mode.el b/lentic-mode.el
index 931bbefa2f..970d438b68 100644
--- a/lentic-mode.el
+++ b/lentic-mode.el
@@ -294,22 +294,18 @@ See also `lentic-mode-move-lentic-window'."
lentic-config))
""))))
-(defun lentic-mode-buffer-list-update-hook ()
+(defun lentic-mode-update-all-display ()
(if lentic-emergency
(setq lentic-mode-line
(format " %s[Emergency]" lentic-mode-line-lighter))
(-map
(lambda (b)
- (with-current-buffer
+ (lentic-when-with-current-buffer
b
(lentic-mode-update-mode-line)))
(buffer-list))
(force-mode-line-update t)))
-(add-hook 'buffer-list-update-hook
- 'lentic-mode-buffer-list-update-hook)
-
-
;; ** lentic self-doc
;; #+begin_src: emacs-lisp
@@ -323,8 +319,6 @@ See also `lentic-mode-move-lentic-window'."
(interactive)
(lentic-doc-external-view 'lentic))
-
-
;;;###autoload
(define-minor-mode lentic-mode
"Documentation"
diff --git a/lentic.el b/lentic.el
index a63feeac05..c733e42fe2 100644
--- a/lentic.el
+++ b/lentic.el
@@ -834,12 +834,14 @@ repeated errors.")
(defun lentic-emergency ()
"Stop lentic from working due to code problem."
(interactive)
- (setq lentic-emergency t))
+ (setq lentic-emergency t)
+ (lentic-update-all-display))
(defun lentic-unemergency ()
"Start lentic working after stop due to code problem."
(interactive)
- (setq lentic-emergency nil))
+ (setq lentic-emergency nil)
+ (lentic-update-all-display))
(defun lentic-hook-fail (err hook)
"Give an informative message when we have to fail.
@@ -1266,6 +1268,10 @@ same top-left location. Update details depend on CONF."
"Update the display with information about lentic's state."
(when (fboundp 'lentic-mode-update-mode-line)
(lentic-mode-update-mode-line)))
+
+(defun lentic-update-all-display ()
+ (when (fboundp 'lentic-mode-update-all-display)
+ (lentic-mode-update-all-display)))
;; #+end_src
- [elpa] externals/lentic 83e75f48a6 251/333: lentic-dev now adds a "pulse" to the dirty region., (continued)
- [elpa] externals/lentic 83e75f48a6 251/333: lentic-dev now adds a "pulse" to the dirty region., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8885bfcde8 277/333: 0.10 Release, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b2d664c72d 278/333: Videos for README., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 1f7d929f37 303/333: Fix header line of lentic-script, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0e6e64e0b6 306/333: Autoload lentic-script-hook, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic af2e447a65 287/333: Run installation test on every commit., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 597a717ac6 316/333: Support for external publishing, add include dir, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before re-running init., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 4f6d564988 301/333: Add support for out-of-the-box script files., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8e0d0b1205 325/333: Fix error when swapping is not possible., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 02073c4f1c 285/333: Remove buffer-list-update-hook.,
ELPA Syncer <=
- [elpa] externals/lentic e395e44723 270/333: lentic-block changed to lentic-chunk., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic f1f77812b0 330/333: Add markdown example, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e3c56fbf11 307/333: Migrate all tests to assess, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e6d013bf57 329/333: Fix missing files, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e5ee8287b2 328/333: Add 26.1 test, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e182a87d69 315/333: Fix broken creation of directory, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 2bce4eeb78 333/333: Minor cosmetic changes to silence compiler warnings, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 2e74877cb7 311/333: Update for Emacs-25 org-mode, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 88877628d9 294/333: Rework doc start location., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b1596a3a02 327/333: Fix lentic-script-conf-test, ELPA Syncer, 2024/02/27