]> code.delx.au - gnu-emacs/blobdiff - src/undo.c
Move all DEFVAR'd globals into a structure -- threading infrastructure
[gnu-emacs] / src / undo.c
index cd3ad97349b53f3e7ad076a5b84e99f1f5d6eab2..599cd82db9b36fd08fb0430f0237b076cf7b0f72 100644 (file)
@@ -1,6 +1,6 @@
 /* undo handling for GNU Emacs.
    Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+                 2005, 2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -25,17 +25,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "commands.h"
 #include "window.h"
 
-/* Limits controlling how much undo information to keep.  */
-
-EMACS_INT undo_limit;
-EMACS_INT undo_strong_limit;
-
-Lisp_Object Vundo_outer_limit;
-
-/* Function to call when undo_outer_limit is exceeded.  */
-
-Lisp_Object Vundo_outer_limit_function;
-
 /* Last buffer for which undo information was recorded.  */
 /* BEWARE: This is not traced by the GC, so never dereference it!  */
 struct buffer *last_undo_buffer;
@@ -57,10 +46,6 @@ Lisp_Object Qapply;
    an undo-boundary.  */
 Lisp_Object pending_boundary;
 
-/* Nonzero means do not record point in record_point.  */
-
-int undo_inhibit_record_point;
-
 /* Record point as it was at beginning of this command (if necessary)
    and prepare the undo info for recording a change.
    PT is the position of point that will naturally occur as a result of the
@@ -673,7 +658,7 @@ syms_of_undo (void)
   defsubr (&Sprimitive_undo);
   defsubr (&Sundo_boundary);
 
-  DEFVAR_INT ("undo-limit", &undo_limit,
+  DEFVAR_INT ("undo-limit", undo_limit,
              doc: /* Keep no more undo information once it exceeds this size.
 This limit is applied when garbage collection happens.
 When a previous command increases the total undo list size past this
@@ -683,7 +668,7 @@ The size is counted as the number of bytes occupied,
 which includes both saved text and other data.  */);
   undo_limit = 80000;
 
-  DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
+  DEFVAR_INT ("undo-strong-limit", undo_strong_limit,
              doc: /* Don't keep more than this much size of undo information.
 This limit is applied when garbage collection happens.
 When a previous command increases the total undo list size past this
@@ -695,7 +680,7 @@ The size is counted as the number of bytes occupied,
 which includes both saved text and other data.  */);
   undo_strong_limit = 120000;
 
-  DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit,
+  DEFVAR_LISP ("undo-outer-limit", Vundo_outer_limit,
              doc: /* Outer limit on size of undo information for one command.
 At garbage collection time, if the current command has produced
 more than this much undo information, it discards the info and displays
@@ -712,7 +697,7 @@ The text above describes the behavior of the function
 that variable usually specifies.  */);
   Vundo_outer_limit = make_number (12000000);
 
-  DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function,
+  DEFVAR_LISP ("undo-outer-limit-function", Vundo_outer_limit_function,
               doc: /* Function to call when an undo list exceeds `undo-outer-limit'.
 This function is called with one argument, the current undo list size
 for the most recent command (since the last undo boundary).
@@ -723,10 +708,8 @@ Garbage collection is inhibited around the call to this function,
 so it must make sure not to do a lot of consing.  */);
   Vundo_outer_limit_function = Qnil;
 
-  DEFVAR_BOOL ("undo-inhibit-record-point", &undo_inhibit_record_point,
+  DEFVAR_BOOL ("undo-inhibit-record-point", undo_inhibit_record_point,
               doc: /* Non-nil means do not record `point' in `buffer-undo-list'.  */);
   undo_inhibit_record_point = 0;
 }
 
-/* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a
-   (do not change this comment) */