diff options
| author | Stefan Monnier | 2014-04-08 21:48:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-04-08 21:48:07 -0400 |
| commit | 6bc76cee212aab0a2c02f8c28213fc842cc7880f (patch) | |
| tree | 8787b3e73ae2eeaa91f2ef53e5782a2ebe65362d /src | |
| parent | 1e1a3a324856cf7480030b6dbd7f4476c5130ad9 (diff) | |
| download | emacs-6bc76cee212aab0a2c02f8c28213fc842cc7880f.tar.gz emacs-6bc76cee212aab0a2c02f8c28213fc842cc7880f.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/insdel.c | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ea32a480a6c..531d1f646cb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and | ||
| 4 | region handling (and don't call signal_before_change) if | ||
| 5 | inhibit_modification_hooks is set. | ||
| 6 | (signal_before_change): Don't check inhibit_modification_hooks any more. | ||
| 7 | |||
| 1 | 2014-04-08 Daniel Colascione <dancol@dancol.org> | 8 | 2014-04-08 Daniel Colascione <dancol@dancol.org> |
| 2 | 9 | ||
| 3 | * alloc.c (sweep_symbols, mark_object): Assert that symbol | 10 | * alloc.c (sweep_symbols, mark_object): Assert that symbol |
diff --git a/src/insdel.c b/src/insdel.c index 9f9fcbd041f..15cdaf6f910 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1804,6 +1804,9 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, | |||
| 1804 | else | 1804 | else |
| 1805 | base_buffer = current_buffer; | 1805 | base_buffer = current_buffer; |
| 1806 | 1806 | ||
| 1807 | if (inhibit_modification_hooks) | ||
| 1808 | return; | ||
| 1809 | |||
| 1807 | if (!NILP (BVAR (base_buffer, file_truename)) | 1810 | if (!NILP (BVAR (base_buffer, file_truename)) |
| 1808 | /* Make binding buffer-file-name to nil effective. */ | 1811 | /* Make binding buffer-file-name to nil effective. */ |
| 1809 | && !NILP (BVAR (base_buffer, filename)) | 1812 | && !NILP (BVAR (base_buffer, filename)) |
| @@ -1813,7 +1816,6 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, | |||
| 1813 | /* If `select-active-regions' is non-nil, save the region text. */ | 1816 | /* If `select-active-regions' is non-nil, save the region text. */ |
| 1814 | /* FIXME: Move this to Elisp (via before-change-functions). */ | 1817 | /* FIXME: Move this to Elisp (via before-change-functions). */ |
| 1815 | if (!NILP (BVAR (current_buffer, mark_active)) | 1818 | if (!NILP (BVAR (current_buffer, mark_active)) |
| 1816 | && !inhibit_modification_hooks | ||
| 1817 | && XMARKER (BVAR (current_buffer, mark))->buffer | 1819 | && XMARKER (BVAR (current_buffer, mark))->buffer |
| 1818 | && NILP (Vsaved_region_selection) | 1820 | && NILP (Vsaved_region_selection) |
| 1819 | && (EQ (Vselect_active_regions, Qonly) | 1821 | && (EQ (Vselect_active_regions, Qonly) |
| @@ -1924,9 +1926,6 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int, | |||
| 1924 | ptrdiff_t count = SPECPDL_INDEX (); | 1926 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1925 | struct rvoe_arg rvoe_arg; | 1927 | struct rvoe_arg rvoe_arg; |
| 1926 | 1928 | ||
| 1927 | if (inhibit_modification_hooks) | ||
| 1928 | return; | ||
| 1929 | |||
| 1930 | start = make_number (start_int); | 1929 | start = make_number (start_int); |
| 1931 | end = make_number (end_int); | 1930 | end = make_number (end_int); |
| 1932 | preserve_marker = Qnil; | 1931 | preserve_marker = Qnil; |
| @@ -1937,7 +1936,7 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int, | |||
| 1937 | specbind (Qinhibit_modification_hooks, Qt); | 1936 | specbind (Qinhibit_modification_hooks, Qt); |
| 1938 | 1937 | ||
| 1939 | /* If buffer is unmodified, run a special hook for that case. The | 1938 | /* If buffer is unmodified, run a special hook for that case. The |
| 1940 | check for Vfirst_change_hook is just a minor optimization. */ | 1939 | check for Vfirst_change_hook is just a minor optimization. */ |
| 1941 | if (SAVE_MODIFF >= MODIFF | 1940 | if (SAVE_MODIFF >= MODIFF |
| 1942 | && !NILP (Vfirst_change_hook)) | 1941 | && !NILP (Vfirst_change_hook)) |
| 1943 | { | 1942 | { |