diff options
Diffstat (limited to '.emacs.d/lisp/php-mode.el')
| -rw-r--r-- | .emacs.d/lisp/php-mode.el | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el index 9aae782..89fc073 100644 --- a/.emacs.d/lisp/php-mode.el +++ b/.emacs.d/lisp/php-mode.el | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | (defconst php-mode-version-number "1.17.0" | 12 | (defconst php-mode-version-number "1.17.0" |
| 13 | "PHP Mode version number.") | 13 | "PHP Mode version number.") |
| 14 | 14 | ||
| 15 | (defconst php-mode-modified "2016-03-06" | 15 | (defconst php-mode-modified "2016-08-22" |
| 16 | "PHP Mode build date.") | 16 | "PHP Mode build date.") |
| 17 | 17 | ||
| 18 | ;;; License | 18 | ;;; License |
| @@ -93,11 +93,29 @@ | |||
| 93 | (if (and (= emacs-major-version 24) (>= emacs-minor-version 4)) | 93 | (if (and (= emacs-major-version 24) (>= emacs-minor-version 4)) |
| 94 | (require 'cl))) | 94 | (require 'cl))) |
| 95 | 95 | ||
| 96 | ;; Work around https://github.com/ejmr/php-mode/issues/310. | ||
| 97 | ;; | ||
| 98 | ;; In emacs 24.4 and 24.5, lines after functions with a return type | ||
| 99 | ;; are incorrectly analyzed as member-init-cont. | ||
| 100 | ;; | ||
| 101 | ;; Before emacs 24.4, c member initializers are not supported this | ||
| 102 | ;; way. Starting from emacs 25.1, cc-mode only detects member | ||
| 103 | ;; initializers when the major mode is c++-mode. | ||
| 104 | (eval-and-compile | ||
| 105 | (if (and (= emacs-major-version 24) (or (= emacs-minor-version 4) | ||
| 106 | (= emacs-minor-version 5))) | ||
| 107 | (defun c-back-over-member-initializers () | ||
| 108 | ;; Override of cc-engine.el, cc-mode in emacs 24.4 and 24.5 are too | ||
| 109 | ;; optimistic in recognizing c member initializers. Since we don't | ||
| 110 | ;; need it in php-mode, just return nil. | ||
| 111 | nil))) | ||
| 112 | |||
| 96 | 113 | ||
| 97 | ;; Local variables | 114 | ;; Local variables |
| 98 | ;;;###autoload | 115 | ;;;###autoload |
| 99 | (defgroup php nil | 116 | (defgroup php nil |
| 100 | "Major mode `php-mode' for editing PHP code." | 117 | "Major mode `php-mode' for editing PHP code." |
| 118 | :tag "PHP" | ||
| 101 | :prefix "php-" | 119 | :prefix "php-" |
| 102 | :group 'languages | 120 | :group 'languages |
| 103 | :link '(url-link :tag "Official Site" "https://github.com/ejmr/php-mode") | 121 | :link '(url-link :tag "Official Site" "https://github.com/ejmr/php-mode") |
| @@ -512,6 +530,8 @@ PHP does not have an \"enum\"-like keyword." | |||
| 512 | "and" | 530 | "and" |
| 513 | "array" | 531 | "array" |
| 514 | "callable" | 532 | "callable" |
| 533 | "iterable" | ||
| 534 | "void" | ||
| 515 | "as" | 535 | "as" |
| 516 | "break" | 536 | "break" |
| 517 | "catch all" | 537 | "catch all" |
| @@ -1062,7 +1082,8 @@ PHP heredoc." | |||
| 1062 | 1082 | ||
| 1063 | (when (>= emacs-major-version 25) | 1083 | (when (>= emacs-major-version 25) |
| 1064 | (with-silent-modifications | 1084 | (with-silent-modifications |
| 1065 | (php-syntax-propertize-function (point-min) (point-max))))) | 1085 | (save-excursion |
| 1086 | (php-syntax-propertize-function (point-min) (point-max)))))) | ||
| 1066 | 1087 | ||
| 1067 | 1088 | ||
| 1068 | ;; Define function name completion function | 1089 | ;; Define function name completion function |
