comparison lisp/textmodes/paragraphs.el @ 41709:df0a6a02b580

(mark-paragraph): Clarify doc. Clarify error message. Suggestion from Richard Stallman.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Fri, 30 Nov 2001 17:18:27 +0000
parents ca833879aa7b
children 898b4b31410f
comparison
equal deleted inserted replaced
41708:8439236b7552 41709:df0a6a02b580
315 See `forward-paragraph' for more information." 315 See `forward-paragraph' for more information."
316 (interactive "p") 316 (interactive "p")
317 (or arg (setq arg 1)) 317 (or arg (setq arg 1))
318 (forward-paragraph (- arg))) 318 (forward-paragraph (- arg)))
319 319
320 (defun mark-paragraph () 320 (defun mark-paragraph (&optional arg)
321 "Put point at beginning of this paragraph, mark at end. 321 "Put point at beginning of this paragraph, mark at end.
322 The paragraph marked is the one that contains point or follows point." 322 The paragraph marked is the one that contains point or follows point.
323 (interactive) 323
324 (forward-paragraph 1) 324 With argument ARG, puts mark at end of a following paragraph, so that
325 the number of paragraphs marked equals ARG.
326
327 If ARG is negative, point is put at end of this paragraph, mark is put
328 at beginning of this or a previous paragraph."
329 (interactive "p")
330 (unless arg (setq arg 1))
331 (when (zerop arg)
332 (error "Cannot mark zero paragraphs"))
333 (forward-paragraph arg)
325 (push-mark nil t t) 334 (push-mark nil t t)
326 (backward-paragraph 1)) 335 (backward-paragraph arg))
327 336
328 (defun kill-paragraph (arg) 337 (defun kill-paragraph (arg)
329 "Kill forward to end of paragraph. 338 "Kill forward to end of paragraph.
330 With arg N, kill forward to Nth end of paragraph; 339 With arg N, kill forward to Nth end of paragraph;
331 negative arg -N means kill backward to Nth start of paragraph." 340 negative arg -N means kill backward to Nth start of paragraph."