This adds an option to allow callers to specify that computing
the children of the hierarchy should be delayed to when the
user calls for them, by utilizing the tree-widget :expander
property.
* lisp/emacs-lisp/hierarchy.el (hierarchy-add-tree)
(hierarchy-add-trees): Add parameter 'delay-children-p'.
* lisp/emacs-lisp/hierarchy.el
(hierarchy--create-delayed-tree-widget): Add function.
* lisp/emacs-lisp/hierarchy.el (hierarchy-convert-to-tree-widget):
Utilize ':expander' if delaying children. (Bug#55900)
* test/lisp/emacs-lisp/hierarchy-tests.el: Add tests for
delayed-children functionality.
* lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs):
New variable.
(rmail-summary-apply-filters-consecutively): New user option.
(rmail-summary-fill-displayed-messages, rmail-summary-negate): New
functions.
(rmail-summary-by-labels, rmail-summary-by-recipients)
(rmail-summary-by-regexp, rmail-summary-by-topic)
(rmail-summary-by-senders): Obey
'rmail-summary-apply-filters-consecutively'.
KEEP-FILTERING, to narrow the existing filtered summary.
* etc/NEWS: Announce the change.
* lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs):
New variable.
(rmail-summary-fill-displayed-messages, rmail-summary-negate): New
functions.
(rmail-summary-by-labels, rmail-summary-by-recipients)
(rmail-summary-by-regexp, rmail-summary-by-topic)
(rmail-summary-by-senders): Accept an additional argument
KEEP-FILTERING, to narrow the existing filtered summary.
* etc/NEWS: Announce the change.
* lisp/international/textsec.el (textsec-restriction-level):
* test/lisp/international/textsec-tests.el (test-restriction-level):
Fix typo in symbol name `moderately-restrictive'.
The old arbitrary limit led to errors thrown whilst fontifying large areas of
syntactic whitespace containing "#undef", as in src/comp.c.
* lisp/progmodes/cc-engine.el (c-find-decl-spots): Replace the limit argument
to two calls of c-forward-syntactic-ws by the parameter `cfd-limit'.
* src/indent.c (scan_for_column, compute_motion): Don't miss
compositions when the position to check for composition happens to
be inside invisible text. (Bug#58791)
* src/xdisp.c (unwind_format_mode_line): Check that
old_top_frame is live before selecting it. It could have been
deleted, which leads to signals when the post-command-hook
installed by xterm-set-window-title runs upon the last frame of
a terminal being deleted.
(gui_consider_frame_title): Rearrange code to be more
understandable.
The type of the defcustom completion-category-overrides must be able
to accommodate dynamic changes to completion-styles-alist, because
some packages (eglot) make their own additions.
This change fixes a failure in test-custom-opts. See discussion at:
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01969.html
* lisp/minibuffer.el (completion--styles-type):
Add an "Other" case that accepts any symbol which is then validated
dynamically against completion-styles-alist.
Interpreted closures currently just grab a reference to the complete
lexical environment, so (lambda (x) (+ x y)) can end up looking like
(closure ((foo ...) (y 7) (bar ...) ...)
(x) (+ x y))
where the foo/bar/... bindings are not only useless but can prevent
the GC from collecting that memory (i.e. it's a representation that is
not "safe for space") and it can also make that closure "unwritable"
(or more specifically, it can cause the closure's print
representation to be u`read`able).
Compiled closures don't suffer from this problem because `cconv.el`
actually looks at the code and only stores in the compiled closure
those variables which are actually used.
So, we fix this discrepancy by letting the existing code in `cconv.el` tell
`Ffunction` which variables are actually used by the body of the
function such that it can filter out the irrelevant elements and
return a closure of the form:
(closure ((y 7)) (x) (+ x y))
* lisp/loadup.el: Preload `cconv` and set
`internal-filter-closure-env-function` once we have a usable `cconv-fv`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Adjust to new
calling convention of `cconv-closure-convert`.
(byte-compile-not-lexical-var-p): Delete function, moved to `cconv.el`.
(byte-compile-bind): Use `cconv--not-lexical-var-p`.
* lisp/emacs-lisp/cconv.el (cconv--dynbound-variables): New var.
(cconv-closure-convert): New arg `dynbound-vars`
(cconv--warn-unused-msg): Remove special case for `ignored`,
so we don't get confused when a function uses an argument called
`ignored`, e.g. holding a list of things that it should ignore.
(cconv--not-lexical-var-p): New function, moved from `bytecomp.el`.
Don't special case keywords and `nil` and `t` since they are already
`special-variable-p`.
(cconv--analyze-function): Use `cconv--not-lexical-var-p`.
(cconv--dynbindings): New dynbound var.
(cconv-analyze-form): Use `cconv--not-lexical-var-p`.
Remember in `cconv--dynbindings` the vars for which we used
dynamic scoping.
(cconv-analyze-form): Use `cconv--dynbound-variables` rather than
`byte-compile-bound-variables`.
(cconv-fv): New function.
* src/eval.c (Fsetq, eval_sub): Remove optimization designed when
`lexical-binding == nil` was the common case.
(Ffunction): Use `internal-filter-closure-env-function` when available.
(eval_sub, Ffuncall): Improve error info for `excessive_lisp_nesting`.
(internal-filter-closure-env-function): New defvar.
* lisp/progmodes/eglot.el (eglot-autoreconnect): Allow for 'nil'.
(eglot-connect-timeout): Allow for 'nil' and add descriptions.
(eglot-sync-connect): Split boolean into 'nil' and 't' and add descriptions.
(eglot-confirm-server-initiated-edits): Change 'symbol' type to 'const'.
This fixes bug #58641.
Also, set c-reference-face-name to font-lock-constant face in preference to
c-label-face-name.
* lisp/progmodes/cc-fonts.el (c-preprocessor-face-name, c-label-face-name)
(c-constant-face-name, c-reference-face-name): Test variables with the same
name as font-lock faces are bound before accessing their values.
(c-reference-face-name): Use font-lock-constant face in preference to
c-label-face-name.
This removes the HAVE_PDUMPER || HAVE_UNEXEC condition
of gflags.will_dump_, which gets in the way when Emacs
is built without any dumping method. (Bug#58708)
Also, optimize Fx_translate_coordinates to avoid excessive calls
to _XReply.
* lisp/x-dnd.el (x-dnd-get-drop-rectangle): Return empty drop
rectangle if posn-area.
* src/xfns.c (Fx_translate_coordinates): Accept arg
`require_child'. If not set, allow optimizations based on
cached position data.
* src/xselect.c (x_handle_dnd_message): Use
x_translate_coordinates.
* src/xterm.c (x_translate_coordinates): Export function.
(x_handle_translate_coordinates): New function.
(handle_one_xevent): Fix coding style.
* src/xterm.h: Update prototypes.
At the time of writing, this exists only in the unmerged tree-sitter
branch. It is not harmful to include, however.
* lisp/progmodes/eglot.el (eglot-server-programs): Add new major mode
to be used with the typescript-language-server. (Bug#58769)
js-json-mode derives from js-mode, so this reordering is necessary to
prevent js-mode's eglot server from starting if a user has something
like this in their config:
(add-to-hook 'js-json-mode #'eglot-ensure)
(add-to-hook 'js-mode #'eglot-ensure)
* lisp/progmodes/eglot.el (eglot-server-programs): Move the
json-language-server info before the entry for js-mode, and add on
js-json-mode. (Bug#58769)