From 207dad4964f3622ddfd2931da75b365127d41546 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Wed, 15 May 2019 22:19:33 +0900 Subject: [PATCH] Disable <> operator and keywords --- php-mode.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/php-mode.el b/php-mode.el index 41f58fb9..0683e4bf 100644 --- a/php-mode.el +++ b/php-mode.el @@ -413,6 +413,10 @@ In that case set to `NIL'." (left-assoc "\\" "::" "->") (prefix "\\" "::"))) +(c-lang-defconst c-operators + php (delete '(postfix-if-paren "<" ">") + (c-lang-const c-operators))) + ;; Allow '\' when scanning from open brace back to defining ;; construct like class (c-lang-defconst c-block-prefix-disallowed-chars @@ -543,6 +547,12 @@ PHP does not have an \"enum\"-like keyword." (c-lang-defconst c-recognize-<>-arglists php nil) +(c-lang-defconst c-<>-type-kwds + php nil) + +(c-lang-defconst c-inside-<>-type-kwds + php nil) + (c-lang-defconst c-enums-contain-decls php nil) @@ -570,6 +580,9 @@ might be to handle switch and goto labels differently." php (cl-remove-if (lambda (elm) (and (listp elm) (memq 'c-annotation-face elm))) (c-lang-const c-basic-matchers-after php))) +(c-lang-defconst c-opt-<>-sexp-key + php nil) + (defun php-lineup-cascaded-calls (langelem) "Line up chained methods using `c-lineup-cascaded-calls', but only if the setting is enabled"