From 24bc1ad5a9a4f78410ad65492a53329f759408d7 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Fri, 23 Jun 2017 13:04:59 +0200 Subject: Add enlarge-window-horizontally and shrink-window-horizontally bindings. Update php-mode --- .emacs | 3 +++ .emacs.d/lisp/php-mode.el | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.emacs b/.emacs index 8f6a200..912f1fb 100644 --- a/.emacs +++ b/.emacs @@ -4,6 +4,9 @@ (global-set-key [delete] 'delete-char) (global-set-key [kp-delete] 'delete-char) +(global-set-key (kbd "S-C-") 'shrink-window-horizontally) +(global-set-key (kbd "S-C-") 'enlarge-window-horizontally) + ;; My own key bindings ;; ;;(global-set-key [f1] 'compile) 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 @@ ;; Author: Eric James Michael Ritz ;; URL: https://github.com/ejmr/php-mode -;; Version: 1.18.2 +;; Version: 1.18.3 ;; Package-Requires: ((emacs "24") (cl-lib "0.5")) (defconst php-mode-version-number "1.18.3" "PHP Mode version number.") -(defconst php-mode-modified "2017-04-19" +(defconst php-mode-modified "2017-06-22" "PHP Mode build date.") ;;; License @@ -1713,6 +1713,22 @@ The output will appear in the buffer *PHP*." (when (re-search-backward re-pattern nil t) (match-string-no-properties 1)))) +;;;###autoload +(defun php-current-class () + "Insert current class name if cursor in class context." + (interactive) + (let ((matched (php-get-current-element php--re-classlike-pattern))) + (when matched + (insert (concat matched php-class-suffix-when-insert))))) + +;;;###autoload +(defun php-current-namespace () + "Insert current namespace if cursor in in namespace context." + (interactive) + (let ((matched (php-get-current-element php--re-namespace-pattern))) + (when matched + (insert (concat matched php-namespace-suffix-when-insert))))) + ;;;###autoload (dolist (pattern '("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) -- cgit v1.3