Andrea Corallo [Tue, 21 Mar 2023 10:51:03 +0000 (11:51 +0100)]
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve
263d6c38539
Robert Pluim [Tue, 21 Mar 2023 09:56:07 +0000 (10:56 +0100)]
Expand defvar-keymap documentation
* doc/lispref/keymaps.texi (Creating Keymaps): Describe the :repeat keyword.
Dmitry Gutov [Mon, 20 Mar 2023 18:18:42 +0000 (20:18 +0200)]
* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
Andrea Corallo [Mon, 20 Mar 2023 16:24:48 +0000 (17:24 +0100)]
Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation
of calls to redefined primtives with dedicated op-bytecode.
* test/src/comp-tests.el (61917-1): New test.
Robert Pluim [Mon, 20 Mar 2023 15:09:51 +0000 (16:09 +0100)]
Warn package authors away from keymap-unset with REMOVE
* doc/lispref/keymaps.texi (Changing Key Bindings): Ask package
authors to not use the REMOVE argument to `keymap-unset'.
Michael Albinus [Mon, 20 Mar 2023 09:06:05 +0000 (10:06 +0100)]
Comment out jobs on EMBA
* test/infra/gitlab-ci.yml: Comment out jobs due to bug#62210 and
bug#62211.
Robert Pluim [Mon, 20 Mar 2023 08:44:33 +0000 (09:44 +0100)]
Improve defvar-keymap docstring.
* lisp/keymap.el (defvar-keymap): Improve description of ':enter' and
':exit' usage for ':repeat' keyword.
Gregory Heytings [Sat, 18 Mar 2023 22:41:33 +0000 (22:41 +0000)]
Improve warning about changing the string returned by symbol-name
* src/data.c (Fsymbol_name): Add warning. See bug#62009.
* doc/lispref/symbols.texi (Creating Symbols): Improve warning.
Eli Zaretskii [Sun, 19 Mar 2023 20:19:52 +0000 (22:19 +0200)]
Fix visiting XBM/XPM files when 'c-ts-mode' is active
* lisp/progmodes/c-ts-mode.el (treesit-ready-p): Fix association
for XBM/XPM files in 'auto-mode-alist'. (Bug#62276)
Stefan Monnier [Sun, 19 Mar 2023 20:02:52 +0000 (16:02 -0400)]
* lisp/mpc.el (mpc-format): Fix oversight in commit
48b6cec61cf
João Távora [Sun, 19 Mar 2023 19:44:31 +0000 (19:44 +0000)]
Bail early from eglot--apply-text-edits if nothing to do
* lisp/progmodes/eglot.el (eglot--apply-text-edits): Early return.
João Távora [Sun, 19 Mar 2023 01:03:47 +0000 (01:03 +0000)]
; Clarify in-code commentary of eglot--after-change
* lisp/progmodes/eglot.el (eglot--after-change): Minor
clarification to commentary.
João Távora [Sun, 19 Mar 2023 00:47:55 +0000 (00:47 +0000)]
Improve ergonomics of Eglot's inlay hints
Instead of deleting inlay hints instantly as soon as the affected
changes, make hint overlays span one character (instead of being
length 0). Give the overlays an "evaporate" property.
Given an inlay hints at position POS, its attached to [POS, POS+1] if
it's kind=1 (usually type hints) and [POS-1, POS] otherwise. For
kind=1 hints, the 'cursor position of the first such overlay is also
tweaked, so that's it's less akward to edit around it.
* lisp/progmodes/eglot.el (eglot--before-change): Don't delete hints
here.
(eglot--update-hints-1): Rework.
Eli Zaretskii [Sun, 19 Mar 2023 18:44:51 +0000 (20:44 +0200)]
Protect against too large size of 'recent-keys' vector
* src/keyboard.c (MAX_NUM_RECENT_KEYS): New macro.
(Flossage_size): Don't allow specifying too large lossage-size.
Fix data types. (Bug#62277)
Michael Albinus [Sun, 19 Mar 2023 08:37:35 +0000 (09:37 +0100)]
* lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.
Eli Zaretskii [Sun, 19 Mar 2023 06:09:33 +0000 (08:09 +0200)]
; Remove 'build-module' and 'html-manual' directories from 'admin'
These files were temporarily in the repository and are
no longer needed, once they fulfilled their job.
Eli Zaretskii [Sun, 19 Mar 2023 05:57:40 +0000 (07:57 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Kyle Meyer [Sun, 19 Mar 2023 01:41:22 +0000 (21:41 -0400)]
Update to Org 9.6.1-48-g92471e
Yuan Fu [Sat, 18 Mar 2023 21:13:31 +0000 (14:13 -0700)]
; * admin/notes/tree-sitter/starter-guide: Update starter-guide.
Eli Zaretskii [Sat, 18 Mar 2023 15:14:44 +0000 (17:14 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Gregory Heytings [Sat, 18 Mar 2023 15:04:26 +0000 (15:04 +0000)]
; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change
Eli Zaretskii [Sat, 18 Mar 2023 13:54:35 +0000 (15:54 +0200)]
; Minor copyedits of recent changes in ELisp reference manual
* doc/lispref/keymaps.texi (Changing Key Bindings): Fix wording
and markup.
Eli Zaretskii [Sat, 18 Mar 2023 13:46:05 +0000 (15:46 +0200)]
; Minor fixes in recent Eglot changes
* doc/misc/eglot.texi (Project-specific configuration): Fix
whitespace.
* lisp/progmodes/eglot.el (eglot-diagnostics-map): Doc fix.
Eli Zaretskii [Sat, 18 Mar 2023 13:41:55 +0000 (15:41 +0200)]
; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.
João Távora [Sat, 18 Mar 2023 12:43:31 +0000 (12:43 +0000)]
; Again correct node reference casing in doc/misc/eglot.texi
Emacs's info-generating Texinfo incantation seems to be case
insensitive, but others -- like Eglot's HTML manual generation -- is
case sensitive.
* doc/misc/eglot.texi (Eglot Features): Fix.
João Távora [Sat, 18 Mar 2023 12:25:52 +0000 (12:25 +0000)]
; Remove overly verbose commentary
* lisp/progmodes/eglot.el (eglot--connect): Remove overly verbose
commentary.
João Távora [Sat, 18 Mar 2023 12:28:22 +0000 (12:28 +0000)]
Merge confusing duplicate sections on commands in Eglot manual
Also describe eglot-diagnostics-map.
* doc/misc/eglot.texi (Eglot Features): Don't describe commands here.
(Eglot Commands): Describe commands here.
João Távora [Fri, 17 Mar 2023 22:37:27 +0000 (22:37 +0000)]
Don't take over mouse-1 binding on Eglot diagnostics (bug#62157)
It's better to give the user a variable to allow the overlay keymap to
be customized.
* lisp/progmodes/eglot.el (eglot--mouse-call): Accept second arg.
(eglot--mode-line-props): Adapt call to eglot--mouse-call
(eglot-diagnostics-map): New variable.
(eglot-code-actions-at-mouse): New command.
João Távora [Fri, 17 Mar 2023 22:33:46 +0000 (22:33 +0000)]
; Prefer "language server" to "LSP server" in Eglot manual
* eglot.texi (Quick Start, Customizing Eglot)
(Project-specific configuration)
(Troubleshooting Eglot): LSP server -> language server.
Michael Albinus [Sat, 18 Mar 2023 12:13:56 +0000 (13:13 +0100)]
* lisp/progmodes/eglot.el (eglot--connect): Improve Tramp workaround.
Gregory Heytings [Sat, 18 Mar 2023 10:49:29 +0000 (10:49 +0000)]
Avoid slowdowns in xmltok-scan-attributes
* lisp/nxml/xmltok.el (xmltok-scan-attributes): Limit the search
to 10000 characters, to avoid slowdowns due to the quadratic
complexity of the regexp. Suggested by Stefan Monnier.
Eli Zaretskii [Sat, 18 Mar 2023 10:35:10 +0000 (12:35 +0200)]
; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test.
Gregory Heytings [Sat, 18 Mar 2023 10:31:36 +0000 (10:31 +0000)]
; * admin/git-bisect-start: Update failing commits
Alan Mackenzie [Sat, 18 Mar 2023 10:12:24 +0000 (10:12 +0000)]
CC Mode: Eliminate duplicate function c-list-of-strings
Replace it with the existing c-string-list-p. Also put an autoload cookie in
front of c-string-list-p so that it will not be signalled as undefined by
loaddefs.el.
lisp/progmodes/cc-vars.el (c-string-list-p): Make this autoload.
(c-list-of-strings): Remove.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): In the autoload
cookies, replace c-list-of-strings with c-string-list-p.
Alan Mackenzie [Mon, 13 Mar 2023 16:42:02 +0000 (16:42 +0000)]
CC Mode: Allow lists of strings as safe values for *-font-lock-extra-types
* lisp/progmodes/cc-vars.el (c-list-of-strings): New function.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): Add a :safe entry
into each of thes defcustoms for c-list-of-string.
(Top level): Add an autoload entry for each of the above.
Robert Pluim [Sat, 18 Mar 2023 09:33:39 +0000 (10:33 +0100)]
Add tests for Bug#62207
* test/src/keymap-tests.el (keymap-unset-test-remove-and-inheritance):
New test.
Eli Zaretskii [Sat, 18 Mar 2023 07:12:12 +0000 (09:12 +0200)]
; Fix 'make-obsolete-variable' forms
* lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once):
* lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once): Fix
make-obsolete-variable form. (Bug#62248)
Manuel Giraud [Fri, 10 Mar 2023 20:54:00 +0000 (21:54 +0100)]
Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)
* lisp/find-dired.el (find-ls-option-default-ls): Adapt to
a value that works with the default "find" on *BSD and
Darwin/MacOS. Tested on OpenBSD and MacOS. Do not merge
to master.
Arash Esbati [Fri, 17 Mar 2023 13:25:37 +0000 (14:25 +0100)]
; * lisp/subr.el (setq-local): Add missing period (bug#62242).
João Távora [Fri, 17 Mar 2023 14:21:11 +0000 (14:21 +0000)]
; Correct last commit, downcase node reference
* doc/misc/eglot.texi (Troubleshooting Eglot): Downcase node reference
João Távora [Fri, 17 Mar 2023 14:07:36 +0000 (14:07 +0000)]
Enhance section about troubleshooting in Eglot manual.
* doc/misc/eglot.texi (Troubleshooting Eglot): Parially rewrite.
João Távora [Fri, 17 Mar 2023 11:47:02 +0000 (11:47 +0000)]
Fix Eglot's snippet insertion to follow the manual
The manual states that YASnippet must only be installed to be useful.
Before this change, it would only work if the user happened to have
manually activated it before with 'yas-global-mode' or somesuch.
This makes Eglot's Yasnippet-activating behaviour similar to its
Flymake-activating behaviour.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Consult
eglot--stay-out-of.
(eglot--snippet-expansion-fn): Turn on yas-minor-mod eon demand.
(eglot-completion-at-point): Simplify.
Filipp Gunbin [Wed, 15 Mar 2023 18:04:26 +0000 (21:04 +0300)]
Reset abbrevs-changed after saving abbrevs (bug#62208)
* lisp/abbrev.el (abbrev--possibly-save): Reset abbrevs-changed after
saving abbrevs.
* test/lisp/abbrev-tests.el (abbrev--possibly-save-test): New test.
Robert Pluim [Fri, 17 Mar 2023 13:25:39 +0000 (14:25 +0100)]
; Fix markup in previous change
Robert Pluim [Fri, 17 Mar 2023 13:16:00 +0000 (14:16 +0100)]
Document `keymap-unset' in lispref
* doc/lispref/keymaps.texi (Changing Key Bindings): Document
keymap-unset.
Robert Pluim [Fri, 17 Mar 2023 08:50:38 +0000 (09:50 +0100)]
Don't add a key binding when REMOVE is non-nil
* src/keymap.c (store_in_keymap): Don't add a nil keybinding if we've
been asked to remove a non-existent binding. (Bug#62207)
Eli Zaretskii [Fri, 17 Mar 2023 08:14:41 +0000 (10:14 +0200)]
Fix the documentation of various aspects of adding Xref history
* lisp/progmodes/xref.el (xref-marker-ring-length)
(xref-set-marker-ring-length):
* lisp/progmodes/etags.el (tags-location-ring-length)
(find-tag-marker-ring): Add doc strings saying the variables are
unused.
* etc/NEWS: Enhance the description of the change which made Xref
marker stack unlimited in its length.
* doc/emacs/maintaining.texi (Looking Up Identifiers): Add back
text lost when xref forward history was added in bug#38797.
Explain the difference between 'C-M-,' and 'M-.'. Improve
wording (Bug#62229)
Eli Zaretskii [Thu, 16 Mar 2023 20:05:07 +0000 (22:05 +0200)]
; Minor wording fix in ELisp reference manual
* doc/lispref/objects.texi (General Escape Syntax): More accurate
wording. Avoid non-ASCII characters in Texinfo. (Bug#62224)
kobarity [Sun, 12 Mar 2023 08:05:54 +0000 (17:05 +0900)]
Fix python-fill-paragraph problems on filling strings (bug#62142)
* lisp/progmodes/python.el (python-syntax--context-compiler-macro)
(python-syntax-context): Add single-quoted-string and
triple-quoted-string as TYPE argument.
(python-info-triple-quoted-string-p): New helper function.
(python-fill-paragraph)
(python-fill-string): Use it.
* test/lisp/progmodes/python-tests.el (python-syntax-context-1)
(python-fill-paragraph-single-quoted-string-1)
(python-fill-paragraph-single-quoted-string-2)
(python-fill-paragraph-triple-quoted-string-1)
(python-info-triple-quoted-string-p-1)
(python-info-triple-quoted-string-p-2)
(python-info-triple-quoted-string-p-3): New tests.
João Távora [Thu, 16 Mar 2023 14:05:42 +0000 (14:05 +0000)]
Also exempt eglot-inlay-hints-mode from desktop.el's fumblings
Reported in https://github.com/joaotavora/eglot/discussions/1183.
* lisp/progmodes/eglot.el (desktop): Also exempt
eglot-inlay-hints-mode from desktop.el fumblings.
Stefan Kangas [Thu, 16 Mar 2023 13:32:44 +0000 (14:32 +0100)]
; Add WebDAV entry to index in Tramp manual
* doc/misc/tramp.texi (GVFS-based methods): Improve indexing.
Stefan Kangas [Thu, 16 Mar 2023 13:20:15 +0000 (14:20 +0100)]
Refer to EWW instead of w3 and w3m
* doc/misc/idlwave.texi (Help with HTML Documentation): Refer to EWW
instead of w3 and w3m.
João Távora [Thu, 16 Mar 2023 10:45:25 +0000 (10:45 +0000)]
Fix Eglot's command generation for code actions
The user command generated by eglot--code-action should always call
eglot-code-actions with a INTERACTIVE set to t.
Reported in https://github.com/joaotavora/eglot/issues/1132.
* lisp/progmodes/eglot.el (eglot--code-action): Pass INTERACTIVE=t to
eglot-code-action call.
João Távora [Thu, 16 Mar 2023 10:41:53 +0000 (10:41 +0000)]
Emphasize emacs-29-specificity in this version of lisp/progmodes/eglot.el
Do not merge to master.
Before working on bugfixes to Eglot in its non-ELPA form delivered
with Emacs 29, it's important to distinguish between this emacs-29
version and the one in master, which will also get the bugfixes (via
routine gitmerge.el) but with a bumped version number.
* lisp/progmodes/eglot.el (Version): Emphasize Emacs 29, but hint this
is 1.12 + something.
(Package-Requires): Remove. Everything required is already in Emacs
29.
USAMI Kenta [Wed, 8 Mar 2023 12:13:37 +0000 (21:13 +0900)]
Fix quoting of font-family in 'hfy-family'
Running "M-x htmlfontify-buffer" in one buffer, the exported HTML contains
lines like:
body, pre { text-decoration: none; font-family: Migu 2M; font-stretch:
normal; font-weight: 500; font-style: normal; color: #ffffff;
background: #000000; font-size: 15pt; }
Standards-compliant web browsers should ignore this font-family.
MDN Web Docs says:
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
Valid family names
Font family names must either be given quoted as strings, or unquoted as
a sequence of one or more identifiers. This means that punctuation
characters and digits at the start of each token must be escaped in
unquoted font family names.
It is a good practice to quote font family names that contain white
space, digits, or punctuation characters other than hyphens.
An unquoted font-family is valid as long as it doesn't start with a digit,
but MDN Web Docs also says:
The following example is technically valid but is not recommended:
font-family: Gill Sans Extrabold, sans-serif;
So it makes sense to quote all font-family.
* lisp/htmlfontify.el (hfy-family): Quote 'font-family'. (Bug#62054)
João Távora [Wed, 15 Mar 2023 23:59:01 +0000 (23:59 +0000)]
; Tweak doc/misc/eglot.texi
* doc/misc/eglot.texi (Advanced server configuration): Minor
tweaks.
Michael Eliachevitch [Wed, 15 Mar 2023 23:49:51 +0000 (23:49 +0000)]
Document how to construct JSONRPC arrays in Eglot manual
Many language server configuration options are of the JSON array
datatype, for example argument lists for executables, but there wasn't
any example of that in the Eglot manual.
* doc/misc/eglot.texi (User-specific configuration)
(User-specific configuration): Tweaks.
(JSONRPC objects in Elisp): Mention JSON arrays. Tweak example.
Copyright-paperwork-exempt: Yes
Michael Albinus [Wed, 15 Mar 2023 15:52:22 +0000 (16:52 +0100)]
* test/infra/Dockerfile.emba: Use debian:bullseye.
Andrea Corallo [Wed, 15 Mar 2023 15:18:04 +0000 (16:18 +0100)]
* configure.ac: Fix native comp compatibility check (bug#61960)
Michael Albinus [Wed, 15 Mar 2023 12:05:19 +0000 (13:05 +0100)]
* test/infra/Dockerfile.emba: Install clangd.
Philip Kaludercic [Wed, 15 Mar 2023 08:54:12 +0000 (09:54 +0100)]
Remove 'package-vc--query-spec'
* lisp/emacs-lisp/package-vc.el (require): Do not load `inline' during
compilation.
(package-vc--query-spec): Remove function.
(package-vc--clone): Do not call 'package-vc--query-spec'.
Philip Kaludercic [Wed, 15 Mar 2023 09:05:39 +0000 (10:05 +0100)]
Do not store :lisp-dir in package descriptors
* lisp/emacs-lisp/package-vc.el (package-vc--main-file)
(package-vc--unpack-1): Query 'pkg-spec' instead of
'package-desc-extras'.
(package-vc--unpack): Do not update 'package-desc-extras'.
This simplification is possible due to the change in
2718bbb3bc, since
we now ensure that package specifications are not lost. They are
either provided by a package archive or stored in
'package-vc-selected-packages'.
Philip Kaludercic [Wed, 15 Mar 2023 08:51:14 +0000 (09:51 +0100)]
Use 'package-vc-selected-packages' to store package specs
* doc/emacs/package.texi (Fetching Package Sources): Do not promote
the usage of 'package-vc-selected-packages' to install packages.
* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages): Remove
custom setter and change docstring according to these changes.
(package-vc--desc->spec): Consult 'package-vc-selected-packages' for
package specifications.
(package-vc--unpack): Add unknown package specifications to
'package-vc-selected-packages'
Stefan Kangas [Wed, 15 Mar 2023 04:11:55 +0000 (05:11 +0100)]
; Auto-commit of loaddefs files.
Juri Linkov [Mon, 13 Mar 2023 18:21:47 +0000 (20:21 +0200)]
* lisp/progmodes/xref.el: Bump the version.
Juri Linkov [Mon, 13 Mar 2023 17:38:28 +0000 (19:38 +0200)]
* lisp/progmodes/xref.el (xref--xref-buffer-mode): Split up 'setq-local'.
xref.el needs to support 26.1, but an arbitrary number of variables
in 'setq-local' was added in Emacs 27.1 (bug#62162).
Filipp Gunbin [Mon, 13 Mar 2023 16:27:13 +0000 (19:27 +0300)]
Fix import of keys in buffer created by epa-search-keys
* lisp/epa-ks.el (epa-ks--query-url): Add operation parameter.
(epa-ks--fetch-key, epa-search-keys): Use it.
Michael Albinus [Mon, 13 Mar 2023 17:02:36 +0000 (18:02 +0100)]
Fix connection-local variables settings
; * etc/NEWS: Fix typos.
* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables): Use NOW when calling
`custom-set-variables'.
* test/lisp/files-x-tests.el
(files-x-test-connection-local-set-profile-variables)
(files-x-test-connection-local-update-profile-variables)
(files-x-test-connection-local-set-profiles)
(files-x-test-hack-connection-local-variables-apply)
(files-x-test-with-connection-local-variables)
(files-x-test-setq-connection-local): Fix tests.
* test/lisp/net/tramp-tests.el (tramp-test34-connection-local-variables)
(tramp-test34-explicit-shell-file-name): Fix tests.
Eli Zaretskii [Mon, 13 Mar 2023 12:48:08 +0000 (14:48 +0200)]
; Minor copyedits in EGLOT-NEWS
* etc/EGLOT-NEWS: Fix punctuation and quoting, add note about
finding Issues.
João Távora [Fri, 10 Mar 2023 11:30:58 +0000 (11:30 +0000)]
Bump Eglot version to 1.12
* etc/EGLOT-NEWS: New file.
* etc/NEWS: Briefly mention etc/EGLOT-NEWS.
* lisp/progmodes/eglot.el: Bump versions.
João Távora [Sun, 12 Mar 2023 19:44:53 +0000 (19:44 +0000)]
Update Eglot's manual about eglot-workspace-configuration
There is a possible use for a global setting
eglot-workspace-configuration, which is to (ab)use it to set
user-specific configuration when the server doesn't permit other
methods. Rearrange the "Advanced server configuration" section and
describe that use in the manual.
* doc/misc/eglot.texi (Project-specific configuration): Correct
mistake about global usefulness of eglot-workspace-configuration.
(Advanced server configuration): Swap order of sections.
(User-specific configuration): Mention possibility of globally
setting eglot-workspace-configuration.
Eli Zaretskii [Sun, 12 Mar 2023 20:22:41 +0000 (22:22 +0200)]
; * lisp/novice.el (disabled-command-function): Add note in a comment.
João Távora [Sun, 12 Mar 2023 19:30:53 +0000 (19:30 +0000)]
Amend last Eglot commit (bug#62065)
The fix contained a spurious check for this-command that shouldn't
have made it in..
* lisp/progmodes/eglot.el (eglot-ensure): Don't check this-command.
João Távora [Sun, 12 Mar 2023 18:19:40 +0000 (18:19 +0000)]
Make eglot-ensure's post-command-hook run a bit later (bug#62065)
'eglot-ensure', typically used in the major-mode-hook, use
'post-command-hook' to schedule an automated, non-interactive
connection attempt to a server. The goal is to connect when the
buffer is ready, i.e. after the user command that found the file.
However, if there are dir-local or buffer-local variables to confirm,
finding the file will cause a minibuffer prompt to appear.
In that case, 'eglot-ensure's addition to the global post-command-hook
runs before it was intended too and a connection is started
prematurely.
In turn, this means that a call to 'hack-dir-local-variables' -- which
is part of the connection process -- which also needs a minibuffer
prompt, collides with the previous one. This generates an error and
confuses the user, who doesn't know if the directory-local variables
have been applied or not.
This commit fixes the clash by having 'eglot-ensure' set
'post-command-hook' buffer-locally. This causes the automated
connection to take place, as intended, after the user's original
file-finding command has ended.
However, the problem reported in bug#62065 is not completely fixed.
If the user answers "no" to the first "confirm local variables"
"prompt, she will be prompted again in the second one. A subsequent
commit will address this separate problem.
* lisp/progmodes/eglot.el (eglot-ensure): Use buffer-local post-command-hook.
Eli Zaretskii [Sun, 12 Mar 2023 17:32:02 +0000 (19:32 +0200)]
Fix display of disabled-command help text
* lisp/novice.el (disabled-command-function): Improve wording, and
make sure the prompt doesn't exceed one screen line, so that the
mini-window is not resized (which gets in the way of fitting the
window to the size of the help text), and the help text is fully
visible when Emacs prompts for input. (Bug#62146)
Mattias Engdegård [Sun, 12 Mar 2023 16:57:38 +0000 (17:57 +0100)]
Remove mention of old dotted-list reader quirk from manual
* doc/lispref/objects.texi (Dotted Pair Notation):
The (. X) reader peculiarity is no more (bug#62020).
Eli Zaretskii [Sun, 12 Mar 2023 14:19:49 +0000 (16:19 +0200)]
Fix value history shown for 'gc-cons-percentage'
When Emacs is built, temacs is run in batch mode, so if we enlarge
'gc-cons-percentage' in that case, the enlarged value will be
"remembered" by the dumped Emacs, and will show confusing
information in "C-h v", claiming that the original value was 1.0.
Keeping the value at 0.1 during dumping avoids that.
* src/emacs.c (main): Increase 'gc-cons-percentage' in batch mode
only if we are not initializing (a.k.a. "dumping") Emacs.
Michael Albinus [Sun, 12 Mar 2023 10:01:22 +0000 (11:01 +0100)]
TRework fix for bug#62106
* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables):
Use `custom-set-variables'. It serves the purpose to not keep
unsaved user options, and it is less invasive than
`customize-save-variable'.
Eli Zaretskii [Sun, 12 Mar 2023 07:48:45 +0000 (09:48 +0200)]
; * etc/NEWS: Fix last change.
Eli Zaretskii [Sun, 12 Mar 2023 07:45:48 +0000 (09:45 +0200)]
; Remove 'ns-popup-font-panel' from documentation
* doc/emacs/macos.texi (Mac / GNUstep Customization): Remove the
reference to 'ns-popup-font-panel'. (Bug#62130)
Randy Taylor [Sat, 11 Mar 2023 01:56:04 +0000 (20:56 -0500)]
Add missing indentation rule for rust-ts-mode (Bug#62109)
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules): Add
missing rule.
Eli Zaretskii [Sat, 11 Mar 2023 17:30:06 +0000 (19:30 +0200)]
; One more improvement to ELisp "internals" appendix.
Michael Albinus [Sat, 11 Mar 2023 16:31:11 +0000 (17:31 +0100)]
Fix bug#62106
* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables):
Use `customize-save-variable' instead of `customize-set-variable'.
(Bug#62106)
Eli Zaretskii [Sat, 11 Mar 2023 16:16:35 +0000 (18:16 +0200)]
; Minor improvement of documentation of GC thresholds
* doc/lispref/internals.texi (Garbage Collection): More practical
aspects of enlarging the GC threshold.
Randy Taylor [Sat, 11 Mar 2023 02:12:33 +0000 (21:12 -0500)]
Add missing rust-ts-mode highlight query for scoped_type_identifiers
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add missing query.
kobarity [Fri, 10 Mar 2023 05:26:22 +0000 (14:26 +0900)]
Make "case" keyword a dedenter in Python
* lisp/progmodes/python.el (python-rx): Add "case" to dedenter.
(python-info-dedenter-opening-block-positions): Add "case" to pairs.
* test/lisp/progmodes/python-tests.el (python-indent-dedenters-9):
New test.
Eli Zaretskii [Sat, 11 Mar 2023 12:54:22 +0000 (14:54 +0200)]
; * lisp/arc-mode.el (w32-get-console-codepage): Declare.
Eli Zaretskii [Sat, 11 Mar 2023 11:30:37 +0000 (13:30 +0200)]
Fix decoding non-ASCII file names in zip archives on MS-Windows
* lisp/arc-mode.el (archive-zip-summarize): On MS-Windows,
override archive-file-name-coding-system for files compressed
on MS-Windows, and use the local console encoding instead.
Eli Zaretskii [Sat, 11 Mar 2023 09:54:31 +0000 (11:54 +0200)]
Fix copying binary files from zip archives
* lisp/arc-mode.el (archive-copy-file): Prevent any coding
conversions when writing output files. (Bug#62091)
Robert Pluim [Fri, 10 Mar 2023 10:13:42 +0000 (11:13 +0100)]
Skip ruby-ts-syntax-propertize-symbol unless treesitter is available
*
test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-syntax-propertize-symbol):
Add check for treesitter.
Yuan Fu [Fri, 10 Mar 2023 06:15:36 +0000 (22:15 -0800)]
; * doc/misc/eglot.texi (Project-specific configuration): Fix typo.
Randy Taylor [Wed, 8 Mar 2023 01:38:18 +0000 (20:38 -0500)]
Fix enums and unions appearing as structs in c-ts-base-mode's imenu
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Separate enums and unions out
from structs.
Dmitry Gutov [Thu, 9 Mar 2023 21:49:39 +0000 (23:49 +0200)]
ruby-ts-mode: Fine-tune s-p-f on symbols (bug#62086)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query):
Don't match ':' in symbol node text. Or '_', I suppose.
(ruby-ts--syntax-propertize): Make sure to only put the '_' syntax
on punctuation syntax characters, and not on the whole symbol (to
e.g. have symbols like :foo? include text recognized as word).
* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-syntax-propertize-symbol): New test.
Dmitry Gutov [Thu, 9 Mar 2023 15:24:54 +0000 (17:24 +0200)]
python-info-dedenter-opening-block-positions: Fix to support "bare" match
* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Make the check
stricter. Require that block starts only at indentation.
* test/lisp/progmodes/python-tests.el
(python-indent-after-bare-match): Another test (bug#62031).
João Távora [Thu, 9 Mar 2023 13:07:02 +0000 (13:07 +0000)]
Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri
This isn't a typical autoload: the progn block is plced in the
autoloads file, but the eglot.el file itself isn't loaded as a result
when the function inside the progn block is called.
* lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri):
autoload, but in progn.
João Távora [Thu, 9 Mar 2023 01:20:11 +0000 (01:20 +0000)]
Add chapter on advanced server configuration to Eglot manual
* doc/misc/eglot.texi (Top): Add section "Advanced server configuration"
(Setting Up LSP Servers): Rework.
(Advanced server configuration): New chapter.
Eli Zaretskii [Thu, 9 Mar 2023 10:23:14 +0000 (12:23 +0200)]
; * lisp/progmodes/java-ts-mode.el (treesit-query-capture): Declare.
Vincenzo Pupillo [Mon, 6 Mar 2023 11:24:34 +0000 (12:24 +0100)]
java-ts-mode: detect if text_block is supported.
A recent commit in tree-sitter-java (issue #141) removed support for
the text_block node type from the grammar. To support the old released
version and the new one, a helper function was added on which the
string syntax highlighting now depends. (bug#61913)
* lisp/progmodes/java-ts-mode.el
(java-ts-mode--string-highlight-helper): New helper function that
return the right query string
(java-ts-mode--font-lock-settings): Use it
Copyright-paperwork-exempt: yes
kobarity [Sun, 5 Mar 2023 08:07:17 +0000 (17:07 +0900)]
Revert workaround introduced in Bug#56271
* lisp/progmodes/python.el (python-nav-end-of-statement)
(python-nav-end-of-block): Revert workaround introduced in Bug#56271
as the bug is fixedin Bug#58780.
kobarity [Sun, 5 Mar 2023 08:06:26 +0000 (17:06 +0900)]
Fix searching for end of string in python-nav-end-of-statement
* lisp/progmodes/python.el (python-nav-end-of-statement): Add
searching for corresponding string-quote.
* test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-3)
(python-nav-end-of-statement-4, python-info-current-defun-4): New
tests. (Bug#58780)