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 6807d3a 5/


From: Phillip Lord
Subject: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change 6807d3a 5/5: undo-first-undoable-change-hook now called.
Date: Tue, 15 Sep 2015 15:21:31 +0000

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

    undo-first-undoable-change-hook now called.
---
 src/undo.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/undo.c b/src/undo.c
index 3d79140..5364af6 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -55,6 +55,11 @@ record_point (ptrdiff_t pt)
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
+  if(NILP (Vundo_buffer_undoably_changed)){
+    Fset (Qundo_buffer_undoably_changed,Qt);
+    safe_run_hooks (Qundo_first_undoable_change_hook);
+  }
+
   at_boundary = ! CONSP (BVAR (current_buffer, undo_list))
                 || NILP (XCAR (BVAR (current_buffer, undo_list)));
 
@@ -125,6 +130,12 @@ record_marker_adjustments (ptrdiff_t from, ptrdiff_t to)
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
+
+  if(NILP (Vundo_buffer_undoably_changed)){
+    Fset (Qundo_buffer_undoably_changed,Qt);
+    safe_run_hooks (Qundo_first_undoable_change_hook);
+  }
+
   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
     {
       charpos = m->charpos;
@@ -237,6 +248,11 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
+  if(NILP (Vundo_buffer_undoably_changed)){
+    Fset (Qundo_buffer_undoably_changed,Qt);
+    safe_run_hooks (Qundo_first_undoable_change_hook);
+  }
+
   /* Switch temporarily to the buffer that was changed.  */
   current_buffer = buf;
 



reply via email to

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