changeset 106167:c898329ba7ba

* progmodes/cc-cmds.el (c-forward-into-nomenclature) (c-backward-into-nomenclature): Adapt to subword renaming. * subword.el (subword-forward, subword-backward, subword-mark) (subword-kill, subword-backward-kill, subword-transpose) (subword-downcase, subword-upcase, subword-capitalize) (subword-forward-internal, subword-backward-internal): Renamed from forward-subword, backward-subword, mark-subword kill-subword, backward-kill-subword, transpose-subwords, downcase-subword, upcase-subword, capitalize-subword forward-subword-internal, backward-subword-internal.
author Tassilo Horn <tassilo@member.fsf.org>
date Fri, 20 Nov 2009 18:09:29 +0000
parents 858a083ed2f0
children 83924fb4f59c
files lisp/ChangeLog lisp/progmodes/cc-cmds.el lisp/subword.el
diffstat 3 files changed, 56 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 20 15:47:26 2009 +0000
+++ b/lisp/ChangeLog	Fri Nov 20 18:09:29 2009 +0000
@@ -1,7 +1,21 @@
+2009-11-20  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* progmodes/cc-cmds.el (c-forward-into-nomenclature)
+	(c-backward-into-nomenclature): Adapt to subword renaming.
+
+	* subword.el (subword-forward, subword-backward, subword-mark)
+	(subword-kill, subword-backward-kill, subword-transpose)
+	(subword-downcase, subword-upcase, subword-capitalize)
+	(subword-forward-internal, subword-backward-internal): Renamed
+	from forward-subword, backward-subword, mark-subword kill-subword,
+	backward-kill-subword, transpose-subwords, downcase-subword,
+	upcase-subword, capitalize-subword forward-subword-internal,
+	backward-subword-internal.
+
 2009-11-20  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 
-	* bookmark.el (bookmark-search-delay, bookmark-search-prompt):
-	New options.
+	* bookmark.el (bookmark-search-delay, bookmark-search-prompt): New
+	options.
 	(bookmark-search-pattern, bookmark-search-timer, bookmark-quit-flag):
 	New vars.
 	(bookmark-read-search-input, bookmark-filtered-alist-by-regexp-only)
--- a/lisp/progmodes/cc-cmds.el	Fri Nov 20 15:47:26 2009 +0000
+++ b/lisp/progmodes/cc-cmds.el	Fri Nov 20 18:09:29 2009 +0000
@@ -1323,23 +1323,23 @@
 
 
 
-(declare-function forward-subword "subword" (&optional arg))
-(declare-function backward-subword "subword" (&optional arg))
+(declare-function subword-forward "subword" (&optional arg))
+(declare-function subword-backward "subword" (&optional arg))
 
 ;; "nomenclature" functions + c-scope-operator.
 (defun c-forward-into-nomenclature (&optional arg)
   "Compatibility alias for `c-forward-subword'."
   (interactive "p")
   (require 'subword)
-  (forward-subword arg))
-(make-obsolete 'c-forward-into-nomenclature 'forward-subword "23.2")
+  (subword-forward arg))
+(make-obsolete 'c-forward-into-nomenclature 'subword-forward "23.2")
 
 (defun c-backward-into-nomenclature (&optional arg)
   "Compatibility alias for `c-backward-subword'."
   (interactive "p")
   (require 'subword)
-  (backward-subword arg))
-(make-obsolete 'c-backward-into-nomenclature 'backward-subword "23.2")
+  (subword-backward arg))
+(make-obsolete 'c-backward-into-nomenclature 'subword-backward "23.2")
 
 (defun c-scope-operator ()
   "Insert a double colon scope operator at point.
--- a/lisp/subword.el	Fri Nov 20 15:47:26 2009 +0000
+++ b/lisp/subword.el	Fri Nov 20 18:09:29 2009 +0000
@@ -50,15 +50,15 @@
 
 ;; Key     Word oriented command      Subword oriented command
 ;; ============================================================
-;; M-f     `forward-word'             `forward-subword'
-;; M-b     `backward-word'            `backward-subword'
-;; M-@     `mark-word'                `mark-subword'
-;; M-d     `kill-word'                `kill-subword'
-;; M-DEL   `backward-kill-word'       `backward-kill-subword'
-;; M-t     `transpose-words'          `transpose-subwords'
-;; M-c     `capitalize-word'          `capitalize-subword'
-;; M-u     `upcase-word'              `upcase-subword'
-;; M-l     `downcase-word'            `downcase-subword'
+;; M-f     `forward-word'             `subword-forward'
+;; M-b     `backward-word'            `subword-backward'
+;; M-@     `mark-word'                `subword-mark'
+;; M-d     `kill-word'                `subword-kill'
+;; M-DEL   `backward-kill-word'       `subword-backward-kill'
+;; M-t     `transpose-words'          `subword-transpose'
+;; M-c     `capitalize-word'          `subword-capitalize'
+;; M-u     `upcase-word'              `subword-upcase'
+;; M-l     `downcase-word'            `subword-downcase'
 ;;
 ;; Note: If you have changed the key bindings for the word oriented
 ;; commands in your .emacs or a similar place, the keys you've changed
@@ -125,7 +125,7 @@
 (define-global-minor-mode global-subword-mode subword-mode
   (lambda () (subword-mode 1)))
 
-(defun forward-subword (&optional arg)
+(defun subword-forward (&optional arg)
   "Do the same as `forward-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `forward-word'."
@@ -134,23 +134,23 @@
   (cond
    ((< 0 arg)
     (dotimes (i arg (point))
-      (forward-subword-internal)))
+      (subword-forward-internal)))
    ((> 0 arg)
     (dotimes (i (- arg) (point))
-      (backward-subword-internal)))
+      (subword-backward-internal)))
    (t
     (point))))
 
