Thanks to Le Wang for the patch.
-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
(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