1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 07:01:11 -08:00
emacs/test/automated
Barry O'Reilly 37ea8275f7 Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Only process marker adjustments
validated against their corresponding (TEXT . POS).  Issue warning
for lone marker adjustments in undo history.  (Bug#16818)
(undo-make-selective-list): Add marker adjustments to selective
undo list based on whether their corresponding (TEXT . POS) is in
the region.  Remove variable adjusted-markers, which was unused
and only non nil during undo-make-selective-list.
(undo-elt-in-region): Return nil when passed a marker adjustment
and explain in function doc.

Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
(Bug#16818)
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments.  Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete.  Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
adjustments.
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(adjust_after_replace):
(replace_range): Pass value for new record_markers arg to
delete_record.
* undo.c (record_marker_adjustment): Renamed to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
record_marker_adjustments.
(record_change): Pass value for new record_markers arg to
delete_record.
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.

* undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.
(undo-test-marker-adjustment-moved):
(undo-test-region-mark-adjustment): New tests to demonstrate
bug#16818, which fail without the fix.

* markers.texi (Moving Marker Positions): The 2014-03-02 doc
change mentioning undo's inability to handle relocated markers no
longer applies.  See bug#16818.
* text.texi (Undo): Expand documentation of (TEXT . POS) and
(MARKER . ADJUSTMENT) undo elements.
2014-03-24 22:47:39 -04:00
..
data Fix bug#16873 2014-03-22 10:43:30 +02:00
flymake/warnpred Extend flymake's warning predicate to be a function. Test suite for flymake. 2013-06-21 10:36:13 -04:00
add-log-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
advice-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
bytecomp-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
cl-lib.el Fix keyword argument parsing. Please bootstrap. 2014-03-22 23:00:18 -07:00
comint-testsuite.el * automated/comint-testsuite.el 2014-01-21 09:32:06 +01:00
compile-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
completion-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
core-elisp-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
data-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
dbus-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
decoder-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
eieio-test-methodinvoke.el ChangeLog and Author: header comment fixes 2014-01-17 20:51:38 -05:00
eieio-test-persist.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
eieio-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
electric-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
ert-tests.el Bug#13064 2014-01-13 11:53:36 +01:00
ert-x-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
eshell.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
f90.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
file-notify-tests.el * automated/file-notify-tests.el (file-notify--wait-for-events): 2014-02-04 12:41:20 +01:00
files.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
flymake-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
font-parse-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
gnus-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
icalendar-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
imenu-test.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
info-xref.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
inotify-test.el Fix Bug#13662. 2014-01-17 12:50:15 +01:00
lexbind-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Makefile.in Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
man-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
mule-util.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
newsticker-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
occur-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
package-test.el Fix test failure in non-graphical mode 2014-03-23 05:26:13 +02:00
package-x-test.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
process-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
python-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
reftex-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
regexp-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
ruby-mode-tests.el Implement user option ruby-align-chained-calls 2014-01-31 19:13:49 +02:00
subword-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
thingatpt.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
timer-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
tramp-tests.el * automated/tramp-tests.el (tramp-copy-size-limit): Declare. 2014-03-07 15:11:37 +01:00
undo-tests.el Undo in region after markers in undo history relocated 2014-03-24 22:47:39 -04:00
url-future-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
url-util-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
vc-bzr.el Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
xml-parse-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
zlib-tests.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00