]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 9 Apr 2014 01:48:07 +0000 (21:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 9 Apr 2014 01:48:07 +0000 (21:48 -0400)
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.

etc/NEWS
lisp/ChangeLog
lisp/subr.el
src/ChangeLog
src/insdel.c

index f78199b97d78fec2019b151f1861a62f06165dbc..706d25925e447aa7bc2c2bb00ac73fbb0c3f2266 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -71,6 +71,9 @@ protocols as well as for "telnet" and "ftp" are passed to Tramp.
 \f
 * Incompatible Lisp Changes in Emacs 24.5
 
+** inhibit-modification-hooks now also inhibits lock-file checks as well as
+active region handling.
+
 \f
 * Lisp Changes in Emacs 24.5
 
index 6161051faf39588c60aa33ac731f23ed6bb13357..26bcb7fd668090181f90fabc4773d260b82da2d0 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 5de69d92e338f6028bbb76ef276094909e08ac50..6cfece1045f9109f869c5d3431ac497b2f24d984 100644 (file)
@@ -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)
index ea32a480a6c112655d27e9fe0087c8fee920bd03..531d1f646cb9faa5e8509d813731de737de93c9b 100644 (file)
@@ -1,3 +1,10 @@
+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
index 9f9fcbd041f32977573efc9087bbf91a2f4da1fe..15cdaf6f910bb6724f79ec13902cacfc5c121675 100644 (file)
@@ -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))
     {