Flymake's normal behaviour implies catching the errors of misbehaving
backends. This behavior is tested by Flymake's automated tests, built
on top of ERT, which means that debug-on-error is always t in the
bodies of said tests (I don't know the rationale for this, but it's
been like this for some time)
Flymake used to shun usage of 'condition-case-unless-debug' because of
this. But since that macro is pretty useful, I started using it
again, and as a consequence, tests started breaking.
The solution is to:
1. stop requiring the deprecated legacy backend 'flymake-proc' (which
by design, always errors, except in rare circumstances).
2. deliberately set debug-on-error to nil around the "dummy backends""
test.
* lisp/progmodes/flymake.el (flymake-proc): Don't require it by
default.
* test/lisp/progmodes/flymake-tests.el:
(dummy-backends): Make robust to ert's debug-on-error setting.
6bc3800000 Ensure ucs-names is consistent with Unicode names
93134bb9c2 Make key-translate actually work
85f49a9bc8 Update to Org 9.6.9
2826c26537 Add leim subdirectories to emacs package
It is bad user experience when two menu items have identical labels.
* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-type): Add check.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-type): Add test case.
This fixes bug#65680. The former use of print-length as a
bound on the length of the printed string was erroneous,
causing error messages preceding backtracees to get
unnecessarily truncated to 50 characters.
* lisp/emacs-lisp/cl-print.el (cl-print-object <string>):
Remove the substitution of ellipses for long strings.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-ellipsis-string): Remove this test.
* lisp/international/mule-cmds.el (ucs-names): Skip adding an old-name
if it conflicts with the offical name of a codepoint. Adjust the
ranges iterated over to account for new Unicode codepoints.
* test/lisp/international/mule-tests.el
(mule-cmds-tests--ucs-names-old-name-override,
mule-cmds-tests--ucs-names-missing-names): New tests for checking
'ucs-names' consistency.
Bug#65997
This feature would allow treesitter major modes to easily specify
offsets when using embeded parsers. A potential use case for this is
javascript template strings, when we want to apply a different parser
to the string's contents, but do not want to include the template
string's delimiters.
* lisp/treesit.el
(treesit-query-range): Accept an optional offest arg, apply the offset
to all returned ranges.
(treesit-range-rules): Accept an optional :offset keyword arg to adjust
ranges an embded parser is applied to.
(treesit-update-ranges): Forward optional :offset setting from
`treesit-range-rules' to `treesit-query-rang'.
* test/lisp/treesit-tests.el
(treesit-range-offset): Tests the new offset functionality.
* doc/misc/erc.texi: Fix `display-buffer-alist' example and mention
that it's only meant for users of Emacs 29 and above.
* test/lisp/erc/erc-tests.el (erc-setup-buffer--custom-action): Add
simplistic test case for example in manual.
This regressed (I believe) due to 2ec41c174f.
* lisp/eshell/esh-cmd.el (eshell-resume-eval): Check for non-nil
'retval' instead of for a process list (nil is also a technically a
process list!).
* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background-pipeline): Remove unnecessary
'copy-tree'.
(eshell-test/eshell-command/output-buffer/sync)
(eshell-test/eshell-command/output-buffer/async): New tests.
This function should have been made internal in the first place.
* lisp/help.el (help--describe-map-tree): Rename from
'describe-map-tree'. Keep old name as an obsolete alias, and update
all callers.
Warn about more kinds of mistakes in :type arguments of `defcustom`
and `define-widget`. These include:
- misplaced keyword args, as in (const red :tag "A reddish hue")
- missing subordinate types, as in (repeat :tag "List of names")
or (choice list string)
- duplicated values, as in (choice (const yes) (const yes))
- misplaced `other` member, as in
(choice (const red) (other nil) (const blue))
- various type name mistakes, as in (vector bool functionp)
* lisp/emacs-lisp/bytecomp.el (byte-compile--defcustom-type-quoted)
(byte-compile-nogroup-warn): Remove.
(byte-compile-normal-call): Remove call to the above.
(bytecomp--cus-warn, bytecomp--check-cus-type)
(bytecomp--custom-declare): New.
755ae813a6 ; Declare some treesit.c functions in typescript-ts-mode.el.
89fa204b70 Fix loss of encrypted data in plstore.el
d9a1175a61 Close SQL database when corresponding 'sqlite-mode' buffe...
cbd8fac283 Fix Unicode normalization of characters
825be05b37 Support one-time passwords in Tramp
f880b94e64 Fix the 'C' and 'c' categories of characters
58fd212d8a Fix Emoji zooming commands
8970cdd009 ; Fix last change.
ba924be452 ; * etc/DEBUG: Improve the redisplay section.
e110312ad9 ; * doc/lispref/minibuf.texi (Text from Minibuffer): Ment...
65f4810003 tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
6fe11b88ed Avoid using --display in emacsclient to reuse frames on PGTK
2fc7463c0e ; * INSTALL: Don't advertise -O3. (Bug#65988)
29055412f2 ; Fix doc string of 'lsh'
738d854333 Support emacsclient on Windows with server on GNU or Unix...
f0a89fa1d0 ; * lisp/saveplace.el (save-place-ignore-files-regexp): F...
c9cb8ee0fc Fix defcustom in saveplace.el (Bug#65977)
5ec8be1d58 ; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc ...
809305e6d8 Fix 'window-text-pixel-size' when there are several image...
ea14b0dcc2 : Doc fix.
01e8a0c6cb Doc fix for prettify-symbols-unprettify-at-point
0065621d0d (report_overlay_modification): Fix bug#65929
6cc6455e93 Fix SVG colors (bug#56182)
9396d73942 * doc/emacs/text.texi (Outline Minor Mode): Add a note ab...
a65d1a5a16 Improve documentation of 'list-abbrevs'
5dcc4b7eab Tweak s-p-f for js-ts-mode
1fb2fb501f typescript-ts-mode, tsx-ts-mode: Fix syntax properties fo...
946b395e7e * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug...
33ee3e588f Fix regression of treesit_cursor_helper_1
d11d81dfcc ; Fix doc typos (Bug#65868)
6554ec2246 Update docs for passing of Thien-Thi Nguyen
5ab2792d5c Update defvar usage tips example in manual
35d88c657e Document using Flymake together with Eglot
3f04efe9e7 ; * src/font.h (struct font): Comment about use of averag...
459b5f6b6d ; * admin/authors.el (authors-aliases): Update.
0c029ae8bc ; tweak etc/TODO item
# Conflicts:
# admin/authors.el
# lisp/subr.el
* lisp/wid-edit.el (restricted-sexp): Don't try to read
an empty string when converting the current value to the
external format. (Bug#63838)
* test/lisp/wid-edit-tests.el (widget-test-restricted-sexp-empty-val):
New test.
Commit 6fad73d7cc throws away some useful optimization because
it misfired in some cases (as seen in bug#657260). Here we try to
recover those useful optimizations with a slightly more careful
algorithm.
* src/regex-emacs.c (mutually_exclusive_aux): Rename from
`mutually_exclusive_p`. Add two new args. Improve the
case where we need to recurse.
(mutually_exclusive_p): New function defined on top of it.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Re-enable the test.
* test/lisp/calendar/todo-mode-tests.el
(todo-test-add-and-delete-file):
* test/lisp/simple-tests.el (simple-tests-shell-command-39067):
Mark tests taking more than 10 seconds to run on a MacBook Pro from
2015 as expensive.
Somehow the new overlay code in Emacs-29 changed slightly
the test to decide when to run the `modification-hooks` of overlays,
with the consequence that these hook functions end up being executed
also when text is deleted right after an empty overlay, which is
contrary to Emacs-28 behavior as well as contrary to the Texinfo doc.
* src/buffer.c (report_overlay_modification): Better reproduce the
Emacs-28 code.
* test/src/buffer-tests.el (overlay-modification-hooks):
Add corresponding test.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Split the first line of
generated docstrings if either the struct name or a field name is very
long. This reduces the likelihood of "docstring wider than 80
characters" errors. (Bug#65790)
* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Split the first line of
the docstring into 2 lines if the function name is very long.
Additionally, remove the word "inlining" in the generated docstring as
it is not very useful and increases the likelihood of "docstring wider
than 80 characters" errors. (Bug#65790)
* lisp/eshell/esh-proc.el (eshell-sentinel): Only output abnormal
status when stderr is interactive.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-process/redirect-message): New test.
* etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and
mention explicit hook-depth intervals reserved by ERC.
* lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on
`pre-command-hook' from 91 to 80.
* lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary
role when new option `erc-scroll-to-bottom-relaxed' is non-nil.
(erc-scrolltobottom-all): New option that decides whether module
`scrolltobottom' affects all windows or just the selected one, as it
always has.
(erc-scrolltobottom-relaxed): New option to leave the prompt
stationary instead of forcing it to the bottom of the window.
(erc-scrolltobottom-mode, erc-scrolltobottom-enable,
erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead
of `erc-add-scroll-to-bottom' for adding and removing local hooks and
instead of ranging over buffers when removing them. Also add and
remove new hook members when `erc-scrolltobottom-all' is non-nil.
(erc--scrolltobottom-relaxed-commands,
erc--scrolltobottom-window-info,
erc--scrolltobottom-post-force-commands,
erc--scrolltobottom-relaxed-skip-commands): New internal variables.
(erc--scrolltobottom-on-pre-command
erc--scrolltobottom-on-post-command): New functions resembling
`erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly
for no reason.
(erc--scrolltobottom-on-pre-command-relaxed,
erc--scrolltobottom-on-post-command-relaxed): New commands to help
implement `erc-scroll-to-bottom-relaxed'.
(erc--scrolltobottom-at-prompt-minibuffer-active): New function to
scroll to bottom on window configuration changes when using the
minibuffer.
(erc--scrolltobottom-all): New function to scroll all windows
displaying the current buffer.
(erc-add-scroll-to-bottom): Deprecate this function because it is now
unused in the default client and trivial to implement otherwise.
(erc--scrolltobottom-setup): New generic function to perform teardown
as well as setup depending on the state of the module's mode variable.
Also add an implementation specifically for `erc-scrolltobottom-all'
that locally modifies different sets of hooks depending on
`erc-scrolltobottom-relaxed'.
(erc--scrolltobottom-on-pre-insert): New generic function that
remembers the last `window-start' and maybe the current screen line
before inserting a message, in order to restore it afterward.
(erc--scrolltobottom-confirm): New function, a replacement for
`erc-scroll-to-bottom' that returns non-nil when it's actually
recentered the window. For now, used only when
`erc-scrolltobottom-all' is enabled.
(erc-move-to-prompt-setup): Add `erc-move-to-prompt' to
`pre-command-hook' at a depth of 70 in the current buffer.
(erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0
to 85.
(erc--keep-place-indicator-setup): Add overlay arrow `after-string' in
non-graphical settings in case users have time stamps or other content
occupying the left margin.
(erc-keep-place-indicator-mode, erc-keep-place-indicator-enable):
Change hook depth from 90 to 85 locally so as not to conflict with a
value of t, for append.
(erc--keep-place-indicator-on-global-module): Change hook depth from
90 to 85 locally.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file.
* test/lisp/erc/erc-scenarios-scrolltobottom.el: New file.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--term-size, erc-scenarios-common--run-in-term,
erc-scenarios-common-interactive-debug-term-p,
erc-scenarios-common-with-noninteractive-in-term): New test macro and
supporting helper function and variables to facilitate running
scenario-based tests in an inferior Emacs, in term-mode.
(erc-scenarios-common--at-win-end-p,
erc-scenarios-common--above-win-end-p,
erc-scenarios-common--prompt-past-win-end-p,
erc-scenarios-common--recenter-top-bottom-around,
erc-scenarios-common--recenter-top-bottom,
erc-scenarios-scrolltobottom--normal): New test fixture and assertion
helper functions.
* test/lisp/erc/resources/scrolltobottom/help.eld: New file.
(Bug#64855)
* etc/ERC-NEWS: Move `erc-echo-timestamp' from misc section
to own entry, and mention option `erc-echo-timestamp-zone'.
* lisp/erc/erc-stamp.el (erc-echo-timestamps): Mention that some
finagling is required if enabling this option after activating the
module.
(erc-echo-timestamp-format): Add additional Custom choice constants
and make the existing default one of them.
(erc-echo-timestamp-zone): New option to specify timezone for option
`erc-echo-timestamps' and function `erc-echo-timestamp'.
(erc-stamp-mode, erc-stamp-enable, erc-stamp-disable): Call
`erc-stamp--setup' instead of `erc-munge-invisibility-spec'.
(erc-stamp--current-time): Use `current-time' instead of
`erc-current-time'.
(erc-add-timestamp): Improve readability slightly, and change
`fboundp' to `functionp' to avoid signaling an error when the
variable's value is not a symbol.
(erc-munge-invisibility-spec): Perform teardown when boolean flag
options, like `erc-timestamp-intangible' and `erc-echo-timestamps' are
nil.
(erc-stamp--setup): Call `erc-munge-invisibility-spec', possibly
binding timestamp options to nil to force a tear down).
(erc-stamp--last-stamp, erc-stamp--on-clear-message): New function and
helper state variable to tell Emacs not to clear the current timestamp
message when navigating within the same IRC message.
(erc-echo-timestamp): Add optional `zone' parameter, to be passed
directly to `format-time-string', when non-interactive, and massaged
sensibly otherwise. Set the local variable `erc-stamp--last-stamp'.
* test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp): New test.
(Bug#60936)
* test/lisp/erc/erc-tests.el
(erc-tests--assert-printed-in-subprocess): Don't insist that arguments
to the Emacs "-load" invocation option be actual disk files.
* test/lisp/erc/resources/erc-d/erc-d-t.el
(erc-d-t--wait-message-prefix, erc-d-t-wait-for, erc-d-t-ensure-for):
Add and use new variable to make `ert-info' message prefix adjustable.
The immediate use for this is to make it easier to distinguish between
consecutive assertions in which the first waits for a condition and
the second ensures it holds for some duration.
* test/lisp/erc/resources/erc-d/erc-d-u.el
(erc-d-u--read-exchange-default): Skip killed buffers.
* test/lisp/erc/resources/erc-d/erc-d.el: Typo.
* test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld: Timeouts.
* test/lisp/erc/resources/base/assoc/bouncer-history/foonet.eld: Timeouts.
* test/lisp/erc/resources/base/assoc/bumped/again.eld: Timeouts.
* test/lisp/erc/resources/base/assoc/bumped/foisted.eld: Timeouts.
* test/lisp/erc/resources/base/assoc/bumped/refoisted.eld: Timeouts.
* test/lisp/erc/resources/base/flood/soju.eld: Timeouts.
* test/lisp/erc/resources/base/netid/bouncer/barnet.eld: Timeouts.
* test/lisp/erc/resources/base/netid/bouncer/foonet.eld: Timeouts.
* test/lisp/erc/resources/base/reconnect/aborted-dupe.eld: Timeouts.
* test/lisp/erc/resources/base/reconnect/aborted.eld: Timeouts.
* test/lisp/erc/resources/base/renick/self/qual-chester.eld: Timeouts.
* test/lisp/erc/resources/base/renick/self/qual-tester.eld: Timeouts.
* test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld: Timeouts.
* test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Timeouts.
* test/lisp/erc/resources/erc-d/resources/linger.eld: Timeouts.
* test/lisp/erc/resources/join/legacy/foonet.eld: Timeouts.
* lisp/erc/erc.el (erc--parse-user-regexp-legacy,
erc--parse-user-regexp-pedantic): New constants. The first is the
original pattern that matches across line endings. The second
disallows multiline strings and interprets excess delimiting
characters as part of the middle, "user" component as per RFC1459.
The latter distinction is largely academic because most servers reject
such logins anyway, but bridges to other protocols and future
extensions may need to exploit this for novel uses.
(erc--parse-user-regexp): New variable, currently set to
`erc--parse-user-regexp-legacy'.
(erc-parse-user): Keep original pattern as default, but do so
indirectly via `erc--parse-user-regexp'.
* test/lisp/erc/erc-tests.el (erc-parse-user): New test.
Previously, we only waited until the tail process was finished, but
now, we wait for all of them. This is more consistent with other
shells, and prevents some cases of a process's output coming *after*
we continued past its pipeline.
* lisp/eshell/esh-cmd.el (eshell-resume-command): Simplify
conditionals, and check that all the foreground processes are dead
before resuming Eshell command.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/pipeline-wait/multi-proc): New test.
* lisp/net/mailcap.el (mailcap-viewer-passes-test):
Make ‘mailcap-viewer-passes-test’ follow its docstring and return t
for viewers without a test. (Bug#65224)
* test/lisp/net/mailcap-tests.el
(mailcap-viewer-passes-test-w/o-test-returns-t): New test.
Warn about clauses after the default clause, as in
(cond ((= x 0) (say "none"))
(t (say "some"))
(say "goodbye"))
because they are very much an indicator of a mistake (such as
misplaced brackets), and since they are deleted by the optimiser, any
other warnings there are lost and the user wouldn't know that
something is wrong otherwise.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Add warning.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Add test case.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--with-fresh-warnings): New macro.
(test-byte-comp-compile-and-load, bytecomp--with-warning-test):
Use it.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/sigpipe-exits-process): Make sure we have no *new*
processes, instead of making sure we have no processes at all.
* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Signal error if the symbol to make obsolete is nil or t. (Bug#62248)
(byte-run--constant-obsolete-warning): New function.
* test/lisp/emacs-lisp/byte-run-tests.el: New file.
This ensures that we supply Tramp with the local PATH so that it can
do its job of starting the local "ssh", or whatever the method uses
(bug#65551).
* lisp/eshell/esh-proc.el (eshell-gather-process-output): Add special
handling for remote processes.
* test/lisp/eshell/esh-proc-tests.el
(esh-var-test/remote/remote-path): New test.
* lisp/progmodes/project.el (project-try-vc): When finding a
non-VC project root, still try to search for the containing
responsible VC backend, if any (bug#65704).
Substring completion would previously not complete the longest common
substring if that substring was a prefix of all the completion
alternatives. Now it does. An explanation of this bug
Substring completion is implemented by passing the `prefix' symbol as
part of the pattern passed to completion-pcm--merge-completions. This
symbol is supposed to cause completion-pcm--merge-completions to
"grow" a completion of a common substring only from the "right" of the
symbol (a common suffix), not from the "left" of the symbol (a common
prefix). Yes, this is the opposite of what the name `prefix' would
imply.
When processing a symbolic element of the pattern,
completion-pcm--merge-completions first finds the common prefix of all
the completions in that part of the pattern (using try-completion).
Then for `prefix' and other elements which want to complete a common
suffix, the common prefix is removed from each element and then the
common suffix is calculated with completion--common-suffix.
If the common prefix covers the entirety of all the alternatives
(i.e. when "unique" is true in the code), it's also a common suffix.
In that case, the common suffix calculation (if it runs) is basically
a no-op which will produce an empty string, since we removed the
common prefix before running it.
Before this change, `prefix' elements would unconditionally discard
the common prefix, which produced the wrong result in the case that
common prefix == common suffix. For example:
(completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
-> ("b")
Now we detect this situation and include the common prefix in this
case for `prefix' elements. Then we get:
(completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
-> ("b" "a")
which is correct.
* lisp/minibuffer.el (completion-pcm--merge-completions): Don't ignore
a common suffix in a `prefix' pattern element when it's also a common
prefix.
* test/lisp/minibuffer-tests.el (completion-substring-test-5): Add a
test.