]> git.eshelyaron.com Git - emacs.git/log
emacs.git
16 months agoRevise FORM-as-function interface in erc-button-alist
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)

16 months agoPreprocess prompt input linewise in ERC
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)

16 months agoRedo line splitting for outgoing messages in ERC
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)

16 months agoDon't send multiline commands as messages in ERC
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)

16 months agoRestore module var toggles in ERC's Custom buffers
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)

16 months agoSimplify erc-button movement commands
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)

16 months agoAdd erc-timestamp property to invisible messages
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.

16 months agoActually define erc-default-server-functions
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.

16 months agoIgnore erc-reconnect-display after a timeout
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)

16 months agoExtend erc-interactive-display to cover /JOINs
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)

16 months agoMove ERC's buffer-display tests to separate file
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.

16 months agoRevive option erc-query-on-unjoined-chan-privmsg
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)

16 months agoMake old-struct test more robust
Mattias Engdegård [Thu, 4 May 2023 15:47:05 +0000 (17:47 +0200)]
Make old-struct test more robust

* 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.

16 months agoConstant-propagate cons and vector literals
Mattias Engdegård [Thu, 4 May 2023 15:37:17 +0000 (17:37 +0200)]
Constant-propagate cons and vector literals

* 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.

16 months agoRemove useless handling of erroneous code in Lisp optimiser
Mattias Engdegård [Thu, 4 May 2023 15:31:15 +0000 (17:31 +0200)]
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.

16 months agoDon't inline funcall to literal lambda form
Mattias Engdegård [Thu, 4 May 2023 15:28:08 +0000 (17:28 +0200)]
Don't inline funcall to literal lambda form

* lisp/emacs-lisp/byte-opt.el (byte-optimize-funcall): Don't convert

  (funcall '(lambda ...) ...) -> ((lambda ...) ...)

because that would inline what is essentially an `eval` of a
function using dynamic binding rules into lexbound code.

16 months agoFido-mode: never shadow 'external' completion style
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:

  emacs -Q -f package-initialize main.rs

Where main.rs is this content:

  fn foo1()    {} fn foo2()    {} fn foo3() {}
  fn foobar1() {} fn foobar2() {} fn foobar3() {}

The rust-analyzer server can be quickly configured to return only 3
workspace symbols max, so evaluate:

  (setq-default eglot-workspace-configuration
                '(:rust-analyzer
                    (:workspace (:symbol (:search (:limit 3))))))

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.

16 months agoImprove ange-ftp-file-remote-p
Michael Albinus [Fri, 5 May 2023 17:39:22 +0000 (19:39 +0200)]
Improve ange-ftp-file-remote-p

* lisp/net/ange-ftp.el (ange-ftp-file-remote-p): Handle hop
identification.

16 months agoFix dired and tramp where `ls` does not have the `-N` option
Mattias Engdegård [Fri, 5 May 2023 17:19:51 +0000 (19:19 +0200)]
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.

16 months ago; Use a Bourne shell-compatible form for command substitution
Jim Porter [Fri, 5 May 2023 05:43:13 +0000 (22:43 -0700)]
; Use a Bourne shell-compatible form for command substitution

* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use `` instead of $().

16 months ago; Allow spaces in directory names for Git hooks
Jim Porter [Fri, 5 May 2023 04:04:46 +0000 (21:04 -0700)]
; Allow spaces in directory names for Git hooks

* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Quote "$HOOKS_DIR" to allow spaces.

16 months agoMake vc-hg-annotate-command async
Spencer Baugh [Thu, 27 Apr 2023 16:11:45 +0000 (12:11 -0400)]
Make vc-hg-annotate-command async

There's no benefit in this running the process synchrounously, and
it's annoying for it to block the Emacs UI.

