+2007-04-09 Paul Curry <dashteacup@gmail.com> (tiny change)
+
+ * progmodes/cc-subword.el (c-downcase-subword, c-upcase-subword):
+ Don't move point if ARG is netagive.
+
2007-04-09 Alan Mackenzie <acm@muc.de>
Changes to make `narrow-to-defun' and `mark-defun' work properly
(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.
(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)))
\f
;;