1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

170308 Commits

Author SHA1 Message Date
Eli Zaretskii
3b7198dc47 Merge from origin/emacs-29
5303152872 Revert "Fix treesit-node-field-name and friends (bug#66674)"
fa0bb88302 ; * src/buffer.c (syms_of_buffer) <default-directory>: Do...
44517037ae ; Fix typo
ccf46acefd ; Fix last change.
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compil...
9afba605bb Explain status "r" in `epa-list-keys`
6271422196 ; * lisp/dired.el (dired--make-directory-clickable): Refo...
fcbb004489 Fix mouse clicks on directory line in Dired
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
eb19984c4d Mark icalendar.el as maintained by emacs-devel
03dc914fd3 ; Fix footnotes in ELisp Intro manual
ceacf75395 Fix usage of `setq-default' and offer more suggestions
2701da0eee Fix python-ts-mode triple quote syntax (bug#67262)
683c7c9687 Increment parser timestamp when narrowing changes (bug#67...
8ae42c825e ruby-ts-mode: Fix indentation for string_array closer
9cfa498e0a treesit-major-mode-setup: Use 'treesit--syntax-propertize...
da2e440462 ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
6ea507296a Correctly refontify changed region in tree-sitter modes (...
2023-12-30 04:51:17 -05:00
Ihor Radchenko
aa0037aaf7 Improve performance let-binding `case-fold-search' (bug#66117)
* src/buffer.h: Remove case_fold_search_ buffer object slot.
* src/buffer.c (bset_case_fold_search): Remove - no longer needed.
(init_buffer_once): Remove removed buffer slot init.
(syms_of_buffer): Use DEFVAR_LISP to define `case-fold-search' and
declare it buffer-local.
* src/minibuf.c (syms_of_minibuf): Remove DEFSYM call for
`case-fold-search' symbol.  It now lives in `syms_of_buffer'.
* src/editfns.c (Fcompare_buffer_substrings):
(Fchar_equal):
* src/search.c (looking_at_1):
(string_match_1):
(search_command):
(Fre__describe_compiled): Adjust C queries to `case-fold-search' value
to use C globals instead of BVAR macro.
* doc/lispref/internals.texi (Buffer Internals): Do not list
`case_fold_search' slot.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#259

