Mercurial > emacs
comparison lisp/simple.el @ 59157:349f61f37d67
(undo): Fix previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 27 Dec 2004 22:12:39 +0000 |
parents | 25e00b2ef82f |
children | ced0821d5f7c 223c12363c0c |
comparison
equal
deleted
inserted
replaced
59156:03a6e350cf4d | 59157:349f61f37d67 |
---|---|
1261 (setq this-command 'undo-start) | 1261 (setq this-command 'undo-start) |
1262 | 1262 |
1263 (unless (and (eq last-command 'undo) | 1263 (unless (and (eq last-command 'undo) |
1264 ;; If something (a timer or filter?) changed the buffer | 1264 ;; If something (a timer or filter?) changed the buffer |
1265 ;; since the previous command, don't continue the undo seq. | 1265 ;; since the previous command, don't continue the undo seq. |
1266 (eq undo-list-saved buffer-undo-list)) | 1266 (let ((list buffer-undo-list)) |
1267 (while (eq (car list) nil) | |
1268 (setq list (cdr list))) | |
1269 (eq undo-list-saved list))) | |
1267 (setq undo-in-region | 1270 (setq undo-in-region |
1268 (if transient-mark-mode mark-active (and arg (not (numberp arg))))) | 1271 (if transient-mark-mode mark-active (and arg (not (numberp arg))))) |
1269 (if undo-in-region | 1272 (if undo-in-region |
1270 (undo-start (region-beginning) (region-end)) | 1273 (undo-start (region-beginning) (region-end)) |
1271 (undo-start)) | 1274 (undo-start)) |
1525 ;; this function gets called to ask the user what to do. | 1528 ;; this function gets called to ask the user what to do. |
1526 ;; Garbage collection is inhibited around the call, | 1529 ;; Garbage collection is inhibited around the call, |
1527 ;; so it had better not do a lot of consing. | 1530 ;; so it had better not do a lot of consing. |
1528 (setq undo-outer-limit-function 'undo-outer-limit-truncate) | 1531 (setq undo-outer-limit-function 'undo-outer-limit-truncate) |
1529 (defun undo-outer-limit-truncate (size) | 1532 (defun undo-outer-limit-truncate (size) |
1530 (if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " | 1533 (if (let (use-dialog-box) |
1531 (buffer-name) size)) | 1534 (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " |
1535 (buffer-name) size))) | |
1532 (progn (setq buffer-undo-list nil) t) | 1536 (progn (setq buffer-undo-list nil) t) |
1533 nil)) | 1537 nil)) |
1534 | 1538 |
1535 (defvar shell-command-history nil | 1539 (defvar shell-command-history nil |
1536 "History list for some commands that read shell commands.") | 1540 "History list for some commands that read shell commands.") |