From 3ec6ac6a8d888043cc12dfe6f77adcd0cfc1b086 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Fri, 28 Aug 2015 11:10:13 +0200 Subject: Upgrade all, add yaml, few snippet fixes --- .emacs.d/lisp/php-mode.el | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 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 c90fa55..ef31a17 100644 --- a/.emacs.d/lisp/php-mode.el +++ b/.emacs.d/lisp/php-mode.el @@ -6,12 +6,12 @@ ;;; Author: Eric James Michael Ritz ;;; URL: https://github.com/ejmr/php-mode -;;; Version: 1.15.3 +;;; Version: 1.17.0 -(defconst php-mode-version-number "1.15.3" +(defconst php-mode-version-number "1.17.0" "PHP Mode version number.") -(defconst php-mode-modified "2015-03-09" +(defconst php-mode-modified "2015-06-23" "PHP Mode build date.") ;;; License @@ -732,7 +732,7 @@ Implements PHP version of `beginning-of-defun-function'." (defun php-end-of-defun (&optional arg) "Move the end of the ARGth PHP function from point. -Implements PHP befsion of `end-of-defun-function' +Implements PHP version of `end-of-defun-function' See `php-beginning-of-defun'." (interactive "p") @@ -1001,8 +1001,7 @@ PHP heredoc." (set (make-local-variable 'syntax-propertize-function) #'php-syntax-propertize-function)) - (setq font-lock-maximum-decoration t - imenu-generic-expression php-imenu-generic-expression) + (setq imenu-generic-expression php-imenu-generic-expression) ;; PHP vars are case-sensitive (setq case-fold-search t) @@ -1250,7 +1249,7 @@ under which to search for files in the local documentation directory.") (not (assq types-list words-cache))) ;; Generate the cache on the first run, or if the types changed. ;; We read the filenames matching our types list in the local - ;; documention directory, and extract the 'middle' component + ;; documentation directory, and extract the 'middle' component ;; of each. e.g. "function.array-map.html" => "array_map". (let* ((types-opt (regexp-opt types-list)) (pattern (concat "\\`" types-opt "\\.\\(.+\\)\\.html\\'")) @@ -1479,9 +1478,10 @@ The output will appear in the buffer *PHP*." (defun php-string-intepolated-variable-font-lock-find (limit) (while (re-search-forward php-string-interpolated-variable-regexp limit t) - (when (php-in-string-p) - (put-text-property (match-beginning 0) (match-end 0) - 'face 'font-lock-variable-name-face))) + (let ((quoted-stuff (nth 3 (syntax-ppss)))) + (when (and quoted-stuff (member quoted-stuff '(?\" ?`))) + (put-text-property (match-beginning 0) (match-end 0) + 'face 'font-lock-variable-name-face)))) nil) (eval-after-load 'php-mode @@ -1533,3 +1533,7 @@ The output will appear in the buffer *PHP*." (provide 'php-mode) ;;; php-mode.el ends here + +;; Local Variables: +;; firestarter: ert-run-tests-interactively +;; End: -- cgit v1.3