* lisp/net/soap-client.el (soap-decode-date-time): Call
encode-time using apply, for GNU ELPA backward compatibility.
Remove some tabs.
(soap-type-is-array?): Reword docstring to accommodate checkdoc.
More descriptive character escape syntax error messages (bug#63436)
* src/lread.c (invalid_escape_syntax_error): Remove.
(read_char_escape): Make certain messages more specific
than just "Invalid escape character syntax" to help finding
and understanding the error.
Alan Mackenzie [Fri, 14 Apr 2023 10:33:03 +0000 (10:33 +0000)]
Make c-emacs-features use the proper binding of parse-sexp-lookup-properties
This is relevant for bug #58558, although it does not fix it. Due to a wrong
ordering of with-current-buffer and a let form, the function overwrote the
global value of parse-sexp-lookup-properties and two other variables.
* lisp/progmodes/cc-defs.el (c-emacs-features): Change the nesting of
with-current-buffer and let so that the let bindings get used.
Stefan Monnier [Wed, 10 May 2023 02:30:52 +0000 (22:30 -0400)]
with-display-message: Workaround for bug#63253
Running arbitrary ELisp code from an atimer is still dangerous,
at least because the regexp engine is not-reentrant, so let's patch up
the case we bumped into. There are probably many other such holes :-(
* src/alloc.c (garbage_collection_inhibited): Make it non-static.
* src/xdisp.c (garbage_collection_inhibited): Declare it.
(set_message, clear_message): Use it as a proxy for "we're in
a dangerous context like within `probably_quit`".
Speed up skip-chars-{forward|reverse} with char classes
* src/regex-emacs.h (re_wctype_t): Add RECC_NUM_CLASSES.
* src/syntax.c (skip_chars, in_classes): Use an array on the stack
instead of a Lisp list for storing character classes.
Don't check all classes if there is a match in one.
Remove useless handle_iso_classes argument.
João Távora [Fri, 5 May 2023 18:44:11 +0000 (19:44 +0100)]
Fido-mode: never shadow 'external' completion style
As explained in the manual (20.7.2 Fast minibuffer selection)
'fido-mode' and 'fido-vertical-mode' give priority the "flex"
completion style.
In fact, bug#62015 was recently fixed in commit because that priority
was not taking place correctly and some completions were missed.
However, an exception must be made for the 'external' completion
style.
That style, made available by the lisp/external-completion.el library,
is specifically designed to work with backends that provide only a
partial view of all completions. If we allow 'flex' to step in front
of 'external' it could mean that 'flex' matches something and
'external' isn't triggered as it probably should.
To reproduce have the rust-mode ELPA package and the rust-analyzer LSP
server handy. Then:
Now start M-x eglot and M-x fido-vertical-mode and type C-u M-. to
find an arbitrary symbol in this one-file project.
Type 'f'. You will see the three foo's are listed, correctly.
Now type '3'. You will only see "foo3".
But that's wrong because "foobar3" was available, if only the server
had been asked for it. This commit fixes the situation and no
completions are lost.
As an unfortunate side-effect of this commit, the fontification of
completions-common-part on the matches is lost, but that is not worse
than missing out on completions and there are better ways to recover
the fontification anyway (in external-completion.el).
See also:
https://github.com/joaotavora/eglot/discussions/1219#discussioncomment-5818336
* lisp/icomplete.el (icomplete--fido-ccd): Do not touch entries
with 'external in them.
Alan Third [Thu, 27 Apr 2023 19:08:23 +0000 (20:08 +0100)]
Fix crash when creating a child frame in NS (bug#63107)
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at
creating the toolbar.
([EmacsWindow createToolbar:]): If there is already a toolbar or the
EmacsView's layer is not an EmacsLayer, then do nothing.
Andrew G Cohen [Sun, 30 Apr 2023 01:55:42 +0000 (09:55 +0800)]
Fix outgoing mime type regression (Bug#62815)
* lisp/net/mailcap.el (mailcap-mime-extensions,
mailcap-parse-mimetype-file, mailcap-mime-types): Don't regexp-quote
mimetypes in a context where they should be strings.
(mailcap--regexp-quote-type): Remove.
Alan Third [Thu, 27 Apr 2023 19:08:23 +0000 (20:08 +0100)]
Fix crash when creating a child frame in NS (bug#63107)
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at
creating the toolbar.
([EmacsWindow createToolbar:]): If there is already a toolbar or the
EmacsView's layer is not an EmacsLayer, then do nothing.
define-minor-mode: sanitize mode function messages
* emacs-lisp/easy-mmode.el (define-minor-mode): Ensure mode's
pretty name is not interprted as a message formatting string,
e.g., if the mode name contains a '%'. (Bug#63343)
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Check for
keywords containing 'enum' on the line before an opening bracket, and
make it behave like a class-open token.
Andrew G Cohen [Wed, 3 May 2023 03:37:45 +0000 (11:37 +0800)]
Allow X-Message-SMTP-Method to include more MTAs
* lisp/gnus/message.el (message-multi-smtp-send-mail): Allow the
X-Message-SMTP-Method header to override the default mailer with not
only smtp and sendmail but other MTAs as well.
* doc/misc/message.texi: Document changes to the usage of
X-Message-SMTP-Method.
Dmitry Gutov [Sat, 6 May 2023 00:54:59 +0000 (03:54 +0300)]
package-upgrade: Implement the upgrading of built-ins
* lisp/emacs-lisp/package.el (package--upgradeable-packages):
Add new argument. When INCLUDE-BUILTINS is non-nil, also search
among package--builtins (bug#62720).
(package-upgrade): Use the new argument. Bind
package-install-upgrade-built-in when necessary. Mark the package
as selected if it was previously an "active built-in".
(package-upgrade-all): Update the docstring.
Dmitry Gutov [Sat, 6 May 2023 00:41:54 +0000 (03:41 +0300)]
Merge from origin/emacs-29
79a886ba368 (package-upgrade): Don't remove the package from 'package... c0ab4e9ca93 Eglot: re-rename eglot-upgrade to eglot-upgrade-eglot b4e90070f96 Fix arguments of xml.c functions as displayed in Help buf... b1bda8228e5 More fixes for NetBSD/vax a2d4cd06f45 Improve VHDL mode highlighting 2f3a514b6db Clarify documentation wrt floating point division by zero... 94e984e6700 Make loaddefs-generate slightly more tolerant aba41d2c4bb ; Minor doc cleanups in go-ts-mode.el b42ccb2e5c1 ; Minor grammar fix in treesit manual. ab44c8a6f9d Fix order of rcirc-connect arguments 8eb6e33691d Fix rcirc messages printing in the wrong place 2901a3443c7 Prevent unnecessary modifications of 'package-vc-selected... eaad302bd6f Rename eglot-update to eglot-upgrade eaf25b9c6ae go-ts-mode: Use iota query only if supported (Bug#63086) cc090294d77 (rng-complete-tag): Add the (ignored) argument to the :co... 21ec6c1d5cc Update to Transient v0.3.7-219-g3ded15b 8d5aa8df4ad Fix inserting selection data into Mozilla programs 57562c3fd0a Recognize defstruct slot names in various eieio functions b93eb68cc30 Use 'calendar-buffer' instead of fixed string
Dmitry Gutov [Sat, 6 May 2023 00:32:08 +0000 (03:32 +0300)]
(package-upgrade): Don't remove the package from 'package-selected-packages'
* lisp/emacs-lisp/package.el (package-upgrade):
Don't remove the package from 'package-selected-packages', fixing
the problem described in https://debbugs.gnu.org/62720#718.
F. Jason Park [Fri, 28 Apr 2023 13:34:09 +0000 (06:34 -0700)]
Add interface for finding users in erc-server-PRIVMSG
* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Call new hook
`erc--user-from-nick-function' for turning the sender's nick into a
channel user, if any.
* lisp/erc/erc-button.el (erc-button--add-phantom-speaker): Redo
completely using simplified API.
(erc-button--fallback-user-function): Add internal function-interface
variable for finding an `erc-server-user' object when the usual places
disappoint.
(erc-button--get-phantom-user): Add new function, a getter for
`erc-button--phantom-users'.
(erc-button--phantom-users-mode): Replace advice subscription for
`erc-button--modify-nick-function' with one for
`erc-button--user-from-nick-function' and one for
`erc-button--fallback-user-function'.
(erc-button--get-user-from-speaker-naive): Remove unused function.
(erc-button--add-nickname-buttons): Call
`erc-button--fallback-user-function' when a user can't be found in
`erc-server-users' or `erc-channel-users'.
* lisp/erc/erc.el (erc--user-from-nick-function): New
function-interface variable for determining an `erc-server-user'
`erc-channel-user' pair from the sender's nick.
(erc--examine-nick): Add new function to serve as default value for
`erc--user-from-nick-function'. (Bug#60933)
* lisp/erc/erc-button.el (erc-button--check-nicknames-entry): Remove
unused let binding.
(erc-button--preserve-bounds): Remove unused function.
(erc-button--nick): New struct type to serve as collection plate for
`erc-button--modify-nick-function' consumers.
(erc-button--modify-nick-function): Reexplain interface, now based on
`erc-button--nick' object. Change default value to `identity'.
(erc-button--add-phantom-speaker): Redo to expect `erc-button--nick'
object.
(erc-button-add-nickname-buttons): Rework slightly to construct an
`erc-button--nick' object for feeding to
`erc-button--modify-nick-function'. Only run the latter when an
`erc-server-user' has successfully been found. (Bug#60933)
F. Jason Park [Sat, 15 Apr 2023 16:52:05 +0000 (09:52 -0700)]
Revise FORM-as-function interface in erc-button-alist
* lisp/erc/erc-button.el (erc-button-alist): Remove redundant "<URL:
foo>" entry, which adds nothing beyond highlighting the surrounding
bookends at the expense of doubling up on face properties for no
reason. Revise the FORM-as-function interface by removing the dynamic
binding of face options and treating all implementers as replacements
for `erc-button-add-button'.
(erc-button--maybe-warn-arbitrary-sexp): Make more robust by having it
handle all accepted FORM types other than booleans.
(erc-button-add-buttons-1): Rework to only check FORM field once.
(erc-button--substitute-command-keys-in-region,
erc-button--display-error-with-buttons): Rename former as latter and
change signature to conform to new `erc-button-add-buttons' interface.
(erc-button--display-error-notice-with-keys): Call renamed helper.
* test/lisp/erc/erc-button-tests.el (erc-button-alist--url,
erc-button-tests--form, erc-button-tests--some-var,
erc-button-tests--erc-button-alist--function-as-form,
erc-button-alist--function-as-form,
erc-button-tests--erc-button-alist--nil-form,
erc-button-alist---nil-form): Add tests and helpers. (Bug#60933)
F. Jason Park [Sun, 30 Apr 2023 14:12:56 +0000 (07:12 -0700)]
Preprocess prompt input linewise in ERC
* etc/ERC-NEWS: Mention revised role of `erc-pre-send-functions'
relative to line splitting.
* lisp/erc/erc-common.el (erc-input): Add new slot `refoldp' to allow
`erc-pre-send-functions' members to indicate that splitting should
occur a second time after all members have had their say.
(erc--input-split): Specify some defaults for overridden slots and
explicitly declare some types for good measure.
* lisp/erc/erc-goodies.el (erc-noncommands-mode,
erc-noncommands-enable, erc-noncommands-disable): Replace
`erc-pre-send-functions' with `erc--input-review-functions'.
* lisp/erc/erc-ring.el (erc-ring-enable, erc-ring-disable,
erc-ring-mode): Subscribe to `erc--input-review-functions' instead of
`erc-pre-send-functions' for `erc--add-to-input-ring'.
* lisp/erc/erc.el (erc-pre-send-functions): Note some nuances
regarding line splitting in doc string and note that a new slot is
available.
(erc--pre-send-split-functions, erc--input-review-functions): Rename
former to latter, while also obsoleting. Remove large comment. Add
new default member `erc--run-input-validation-checks'.
(erc-send-modify-hook): Replace the obsolete `erc-send-pre-hook' and
`erc-send-this' with `erc-pre-send-functions' in doc string.
(erc--check-prompt-input-for-excess-lines): Don't trim trailing
blanks. Rework to also report overages in characters as well as
lines.
(erc--run-input-validation-hooks): New function to adapt an
`erc--input-split' object to `erc--check-prompt-input-functions'.
(erc-send-current-line): Run `erc--input-review-functions' in place of
the validation hooks they've subsumed. Call `erc--send-input-lines'
instead of the now retired but not deprecated `erc-send-input'.
(erc--run-send-hooks, erc--send-input-lines): New functions that
together form an alternate version of `erc-send-input'. They operate
on input linewise but make accommodations for older interfaces.
* test/lisp/erc/erc-tests.el (erc-ring-previous-command): Replace
`erc-pre-send-functions' with `erc--input-review-functions'.
(erc-tests--with-process-input-spy): Shadow
`erc--input-review-functions'.
(erc-check-prompt-input-for-excess-lines): Don't expect trailing
blanks to be trimmed.
(erc--run-send-hooks): New test. (Bug#62947)
F. Jason Park [Mon, 17 Apr 2023 07:01:15 +0000 (00:01 -0700)]
Redo line splitting for outgoing messages in ERC
* lisp/erc/erc-backend.el (erc--reject-unbreakable-lines): New
variable, an escape hatch for somewhat regaining pre-5.6
line-splitting behavior.
(erc--split-line): New utility function that doesn't rely on
column-oriented filling.
* lisp/erc/erc.el (erc--pre-send-split-functions): Append
`erc--split-lines' to value.
(erc--split-lines): New function to re-split current selection of
lines.
(erc-send-input): Hard-code line preparation instead of calling
`erc--pre-send-split-functions', in order to bake in traditional
behavior before move to "pre-splitting".
* test/lisp/erc/erc-scenarios-base-split-line.el: New file.
* test/lisp/erc/erc-tests.el (erc--split-line): New test.
(erc-send-current-line): Don't expect a flood argument when
interpreting a command because it's not passed along to the command's
handler. This was previously misleading because it assigned undue
significance to something that had no bearing on the fate of a
command.
* test/lisp/erc/resources/base/flood/ascii.eld: New file.
* test/lisp/erc/resources/base/flood/koi8-r.eld: New file.
* test/lisp/erc/resources/base/flood/utf-8.eld: New file.
* test/lisp/erc/resources/erc-d/erc-d.el: Don't decode input.
(Bug#62947)
F. Jason Park [Tue, 18 Apr 2023 06:09:49 +0000 (23:09 -0700)]
Don't send multiline commands as messages in ERC
* lisp/erc/erc.el (erc-command-regexp): Relocate from further down in
same file.
(erc--check-prompt-input-for-multiline-command): Reject slash commands
containing multiple lines during input validation and before running
additional hooks.
(erc--discard-trailing-multiline-nulls): Don't mark input that begins
with a possible "slash command" as constituting a plain message just
because it has a trailing newline. It's relatively easy to add a
newline by accident, which can result in the unintended sharing of a
command line. Also, ERC already has a /SAY command that allows a user
to send a message starting a literal command.
* test/lisp/erc/erc-tests.el (erc-send-whitespace-lines): Fix test to
expect validation error when non-blank lines follow a slash command.
(Bug#62947)
F. Jason Park [Fri, 14 Apr 2023 07:07:31 +0000 (00:07 -0700)]
Restore module var toggles in ERC's Custom buffers
* lisp/erc/erc-common.el (erc--neuter-custom-variable-state): Remove
function. ERC famously toggles global minor-mode vars during normal
operations, which adds noise to its customization buffers because
`customize-variable-state' always sees an activated module's mode
variable as having "CHANGED". To suppress this annoyance, a
workaround was employed that used a dishonest `:get' function to
simply return the "saved value," when present. While this improved
the Customize experience, it also misled users, which likely wasn't
justified.
(erc--make-show-me-widget): Add helper to avoid forward declarations.
(erc--prepare-custom-module-type): Don't deprive users of a working
minor-mode toggle.
(erc--find-feature): New function to guess the feature of a module's
containing library.
(define-erc-module): Remove `:get' keyword. Specify `:require'
instead, whose value may be nil. Users who currently have mode vars
in their `custom-file' won't be impacted by this addition because
those `custom-set-variables' entries will still lack a REQUEST list
and hence won't incur a startup penalty. And new users intent on
using the toggle will hopefully do so with the knowledge they're
opting in to requiring ERC on startup, which is not the case if they
follow the recommended practice of using `erc-modules' instead.
(erc-with-server-buffer): Inline `erc-server-buffer'.
* test/lisp/erc/erc-tests.el (erc-process-input-line): Use helper.
(define-erc-module--global): Change expected expansion. (Bug#60935)
F. Jason Park [Tue, 11 Apr 2023 00:58:05 +0000 (17:58 -0700)]
Simplify erc-button movement commands
* etc/ERC-NEWS: Mention TAB being bound to new command `erc-tab' and
`erc-previous-button' now stopping at the start of buttons.
* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable,
erc-button-disable): Add and remove `erc-button-next' to
`erc--tab-functions' hook, which is tantamount to binding the command
in the read-only area of an ERC buffer.
(erc-button-next-function): Deprecate and remove from client code path
because this module doesn't concern itself with prompt input and thus
no longer needs to conform to the `completion-at-point-functions'
interface.
(erc-button--prev-next-predicate-functions): New variable, a hook to
determine whether to continue searching for a button. Other modules
should utilize this as needed.
(erc-button--end-of-button-p): Add function to serve as default value
for `erc-button--continue-predicate'.
(erc--button-next): Add generalized button-movement function.
(erc-button-next, erc-button-previous): Make `erc-button-previous'
behave more predictably by having it land at the beginning of buttons.
And remove roundabout appeal to HOF in `erc-button-next'.
(erc-button-previous-of-nick): New command to jump to previous
appearance of nick at point.
* lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable,
erc-fill-wrap-disable): Add and remove merge-related hookee from
`erc-button--prev-next-predicate-functions'.
(erc-fill--wrap-merged-button-p): New function to detect redundant
speakers.
* lisp/erc/erc.el (erc-complete-functions): Quote TAB in doc string.
(erc-mode-map): Bind `erc-tab' to TAB.
(erc--tab-functions, erc-tab): Add new command and hook to serve as
unified dispatch for TAB-related operations. It calls `c-a-p' in the
input area and defers to module code in the read-only message area.
* test/lisp/erc/erc-button-tests.el: New file.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate): Run
finalizer for transient keymap timer.
* test/lisp/erc/erc-tests.el
(erc-button--display-error-notice-with-keys): Move to new dedicated
test file for erc-button and fix expected behavior of
`erc-button-previous'. (Bug#62834)
F. Jason Park [Wed, 26 Apr 2023 14:05:49 +0000 (07:05 -0700)]
Add erc-timestamp property to invisible messages
* lisp/erc/erc-fill.el (erc-fill--wrap-beginning-of-line): Pretend
nicks with an empty string as a `display' prop are `invisible-p' and
break out of hidden "merged" nicks after moving. (Bug#60936.)
* lisp/erc/erc-match.el (erc-hide-fools): Add comment.
* lisp/erc/erc-stamp.el (erc-add-timestamp): Always add
`erc-timestamp' and `cursor-sensor-functions' properties but respect
tradition and don't actually stamp any invisible messages.
F. Jason Park [Fri, 21 Apr 2023 14:30:18 +0000 (07:30 -0700)]
Actually define erc-default-server-functions
* lisp/erc/erc-backend.el: Remove top-level `add-hook' for
`erc-default-server-functions'.
* lisp/erc/erc.el (erc-default-server-hook,
erc-default-server-functions): Officially deprecate the former and
rename it to the latter.
(erc-default-server-handler): Mark obsolete because its replacement
took over years ago.
(erc-debug-missing-hooks): Append instead of mutate.
F. Jason Park [Fri, 21 Apr 2023 02:20:59 +0000 (19:20 -0700)]
Ignore erc-reconnect-display after a timeout
* lisp/erc/erc-backend.el (erc--server-reconnect-display-timer): New
variable to store active timer that, upon firing, zeroes out
`erc--server-last-reconnect-count'.
(erc--server-last-reconnect-on-disconnect): New function to run on
`erc-disconnected-hook'.
(erc--server-last-reconnect-display-reset): New function to ensure the
reconnect-display period ends.
* lisp/erc/erc.el (erc-reconnect-display-timeout): New option to
control how long `erc-reconnect-display' affects the displaying of new
buffers following an automatic reconnection.
(erc-process-input-line): Ensure user input marks the end of the
reconnect-display period.
(erc-cmd-JOIN): Don't bother resetting
`erc--server-last-reconnect-count' because it's now handled by its
sometime caller, `erc-process-input-line'.
(erc-connection-established): Schedule timer and register hook to
reset last-reconnect count and terminate the reconnect-display period.
* test/lisp/erc/erc-scenarios-base-buffer-display.el:
(erc-scenarios-base-buffer-display--reconnect-common): Add new args to
test fixture to allow for asserting display properties at various
stages throughout a session.
(erc-scenarios-base-reconnect-options--buffer,
erc-scenarios-base-buffer-display--defwin-recbury-intbuf): Rename
former to latter and rework to better reflect realistic settings
for the relevant display options.
(erc-scenarios-base-reconnect-options--default,
erc-scenarios-base-buffer-display--defwino-recbury-intbuf): Rename
former to latter and rework to be more realistic.
(erc-scenarios-base-buffer-display--count-reset-timeout): New
test for new option `erc-reconnect-display-timeout'. (Bug#62833)
F. Jason Park [Tue, 11 Apr 2023 00:58:05 +0000 (17:58 -0700)]
Extend erc-interactive-display to cover /JOINs
* lisp/erc/erc.el (erc-display): Mention that buffer-related display
options live in the customization group `erc-buffers'.
(erc-buffer-display, erc-join-buffer): Swap alias and aliased so that
the favored name, `erc-buffer-display', appears in the definition and
in the Customize menu. Also note related buffer-display options in
the doc string.
(erc-query-display, erc-interactive-display): Make the former an alias
of the latter, new in ERC 5.6, because their roles were functionally
redundant and thus confusing. Inherit the default value from
`erc-query-display' because users are more familiar with the pop-up
window behavior than a single-window replacement.
(erc-reconnect-display): Use preferred name for cross-referencing
fallback option `erc-buffer-display' in doc string, and explain how
/reconnect handling differs.
(erc--setup-buffer-hook): Add new internal hook for modules that
operate on windows and frames, such as erc-speedbar and
erc-status-sidebar.
(erc-open): Run `erc--setup-buffer-hook' after `erc-setup-buffer' so
hook members know their code isn't tied to `erc-setup-buffer' itself,
which may be used in other contexts, but rather to a new ERC buffer on
which some display-related action has just been performed.
(erc--called-as-input-p): New variable for "slash" commands, like
`erc-cmd-FOO', to detect whether they're being called "interactively"
as a result of input given at ERC's prompt.
(erc-process-input-line): Bind `erc--called-as-input-p' when running
slash commands.
(erc-cmd-JOIN): When called interactively, schedule a callback to wrap
the response handler and control how new buffers are thus displayed.
(erc-cmd-QUERY): Use preferred alias for `erc-query-display'.
* test/lisp/erc/erc-scenarios-base-buffer-display.el:
(erc-scenarios-base-buffer-display--interactive-default): New test.
* test/lisp/erc/erc-tests.el (erc-process-input-line,
erc-select-read-args, erc-tls, erc--interactive): Change expected
default value of `erc-interactive-display' from `buffer' to
`window'. (Bug#62833)
F. Jason Park [Fri, 21 Apr 2023 02:23:54 +0000 (19:23 -0700)]
Move ERC's buffer-display tests to separate file
* test/lisp/erc/erc-scenarios-base-buffer-display.el: New file.
* test/lisp/erc/erc-scenarios-base-reconnect.el
(erc-scenarios-common--base-reconnect-options,
erc-scenarios-base-reconnect-options--buffer,
erc-scenarios-base-reconnect-options--default): Move to new file and
rename. (Bug#62833)
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-linger):
Lengthen timeout.
* test/lisp/erc/resources/erc-d/erc-d.el (erc-d--m): Ensure buffer is
live before inserting.
F. Jason Park [Thu, 13 Apr 2023 07:00:02 +0000 (00:00 -0700)]
Revive option erc-query-on-unjoined-chan-privmsg
* etc/ERC-NEWS: Mention reinstated and renamed legacy option
`erc-query-on-unjoined-chan-privmsg' as well as a change in behavior
for `erc-auto-query', when nil. Also fix erroneous ChangeLog
reference in 5.5 section.
* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Consider flag
`erc-receive-query-display-defer' and revived option
`erc-query-unjoined-chan-privmsg' when deciding whether to create a
new query buffer. And only "open" a buffer for an unknown target when
the latter option is non-nil.
* lisp/erc/erc.el (erc-cmd-QUERY): Make error more informative.
(erc-query): Revise deprecation message.
(erc-auto-query, erc-receive-query-display): Swap alias and aliased
and add option to `erc-buffers' group. Mention the nonstandard
meaning of nil and update package-version to signify a behavioral
change, even though the default value remains untouched.
(erc-receive-query-display-defer): Add new variable, a compatibility
switch to access legacy behavior for `erc-auto-query'.
(erc-query-on-unjoined-chan-privmsg,
erc-ensure-target-buffer-on-privmsg): Revise doc string and add alias.
Change package-version to ERC 5.6 due to slightly refined meaning.
* test/lisp/erc/erc-scenarios-base-attach.el: New file.
* test/lisp/erc/resources/base/channel-buffer-revival/reattach.eld:
New file. (Bug#62833)
* test/lisp/emacs-lisp/cl-lib-tests.el (old-struct):
Use the `vector` constructor instead of vector literals to
avoid failing because of `type-of` constant-folding.
* lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p):
Allow quoted lists and conses, and vector literals, to be substituted
from lexical variables. This can eliminate variable bindings and
create new constant folding opportunities.
Remove useless handling of erroneous code in Lisp optimiser
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
((closure ...) ...) is a malformed function call; treat it as such.
Better malformed function warning location.
João Távora [Fri, 5 May 2023 18:44:11 +0000 (19:44 +0100)]
Fido-mode: never shadow 'external' completion style
As explained in the manual (20.7.2 Fast minibuffer selection)
'fido-mode' and 'fido-vertical-mode' give priority the "flex"
completion style.
In fact, bug#62015 was recently fixed in commit because that priority
was not taking place correctly and some completions were missed.
However, an exception must be made for the 'external' completion
style.
That style, made available by the lisp/external-completion.el library,
is specifically designed to work with backends that provide only a
partial view of all completions. If we allow 'flex' to step in front
of 'external' it could mean that 'flex' matches something and
'external' isn't triggered as it probably should.
To reproduce have the rust-mode ELPA package and the rust-analyzer LSP
server handy. Then:
Now start M-x eglot and M-x fido-vertical-mode and type C-u M-. to
find an arbitrary symbol in this one-file project.
Type 'f'. You will see the three foo's are listed, correctly.
Now type '3'. You will only see "foo3".
But that's wrong because "foobar3" was available, if only the server
had been asked for it. This commit fixes the situation and no
completions are lost.
As an unfortunate side-effect of this commit, the fontification of
completions-common-part on the matches is lost, but that is not worse
than missing out on completions and there are better ways to recover
the fontification anyway (in external-completion.el).
See also:
https://github.com/joaotavora/eglot/discussions/1219#discussioncomment-5818336
* lisp/icomplete.el (icomplete--fido-ccd): Do not touch entries
with 'external in them.
Fix dired and tramp where `ls` does not have the `-N` option
This includes BSD ls, also used by macOS (bug#63142).
* lisp/dired.el (dired-insert-directory):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Test whether -N is understood by ls since that option is used along
with --dired. Remove -N when we remove --dired.
Eli Zaretskii [Fri, 5 May 2023 07:08:59 +0000 (10:08 +0300)]
Fix arguments of xml.c functions as displayed in Help buffers
* lisp/subr.el (libxml-parse-xml-region)
(libxml-parse-html-region): Adjust advertised-calling-convention
to the changes in commit cc33c6cf3a. (Bug#63291)
Cyril Arnould [Wed, 3 May 2023 19:40:18 +0000 (19:40 +0000)]
Improve VHDL mode highlighting
* lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist): Differentiate
between ModelSim errors, warnings, and notes when highlighting
them. Add a new entry for Xilinx Vivado. (Bug#63251)
* lisp/net/rcirc.el (rcirc): Pass SERVER-ALIAS before CLIENT-CERT.
(rcirc-connect): Take SERVER-ALIAS before CLIENT-CERT.
This is necessary for the 'rcirc-reconnect' trick to work that applies
the contents of 'rcirc-connection-info' to 'rcirc-connect', otherwise
the server alias gets lost as certfp information.
Thuna [Wed, 23 Nov 2022 03:14:36 +0000 (04:14 +0100)]
Fix rcirc messages printing in the wrong place
* lisp/net/rcirc.el (rcirc-send-message): Print the message before
sending it to the server.
(rcirc-print): Get the time with subsecond precision.
* lisp/calendar/parse-time.el (parse-time-string
parse-iso8601-time-string): Accept optional second FORM arguments,
with the same meaning as in `decode-time'. Mention as such in the
docstring. (Bug#59501)
Prevent unnecessary modifications of 'package-vc-selected-packages'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Handle the
structure of correctly, not as an alist but a list of alists.
(package-vc--archive-spec-alist, package-vc--archive-spec-alists,
package-vc--desc->spec, package-vc--read-archive-data,
package-vc--download-and-read-archives, package-vc--unpack): Rename
'package-vc--archive-spec-alist' to 'package-vc--archive-spec-alists'.
Randy Taylor [Wed, 26 Apr 2023 15:15:45 +0000 (11:15 -0400)]
go-ts-mode: Use iota query only if supported (Bug#63086)
iota query support was added on January 5, 2022. To support older
versions of the tree-sitter-go grammar (like the latest tagged version,
v0.19.1, which was released on March 3, 2021), check if the query is
supported before trying to use it.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--iota-query-supported-p): New
function.
(go-ts-mode--font-lock-settings): Use it.
Dmitry Gutov [Wed, 3 May 2023 20:58:27 +0000 (23:58 +0300)]
(rng-complete-tag): Add the (ignored) argument to the :company-kind function
* lisp/nxml/rng-nxml.el (rng-complete-tag): Add the (ignored)
argument to the :company-kind function. Fixes the "Wrong number
of arguments" error reported at
https://github.com/company-mode/company-mode/issues/1386.
Recognize defstruct slot names in various eieio functions
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Set
each slot's name's 'slot-name' property so that
'eieio--known-slot-name-p' can recognize them. (Bug#62959)
Alan Mackenzie [Wed, 3 May 2023 10:01:14 +0000 (10:01 +0000)]
Fontify "extern foo ();" correctly inside a function
This fixes bug#63224.
* lisp/progmodes/cc-engine.el (c-forward-type): Handle the "("
as a special case by trying to parse it with
c-forward-declarator and accepting it as a typeless function
when that fails.