]> git.eshelyaron.com Git - emacs.git/commitdiff
Install a patch from Paul Curry.
authorMasatake YAMATO <jet@gyve.org>
Mon, 9 Apr 2007 12:34:57 +0000 (12:34 +0000)
committerMasatake YAMATO <jet@gyve.org>
Mon, 9 Apr 2007 12:34:57 +0000 (12:34 +0000)
(c-downcase-subword, c-upcase-subword): Don't move point if ARG is netagive.

lisp/ChangeLog
lisp/progmodes/cc-subword.el

index c1b7c973cba6aa3d5e06fd3ed86acdf33d2b8f88..473cb45cf2825a09a6dc26e7a26ef4a19b0d3b7e 100644 (file)
@@ -1,3 +1,8 @@
+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
index 29494fdc6a7c99a49b61aee468885f22b747b4c2..9bdd991982b723d37ac1f7c291d0292f40409328 100644 (file)
@@ -218,6 +218,28 @@ Optional argument ARG is the same as for `transpose-words'."
   (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 @@ Optional argument ARG is the same as for `capitalize-word'."
        (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
 ;;