public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /, misc/
Date: Sun,  1 May 2022 17:35:55 +0000 (UTC)	[thread overview]
Message-ID: <1651426330.03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.ulm@gentoo> (raw)

commit:     03dd0b50c278ae49bfcae50fb53eb7fb42ca3829
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May  1 17:32:10 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May  1 17:32:10 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=03dd0b50

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 <AT> gentoo.org>

 ChangeLog            |  3 +++
 misc/eselect-mode.el | 15 +++------------
 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


             reply	other threads:[~2022-05-01 17:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01 17:35 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-13 20:26 [gentoo-commits] proj/eselect:master commit in: /, misc/ Ulrich Müller
2023-06-12 16:24 Ulrich Müller
2023-02-27 17:40 Ulrich Müller
2022-05-01 17:35 Ulrich Müller
2014-06-05 11:22 Ulrich Müller
2013-11-15  8:01 [gentoo-commits] proj/eselect:nolinewrap " Ulrich Müller
2013-11-15  6:21 ` [gentoo-commits] proj/eselect:master " Ulrich Müller
2013-09-18  7:10 Ulrich Mueller
2013-07-05 13:37 Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1651426330.03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox