From a9b76eec39a74a626f12a64522e2e8743fe0701b Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Fri, 20 Nov 2009 18:09:29 +0000
Subject: [PATCH] * 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.
---
 lisp/ChangeLog            | 18 +++++++++--
 lisp/progmodes/cc-cmds.el | 12 +++----
 lisp/subword.el           | 68 +++++++++++++++++++--------------------
 3 files changed, 56 insertions(+), 42 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 575f121852e..cbddccc3ba0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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)
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index d5393c4bdb7..0b217537edd 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1323,23 +1323,23 @@ keyword on the line, the keyword is not inserted inside a literal, and
 
 
 
-(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.
diff --git a/lisp/subword.el b/lisp/subword.el
index 0b22c135701..655d08f9884 100644
--- a/lisp/subword.el
+++ b/lisp/subword.el
@@ -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 @@ as words.
 (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 @@ Optional argument ARG is the same as for `forward-word'."
   (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 @@ Optional argument ARG is the same as for `mark-word'."
 	 (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 @@ Optional argument ARG is the same as for `capitalize-word'."
 		  (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 @@ Optional argument ARG is the same as for `capitalize-word'."
 ;;
 ;; Internal functions
 ;;
-(defun forward-subword-internal ()
+(defun subword-forward-internal ()
   (if (and
        (save-excursion
 	 (let ((case-fold-search nil))
@@ -258,7 +258,7 @@ Optional argument ARG is the same as for `capitalize-word'."
     (forward-word 1)))
 
 
-(defun backward-subword-internal ()
+(defun subword-backward-internal ()
   (if (save-excursion
 	(let ((case-fold-search nil))
 	  (re-search-backward
-- 
2.39.5