]> git.eshelyaron.com Git - emacs.git/log
emacs.git
19 months agoModify erc-mode-map in module definitions
F. Jason Park [Fri, 20 Jan 2023 05:07:27 +0000 (21:07 -0800)]
Modify erc-mode-map in module definitions

* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable,
erc-button-disable): Replace call to `erc-button-setup' with one to
`erc--modify-local-map'.  This means `erc-button-setup' is now dead
code from a client perspective.
* lisp/erc/erc-goodies.el (erc-irccontrols-enable,
erc-irccontrols-disable, erc-irccontrols-mode): Bind
`erc-toggle-interpret-controls' in module definition so it's only
available when the module is active.
* lisp/erc/erc-log.el (erc-log-mode, erc-log-enable, erc-log-disable):
Move top-level `define-key' into module definition.
* lisp/erc/erc-match.el (erc-match-mode, erc-match-enable,
erc-match-disable): Move top-level `define-key' into module
definition.
* lisp/erc/erc.el (erc-mode-map): Remove C-c C-c binding for
`erc-toggle-interpret-controls'.
(erc--modify-local-map): Add helper for global modules to use when
modifying `erc-mode-map'.
* test/lisp/erc/erc-tests.el (erc--modify-local-map): Add test.
Ensure modifications to `erc-mode-map' on loading `erc' and via
`erc-mode-hook' still work.  (Bug#60954.)

19 months agoDon't require erc-goodies in erc.el
F. Jason Park [Fri, 20 Jan 2023 05:07:27 +0000 (21:07 -0800)]
Don't require erc-goodies in erc.el

* lisp/erc/erc-goodies.el: Obviate the need for forward declarations
by requiring `erc'.  Add minor-mode autoloads for `scrolltobottom',
`readonly', `move-to-prompt', `keep-place', `noncommands',
`irccontrols', `smiley', and `unmorse'.  Add Local variables footer
with `generated-autoload-file'.
(erc-controls-strip): Autoload this function.
* lisp/erc/erc-ibuffer.el: Require `erc-goodies' for
`erc-control-interpret'.  The justification for the blanket `require'
is this module isn't a member of `erc-modules' by default.
* lisp/erc/erc-page.el: (erc-ctcp-query-PAGE): Require `erc-goodies'
and put forward declaration for `erc-control-interpret' atop file.
* lisp/erc/erc-speedbar.el: Require `erc-goodies' for the same reason
as erc-ibuffer.el.
* lisp/erc/erc.el: Remove `require' for `erc-goodies' at end of file
and `pp' at top of file because `pp-to-string' is autoloaded on Emacs
27.  Also remove `require's for `thingatpt', `time-date', and
`iso8601'.  They're all used sparingly and the latter two have only
been around for one major release, so their removal likely won't cause
much churn.  And `thingatpt' already has a call-site `require', so the
top-level one is redundant, but autoload `word-at-point' anyway for
the benefit of third-party libraries like `hl-nicks'.  Also wrap local
loaddefs `require' call in `eval-and-compile'.
(erc--read-time-period): Require dependencies.  (Bug#60954.)

19 months agoLeverage loaddefs for migrating ERC modules
F. Jason Park [Sat, 4 Feb 2023 14:24:59 +0000 (06:24 -0800)]
Leverage loaddefs for migrating ERC modules

* lisp/erc/erc-common.el (erc--features-to-modules,
erc--modules-to-features, erc--module-name-migrations): Remove unused
internal functions.
(erc--normalize-module-symbol): Make aware of new migration scheme
based on symbol properties.
* lisp/erc/erc-page.el: Add autoload cookie for module migration.
* lisp/erc/erc-pcomplete.el: Add autoload cookies for module
migration.
* lisp/erc/erc-services.el: Add autoload cookie for module migration.
* lisp/erc/erc-sound.el: Add autoload cookie for module migration.
* lisp/erc/erc-stamp.el: Add autoload cookie for module migration.
* lisp/erc/erc.el (erc-modules): Reorder default value, sorted by
`string<' so that Customize does not consider the value to have been
edited.  Remove non-existent module `hecomplete' from lineup and swap
a couple more to maintain sorted order.  Change `:initialize' function
to tag all symbols for built-in modules with an `erc--module'
property.  In the `:set' function, ensure third-party modules appear
after the sorted and normalized built-ins, but in user-defined order.
Do this to prevent all modules, built-ins included, from ending up as
populated form fields for the "other" checkbox in the Customize
interface.
(erc--find-mode): Add helper function for `erc--update-modules'.
(erc--update-modules): Always resolve module names and only
conditionally attempt to require corresponding features.
* test/lisp/erc/erc-tests.el (erc-tests--modules): Add manifest for
asserting built-in modules and features.  This is easier to verify
visually than looking at the custom-type set for `erc-modules'.
(erc-modules--initialize): New test.
(erc-modules--internal-property): Add test.
(erc--normalize-module-symbol): New test.
(erc--find-mode): New test.
(erc--update-modules) Adapt to new paradigm and make more
comprehensive.  (Bug#60954.)

19 months agoCopy over upstream Compat macros to erc-compat
F. Jason Park [Fri, 20 Jan 2023 04:52:47 +0000 (20:52 -0800)]
Copy over upstream Compat macros to erc-compat

* lisp/erc/erc-backend: (erc--get-isupport-entry): Replace call to
`erc-compat--with-memoization' with the built-in `with-memoization'.
* lisp/erc/erc-compat.el: (erc-compat-function, erc-compat-call): Add
new macros from Compat 29.1.2.0.
(erc-compat--with-memoization): Remove because it's now provided by
Compat.  (Bug#60954.)

19 months agoHonor arbitrary CHANTYPES in ERC
F. Jason Park [Sun, 19 Feb 2023 03:32:36 +0000 (19:32 -0800)]
Honor arbitrary CHANTYPES in ERC

* lisp/erc/erc.el (erc-channel-p): Favor "CHANTYPES" ISUPPORT item
before falling back to well known prefixes.
* test/lisp/erc/erc-tests.el (erc-channel-p): Add test.  Arbitrarily
bundled with bug#60954.

19 months agoAdd hook to regain nickname in ERC
F. Jason Park [Fri, 7 Apr 2023 01:41:06 +0000 (18:41 -0700)]
Add hook to regain nickname in ERC

* lisp/erc/erc-backend.el (erc-server-reconnect-timeout): Mention
`erc-nickname-in-use-functions' in doc string.
* lisp/erc/erc.el (erc-nickname-in-use-functions,
erc-regain-nick-on-connect): Add abnormal hook and possible value to
handle stale connections preventing a desired nick from being reissued
by the server.  Follows directly from bug#62044.
(erc-nickname-in-use): Call `erc-nickname-in-use-functions'.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-auto-regain): New test.
* test/lisp/erc/resources/base/renick/regain/normal-again.eld: New file.
* test/lisp/erc/resources/base/renick/regain/normal.eld: New file.

19 months agoAdd probing erc-server-reconnect-function variant
F. Jason Park [Wed, 8 Mar 2023 14:14:36 +0000 (06:14 -0800)]
Add probing erc-server-reconnect-function variant

* lisp/erc/erc-backend.el (erc-server-reconnect-timeout): Replace
questionable claim with recommendation for alternate value when
experiencing nick rejections.
(erc-server-reconnect-function): Add new, somewhat experimental value
`erc-server-delayed-check-reconnect'.
(erc--server-connect-function): Add variable for process-dialing
monitor, a function.
(erc--server-propagate-failed-connection): Add function to serve as
default monitor to run on process creation and maybe execute failure
handlers.
(erc-server-connect): Run `erc--server-connect-function' for async
processes one second after creation.
(erc--server-reconnect-timeout, erc--server-reconnect-timeout-check,
erc--server-reconnect-timeout-scale-function,
erc--server-reconnect-timeout-double): Add supporting variables and
functions for `erc-server-delayed-check-reconnect'.
(erc-server-delayed-check-reconnect): Add possible alternate value for
option `erc-server-reconnect-function' that only attempts to reconnect
after hearing back from the server.
(erc-schedule-reconnect): Ensure previous `erc-server-process' is
deleted.
* test/lisp/erc/erc-scenarios-base-auto-recon.el: New file.
* test/lisp/erc/resources/base/reconnect/just-eof.eld: New file.
* test/lisp/erc/resources/base/reconnect/just-ping.eld: New file.
* test/lisp/erc/resources/base/reconnect/ping-pong.eld: New file.
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
New file.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Shadow
`timer-list'.  (Bug#62044.)

19 months agoAdd MOTD command to ERC
F. Jason Park [Sat, 11 Mar 2023 17:25:24 +0000 (09:25 -0800)]
Add MOTD command to ERC

* lisp/erc/erc-backend.el (erc-server-402, erc-server-402-functions):
Add new response handler and hook.
* lisp/erc/erc.el (erc-cmd-MOTD): New function to shield erc-network
from handling post-connection MOTD replies.  Thanks to Emanuel Berg
for reporting this (bug#62151).
(erc-message-english-s402): Define new ERR_NOSUCHSERVER message
template.
* test/lisp/erc/erc-scenarios-base-misc-regressions.el: New file.
* test/lisp/erc/resources/base/commands/motd.eld: New file.

19 months agoSplit overlong outgoing messages in erc-sasl
F. Jason Park [Fri, 24 Mar 2023 07:16:56 +0000 (00:16 -0700)]
Split overlong outgoing messages in erc-sasl

* lisp/erc/erc-sasl.el: (erc-server-AUTHENTICATE): Account for
client messages exceeding 400 bytes.  (Bug#62421.)
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-overlong-split,
erc-scenarios-sasl--plain-overlong-aligned): Add tests.
* test/lisp/erc/resources/sasl/plain-overlong-aligned.eld: New file.
* test/lisp/erc/resources/sasl/plain-overlong-split.eld: New file.

19 months agoFix DCC GET flag parsing in erc-dcc
Daniel Pettersson [Sat, 25 Mar 2023 15:25:48 +0000 (16:25 +0100)]
Fix DCC GET flag parsing in erc-dcc

* lisp/erc/erc-dcc.el (erc-cmd-DCC): Tokenize raw input line but also
accommodate legacy invocation.
(pcomplete/erc-mode/DCC): Quote file names when suggesting.  Account
for double-hyphen "end-of-options"-like separator.
(erc-dcc-do-GET-command): Simplify signature, subsuming NICK in
variadic args, now ARGS instead of FILE, which changes the arity
from (2 . many) to (1 . many).  Explain usage in doc string.  Honor an
optional separator, "--", if present.  (Bug#62444.)
* test/lisp/erc/erc-dcc-tests.el (erc-dcc-do-GET-command): Call new
parameterized helper with various flag/file combinations.
(erc-dcc-tests--erc-dcc-do-GET-command): New fixture function.
(pcomplete/erc-mode/DCC--get-quoted,
pcomplete/erc-mode/DCC--get-sep): New tests.

19 months agoAdd subcommand erc-cmd-HELP handler to erc-dcc
F. Jason Park [Sat, 25 Mar 2023 16:13:40 +0000 (09:13 -0700)]
Add subcommand erc-cmd-HELP handler to erc-dcc

* lisp/erc/erc-compat.el (erc-compat--28-split-string-shell-command,
erc-compat--split-string-shell-command): New functions introduced in
Emacs 28 for splitting pcomplete input.
* lisp/erc/erc-dcc.el (erc-cmd-DCC): Elect to tokenize line specially.
(erc-dcc--cmd-help): Add help handler.  (Bug#62444.)

19 months agoAdd subcommand dispatch facility to erc-cmd-HELP
F. Jason Park [Sat, 25 Mar 2023 16:13:40 +0000 (09:13 -0700)]
Add subcommand dispatch facility to erc-cmd-HELP

* lisp/erc/erc.el (erc-cmd-HELP): Change signature by adding &rest
parameter.  Look for symbol property `erc--cmd-help' and, if found,
assume it's a function and call it with &rest args after attempting to
autoload the primary command symbol.  (Bug#62444.)

19 months agoChange ERC version to 5.6-git
F. Jason Park [Sat, 1 Apr 2023 02:42:54 +0000 (19:42 -0700)]
Change ERC version to 5.6-git

* lisp/erc/erc.el: Update main Version header and bump required Compat
to latest release in Package-Requires header.  Also update entry in
`customize-package-emacs-version-alist', mapping ERC 5.6 to Emacs
30.1.
(erc-version): Move to 5.6-git.

19 months agoEglot: simplify eglot--sig-info and fix edge cases (bug#62687)
João Távora [Sat, 8 Apr 2023 19:41:13 +0000 (20:41 +0100)]
Eglot: simplify eglot--sig-info and fix edge cases (bug#62687)

The documentation of each signature was rarely rendered because of
obsolete logic that skipped MarkupContent objects.

The new function follows the principle that echo are gets as little as
possible, while the *eldoc* buffer gets as much as possible (except,
for the individual parameter documentation, as I couldn't find a
single server that uses it).

Tested with clangd, pylsp, jdtls, gopls, rust-analyzer, zls.

* lisp/progmodes/eglot.el (eglot--sig-info): Simplify.

19 months agoConsolidate existing warnings about unused return values
Mattias Engdegård [Sat, 8 Apr 2023 17:17:17 +0000 (19:17 +0200)]
Consolidate existing warnings about unused return values

Move the warning about unused return values from calls to
side-effect-free functions from the source-level optimiser to the code
generator, where it can be unified with the special-purpose warning
about unused values from `mapcar`.  This change also cures spurious
duplicate warnings about the same code, makes the warnings amenable to
suppression through `with-suppressed-warnings`, and now warns about
some unused values that weren't caught before.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Move warning away from here.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Doc string updates.
(byte-compile-form): Put the new warnings here.
(byte-compile-normal-call): Move mapcar warning away from here.
* lisp/emacs-lisp/bytecomp.el (byte-compile-ignore):
Compile args to `ignore` for value to avoid unused-value warnings, and
then discard the generated values immediately thereafter.  Mostly this
does not affect the generated code but in rare cases it might result
in slightly worse code.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Adapt test.

19 months agoImprove ibuffer-diff-with-file
Basil L. Contovounesios [Sat, 1 Apr 2023 14:14:34 +0000 (15:14 +0100)]
Improve ibuffer-diff-with-file

* lisp/ibuf-ext.el (ibuffer-diff-with-file): Link to diff-command in
docstring.  Make Diff buffer read-only from outset and inhibit as
needed to avoid surprises.  Check whether diff-command
supports --label.  Leave point at BOB and clean up any excess
newline inserted by ibuffer-diff-buffer-with-file-1.  Prefer
pop-to-buffer-same-window over switch-to-buffer.

(ibuffer-diff-buffer-with-file-1): Add docstring.  Remove unused
unwind-protect and copypasta from diff-no-select (bug#62599).  Use
diff-file-local-copy, string-join, and redisplay in place of
analogues.  Condition --label use on availability, and label buffers
consistently with diff-no-select.  Leave empty line between runs.
Let diff-sentinel delete temporary files.  Leave point at EOB for
next run.

19 months agoEglot: fix problems after changes to eglot-imenu (bug#62718)
João Távora [Fri, 7 Apr 2023 22:00:44 +0000 (23:00 +0100)]
Eglot: fix problems after changes to eglot-imenu (bug#62718)

* lisp/progmodes/eglot.el (eglot--imenu-SymbolInformation)
(eglot--imenu-DocumentSymbol): Fix.

19 months agoEglot: version strings must start with numbers (bug#62718)
João Távora [Fri, 7 Apr 2023 21:47:15 +0000 (22:47 +0100)]
Eglot: version strings must start with numbers (bug#62718)

Even though Eglot is a :core ELPA package and as such is on a
different release cycle than Emacs proper, the version strings used in
'defcustom' and 'make-obsolete' must still follow the numeric format.

* lisp/progmodes/eglot.el (eglot-report-progress): Adjust :version.
(eglot-lsp-abiding-column)
(eglot-current-column)
(eglot-current-column-function)
(eglot-move-to-current-column)
(eglot-move-to-lsp-abiding-column)
(eglot-move-to-column-function)
(eglot-ignored-server-capabilites)
(eglot-manual)
(eglot--managed-mode-hook): Update "obsolete" spec.

19 months agoEglot: use Eglot versions, not Emacs's in obsolete specs
João Távora [Fri, 7 Apr 2023 18:54:57 +0000 (19:54 +0100)]
Eglot: use Eglot versions, not Emacs's in obsolete specs

* lisp/progmodes/eglot.el (eglot-report-progress): Adjust :version.
(eglot-lsp-abiding-column)
(eglot-current-column)
(eglot-current-column-function)
(eglot-move-to-current-column)
(eglot-move-to-lsp-abiding-column)
(eglot-move-to-column-function)
(eglot-ignored-server-capabilites)
(eglot-manual)
(eglot--managed-mode-hook): Update "obsolete" spec.

19 months agoEglot: require optional text-property-search.el
João Távora [Fri, 7 Apr 2023 18:45:28 +0000 (19:45 +0100)]
Eglot: require optional text-property-search.el

Originally reported in
https://github.com/joaotavora/eglot/discussions/1201.

Also check for text-property-search-forward before using it, so we
won't break on Emacs 26.3.  At this point, better start relying on
compat.el, I guess.

* lisp/progmodes/eglot.el (eglot--format-markup): Check for
text-property-search-forward.

19 months agoEglot: be careful about gfm-view-mode read-only buffers
João Távora [Fri, 7 Apr 2023 18:40:27 +0000 (19:40 +0100)]
Eglot: be careful about gfm-view-mode read-only buffers

Although in most situations this doesn't error, it's only because of
the very wide binding of inhibit-read-only in jsonrpc--process-filter.
That binding will soon be narrowed, so better not rely on it.

Originally reported in
https://github.com/joaotavora/eglot/discussions/1202.

* lisp/progmodes/eglot.el (eglot--format-markup): Inhibit
read-only before touching buffer potentially in gfm-view-mode.

19 months ago; Eglot: fix misplaced parenthesis in last commit to eglot-tests.el
João Távora [Fri, 7 Apr 2023 17:52:06 +0000 (18:52 +0100)]
; Eglot: fix misplaced parenthesis in last commit to eglot-tests.el

* test/lisp/progmodes/eglot-tests.el
(eglot-test-eldoc-after-completions): Fix misplaced parenthesis.

19 months ago; * test/src/comp-tests.el (61917-1): Underscore unused parameter.
Mattias Engdegård [Fri, 7 Apr 2023 17:19:58 +0000 (19:19 +0200)]
; * test/src/comp-tests.el (61917-1): Underscore unused parameter.

19 months agoRemove useless unwind-protect forms, or make them useful as intended
Mattias Engdegård [Fri, 7 Apr 2023 14:29:32 +0000 (16:29 +0200)]
Remove useless unwind-protect forms, or make them useful as intended

* lisp/imenu.el (imenu--generic-function):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/textmodes/table.el (table-recognize-region):
* test/lisp/dired-tests.el (dired-test-directory-files):
* test/lisp/hl-line-tests.el (hl-line-tests-sticky):
Fix unwind-protect bracketing mistakes that caused the unwind code to
be misplaced.
* lisp/strokes.el (strokes-read-stroke): Fix a bracketing mistake that
misplaced the unwind code, and another one that misplaced the
else-clause of an `if` form.
* test/lisp/gnus/mml-sec-tests.el (mml-secure-test-fixture): Fix a
bracketing mistake that misplaced the unwind code, and remove
superfluous condition-case.

* lisp/mwheel.el (mouse-wheel-global-text-scale):
* lisp/speedbar.el (speedbar-stealthy-updates)
(speedbar-fetch-dynamic-etags):
* lisp/emacs-lisp/edebug.el (edebug--recursive-edit):
* lisp/emacs-lisp/package.el (package--read-pkg-desc):
* lisp/cedet/semantic.el (semantic-refresh-tags-safe):
* lisp/emulation/viper-cmd.el (viper-escape-to-state):
* lisp/emulation/viper-cmd.el (viper-file-add-suffix):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/mail/feedmail.el (feedmail-send-it-immediately)
(feedmail-deduce-address-list):
* lisp/mail/mailclient.el (mailclient-send-it):
* lisp/mail/smtpmail.el (smtpmail-deduce-address-list):
* lisp/mh-e/mh-print.el (mh-ps-print-range):
* lisp/textmodes/reftex-index.el (reftex-index-this-phrase):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-run-tests-batch):
(ert-test-run-tests-batch-expensive):
Remove unwind-protect forms that are apparently useless, some since a
prior edit that removed their purpose, some since their first
appearance.

* test/lisp/subr-tests.el (subr-test--frames-2):
Insert dummy unwind form in backtrace test code.

19 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Fri, 7 Apr 2023 15:08:46 +0000 (17:08 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot):  Adapt software selection.

19 months agoEglot: no more tests based on Pylsp (bug#62694)
João Távora [Fri, 7 Apr 2023 13:55:01 +0000 (14:55 +0100)]
Eglot: no more tests based on Pylsp (bug#62694)

The functionality under test in eglot.el is exactly the same, but use
the clangd server only, as that is used in more tests, and it is much
easier to check if it misbehaves or not.

Tests pass with clangd version 15.

* test/lisp/progmodes/eglot-tests.el (python): Don't require it.
(eglot--call-with-fixture): Simplify.
(eglot--wait-for-clangd): New helper.
(eglot-test-basic-completions)
(eglot-test-non-unique-completions, eglot-test-basic-xref)
(eglot-test-snippet-completions)
(eglot-test-snippet-completions-with-company)
(eglot-test-eldoc-after-completions, eglot-test-multiline-eldoc):
Use clangd, not pylsp.
(eglot-test-formatting): Renamed from
eglot-test-python-autopep-formatting.
(eglot-test-python-yapf-formatting): Remove.

19 months agoEglot: rework eglot-imenu
João Távora [Fri, 7 Apr 2023 11:54:39 +0000 (12:54 +0100)]
Eglot: rework eglot-imenu

Most newer servers return a vector of 'DocumentSymbol' as a response
to 'textDocument/documentSymbol'.  It's not worth trying to dumb this
down to imenu format of 'SymbolInformation' vectors.

This lays groundwork for the forthcoming "breadcrumb" feature of
bug#58431.

* lisp/progmodes/eglot.el
(eglot--imenu-SymbolInformation, eglot--imenu-DocumentSymbol): New
helpers.
(eglot-imenu): Rework.

19 months agoAvoid failing the build when org-version.el is updated
Eli Zaretskii [Thu, 6 Apr 2023 19:14:59 +0000 (22:14 +0300)]
Avoid failing the build when org-version.el is updated

* lisp/Makefile.in: Force recompilation of all Org files when
org-version.el is updated with a new Org version.

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Thu, 6 Apr 2023 18:38:20 +0000 (14:38 -0400)]
Merge from origin/emacs-29

305246d9726 Add emoji-zoom-reset
470d269ec1f Make emoji-zoom-{increase,decrease} set text properties c...
63d4a86f8d1 Fix transforming sliced images
5e1953a8f85 ; * etc/NEWS: Minor copyedits of entry for 'keymap-*' fun...
6b9f9df9454 ; Improve documentation of 'declare-function'
81d1f46d0fe ; Avoid compiler warning in eglot.el.
38cdfcb2128 ; Fix description of new 'keymap-*' functions
257090b8728 Adapt EMBA scripts.
90c07d3fdd2 Another terminology fix in ELisp reference manual
a832bc7090c Correct terminology in Elisp Reference Manual
db308233cb3 Comment out GNUSTEP jobs on EMBA (again)
8c1b1022439 ; * lisp/image.el (put-image): Doc fix.
eda88c63adf ; * doc/emacs/trouble.texi (Checklist): Minor grammar fix.
728bc09cf3c Fix regexp string escaping mistake in vhdl-mode.el (bug#6...
479626dbac9 Update to Org 9.6.3-2-gf2949d
5a1c9aace70 ; Add a bit more docstring to tsx-ts-mode (bug#62429)
86cf9fd932c Eglot: don't watch directories that don't exist
82d0b6c64ea ; * lisp/subr.el (use-dialog-box-p): Fix last change.
3619663f982 Preserve peer information for web page in eww-readable
cb8d6ab648f * lisp/subr.el (use-dialog-box-p): Fix conditions for GUI...
fb2c4409207 ; * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add some n...

# Conflicts:
# etc/NEWS

19 months ago; Merge from origin/emacs-29
Eli Zaretskii [Thu, 6 Apr 2023 18:38:16 +0000 (14:38 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

89e337c3fc9 ; Make sure 'eshell-command' tests don't prompt the user

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Thu, 6 Apr 2023 18:38:13 +0000 (14:38 -0400)]
Merge from origin/emacs-29

b39c3cd1125 ; * etc/NEWS: Fix typos.
89ac5ba11c7 Fix ModelSim error regexp in vhdl-mode
24ed9c7ae78 ; * doc/emacs/trouble.texi (Checklist): Minor copyedits (...
d1d39a0f09c Document enhancements in handling of echo-area messages

# Conflicts:
# etc/NEWS

19 months ago; Merge from origin/emacs-29
Eli Zaretskii [Thu, 6 Apr 2023 18:38:04 +0000 (14:38 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

46209b2453b ; Fix last change
21a4ee209c1 Fix new Eshell tests on MS-Windows
e2ebf3995d0 ; Auto-commit of loaddefs files.
6419d78fa6f Fix using background commands in 'eshell-command'

19 months agoDescribe how to run Emba tests locally
Michael Albinus [Thu, 6 Apr 2023 14:31:49 +0000 (16:31 +0200)]
Describe how to run Emba tests locally

* admin/notes/emba: Describe how to run Emba tests locally.

* test/infra/Dockerfile.emba (emacs-eglot):  Adapt software selection.

19 months agoAdd emoji-zoom-reset
Robert Pluim [Wed, 5 Apr 2023 15:24:38 +0000 (17:24 +0200)]
Add emoji-zoom-reset

* lisp/international/emoji.el (emoji-zoom-map): Add emoji-zoom-reset.
(emoji-zoom-reset): New function, it resets the zoom level.
* lisp/international/mule-cmds.el (ctl-x-map): Add emoji-zoom-reset.
* etc/NEWS: Announce new command.

19 months agoMake emoji-zoom-{increase,decrease} set text properties correctly
Robert Pluim [Wed, 5 Apr 2023 13:19:13 +0000 (15:19 +0200)]
Make emoji-zoom-{increase,decrease} set text properties correctly

* lisp/international/emoji.el (emoji-zoom-increase): Ensure that we're
increasing the :height of the anonymous face at point, rather than
having two :height properties, which appeared to work by
accident, and don't error at eob.  (Bug#62675)

19 months agoRestore positions reliably for abbreviated file names in saveplace.el
Liu Hui [Tue, 4 Apr 2023 01:13:32 +0000 (09:13 +0800)]
Restore positions reliably for abbreviated file names in saveplace.el

* lisp/saveplace.el (save-place-abbreviate-file-names): Add setter
function for rewriting `save-place-alist'.  Update docstring.
(save-place-to-alist): Save Abbreviated dired-filename.
(save-place-load-alist-from-file): Move this function above
`save-place-abbreviate-file-names' since it is used in the :set
function.
(save-place-find-file-hook):
(save-place-dired-hook): Use abbreviated file name when
`save-place-abbreviate-file-names' is non-nil.
(Bug#62413)

19 months agoHandle electric heredocs pairs in elixir-ts-mode
Wilhelm H Kirschbaum [Sun, 2 Apr 2023 07:43:20 +0000 (09:43 +0200)]
Handle electric heredocs pairs in elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--electric-pair-string-delimiter): New helper.
(elixir-ts-mode): Add post-self-insert-hook.  (Bug#62536)

19 months agoPropertize heredocs in elixir-ts-mode
Wilhelm H Kirschbaum [Tue, 21 Mar 2023 14:34:48 +0000 (16:34 +0200)]
Propertize heredocs in elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--syntax-propertize-query): New variable.
(elixir-ts--syntax-propertize): New helper.
(elixir-ts-mode): Set syntax-propertize-function.  (Bug#62536)

19 months agoFix transforming sliced images
Eli Zaretskii [Thu, 6 Apr 2023 09:35:17 +0000 (12:35 +0300)]
Fix transforming sliced images

* lisp/image.el (image--get-image): Support sliced images
(bug#62679).  Doc fix.
(image-mouse-decrease-size, image-mouse-increase-size)
(image-decrease-size, image-increase-size): Doc fixes.

19 months agoCC Mode: Miscellaneous coding fixes in c-forward-type
Alan Mackenzie [Thu, 6 Apr 2023 09:14:56 +0000 (09:14 +0000)]
CC Mode: Miscellaneous coding fixes in c-forward-type

This fixes bug #62339.

* lisp/progmodes/cc-engine.el (c-forward-type): In the implicit int handling,
respect the setting of the parameter stop-at-end.  In the case "normal
identifier", insert a missing (c-forward-syntactic-ws); this fixes the bug.
Here, correct the wrong return value `prefix' to t.

19 months ago; Fix compiler warning
Po Lu [Thu, 6 Apr 2023 02:06:28 +0000 (10:06 +0800)]
; Fix compiler warning

* src/xterm.c (x_term_init): Fix:

"xterm.c", line 30759: warning: improper pointer/integer
combination: op "="

19 months agoComp: Fix limplification pass (bug#62537)
Andrea Corallo [Wed, 5 Apr 2023 16:17:58 +0000 (18:17 +0200)]
Comp: Fix limplification pass (bug#62537)

* test/src/comp-resources/comp-test-funcs.el (comp-test-62537-1-f)
(comp-test-62537-2-f): New functions.

* lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Make it
stricter add a comment.

19 months ago; * etc/NEWS: Minor copyedits of entry for 'keymap-*' functions.
Eli Zaretskii [Wed, 5 Apr 2023 13:50:58 +0000 (16:50 +0300)]
; * etc/NEWS: Minor copyedits of entry for 'keymap-*' functions.

19 months agoCC Mode: Fix fontification problems shown by test file templates-20.cc
Alan Mackenzie [Wed, 5 Apr 2023 13:02:12 +0000 (13:02 +0000)]
CC Mode: Fix fontification problems shown by test file templates-20.cc

Also fix one problem evident in test file decls-10.cc.

* lisp/progmodes/cc-engine.el (c-brace-stack-at): Bind
c-record-type-identifiers to nil to prevent called functions recording
identifiers spuriously.
(c-forward-<>-arglist-recur): Revert the ill-advised optimization from autumn
2022 which attempted to avoid re-marking c-type text properties inside angle
bracket arglists.
(c-forward-decl-or-cast-1): Accept the semicolon at the end of "t8 * id;" as
sufficient evidence to fontify as a declaration (not a multiplication).

* lisp/progmodes/cc-fonts.el (c-font-lock-c++-using): No longer fontify the
last component of foo::bar with c-reference-face-name.

19 months ago; Improve documentation of 'declare-function'
Eli Zaretskii [Wed, 5 Apr 2023 09:31:01 +0000 (12:31 +0300)]
; Improve documentation of 'declare-function'

* doc/lispref/functions.texi (Declaring Functions):
* lisp/subr.el (declare-function): Document explicitly that
ARGLIST argument, if provided, should include the parentheses.

19 months ago; Avoid compiler warning in eglot.el.
Eli Zaretskii [Wed, 5 Apr 2023 09:23:54 +0000 (12:23 +0300)]
; Avoid compiler warning in eglot.el.

19 months ago; Fix description of new 'keymap-*' functions
Eli Zaretskii [Wed, 5 Apr 2023 08:31:15 +0000 (11:31 +0300)]
; Fix description of new 'keymap-*' functions

* doc/lispref/keymaps.texi (Prefix Keys): Fix example (bug#62673).
(Functions for Key Lookup): Clarify the possible values of KEYMAP
argument of 'keymap-lookup'.
(Active Keymaps): Fix typo in function name; add cross-reference.

19 months agoImprove sigil fontification for elixir-ts-mode
Wilhelm H Kirschbaum [Sun, 2 Apr 2023 09:28:27 +0000 (11:28 +0200)]
Improve sigil fontification for elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el:
(elixir-ts--font-lock-settings): Update sigil queries.

19 months agoImprove list indentation for elixir-ts-mode
Wilhelm H Kirschbaum [Sun, 2 Apr 2023 09:26:02 +0000 (11:26 +0200)]
Improve list indentation for elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el:
(elixir-ts--argument-indent-offset): Add empty line check.
(elixir-ts--argument-indent-anchor): Change ERROR offset.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test.

19 months agoruby-ts-mode: Add more constructs to treesit-sexp-type-regexp
Dmitry Gutov [Wed, 5 Apr 2023 00:00:57 +0000 (03:00 +0300)]
ruby-ts-mode: Add more constructs to treesit-sexp-type-regexp

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add more
constructs to treesit-sexp-type-regexp (bug#62086).

19 months agoAdapt EMBA scripts.
Michael Albinus [Tue, 4 Apr 2023 18:01:19 +0000 (20:01 +0200)]
Adapt EMBA scripts.

* test/infra/Dockerfile.emba (emacs-gnustep): Add zlib1g-dev.
Remove make instrumentation.

* test/infra/gitlab-ci.yml (build-image-gnustep, test-gnustep): Uncomment.

19 months agoImprove Tramp robustness
Michael Albinus [Tue, 4 Apr 2023 11:37:18 +0000 (13:37 +0200)]
Improve Tramp robustness

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Check for `tramp-string-empty-or-nil-p'.

19 months agoAnother terminology fix in ELisp reference manual
Eli Zaretskii [Tue, 4 Apr 2023 11:22:56 +0000 (14:22 +0300)]
Another terminology fix in ELisp reference manual

* doc/lispref/frames.texi (Mouse Tracking):
* doc/lispref/commands.texi (Motion Events, Event Examples):
'track-mouse' is a macro, not a special form.

19 months agoCorrect terminology in Elisp Reference Manual
Shynur [Tue, 4 Apr 2023 07:07:37 +0000 (15:07 +0800)]
Correct terminology in Elisp Reference Manual

* doc/lispref/functions.texi (Function Names): 'defun' is a macro, not
a special form.  (Bug#62661)

Copyright-paperwork-exempt: yes

19 months agoComment out GNUSTEP jobs on EMBA (again)
Michael Albinus [Tue, 4 Apr 2023 11:00:51 +0000 (13:00 +0200)]
Comment out GNUSTEP jobs on EMBA (again)

* test/infra/gitlab-ci.yml (build-image-gnustep, test-gnustep):
Comment out jobs due to bug#62210.

19 months agoDisplay unlock-file warning only when file locks are enabled
Michael Albinus [Tue, 4 Apr 2023 07:43:09 +0000 (09:43 +0200)]
Display unlock-file warning only when file locks are enabled

* lisp/files.el (remote-file-name-inhibit-locks): Fix docstring.

* lisp/userlock.el (userlock--handle-unlock-error):
Display warning only when `create-lockfiles' is non-nil.  (Bug#62614)

* lisp/net/tramp.el (tramp-handle-unlock-file): Raise a warning
only when `create-lockfiles' is non-nil or
`remote-file-name-inhibit-locks' is nil.

19 months agoruby-ts-mode: Recognize more nodes as sexps
Juri Linkov [Tue, 4 Apr 2023 06:42:10 +0000 (09:42 +0300)]
ruby-ts-mode: Recognize more nodes as sexps

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add "unless" to 'treesit-sexp-type-regexp'.

19 months agoruby-ts-mode: Recognize more nodes as sexps
Dmitry Gutov [Mon, 3 Apr 2023 20:39:41 +0000 (23:39 +0300)]
ruby-ts-mode: Recognize more nodes as sexps

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Argument
treesit-sexp-type-regexp with interpolation, instance_variable,
global_variable (bug#62086, bug#62416).

19 months ago; * lisp/image.el (put-image): Doc fix.
Eli Zaretskii [Mon, 3 Apr 2023 16:32:46 +0000 (19:32 +0300)]
; * lisp/image.el (put-image): Doc fix.

19 months ago; Fix last change
Michael Albinus [Mon, 3 Apr 2023 14:00:11 +0000 (16:00 +0200)]
; Fix last change

19 months ago; * lisp/gnus/gnus-sum.el (gnus-summary-move-article): Just setq
Andrew G Cohen [Mon, 3 Apr 2023 13:49:55 +0000 (21:49 +0800)]
; * lisp/gnus/gnus-sum.el (gnus-summary-move-article): Just setq

19 months ago; * doc/emacs/trouble.texi (Checklist): Minor grammar fix.
Robert Pluim [Mon, 3 Apr 2023 12:42:54 +0000 (14:42 +0200)]
; * doc/emacs/trouble.texi (Checklist): Minor grammar fix.

19 months agoFix some `unwind-protect' forms
Michael Albinus [Mon, 3 Apr 2023 11:18:55 +0000 (13:18 +0200)]
Fix some `unwind-protect' forms

* lisp/net/tramp-smb.el (tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl): Remove superfluous `unwind-protect'.

* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Fix `unwind-protect' handler.

* test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name):
Add dummy cleanup form.

19 months agoFix regexp string escaping mistake in vhdl-mode.el (bug#62508)
Mattias Engdegård [Mon, 3 Apr 2023 10:57:54 +0000 (12:57 +0200)]
Fix regexp string escaping mistake in vhdl-mode.el (bug#62508)

* lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist): Quote brackets
correctly.

19 months agoImprove portability of newly added icons
Po Lu [Mon, 3 Apr 2023 08:15:54 +0000 (16:15 +0800)]
Improve portability of newly added icons

* etc/images/symbols/README: Document what to do with changed icons.
* etc/images/symbols: Add portable variants of SVG icons.

19 months agoModify chevron icons and add some more
Yuan Fu [Sat, 1 Apr 2023 23:22:50 +0000 (16:22 -0700)]
Modify chevron icons and add some more

* etc/images/symbols/chevron_left_16.svg:
* etc/images/symbols/chevron_right_16.svg: Make them shorter so that
they appear roughly the same size as up and down chevrons.
* etc/images/symbols/cross_circle_fill_16.svg:
* etc/images/symbols/heart_16.svg:
* etc/images/symbols/heart_fill_16.svg:
* etc/images/symbols/heart_half_16.svg:
* etc/images/symbols/minus_circle_fill_16.svg:
* etc/images/symbols/plus_circle_fill_16.svg: New icons.

19 months agoUpdate to Org 9.6.3-2-gf2949d
Kyle Meyer [Mon, 3 Apr 2023 03:03:32 +0000 (23:03 -0400)]
Update to Org 9.6.3-2-gf2949d

19 months agoEglot: Bump to 1.14
João Távora [Mon, 3 Apr 2023 00:40:30 +0000 (01:40 +0100)]
Eglot: Bump to 1.14

* lisp/progmodes/eglot.el (Version): Bump to 1.14
(Package-Requires): Require ElDoc 1.14.0

* etc/EGLOT-NEWS: Update.

19 months agoMerge from origin/emacs-29
João Távora [Sun, 2 Apr 2023 23:33:03 +0000 (00:33 +0100)]
Merge from origin/emacs-29

3bdbb66efb9 ; CONTRIBUTE: Minor stylistic changes.
d0eb12e8d3c Fix typo in section 14.1 of Emacs Manual
b2fbec37f39 ; * etc/EGLOT-NEWS: Clarify scope of topmost section
131ec049db0 Eglot: unbreak eglot-extend-to-xref on w32
0622e1f29f6 Eglot: ensure server shutdown turns off eglot-inlay-hints...
59f66ea3027 ; * lisp/emacs-lisp/package-vc.el: Remove completed item ...
d23dc3dd7e3 ; * lisp/emacs-lisp/package-vc.el (package-vc): Fix manua...
4508a024e81 ; Clarify documentation of 'cursor' text property
d2e82817a3f Add two typescript-ts-mode faces (bug#62429)
10918fc9d24 Fix scrolling window when point moves up
9b32bc134c4 Improve documentation of 'defcustom's :set keyword
ab4273056e0 Comp fix calls to redefined primtives with op-bytecode (b...
c98929c7e18 ; Fix last change
a14c3f62a67 ; Fix last change
09fece5722f Fix duplicate defcustom in eww.el
e45bd10a3d9 Fix indentation regression in 'C-h l'
46fd10a7600 * doc/misc/tramp.texi (Remote shell setup): Clarify use o...

19 months ago; * etc/EGLOT-NEWS (Upcoming 1.14): Update.
João Távora [Sun, 2 Apr 2023 23:00:18 +0000 (00:00 +0100)]
; * etc/EGLOT-NEWS (Upcoming 1.14): Update.

19 months agoEldoc: bump package version to 1.14.0
João Távora [Sun, 2 Apr 2023 22:40:31 +0000 (23:40 +0100)]
Eldoc: bump package version to 1.14.0

* lisp/emacs-lisp/eldoc.el (Version): Bump to 1.14.0

19 months ago; Eldoc: fix doc of e-d-functions w.r.t. :origin keyword
João Távora [Sun, 2 Apr 2023 22:38:37 +0000 (23:38 +0100)]
; Eldoc: fix doc of e-d-functions w.r.t. :origin keyword

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Fix.

19 months ago; Eglot: removed unused dependency on 'array.el'
João Távora [Sun, 2 Apr 2023 22:33:23 +0000 (23:33 +0100)]
; Eglot: removed unused dependency on 'array.el'

* lisp/progmodes/eglot.el (array): Don't require

19 months agoEglot: load built-in GNU ELPA dependencies explicitly
João Távora [Sun, 2 Apr 2023 22:31:10 +0000 (23:31 +0100)]
Eglot: load built-in GNU ELPA dependencies explicitly

Because of outstanding bug#62576, it's way to easy for users to get
confused by the M-x package-install process for Eglot.

Whenever an Eglot release depends on a new version of a GNU ELPA :core
package which is _also_ provided built-in, M-x package-install will
install that dependency, but will not always load it on top of the
built-in one.

The solution is to not use "require" for now.  This may potentially
lead to double "loads", but that should in principle be idempotent.

* lisp/progmodes/eglot.el (project, eldoc, seq, flymake, xref, jsonrpc)
(external-completion): Load, don't require.

19 months agoEglot: improve caching in eglot-completion-at-point
João Távora [Wed, 29 Mar 2023 18:30:04 +0000 (19:30 +0100)]
Eglot: improve caching in eglot-completion-at-point

When answering the :textDocument/completion request, LSP servers
provide a :isIncomplete flag in the response, which allows Eglot to
know if "further typing should result in recomputing [the completions]
list.

If :isIncomplete is false (i.e. the full set was returned), Eglot
caches the response in a global variable eglot--capf-cache that
persists for the duration of the "completion session", taken to be the
interval between two calls to completion-in-region-mode.

If the cache has been set, and Eglot detects that "further typing" has
happened, it is safe to use the cache instead of making a request to
the server.

Thus eglot--capf-cache-flush, added to completion-in-region-mode-hook,
is used to flush this cache.  Since the popular Company completion
package doesn't use completion-in-region-mode, eglot--capf-cache-flush
is also added to its company-after-completion-hook.

* lisp/progmodes/eglot.el (eglot--managed-mode): Set
'completion-in-region-mode-hook and company-after-completion-hook.
(eglot--capf-cache): New variable.
(eglot--capf-cache-flush): New function.
(eglot-completion-at-point): Rework.

* etc/EGLOT-NEWS: Update.

19 months agoEglot: take advantage of new Eldoc options for signature doc
João Távora [Sat, 25 Mar 2023 19:53:14 +0000 (19:53 +0000)]
Eglot: take advantage of new Eldoc options for signature doc

Only echo the "active signature", send all the other signatures for
the *eldoc* buffer.

* lisp/progmodes/eglot.el (eglot--sig-info): Rework protocol.
(eglot-signature-eldoc-function): Rework.

19 months agoEglot: declare support for markdown also for signatures
João Távora [Fri, 24 Mar 2023 22:17:44 +0000 (22:17 +0000)]
Eglot: declare support for markdown also for signatures

* lisp/progmodes/eglot.el
(eglot--accepted-formats): new helper.
(eglot-client-capabilities): use it.

19 months agoEglot: define eglot--ensure-list with defalias
João Távora [Fri, 24 Mar 2023 22:16:49 +0000 (22:16 +0000)]
Eglot: define eglot--ensure-list with defalias

This avoids annoying obsoletion warnings when compiling the whole buffer.

* lisp/progmodes/eglot.el (eglot--ensure-list): define with defalias.

19 months agoEglot: remove hacky advice of jsonrpc-request
João Távora [Wed, 29 Mar 2023 21:48:54 +0000 (22:48 +0100)]
Eglot: remove hacky advice of jsonrpc-request

The vast majority of Eglot sync requests to the server need to inform
the server of any pending changes to the buffer beforehand, so that
the server has up-to-date information to do its job.

But doing so at the expense of ugly advice of jsonrpc-request is ill
advised.  Introduce eglot--request helper instead and use that.

Use this opportunity to conduct a review of Eglot sync requests and
come to the conclusion that all need to send any changes beforehand.
Nevertheless, an IMMEDIATE kwarg to eglot--request was added to
bypassing this.

* lisp/progmodes/eglot.el
(eglot--request): New helper.
(eglot-shutdown)
(eglot-execute-command)
(eglot-workspace-configuration)
(eglot--signal-textDocument/willSave)
(eglot--workspace-symbols)
(eglot--lsp-xrefs-for-method)
(xref-backend-apropos)
(eglot-format)
(eglot-completion-at-point)
(eglot-imenu)
(eglot-rename)
(eglot-code-actions): Use eglot--request.

19 months ago; Add a bit more docstring to tsx-ts-mode (bug#62429)
Yuan Fu [Sun, 2 Apr 2023 22:09:41 +0000 (15:09 -0700)]
; Add a bit more docstring to tsx-ts-mode (bug#62429)

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode): Explain a bit more.

19 months agoUse the 'interactive' spec to set arguments for 'eshell-command'
Jim Porter [Fri, 31 Mar 2023 02:38:30 +0000 (19:38 -0700)]
Use the 'interactive' spec to set arguments for 'eshell-command'

* lisp/eshell/eshell.el (eshell-read-command): New function...
(eshell-command): ... use it.  Additionally, require the COMMAND
argument, and rename ARG to TO-CURRENT-BUFFER.

19 months agoFix using background commands in 'eshell-command'
Jim Porter [Fri, 31 Mar 2023 02:31:30 +0000 (19:31 -0700)]
Fix using background commands in 'eshell-command'

This regressed due to the patch for bug#53715, which changed how
Eshell pipelines return the processes in the pipeline (bug#62556).

* lisp/eshell/esh-cmd.el (eshell-parse-command): When creating
background commands, wrap the process(es) in a cons cell whose CAR is
':eshell-background'.  This lets us use fewer heuristics...
(eshell-eval-command): ... here.  Additionally, keep the result and
the incomplete delimiter separate.

* lisp/eshell/eshell.el (eshell-command): Check ':eshell-background'
and use a more-robust method for setting the output target.

* test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/simple)
(eshell-test/eshell-command/pipeline)
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): New tests.

19 months agoEglot: don't watch directories that don't exist
João Távora [Sun, 2 Apr 2023 22:01:29 +0000 (23:01 +0100)]
Eglot: don't watch directories that don't exist

project-files isn't guaranteed to return existing files, so better
check if they exist because placing a watcher on them.

Originally reported at:
https://github.com/joaotavora/eglot/issues/1198

* lisp/progmodes/eglot.el (eglot-register-capability
workspace/didChangeWatchedFiles): Check if directories exist.

19 months agolisp/simple.el (inhibit-auto-fill): New var
Stefan Monnier [Sun, 2 Apr 2023 21:54:02 +0000 (17:54 -0400)]
lisp/simple.el (inhibit-auto-fill): New var

* lisp/simple.el (inhibit-auto-fill): New var.
(internal-auto-fill): Obey it.
(newline): Use it instead of binding `auto-fill-function`, so
as to avoid messing up the state if something wants to enable/disable
`auto-fill-mode` during the course of the let binding (bug#62419).

19 months agosrc/eval.c: Fix bug#62419
Stefan Monnier [Sun, 2 Apr 2023 21:45:58 +0000 (17:45 -0400)]
src/eval.c: Fix bug#62419

Yup, almost 40 years after ELisp first combined them, buffer-local
and let bindings still don't work quite right :-(

The "automatically buffer-local if set" semantics should follow the
principle that it becomes buffer-local iff the var's current binding
refers to the top-level/global/non-let binding.

* src/eval.c (let_shadows_buffer_binding_p): Disregard non-global
let-bindings.

* test/src/eval-tests.el (eval-test--bug62419): New test.

19 months ago; Add tests for synchronous processes in Eshell
Jim Porter [Sat, 1 Apr 2023 04:32:44 +0000 (21:32 -0700)]
; Add tests for synchronous processes in Eshell

Normally, Eshell only uses synchronous processes on MS-DOS, so this is
hard to test.  To get around this, let the tests explicitly request
synchronous processes.

* lisp/eshell/esh-proc.el (eshell-supports-asynchronous-processes):
New variable...
(eshell-gather-process-output): ... use it, and remove some incorrect
code updating Eshell's internal markers (the async code path doesn't
do this, so neither should the sync path).

* lisp/eshell/esh-cmd.el (eshell-execute-pipeline): Use
'eshell-supports-asynchronous-processes'.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/emacs-command): New function.
(esh-proc-test/emacs-echo, esh-proc-test/emacs-upcase): New variables.
(esh-proc-test/synchronous-proc/simple/interactive)
(esh-proc-test/synchronous-proc/simple/command-result)
(esh-proc-test/synchronous-proc/pipeline/interactive)
(esh-proc-test/synchronous-proc/pipeline/command-result): New tests.

19 months ago; * lisp/subr.el (use-dialog-box-p): Fix last change.
Eli Zaretskii [Sun, 2 Apr 2023 08:42:43 +0000 (11:42 +0300)]
; * lisp/subr.el (use-dialog-box-p): Fix last change.

19 months agoPreserve peer information for web page in eww-readable
Eshel Yaron [Fri, 31 Mar 2023 14:54:12 +0000 (17:54 +0300)]
Preserve peer information for web page in eww-readable

The :peer property in eww-data affects the face of the page title
in 'header-line-format' as set by 'eww-update-header-line-format'.
Preserving this property in eww-readable avoids having the header
line's appearance change when this command is called.
* lisp/net/eww.el (eww-readable): Preserve eww-data's :peer
property.  (Bug#62574)

19 months ago* lisp/subr.el (use-dialog-box-p): Fix conditions for GUI dialogs.
Eli Zaretskii [Sun, 2 Apr 2023 07:34:43 +0000 (10:34 +0300)]
* lisp/subr.el (use-dialog-box-p): Fix conditions for GUI dialogs.

19 months ago; * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add some notice.
Yuan Fu [Sun, 2 Apr 2023 06:14:15 +0000 (23:14 -0700)]
; * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add some notice.

19 months agoAvoid shadowing variables in some Eshell command forms
Jim Porter [Sun, 19 Mar 2023 02:18:28 +0000 (19:18 -0700)]
Avoid shadowing variables in some Eshell command forms

* lisp/eshell/esh-cmd.el (eshell-rewrite-for-command): Make
'for-items' an uninterned symbol.
(eshell-as-subcommand): Correct docstring.
(eshell-do-command-to-value): Mark obsolete.
(eshell-command-to-value): Move binding of 'value' outside of the
macro's result, and remove call to 'eshell-do-command-to-value'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/subcommand-shadow-value)
(esh-cmd-test/for-loop-for-items-shadow): New tests.
(esh-cmd-test/for-name-loop, esh-cmd-test/for-name-shadow-loop):
Rename to...
(esh-cmd-test/for-loop-name, esh-cmd-test/for-loop-name-shadow):
... these.

19 months agoAdd some icons (bug#62562)
Yuan Fu [Fri, 31 Mar 2023 04:58:05 +0000 (21:58 -0700)]
Add some icons (bug#62562)

* etc/images/symbols/README: New file.
* etc/images/symbols/*.svg: New icons.

19 months ago; Make sure 'eshell-command' tests don't prompt the user
Jim Porter [Sat, 1 Apr 2023 17:28:02 +0000 (10:28 -0700)]
; Make sure 'eshell-command' tests don't prompt the user

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Wait for the process
to finish.

19 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Sat, 1 Apr 2023 15:04:50 +0000 (17:04 +0200)]
; * etc/NEWS: Fix typos.

19 months agoFix ModelSim error regexp in vhdl-mode
Eli Zaretskii [Sat, 1 Apr 2023 10:07:42 +0000 (13:07 +0300)]
Fix ModelSim error regexp in vhdl-mode

* lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist): Fix ModelSim
error regexp.  Suggested by Reto Zimmermann <reto@gnu.org>.
(Bug#62508)

19 months ago; * doc/emacs/trouble.texi (Checklist): Minor copyedits (bug#62320).
Eli Zaretskii [Sat, 1 Apr 2023 10:00:36 +0000 (13:00 +0300)]
; * doc/emacs/trouble.texi (Checklist): Minor copyedits (bug#62320).

19 months agoDocument enhancements in handling of echo-area messages
Eli Zaretskii [Sat, 1 Apr 2023 09:49:18 +0000 (12:49 +0300)]
Document enhancements in handling of echo-area messages

* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages):
* lisp/minibuffer.el (inhibit-message-regexps)
(set-message-functions, inhibit-message, set-multi-message):
Improve the documentation of functions dealing with display of
echo-area messages.

19 months ago; * src/fns.c: Use if instead of #ifdef
Mattias Engdegård [Sat, 1 Apr 2023 08:53:50 +0000 (10:53 +0200)]
; * src/fns.c: Use if instead of #ifdef

* src/fns.c (HAVE_FAST_UNALIGNED_ACCESS, load_unaligned_size_t):
Always define these.
(Fstring_lessp): Use if instead of #ifdef.

19 months ago; Fix last change
Eli Zaretskii [Sat, 1 Apr 2023 06:55:29 +0000 (09:55 +0300)]
; Fix last change

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background-pipeline): Fix last change.

19 months ago; * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): Check in missing edit.
Po Lu [Sat, 1 Apr 2023 06:25:47 +0000 (14:25 +0800)]
; * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): Check in missing edit.