Skip to content

Commit 18d3212

Browse files
committed
Add c-lang-defconst c-anchored-cpp-prefix
This is the cause of the error that occurred in Emacs snapshots (later 25) and 26 development versions. We must confess that we did not know how to debug Emacs Lisp and CC Mode. PHP Mode inherits the properties of java-mode, but Java has no preprocessor, and PHP defined `c-opt-cpp-prefix` for PHP tags. Therefore, by properly defining `c-anchored-cpp-prefix`, errors are prevented from occurring. This error was c-macro-is-genuine-p called from c-beginning-of-macro, but this problem is obscured by the huge `condition-case` of `c-syntactic-re-search-forward`.
1 parent 05d7474 commit 18d3212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

php-mode.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ In that case set to `NIL'."
486486
(c-lang-defconst c-opt-cpp-prefix
487487
php "\\s-*<\\?")
488488

489+
(c-lang-defconst c-anchored-cpp-prefix
490+
php "\\s-*\\(<\\?(=\\|\\sw+)\\)")
491+
489492
(c-lang-defconst c-identifier-ops
490493
php '(
491494
(left-assoc "\\" "::" "->")

0 commit comments

Comments
 (0)