diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 23 | ||||
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 25 |
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 @@ | |||
| 1 | 2002-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 | |||
| 1 | 2002-02-17 Per Abrahamsen <abraham@dina.kvl.dk> | 7 | 2002-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. | |||
| 259 | If this command is repeated, marks more defuns after the ones | 259 | If this command is repeated, marks more defuns after the ones |
| 260 | already marked." | 260 | already 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. | |||
| 330 | If this command is repeated, it marks the next ARG paragraphs after (or | 330 | If this command is repeated, it marks the next ARG paragraphs after (or |
| 331 | before, if arg is negative) the ones already marked." | 331 | before, 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. |