Commit 9c0fa117 authored by Eli Zaretskii's avatar Eli Zaretskii

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 a35a1f6a.

* 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
* 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.
parent 273d7b3e
Pipeline #1111 failed with stage
in 49 minutes and 4 seconds