]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 30 Dec 2023 09:51:17 +0000 (04:51 -0500)]
Merge from origin/emacs-29

53031528725 Revert "Fix treesit-node-field-name and friends (bug#66674)"
fa0bb88302b ; * src/buffer.c (syms_of_buffer) <default-directory>: Do...
44517037aed ; Fix typo
ccf46acefd2 ; Fix last change.
c86b039dffc ; * etc/DEBUG: Improve advice for debugging native-compil...
9afba605bbc Explain status "r" in `epa-list-keys`
62714221968 ; * lisp/dired.el (dired--make-directory-clickable): Refo...
fcbb0044899 Fix mouse clicks on directory line in Dired
be8a7155b48 Fix 'split-root-window-right' and 'split-root-window-below'
eb19984c4db Mark icalendar.el as maintained by emacs-devel
03dc914fd37 ; Fix footnotes in ELisp Intro manual
ceacf753958 Fix usage of `setq-default' and offer more suggestions
2701da0eee5 Fix python-ts-mode triple quote syntax (bug#67262)
683c7c96871 Increment parser timestamp when narrowing changes (bug#67...
8ae42c825e1 ruby-ts-mode: Fix indentation for string_array closer
9cfa498e0ab treesit-major-mode-setup: Use 'treesit--syntax-propertize...
da2e440462b ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
6ea507296a7 Correctly refontify changed region in tree-sitter modes (...

12 months agoImprove performance let-binding `case-fold-search' (bug#66117)
Ihor Radchenko [Fri, 15 Dec 2023 10:47:45 +0000 (11:47 +0100)]
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'.

12 months ago; Fix last change
Eli Zaretskii [Sat, 30 Dec 2023 08:01:31 +0000 (10:01 +0200)]
; 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.