When used as buffer slot, let-binding `case-fold-search' would scale
with the number of live buffers and can be slow.  This change makes
let-binding much faster at the cost of slightly slower `set-buffer'.
2023-12-30 10:03:46 +02:00
Eli Zaretskii
784acce842 ; Fix last change
* src/buffer.c (Ffind_buffer): Doc fix.  (Bug#66117)

* test/manual/etags/c-src/emacs/src/lisp.h (get_truename_buffer):
Revert removal of prototype: that breaks the test results.
2023-12-30 10:01:31 +02:00
Ihor Radchenko
b7a737ef49 Improve performance of `find-buffer-visiting' (bug#66117)
* src/buffer.c (Fget_truename_buffer): Expose `get_truename_buffer' to
Elisp.
(Ffind_buffer): New subr searching for a live buffer with a given
value of buffer-local variable.
(syms_of_buffer): Register the new added subroutines.
* src/filelock.c (lock_file): Use the new `Fget_truename_buffer' name.
* src/lisp.h:
* test/manual/etags/c-src/emacs/src/lisp.h: Remove no-longer-necessary
extern declarations for `get_truename_buffer'.
* lisp/files.el (find-buffer-visiting): Refactor, using subroutines to
search for buffers instead of slow manual Elisp iterations.
2023-12-30 09:53:46 +02:00
Ihor Radchenko
0cb252cf21 * lisp/textmodes/remember.el: Remove org-remember support.
org-remember has been removed from Org mode proper and then from
org-contrib 10 years ago in
https://git.sr.ht/~bzg/org-contrib/commit/be8736195e
(Bug#68076)
2023-12-30 09:45:48 +02:00
Daniel Martín
35f8629a3f Fix previous page and next page tooltips in doc-view.el
* lisp/doc-view.el (doc-view-tool-bar-map): Fix toolbar items to go to
next and previous pages in a document.  (Bug#68018)
2023-12-30 09:41:27 +02:00
Ihor Radchenko
bb0a5eb41f Add tests for `let' (bug#66117)
* test/src/eval-tests.el (eval-tests/default-value): New test.
2023-12-30 09:37:28 +02:00
Yuan Fu
5303152872
Revert "Fix treesit-node-field-name and friends (bug#66674)"
This reverts commit 9874561f39.

See bug#67990.  Basically our original code is correct, the error is
in libtree-sitter, which only manifests in certain cases.

https://github.com/tree-sitter/tree-sitter/pull/2104
2023-12-29 19:52:07 -08:00
Po Lu
94e3d11593 Simplify code relating to UI thread synchronization
* java/org/gnu/emacs/EmacsContextMenu.java (display):

* java/org/gnu/emacs/EmacsDialog.java (display):

* java/org/gnu/emacs/EmacsService.java (getEmacsView)
(getLocationOnScreen, getClipboardManager)
(requestDirectoryAccess): Replace manual synchronization within
Runnable objects by usage of FutureTask.
(syncRunnable): Accept FutureTask<V> in place of Runnables, and
obtain and return results from calls to its get method.
2023-12-30 10:57:11 +08:00
Stefan Kangas
fe2b68d405 Revert "Silence warning when requiring ruby-ts-mode"
This reverts commit bf81706988.

We deliberately don't silence these warnings, so that a user who loads
the mode without having the grammar installed sees the warning and
realizes the problem in time to fix it.
2023-12-30 01:09:19 +01:00
Eli Zaretskii
291763feca Improve documentation of 'require-with-check'
* doc/lispref/loading.texi (Named Features): Document
'require-with-check'.

* etc/NEWS: Fix wording of entry about 'require-with-check'.
2023-12-29 21:19:50 +02:00
Sean Whitton
d7ff14fcba pcomplete--entries: In predicate, check file exists
* lisp/pcomplete.el (pcomplete--entries): In the predicate passed to
completion-table-with-predicate, when PREDICATE is nil, take ourselves
to be responsible for calling file-exists-p (bug#67661).
2023-12-29 17:42:02 +00:00
Stefan Monnier
b0bead793f * lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo 2023-12-29 11:21:38 -05:00
Stefan Monnier
2a8e6c8c84 (require-with-check): New function (bug#67696)
* lisp/files.el (require-with-check): New function.
* lisp/progmodes/eglot.el: Use it (and prefer #' to quote function names).
2023-12-29 11:17:51 -05:00
Eli Zaretskii
f27dd1f954 ; Fix style of comments and doc strings in last change in ses.el
* lisp/ses.el (ses-cell-set-formula): Fix comments style.
(cl-member): Fix byte-compilation warning.

* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references): Doc fix.
2023-12-29 14:32:56 +02:00
Vincent Belaïche
825b896acf Fix 13 years old bug#5852 !
Sometimes recalculating a cell does not change its value, however it
still have to be written to the data area when the reference list is
changed

* lisp/ses.el (ses-cell-set-formula): Fix bug#5852, at last !

* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references): Rename test
from ses-bug5852, do not expect failure, and update description.
2023-12-29 12:41:54 +01:00
Vincent Belaïche
b96087d427 Simplify test ses-bug5852
* test/lisp/ses-tests.el (ses-bug5852): Siumplify test to
demonstrate that the bug is not connected to yanking, but has to
do with ses-cell-set-formula.
2023-12-29 12:41:54 +01:00
Vincent Belaïche
0ffcfd015d Add test reproducting bug #5852 2023-12-29 12:41:54 +01:00
Stefan Kangas
ae9657e1f4 ; Declare unused cperl-mode function obsolete
* lisp/progmodes/cperl-mode.el (cperl-font-lock-unfontify-region-function):
Make unused function obsolete.
2023-12-29 11:42:37 +01:00
Stefan Kangas
5cf22cacda ; Delete some commented out code from ange-ftp.el
* lisp/net/ange-ftp.el: Delete some code commented out since 2002.
2023-12-29 11:25:53 +01:00
Stefan Kangas
82eb4f0020 Don't recommend using cperl-hairy
Enabling `cperl-hairy` makes cperl-mode break many Emacs conventions
and can be confusing to new users.  Let's not say that this is the
"recommended mode of use", instead leaving it up to the user.

* lisp/progmodes/cperl-mode.el (cperl-mode): Don't recommend using
`cperl-hairy'.
2023-12-29 11:25:10 +01:00
Po Lu
ea3d211f3f Obey USE_MY_METRICS in compound glyphs
* src/sfnt.c (struct sfnt_compound_glyph_context): New fields
holding the positions of both phantom points.
(sfnt_decompose_compound_glyph): New argument METRICS_RETURN;
return the metrics of components with USE_MY_METRICS within this
field.
(sfnt_decompose_glyph): New argument METRICS_RETURN, which
serves the same purpose.
(sfnt_build_glyph_outline): Apply glyph advance and origin
distortion to METRICS, and return the metrics as altered by
compound glyphs in there.
(sfnt_lookup_glyph_metrics): Trim away two unused parameters,
PIXEL_SIZE and HEAD, whose functionality has been superseeded by
sfnt_scale_metrics and the implicit scaling the interpreter
performs.
(sfnt_interpret_compound_glyph_2): Save phantom points within
fields provided to that end in CONTEXT.
(sfnt_interpret_compound_glyph_1): Save and source phantom
points for each glyph to and from the context.
(sfnt_test_get_metrics, main): Adjust tests correspondingly.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_metrics): Remove obsolete
parameters.
(sfntfont_get_glyph_outline): Don't change temp by the metrics
distortions, which is now the task of sfnt_decompose_glyph.
2023-12-29 14:58:41 +08:00
Eli Zaretskii
fa0bb88302 ; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088). 2023-12-28 21:46:59 +02:00
Eli Zaretskii
714942b1c3 Fix extraction of files with wildcards in names from zip archives
* lisp/arc-mode.el (archive-zip-extract): Quote wildcard
characters in file names as [C].  (Bug#67926)
2023-12-28 16:51:45 +02:00
Eli Zaretskii
24e71050ea Fix rectangle commands when 'indent-tabs-mode' is non-nil
* lisp/rect.el (delete-rectangle, kill-rectangle): Temporarily
bind 'indent-tabs-mode' to nil.  (Bug#67925)
2023-12-28 10:56:33 +02:00
Eli Zaretskii
6abf1c038f Fix 'delete-rectangle' with multi-column characters
* lisp/rect.el (delete-rectangle-line): Support multi-column
characters, when STARTCOL is in the middle of such a character.
(Bug#67925)
2023-12-28 10:50:59 +02:00
F. Jason Park
775bd4b631 Sideline implied invisible-intangible coupling in ERC
* etc/ERC-NEWS: Add entry explaining removal of automatic `intangible'
propertizing of t-valued `invisible' messages.
* lisp/erc/erc.el (erc--insert-invisible-as-intangible-p): New flag
variable, a temporary escape hatch to regain pre-5.6 behavior
involving the modification of certain `invisible' messages.
(erc--insert-line): Gate unfavorable behavior behind
`erc--insert-invisible-as-intangible-p' flag.  Add comment clarifying
deferred initialization of `insert-position', which was part of the
many changes introduced as part of bug#60936.
2023-12-27 21:44:29 -08:00
F. Jason Park
7097be8ef6 Move ERC test utilities to common file
* lisp/erc/erc-common.el (erc--define-catalog): Update name of
reference to convenience command now located in `erc-tests-common'.
* test/lisp/erc/erc-button-tests.el: Require common test-util library
`erc-tests-common', located under test/lisp/erc/resources.
; (erc-button-alist--url,
; erc-button-tests--erc-button-alist--function-as-form,
; erc-button-tests--erc-button-alist--nil-form,
; erc-button--display-error-notice-with-keys): Use common helper
; `erc-tests-common-init-server-proc' from test-utils library.
* test/lisp/erc/erc-fill-tests.el: Require `erc-tests-common'.
(erc-fill-tests--wrap-populate): Use helper
`erc-tests-common-init-server-proc'.
(erc-fill-tests--save-p): Remove.  See replacement
`erc-tests-common-snapshot-save-p' in erc-tests-common.
(erc-fill-tests--graphic-dir): Add trailing slash.
(erc-fill-tests--compare): Move body to generalized utility
`erc-tests-common-snapshot-compare' in erc-tests-common.
* test/lisp/erc/erc-goodies-tests.el: Require `erc-tests-common'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move here from erc-tests.el.
* test/lisp/erc/erc-networks-tests.el: Load `erc-tests-common'.
(erc-networks-tests--create-live-proc): Defer to
`erc-tests-common-init-server-proc' and drop optional buffer param.
(erc-networks-tests--clean-bufs): Defer to
`erc-tests-common-kill-buffers'.
(erc-networks--rename-server-buffer--existing--live): Call
`erc-networks-tests--create-live-proc' in server buffer.
* test/lisp/erc/erc-scenarios-internal.el: Load `erc-tests-common'.
(erc-scenarios-internal--run-graphical-all): Use
`erc-tests-common-create-subprocess' to create process.
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-fail): Silence error message.
* test/lisp/erc/erc-stamp-tests.el: Require `erc-tests-common'.
(erc-stamp-tests--insert-right, erc-timestamp-intangible--left): Use
`erc-tests-common-init-server-proc'.
(erc-tests--assert-get-inserted-msg/stamp,
erc-stamp-tests--assert-get-inserted-msg/stamp): Move from
erc-tests.el, renaming to latter.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move here from
erc-tests.el.
* test/lisp/erc/erc-tests.el: Require `erc-tests-common'.
(erc-with-server-buffer): Use renamed test-helper utility
`erc-tests-common-init-server-proc'.
(erc-tests--send-prep, erc-tests--set-fake-server-process): Move to
`erc-tests-common' library and rename to
`erc-tests-common-prep-for-insertion' and
`erc-tests-common-init-server-proc', respectively.
; (erc-hide-prompt, erc--refresh-prompt,
; erc-setup-buffer--custom-action, erc--parsed-prefix,
; erc--update-channel-modes, erc--channel-modes,
; erc--channel-modes/graphic-p, erc-ring-previous-command): Use
; `erc-tests-common-prep-for-insertion' instead of
; `erc-tests--send-prep', and use `erc-tests-common-init-server-proc'
; instead of `erc-tests--set-fake-server-process'.
(erc-tests--with-process-input-spy): Move to `erc-tests-common' and
rename `erc-tests-common-with-process-input-spy'.
; (erc--check-prompt-input-functions, erc-send-current-line,
; erc--check-prompt-input-for-multiline-blanks,
; erc-send-whitespace-lines): Use renamed
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
; (erc-process-input-line): Use renamed
; `erc-tests-common-init-server-proc'.
(erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg-readonly-with): Move to
`erc-tests-common' and rename with "common" prefix, using single
instead of double hyphen.
(erc-tests--assert-get-inserted-msg/stamp): Move to `erc-stamp-tests'
and rename with "stamp" prefix.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move to
`erc-stamp-tests'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move to `erc-goodies-tests'.
; (erc--get-inserted-msg-beg/basic,
; erc--get-inserted-msg-end/basic,
; erc--get-inserted-msg-bounds/basic): Use common helpers.
; (erc--route-insertion): Use renamed helper functions
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
(erc-tests--make-server-buf): Move to `erc-common-tests' and rename
with "common" prefix.
(erc-tests--make-client-buf): Remove unused function without supplying
replacement.
; (erc-handle-irc-url): Use renamed `erc-tests-common-make-server-buf'
; utility function.
; (erc-tests--assert-printed-in-subprocess): Use helper from common lib
; `erc-tests-common-create-subprocess code' to do the heavy lifting.
(erc-tests--string-to-propertized-parts,
erc-tests-pp-propertized-parts): Move to `erc-tests-common' and rename
with "common" prefix.
* test/lisp/erc/resources/erc-tests-common.el: New file containing
helper utilities and fixtures used by multiple files in test/lisp/erc.
2023-12-27 21:32:25 -08:00
F. Jason Park
c83a2d1509 Allow selecting graphical ERC tests manually
* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--monospace, erc-fill-wrap--merge,
erc-fill-wrap-tests--merge-action,
erc-fill-wrap-tests--merge-action/indicator-pre,
erc-fill-wrap-tests--merge-action/indicator-post,
erc-fill-line-spacing, erc-fill-wrap-visual-keys--body,
erc-fill-wrap-visual-keys--prompt, erc-fill--left-hand-stamps): Tag as
:erc--graphcial.
* test/lisp/erc/erc-scenarios-internal.el
(erc-scenarios-internal--run-interactive-all): New test to assist ERC
contributors in -jN parallel runs.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
(erc-scenarios-scrolltobottom--relaxed): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-scrolltobottom.el
(erc-scenarios-scrolltobottom--normal,
erc-scenarios-scrolltobottom--all): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Tag as :erc--graphical.
* test/lisp/erc/erc-tests.el (erc--channel-modes/graphic-p): Tag as
:erc--graphical.
* test/lisp/erc/resources/base/local-modules/first.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--graphical-p): New variable.
(erc-scenarios-common--make-bindings): Don't enable
`inhibit-interaction' when interactive.  Set
`erc-scenarios-common--graphical-p' flag when
`:erc--graphical' tag present and running interactively.
(erc-scenarios-common-with-cleanup): Account for variable
`erc-scenarios-common--graphical-p'.
(erc-scenarios-common-scrolltobottom--normal): Turn off
`erc-scrolltobottom-mode' when test finishes so as not to pollute when
running multiple interactive tests.
; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeouts.
2023-12-27 21:32:25 -08:00
F. Jason Park
7576926bea Replace erc--get-inserted-msg-bounds with functions
* lisp/erc/erc-fill.el (erc-fill--wrap-rejigger-region): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'
with `end' arg.
* lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Call
`erc--get-inserted-msg-beg' with `point' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* lisp/erc/erc.el (erc--get-inserted-msg-beg-at,
erc--get-inserted-msg-end-at): New macros.
(erc--get-inserted-msg-beg, erc--get-inserted-msg-end): New functions.
(erc--get-inserted-msg-bounds): Convert to function with different
signature, and refactor.  This was introduced for the yet unreleased
5.6 (Emacs 30) by bug#60936.
(erc--get-inserted-msg-prop): Use `erc--get-inserted-msg-beg' instead
of `erc--get-inserted-msg-bounds' with `beg' arg.
(erc--delete-inserted-message): Update call site of
`erc--get-inserted-msg-bounds' to match new signature.
(erc-cmd-CLEAR): Use `erc--get-inserted-msg-beg' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-right-fools-invisible): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'.
* test/lisp/erc/erc-tests.el (erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg/stamp,
erc-tests--assert-get-inserted-msg-readonly-with): New helper
functions.
(erc--get-inserted-msg-beg/basic, erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/basic, erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/readonly,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): New tests.
(erc--get-inserted-msg-bounds, erc--get-inserted-msg-bounds/basic):
Move `beg' and `end' cases to separate test variants and rename former
to latter.
2023-12-27 21:32:25 -08:00
F. Jason Park
65735efdca Improve multi-window erc-keep-place-indicator-mode
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-follow): Describe
condition causing an indicator update.
(erc--keep-place-indicator-on-window-configuration-change,
erc--keep-place-indicator-on-window-buffer-change): Rename former to
latter, add required WINDOW parameter, and don't move indicator if
buffer appears in multiple windows.  Also, don't bother checking
whether either buffer is a mini because the manual says window change
functions don't run for minibuffer replacements.
(erc--keep-place-indicator-setup): Hook on
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place-mode, erc-keep-place-disable): Remove member from
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place): Use `visible' FRAME arg of `get-buffer-window'.
Don't twiddle `window-prev-buffers' when
`erc-keep-place-indicator-mode' is non-nil.  This feature was
originally introduced by bug#59943.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Update hook name.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: New file.
* test/lisp/erc/resources/keep-place/follow.eld: New file.
2023-12-27 21:32:25 -08:00
Stefan Kangas
8f571769e1 ; Fix typos 2023-12-28 01:20:32 +01:00
Jim Porter
ea4cbb3aae Abbreviate the VC revision in vc-annotate's buffer name
* lisp/vc/vc-hooks.el (vc-use-short-revision): New variable.
(vc-short-revision): New function.

* lisp/vc/vc-annotate.el (vc-annotate-use-short-revision): New
option...
(vc-annotate): ... use it.

* lisp/vc/vc-git.el (vc-git--rev-parse): Consult
'vc-use-short-revision'.

* etc/NEWS: Announce this change (bug#67062).
2023-12-27 14:22:18 -08:00
Eli Zaretskii
9e0eeb2d49 ; * doc/misc/eglot.texi (Performance): Fix a typo. 2023-12-27 18:42:41 +02:00
João Távora
4f017f5f0e Eglot: experimental support for Eglot-only subprojects
* lisp/progmodes/eglot.el
(eglot-alternatives)
(eglot-server-programs): : Rework docstring.
(eglot--guess-contact): Pass project to eglot-server-programs function.
(project-root): Define for new experimental Eglot project type.

Github-reference: https://github.com/joaotavora/eglot/discussions/1337
2023-12-27 09:19:01 -06:00
João Távora
c5a4366b3f Eglot: bump to 1.16
* etc/EGLOT-NEWS: Update.

* lisp/progmodes/eglot.el (Version): Bump to 1.15
(Package-Requires): Bump jsonrpc depedency to 1.23
2023-12-27 08:02:20 -06:00
João Távora
d4485838e1 Eglot: fix typo
* lisp/progmodes/eglot.el (eglot--guess-contact): Fix typo.
2023-12-27 08:02:20 -06:00
João Távora
d9b5f618ba Eglot: introduce eglot-events-buffer-config
* doc/misc/eglot.texi (Eglot Variables): Reword.
(Performance): Reword.

* lisp/progmodes/eglot.el (eglot-events-buffer-size): Obsolete.
(eglot-events-buffer-config): New customization variable.
(eglot--connect): Use eglot-events-buffer-config.
2023-12-27 08:02:20 -06:00
João Távora
731cfee3b4 Jsonrpc: bump to 1.0.23
* lisp/jsonrpc.el (Version): Bump to 1.0.23
2023-12-27 07:53:45 -06:00
Yuan Fu
8044140b54
Revert e8df6c311f 2023-12-26 22:37:19 -08:00
Dmitry Gutov
5213e92f20 Fix Tramp error in project-find-file
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Avoid new Tramp connections (bug#68041).
2023-12-27 02:20:39 +02:00
Stefan Kangas
44517037ae ; Fix typo 2023-12-26 22:09:57 +01:00
João Távora
d376462c71 Revert "Eglot: Make 'try-completion' less broken"
This reverts commit 4dcbf61c15.

It's not correct, breaks tests.  I declare it impossible to make C-M-i
use of 'try-completion' behave sanely with LSP in its current state.
YMMV.  Use a completion tooltip, like Company.
2023-12-26 10:10:14 -06:00
João Távora
4dcbf61c15 Eglot: Make 'try-completion' less broken
The 'try-completion' completion operation, used mostly in vanilla
'completion-at-point' invoked with C-M-i is close to impossible to get
right in LSP because of the arbitrary edits handled in
':exit-function'.

When this operation is invoked on the table, returning the pattern
argument unchanged somehow (TM) makes a sole completion show the
*Completions* buffer, where selecting it will recover context
necessary for `:exit-function' and call that function.  It doesn't
break any other cases I know, and that's good enough for now.