* lisp/vc/vc-hg.el (vc-hg-annotate-command):
Run asynchronously (bug#63123).

16 months agoSuspend timers when reading Tramp process output
Michael Albinus [Thu, 4 May 2023 18:42:24 +0000 (20:42 +0200)]
Suspend timers when reading Tramp process output

* lisp/net/tramp-compat.el (xdg): Require.
(tramp-compat-temporary-file-directory): Set it to
$XDG_CACHE_HOME/emacs if possible.

* lisp/net/tramp.el (tramp-debug-to-file): Fix docstring.
(tramp-wrong-passwd-regexp): Add "Authentication failed" string
(from doas).
(tramp-debug-message): Simplify backtrace check.
(with-tramp-locked-connection): Suppress timers.  (Bug#49954, Bug60534)

* test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents):
Adapt test.
(tramp-test45-asynchronous-requests): Remove :unstable tag.
Adapt test.

16 months ago; Fix post-commit and pre-push hooks in worktrees again
Jim Porter [Thu, 4 May 2023 16:22:40 +0000 (09:22 -0700)]
; Fix post-commit and pre-push hooks in worktrees again

* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use "$(dirname $0)" to get the hooks
directory.

16 months ago* lisp/emacs-lisp/package.el (package-buffer-info): Fix thinko
Stefan Monnier [Wed, 3 May 2023 17:18:08 +0000 (13:18 -0400)]
* lisp/emacs-lisp/package.el (package-buffer-info): Fix thinko

16 months agoTramp code cleanup
Michael Albinus [Wed, 3 May 2023 11:26:35 +0000 (13:26 +0200)]
Tramp code cleanup

* doc/lispref/files.texi (Magic File Names): Order alphabetically.

* lisp/net/tramp.el (tramp-file-name-for-operation):
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Order alphabetically.

* lisp/net/tramp.el (tramp-handle-file-user-uid)
(tramp-handle-file-group-gid, tramp-read-id-output):
* lisp/net/tramp-archive.el (tramp-archive-handle-file-group-gid):
(tramp-archive-handle-file-user-uid): Fix docstring.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test44-user-group-ids): Fix docstring.

16 months ago; * lisp/dired.el (dired-insert-directory): Fix a typo in a comment.
Eli Zaretskii [Wed, 3 May 2023 11:15:42 +0000 (14:15 +0300)]
; * lisp/dired.el (dired-insert-directory): Fix a typo in a comment.

16 months agoFontify "extern foo ();" correctly inside a function
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.

16 months ago; * lisp/simple.el (blink-matching-open): retain props in bootstrap
Mattias Engdegård [Wed, 3 May 2023 09:09:37 +0000 (11:09 +0200)]
; * lisp/simple.el (blink-matching-open): retain props in bootstrap

16 months agoUse connection-aware functions when getting the UID/GID in Eshell
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.

* lisp/net/tramp.el (tramp-file-name-for-operation): Add
'file-group-gid'.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'file-group-gid' mapping.

* test/lisp/net/tramp-tests.el (tramp-test44-file-user-group-ids):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test44-file-user-group-ids): Add tests for
'file-group-gid'.

* doc/lispref/files.texi (Magic File Names): Mention 'file-group-gid'.

* doc/lispref/os.texi (User Identification): Document
'file-group-gid', and move 'group-real-gid' to match the order of
'user-real-uid'.

* etc/NEWS: Announce 'file-group-gid'.

16 months ago; Fix last change
Eli Zaretskii [Tue, 2 May 2023 18:36:26 +0000 (21:36 +0300)]
; Fix last change

* lisp/simple.el (blink-matching-paren-highlight-offscreen)
(blink-matching-paren-offscreen)
(blink-paren-open-paren-line-string): Doc fixes.  (Bug#63089)

16 months agoDisplay matched offscreen open paren with a distinct face
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)

16 months agoFix Dired when QUITING_STYLE is set in the environment
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)

16 months ago; * doc/lispref/functions.texi (Declare Form): Fix whitespace.
Eli Zaretskii [Tue, 2 May 2023 12:55:44 +0000 (15:55 +0300)]
; * doc/lispref/functions.texi (Declare Form): Fix whitespace.

16 months agoMerge from origin/emacs-29
Eli Zaretskii [Tue, 2 May 2023 12:50:09 +0000 (08:50 -0400)]
Merge from origin/emacs-29