12 months agoImprove performance of `find-buffer-visiting' (bug#66117)
Ihor Radchenko [Sun, 8 Oct 2023 08:48:42 +0000 (11:48 +0300)]
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.

12 months ago* lisp/textmodes/remember.el: Remove org-remember support.
Ihor Radchenko [Thu, 28 Dec 2023 10:58:42 +0000 (11:58 +0100)]
* 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)

12 months agoFix previous page and next page tooltips in doc-view.el
Daniel Martín [Mon, 25 Dec 2023 10:43:39 +0000 (11:43 +0100)]
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)

12 months agoAdd tests for `let' (bug#66117)
Ihor Radchenko [Sat, 23 Dec 2023 14:29:36 +0000 (15:29 +0100)]
Add tests for `let' (bug#66117)

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

12 months agoRevert "Fix treesit-node-field-name and friends (bug#66674)"
Yuan Fu [Sat, 30 Dec 2023 03:52:07 +0000 (19:52 -0800)]
Revert "Fix treesit-node-field-name and friends (bug#66674)"

This reverts commit 9874561f39e62c1c9fada6c2e013f93d9ea65729.

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

12 months agoSimplify code relating to UI thread synchronization
Po Lu [Sat, 30 Dec 2023 02:57:11 +0000 (10:57 +0800)]
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.

12 months agoRevert "Silence warning when requiring ruby-ts-mode"
Stefan Kangas [Sat, 30 Dec 2023 00:06:41 +0000 (01:06 +0100)]
Revert "Silence warning when requiring ruby-ts-mode"

This reverts commit bf81706988f6b1b9d6e8033c8227f0129e04ef03.

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.

12 months agoImprove documentation of 'require-with-check'
Eli Zaretskii [Fri, 29 Dec 2023 19:19:50 +0000 (21:19 +0200)]
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'.

12 months agopcomplete--entries: In predicate, check file exists
Sean Whitton [Fri, 29 Dec 2023 17:41:35 +0000 (17:41 +0000)]
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).

12 months ago* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo
Stefan Monnier [Fri, 29 Dec 2023 16:21:38 +0000 (11:21 -0500)]
* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo

12 months ago(require-with-check): New function (bug#67696)
Stefan Monnier [Fri, 29 Dec 2023 16:17:51 +0000 (11:17 -0500)]
(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).

12 months ago; Fix style of comments and doc strings in last change in ses.el
Eli Zaretskii [Fri, 29 Dec 2023 12:32:56 +0000 (14:32 +0200)]
; 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.

12 months agoFix 13 years old bug#5852 !
Vincent Belaïche [Fri, 29 Dec 2023 11:11:51 +0000 (12:11 +0100)]
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.

12 months agoSimplify test ses-bug5852
Vincent Belaïche [Fri, 29 Dec 2023 11:29:20 +0000 (12:29 +0100)]
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.

12 months agoAdd test reproducting bug #5852
Vincent Belaïche [Thu, 28 Dec 2023 18:08:46 +0000 (19:08 +0100)]
Add test reproducting bug #5852

12 months ago; Declare unused cperl-mode function obsolete
Stefan Kangas [Fri, 29 Dec 2023 10:39:28 +0000 (11:39 +0100)]
; Declare unused cperl-mode function obsolete

* lisp/progmodes/cperl-mode.el (cperl-font-lock-unfontify-region-function):
Make unused function obsolete.

12 months ago; Delete some commented out code from ange-ftp.el
Stefan Kangas [Fri, 29 Dec 2023 10:25:53 +0000 (11:25 +0100)]
; Delete some commented out code from ange-ftp.el

* lisp/net/ange-ftp.el: Delete some code commented out since 2002.

12 months agoDon't recommend using `cperl-hairy`
Stefan Kangas [Fri, 29 Dec 2023 10:24:48 +0000 (11:24 +0100)]
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'.

12 months agoObey USE_MY_METRICS in compound glyphs
Po Lu [Fri, 29 Dec 2023 06:58:19 +0000 (14:58 +0800)]
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.

12 months ago; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088).
Eli Zaretskii [Thu, 28 Dec 2023 19:46:59 +0000 (21:46 +0200)]
; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088).

12 months agoFix extraction of files with wildcards in names from zip archives
Eli Zaretskii [Thu, 28 Dec 2023 14:51:45 +0000 (16:51 +0200)]
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)

12 months agoFix rectangle commands when 'indent-tabs-mode' is non-nil
Eli Zaretskii [Thu, 28 Dec 2023 08:56:33 +0000 (10:56 +0200)]
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)

12 months agoFix 'delete-rectangle' with multi-column characters
Eli Zaretskii [Thu, 28 Dec 2023 08:50:59 +0000 (10:50 +0200)]
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)

12 months agoSideline implied invisible-intangible coupling in ERC
F. Jason Park [Thu, 28 Dec 2023 02:44:29 +0000 (18:44 -0800)]
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.

12 months agoMove ERC test utilities to common file
F. Jason Park [Sun, 24 Dec 2023 20:21:49 +0000 (12:21 -0800)]
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.

12 months agoAllow selecting graphical ERC tests manually
F. Jason Park [Sat, 23 Dec 2023 23:23:44 +0000 (15:23 -0800)]
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.

12 months agoReplace erc--get-inserted-msg-bounds with functions
F. Jason Park [Sun, 24 Dec 2023 19:49:26 +0000 (11:49 -0800)]
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.

12 months agoImprove multi-window erc-keep-place-indicator-mode
F. Jason Park [Sat, 23 Dec 2023 20:46:33 +0000 (12:46 -0800)]
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.

12 months ago; Fix typos
Stefan Kangas [Thu, 28 Dec 2023 00:20:20 +0000 (01:20 +0100)]
; Fix typos

12 months agoAbbreviate the VC revision in vc-annotate's buffer name
Jim Porter [Thu, 14 Dec 2023 19:31:27 +0000 (11:31 -0800)]
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).

12 months ago; * doc/misc/eglot.texi (Performance): Fix a typo.
Eli Zaretskii [Wed, 27 Dec 2023 16:42:41 +0000 (18:42 +0200)]
; * doc/misc/eglot.texi (Performance): Fix a typo.

12 months agoEglot: experimental support for Eglot-only subprojects
João Távora [Wed, 27 Dec 2023 15:19:01 +0000 (09:19 -0600)]
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

12 months agoEglot: bump to 1.16
João Távora [Wed, 27 Dec 2023 12:05:43 +0000 (06:05 -0600)]
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

12 months agoEglot: fix typo
João Távora [Wed, 27 Dec 2023 13:53:30 +0000 (07:53 -0600)]
Eglot: fix typo

* lisp/progmodes/eglot.el (eglot--guess-contact): Fix typo.

12 months agoEglot: introduce eglot-events-buffer-config
João Távora [Wed, 27 Dec 2023 12:38:31 +0000 (06:38 -0600)]
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.

12 months agoJsonrpc: bump to 1.0.23
João Távora [Wed, 27 Dec 2023 12:10:28 +0000 (06:10 -0600)]
Jsonrpc: bump to 1.0.23

* lisp/jsonrpc.el (Version): Bump to 1.0.23

12 months agoRevert e8df6c311fcf59bf23d31b9db2bb8fec9d78fbe7
Yuan Fu [Wed, 27 Dec 2023 06:37:19 +0000 (22:37 -0800)]
Revert e8df6c311fcf59bf23d31b9db2bb8fec9d78fbe7

12 months agoFix Tramp error in project-find-file
Dmitry Gutov [Wed, 27 Dec 2023 00:20:39 +0000 (02:20 +0200)]
Fix Tramp error in project-find-file

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Avoid new Tramp connections (bug#68041).

12 months ago; Fix typo
Stefan Kangas [Tue, 26 Dec 2023 21:09:57 +0000 (22:09 +0100)]
; Fix typo

12 months agoRevert "Eglot: Make 'try-completion' less broken"
João Távora [Tue, 26 Dec 2023 14:10:04 +0000 (08:10 -0600)]
Revert "Eglot: Make 'try-completion' less broken"

This reverts commit 4dcbf61c1518dc53061707aeff8887517e050003.

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.

12 months agoEglot: Make 'try-completion' less broken
João Távora [Tue, 26 Dec 2023 13:47:29 +0000 (07:47 -0600)]
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.

12 months ago; Fix last change.
Eli Zaretskii [Tue, 26 Dec 2023 12:51:37 +0000 (14:51 +0200)]
; Fix last change.

12 months ago; * etc/DEBUG: Improve advice for debugging native-compilation (bug#67900).
Eli Zaretskii [Tue, 26 Dec 2023 12:49:50 +0000 (14:49 +0200)]
; * etc/DEBUG: Improve advice for debugging native-compilation (bug#67900).

12 months ago; * src/ftfont.c (ftfont_glyph_metrics): Comment on advance rounding.
Po Lu [Tue, 26 Dec 2023 06:09:42 +0000 (14:09 +0800)]
; * src/ftfont.c (ftfont_glyph_metrics): Comment on advance rounding.

12 months agoConsistently round glyph advances in the SFNT font backend
Po Lu [Tue, 26 Dec 2023 06:07:58 +0000 (14:07 +0800)]
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.

12 months agoEglot: partial fix for middle-of-symbol completions
João Távora [Tue, 26 Dec 2023 00:31:29 +0000 (00:31 +0000)]
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

12 months agoAdd Python to `recentf-arrange-rules`
Stefan Kangas [Mon, 25 Dec 2023 18:26:14 +0000 (19:26 +0100)]
Add Python to `recentf-arrange-rules`

* lisp/recentf.el (recentf-arrange-rules): Add rule for Python.

12 months agoExplain status "r" in `epa-list-keys`
Stefan Kangas [Mon, 25 Dec 2023 15:04:18 +0000 (16:04 +0100)]
Explain status "r" in `epa-list-keys`

* lisp/epa.el (epa-list-keys): Add revoked status to description.
Suggested by CHENG Gao <chenggao@icloud.com>.

12 months ago; * lisp/dired.el (dired--make-directory-clickable): Reformat comment.
Eli Zaretskii [Mon, 25 Dec 2023 13:07:21 +0000 (15:07 +0200)]
; * lisp/dired.el (dired--make-directory-clickable): Reformat comment.

12 months agoFix mouse clicks on directory line in Dired
Jared Finder [Sat, 16 Dec 2023 20:10:03 +0000 (12:10 -0800)]
Fix mouse clicks on directory line in Dired

The option 'dired-kill-when-opening-new-dired-buffer' should be
also honored when clicking the mouse to kill prev buffer.
* lisp/dired.el (dired--make-directory-clickable): Call
'dired--find-possibly-alternative-file' instead of 'dired', in
the click callback.  (Bug#67856)

12 months agoFix 'split-root-window-right' and 'split-root-window-below'
Eli Zaretskii [Mon, 25 Dec 2023 12:59:26 +0000 (14:59 +0200)]
Fix 'split-root-window-right' and 'split-root-window-below'

* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)

12 months agoApply TTF advance width rounding to uninstructed glyphs
Po Lu [Mon, 25 Dec 2023 07:38:15 +0000 (15:38 +0800)]
Apply TTF advance width rounding to uninstructed glyphs

* src/sfnt.c (sfnt_scale_metrics):

* src/sfntfont.c (sfntfont_get_glyph_outline): Round advance and
floor lbearing scaling glyph metrics.
(sfntfont_measure_pcm): Don't round or truncate metrics which
have already been.

12 months agoOptimize font edge filling loop
Po Lu [Mon, 25 Dec 2023 03:21:15 +0000 (11:21 +0800)]
Optimize font edge filling loop

* src/sfnt.c (sfnt_fedge_sort): Delete function.
(sfnt_poly_edges_exact): Don't sort edges, iterate through each
instead.
(main): Adjust tests.

12 months agoFix ses-formula-record
Vincent Belaïche [Sun, 24 Dec 2023 12:02:14 +0000 (13:02 +0100)]
Fix ses-formula-record

* lisp/ses.el (ses-is-cell-sym-p): Tighten test with checking
argument is a local variable.
(ses-formula-record): Fix definition.
(ses-rename-cell): Loosen test on new-name, conversely to
'ses-is-cell-sym-p' tightening.

12 months agoFix test about need for explicit printing inserted lines
Vincent Belaïche [Sun, 24 Dec 2023 21:05:54 +0000 (22:05 +0100)]
Fix test about need for explicit printing inserted lines

* lisp/ses.el (ses--blank-line-needs-printing-p): New
function. Does not consider that printer `nil' produces a non
empty string, as `ses-print-cell' removes nil printer by oring to
fallback.
(ses-insert-row): Replace the complex and erroneous test about
blank newline needing printing by a call to
'ses--blank-line-needs-printing-p'.

12 months agoMore doc on ses+ and argument order
Vincent Belaïche [Sat, 23 Dec 2023 18:38:56 +0000 (19:38 +0100)]
More doc on ses+ and argument order

* doc/misc/ses.texi (Standard formula functions): Indicate that
'ses+' reverses argument order.

12 months ago* src/eval.c (signal_or_quit): Fix naming inconsistency with docs
Stefan Monnier [Sun, 24 Dec 2023 15:13:22 +0000 (10:13 -0500)]
* src/eval.c (signal_or_quit): Fix naming inconsistency with docs

The var's docstring and etc/NEWS refer to "*Redisplay-trace*",
so better use that (which is also more in line with usual practice
of Emacs buffer names).

12 months agoMark icalendar.el as maintained by emacs-devel
Stefan Kangas [Sun, 24 Dec 2023 13:57:49 +0000 (14:57 +0100)]
Mark icalendar.el as maintained by emacs-devel

* lisp/calendar/icalendar.el: Mark emacs-devel as the maintainer.
Ref: https://debbugs.gnu.org/34315#152

12 months agocheckdoc: Avoid false positive for keybinding in docstring
Stefan Kangas [Sun, 24 Dec 2023 13:27:48 +0000 (14:27 +0100)]
checkdoc: Avoid false positive for keybinding in docstring

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Avoid false positive when a variable contains a keybinding (for
example, "C-g").  (Bug#68002)
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-docstring-avoid-false-positive-ok): New test.

12 months agoMake stty settings configurable in Tramp's make-process
Michael Albinus [Sun, 24 Dec 2023 10:35:16 +0000 (11:35 +0100)]
Make stty settings configurable in Tramp's make-process

* lisp/net/tramp-sh.el (tramp-pipe-stty-settings): New defcustom.
(tramp-sh-handle-make-process): Use it.  (Bug#62093)

12 months ago; Fix footnotes in ELisp Intro manual
Eli Zaretskii [Sun, 24 Dec 2023 08:46:04 +0000 (10:46 +0200)]
; Fix footnotes in ELisp Intro manual

12 months agoFix usage of `setq-default' and offer more suggestions
Xiyue Deng [Sun, 24 Dec 2023 00:12:44 +0000 (16:12 -0800)]
Fix usage of `setq-default' and offer more suggestions

cd61af0 changed from default-major-mode to major-mode in the first
code sample but didn't change the rest.  This patch fixes this and add
some explanations of why use `setq-default' instead of `setq'.  In
addition, it gives background on suggesting using text-mode as default
mode and suggest other alternatives.

