diff options
Diffstat (limited to '.emacs.d/lisp')
| -rw-r--r-- | .emacs.d/lisp/php-mode.el | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el index 62e1e97..b586891 100644 --- a/.emacs.d/lisp/php-mode.el +++ b/.emacs.d/lisp/php-mode.el | |||
| @@ -6,13 +6,13 @@ | |||
| 6 | 6 | ||
| 7 | ;; Author: Eric James Michael Ritz | 7 | ;; Author: Eric James Michael Ritz |
| 8 | ;; URL: https://github.com/ejmr/php-mode | 8 | ;; URL: https://github.com/ejmr/php-mode |
| 9 | ;; Version: 1.18.2 | 9 | ;; Version: 1.18.3 |
| 10 | ;; Package-Requires: ((emacs "24") (cl-lib "0.5")) | 10 | ;; Package-Requires: ((emacs "24") (cl-lib "0.5")) |
| 11 | 11 | ||
| 12 | (defconst php-mode-version-number "1.18.3" | 12 | (defconst php-mode-version-number "1.18.3" |
| 13 | "PHP Mode version number.") | 13 | "PHP Mode version number.") |
| 14 | 14 | ||
| 15 | (defconst php-mode-modified "2017-04-19" | 15 | (defconst php-mode-modified "2017-06-22" |
| 16 | "PHP Mode build date.") | 16 | "PHP Mode build date.") |
| 17 | 17 | ||
| 18 | ;;; License | 18 | ;;; License |
| @@ -1713,6 +1713,22 @@ The output will appear in the buffer *PHP*." | |||
| 1713 | (when (re-search-backward re-pattern nil t) | 1713 | (when (re-search-backward re-pattern nil t) |
| 1714 | (match-string-no-properties 1)))) | 1714 | (match-string-no-properties 1)))) |
| 1715 | 1715 | ||
| 1716 | ;;;###autoload | ||
| 1717 | (defun php-current-class () | ||
| 1718 | "Insert current class name if cursor in class context." | ||
| 1719 | (interactive) | ||
| 1720 | (let ((matched (php-get-current-element php--re-classlike-pattern))) | ||
| 1721 | (when matched | ||
| 1722 | (insert (concat matched php-class-suffix-when-insert))))) | ||
| 1723 | |||
| 1724 | ;;;###autoload | ||
| 1725 | (defun php-current-namespace () | ||
| 1726 | "Insert current namespace if cursor in in namespace context." | ||
| 1727 | (interactive) | ||
| 1728 | (let ((matched (php-get-current-element php--re-namespace-pattern))) | ||
| 1729 | (when matched | ||
| 1730 | (insert (concat matched php-namespace-suffix-when-insert))))) | ||
| 1731 | |||
| 1716 | 1732 | ||
| 1717 | ;;;###autoload | 1733 | ;;;###autoload |
| 1718 | (dolist (pattern '("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) | 1734 | (dolist (pattern '("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) |