46392c1623b Fix vertical-motion when tab-line is displayed in a window
0e52beeacea Update to Org 9.6.5-3-g2993f4
dd21003878d Prevent generating empty autoload files
2bcf11d0efe * lisp/org/org-macs.el (org--inhibit-version-check): Fix ...
ca43435816b Fix redisplay of mode line after its format changes from nil
610a7657e0a Fix c-ts-mode--emacs-c-range-query
7f94558b775 Improve documentation of warnings
5a3f0e2c558 ; Doc fix in c-ts-mode.el
21361d05635 Fix FOR_EACH_TAIL fontification (bug#62951)
d0df3404fde ; * etc/EGLOT-NEWS:  chsharp-le -> csharp-ls
c229e83c3ce ; * etc/EGLOT-NEWS (https): Elglot -> Eglot.
b4f2f499783 Fix documentation of libxml-parse-* functions
5dd784961d1 ; * src/treesit.c (syms_of_treesit): Fix error messages.
ddfa0d8da9a ; Remove some leftover text

16 months agoRevert "; * lisp/progmodes/c-ts-mode.el: allow loading file without treesit"
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.

16 months ago; * lisp/progmodes/c-ts-mode.el: allow loading file without treesit
Mattias Engdegård [Mon, 1 May 2023 17:08:12 +0000 (19:08 +0200)]
; * lisp/progmodes/c-ts-mode.el: allow loading file without treesit

16 months ago; Use $GIT_DIR to find the .git directory inside our hooks
Jim Porter [Mon, 1 May 2023 16:49:39 +0000 (09:49 -0700)]
; Use $GIT_DIR to find the .git directory inside our hooks

This resolves an issue with running the hooks from a worktree.  See
<https://lists.gnu.org/archive/html/emacs-devel/2023-05/msg00000.html>.

* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use $GIT_DIR.

16 months agoDeclare `cl-delete` to have important-return-value (bug#61730)
Mattias Engdegård [Mon, 1 May 2023 15:22:02 +0000 (17:22 +0200)]
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.

16 months agoAdd the function declaration and property `important-return-value`
Mattias Engdegård [Mon, 1 May 2023 13:55:32 +0000 (15:55 +0200)]
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.

16 months agoFix vertical-motion when tab-line is displayed in a window
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)

16 months agoCompare case-folded nicks with erc-fill-wrap-merge
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)

16 months agoUpdate to Org 9.6.5-3-g2993f4
Kyle Meyer [Sun, 30 Apr 2023 23:36:21 +0000 (19:36 -0400)]
Update to Org 9.6.5-3-g2993f4

16 months agoPrevent generating empty autoload files
Philip Kaludercic [Sun, 30 Apr 2023 11:17:09 +0000 (13:17 +0200)]
Prevent generating empty autoload files

* 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)

16 months ago* lisp/org/org-macs.el (org--inhibit-version-check): Fix docstring
Stefan Monnier [Sun, 30 Apr 2023 13:41:13 +0000 (09:41 -0400)]
* lisp/org/org-macs.el (org--inhibit-version-check): Fix docstring

Also, add an explanation to the docstring for what the version
check is about.

16 months agoFix redisplay of mode line after its format changes from nil
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)

16 months agoFix c-ts-mode--emacs-c-range-query
Michael Albinus [Sun, 30 Apr 2023 10:11:00 +0000 (12:11 +0200)]
Fix c-ts-mode--emacs-c-range-query

* lisp/progmodes/c-ts-mode.el (c-ts-mode--emacs-c-range-query):
Check for (treesit-available-p).

16 months agoImprove documentation of warnings
Eli Zaretskii [Sun, 30 Apr 2023 08:07:36 +0000 (11:07 +0300)]
Improve documentation of warnings

* doc/lispref/control.texi (Errors):
* doc/lispref/os.texi (Startup Summary):
* doc/lispref/display.texi (Warning Basics, Warning Variables)
(Warning Options, Delayed Warnings): Improve documentation of
warnings.  Document the automatic delaying of warnings during
startup.  (Bug#63181)

16 months ago; Doc fix in c-ts-mode.el
Eli Zaretskii [Sun, 30 Apr 2023 05:21:38 +0000 (08:21 +0300)]
; Doc fix in c-ts-mode.el

* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-for-each-tail):
Doc fix.

