diff options
| author | Richard M. Stallman | 2004-12-23 00:15:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-23 00:15:23 +0000 |
| commit | 81c1cf71feec0cd6f906141d741dccfb76aae3de (patch) | |
| tree | eeaaee4526c5a7109b82171c6c993d7125c02af8 /src/undo.c | |
| parent | 7a0ea9e3554e4fc99c0c7de0216dc8915fe5b6ee (diff) | |
| download | emacs-81c1cf71feec0cd6f906141d741dccfb76aae3de.tar.gz emacs-81c1cf71feec0cd6f906141d741dccfb76aae3de.zip | |
(Vundo_outer_limit): Replaces undo_outer_limit. Uses changed.
(syms_of_undo): Initialize appropriately.
(truncate_undo_list): If it's nil, there's no limit.
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/undo.c b/src/undo.c index d2f89c36a2a..df4b8d08cd6 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -28,7 +28,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 28 | 28 | ||
| 29 | EMACS_INT undo_limit; | 29 | EMACS_INT undo_limit; |
| 30 | EMACS_INT undo_strong_limit; | 30 | EMACS_INT undo_strong_limit; |
| 31 | EMACS_INT undo_outer_limit; | 31 | |
| 32 | Lisp_Object Vundo_outer_limit; | ||
| 32 | 33 | ||
| 33 | /* Function to call when undo_outer_limit is exceeded. */ | 34 | /* Function to call when undo_outer_limit is exceeded. */ |
| 34 | 35 | ||
| @@ -368,7 +369,8 @@ truncate_undo_list (b) | |||
| 368 | 369 | ||
| 369 | /* If by the first boundary we have already passed undo_outer_limit, | 370 | /* If by the first boundary we have already passed undo_outer_limit, |
| 370 | we're heading for memory full, so offer to clear out the list. */ | 371 | we're heading for memory full, so offer to clear out the list. */ |
| 371 | if (size_so_far > undo_outer_limit | 372 | if (INTEGERP (Vundo_outer_limit) |
| 373 | && size_so_far > XINT (Vundo_outer_limit) | ||
| 372 | && !NILP (Vundo_outer_limit_function)) | 374 | && !NILP (Vundo_outer_limit_function)) |
| 373 | { | 375 | { |
| 374 | Lisp_Object temp = last_undo_buffer; | 376 | Lisp_Object temp = last_undo_buffer; |
| @@ -622,7 +624,7 @@ The size is counted as the number of bytes occupied, | |||
| 622 | which includes both saved text and other data. */); | 624 | which includes both saved text and other data. */); |
| 623 | undo_strong_limit = 30000; | 625 | undo_strong_limit = 30000; |
| 624 | 626 | ||
| 625 | DEFVAR_INT ("undo-outer-limit", &undo_outer_limit, | 627 | DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, |
| 626 | doc: /* Outer limit on size of undo information for one command. | 628 | doc: /* Outer limit on size of undo information for one command. |
| 627 | At garbage collection time, if the current command has produced | 629 | At garbage collection time, if the current command has produced |
| 628 | more than this much undo information, it asks you whether to delete | 630 | more than this much undo information, it asks you whether to delete |
| @@ -635,7 +637,7 @@ In fact, this calls the function which is the value of | |||
| 635 | `undo-outer-limit-function' with one argument, the size. | 637 | `undo-outer-limit-function' with one argument, the size. |
| 636 | The text above describes the behavior of the function | 638 | The text above describes the behavior of the function |
| 637 | that variable usually specifies. */); | 639 | that variable usually specifies. */); |
| 638 | undo_outer_limit = 300000; | 640 | Vundo_outer_limit = make_number (300000); |
| 639 | 641 | ||
| 640 | DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, | 642 | DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, |
| 641 | doc: /* Function to call when an undo list exceeds `undo-outer-limit'. | 643 | doc: /* Function to call when an undo list exceeds `undo-outer-limit'. |