diff options
| author | Eli Zaretskii | 2019-03-30 12:01:58 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-03-30 12:01:58 +0300 |
| commit | 9c0fa1172fd987a8f23b115145270383a11c12fc (patch) | |
| tree | 251e79c78ada59224c8a9743e4b13dd9c86df6e5 /src/buffer.h | |
| parent | 273d7b3ee0f4841c7f3f112aeb2e29db51a642e7 (diff) | |
| download | emacs-9c0fa1172fd987a8f23b115145270383a11c12fc.tar.gz emacs-9c0fa1172fd987a8f23b115145270383a11c12fc.zip | |
Don't run buffer-related hooks in " *code conversion work*" buffers
Note: portions of this change were mistakenly pushed as part
of an unrelated commit a35a1f6a9.
* src/buffer.c (Fget_buffer_create): Set inhibit_buffer_hooks
non-zero for temporary buffers created by coding.c. Don't run
buffer-list-update-hook for such buffers.
(Frename_buffer, Fkill_buffer, record_buffer)
(Fbury_buffer_internal): Don't run hooks for buffers whose
inhibit_buffer_hooks flag is set.
* src/buffer.h (struct buffer): New member
inhibit_buffer_hooks.
* src/pdumper.c (dump_buffer): Dump the new field. Update the
hash value in HASH_buffer_XXX.
* src/coding.c (make_conversion_work_buffer): Function deleted;
code moved to code_conversion_save.
(code_conversion_save): Insert code from
make_conversion_work_buffer, but arrange for unwind-protecting
the current buffer before switching to the work buffer. This
avoids leaving reused_workbuf_in_use set if user presses C-g
during encoding/decoding.
(Vcode_conversion_workbuf_name): Now external variable.
* src/coding.h (Vcode_conversion_reused_workbuf): Declare.
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index d3528ac50e9..63b162161c6 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -855,6 +855,13 @@ struct buffer | |||
| 855 | /* Non-zero whenever the narrowing is changed in this buffer. */ | 855 | /* Non-zero whenever the narrowing is changed in this buffer. */ |
| 856 | bool_bf clip_changed : 1; | 856 | bool_bf clip_changed : 1; |
| 857 | 857 | ||
| 858 | /* Non-zero for internally used temporary buffers that don't need to | ||
| 859 | run hooks kill-buffer-hook, buffer-list-update-hook, and | ||
| 860 | kill-buffer-query-functions. This is used in coding.c to avoid | ||
| 861 | slowing down en/decoding when there are a lot of these hooks | ||
| 862 | defined. */ | ||
| 863 | bool_bf inhibit_buffer_hooks : 1; | ||
| 864 | |||
| 858 | /* List of overlays that end at or before the current center, | 865 | /* List of overlays that end at or before the current center, |
| 859 | in order of end-position. */ | 866 | in order of end-position. */ |
| 860 | struct Lisp_Overlay *overlays_before; | 867 | struct Lisp_Overlay *overlays_before; |