* doc/lispintro/emacs-lisp-intro.texi (Text and Auto-fill): Fix usage
of `setq-default' and offer more suggestions.  (Bug#67848)

12 months agoFix toolbar for Log Edit mode
Eli Zaretskii [Sun, 24 Dec 2023 08:32:45 +0000 (10:32 +0200)]
Fix toolbar for Log Edit mode

* lisp/vc/log-edit.el (log-edit-tool-bar-map): Fix buttons and
help messages.

* etc/images/README (Files): Fix whitespace.

12 months ago; * src/eval.c (Fdefvar): Doc fix (bug#67991).
Eli Zaretskii [Sun, 24 Dec 2023 07:31:32 +0000 (09:31 +0200)]
; * src/eval.c (Fdefvar): Doc fix (bug#67991).

12 months agoIntroduce a toolbar for Log Edit mode
Po Lu [Sun, 24 Dec 2023 07:21:24 +0000 (15:21 +0800)]
Introduce a toolbar for Log Edit mode

* etc/NEWS: Announce new change.

* etc/images/README: List the sources of the new image files.

* etc/images/commit.xpm:
* etc/images/commit.pbm:
* etc/images/gen-changelog.xpm:
* etc/images/gen-changelog.pbm:
* etc/images/ins-changelog.xpm:
* etc/images/ins-changelog.pbm:
* etc/images/load-changelog.xpm:
* etc/images/load-changelog.pbm:
* etc/images/view-diff.xpm: New files.

* lisp/vc/log-edit.el (log-edit-menu): Insert a menu item for
"Generate ChangeLog".
(log-edit-tool-bar-map): New keymap.
(log-edit-mode): Install this keymap as the tool bar map.

12 months agoFix python-ts-mode triple quote syntax (bug#67262)
Yuan Fu [Sat, 23 Dec 2023 23:49:32 +0000 (15:49 -0800)]
Fix python-ts-mode triple quote syntax (bug#67262)

* lisp/progmodes/python.el (python--treesit-syntax-propertize): New function.
(python-ts-mode): Activate python--treesit-syntax-propertize.

12 months agoIncrement parser timestamp when narrowing changes (bug#67977)
Yuan Fu [Sun, 24 Dec 2023 00:47:04 +0000 (16:47 -0800)]
Increment parser timestamp when narrowing changes (bug#67977)

When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.

Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name.  Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.

I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.

* src/treesit.c (treesit_sync_visible_region):
(Ftreesit_parser_set_included_ranges): Increment timestamp.
* src/treesit.h (Lisp_TS_Parser): Add some comments.

12 months agoruby-ts-mode: Fix indentation for string_array closer
Dmitry Gutov [Sun, 24 Dec 2023 02:22:34 +0000 (04:22 +0200)]
ruby-ts-mode: Fix indentation for string_array closer

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix indentation for string_array closer.

12 months agotreesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'
Dmitry Gutov [Sun, 24 Dec 2023 02:07:15 +0000 (04:07 +0200)]
treesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'

* lisp/treesit.el (treesit-major-mode-setup): Make sure
'treesit--syntax-propertize-notifier' is used (bug#66732)

12 months agoruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
Dmitry Gutov [Sun, 24 Dec 2023 01:58:49 +0000 (03:58 +0200)]
ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--syntax-propertize):
Fix an out-of-bounds error with heredoc at eob.

12 months agoCorrectly refontify changed region in tree-sitter modes (bug#66732)
Yuan Fu [Sun, 17 Dec 2023 01:15:04 +0000 (17:15 -0800)]
Correctly refontify changed region in tree-sitter modes (bug#66732)

We already have treesit--font-lock-notifier that should mark changed
regions to be refontified, but it's called too late in the redsiplay &
fontification pipeline.  Here we add treesit--pre-redisplay that
forces reparse and calls notifier functions in
pre-redisplay-functions, which is early enough for the marking to take
effect.

Similarly, we force reparse in
syntax-propertize-extend-region-functions so syntax-ppss will have the
up-to-date syntax information when it scans the buffer text.  We also
record the lowest start position of the affected regions, and make
sure next syntex-propertize starts from that position.

* lisp/treesit.el (treesit--pre-redisplay-tick):
(treesit--syntax-propertize-start): New variable.
(treesit--syntax-propertize-notifier):
(treesit--pre-redisplay):
(treesit--pre-syntax-ppss): New functions.
(treesit-major-mode-setup): Add hooks.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Remove notifier.
(ruby-ts--parser-after-change): Remove notifier function.

12 months agojit-lock-force-redisplay: Make it work
Dmitry Gutov [Sat, 23 Dec 2023 20:53:35 +0000 (22:53 +0200)]
jit-lock-force-redisplay: Make it work

* lisp/jit-lock.el (jit-lock-force-redisplay):
Make sure the buffer change is really performed (bug#66732).

12 months agoOptionally continue on error in erc-auth-source-search
F. Jason Park [Sat, 23 Dec 2023 02:18:20 +0000 (18:18 -0800)]
Optionally continue on error in erc-auth-source-search

* doc/misc/erc.texi (auth-source): Add new "Troubleshooting"
subsection.
* lisp/erc/erc.el (erc-open): Initialize markers before determining
session parameters.  Otherwise, functions that rely on
`erc-inset-marker' being non-nil, like `erc-check-text-conversion',
may fail during auth-source lookups.
(erc-auth-source-search): When non-interactive, ask the user whether
to continue connecting anyway.  (Bug#67978)

12 months agoFix overlapping logs from erc-truncate-buffer-on-save
F. Jason Park [Wed, 20 Dec 2023 06:33:48 +0000 (22:33 -0800)]
Fix overlapping logs from erc-truncate-buffer-on-save

* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Currently, internal "error notices" do not have timestamps.  However,
this causes alignment issues for non-`fill-wrap' users of left-sided
stamps.  The heuristic used by this change for detecting such stamps
is weak and prone to false negatives.
* lisp/erc/erc-log.el (erc-log-mode, erc-log-enable): Set explicit
depth for `erc--pre-clear-functions' to 50.
(erc-save-buffer-in-logs): Fix partial regression in which redundant
text would appear in logs that have undergone truncation via an
interactive call to this command when the deprecated option
`erc-truncate-on-save' is non-nil.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Set
depth for `erc--pre-clear-functions' to 40.
(erc-stamp--reset-on-clear): Only add `erc-stamp--insert-date-hook'
when `erc-stamp--date-mode' is active.
* lisp/erc/erc.el (erc-cmd-CLEAR): Rework to honor but improve upon
the old behavior when called from lisp.  Do this by attempting to find
the beginning of the current message and excluding it from the
truncated portion of the buffer.  A NEWS entry describing this
behavior already exists for 5.6.
* test/lisp/erc/erc-scenarios-log.el
(erc-scenarios-log--save-buffer-in-logs/truncate-on-save): New test.
These changes originate from bug#60936.

12 months agoReplace some uses of erc-error
F. Jason Park [Tue, 19 Dec 2023 04:50:26 +0000 (20:50 -0800)]
Replace some uses of erc-error

* lisp/erc/erc-button.el
(erc-button--display-error-notice-with-keys-and-warn): Use
`erc--lwarn' so the warnings buffer is overridable for testing.
* lisp/erc/erc-sasl.el (erc-sasl-mode, erc-sasl-enable): Signal an
`error' instead of calling `erc-error', which continues execution.  In
this special case, the session cannot continue initializing, since
connection registration can't reasonably be expected to complete
successfully.
(erc-sasl--destroy): Don't run `erc-quit-hook', and issue a warning of
level `:error' to get users' attention instead of calling `ding'.
* lisp/erc/erc-speedbar.el
(erc-speedbar--emulate-sidebar-set-window-preserve-size): Don't set
window parameters.  Doing this basically made
`erc-speedbar-toggle-nicknames-window-lock' unusable.
(erc-speedbar--toggle-nicknames-sidebar): Manually unlock the window
after toggling.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable): Don't
`ding' when called in a non-ERC buffer, and make sure to call
`erc-speedbar--ensure' from an ERC buffer.  Also, don't disable
minor-mode var when speedbar buffer doesn't exist because that doesn't
ensure it'll be created the next time around, and users may count on
the activation state remaining consistent.
(erc-speedbar-toggle-nicknames-window-lock): Make usable from lisp
with explicit numeric arg.
* lisp/erc/erc-status-sidebar.el (erc-bufbar-mode, erc-bufbar-enable):
Only create the side window from an erc-mode buffer to ensure the
ratio is preserved when burying the current buffer, e.g., with
`custom-buffer-done'.
* lisp/erc/erc.el (erc--warnings-buffer-name, erc--lwarn): New
function, an analog of `lwarn', that allows for overriding the
warnings buffer with the new variable `erc--warnings-buffer-name'.
(erc-cmd-SERVER): Add comment.
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-fail): Expect warning instead of error.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--bufbar): Refresh when interactive as
well.
* test/lisp/erc/resources/sasl/plain-failed.eld: Expect EOF instead of
"CAP END".  (Bug#63595)

12 months agoPopulate erc--msg-prop-overrides for CTCP replies
F. Jason Park [Mon, 18 Dec 2023 05:49:13 +0000 (21:49 -0800)]
Populate erc--msg-prop-overrides for CTCP replies

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't set string
intended for insertion to the undefined return value of
`erc-process-ctcp-reply' and `erc-process-ctcp-query'.  Rework control
flow slightly for clarity.
* lisp/erc/erc.el (erc-process-ctcp-reply): Bind
`erc--msg-prop-overrides' and populate with `erc--ctcp' and `erc--cmd'
"msg props" for the benefit of `erc-display-message' calls made by
the various CTCP reply handlers.  (Bug#67677)

12 months ago; Fix some doc strings in ERC
F. Jason Park [Tue, 19 Dec 2023 03:38:30 +0000 (19:38 -0800)]
; Fix some doc strings in ERC

* lisp/erc/erc-networks.el: Lose some unneeded forward declarations.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Don't conflate SOCKS
with TOR by mentioning a ".onion" address for the `host' parameter.
* test/lisp/erc/erc-tests.el
(erc--check-prompt-input-for-multiline-blanks): Extend timeout.

12 months ago; * src/xdisp.c (draw_glyphs): Fix coding style.
Po Lu [Sat, 23 Dec 2023 12:50:16 +0000 (20:50 +0800)]
; * src/xdisp.c (draw_glyphs): Fix coding style.

12 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 23 Dec 2023 11:30:40 +0000 (06:30 -0500)]
Merge from origin/emacs-29

