1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
emacs/lisp/mh-e
Basil L. Contovounesios 1a0a11f7d2 Inhibit buffer hooks in temporary buffers
Give get-buffer-create an optional argument to inhibit buffer hooks
in internal or temporary buffers for efficiency (bug#34765).

* etc/NEWS: Announce new parameter of get-buffer-create and
generate-new-buffer, and that with-temp-buffer and with-temp-file
now inhibit buffer hooks.

* doc/lispref/buffers.texi (Buffer Names): Fix typo.
(Creating Buffers): Document new parameter of get-buffer-create and
generate-new-buffer.
(Buffer List, Killing Buffers): Document when buffer hooks are
inhibited.
(Current Buffer):
* doc/lispref/files.texi (Writing to Files): Document that
with-temp-buffer and with-temp-file inhibit buffer hooks.
* doc/lispref/internals.texi (Buffer Internals): Document
inhibit_buffer_hooks flag.  Remove stale comment.
* doc/misc/gnus-faq.texi (FAQ 5-8):
* lisp/simple.el (shell-command-on-region): Fix indentation.

* lisp/files.el (kill-buffer-hook): Document when hook is inhibited.
(create-file-buffer):
* lisp/gnus/gnus-uu.el (gnus-uu-unshar-article):
* lisp/international/mule.el (load-with-code-conversion):
* lisp/mh-e/mh-xface.el (mh-x-image-url-fetch-image):
* lisp/net/imap.el (imap-open):
* lisp/net/mailcap.el (mailcap-maybe-eval):
* lisp/progmodes/flymake-proc.el
(flymake-proc--read-file-to-temp-buffer)
(flymake-proc--copy-buffer-to-temp-buffer): Simplify.

* lisp/subr.el (generate-new-buffer): Forward new optional argument
to inhibit buffer hooks to get-buffer-create.
(with-temp-file, with-temp-buffer, with-output-to-string):
* lisp/json.el (json-encode-string): Inhibit buffer hooks in buffer
used.

* src/buffer.c (run_buffer_list_update_hook): New helper function.
(Fget_buffer_create): Use it.  Add optional argument to set
inhibit_buffer_hooks flag instead of comparing the buffer name to
Vcode_conversion_workbuf_name.  All callers changed.
(Fmake_indirect_buffer, Frename_buffer, Fbury_buffer_internal)
(record_buffer): Use run_buffer_list_update_hook.
(Fkill_buffer): Document when buffer hooks are inhibited.  Use
run_buffer_list_update_hook.
(init_buffer_once): Inhibit buffer hooks in Vprin1_to_string_buffer.
(Vkill_buffer_query_functions, Vbuffer_list_update_hook): Document
when hooks are inhibited.
* src/buffer.h (struct buffer): Update inhibit_buffer_hooks
commentary.
* src/coding.h (Vcode_conversion_workbuf_name):
* src/coding.c (Vcode_conversion_workbuf_name): Make static again
since it is no longer needed in src/buffer.c.
(code_conversion_restore, code_conversion_save, syms_of_coding):
Prefer boolean over integer constants.
* src/fileio.c (Finsert_file_contents): Inhibit buffer hooks in
" *code-converting-work*" buffer.
* src/window.c (Fselect_window): Fix grammar.  Mention
window-selection-change-functions alongside buffer-list-update-hook.

* test/src/buffer-tests.el: Fix requires.
(buffer-tests-inhibit-buffer-hooks): New test.
2020-12-20 17:32:24 +00:00
..
ChangeLog.1 ; Fix trivial typos in ChangeLogs 2020-10-03 12:53:51 +02:00
ChangeLog.2
mh-acros.el
mh-alias.el Remove redundant 'function's around lambdas in mh/*.el 2020-11-17 18:36:59 +01:00
mh-buffers.el
mh-comp.el Remove redundant 'function's around lambdas in mh/*.el 2020-11-17 18:36:59 +01:00
mh-compat.el ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
mh-e.el Shorten over-wide docstrings in defcustoms 2020-12-19 18:21:06 +01:00
mh-folder.el Make XEmacs compat aliases easy-menu-{add,remove} obsolete 2020-11-24 18:06:05 +01:00
mh-funcs.el
mh-gnus.el
mh-identity.el Make XEmacs compat aliases easy-menu-{add,remove} obsolete 2020-11-24 18:06:05 +01:00
mh-inc.el
mh-junk.el ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
mh-letter.el Make XEmacs compat aliases easy-menu-{add,remove} obsolete 2020-11-24 18:06:05 +01:00
mh-limit.el
mh-mime.el
mh-print.el
mh-scan.el
mh-search.el Make XEmacs compat aliases easy-menu-{add,remove} obsolete 2020-11-24 18:06:05 +01:00
mh-seq.el Don't quote lambdas in several places 2020-11-12 22:24:58 +01:00
mh-show.el Make XEmacs compat aliases easy-menu-{add,remove} obsolete 2020-11-24 18:06:05 +01:00
mh-speed.el
mh-thread.el ; Prefer https to http in more URLs 2020-10-24 20:23:27 +02:00
mh-tool-bar.el
mh-utils.el Remove redundant 'function's around lambdas in mh/*.el 2020-11-17 18:36:59 +01:00
mh-xface.el Inhibit buffer hooks in temporary buffers 2020-12-20 17:32:24 +00:00