Skip to content

Commit

Permalink
Disable <> operator and keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed May 15, 2019
1 parent 8aad9e1 commit 207dad4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 207dad4

Please sign in to comment.