Commit add9ca2d authored by Bastien Guerry's avatar Bastien Guerry

misc.el (forward-to-word, backward-to-word): Use (interactive "^p").

Thanks to Le Wang for the patch.
parent 0fcd3d9f
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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment