misc.el (forward-to-word, backward-to-word): Use (interactive "^p").
authorBastien Guerry <bastien1@free.fr>
Wed, 22 Aug 2012 17:12:35 +0000 (19:12 +0200)
committerBastien Guerry <bastien1@free.fr>
Wed, 22 Aug 2012 17:12:35 +0000 (19:12 +0200)
Thanks to Le Wang for the patch.

lisp/ChangeLog
lisp/misc.el

index a5464d5..486c12e 100644 (file)
@@ -1,4 +1,7 @@
-2012-08-22  Bastien Guerry  <bzg@altern.org>
+2012-08-22  Bastien Guerry  <bzg@gnu.org>
+
+       * misc.el (forward-to-word, backward-to-word): Activate or extend
+       the region under `shift-select-mode'.
 
        * progmodes/executable.el (executable-prefix): Set to "#!" instead
        of "#! ".  http://www.in-ulm.de/~mascheck/various/shebang/#details
index cb52ecb..96b739d 100644 (file)
@@ -99,14 +99,14 @@ Ignores CHAR at point."
 (defun forward-to-word (arg)
   "Move forward until encountering the beginning of a word.
 With argument, do this that many times."
-  (interactive "p")
+  (interactive "^p")
   (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
       (goto-char (if (> arg 0) (point-max) (point-min)))))
 
 (defun backward-to-word (arg)
   "Move backward until encountering the end of a word.
 With argument, do this that many times."
-  (interactive "p")
+  (interactive "^p")
   (forward-to-word (- arg)))
 
 ;;;###autoload