[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-subword.el,v
From: |
Masatake YAMATO |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-subword.el,v |
Date: |
Mon, 09 Apr 2007 12:34:59 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Masatake YAMATO <jet> 07/04/09 12:34:58
Index: progmodes/cc-subword.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/cc-subword.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- progmodes/cc-subword.el 21 Jan 2007 03:20:45 -0000 1.6
+++ progmodes/cc-subword.el 9 Apr 2007 12:34:57 -0000 1.7
@@ -218,6 +218,28 @@
(interactive "*p")
(transpose-subr 'c-forward-subword arg))
+
+
+(defun c-downcase-subword (arg)
+ "Do the same as `downcase-word' but on subwords.
+See the command `c-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) (c-forward-subword arg))
+ (when (< arg 0)
+ (goto-char start))))
+
+(defun c-upcase-subword (arg)
+ "Do the same as `upcase-word' but on subwords.
+See the command `c-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) (c-forward-subword arg))
+ (when (< arg 0)
+ (goto-char start))))
+
(defun c-capitalize-subword (arg)
"Do the same as `capitalize-word' but on subwords.
See the command `c-subword-mode' for a description of subwords.
@@ -237,19 +259,6 @@
(downcase-region pp np)
(goto-char np)))))
-(defun c-downcase-subword (arg)
- "Do the same as `downcase-word' but on subwords.
-See the command `c-subword-mode' for a description of subwords.
-Optional argument ARG is the same as for `downcase-word'."
- (interactive "p")
- (downcase-region (point) (c-forward-subword arg)))
-
-(defun c-upcase-subword (arg)
- "Do the same as `upcase-word' but on subwords.
-See the command `c-subword-mode' for a description of subwords.
-Optional argument ARG is the same as for `upcase-word'."
- (interactive "p")
- (upcase-region (point) (c-forward-subword arg)))
;;
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-subword.el,v,
Masatake YAMATO <=