From: Phillip Lord Date: Thu, 12 Nov 2015 22:01:22 +0000 (+0000) Subject: ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change' X-Git-Tag: emacs-25.0.90~824 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20aa42e8204f8f0139ba3880cb32ddf88acc9bf4;p=emacs.git ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change' Conflicts: src/cmds.c src/keyboard.c --- 20aa42e8204f8f0139ba3880cb32ddf88acc9bf4 diff --cc src/cmds.c index 0afc023e681,6f19a046893..167ebb74302 --- a/src/cmds.c +++ b/src/cmds.c @@@ -262,8 -234,8 +232,8 @@@ because it respects values of `delete-a CHECK_NUMBER (n); - if (abs (XINT (n)) < 2) + if (eabs (XINT (n)) < 2) - remove_excessive_undo_boundaries (); + call0 (Qundo_auto__amalgamate); pos = PT + XINT (n); if (NILP (killflag)) @@@ -305,11 -277,11 +275,11 @@@ At the end, it runs `post-self-insert-h { CHECK_NUMBER (n); - if (XFASTINT (n) < 0) - error ("Negative repetition argument %"pI"d", XFASTINT (n)); + if (XINT (n) < 0) + error ("Negative repetition argument %"pI"d", XINT (n)); if (XFASTINT (n) < 2) - remove_excessive_undo_boundaries (); + call0 (Qundo_auto__amalgamate); /* Barf if the key that invoked this was not a character. */ if (!CHARACTERP (last_command_event)) diff --cc src/keyboard.c index 851207874db,1f08e1f23ed..2449abb7dfc --- a/src/keyboard.c +++ b/src/keyboard.c @@@ -1230,9 -1278,10 +1230,6 @@@ static int read_key_sequence (Lisp_Obje bool, bool, bool, bool); static void adjust_point_for_property (ptrdiff_t, bool); - /* The last boundary auto-added to buffer-undo-list. */ - Lisp_Object last_undo_boundary; -/* FIXME: This is wrong rather than test window-system, we should call - a new set-selection, which will then dispatch to x-set-selection, or - tty-set-selection, or w32-set-selection, ... */ -- Lisp_Object command_loop_1 (void) { diff --cc src/undo.c index e0924b2b989,364b37eeeb4..009ebc0f959 --- a/src/undo.c +++ b/src/undo.c @@@ -21,12 -21,11 +21,8 @@@ along with GNU Emacs. If not, see #include "lisp.h" -#include "character.h" #include "buffer.h" -#include "commands.h" -#include "window.h" - /* Last buffer for which undo information was recorded. */ - /* BEWARE: This is not traced by the GC, so never dereference it! */ - static struct buffer *last_undo_buffer; - /* Position of point last time we inserted a boundary. */ static struct buffer *last_boundary_buffer; static ptrdiff_t last_boundary_position;