emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change 72be3da 4/


From: Phillip Lord
Subject: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change 72be3da 4/5: undoably-changed variables now in C.
Date: Tue, 15 Sep 2015 15:21:31 +0000

branch: fix/no-undo-boundary-on-secondary-buffer-change
commit 72be3da02f79e86408f63c15f930a5b66e538207
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    undoably-changed variables now in C.
---
 lisp/simple.el |   13 -------------
 src/undo.c     |   20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 27ec66d..c0e1f07 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2215,19 +2215,6 @@ A redo record for ordinary undo maps to the following 
(earlier) undo.")
 (defvar undo-no-redo nil
   "If t, `undo' doesn't go through redo entries.")
 
-(defvar-local undo-buffer-undoably-changed nil
-  "Non-nil means that that the buffer has had a recent undo-able change.
-
-Recent means since the value of this variable was last set explicitly to nil,
-usually as part of the undo machinary.")
-
-(defvar undo-first-undoable-change-hook nil
-  "Normal hook run when a buffer has its first recent undo-able change.
-
-This hook will be run with `current-buffer' as the buffer that
-has changed. Recent means since the value of `undo-buffer-undoably-changed'
-was last set of nil.")
-
 (defvar pending-undo-list nil
   "Within a run of consecutive undo commands, list remaining to be undone.
 If t, we undid all the way to the end of it.")
diff --git a/src/undo.c b/src/undo.c
index 2169d6e..3d79140 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -474,6 +474,8 @@ void
 syms_of_undo (void)
 {
   DEFSYM (Qinhibit_read_only, "inhibit-read-only");
+  DEFSYM (Qundo_first_undoable_change_hook, "undo-first-undoable-change-hook");
+  DEFSYM (Qundo_buffer_undoably_changed, "undo-buffer-undoably-changed");
 
   /* Marker for function call undo list elements.  */
   DEFSYM (Qapply, "apply");
@@ -539,4 +541,22 @@ so it must make sure not to do a lot of consing.  */);
   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 = false;
+
+  DEFVAR_LISP ("undo-first-undoable-change-hook",
+               Vundo_first_undoable_change_hook,
+               doc: /* Normal hook run when a buffer has its first recent 
undo-able change.
+
+This hook will be run with `current-buffer' as the buffer that
+has changed. Recent means since the value of `undo-buffer-undoably-changed'
+was last set of nil. */);
+  Vundo_first_undoable_change_hook = Qnil;
+
+  DEFVAR_LISP ("undo-buffer-undoably-changed",
+               Vundo_buffer_undoably_changed,
+               doc: /* Non-nil means that that the buffer has had a recent 
undo-able change.
+
+Recent means since the value of this variable was last set explicitly to nil,
+usually as part of the undo machinary.*/);
+
+  Fmake_variable_buffer_local (Qundo_buffer_undoably_changed);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]