diff options
| author | Richard M. Stallman | 2004-12-29 01:35:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-29 01:35:21 +0000 |
| commit | 94ed093133a86d71b3dff6a1c07d36428949331a (patch) | |
| tree | 99b2eab13ee5c58168aacfd41959da6a0f82ffa5 | |
| parent | a1a801de6aaafa061d304322e9f51a026fe98ed0 (diff) | |
| download | emacs-94ed093133a86d71b3dff6a1c07d36428949331a.tar.gz emacs-94ed093133a86d71b3dff6a1c07d36428949331a.zip | |
(mark-paragraph): New arg ALLOW-EXTEND
enables the feature to extend the existing region.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 15 |
2 files changed, 22 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a56b6d2a61..b447d51f3fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,6 +4,20 @@ | |||
| 4 | 4 | ||
| 5 | 2004-12-28 Richard M. Stallman <rms@gnu.org> | 5 | 2004-12-28 Richard M. Stallman <rms@gnu.org> |
| 6 | 6 | ||
| 7 | * simple.el (undo-extra-outer-limit): New variable. | ||
| 8 | (undo-outer-limit-truncate): Test and set it. | ||
| 9 | |||
| 10 | * emacs-lisp/lisp.el (mark-sexp, mark-defun): New arg ALLOW-EXTEND | ||
| 11 | enables the feature to extend the existing region. | ||
| 12 | |||
| 13 | * simple.el (mark-word): New arg ALLOW-EXTEND | ||
| 14 | enables the feature to extend the existing region. | ||
| 15 | |||
| 16 | * textmodes/paragraphs.el (mark-paragraph): New arg ALLOW-EXTEND | ||
| 17 | enables the feature to extend the existing region. | ||
| 18 | |||
| 19 | * startup.el (site-run-file): Don't allow setting it with Custom. | ||
| 20 | |||
| 7 | * simple.el (buffer-disable-undo): Fix previous change. | 21 | * simple.el (buffer-disable-undo): Fix previous change. |
| 8 | 22 | ||
| 9 | 2004-12-27 Masatake YAMATO <jet@gyve.org> | 23 | 2004-12-27 Masatake YAMATO <jet@gyve.org> |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 353aa0ee8a2..7728ea7b463 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -347,7 +347,7 @@ See `forward-paragraph' for more information." | |||
| 347 | (or arg (setq arg 1)) | 347 | (or arg (setq arg 1)) |
| 348 | (forward-paragraph (- arg))) | 348 | (forward-paragraph (- arg))) |
| 349 | 349 | ||
| 350 | (defun mark-paragraph (&optional arg) | 350 | (defun mark-paragraph (&optional arg allow-extend) |
| 351 | "Put point at beginning of this paragraph, mark at end. | 351 | "Put point at beginning of this paragraph, mark at end. |
| 352 | The paragraph marked is the one that contains point or follows point. | 352 | The paragraph marked is the one that contains point or follows point. |
| 353 | 353 | ||
| @@ -357,15 +357,16 @@ the number of paragraphs marked equals ARG. | |||
| 357 | If ARG is negative, point is put at end of this paragraph, mark is put | 357 | If ARG is negative, point is put at end of this paragraph, mark is put |
| 358 | at beginning of this or a previous paragraph. | 358 | at beginning of this or a previous paragraph. |
| 359 | 359 | ||
| 360 | If this command is repeated or mark is active in Transient Mark mode, | 360 | Interactively, if this command is repeated |
| 361 | it marks the next ARG paragraphs after (or before, if arg is negative) | 361 | or (in Transient Mark mode) if the mark is active, |
| 362 | the ones already marked." | 362 | it marks the next ARG paragraphs after the ones already marked." |
| 363 | (interactive "p") | 363 | (interactive "p\np") |
| 364 | (unless arg (setq arg 1)) | 364 | (unless arg (setq arg 1)) |
| 365 | (when (zerop arg) | 365 | (when (zerop arg) |
| 366 | (error "Cannot mark zero paragraphs")) | 366 | (error "Cannot mark zero paragraphs")) |
| 367 | (cond ((or (and (eq last-command this-command) (mark t)) | 367 | (cond ((and allow-extend |
| 368 | (and transient-mark-mode mark-active)) | 368 | (or (and (eq last-command this-command) (mark t)) |
| 369 | (and transient-mark-mode mark-active))) | ||
| 369 | (set-mark | 370 | (set-mark |
| 370 | (save-excursion | 371 | (save-excursion |
| 371 | (goto-char (mark)) | 372 | (goto-char (mark)) |