From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC041158090 for ; Sun, 1 May 2022 17:35:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 500F3E0B93; Sun, 1 May 2022 17:35:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30FA0E0B93 for ; Sun, 1 May 2022 17:35:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 16A11341136 for ; Sun, 1 May 2022 17:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A898743B for ; Sun, 1 May 2022 17:35:55 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1651426330.03dd0b50c278ae49bfcae50fb53eb7fb42ca3829.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: /, misc/ X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog misc/eselect-mode.el X-VCS-Directories: / misc/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 03dd0b50c278ae49bfcae50fb53eb7fb42ca3829 X-VCS-Branch: master Date: Sun, 1 May 2022 17:35:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2f483fc8-ff54-426c-91ff-30ca55e643bb X-Archives-Hash: fb511b47229d69fe1453014615c9be7f commit: 03dd0b50c278ae49bfcae50fb53eb7fb42ca3829 Author: Ulrich Müller gentoo org> AuthorDate: Sun May 1 17:32:10 2022 +0000 Commit: Ulrich Müller gentoo 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 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 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