From 6a3efe35bf8b20b0900dbbf7747b8b8d0d19bd04 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Tue, 6 Sep 2016 07:39:30 +0200 Subject: Upgrade ports --- .emacs.d/lisp/php-mode.el | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to '.emacs.d/lisp/php-mode.el') 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 @@ (defconst php-mode-version-number "1.17.0" "PHP Mode version number.") -(defconst php-mode-modified "2016-03-06" +(defconst php-mode-modified "2016-08-22" "PHP Mode build date.") ;;; License @@ -93,11 +93,29 @@ (if (and (= emacs-major-version 24) (>= emacs-minor-version 4)) (require 'cl))) +;; Work around https://github.com/ejmr/php-mode/issues/310. +;; +;; In emacs 24.4 and 24.5, lines after functions with a return type +;; are incorrectly analyzed as member-init-cont. +;; +;; Before emacs 24.4, c member initializers are not supported this +;; way. Starting from emacs 25.1, cc-mode only detects member +;; initializers when the major mode is c++-mode. +(eval-and-compile + (if (and (= emacs-major-version 24) (or (= emacs-minor-version 4) + (= emacs-minor-version 5))) + (defun c-back-over-member-initializers () + ;; Override of cc-engine.el, cc-mode in emacs 24.4 and 24.5 are too + ;; optimistic in recognizing c member initializers. Since we don't + ;; need it in php-mode, just return nil. + nil))) + ;; Local variables ;;;###autoload (defgroup php nil "Major mode `php-mode' for editing PHP code." + :tag "PHP" :prefix "php-" :group 'languages :link '(url-link :tag "Official Site" "https://github.com/ejmr/php-mode") @@ -512,6 +530,8 @@ PHP does not have an \"enum\"-like keyword." "and" "array" "callable" + "iterable" + "void" "as" "break" "catch all" @@ -1062,7 +1082,8 @@ PHP heredoc." (when (>= emacs-major-version 25) (with-silent-modifications - (php-syntax-propertize-function (point-min) (point-max))))) + (save-excursion + (php-syntax-propertize-function (point-min) (point-max)))))) ;; Define function name completion function -- cgit v1.3