]> git.eshelyaron.com Git - emacs.git/commit
Don't run buffer-related hooks in " *code conversion work*" buffers
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 Mar 2019 09:01:58 +0000 (12:01 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 Mar 2019 09:01:58 +0000 (12:01 +0300)
commit9c0fa1172fd987a8f23b115145270383a11c12fc
tree251e79c78ada59224c8a9743e4b13dd9c86df6e5
parent273d7b3ee0f4841c7f3f112aeb2e29db51a642e7
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.
src/buffer.c
src/buffer.h
src/coding.c
src/coding.h
src/pdumper.c