Skip to content

Commit 8a43710

Browse files
committed
Disable <> operator and keywords
1 parent 57194a5 commit 8a43710

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

php-mode.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,10 @@ In that case set to `NIL'."
413413
(left-assoc "\\" "::" "->")
414414
(prefix "\\" "::")))
415415

416+
(c-lang-defconst c-operators
417+
php (delete '(postfix-if-paren "<" ">")
418+
(c-lang-const c-operators)))
419+
416420
;; Allow '\' when scanning from open brace back to defining
417421
;; construct like class
418422
(c-lang-defconst c-block-prefix-disallowed-chars
@@ -543,6 +547,12 @@ PHP does not have an \"enum\"-like keyword."
543547
(c-lang-defconst c-recognize-<>-arglists
544548
php nil)
545549

550+
(c-lang-defconst c-<>-type-kwds
551+
php nil)
552+
553+
(c-lang-defconst c-inside-<>-type-kwds
554+
php nil)
555+
546556
(c-lang-defconst c-enums-contain-decls
547557
php nil)
548558

@@ -570,6 +580,9 @@ might be to handle switch and goto labels differently."
570580
php (cl-remove-if (lambda (elm) (and (listp elm) (memq 'c-annotation-face elm)))
571581
(c-lang-const c-basic-matchers-after php)))
572582

583+
(c-lang-defconst c-opt-<>-sexp-key
584+
php nil)
585+
573586
(defun php-lineup-cascaded-calls (langelem)
574587
"Line up chained methods using `c-lineup-cascaded-calls',
575588
but only if the setting is enabled"

0 commit comments

Comments
 (0)