Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/eselect:master commit in: /, misc/
Date: Sun, 01 May 2022 17:35:59
Message-Id: 1651426330.03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.ulm@gentoo
1 commit: 03dd0b50c278ae49bfcae50fb53eb7fb42ca3829
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 1 17:32:10 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 1 17:32:10 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=03dd0b50
7
8 eselect-mode: Remove eselect-mode-make-keywords-list function
9
10 * misc/eselect-mode.el (eselect-mode-make-keywords-list): Remove.
11 (eselect-mode-font-lock-keywords): Inline its code. \< \> around
12 a regexp can be obtained via the paren option of regexp-opt.
13
14 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
15
16 ChangeLog | 3 +++
17 misc/eselect-mode.el | 15 +++------------
18 2 files changed, 6 insertions(+), 12 deletions(-)
19
20 diff --git a/ChangeLog b/ChangeLog
21 index 4ef1610..6fcf0db 100644
22 --- a/ChangeLog
23 +++ b/ChangeLog
24 @@ -4,6 +4,9 @@
25 write-contents-functions instead of obsolete write-contents-hooks.
26 (eselect-mode-before-save): Call delete-trailing-whitespace which
27 exists in XEmacs 21.5.
28 + (eselect-mode-make-keywords-list): Remove function.
29 + (eselect-mode-font-lock-keywords): Inline its code. \< \> around
30 + a regexp can be obtained via the paren option of regexp-opt.
31
32 2022-01-08 Ulrich Müller <ulm@g.o>
33
34
35 diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
36 index 3bdac81..d7ea649 100644
37 --- a/misc/eselect-mode.el
38 +++ b/misc/eselect-mode.el
39 @@ -69,20 +69,11 @@
40 "get_repo_news_dir" "env_update")
41 font-lock-type-face))
42
43 -(defun eselect-mode-make-keywords-list (keywords-list face
44 - &optional prefix suffix)
45 - ;; based on `generic-make-keywords-list' from generic.el
46 - ;; Note: XEmacs doesn't have generic.el
47 - (unless (listp keywords-list)
48 - (error "Keywords argument must be a list of strings"))
49 - (cons (concat prefix "\\<"
50 - (regexp-opt keywords-list t)
51 - "\\>" suffix)
52 - face))
53 -
54 (defvar eselect-mode-font-lock-keywords
55 (mapcar
56 - (lambda (x) (apply 'eselect-mode-make-keywords-list x))
57 + (lambda (x)
58 + (cons (regexp-opt (car x) 'words)
59 + (cadr x)))
60 (list
61 eselect-mode-keywords-warn
62 eselect-mode-keywords-core