https://github.com/joaotavora/eglot/issues/1339

* lisp/progmodes/eglot.el (eglot-completion-at-point): Return pattern
when 'try-completion' is invoked.
2023-12-26 07:54:21 -06:00
Eli Zaretskii
ccf46acefd ; Fix last change. 2023-12-26 14:51:37 +02:00
Eli Zaretskii
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compilation (bug#67900). 2023-12-26 14:49:50 +02:00
Po Lu
60199ac01d ; * src/ftfont.c (ftfont_glyph_metrics): Comment on advance rounding. 2023-12-26 14:10:57 +08:00
Po Lu
cd91ecedcb Consistently round glyph advances in the SFNT font backend
* src/sfnt.h (SFNT_ROUND_FIXED): New macro.

* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed.  Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.
2023-12-26 14:10:57 +08:00
João Távora
a6ef458e38 Eglot: partial fix for middle-of-symbol completions
* lisp/progmodes/eglot.el (eglot-completion-at-point): Fix
completion reversion in :exit-function.

In a rust-ts-mode buffer such as this main.rs file

  fn main() {
    let v: usize = 1;
    v.c<cursor-here>1234.1234567890
  }

the server wants to edit the line to read, after C-M-i and selecting
"count_ones"

    v.count_ones<cursor-here>.1234567890

But it couldn't apply the edit to the correct initial state because
that state wasn't correctly restored.  This commit fixes that.

However, if the initial state is

    v.count_on1234.1234567890

then completion still fails, because the 'try-completion' call in
eglot-completion-at-point will just return complete to "count_ones"
and Emacs doesn't consider this a completion "exit", so it'll
completely ignore the exit function.

I think 'try-completion' (and 'test-completion') simply can't be used
here (for one, they obey styles, and styles are off-limits in LSP),
but I'll leave that for another commit.

Github-reference: https://github.com/joaotavora/eglot/issues/1339
2023-12-26 02:41:28 +00:00
Stefan Kangas
2d15389554 Add Python to recentf-arrange-rules
* lisp/recentf.el (recentf-arrange-rules): Add rule for Python.
2023-12-25 19:26:14 +01:00