aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--misc/eselect-mode.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 65307ec..13bbc97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-06 Ulrich Müller <ulm@gentoo.org>
+
+ * misc/eselect-mode.el (eselect-mode-add-font-lock): New function.
+ (eselect-mode-hook): Add it, instead of an anonymous function.
+
2023-09-13 Ulrich Müller <ulm@gentoo.org>
* configure.ac: Update version to 1.4.27.
diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index e59c90c..06843df 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -148,10 +148,11 @@
(setq tab-width 4)
(setq indent-tabs-mode t))
-(add-hook 'eselect-mode-hook
- (lambda () (font-lock-add-keywords
- nil eselect-mode-font-lock-keywords)))
+(defun eselect-mode-add-font-lock ()
+ "Add `eselect-mode' font-lock keywords for the current buffer."
+ (font-lock-add-keywords nil eselect-mode-font-lock-keywords))
+(add-hook 'eselect-mode-hook 'eselect-mode-add-font-lock)
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode))