[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Undo-limit default
From: |
Chong Yidong |
Subject: |
Re: Undo-limit default |
Date: |
Sun, 07 Dec 2008 10:07:18 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> Could you check whether stripping out the font-lock information has any
> bad effects? The following untested patch should implement this
> behavior:
Whoops, too untested :-P
Try this patch instead:
*** trunk/src/undo.c.~1.86.~ 2008-09-24 23:23:04.000000000 -0400
--- trunk/src/undo.c 2008-12-07 10:05:52.000000000 -0500
***************
*** 60,65 ****
--- 60,69 ----
int undo_inhibit_record_point;
+ /* Text properties not recorded in the undo list. */
+
+ Lisp_Object Vundo_discarded_text_properties;
+
/* 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
***************
*** 174,179 ****
--- 178,187 ----
if (EQ (current_buffer->undo_list, Qt))
return;
+ Fremove_text_properties (make_number (0), make_number (SCHARS (string)),
+ Vundo_discarded_text_properties,
+ string);
+
if (PT == beg + SCHARS (string))
{
XSETINT (sbeg, -beg);
***************
*** 734,739 ****
--- 742,757 ----
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;
+
+ DEFVAR_LISP ("undo-discarded-text-properties",
&Vundo_discarded_text_properties,
+ doc: /* Text properties not recorded in the undo list.
+ This should be a property list whose property names specify the
+ properties to remove. (The values stored in the property list are
+ ignored.) */);
+ Vundo_discarded_text_properties
+ = list4 (intern ("fontified"), Qnil,
+ intern ("jit-lock-defer-multiline"), Qnil);
+ staticpro (&Vundo_discarded_text_properties);
}
/* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a
- Re: Undo-limit default, (continued)
- Re: Undo-limit default, Lennart Borgman, 2008/12/06
- Re: Undo-limit default, Michael Ekstrand, 2008/12/06
- Re: Undo-limit default, Dan Nicolaescu, 2008/12/07
- Re: Undo-limit default, martin rudalics, 2008/12/07
- Re: Undo-limit default, Stefan Monnier, 2008/12/07
- Re: Undo-limit default, Richard M Stallman, 2008/12/08
- Re: Undo-limit default, Stefan Monnier, 2008/12/08