16 months agoFix outgoing mime type regression (Bug#62815)
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.

16 months agoFix FOR_EACH_TAIL fontification (bug#62951)
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.

16 months agoEglot: bump to 1.15
João Távora [Sat, 29 Apr 2023 19:47:24 +0000 (20:47 +0100)]
Eglot: bump to 1.15

* lisp/progmodes/eglot.el (Version): Bump to 1.15

* etc/EGLOT-NEWS: Update.

16 months agoEglot: unbreak for Emacs 26
João Távora [Sat, 29 Apr 2023 19:46:12 +0000 (20:46 +0100)]
Eglot: unbreak for Emacs 26

Emacs 26 doesn't have newer progress-reporter-update.
I think I'll start using compat.el soon.

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Unbreak for
Emacs 26 which doesn't have newer progress-reporter-update.

16 months ago; * etc/EGLOT-NEWS: chsharp-le -> csharp-ls
Theodor Thornhill [Sat, 29 Apr 2023 17:59:49 +0000 (19:59 +0200)]
; * etc/EGLOT-NEWS:  chsharp-le -> csharp-ls

16 months ago; * etc/EGLOT-NEWS (https): Elglot -> Eglot.
Theodor Thornhill [Sat, 29 Apr 2023 17:54:09 +0000 (19:54 +0200)]
; * etc/EGLOT-NEWS (https): Elglot -> Eglot.

16 months agoImprove call indentation for elixir-ts-mode
Wilhelm H Kirschbaum [Thu, 27 Apr 2023 10:13:25 +0000 (12:13 +0200)]
Improve call indentation for elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--indent-rules): Change match order.
(Bug#63110)

* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test case.

16 months agoAdd bitstring indentation and navigation for elixir-ts-mode
Wilhelm H Kirschbaum [Thu, 27 Apr 2023 09:39:39 +0000 (11:39 +0200)]
Add bitstring indentation and navigation for elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--sexp-regexp): Add bistring.
(elixir-ts--indent-rules): Handle bitstring indentation.
(Bug#63109)

* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test case.

16 months agoOptimize search for composable characters in redisplay
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)

16 months agoFix documentation of libxml-parse-* functions
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)

16 months ago; * src/treesit.c (syms_of_treesit): Fix error messages.
Eli Zaretskii [Fri, 28 Apr 2023 18:14:32 +0000 (21:14 +0300)]
; * src/treesit.c (syms_of_treesit): Fix error messages.

16 months ago; Remove some leftover text
Dmitry Gutov [Fri, 28 Apr 2023 16:28:25 +0000 (19:28 +0300)]
; Remove some leftover text

