aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-05-01 19:32:10 +0200
committerUlrich Müller <ulm@gentoo.org>2022-05-01 19:32:10 +0200
commit03dd0b50c278ae49bfcae50fb53eb7fb42ca3829 (patch)
tree512d86f7c5ff33264bd1e1fdd0919760caa6bb02
parentDrop XEmacs compatibility code in eselect-mode (diff)
downloadeselect-03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.tar.gz
eselect-03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.tar.bz2
eselect-03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.zip
eselect-mode: Remove eselect-mode-make-keywords-list function
* misc/eselect-mode.el (eselect-mode-make-keywords-list): Remove. (eselect-mode-font-lock-keywords): Inline its code. \< \> around a regexp can be obtained via the paren option of regexp-opt. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--ChangeLog3
-rw-r--r--misc/eselect-mode.el15
2 files changed, 6 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ef1610..6fcf0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
write-contents-functions instead of obsolete write-contents-hooks.
(eselect-mode-before-save): Call delete-trailing-whitespace which
exists in XEmacs 21.5.
+ (eselect-mode-make-keywords-list): Remove function.
+ (eselect-mode-font-lock-keywords): Inline its code. \< \> around
+ a regexp can be obtained via the paren option of regexp-opt.
2022-01-08 Ulrich Müller <ulm@gentoo.org>
diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 3bdac81..d7ea649 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -69,20 +69,11 @@
"get_repo_news_dir" "env_update")
font-lock-type-face))
-(defun eselect-mode-make-keywords-list (keywords-list face
- &optional prefix suffix)
- ;; based on `generic-make-keywords-list' from generic.el
- ;; Note: XEmacs doesn't have generic.el
- (unless (listp keywords-list)
- (error "Keywords argument must be a list of strings"))
- (cons (concat prefix "\\<"
- (regexp-opt keywords-list t)
- "\\>" suffix)
- face))
-
(defvar eselect-mode-font-lock-keywords
(mapcar
- (lambda (x) (apply 'eselect-mode-make-keywords-list x))
+ (lambda (x)
+ (cons (regexp-opt (car x) 'words)
+ (cadr x)))
(list
eselect-mode-keywords-warn
eselect-mode-keywords-core