summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorSimeon Simeonov2018-09-10 12:06:30 +0200
committerSimeon Simeonov2018-09-10 12:06:30 +0200
commit31bc48e244a9aacf817e6009c5789ae55849022d (patch)
treeecc3056cba647cc4f69794a4f0f8988bfc0d59a8 /.emacs.d/lisp
parent29bc99dc3db54cf0ee90f52b99c43da74740113e (diff)
Upgrade php-mode
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/php-mode.el38
-rw-r--r--.emacs.d/lisp/php-project.el2
2 files changed, 25 insertions, 15 deletions
diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el
index 6b9e2ee..e1b2597 100644
--- a/.emacs.d/lisp/php-mode.el
+++ b/.emacs.d/lisp/php-mode.el
@@ -6,7 +6,7 @@
6 6
7;; Author: Eric James Michael Ritz 7;; Author: Eric James Michael Ritz
8;; Maintainer: USAMI Kenta <tadsan@zonu.me> 8;; Maintainer: USAMI Kenta <tadsan@zonu.me>
9;; URL: https://github.com/ejmr/php-mode 9;; URL: https://github.com/emacs-php/php-mode
10;; Keywords: languages php 10;; Keywords: languages php
11;; Version: 1.19.1 11;; Version: 1.19.1
12;; Package-Requires: ((emacs "24.3") (cl-lib "0.5")) 12;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
@@ -15,7 +15,7 @@
15(defconst php-mode-version-number "1.19.1" 15(defconst php-mode-version-number "1.19.1"
16 "PHP Mode version number.") 16 "PHP Mode version number.")
17 17
18(defconst php-mode-modified "2018-05-12" 18(defconst php-mode-modified "2018-08-28"
19 "PHP Mode build date.") 19 "PHP Mode build date.")
20 20
21;; This file is free software; you can redistribute it and/or 21;; This file is free software; you can redistribute it and/or
@@ -101,7 +101,7 @@
101 (if (and (= emacs-major-version 24) (>= emacs-minor-version 4)) 101 (if (and (= emacs-major-version 24) (>= emacs-minor-version 4))
102 (require 'cl))) 102 (require 'cl)))
103 103
104;; Work around https://github.com/ejmr/php-mode/issues/310. 104;; Work around https://github.com/emacs-php/php-mode/issues/310.
105;; 105;;
106;; In emacs 24.4 and 24.5, lines after functions with a return type 106;; In emacs 24.4 and 24.5, lines after functions with a return type
107;; are incorrectly analyzed as member-init-cont. 107;; are incorrectly analyzed as member-init-cont.
@@ -126,8 +126,8 @@
126 :tag "PHP" 126 :tag "PHP"
127 :prefix "php-" 127 :prefix "php-"
128 :group 'languages 128 :group 'languages
129 :link '(url-link :tag "Official Site" "https://github.com/ejmr/php-mode") 129 :link '(url-link :tag "Official Site" "https://github.com/emacs-php/php-mode")
130 :link '(url-link :tag "PHP Mode Wiki" "https://github.com/ejmr/php-mode/wiki")) 130 :link '(url-link :tag "PHP Mode Wiki" "https://github.com/emacs-php/php-mode/wiki"))
131 131
132(defcustom php-executable (or (executable-find "php") 132(defcustom php-executable (or (executable-find "php")
133 "/usr/bin/php") 133 "/usr/bin/php")
@@ -1190,7 +1190,7 @@ After setting the stylevars run hooks according to STYLENAME
1190 (require 'pkg-info nil t) 1190 (require 'pkg-info nil t)
1191 (php-mode-debug--buffer 'init) 1191 (php-mode-debug--buffer 'init)
1192 (php-mode-debug--message "Feel free to report on GitHub what you noticed!") 1192 (php-mode-debug--message "Feel free to report on GitHub what you noticed!")
1193 (php-mode-debug--message "https://github.com/ejmr/php-mode/issues/new") 1193 (php-mode-debug--message "https://github.com/emacs-php/php-mode/issues/new")
1194 (php-mode-debug--message "") 1194 (php-mode-debug--message "")
1195 (php-mode-debug--message "Pasting the following information on the issue will help us to investigate the cause.") 1195 (php-mode-debug--message "Pasting the following information on the issue will help us to investigate the cause.")
1196 (php-mode-debug--message "```") 1196 (php-mode-debug--message "```")
@@ -1635,13 +1635,14 @@ a completion list."
1635 ;; with type, like in arglist) 1635 ;; with type, like in arglist)
1636 ("\\(\\$\\)\\(\\sw+\\)" 1 'php-variable-sigil) 1636 ("\\(\\$\\)\\(\\sw+\\)" 1 'php-variable-sigil)
1637 1637
1638 ;; Array is a keyword, except in the following situations: 1638 ;; 'array' and 'callable' are keywords, except in the following situations:
1639 ;; - when used as cast, so that (int) and (array) look the same
1640 ;; - when used as a type hint 1639 ;; - when used as a type hint
1641 ;; - when used as a return type 1640 ;; - when used as a return type
1641 ("\\b\\(array\\|callable\\)\\s-+&?\\$" 1 font-lock-type-face)
1642 (")\\s-*:\\s-*\\??\\(array\\|callable\\)\\b" 1 font-lock-type-face)
1643 ;; For 'array', there is an additional situation:
1644 ;; - when used as cast, so that (int) and (array) look the same
1642 ("(\\(array\\))" 1 font-lock-type-face) 1645 ("(\\(array\\))" 1 font-lock-type-face)
1643 ("\\b\\(array\\)\\s-+&?\\$" 1 font-lock-type-face)
1644 (")\\s-*:\\s-*\\??\\(array\\)\\b" 1 font-lock-type-face)
1645 1646
1646 ;; namespaces 1647 ;; namespaces
1647 ("\\(\\([a-zA-Z0-9_]+\\\\\\)+[a-zA-Z0-9_]+\\|\\(\\\\[a-zA-Z0-9_]+\\)+\\)[^:a-zA-Z0-9_\\\\]" 1 'font-lock-type-face) 1648 ("\\(\\([a-zA-Z0-9_]+\\\\\\)+[a-zA-Z0-9_]+\\|\\(\\\\[a-zA-Z0-9_]+\\)+\\)[^:a-zA-Z0-9_\\\\]" 1 'font-lock-type-face)
@@ -1697,12 +1698,21 @@ a completion list."
1697 " \\(\\sw+\\)") 1698 " \\(\\sw+\\)")
1698 1 font-lock-type-face) 1699 1 font-lock-type-face)
1699 1700
1700 ;; Highlight return types in functions and methods. 1701 ;; Highlight the ? character for nullable return types.
1701 ("function.+:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)" 1 font-lock-type-face) 1702 ("function.+:\\s-*\\(\\?\\)\\(?:\\sw\\|\\s_\\|\\\\\\)+" 1 font-lock-type-face)
1702 (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face) 1703 (")\\s-*:\\s-*\\(\\?\\)\\(?:\\sw\\|\\s_\\|\\\\\\)+\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face)
1703 1704
1704 ;; Highlight class names used as nullable type hints 1705 ;; Highlight the ? character for nullable type hints.
1706 ("\\(\\?\\)\\(:?\\sw\\|\\s_\\|\\\\\\)+\\s-+\\$" 1 font-lock-type-face)
1707
1708 ;; Class names without a namespace are not highlighted at all when they
1709 ;; are used as nullable type hints or return types (both nullable and
1710 ;; non-nullable). We have to use separate regular expressions, because
1711 ;; we want to capture the class name as well, not just the ? character
1712 ;; like the regexps above.
1705 ("\\?\\(\\(:?\\sw\\|\\s_\\)+\\)\\s-+\\$" 1 font-lock-type-face) 1713 ("\\?\\(\\(:?\\sw\\|\\s_\\)+\\)\\s-+\\$" 1 font-lock-type-face)
1714 ("function.+:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)" 1 font-lock-type-face)
1715 (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face)
1706 )) 1716 ))
1707 "Detailed highlighting for PHP Mode.") 1717 "Detailed highlighting for PHP Mode.")
1708 1718
diff --git a/.emacs.d/lisp/php-project.el b/.emacs.d/lisp/php-project.el
index 53275b9..2f4d571 100644
--- a/.emacs.d/lisp/php-project.el
+++ b/.emacs.d/lisp/php-project.el
@@ -4,7 +4,7 @@
4 4
5;; Author: USAMI Kenta <tadsan@zonu.me> 5;; Author: USAMI Kenta <tadsan@zonu.me>
6;; Keywords: tools, files 6;; Keywords: tools, files
7;; URL: https://github.com/ejmr/php-mode 7;; URL: https://github.com/emacs-php/php-mode
8;; Version: 1.19.1 8;; Version: 1.19.1
9;; Package-Requires: ((emacs "24.3") (cl-lib "0.5")) 9;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
10;; License: GPL-3.0-or-later 10;; License: GPL-3.0-or-later