* lisp/mh-e/mh-e.el (mh-default-directory, mh-set-default-directory):
New variable (defaults to "~/"), new function to use it.
* lisp/mh-e/mh-folder.el (mh-rmail, mh-nmail): Call
mh-set-default-directory on entry to MH-E (closes: bug#77263).
* doc/lispref/functions.texi (Finding Definitions): Document the
expanded definition-finding extension mechanism.
* etc/NEWS: Briefly describe the new feature.
* lisp/emacs-lisp/cl-generic.el
(cl--generic-find-defgeneric-regexp): Use defconst now that we
no longer have purespace.
(cl--generic-search-method-make-form-matcher): New function.
* lisp/emacs-lisp/find-func.el (find-function-regexp-alist)
(find-function-search-for-symbol): Parse out the new
factory function.
(find-function--search-by-expanding-macros): Try using it when
searching for definitions by expanding macros.
(flymake--indicator-overlay-spec): Receive type instead of prepossessed
indicator.
(flymake--resize-margins): Update reference call to
flymake--indicator-overlay-spec.
(flymake-show-buffer-diagnostics-at-event-line):
(flymake-diagnostics-at-mouse-event):
(flymake-show-buffer-diagnostics-at-event-position): New functions.
(flymake-after-show-buffer-diagnostics-hook): New custom with actions
when jumping to an error line.
(flymake-pulse-momentary-highlight-region):
(flymake-show-buffer-diagnostics): Receive new optional argument with
current diagnostic information. Add code to jump and execute the new hook
after jumping (bug#75841).
* lisp/simple.el (shell-command): Kill buffer-local values of
`shell-file-name' and `shell-command-switch', there could be left
connection-local values. (Bug#76888)
1. Fix closing paren aligning with trailing comment on line
with matching open paren.
2. Fix indentation of first identifier inside a comma separated
list aligning with the type rather than the subsequent
identifiers.
3. Fix lambda expressions inside a brace list aligning like a
single statement.
* lisp/progmodes/cc-align.el (c-lineup-arglist): Take into
account any preceding comments when lining up the arguments in
the arglist.
(c-lineup-arglist-intro-after-paren): Handle comments properly,
and don't line up the closing parenthesis with a trailing
comment on the first line.
(c-lineup-item-after-paren-at-boi): Also allow a paren to count
as being at BOI when it is preceded only by open parens on that
line.
(c-lineup-runin-statements, c-lineup-ObjC-method-call): Hanle
comments better.
* lisp/progmodes/cc-engine.el (c-forward-comments) Introduce an
optional limit parameter. Use this limit in calls from
cc-align.el and cc-mode.el.
(c-just-after-func-arglist-p): Handle the presence of a
protection keyword such as "public".
(c-at-bracelist-p): Renamed from c-inside-bracelist-p, after
dropping the accept-in-paren parameter, having removed its
functionality.
(c-looking-at-statement-block-1): New function, based on the
old c-looking-at-statement-block. Enhanced to handle C++
lambda expressions, and to return the symbol `maybe' when the
contents of a brace delimited block fail to determine whether
it is a statement block.
(c-looking-at-statement-block): Enhanced to examine the context
of a brace delimited block when the contents are ambiguous.
(c-looking-at-c++-lambda-expression): Check the character after
point is a < before calling c-forward-<>-arglist.
(c-add-stmt-syntax): Make the context more accurate by calling
c-looking-at-statement-block.
(c-guess-basic-syntax, CASE 5D.5): Replace the syntactic symbol
topmost-intro-cont with the new symbol class-field-cont,
additionally determining the position of the enclosing brace as
an extra anchor point.
(c-guess-basic-syntax, CASE 5V): New case for an identifier
following a type inside class braces.
(c-guess-basic-syntax, CASE 9): Use
c-looking-at-statement-block to detect a brace list more
accurately.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Rename the call to c-inside-bracelist-p to c-at-bracelist-p.
* lisp/progmodes/cc-langs.el (c-protection-kwds): Add an entry
for java-mode.
(c-stmt-block-only-keywords-regexp): Prevent this regexp also
matching a character preceding the keyword.
* /lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): Use the new limit argument to
c-forward-comments.
* lisp/progmodes/cc-styles.el (c-style-alist, "gnu" and "java"
styles): Change the offset for arglist-close to
c-lineup-arglist-close-under-paren.
* lisp/progmodes/cc-vars.el (c-offsets-alist): Introduce the
new syntactic symbol class-field-cont, giving it default
offset +.
* doc/misc/cc-mode.texi (Syntactic Symbols, Class Symbols):
Document the new syntactic symbol class-field-cont.
(treesit-generic-mode-list): Remove variable.
(define-treesit-generic-mode): Remove docstring text about hook
that is already added by 'define-derived-mode'.
(treesit-generic-mode): Remove command.
* src/xdisp.c (produce_image_glyph): When cropping an image that
exceeds the window's right edge, account for the screen estate
taken by line-number display. (Bug#77217)
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-run-tests-batch-expensive): Mark it 'unstable', as it
might run out of memory on GNU/Linux and on Windows.
* src/frame.c (frame_subsumes_p): New static function
(delete_frame): On ttys refuse to delete a frame that could be
used as surrogate minibuffer frame by surviving frames.
(store_frame_param): Make sure 'minibuffer' parameter does not
reference a deleted window. If on a tty it references a live
window, make sure its frame has the same root frame as the frame
where the parameter shall be installed. Also on ttys make sure
that storing the 'parent-frame' parameter does not assign a
surrogate minibuffer frame a different root frame than that of
any of its client frames. Further on ttys assert that making a
child a new root frame gives it the dimensions of the terminal.
(Fmouse_position_in_root_frame): Don't use XFRAME before
it's clear that FRAME is a frame.
* doc/lispref/elisp.texi (Top): Add menu for Child Frames section.
* doc/lispref/frames.texi (Buffer Parameters): Mention that
value 'child-frame' is not special for 'minibuffer' parameter on
text terminals.
(Visibility of Frames): Fix description of 'iconify-frame'.
(Raising and Lowering): 'minibuffer-auto-raise' is an option.
(Child Frames): Major rewrite using subsections. Explain new
and deviant features on text terminals - menu bar access,
reparenting, deleting, visibility and minibuffer-only child
frames.
* etc/NEWS: Remove remark that child frames cannot be
arbitrarily reparented on ttys.
This is more robust since the time zone name is system-dependent.
* lisp/emacs-lisp/ert.el (ert--explain-time-equal-p): Use numeric time
zone suffix.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-time-equal-p):
Adapt test.
* doc/lispref/functions.texi (Declare Form): Clarify wording for
precision and consistency; note consequences of incorrect declarations.
* doc/lispref/objects.texi (Type Specifiers): Mention use by the native
compiler; tighten wording.
* lisp/bs.el: Prefer # to quote function arguments.
(bs-mode-font-lock-keywords): Use backquote; quote face names; and use
a list of faces instead of two applications at the same spot.
(bs-sort-buffer-interns-are-last, bs-config--files-and-scratch)
(bs-configurations, bs--intern-show-never): Fix ^$-vs-\`\' confusion.
(bs-mode-map): Remove bindings made redundant by inheritance.
(bs--redisplay): Use `line-number-at-pos`.
(bs--goto-current-buffer): Use `regexp-opt`.
(bs-mode): Inherit from `special-mode`.
(bs--current-buffer, bs--up): Use `point-min`.
(bs--create-header-line): Remove redundant arg.
* lisp/bookmark.el: Prefer # to quote function arguments.
(bookmark-watch-bookmark-file): Remove redundant `:group`.
(bookmark-bmenu-mode): Let `define-derived-mode` take care of
`mode-class` property.
This clarifies that the error isn't talking about an editing buffer.
* src/emacs-module.c (module_memory_buffer_too_small): Rename from
'module_buffer_too_small'.
(module_copy_string_contents, module_extract_big_integer): Adapt
callers.
(syms_of_module): Rename symbol 'buffer-too-small' to
'memory-buffer-too-small'.
Consolidate the conversion from types to classes into
`built-in-class--make` instead of duplicating it in ever caller.
* lisp/emacs-lisp/cl-preloaded.el (built-in-class--make): Take list of
types rather than classes.
(cl--define-built-in-type): Simplify accordingly.
The convention used by 'aref' and friends is that for
'args-out-of-range', the error data is a list (SEQ INDEX). Use the same
convention for the vector-related module functions.
* src/emacs-module.c (check_vec_index): Use vector and index as error
data.
'args-out-of-range' means that some index argument isn't valid for a
given sequence/range, which isn't the case here. Instead, define a new
error symbol to mean "user-supplied buffer is too small." Since we
never specified nor tested which error symbol was signalled in this
case, changing it shouldn't cause severe breakages.
* src/emacs-module.c (module_buffer_too_small): New helper function.
(module_copy_string_contents, module_extract_big_integer): Use it.
(syms_of_module): Define 'buffer-too-small' error symbol.
* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Hoist
subexpression out of `if`.
(byte-compile-variadic-numeric, byte-compile--cond-vars)
(byte-compile--cond-switch-prefix, byte-compile-file-form-defalias):
Obey `lexical-binding` when evaluating the code we're compiling.
(byte-compile--maybe-guarded): New function, extracted from
`byte-compile-maybe-guarded`.
(byte-compile-maybe-guarded): Use it so we can edebug the code.
* lisp/subr.el (buffer-local-set-state--get): Simplify by making it
take only the vars rather than the pairs.
(buffer-local-set-state): Adjust accordingly so we don't needlessly keep
part of the source code in the compiled code.