1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/simple.el (mark-word): Mark more if repeated.

* lisp/textmodes/paragraphs.el (mark-paragraph): Ditto.
(mark-end-of-sentence): Ditto.
This commit is contained in:
Kai Großjohann 2002-02-15 08:53:15 +00:00
parent 66c8296f83
commit cad113ae34
6 changed files with 93 additions and 43 deletions

View file

@ -2812,13 +2812,22 @@ With argument, do this that many times."
(forward-word (- arg)))
(defun mark-word (arg)
"Set mark arg words away from point."
"Set mark arg words away from point.
If this command is repeated, it marks the next ARG words after the ones
already marked."
(interactive "p")
(push-mark
(save-excursion
(forward-word arg)
(point))
nil t))
(cond ((and (eq last-command this-command) (mark t))
(set-mark
(save-excursion
(goto-char (mark))
(forward-word arg)
(point))))
(t
(push-mark
(save-excursion
(forward-word arg)
(point))
nil t))))
(defun kill-word (arg)
"Kill characters forward until encountering the end of a word.