emacs-php / php-mode

A powerful and flexible Emacs major mode for editing PHP scripts
GNU General Public License v3.0
580 stars 118 forks source link

Apply Stefan Monnier's patch (2) #739

Closed zonuexe closed 1 year ago

zonuexe commented 1 year ago

continuation of https://github.com/emacs-php/php-mode/pull/737

zonuexe commented 1 year ago

I tried applying the hunk below, but it doesn't seem to work as he intended.

From eafd0478fe41bbc6211a42e8759a584caa436448 Mon Sep 17 00:00:00 2001
From: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Mon, 10 Apr 2023 21:14:00 +0900
Subject: [PATCH] Use `c-lang-const t` for c-lang-defconst

---
 lisp/php-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index df090088..1877a2cf 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -588,11 +588,11 @@ might be to handle switch and goto labels differently."

 (c-lang-defconst c-basic-matchers-before
   php (cl-remove-if (lambda (elm) (and (listp elm) (equal (car elm) "\\s|")))
-                    (c-lang-const c-basic-matchers-before php)))
+                    (c-lang-const c-basic-matchers-before t)))

 (c-lang-defconst c-basic-matchers-after
   php (cl-remove-if (lambda (elm) (and (listp elm) (memq 'c-annotation-face elm)))
-                    (c-lang-const c-basic-matchers-after php)))
+                    (c-lang-const c-basic-matchers-after t)))

 (defconst php-mode--re-return-typed-closure
   (eval-when-compile