aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp.el23
-rw-r--r--lisp/textmodes/paragraphs.el25
3 files changed, 31 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 47307871181..0dd8ee7c470 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12002-02-17 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
2
3 * emacs-lisp/lisp.el (mark-defun): Don't leave multiple marks
4 when repeated.
5 * textmodes/paragraphs.el (mark-paragraph): Ditto.
6
12002-02-17 Per Abrahamsen <abraham@dina.kvl.dk> 72002-02-17 Per Abrahamsen <abraham@dina.kvl.dk>
2 8
3 * menu-bar.el (menu-bar-showhide-menu): Added speedbar. 9 * menu-bar.el (menu-bar-showhide-menu): Added speedbar.
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index a815eddfd78..57e507e4f67 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -259,17 +259,18 @@ The defun marked is the one that contains point or follows point.
259If this command is repeated, marks more defuns after the ones 259If this command is repeated, marks more defuns after the ones
260already marked." 260already marked."
261 (interactive) 261 (interactive)
262 (let (here) 262 (cond ((and (eq last-command this-command) (mark t))
263 (when (and (eq last-command this-command) (mark t)) 263 (set-mark
264 (setq here (point)) 264 (save-excursion
265 (goto-char (mark))) 265 (goto-char (mark))
266 (push-mark (point)) 266 (end-of-defun)
267 (end-of-defun) 267 (point))))
268 (push-mark (point) nil t) 268 (t
269 (if here 269 (push-mark (point))
270 (goto-char here) 270 (end-of-defun)
271 (beginning-of-defun) 271 (push-mark (point) nil t)
272 (re-search-backward "^\n" (- (point) 1) t)))) 272 (beginning-of-defun)
273 (re-search-backward "^\n" (- (point) 1) t))))
273 274
274(defun narrow-to-defun (&optional arg) 275(defun narrow-to-defun (&optional arg)
275 "Make text outside current defun invisible. 276 "Make text outside current defun invisible.
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 91d9b1699f9..bc4cac2a088 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -330,18 +330,19 @@ at beginning of this or a previous paragraph.
330If this command is repeated, it marks the next ARG paragraphs after (or 330If this command is repeated, it marks the next ARG paragraphs after (or
331before, if arg is negative) the ones already marked." 331before, if arg is negative) the ones already marked."
332 (interactive "p") 332 (interactive "p")
333 (let (here) 333 (unless arg (setq arg 1))
334 (unless arg (setq arg 1)) 334 (when (zerop arg)
335 (when (zerop arg) 335 (error "Cannot mark zero paragraphs"))
336 (error "Cannot mark zero paragraphs")) 336 (cond ((and (eq last-command this-command) (mark t))
337 (when (and (eq last-command this-command) (mark t)) 337 (set-mark
338 (setq here (point)) 338 (save-excursion
339 (goto-char (mark))) 339 (goto-char (mark))
340 (forward-paragraph arg) 340 (forward-paragraph arg)
341 (push-mark nil t t) 341 (point))))
342 (if here 342 (t
343 (goto-char here) 343 (forward-paragraph arg)
344 (backward-paragraph arg)))) 344 (push-mark nil t t)
345 (backward-paragraph arg))))
345 346
346(defun kill-paragraph (arg) 347(defun kill-paragraph (arg)
347 "Kill forward to end of paragraph. 348 "Kill forward to end of paragraph.