summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-05-01 20:46:53 +0200
committerUlrich Müller <ulm@gentoo.org>2022-05-07 17:54:47 +0200
commit70053636313c39dc6e34e3874b6afde28a231e37 (patch)
tree707280d0581b53365d4df42fed746c7e874936f5
parentDon't use #' for quoting of function names (diff)
downloadebuild-mode-70053636313c39dc6e34e3874b6afde28a231e37.tar.gz
ebuild-mode-70053636313c39dc6e34e3874b6afde28a231e37.tar.bz2
ebuild-mode-70053636313c39dc6e34e3874b6afde28a231e37.zip
Remove ebuild-mode-make-keywords-list function
* ebuild-mode.el (ebuild-mode-make-keywords-list): Remove. (ebuild-mode-font-lock-keywords): Inline its code. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--ChangeLog3
-rw-r--r--ebuild-mode.el14
2 files changed, 8 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index f81cc96..8614bb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2022-05-01 Ulrich Müller <ulm@gentoo.org>
+ * ebuild-mode.el (ebuild-mode-make-keywords-list): Remove.
+ (ebuild-mode-font-lock-keywords): Inline its code.
+
* ebuild-mode.el (ebuild-repo-mode, find-file-hook): Use ' rather
than #' for quoting of function names.
* glep-mode.el (glep-mode): Ditto.
diff --git a/ebuild-mode.el b/ebuild-mode.el
index ba8fefa..210f4f8 100644
--- a/ebuild-mode.el
+++ b/ebuild-mode.el
@@ -242,14 +242,6 @@ If nil, don't update."
;;; Font-lock.
(eval-and-compile
- (defun ebuild-mode-make-keywords-list (keywords-list face
- &optional prefix suffix)
- ;; originally based on `generic-make-keywords-list' from generic.el
- (cons (concat (or prefix "\\<")
- (regexp-opt keywords-list t)
- (or suffix "\\>"))
- face))
-
(defun ebuild-mode-collect-equal-cdrs (src &optional limit)
"For alist SRC, collect elements with equal cdr and concat their cars.
Optional argument LIMIT restarts collection after that number of elements."
@@ -267,7 +259,11 @@ Optional argument LIMIT restarts collection after that number of elements."
(defvar ebuild-mode-font-lock-keywords
(eval-when-compile
(mapcar
- (lambda (x) (apply 'ebuild-mode-make-keywords-list x))
+ (lambda (x)
+ (cons (concat (or (nth 2 x) "\\<")
+ (regexp-opt (car x) t)
+ (or (nth 3 x) "\\>"))
+ (cadr x)))
(ebuild-mode-collect-equal-cdrs
(mapcar (lambda (x) (symbol-value (intern x)))
(all-completions "ebuild-mode-keywords-" obarray 'boundp))