Skip to content

Commit

Permalink
Merge pull request #540 from takeokunn/feature/add-page-delimiter
Browse files Browse the repository at this point in the history
Add page-delimiter custom variable.
  • Loading branch information
zonuexe authored May 28, 2019
2 parents d75517c + ed82c39 commit 736a697
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ of constants when set."
:tag "PHP Mode Lineup Cascaded Calls"
:type 'boolean)

(defcustom php-mode-page-delimiter
(eval-when-compile (rx symbol-start (or "namespace" "function" "class" "trait" "interface") symbol-end))
"Regexp describing line-beginnings that PHP declaration statements."
:group 'php-mode
:tag "PHP Mode Page Delimiter"
:type 'regexp)

(define-obsolete-variable-alias 'php-extra-constants 'php-mode-extra-constants "1.20.0")
(defcustom php-mode-extra-constants '()
Expand Down Expand Up @@ -1067,6 +1073,7 @@ After setting the stylevars run hooks according to STYLENAME
(: "/*")))
(* (syntax whitespace)))))
(setq-local comment-end "")
(setq-local page-delimiter php-mode-page-delimiter)

(setq-local font-lock-string-face 'php-string)
(setq-local font-lock-keyword-face 'php-keyword)
Expand Down

0 comments on commit 736a697

Please sign in to comment.