diff options
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/undo.c b/src/undo.c index cd3ad97349b..933982ec30c 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* undo handling for GNU Emacs. | 1 | /* undo handling for GNU Emacs. |
| 2 | Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004, | 2 | Copyright (C) 1990, 1993-1994, 2000-2011 Free Software Foundation, Inc. |
| 3 | 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 4 | 3 | ||
| 5 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 6 | 5 | ||
| @@ -25,17 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include "commands.h" | 24 | #include "commands.h" |
| 26 | #include "window.h" | 25 | #include "window.h" |
| 27 | 26 | ||
| 28 | /* Limits controlling how much undo information to keep. */ | ||
| 29 | |||
| 30 | EMACS_INT undo_limit; | ||
| 31 | EMACS_INT undo_strong_limit; | ||
| 32 | |||
| 33 | Lisp_Object Vundo_outer_limit; | ||
| 34 | |||
| 35 | /* Function to call when undo_outer_limit is exceeded. */ | ||
| 36 | |||
| 37 | Lisp_Object Vundo_outer_limit_function; | ||
| 38 | |||
| 39 | /* Last buffer for which undo information was recorded. */ | 27 | /* Last buffer for which undo information was recorded. */ |
| 40 | /* BEWARE: This is not traced by the GC, so never dereference it! */ | 28 | /* BEWARE: This is not traced by the GC, so never dereference it! */ |
| 41 | struct buffer *last_undo_buffer; | 29 | struct buffer *last_undo_buffer; |
| @@ -57,10 +45,6 @@ Lisp_Object Qapply; | |||
| 57 | an undo-boundary. */ | 45 | an undo-boundary. */ |
| 58 | Lisp_Object pending_boundary; | 46 | Lisp_Object pending_boundary; |
| 59 | 47 | ||
| 60 | /* Nonzero means do not record point in record_point. */ | ||
| 61 | |||
| 62 | int undo_inhibit_record_point; | ||
| 63 | |||
| 64 | /* Record point as it was at beginning of this command (if necessary) | 48 | /* Record point as it was at beginning of this command (if necessary) |
| 65 | and prepare the undo info for recording a change. | 49 | and prepare the undo info for recording a change. |
| 66 | PT is the position of point that will naturally occur as a result of the | 50 | PT is the position of point that will naturally occur as a result of the |
| @@ -673,7 +657,7 @@ syms_of_undo (void) | |||
| 673 | defsubr (&Sprimitive_undo); | 657 | defsubr (&Sprimitive_undo); |
| 674 | defsubr (&Sundo_boundary); | 658 | defsubr (&Sundo_boundary); |
| 675 | 659 | ||
| 676 | DEFVAR_INT ("undo-limit", &undo_limit, | 660 | DEFVAR_INT ("undo-limit", undo_limit, |
| 677 | doc: /* Keep no more undo information once it exceeds this size. | 661 | doc: /* Keep no more undo information once it exceeds this size. |
| 678 | This limit is applied when garbage collection happens. | 662 | This limit is applied when garbage collection happens. |
| 679 | When a previous command increases the total undo list size past this | 663 | When a previous command increases the total undo list size past this |
| @@ -683,7 +667,7 @@ The size is counted as the number of bytes occupied, | |||
| 683 | which includes both saved text and other data. */); | 667 | which includes both saved text and other data. */); |
| 684 | undo_limit = 80000; | 668 | undo_limit = 80000; |
| 685 | 669 | ||
| 686 | DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, | 670 | DEFVAR_INT ("undo-strong-limit", undo_strong_limit, |
| 687 | doc: /* Don't keep more than this much size of undo information. | 671 | doc: /* Don't keep more than this much size of undo information. |
| 688 | This limit is applied when garbage collection happens. | 672 | This limit is applied when garbage collection happens. |
| 689 | When a previous command increases the total undo list size past this | 673 | When a previous command increases the total undo list size past this |
| @@ -695,7 +679,7 @@ The size is counted as the number of bytes occupied, | |||
| 695 | which includes both saved text and other data. */); | 679 | which includes both saved text and other data. */); |
| 696 | undo_strong_limit = 120000; | 680 | undo_strong_limit = 120000; |
| 697 | 681 | ||
| 698 | DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, | 682 | DEFVAR_LISP ("undo-outer-limit", Vundo_outer_limit, |
| 699 | doc: /* Outer limit on size of undo information for one command. | 683 | doc: /* Outer limit on size of undo information for one command. |
| 700 | At garbage collection time, if the current command has produced | 684 | At garbage collection time, if the current command has produced |
| 701 | more than this much undo information, it discards the info and displays | 685 | more than this much undo information, it discards the info and displays |
| @@ -712,7 +696,7 @@ The text above describes the behavior of the function | |||
| 712 | that variable usually specifies. */); | 696 | that variable usually specifies. */); |
| 713 | Vundo_outer_limit = make_number (12000000); | 697 | Vundo_outer_limit = make_number (12000000); |
| 714 | 698 | ||
| 715 | DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, | 699 | DEFVAR_LISP ("undo-outer-limit-function", Vundo_outer_limit_function, |
| 716 | doc: /* Function to call when an undo list exceeds `undo-outer-limit'. | 700 | doc: /* Function to call when an undo list exceeds `undo-outer-limit'. |
| 717 | This function is called with one argument, the current undo list size | 701 | This function is called with one argument, the current undo list size |
| 718 | for the most recent command (since the last undo boundary). | 702 | for the most recent command (since the last undo boundary). |
| @@ -723,10 +707,8 @@ Garbage collection is inhibited around the call to this function, | |||
| 723 | so it must make sure not to do a lot of consing. */); | 707 | so it must make sure not to do a lot of consing. */); |
| 724 | Vundo_outer_limit_function = Qnil; | 708 | Vundo_outer_limit_function = Qnil; |
| 725 | 709 | ||
| 726 | DEFVAR_BOOL ("undo-inhibit-record-point", &undo_inhibit_record_point, | 710 | DEFVAR_BOOL ("undo-inhibit-record-point", undo_inhibit_record_point, |
| 727 | doc: /* Non-nil means do not record `point' in `buffer-undo-list'. */); | 711 | doc: /* Non-nil means do not record `point' in `buffer-undo-list'. */); |
| 728 | undo_inhibit_record_point = 0; | 712 | undo_inhibit_record_point = 0; |
| 729 | } | 713 | } |
| 730 | 714 | ||
| 731 | /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a | ||
| 732 | (do not change this comment) */ | ||