a4751657389 * doc/man/emacsclient.1: Fix --tramp option.
1e5357d3d1f * doc/man/emacsclient.1: Add missing sections (bug#66598)
fba7b9db397 Add explanation for extra parentheses in ELisp Introduction
77232826821 Add sample code to the "let*" section in "forward-paragraph"
7a00ca92c19 Fix treesit test (bug#67117)
d220893216c Fix c++-ts-mode indentation (bug#67975)
d386a8aa43f Recommend customizing eglot for python-base-mode
bd0c7589715 Improve documentation of new native-compilation commands
1ad126c0f28 ; Fix typo
77678244b83 doc/lispintro: Don't mention `set` (bug#67734)
cb3684e9dfa Fix script for some characters
2922d683b78 ; * src/treesit.c (treesit_traverse_child_helper): Fix co...
7b315e8a5c9 Fix an issue when searching subtree backward (bug#67117)
03625c2fefa Fix passive mode for tnftp client in ange-ftp.el.
b6429b1c1c7 ; Improve documentation of ispell.el's dictionary database
75cc1593412 ; * etc/PROBLEMS: Update the "GnuPG hangs" entry.
67d9af1c074 Fix using disabled command without a docstring
f68f3500236 Improve documentation of text properties handling when ya...
06c399914fa Eglot: Add Uiua language server

12 months ago* doc/man/emacsclient.1: Fix --tramp option.
Michael Albinus [Sat, 23 Dec 2023 11:04:37 +0000 (12:04 +0100)]
* doc/man/emacsclient.1: Fix --tramp option.

12 months agoFix alignment of columns in Dired display with ls-lisp
Eli Zaretskii [Sat, 23 Dec 2023 11:03:09 +0000 (13:03 +0200)]
Fix alignment of columns in Dired display with ls-lisp

* lisp/dired.el (dired-align-file): Don't realign the first column
of file's data.  (Bug#67953)

12 months ago; Improve and correct documentation of registers (bug#66394)
Eli Zaretskii [Sat, 23 Dec 2023 10:46:55 +0000 (12:46 +0200)]
; Improve and correct documentation of registers (bug#66394)

Suggested by Thierry Volpiatto <thievol@posteo.net>.
* doc/emacs/regs.texi (Registers): Mention filtering of registers
in the preview.

* lisp/register.el (register-use-preview)
(register--preview-function, register-preview-info): Doc fixes.

12 months agoRespect mouse-face on SVG image glyphs (bug#67794)
Manuel Giraud [Tue, 19 Dec 2023 11:25:24 +0000 (12:25 +0100)]
Respect mouse-face on SVG image glyphs (bug#67794)

* src/dispextern.h:
* src/image.c (image_spec_value): Export 'image_spec_value'.
* src/xdisp.c (draw_glyphs): Maybe update SVG image glyphs with
mouse face features before drawing.

12 months ago* doc/man/emacsclient.1: Add missing sections (bug#66598)
Peter Oliver [Sat, 21 Oct 2023 13:02:06 +0000 (14:02 +0100)]
* doc/man/emacsclient.1: Add missing sections (bug#66598)

Copyright-paperwork-exempt: yes

12 months agoAdd explanation for extra parentheses in ELisp Introduction
Xiyue Deng [Thu, 14 Dec 2023 00:21:10 +0000 (16:21 -0800)]
Add explanation for extra parentheses in ELisp Introduction

* doc/lispintro/emacs-lisp-intro.texi (fwd-para while): Add
a note to explain the extra parentheses.  (Bug#67820)

12 months agoMake ffap correctly guess remote file names at point
Visuwesh [Tue, 12 Dec 2023 15:44:12 +0000 (21:14 +0530)]
Make ffap correctly guess remote file names at point

* lisp/ffap.el (ffap-lax-url): Set it to nil so that remote file
names may be matched.
(ffap-fixup-email): New function.
(ffap-guesser): Specially handle email addresses now that
'ffap-lax-url' is nil, as user@host fails to be matched as an
email address with that setting.  (Bug#67688)

* etc/NEWS: Announce the new value of the defcustom.

12 months ago; Add autoload cookie for tags-reset-tags-tables
Gerd Möllmann [Sat, 23 Dec 2023 09:04:09 +0000 (10:04 +0100)]
; Add autoload cookie for tags-reset-tags-tables

12 months agoAdd sample code to the "let*" section in "forward-paragraph"
Xiyue Deng [Wed, 13 Dec 2023 21:38:55 +0000 (13:38 -0800)]
Add sample code to the "let*" section in "forward-paragraph"

* doc/lispintro/emacs-lisp-intro.texi (fwd-para let): Add code
sample.  (Bug#67817)

12 months ago; * src/sfnt.c (sfnt_interpret_compound_glyph_2): Reword a comment.
Eli Zaretskii [Sat, 23 Dec 2023 07:32:04 +0000 (09:32 +0200)]
; * src/sfnt.c (sfnt_interpret_compound_glyph_2): Reword a comment.

12 months agoFix treesit test (bug#67117)
Denis Zubarev [Sat, 11 Nov 2023 22:42:42 +0000 (01:42 +0300)]
Fix treesit test (bug#67117)

* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1): Replace treesit--thing-at with
treesit-query-capture (treesit--thing-at isn't available in Emacs 29).

12 months ago; Update function name in package-vc--unpack-1
Stefan Kangas [Sat, 23 Dec 2023 06:24:39 +0000 (07:24 +0100)]
; Update function name in package-vc--unpack-1

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Use renamed
function 'lm--prepare-package-dependencies'.

12 months ago; Silence warning
Stefan Kangas [Sat, 23 Dec 2023 06:16:53 +0000 (07:16 +0100)]
; Silence warning

12 months agoUse new safe_calln on NS
Gerd Möllmann [Sat, 23 Dec 2023 06:06:06 +0000 (07:06 +0100)]
Use new safe_calln on NS

* src/nsterm.m (ns_in_echo_area_1): Use safe_calln.
([EmacsView draggingUpdated:]): Use safe_calln.

12 months agoSplit safe_call between redisplay and non-redisplay versions
Stefan Monnier [Sat, 23 Dec 2023 05:25:46 +0000 (00:25 -0500)]
Split safe_call between redisplay and non-redisplay versions

The `safe_call/eval` family of functions started its life in `xdisp.c`
for the needs of redisplay but quickly became popular outside of it.
This is not ideal because despite their name, they are somewhat
specific to the needs of redisplay.

So we split them into `safe_call/eval` (in `eval.c`) and `dsafe_call/eval`
(in `xdisp.c`).  We took this opportunity to slightly change their
calling convention to be friendly to the CALLN-style macros.
While at it, we introduce a new `calln` macro as well which does
all that `call[1-8]` used to do.

* src/eval.c (safe_eval_handler, safe_funcall, safe_eval): New functions,
Copied from `xdisp.c`.  Don't obey `inhibit_eval_during_redisplay` any more.
Adjust error message to not claim it happened during redisplay.

* src/lisp.h (calln): New macro.
(call1, call2, call3, call4, call5, call6, call7, call8): Turn them
into aliases of `calln`.
(safe_funcall): Declare.
(safe_calln): New macro.
(safe_call1, safe_call2): Redefine as compatibility macros.
(safe_call, safe_call1, safe_call2): Delete.
Replace all callers with calls to `safe_calln`.

* src/xdisp.c (dsafe_eval_handler): Rename from `safe_eval_handler`.
Adjust all users.
(dsafe__call): Rename from `safe_call` and change calling convention to
work with something like CALLMANY.  Adjust all users.
(safe_call, safe__call1, safe_call2): Delete functions.
(SAFE_CALLMANY, dsafe_calln): New macros.
(dsafe_call1, dsafe_eval): Rename from `safe_call1` and `safe_eval`,
and rewrite using them.  Adjust all users.
(clear_message, prepare_menu_bars, redisplay_window): Use `dsafe_calln`.
(run_window_scroll_functions): Don't let-bind `Qinhibit_quit`
since `safe_run_hooks_2` does it for us.

12 months agoFix c++-ts-mode indentation (bug#67975)
Yuan Fu [Sat, 23 Dec 2023 05:25:00 +0000 (21:25 -0800)]
Fix c++-ts-mode indentation (bug#67975)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make indent
rule match precise so it doesn't match declaration_list.

12 months agoRespect glyph metrics modified by instruction code
Po Lu [Sat, 23 Dec 2023 03:22:21 +0000 (11:22 +0800)]
Respect glyph metrics modified by instruction code

* src/sfnt.c (sfnt_read_glyph): Clear advance and origin
distortion returning an empty glyph.
(sfnt_build_instructed_outline): New parameter *ADVANCE_WIDTH,
in which the glyph's advance width is saved.
(sfnt_interpret_compound_glyph_1): Refine commentary.
(sfnt_verbose, main): Adjust tests.

* src/sfnt.h: Update prototypes correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): If an instructed
outline is available, derive the advance and lbearing from the
measurements within.
(sfntfont_probe_widths): Call sfntfont_measure_pcm to establish
average widths.
(sfntfont_open): Do so after instruction code initialization
completes.
(sfntfont_measure_pcm): Revise commentary.

12 months agoDrop footer line warning for packages requiring Emacs 30.1
Stefan Kangas [Sat, 23 Dec 2023 00:50:18 +0000 (01:50 +0100)]
Drop footer line warning for packages requiring Emacs 30.1

The reason for warning about a missing footer line (";;; foo.el ends
here") is that package.el up until version 27.1 would refuse to
install a package without it.  Emacs 27.1 or later will install such
packages, but will issue a warning, the purpose of which is to
encourage package authors not to break backwards-compatibility.

However, if the minimum required Emacs version for a package is 30.1,
we do not need to worry about compatibility with earlier versions of
Emacs -- the package author has already explicitly said that the
package will not work on earlier versions.  For such packages, there
is no need to warn about a missing footer line.

In the future, this warning could be removed, but it is premature to
do that now.  (See Bug#26490.)  Thus, for packages that does not
specify a minimum version of Emacs, we continue to issue the warning.
We will also continue to warn for packages requiring Emacs 27 to 29,
since those versions will themselves warn if the footer is missing.

* lisp/emacs-lisp/package.el (package-buffer-info): Don't warn if the
footer line is missing for packages requiring Emacs 30.1 or later.