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 B8A6F158089 for ; Fri, 6 Oct 2023 07:46:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0EA4E2BC049; Fri, 6 Oct 2023 07:46:34 +0000 (UTC) Received: from smtp.gentoo.org (dev.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFC4A2BC049 for ; Fri, 6 Oct 2023 07:46:33 +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 41305335CB4 for ; Fri, 6 Oct 2023 07:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BB531949 for ; Fri, 6 Oct 2023 07:46:31 +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: <1696577788.2f9084ac529bcd514a3546a9d7f9a376f1c4a5d5.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: 2f9084ac529bcd514a3546a9d7f9a376f1c4a5d5 X-VCS-Branch: master Date: Fri, 6 Oct 2023 07:46:31 +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: 63cfa98d-403f-4002-9128-c91974611bab X-Archives-Hash: 5caa7fa46741582dfff75ad3ff80d4e4 commit: 2f9084ac529bcd514a3546a9d7f9a376f1c4a5d5 Author: Ulrich Müller gentoo org> AuthorDate: Fri Oct 6 07:36:28 2023 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Oct 6 07:36:28 2023 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=2f9084ac eselect-mode: Use named function in hook variable * misc/eselect-mode.el (eselect-mode-add-font-lock): New function. (eselect-mode-hook): Add it, instead of an anonymous function. Signed-off-by: Ulrich Müller gentoo.org> ChangeLog | 5 +++++ misc/eselect-mode.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65307ec..13bbc97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-10-06 Ulrich Müller + + * misc/eselect-mode.el (eselect-mode-add-font-lock): New function. + (eselect-mode-hook): Add it, instead of an anonymous function. + 2023-09-13 Ulrich Müller * configure.ac: Update version to 1.4.27. diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el index e59c90c..06843df 100644 --- a/misc/eselect-mode.el +++ b/misc/eselect-mode.el @@ -148,10 +148,11 @@ (setq tab-width 4) (setq indent-tabs-mode t)) -(add-hook 'eselect-mode-hook - (lambda () (font-lock-add-keywords - nil eselect-mode-font-lock-keywords))) +(defun eselect-mode-add-font-lock () + "Add `eselect-mode' font-lock keywords for the current buffer." + (font-lock-add-keywords nil eselect-mode-font-lock-keywords)) +(add-hook 'eselect-mode-hook 'eselect-mode-add-font-lock) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode))