Skip to content

Commit 5a1f99d

Browse files
author
Eric James Michael Ritz
committed
Introduce ‘C-c C-w’ to toggle Subword Mode
Programmers who use cameCase may prefer to use Subword Mode. The keys ‘C-c C-w’ exist in cc-mode, performing the exact same behavior. Because we have gradually move towards using cc-mode as the foundation of new features it seems reasonable to introduce this change. The source code contains a URL to the official GNU Emacs manual here it explains exactly what Subword Mode does. GitHub-Issue: 89
1 parent 2e7cd7d commit 5a1f99d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

php-mode.el

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(defconst php-mode-version-number "1.10"
1212
"PHP Mode version number.")
1313

14-
(defconst php-mode-modified "2013-05-24"
14+
(defconst php-mode-modified "2013-06-07"
1515
"PHP Mode build date.")
1616

1717
;;; License
@@ -633,6 +633,17 @@ This is was done due to the problem reported here:
633633
;; are more likely to expect.
634634
(define-key map (kbd "C-M-h") 'mark-defun)
635635

636+
;; Many packages based on cc-mode provide the 'C-c C-w' binding
637+
;; to toggle Subword Mode. See the page
638+
;;
639+
;; https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
640+
;;
641+
;; for more information about Submode Word.
642+
(if (boundp 'subword-mode)
643+
(if subword-mode
644+
(subword-mode nil)
645+
(subword-mode t)))
646+
636647
(define-key map [(control c) (control f)] 'php-search-documentation)
637648
(define-key map [(meta tab)] 'php-complete-function)
638649
(define-key map [(control c) (control m)] 'php-browse-manual)

0 commit comments

Comments
 (0)