mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
misc.el (forward-to-word, backward-to-word): Use (interactive "^p").
Thanks to Le Wang for the patch.
This commit is contained in:
parent
0fcd3d9fa4
commit
add9ca2d9a
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user