16 months agoSupport displaying all package maintainers (Bug#62524)
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.

16 months agoMerge from origin/emacs-29
Eli Zaretskii [Fri, 28 Apr 2023 16:14:26 +0000 (12:14 -0400)]
Merge from origin/emacs-29

212e30f6789 ; Fix byte-compilation warnings in c-ts-mode.el
1f2214dabd0 Skip over whitespace in annotation-top-cont check (bug#63...
7e136c51f6f Update zh-CN tutorial translation
d3ca0b3aa2e ; * lisp/progmodes/c-ts-mode.el: Fix comments and doc str...
c6f15c24862 ; Fix last change.
b9e06330f75 ; * etc/NEWS: Followup to bug#62720.
b33d25f5967 ; Minor improvements in doc strings of package-upgrade co...
c3a61870b94 Fix eglot.texi

# Conflicts:
# etc/NEWS

16 months ago; Fix byte-compilation warnings in c-ts-mode.el
Eli Zaretskii [Fri, 28 Apr 2023 16:01:19 +0000 (12:01 -0400)]
; Fix byte-compilation warnings in c-ts-mode.el

* lisp/progmodes/c-ts-mode.el (treesit-parser-set-included-ranges)
(treesit-query-compile): Declare treesit.c functions.
(treesit-load-name-override-list): Defvar it.

16 months agoUse t for non-nil default values in boolean defcustom declarations
Mattias Engdegård [Fri, 28 Apr 2023 13:03:47 +0000 (15:03 +0200)]
Use t for non-nil default values in boolean defcustom declarations

* lisp/emulation/viper-ex.el (ex-unix-type-shell):
* lisp/emulation/viper-init.el (viper-ms-style-os-p):
* lisp/eshell/em-glob.el (eshell-glob-case-insensitive):
* lisp/filecache.el (file-cache-ignore-case):
* lisp/lpr.el (lpr-add-switches):
* lisp/ls-lisp.el (ls-lisp-ignore-case):
* lisp/mail/binhex.el (binhex-use-external):
* lisp/progmodes/cperl-mode.el (cperl-electric-parens-mark):
Normalise default values to nil or t.

16 months agoSkip over whitespace in annotation-top-cont check (bug#63141)
Theodor Thornhill [Fri, 28 Apr 2023 12:00:35 +0000 (14:00 +0200)]
Skip over whitespace in annotation-top-cont check (bug#63141)

* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make sure
we skip over whitespace when looking for the next '['.

16 months agoMake mode-line behavior better with grayscale visuals
Po Lu [Fri, 28 Apr 2023 06:43:31 +0000 (14:43 +0800)]
Make mode-line behavior better with grayscale visuals

* lisp/faces.el (mode-line, mode-line-inactive)
(mode-line-highlight): Enable gray faces on grayscale visuals.

16 months agoUpdate zh-CN tutorial translation
Ruijie Yu [Wed, 19 Apr 2023 02:36:22 +0000 (10:36 +0800)]
Update zh-CN tutorial translation

* etc/tutorials/TUTORIAL.cn (INTRO): Additions from English
version; say "interrupt" not "quit" a partially-entered command;
fixed minor inconsistency (English says partially-entered command,
Chinese used to say partially-executed command -- they are
different); converted half-width square brackets containing
translators' notes into full-width ones for consistency.
(BASIC CURSOR CONTROL): mention that a word boundary for Chinese
can also be space; fixed incorrect terminology (keyboard vs
terminal); retain English term "terminal"; retain English term
"prefix argument"; "most commands _interpret_ prefix args as
repeat-count", not "explain"; ensure space is added on both ends
of an English word.
(WINDOWS): Clarify it is the digit 1 in C-x 1.
(INSERTING AND DELETING): Mention the term "continuation line" and
retain its English term, because this term is mentioned again
later in the tutorial; avoid saying the name of "\\"; add
description for "electric" and a rough translation; sync English
for prefix argument for DEL and C-d; ensure that translators'
notes are marked explicitly so; add indentation to the instruction
about continuation lines; additional translations such as
mentioning C--, etc.
(FILES): Re-pluralize the heading; space around English words;
describe what C-g cancels (the command) when entering file name;
replace "search for" with "find"; minor rephrasing; explicit
translator notes; fixed the write-file message to no longer
contain ellipses (see src/fileio.c:5541).
(BUFFERS): Re-pluralize the heading; mention that C-x C-b also
shows buffer name; C-x s only looks for file-visiting buffers.
(EXTENDING THE COMMAND SET): Include C-x s and C-x b in list of
learned commands.
(MODE LINE): Remove the dashes in description on the point
location.
(MULTIPLE WINDOWS): Mention the difference between frame
and window; also add translator notes pointing to end of
tutorial which contains a terminology list.
(MULTIPLE FRAMES): Change the M-x commands to keybinds C-x 5 2 and
C-x 5 0 to sync with English.
(GETTING MORE HELP): Change C-h f to C-h x, to sync with English.
(INSTALLING PACKAGES): Rephrase "available packages", used to say
lit., "existing", now says lit., "installable"; consistently
translate the term "package", and retain its English name.
(TRANSLATION): Add my name as co-maintainer of this file.

* etc/tutorials/TUTORIAL.translators (TUTORIAL.cn): Add my name
as co-maintainer for TUTORIAL.cn.

16 months ago; * lisp/progmodes/c-ts-mode.el: Fix comments and doc strings (bug#62951).
Eli Zaretskii [Fri, 28 Apr 2023 05:40:56 +0000 (08:40 +0300)]
; * lisp/progmodes/c-ts-mode.el: Fix comments and doc strings (bug#62951).

16 months ago; Fix last change.
Eli Zaretskii [Fri, 28 Apr 2023 05:27:20 +0000 (08:27 +0300)]
; Fix last change.

16 months ago; * etc/NEWS: Followup to bug#62720.
Eli Zaretskii [Fri, 28 Apr 2023 05:26:39 +0000 (08:26 +0300)]
; * etc/NEWS: Followup to bug#62720.

16 months ago; Minor improvements in doc strings of package-upgrade commands
Eli Zaretskii [Fri, 28 Apr 2023 05:14:37 +0000 (08:14 +0300)]
; Minor improvements in doc strings of package-upgrade commands

* lisp/emacs-lisp/package.el (package-upgrade)
(package-upgrade-all): Doc fixes.  (Bug#62720)

16 months agoFix eglot.texi
Eli Zaretskii [Fri, 28 Apr 2023 04:54:16 +0000 (07:54 +0300)]
Fix eglot.texi

* doc/misc/eglot.texi (Troubleshooting Eglot): Add missing @menu.
(Performance, Getting the latest version): Improve wording and
indexing, add cross-references.

16 months agoMerge from origin/emacs-29
Po Lu [Fri, 28 Apr 2023 03:51:01 +0000 (11:51 +0800)]
Merge from origin/emacs-29

a40f1816237 Fix two crashes upon startup
44ebd9cbd56 Eglot: explain how to update Eglot in manual (bug#62720)
941ef044f2e Eglot: fix edge case when deleting inlay hint overlays
a365984d9e1 package-upgrade[-all]: Expand docstrings to note the curr...
f965f35b33b Rename all functions called package-*-update-* to package...
31b58161bb5 Fix FOR_EACH_TAIL in c-ts-mode (bug#62951)
0cf6e0998ba * Makefile.in (distclean): Remove the 'native-lisp' direc...
933705d61e5 Improve greek-ibycus4 input method

# Conflicts:
# etc/NEWS

16 months agoFix two crashes upon startup
Po Lu [Fri, 28 Apr 2023 03:47:46 +0000 (11:47 +0800)]
Fix two crashes upon startup

* src/image.c (image_create_bitmap_from_data)
(image_create_bitmap_from_file): Specify a Window or a Pixmap
describing the screen, not a back buffer drawable which may not exist.
Otherwise, Emacs crashes on startup when a bitmap icon is in use.

16 months agoEglot: explain how to update Eglot in manual (bug#62720)
João Távora [Thu, 27 Apr 2023 20:08:17 +0000 (21:08 +0100)]
Eglot: explain how to update Eglot in manual (bug#62720)

* lisp/progmodes/eglot.el (eglot-update): New command.

* doc/misc/eglot.texi (Troubleshooting): Rework.

16 months agoEglot: fix edge case when deleting inlay hint overlays
João Távora [Thu, 27 Apr 2023 19:51:07 +0000 (20:51 +0100)]
Eglot: fix edge case when deleting inlay hint overlays

When asked to update hints in a region (FROM TO),
eglot--update-hints-1 first deletes the existing hints.  It must
however take care to delete all overlays that logically belong to the
region, even if they don't physically belong to it, e.g. inlay
overlays spanning (FROM-1 FROM) and having a 'after-string' property.

* lisp/progmodes/eglot.el (eglot--update-hints-1): Fix edge case.

16 months agopackage-upgrade[-all]: Expand docstrings to note the current limitation
Dmitry Gutov [Thu, 27 Apr 2023 23:24:10 +0000 (02:24 +0300)]
package-upgrade[-all]: Expand docstrings to note the current limitation

* lisp/emacs-lisp/package.el (package-upgrade, package-upgrade-all):
Expand docstrings to note the current limitation (bug#62720).

16 months agoRename all functions called package-*-update-* to package-*-upgrade-*
Dmitry Gutov [Sun, 23 Apr 2023 23:00:54 +0000 (02:00 +0300)]
Rename all functions called package-*-update-* to package-*-upgrade-*

* lisp/emacs-lisp/package-vc.el (package-vc-upgrade-all):
Rename from 'package-vc-update-all'.
(package-vc-upgrade): Rename from 'package-vc-update'.

* lisp/emacs-lisp/package.el (package-upgrade):
Rename from 'package-update' (bug#62750).
(package--upgradeable-packages):
Rename from 'package--updateable-packages'.
(package-upgrade-all): Rename from 'package-update-all'.

16 months agoFix FOR_EACH_TAIL in c-ts-mode (bug#62951)
Yuan Fu [Thu, 27 Apr 2023 03:09:42 +0000 (20:09 -0700)]
Fix FOR_EACH_TAIL in c-ts-mode (bug#62951)

* lisp/progmodes/c-ts-mode.el
(c-ts-mode--indent-styles): New indent rule.

(c-ts-mode--for-each-tail-regexp)
(c-ts-mode--for-each-tail-body-matcher)
(c-ts-mode--emacs-c-range-query)
(c-ts-mode--for-each-tail-ranges)
(c-ts-mode--reverse-ranges)
(c-ts-mode--emacs-set-ranges): New functions and variables.

(c-ts-mode): Create a emacs-c parser.  More setup for Emacs source
support.

* lisp/treesit.el (treesit-query-range): Ignore underscore-prefixed
capture names.

16 months ago* Makefile.in (distclean): Remove the 'native-lisp' directory.
Eli Zaretskii [Thu, 27 Apr 2023 18:39:33 +0000 (21:39 +0300)]
* Makefile.in (distclean): Remove the 'native-lisp' directory.

16 months agoFix thinko in tramp-gvfs-maybe-open-connection
Michael Albinus [Thu, 27 Apr 2023 17:41:18 +0000 (19:41 +0200)]
Fix thinko in tramp-gvfs-maybe-open-connection

* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Use `assoc-default'.

16 months agoFix Tramp bug#63102
Michael Albinus [Thu, 27 Apr 2023 17:40:46 +0000 (19:40 +0200)]
Fix Tramp bug#63102

* lisp/net/tramp.el (tramp-remote-path): Add ;;;###tramp-autoload cookie.
(Bug#63102)

16 months agoClarify `nconc` behaviour for dotted lists (bug#63103)
Mattias Engdegård [Thu, 27 Apr 2023 11:52:57 +0000 (13:52 +0200)]
Clarify `nconc` behaviour for dotted lists (bug#63103)

* doc/lispref/lists.texi (Rearrangement): Explicitly say that dotted
lists are valid args to `nconc` and give an example.

16 months agoDon't rewrite (nconc X nil) -> X for any X (bug#63103)
Mattias Engdegård [Thu, 27 Apr 2023 10:38:58 +0000 (12:38 +0200)]
Don't rewrite (nconc X nil) -> X for any X (bug#63103)

Since the last cdr of a non-terminal argument to `nconc` is
overwritten no matter its value:

  (nconc (cons 1 2) nil) => (1)

a terminating nil arg cannot just be eliminated unconditionally.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-nconc):
Only eliminate a terminal nil arg to `nconc` if preceded by
a nonempty proper list.  Right now we only bother to prove this
for `(list ...)`, so that

  (nconc (list 1 2 3) nil) -> (list 1 2 3)

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-cases): Add test cases.

16 months ago; * admin/charsets/mapconv (LC_ALL): Fix typo.
Po Lu [Thu, 27 Apr 2023 10:51:40 +0000 (18:51 +0800)]
; * admin/charsets/mapconv (LC_ALL): Fix typo.

16 months agoFix bootstrap on Unix
Po Lu [Thu, 27 Apr 2023 10:50:47 +0000 (18:50 +0800)]
Fix bootstrap on Unix

* admin/charsets/Makefile.in (${charsetdir}/JISX0201.map): Use
run_mapconv, which uses the correct awk.
* admin/charsets/mapconv (LC_ALL): Don't place assignment in
same line as export.

16 months agoImprove greek-ibycus4 input method
Eli Zaretskii [Thu, 27 Apr 2023 07:25:20 +0000 (10:25 +0300)]
Improve greek-ibycus4 input method

* lisp/leim/quail/greek.el ("greek-ibycus4"): Add another sequence
for CAPITAL LETTER RHO WITH DASIA.  (Bug#63104)

16 months ago; Merge from origin/emacs-29
Stefan Kangas [Thu, 27 Apr 2023 04:30:14 +0000 (06:30 +0200)]
; Merge from origin/emacs-29

The following commit was skipped:

c46e93b1f50 Explain ERC 5.5 regressions in new version 5.5.0.29.1

16 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 27 Apr 2023 04:30:14 +0000 (06:30 +0200)]
Merge from origin/emacs-29

af43f0a2954 * doc/misc/erc.texi: Elaborate on upgrading via ELPA.
10948948c12 Improve outline-default-state docstring
b5ace2eed80 Document problems with /bin/sh on Solaris 10
7b2ad8f199e ; Add missing <<inserted by help-with-tutorial>> line to ...

16 months ago; * lisp/help.el (describe-bindings-outline-rules): Fix :type tags.
Eli Zaretskii [Wed, 26 Apr 2023 16:25:23 +0000 (19:25 +0300)]
; * lisp/help.el (describe-bindings-outline-rules): Fix :type tags.

16 months agoNew command 'tramp-cleanup-some-buffers'
Michael Albinus [Wed, 26 Apr 2023 16:06:39 +0000 (18:06 +0200)]
New command 'tramp-cleanup-some-buffers'

* doc/misc/tramp.texi (Cleanup remote connections):
Document tramp-cleanup-some-buffers and
tramp-cleanup-some-buffers-hook.

* etc/NEWS: New command 'tramp-cleanup-some-buffers'.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-taint-remote-process-buffer'.

* lisp/net/tramp.el (tramp-post-process-creation): New defun.
(tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection)
(tramp-sudoedit-send-command): Use it.

* lisp/net/tramp-cmds.el (tramp-tainted-remote-process-buffers):
New defvar.
(tramp-cleanup-dired-buffer-p)
(tramp-delete-tainted-remote-process-buffer-function)
(kill-buffer-hook, tramp-cleanup-remote-process-p)
(tramp-cleanup-some-buffers): New defuns.
(tramp-cleanup-some-buffers-hook): New defcustom.  Add
`buffer-file-name', `tramp-cleanup-dired-buffer-p' and
`tramp-cleanup-remote-process-p' to the hook.
(kill-buffer-hook):
Add `tramp-delete-tainted-remote-process-buffer-function'.
(tramp-cleanup-all-buffers): Rework.

* lisp/net/tramp-compat.el (tramp-compat-always): New defalias.

* test/lisp/net/tramp-tests.el (tramp--test-always): Delete.
(tramp-test10-write-region, tramp-test21-file-links)
(tramp--test-deftest-direct-async-process)
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name)
(tramp-test39-make-lock-file-name)
(tramp-test39-detect-external-change): Use `tramp-compat-always'.

16 months agoExplain ERC 5.5 regressions in new version 5.5.0.29.1
F. Jason Park [Fri, 21 Apr 2023 14:39:05 +0000 (07:39 -0700)]
Explain ERC 5.5 regressions in new version 5.5.0.29.1

* doc/misc/erc.texi: Bump version to 5.5.0.29.1.
* etc/ERC-NEWS: Don't hype bugged option `erc-reconnect-display'.
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command): Add comment explaining
parsing bug in ERC 5.5 (bug#62444).
* lisp/erc/erc-networks.el (erc-networks-on-MOTD-end): Mention known
/MOTD bug in error notice so people don't waste energy reporting
it (bug#62151).
* lisp/erc/erc.el: Change Version header to 5.5.0.29.1.  Don't bother
updating the `customize-package-emacs-version-alist' entry
because no option defaults are affected.
(erc-version): Change version to 5.5.0.29.1.
(erc-reconnect-display, erc-query-on-unjoined-chan-privmsg): Add
warning to doc strings and `custom-set' functions.  It's believed that
these bugs degrade the user experience significantly enough to warrant
such mentions (bug#62833).
(erc-query): Fix erroneous redirect string in deprecation spec.
Do not merge to master.

16 months ago* doc/misc/erc.texi: Elaborate on upgrading via ELPA.
F. Jason Park [Fri, 21 Apr 2023 14:39:05 +0000 (07:39 -0700)]
* doc/misc/erc.texi: Elaborate on upgrading via ELPA.

16 months agoImprove outline-default-state docstring
Robert Pluim [Wed, 26 Apr 2023 10:27:30 +0000 (12:27 +0200)]
Improve outline-default-state docstring

* lisp/outline.el (outline-default-state): Explain which functions are
available to affect heading visibility.

16 months agoDocument problems with /bin/sh on Solaris 10
Eli Zaretskii [Wed, 26 Apr 2023 06:39:35 +0000 (09:39 +0300)]
Document problems with /bin/sh on Solaris 10

* etc/PROBLEMS (Solaris): Document problems with '/bin/sh'.
Suggested by Paul Eggert <eggert@cs.ucla.edu>.  (Bug#63067)

16 months ago; Add missing <<inserted by help-with-tutorial>> line to TUTORIAL.fa.
Mohsen Banan [Tue, 25 Apr 2023 21:49:28 +0000 (14:49 -0700)]
; Add missing <<inserted by help-with-tutorial>> line to TUTORIAL.fa.

16 months agoAllow inserting #x6A58 using chinese-ctlaub IM
Eli Zaretskii [Tue, 25 Apr 2023 14:39:23 +0000 (17:39 +0300)]
Allow inserting #x6A58 using chinese-ctlaub IM

* leim/MISC-DIC/CTLau-b5.html (CTLau-b5 : Hanzi input by Cantonese
transcription (Lau style)): Add #x6A58 to GAT and GWAT.  (Bug#62898)

16 months ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Tue, 25 Apr 2023 14:31:05 +0000 (17:31 +0300)]
; * etc/NEWS: Fix last change.

16 months agoeww: Provide completions for bookmarks and suggested URIs.
Antero Mejr [Thu, 13 Apr 2023 15:59:54 +0000 (15:59 +0000)]
eww: Provide completions for bookmarks and suggested URIs.

* lisp/net/eww.el (eww): Add the result of 'eww-suggest-uris' to the
completion collection argument.
(eww-bookmark-urls): New procedure.
(eww-suggest-uris): Add "eww-bookmark-urls" to the default list.
* etc/NEWS (EWW): Add NEWS entry for the change.  (Bug#62800)