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 [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.
Jim Porter [Mon, 1 May 2023 16:49:00 +0000 (09:49 -0700)]
Use connection-aware functions when getting the UID/GID in Eshell
This means, for example, that when using Tramp to sudo in Eshell, "rm"
queries the user before deleting anything (bug#63221).
* lisp/eshell/esh-util.el (eshell-user-login-name): New function...
* lisp/eshell/em-unix.el (eshell/whoami): ... use it.
* lisp/eshell/em-ls.el (eshell-ls-applicable): Use 'file-user-uid' and
'eshell-user-login-name'.
(eshell-ls-decorated-name): Use 'file-user-uid'.
* lisp/eshell/em-pred.el (eshell-predicate-alist): Use 'file-user-uid'
and 'file-group-gid'.
* lisp/eshell/em-unix.el (eshell-interactive-query): New widget...
(eshell-rm-interactive-query, eshell-mv-interactive-query)
(eshell-cp-interactive-query, eshell-ln-interactive-query): ... use
it.
(eshell-interactive-query-p): New function...
(eshell/rm, eshell/mv, eshell/cp, eshell/ln): ... use it.
* lisp/simple.el (file-group-gid): New function.
* lisp/net/ange-ftp.el (ange-ftp-file-group-gid): New function...
(file-group-gid): ... use it.
* lisp/net/tramp.el (tramp-handle-file-group-gid):
* lisp/net/tramp-archive.el (tramp-archive-handle-file-group-gid): New
functions.
Shynur [Mon, 1 May 2023 17:32:44 +0000 (01:32 +0800)]
Display matched offscreen open paren with a distinct face
Propertize matched offscreen openparen that is showing in
the echo area in order to make it prominent; use shadow
face for non-context characters (i.e., 'Matches') for the
same purpose.
* lisp/simple.el (blink-matching-paren-offscreen): Add this
face for highlighting.
* lisp/simple.el (blink-matching-paren-highlight-offscreen): Add
this option to toggle face `blink-matching-paren-offscreen'.
* lisp/simple.el (blink-paren-open-paren-line-string): Propertize
the matched offscreen openparen with a face conditionally.
(Bug#63089)
Handle point not at EOB in minibuffer-choose-completion
Without this change, only the minibuffer contents before point
are cleared when a completion is chosen, which results in stray
text when point is in the middle of the minibuffer.
After this change, we heuristically decide either to clear the
whole buffer or only part of it, taking into account the
location of point.
This is a backport for the Emacs 29 release branch of a simpler
fix in minibuffer-completion-help.
* lisp/minibuffer.el (minibuffer-next-completion):
(minibuffer-choose-completion):
Recalculate completion-base-affixes with point. (Bug#62700)
Eli Zaretskii [Tue, 2 May 2023 17:46:17 +0000 (20:46 +0300)]
Fix Dired when QUITING_STYLE is set in the environment
* lisp/dired.el (dired-insert-directory): Ensure non-default
quoting style of file names is not used by 'ls' when we invoke it
with the --dired switch. (Bug#63142)
Eli Zaretskii [Tue, 2 May 2023 12:43:51 +0000 (15:43 +0300)]
Revert "; * lisp/progmodes/c-ts-mode.el: allow loading file without treesit"
This reverts commit 7d246c359cf3d25cab5134076e393c4d25015827.
The same problem was already fixed on the release branch,and this
change will just cause merge conflicts.
Declare `cl-delete` to have important-return-value (bug#61730)
* lisp/emacs-lisp/cl-macs.el: Set property on `cl-delete`.
* lisp/progmodes/python.el (python-shell--add-to-path-with-priority):
Prevent warning by cleaner code.
Add the function declaration and property `important-return-value`
Now the declaration
(declare (important-return-value t))
can be used to have the byte-compiler warn when the return value from
a call is discarded (bug#61730).
* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(important-return-value-fns): Use the function property
`important-return-value` instead of looking through a static list.
* lisp/emacs-lisp/byte-run.el (byte-run--set-important-return-value)
(defun-declarations-alist): New function declaration, setting the
property of the same name.
* lisp/emacs-lisp/cl-macs.el:
* lisp/subr.el (assoc-default): Set the property.
* doc/lispref/functions.texi (Declare Form):
* doc/lispref/symbols.texi (Standard Properties): Document.
* etc/NEWS: Announce.
Eli Zaretskii [Mon, 1 May 2023 12:27:21 +0000 (15:27 +0300)]
Fix vertical-motion when tab-line is displayed in a window
* src/xdisp.c (try_window, try_window_id): Account for tab-line,
if present, when converting scroll-margin at the top of the window
to vertical pixel coordinate. (Bug#63201)
F. Jason Park [Fri, 28 Apr 2023 14:01:14 +0000 (07:01 -0700)]
Compare case-folded nicks with erc-fill-wrap-merge
* lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Downcase
both current and previous speaker when comparing nicks.
* test/lisp/erc/erc-fill-tests.el (erc-fill-wrap--merge): Add
title-case nick to test.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update
snapshot.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update
snapshot. (Bug#60936)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Remove
optimisation that would mistakenly discard old loaddefs in case a file
was not modified by EXTRA-DATA is non-nil. (Bug#62734)
Eli Zaretskii [Sun, 30 Apr 2023 13:24:05 +0000 (16:24 +0300)]
Fix redisplay of mode line after its format changes from nil
* src/dispnew.c (update_window): Make sure a mode-line's row of
the current glyph matrix is disabled when the mode line is not
being displayed. (Bug#63186)
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.
Yuan Fu [Sat, 29 Apr 2023 22:39:54 +0000 (15:39 -0700)]
Fix FOR_EACH_TAIL fontification (bug#62951)
Fix the fontification inconsistency between different FOR_EACH_TAIL's.
See the comment for more explanation. Also enable the emacs-devel
feature automatically when c-ts-mode-emacs-sources-support is on.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--for-each-tail-regexp): Move up.
(c-ts-mode--font-lock-settings): New font-lock rule for FOR_EACH_TAIL.
(c-ts-mode--fontify-for-each-tail): New function.
(c-ts-mode): Automatically enable emacs-devel feature.
Eli Zaretskii [Sat, 29 Apr 2023 08:50:47 +0000 (11:50 +0300)]
Optimize search for composable characters in redisplay
* src/composite.c (composition_compute_stop_pos): Accept new
argument INCLUDE_STATIC, and look for potential static
compositions only if this argument is non-zero.
* src/xdisp.c:
* src/composite.c:
* src/indent.c: All callers adjusted.
* src/xdisp.c (compute_stop_pos): Don't search for static
compositions. Search for automatic compositions only after the
iterator gets past the composition stop_pos computed last time.
Use a better position for limiting search for automatic
compositions. (Bug#62780)
Eli Zaretskii [Sat, 29 Apr 2023 06:39:15 +0000 (09:39 +0300)]
Fix documentation of libxml-parse-* functions
* doc/lispref/text.texi (Parsing HTML/XML):
* src/xml.c (Flibxml_parse_html_region, Flibxml_parse_xml_region):
Update the documentation regarding the use of BASE-URL argument.
(Bug#63125)
Jonas Bernoulli [Wed, 29 Mar 2023 14:57:33 +0000 (16:57 +0200)]
Support displaying all package maintainers (Bug#62524)
* lisp/emacs-lisp/package.el (describe-package-1): Use new
:maintainers package extra property from "archive-contents",
if non-nil.
* (package-buffer-info): Fix docstring.