all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Lennart Borgman <lennart.borgman@gmail.com>, emacs-devel@gnu.org
Subject: Re: Undo-limit default
Date: Sun, 07 Dec 2008 10:07:18 -0500	[thread overview]
Message-ID: <87bpvo58ih.fsf@cyd.mit.edu> (raw)
In-Reply-To: <87vdtwf43c.fsf@cyd.mit.edu> (Chong Yidong's message of "Sun, 07 Dec 2008 09:32:39 -0500")

Chong Yidong <cyd@stupidchicken.com> 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




  parent reply	other threads:[~2008-12-07 15:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07  1:35 Undo-limit default Chong Yidong
2008-12-07  2:06 ` Michael Ekstrand
2008-12-07  2:12 ` Lennart Borgman
2008-12-07  8:15 ` Dan Nicolaescu
2008-12-07 13:02 ` martin rudalics
2008-12-07 13:10   ` Lennart Borgman
2008-12-07 13:20     ` martin rudalics
2008-12-07 14:32       ` Chong Yidong
2008-12-07 14:53         ` Chong Yidong
2008-12-08 11:48           ` Richard M Stallman
2008-12-07 14:59         ` martin rudalics
2008-12-07 15:07         ` Chong Yidong [this message]
2008-12-07 17:04           ` martin rudalics
2008-12-07 20:59         ` Stefan Monnier
2008-12-08 18:26           ` Richard M Stallman
2008-12-08 19:59             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bpvo58ih.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.