From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: nealsid@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#64824: v2 of patch Date: Mon, 24 Jul 2023 20:57:30 -0400 Message-ID: <87ila8iz9h.fsf@archlinux.mail-host-address-is-not-set> References: <874jlugqbr.fsf@archlinux.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5046"; mail-complaints-to="usenet@ciao.gmane.io" To: 64824@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 25 09:29:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOCTu-00012I-4z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Jul 2023 09:29:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOCTi-0007r8-SQ; Tue, 25 Jul 2023 03:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOCTf-0007qX-AQ for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 03:29:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOCTe-0006p7-U7 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 03:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOCTe-0001Ka-QH for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 03:29:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <874jlugqbr.fsf@archlinux.mail-host-address-is-not-set> Resent-From: nealsid@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2023 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64824 X-GNU-PR-Package: emacs Original-Received: via spool by 64824-submit@debbugs.gnu.org id=B64824.16902701305084 (code B ref 64824); Tue, 25 Jul 2023 07:29:02 +0000 Original-Received: (at 64824) by debbugs.gnu.org; 25 Jul 2023 07:28:50 +0000 Original-Received: from localhost ([127.0.0.1]:44551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOCTR-0001Jq-EH for submit@debbugs.gnu.org; Tue, 25 Jul 2023 03:28:50 -0400 Original-Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]:55703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qO6Ms-0004m3-9u for 64824@debbugs.gnu.org; Mon, 24 Jul 2023 20:57:42 -0400 Original-Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-583d702129cso23742577b3.3 for <64824@debbugs.gnu.org>; Mon, 24 Jul 2023 17:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690246652; x=1690851452; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=4QkQ1n6t+PipAr4S2q0NnE/Caj3la1K31jFJeUJVSHQ=; b=WiEsvE9bbSPVnqA0/9uSLPPDP8Q0GmJUuCtmjT3gRQEDfiy0wyKh5xhW+m5AP38Ll0 e8fOUnImOCyhksBhDYC6KOJXTT10u+Ss2DraHRsuhhS7qrMAei9FZMYXNf5d/7s89KVx e0F3WbISvyjAlBN7nGhy5HoxWqZe3WPsr8mxLchikw6AX47AcKFmzslQCbwXg9pxVf3E /nEfX5kM5Z//ff/5XCK3CjTY15ubdn+2tcSyNP7wL7/0Lv0f/VryW/9kwm30XXAzvmUf a0xXzuZ+WlKifkVf+UCPNhHotb3QNJxKflyLd5bHt9J3J0079k5kZPKpms/1MfBkpfHn QMWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690246652; x=1690851452; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4QkQ1n6t+PipAr4S2q0NnE/Caj3la1K31jFJeUJVSHQ=; b=hrq7z0kyiHtKNXtpXmjyBVNsiWmhr9m2pZg+KeH2d71cDYAw5T4RSjWlJ+yqDq2nYM mUxILsU9FeOzDzmBUHep+Tn1XccmBuVpYPyDSes4ktt3EP+W/5Wuv1/m0zAUlP72edZZ yt2OSO+vf9cENaE+/yfK5tCbK4YQ/3ItzTCai6iGxqZLlqRj/AxlKDH/LX20vzrCY+tL rZiMFWFbQzMhxZsof9+HylhpX4xa391WZ3qnoQdkY+QpsJla03JpWOBZkny6pbyYaIzs A5tpmFFTYgF7bJncEylCS7YnJqkhM0iJ3enm+Jk3gMhwHxBOv1lOpvh0MCpMwET1lx4i hSRg== X-Gm-Message-State: ABy/qLbJ5xlq08JgiZQexPZ8mB5uD84cV8H8ZQhiLu/y9v8jHdAauu9u Iy7fxU3sOqrwr0ckT96vRIO0olt/xIE= X-Google-Smtp-Source: APBJJlG7jDZHn3Xc5sk6AQv0pRpT7zJjSh5aQIJvjMzvSjD8i9twInsJMFiuZmbXhv46ajym/dr0Dw== X-Received: by 2002:a0d:cbc4:0:b0:577:d44:a163 with SMTP id n187-20020a0dcbc4000000b005770d44a163mr7914403ywd.6.1690246651898; Mon, 24 Jul 2023 17:57:31 -0700 (PDT) Original-Received: from archlinux (107-218-116-63.lightspeed.jcvlfl.sbcglobal.net. [107.218.116.63]) by smtp.gmail.com with ESMTPSA id s204-20020a8177d5000000b005837b48d16csm3199350ywc.84.2023.07.24.17.57.31 for <64824@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 17:57:31 -0700 (PDT) X-Mailman-Approved-At: Tue, 25 Jul 2023 03:28:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266024 Archived-At: --=-=-= Content-Type: text/plain Sorry, I left some debug logging in the patch sent with the bug report. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-define-error-to-font-lock-keywords-for-emacs-lis.patch Content-Description: Add define-error to lisp font lock keywords and tests >From 7784ccf8555e31485c61468ee5c18533a2331421 Mon Sep 17 00:00:00 2001 From: Neal Sidhwaney Date: Sun, 23 Jul 2023 19:25:51 -0400 Subject: [PATCH] Add define-error to font lock keywords for emacs-lisp-mode Also bump up test coverage for keywords to ensure they are fontified. --- lisp/emacs-lisp/lisp-mode.el | 2 +- test/lisp/emacs-lisp/lisp-mode-tests.el | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 1990630608d..f1cacebb964 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -361,7 +361,7 @@ This will generate compile-time constants from BINDINGS." "define-globalized-minor-mode" "define-skeleton" "define-widget" "ert-deftest")) (el-vdefs '("defconst" "defcustom" "defvaralias" "defvar-local" - "defface")) + "defface" "define-error")) (el-tdefs '("defgroup" "deftheme")) (el-errs '("user-error")) ;; Common-Lisp constructs supported by EIEIO. FIXME: namespace. diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 3e906497020..825e6b6ab80 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -355,5 +355,28 @@ Expected initialization file: `%s'\" ;; (should (equal (lisp-current-defun-name) "defblarg"))) ) +(ert-deftest test-font-lock-keywords () + "Keywords should be fontified in `font-lock-keyword-face`." + (with-temp-buffer + (emacs-lisp-mode) + (mapc (lambda (el-keyword) + (erase-buffer) + (insert (format "(%s some-symbol () \"hello\"" el-keyword)) + (font-lock-ensure) + ;; Verify face property throughout the keyword + (let* ((begin (1+ (point-min))) + (end (1- (+ begin (length el-keyword))))) + (mapc (lambda (pos) + (should (equal (get-text-property pos 'face) + 'font-lock-keyword-face))) + (number-sequence begin end)))) + '("defsubst" "cl-defsubst" "define-inline" + "define-advice" "defadvice" "defalias" + "define-derived-mode" "define-minor-mode" + "define-generic-mode" "define-global-minor-mode" + "define-globalized-minor-mode" "define-skeleton" + "define-widget" "ert-deftest" "defconst" "defcustom" + "defvaralias" "defvar-local" "defface" "define-error")))) + (provide 'lisp-mode-tests) ;;; lisp-mode-tests.el ends here -- 2.41.0 --=-=-=--