aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/misc.el
diff options
context:
space:
mode:
authorBastien Guerry2012-08-22 19:12:35 +0200
committerBastien Guerry2012-08-22 19:12:35 +0200
commitadd9ca2d9a056c4043c8d244fed8a5f4fcdcc4a0 (patch)
tree9ac40b2db4e3e647b0b9870a8851501c752ad911 /lisp/misc.el
parent0fcd3d9fa4cdee0a9a067f74c75b9e053502e294 (diff)
downloademacs-add9ca2d9a056c4043c8d244fed8a5f4fcdcc4a0.tar.gz
emacs-add9ca2d9a056c4043c8d244fed8a5f4fcdcc4a0.zip
misc.el (forward-to-word, backward-to-word): Use (interactive "^p").
Thanks to Le Wang for the patch.
Diffstat (limited to 'lisp/misc.el')
-rw-r--r--lisp/misc.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/misc.el b/lisp/misc.el
index cb52ecbd36e..96b739dc2b7 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -99,14 +99,14 @@ Ignores CHAR at point."
99(defun forward-to-word (arg) 99(defun forward-to-word (arg)
100 "Move forward until encountering the beginning of a word. 100 "Move forward until encountering the beginning of a word.
101With argument, do this that many times." 101With argument, do this that many times."
102 (interactive "p") 102 (interactive "^p")
103 (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) 103 (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
104 (goto-char (if (> arg 0) (point-max) (point-min))))) 104 (goto-char (if (> arg 0) (point-max) (point-min)))))
105 105
106(defun backward-to-word (arg) 106(defun backward-to-word (arg)
107 "Move backward until encountering the end of a word. 107 "Move backward until encountering the end of a word.
108With argument, do this that many times." 108With argument, do this that many times."
109 (interactive "p") 109 (interactive "^p")
110 (forward-to-word (- arg))) 110 (forward-to-word (- arg)))
111 111
112;;;###autoload 112;;;###autoload