-(put 'forward-subword 'CUA 'move)
+(put 'subword-forward 'CUA 'move)
 
-(defun backward-subword (&optional arg)
+(defun subword-backward (&optional arg)
   "Do the same as `backward-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `backward-word'."
   (interactive "p")
-  (forward-subword (- (or arg 1))))
+  (subword-forward (- (or arg 1))))
 
-(defun mark-subword (arg)
+(defun subword-mark (arg)
   "Do the same as `mark-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `mark-word'."
@@ -160,59 +160,59 @@
 	 (set-mark
 	  (save-excursion
 	    (goto-char (mark))
-	    (forward-subword arg)
+	    (subword-forward arg)
 	    (point))))
 	(t
 	 (push-mark
 	  (save-excursion
-	    (forward-subword arg)
+	    (subword-forward arg)
 	    (point))
 	  nil t))))
 
-(put 'backward-subword 'CUA 'move)
+(put 'subword-backward 'CUA 'move)
 
-(defun kill-subword (arg)
+(defun subword-kill (arg)
   "Do the same as `kill-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `kill-word'."
   (interactive "p")
-  (kill-region (point) (forward-subword arg)))
+  (kill-region (point) (subword-forward arg)))
 
-(defun backward-kill-subword (arg)
+(defun subword-backward-kill (arg)
   "Do the same as `backward-kill-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `backward-kill-word'."
   (interactive "p")
-  (kill-subword (- arg)))
+  (subword-kill (- arg)))
 
-(defun transpose-subwords (arg)
+(defun subword-transpose (arg)
   "Do the same as `transpose-words' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `transpose-words'."
   (interactive "*p")
-  (transpose-subr 'forward-subword arg))
+  (transpose-subr 'subword-forward arg))
 
-(defun downcase-subword (arg)
+(defun subword-downcase (arg)
   "Do the same as `downcase-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `downcase-word'."
   (interactive "p")
   (let ((start (point)))
-    (downcase-region (point) (forward-subword arg))
+    (downcase-region (point) (subword-forward arg))
     (when (< arg 0)
       (goto-char start))))
 
-(defun upcase-subword (arg)
+(defun subword-upcase (arg)
   "Do the same as `upcase-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `upcase-word'."
   (interactive "p")
   (let ((start (point)))
-    (upcase-region (point) (forward-subword arg))
+    (upcase-region (point) (subword-forward arg))
     (when (< arg 0)
       (goto-char start))))
 
-(defun capitalize-subword (arg)
+(defun subword-capitalize (arg)
   "Do the same as `capitalize-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
 Optional argument ARG is the same as for `capitalize-word'."
@@ -226,10 +226,10 @@
 		  (concat "[[:alpha:]]")
 		  nil t)
 		 (goto-char (match-beginning 0)))
-	(backward-subword))
+	(subword-backward))
       (let* ((p (point))
 	     (pp (1+ p))
-	     (np (forward-subword)))
+	     (np (subword-forward)))
 	(upcase-region p pp)
 	(downcase-region pp np)
 	(goto-char (if advance np p))))
@@ -241,7 +241,7 @@
 ;;
 ;; Internal functions
 ;;
-(defun forward-subword-internal ()
+(defun subword-forward-internal ()
   (if (and
        (save-excursion
 	 (let ((case-fold-search nil))
@@ -258,7 +258,7 @@
     (forward-word 1)))
 
 
-(defun backward-subword-internal ()
+(defun subword-backward-internal ()
   (if (save-excursion
 	(let ((case-fold-search nil))
 	  (re-search-backward