Commit 6bc76cee authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* src/insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and

region handling (and don't call signal_before_change) if
inhibit_modification_hooks is set.
(signal_before_change): Don't check inhibit_modification_hooks any more.
* lisp/subr.el (with-silent-modifications): Don't bind deactivate-mark,
buffer-file-name, and buffer-file-truename any more.
parent 1e1a3a32
......@@ -71,6 +71,9 @@ protocols as well as for "telnet" and "ftp" are passed to Tramp.
* Incompatible Lisp Changes in Emacs 24.5
** inhibit-modification-hooks now also inhibits lock-file checks as well as
active region handling.
* Lisp Changes in Emacs 24.5
......
2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (with-silent-modifications): Don't bind deactivate-mark,
buffer-file-name, and buffer-file-truename any more.
2014-04-08 Leo Liu <sdl.web@gmail.com>
Use lexical-binding and require cl-lib.
......
......@@ -3174,12 +3174,7 @@ not really affect the buffer's content."
`(let* ((,modified (buffer-modified-p))
(buffer-undo-list t)
(inhibit-read-only t)
(inhibit-modification-hooks t)
deactivate-mark
;; Avoid setting and removing file locks and checking
;; buffer's uptodate-ness w.r.t the underlying file.
buffer-file-name
buffer-file-truename)
(inhibit-modification-hooks t))
(unwind-protect
(progn
,@body)
......
2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
* insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
region handling (and don't call signal_before_change) if
inhibit_modification_hooks is set.
(signal_before_change): Don't check inhibit_modification_hooks any more.
2014-04-08 Daniel Colascione <dancol@dancol.org>
* alloc.c (sweep_symbols, mark_object): Assert that symbol
......
......@@ -1804,6 +1804,9 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end,
else
base_buffer = current_buffer;
if (inhibit_modification_hooks)
return;
if (!NILP (BVAR (base_buffer, file_truename))
/* Make binding buffer-file-name to nil effective. */
&& !NILP (BVAR (base_buffer, filename))
......@@ -1813,7 +1816,6 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end,
/* If `select-active-regions' is non-nil, save the region text. */
/* FIXME: Move this to Elisp (via before-change-functions). */
if (!NILP (BVAR (current_buffer, mark_active))
&& !inhibit_modification_hooks
&& XMARKER (BVAR (current_buffer, mark))->buffer
&& NILP (Vsaved_region_selection)
&& (EQ (Vselect_active_regions, Qonly)
......@@ -1924,9 +1926,6 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
ptrdiff_t count = SPECPDL_INDEX ();
struct rvoe_arg rvoe_arg;
if (inhibit_modification_hooks)
return;
start = make_number (start_int);
end = make_number (end_int);
preserve_marker = Qnil;
......@@ -1937,7 +1936,7 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
specbind (Qinhibit_modification_hooks, Qt);
/* If buffer is unmodified, run a special hook for that case. The
check for Vfirst_change_hook is just a minor optimization. */
check for Vfirst_change_hook is just a minor optimization. */
if (SAVE_MODIFF >= MODIFF
&& !NILP (Vfirst_change_hook))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment