]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoImprove indenting "case" in Python
kobarity [Sat, 25 Mar 2023 13:59:05 +0000 (22:59 +0900)]
Improve indenting "case" in Python

* lisp/progmodes/python.el (python-info-dedenter-statement-p): Do not
consider the first "case" in the block as dedenter.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-7)
(python-info-dedenter-statement-p-6): New tests. (Bug#62092)

21 months ago; * test/src/fns-tests.el: Fix last change
Ken Brown [Sat, 25 Mar 2023 16:54:23 +0000 (12:54 -0400)]
; * test/src/fns-tests.el: Fix last change

21 months ago* test/infra/Dockerfile.emba (emacs-native-comp): Add zlib1g-dev.
Michael Albinus [Sat, 25 Mar 2023 16:33:33 +0000 (17:33 +0100)]
* test/infra/Dockerfile.emba (emacs-native-comp): Add zlib1g-dev.

21 months agoFix failure of fns-tests-collate-strings on Cygwin
Ken Brown [Fri, 24 Mar 2023 15:35:40 +0000 (11:35 -0400)]
Fix failure of fns-tests-collate-strings on Cygwin

* test/src/fns-tests.el (fns-tests-collate-strings): Use
en_XY.UTF-8 instead of en_DE.UTF-8 as an example of an invalid
locale; en_DE.UTF-8 is actually a valid locale on Cygwin.
Note: The test will still fail on Cygwin releases < 3.5
because of a Cygwin bug.  (Bug#62420)

21 months ago* lisp/savehist.el (savehist-save): Preserve shared structure
Aaron L. Zeng [Tue, 21 Mar 2023 20:07:54 +0000 (16:07 -0400)]
* lisp/savehist.el (savehist-save): Preserve shared structure

This avoids ballooning the size of variables that contain
large text properties, such as the 'yank-handler' installed
by 'evil-yank-rectangle', which contains a list of lines in
the string.
* lisp/savehist.el (savehist-save): Enable 'print-circle'.
(Bug#62364)

Copyright-paperwork-exempt: yes

21 months agoAdapt Tramp manual
Michael Albinus [Fri, 24 Mar 2023 12:30:25 +0000 (13:30 +0100)]
Adapt Tramp manual

* doc/misc/tramp.texi (Default Method): OpenSSH for MS Windows can
be used.
(Ssh setup): Extend for MS Windows and ssh.

21 months agoFix system time sampling on MS-Windows
Eli Zaretskii [Fri, 24 Mar 2023 11:10:30 +0000 (14:10 +0300)]
Fix system time sampling on MS-Windows

* src/timefns.c (emacs_localtime_rz) [WINDOWSNT]: Unconditionally
call tzset to make sure we pick up all the changes of time zone,
working around the MS CRT caching.

21 months agoFix treesit_ensure_parsed (bug#62333)
Yuan Fu [Fri, 24 Mar 2023 07:17:10 +0000 (00:17 -0700)]
Fix treesit_ensure_parsed (bug#62333)

* src/treesit.c (treesit_ensure_parsed): Check for need_reparse after
treesit_sync_visible_region runs, because as the comment says,
treesit_sync_visible_region might modify need_reparse.

21 months ago* lisp/help-fns.el (find-lisp-object-file-name): Fix bug#62376 part2
Stefan Monnier [Thu, 23 Mar 2023 17:43:45 +0000 (13:43 -0400)]
* lisp/help-fns.el (find-lisp-object-file-name): Fix bug#62376 part2

Nowadays `loaddefs.el` are byte-compiled, so adjust pattern accordingly

21 months agoImprove "Bugs" in the Emacs manual
Eli Zaretskii [Thu, 23 Mar 2023 13:33:04 +0000 (15:33 +0200)]
Improve "Bugs" in the Emacs manual

* doc/emacs/trouble.texi (Bugs, Known Problems)
(Understanding Bug Reporting, Checklist, Sending Patches)
(Contributing, Coding Standards): Improve wording, structure,
markup, and indexing.  (Bug#62320)

21 months agoFix Eglot progress reporting
João Távora [Thu, 23 Mar 2023 10:25:17 +0000 (10:25 +0000)]
Fix Eglot progress reporting

When the server sends an "end" message, Emacs's progress reporters
should also be updated.

* lisp/progmodes/eglot.el (eglot-handle-notification $/progress): Rework.

21 months ago; Minor copyedits to Eglot manual
João Távora [Tue, 21 Mar 2023 14:55:57 +0000 (14:55 +0000)]
; Minor copyedits to Eglot manual

* doc/misc/eglot.texi (Troubleshooting Eglot): Minor fixes.

21 months ago; Improve documentation of :predicate in globalized minor modes
Eli Zaretskii [Thu, 23 Mar 2023 09:30:19 +0000 (11:30 +0200)]
; Improve documentation of :predicate in globalized minor modes

* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Improve documentation of the :predicate keyword in defining
globalized minor modes.

21 months agoFix :predicate handling in globalized minor modes
Stefan Monnier [Wed, 22 Mar 2023 17:52:50 +0000 (13:52 -0400)]
Fix :predicate handling in globalized minor modes

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Fix a thinko.  (Bug#62376)

21 months agoAllow showing prefix commands in Help buffers
Eli Zaretskii [Thu, 23 Mar 2023 08:31:56 +0000 (10:31 +0200)]
Allow showing prefix commands in Help buffers

* lisp/help.el (describe-bindings-show-prefix-commands): New user
option.
(describe-map): Use it to decide whether to output prefix
commands.  Patch by Bob Rogers <rogers@rgrjr.com>.  (Bug#62279)

* etc/NEWS: Document 'describe-bindings-show-prefix-commands'.

21 months agoFix toolbar item validation in the NS port
Daniel Martín [Sat, 18 Mar 2023 00:47:32 +0000 (01:47 +0100)]
Fix toolbar item validation in the NS port

* src/nsterm.m ([EmacsView validateToolbarItem:]): Implement this
NSToolbarItemValidation method, which is called by AppKit when it
needs to validate an image item in a toolbar.  This solves, in
particular, the problem with having the "Save" icon on the tool
bar enabled at Emacs startup.  (Bug#62234)

21 months ago; Describe problems with 'screen' and COLORTERM variable
Eli Zaretskii [Thu, 23 Mar 2023 08:03:04 +0000 (10:03 +0200)]
; Describe problems with 'screen' and COLORTERM variable

* etc/PROBLEMS: Describe the issue with 'screen' and
COLORTERM=truecolor.  (Bug#62237)

21 months ago; Fix xref-match's :version since the default value did change
Dmitry Gutov [Wed, 22 Mar 2023 16:16:50 +0000 (18:16 +0200)]
; Fix xref-match's :version since the default value did change

21 months agoUse libgccjit-10-dev on EMBA
Michael Albinus [Wed, 22 Mar 2023 17:34:23 +0000 (18:34 +0100)]
Use libgccjit-10-dev on EMBA

* test/infra/Dockerfile.emba (emacs-native-comp): Use
libgccjit-10-dev.  (Bug#62211)

* test/infra/gitlab-ci.yml (build-native-comp-speed2)
(test-native-comp-speed2): Uncomment jobs.

21 months ago* lisp/outline.el (outline--fix-buttons-after-change): Add save-match-data.
Juri Linkov [Wed, 22 Mar 2023 07:44:02 +0000 (09:44 +0200)]
* lisp/outline.el (outline--fix-buttons-after-change): Add save-match-data.

It's important for a hook in after-change-functions not to change match-data.
Otherwise it breaks functions that make changes in the buffer, such as
for example, successive calls to delete-region in smerge-keep-n, etc.

21 months agoAlign concatenated strings to the first sibling in c-ts-mode
Yuan Fu [Wed, 22 Mar 2023 06:27:20 +0000 (23:27 -0700)]
Align concatenated strings to the first sibling in c-ts-mode

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

21 months agoOnly fill the current paragraph in c-ts-common--fill-block-comment
Yuan Fu [Wed, 22 Mar 2023 05:50:03 +0000 (22:50 -0700)]
Only fill the current paragraph in c-ts-common--fill-block-comment

* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Shrink the filled region to the
paragraph at point.

21 months agoAdd missing indent rule for c-ts-mode
Yuan Fu [Tue, 21 Mar 2023 23:24:29 +0000 (16:24 -0700)]
Add missing indent rule for c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule for case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

21 months agoImprove docstring of treesit-parent-while (bug#62301)
Yuan Fu [Tue, 21 Mar 2023 21:50:07 +0000 (14:50 -0700)]
Improve docstring of treesit-parent-while (bug#62301)

* doc/lispref/parsing.texi (Retrieving Nodes): Improve and fix
docstring for treesit-parent-until and treesit-parent-while.
* lisp/treesit.el (treesit-parent-while): Improve docstring.

21 months ago; Delete accidental leftover '()' Eglot function
João Távora [Tue, 21 Mar 2023 09:59:13 +0000 (09:59 +0000)]
; Delete accidental leftover '()' Eglot function

* lisp/progmodes/eglot.el (eglot--workspace-configuration-plist):
Remove ().

21 months agoEglot: report window/workDoneProgress capability to language server
João Távora [Tue, 21 Mar 2023 09:56:30 +0000 (09:56 +0000)]
Eglot: report window/workDoneProgress capability to language server

In bug#59149, LSP progress reporting was implemented, but Eglot's
'capabilities' statement to the server wasn't changed to include
window/workDoneProgress.

* lisp/progmodes/eglot.el (eglot-client-capabilities): Actually
report workDoneProgress.

21 months ago* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c38539
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

21 months agoExpand defvar-keymap documentation
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.

21 months ago* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
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).

21 months agoComp fix calls to redefined primtives with op-bytecode (bug#61917)
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.

21 months agoWarn package authors away from keymap-unset with REMOVE
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'.

21 months agoComment out jobs on EMBA
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.

21 months agoImprove defvar-keymap docstring.
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.

21 months agoImprove warning about changing the string returned by symbol-name
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.

21 months agoFix visiting XBM/XPM files when 'c-ts-mode' is active
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)

21 months ago* lisp/mpc.el (mpc-format): Fix oversight in commit 48b6cec61cf
Stefan Monnier [Sun, 19 Mar 2023 20:02:52 +0000 (16:02 -0400)]
* lisp/mpc.el (mpc-format): Fix oversight in commit 48b6cec61cf

21 months agoBail early from eglot--apply-text-edits if nothing to do
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.

21 months ago; Clarify in-code commentary of eglot--after-change
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.

21 months agoImprove ergonomics of Eglot's inlay hints
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.

21 months agoProtect against too large size of 'recent-keys' vector
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)

21 months ago* lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.
Michael Albinus [Sun, 19 Mar 2023 08:37:35 +0000 (09:37 +0100)]
* lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.

21 months ago; Remove 'build-module' and 'html-manual' directories from 'admin'
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.

21 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
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

21 months agoUpdate to Org 9.6.1-48-g92471e
Kyle Meyer [Sun, 19 Mar 2023 01:41:22 +0000 (21:41 -0400)]
Update to Org 9.6.1-48-g92471e

21 months ago; * admin/notes/tree-sitter/starter-guide: Update starter-guide.
Yuan Fu [Sat, 18 Mar 2023 21:13:31 +0000 (14:13 -0700)]
; * admin/notes/tree-sitter/starter-guide: Update starter-guide.

21 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
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

21 months ago; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change
Gregory Heytings [Sat, 18 Mar 2023 15:04:26 +0000 (15:04 +0000)]
; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change

21 months ago; Minor copyedits of recent changes in ELisp reference manual
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.

21 months ago; Minor fixes in recent Eglot changes
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.

21 months ago; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.
Eli Zaretskii [Sat, 18 Mar 2023 13:41:55 +0000 (15:41 +0200)]
; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.

21 months ago; Again correct node reference casing in doc/misc/eglot.texi
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.

21 months ago; Remove overly verbose commentary
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.

21 months agoMerge confusing duplicate sections on commands in Eglot manual
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.

21 months agoDon't take over mouse-1 binding on Eglot diagnostics (bug#62157)
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.

21 months ago; Prefer "language server" to "LSP server" in Eglot manual
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.

21 months ago* lisp/progmodes/eglot.el (eglot--connect): Improve Tramp workaround.
Michael Albinus [Sat, 18 Mar 2023 12:13:56 +0000 (13:13 +0100)]
* lisp/progmodes/eglot.el (eglot--connect): Improve Tramp workaround.

21 months agoAvoid slowdowns in xmltok-scan-attributes
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.

21 months ago; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test.
Eli Zaretskii [Sat, 18 Mar 2023 10:35:10 +0000 (12:35 +0200)]
; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test.

21 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Sat, 18 Mar 2023 10:31:36 +0000 (10:31 +0000)]
; * admin/git-bisect-start: Update failing commits

21 months agoCC Mode: Eliminate duplicate function c-list-of-strings
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.

21 months agoCC Mode: Allow lists of strings as safe values for *-font-lock-extra-types
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.

21 months agoAdd tests for Bug#62207
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.

21 months ago; Fix 'make-obsolete-variable' forms
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)

21 months agoFix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)
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.

21 months ago; * lisp/subr.el (setq-local): Add missing period (bug#62242).
Arash Esbati [Fri, 17 Mar 2023 13:25:37 +0000 (14:25 +0100)]
; * lisp/subr.el (setq-local): Add missing period (bug#62242).

21 months ago; Correct last commit, downcase node reference
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

21 months agoEnhance section about troubleshooting in Eglot manual.
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.

21 months agoFix Eglot's snippet insertion to follow the manual
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.

21 months agoReset abbrevs-changed after saving abbrevs (bug#62208)
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.

21 months ago; Fix markup in previous change
Robert Pluim [Fri, 17 Mar 2023 13:25:39 +0000 (14:25 +0100)]
; Fix markup in previous change

21 months agoDocument `keymap-unset' in lispref
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.

21 months agoDon't add a key binding when REMOVE is non-nil
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)

21 months agoFix the documentation of various aspects of adding Xref history
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)

21 months ago; Minor wording fix in ELisp reference manual
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)

21 months agoFix python-fill-paragraph problems on filling strings (bug#62142)
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.

21 months agoAlso exempt eglot-inlay-hints-mode from desktop.el's fumblings
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.

21 months ago; Add WebDAV entry to index in Tramp manual
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.

21 months agoRefer to EWW instead of w3 and w3m
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.

21 months agoFix Eglot's command generation for code actions
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.

21 months agoEmphasize emacs-29-specificity in this version of lisp/progmodes/eglot.el
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.

21 months agoFix quoting of font-family in 'hfy-family'
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)

21 months ago; Tweak doc/misc/eglot.texi
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.

21 months agoDocument how to construct JSONRPC arrays in Eglot manual
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

21 months ago* test/infra/Dockerfile.emba: Use debian:bullseye.
Michael Albinus [Wed, 15 Mar 2023 15:52:22 +0000 (16:52 +0100)]
* test/infra/Dockerfile.emba: Use debian:bullseye.

21 months ago* configure.ac: Fix native comp compatibility check (bug#61960)
Andrea Corallo [Wed, 15 Mar 2023 15:18:04 +0000 (16:18 +0100)]
* configure.ac: Fix native comp compatibility check (bug#61960)

21 months ago* test/infra/Dockerfile.emba: Install clangd.
Michael Albinus [Wed, 15 Mar 2023 12:05:19 +0000 (13:05 +0100)]
* test/infra/Dockerfile.emba: Install clangd.

21 months agoRemove 'package-vc--query-spec'
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'.

21 months agoDo not store :lisp-dir in package descriptors
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'.

21 months agoUse 'package-vc-selected-packages' to store package specs
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'

21 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 15 Mar 2023 04:11:55 +0000 (05:11 +0100)]
; Auto-commit of loaddefs files.

21 months ago* lisp/progmodes/xref.el: Bump the version.
Juri Linkov [Mon, 13 Mar 2023 18:21:47 +0000 (20:21 +0200)]
* lisp/progmodes/xref.el: Bump the version.

21 months ago* lisp/progmodes/xref.el (xref--xref-buffer-mode): Split up 'setq-local'.
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).

21 months agoFix import of keys in buffer created by epa-search-keys
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.

21 months agoFix connection-local variables settings
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.

21 months ago; Minor copyedits in EGLOT-NEWS
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.

21 months agoBump Eglot version to 1.12
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.

21 months agoUpdate Eglot's manual about eglot-workspace-configuration
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.

21 months ago; * lisp/novice.el (disabled-command-function): Add note in a comment.
Eli Zaretskii [Sun, 12 Mar 2023 20:22:41 +0000 (22:22 +0200)]
; * lisp/novice.el (disabled-command-function): Add note in a comment.

21 months agoAmend last Eglot commit (bug#62065)
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.

21 months agoMake eglot-ensure's post-command-hook run a bit later (bug#62065)
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.