]> git.eshelyaron.com Git - emacs.git/log
emacs.git
15 months agoSupport tree-sitter local parsers
Yuan Fu [Wed, 6 Sep 2023 02:57:34 +0000 (19:57 -0700)]
Support tree-sitter local parsers

* doc/lispref/parsing.texi (Multiple Languages): Update manual.
* lisp/treesit.el (treesit-range-settings): Add LOCAL-P to range
setting.
(treesit-range-rules): Support :local keyword.
(treesit-local-parsers-at)
(treesit-local-parsers-in)
(treesit--update-ranges-local): New functions.
(treesit-update-ranges)
(treesit-font-lock-fontify-region)
(treesit--indent-1): Support local parsers and prioritize it over
global parsers.

15 months agoAllow filter by tag in treesit-parser-list
Yuan Fu [Tue, 5 Sep 2023 06:45:21 +0000 (23:45 -0700)]
Allow filter by tag in treesit-parser-list

* doc/lispref/parsing.texi: Update manual.
* src/treesit.c (Ftreesit_parser_create): Disallow using t for tag.
(Ftreesit_parser_list): Add LANGUAGE and TAG parameter.

15 months agoUse tagged parser in c-ts-mode
Yuan Fu [Tue, 5 Sep 2023 03:05:50 +0000 (20:05 -0700)]
Use tagged parser in c-ts-mode

Now that we have tags for parsers, use that instead of the
load-name-override hack.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--emacs-c-range-query): Change parser to C.
(c-ts-mode--emacs-set-ranges): Use the tagged parser.
(c-ts-mode): Create the tagged parser.

15 months agoAdd tag to tree-sitter parsers
Yuan Fu [Mon, 4 Sep 2023 22:33:19 +0000 (15:33 -0700)]
Add tag to tree-sitter parsers

* doc/lispref/parsing.texi (Using Parser): Update manual.
* lisp/treesit.el (treesit-buffer-root-node)
* src/treesit.c (make_treesit_parser)
* src/treesit.c (Ftreesit_parser_create): Add TAG parameter.
(treesit_resolve_node): Create a parser with nil tag.
* src/treesit.h (Lisp_TS_Parser): Add TAG field.

15 months agoProperly run emacsclient under Android if DISPLAY is set
Po Lu [Wed, 6 Sep 2023 02:31:26 +0000 (10:31 +0800)]
Properly run emacsclient under Android if DISPLAY is set

* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Make
dimensions final, since they are never changed after the
constructor.

* lib-src/emacsclient.c (decode_options): If --display is not
provided, always set display to `android' even if DISPLAY is
provided.

* lisp/net/browse-url.el (browse-url): Cease setting DISPLAY
under Android.

* src/callproc.c (getenv_internal, make_environment_block):
Don't afford DISPLAY special treatment under Android.

15 months agoCorrectly handle common prefixes in substring completion
Spencer Baugh [Tue, 5 Sep 2023 19:40:06 +0000 (15:40 -0400)]
Correctly handle common prefixes in substring completion

Substring completion would previously not complete the longest common
substring if that substring was a prefix of all the completion
alternatives.  Now it does.  An explanation of this bug

Substring completion is implemented by passing the `prefix' symbol as
part of the pattern passed to completion-pcm--merge-completions.  This
symbol is supposed to cause completion-pcm--merge-completions to
"grow" a completion of a common substring only from the "right" of the
symbol (a common suffix), not from the "left" of the symbol (a common
prefix).  Yes, this is the opposite of what the name `prefix' would
imply.

When processing a symbolic element of the pattern,
completion-pcm--merge-completions first finds the common prefix of all
the completions in that part of the pattern (using try-completion).
Then for `prefix' and other elements which want to complete a common
suffix, the common prefix is removed from each element and then the
common suffix is calculated with completion--common-suffix.

If the common prefix covers the entirety of all the alternatives
(i.e. when "unique" is true in the code), it's also a common suffix.
In that case, the common suffix calculation (if it runs) is basically
a no-op which will produce an empty string, since we removed the
common prefix before running it.

Before this change, `prefix' elements would unconditionally discard
the common prefix, which produced the wrong result in the case that
common prefix == common suffix.  For example:

  (completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
  -> ("b")

Now we detect this situation and include the common prefix in this
case for `prefix' elements.  Then we get:

  (completion-pcm--merge-completions '("ab" "ab") '(prefix "b"))
  -> ("b" "a")

which is correct.

* lisp/minibuffer.el (completion-pcm--merge-completions): Don't ignore
a common suffix in a `prefix' pattern element when it's also a common
prefix.
* test/lisp/minibuffer-tests.el (completion-substring-test-5): Add a
test.

15 months agoMake `dns-mode` fontify quoted values correctly
Stefan Kangas [Tue, 5 Sep 2023 21:06:21 +0000 (23:06 +0200)]
Make `dns-mode` fontify quoted values correctly

* lisp/textmodes/dns-mode.el (dns-mode-syntax-table): Fontify
quoted values correctly.  (Bug#62214)
Suggested by Trent W. Buck <trentbuck@gmail.com>.

15 months agoImprove completion of treesit-check-indent command
Daniel Martín [Mon, 12 Dec 2022 10:33:01 +0000 (11:33 +0100)]
Improve completion of treesit-check-indent command

* lisp/treesit.el (treesit--read-major-mode): Helper function to
provide completion for most major modes.
(treesit-check-indent): Use the new interactive spec and improve the
docstring.  (Bug#60001)

15 months agoFlymake: speed up mode-line display with simple cache
João Távora [Tue, 5 Sep 2023 16:20:25 +0000 (17:20 +0100)]
Flymake: speed up mode-line display with simple cache

When scrolling heavily (perhaps holding down C-n), the function
'flymake-mode-line-counter' showed very prominently in the memory and
CPU profiles.

Using a cache here was trivial, if not particularly pretty.  The
function all but disappears from the profiles afterwards.

* lisp/progmodes/flymake.el (flymake--mode-line-counter-cache):
New variable.
(flymake--publish-diagnostics): Flush cache aggressively.
(flymake-mode-line-error-counter): Adjust.
(flymake--mode-line-counter-1): New helper from earlier
flymake--mode-line-counter.
(flymake--mode-line-counter): Use cache.

15 months ago* lisp/emacs-lisp/cl-lib.el (cl-old-struct-compat-mode): Mark as obsolete
Stefan Monnier [Tue, 5 Sep 2023 16:56:13 +0000 (12:56 -0400)]
* lisp/emacs-lisp/cl-lib.el (cl-old-struct-compat-mode): Mark as obsolete

* lisp/emacs-lisp/cl-preloaded.el: Emit a message before enabling
`cl-old-struct-compat-mode`.

See bug#63282.

15 months ago* lisp/emacs-lisp/pp.el (pp-28): Fix typo
Stefan Monnier [Tue, 5 Sep 2023 16:29:44 +0000 (12:29 -0400)]
* lisp/emacs-lisp/pp.el (pp-28): Fix typo

Reported by Mattias Engdegård <mattias.engdegard@gmail.com>.

15 months agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs
Stefan Monnier [Tue, 5 Sep 2023 15:55:14 +0000 (11:55 -0400)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs

15 months ago* lisp/emacs-lisp/edebug.el (edebug-list-form): Don't gate so eagerly
Stefan Monnier [Tue, 5 Sep 2023 15:54:55 +0000 (11:54 -0400)]
* lisp/emacs-lisp/edebug.el (edebug-list-form): Don't gate so eagerly

The `edebug-gate` is fairly heavy handed, so don't activate it
just because we seem to have found what looks like a valid form.

15 months agoDisplay directory when `dired-omit-mode` is first enabled
Stefan Kangas [Tue, 5 Sep 2023 15:50:27 +0000 (17:50 +0200)]
Display directory when `dired-omit-mode` is first enabled

* lisp/dired-x.el (dired-omit-expunge): Display the directory name
when 'dired-omit-mode' is first enabled.  (Bug#64705)

15 months ago* doc/lispref/functions.texi (Advising Named Functions): Clarify " no advice"
Stefan Monnier [Tue, 5 Sep 2023 12:57:27 +0000 (08:57 -0400)]
* doc/lispref/functions.texi (Advising Named Functions): Clarify " no advice"

15 months agoMinor adjustments to Android port stubs
Po Lu [Tue, 5 Sep 2023 06:38:33 +0000 (14:38 +0800)]
Minor adjustments to Android port stubs

* src/androidfns.c (Fx_display_backing_store): Return
`when-mapped' in place of `always', since the former better
reflects Android port behavior.
(syms_of_androidfns) <always>: Delete defsym.
<when-mapped>: New defsym.

* src/term.c (Fsuspend_tty, Fresume_tty): Properly signal errors
on Android rather than quietly disregarding calls.

15 months ago; Delete some commented out code in data.c (Bug#64595)
Stefan Kangas [Tue, 5 Sep 2023 06:10:02 +0000 (08:10 +0200)]
; Delete some commented out code in data.c (Bug#64595)

* src/data.c (set_internal): Delete commented out code.

15 months agoInherit 'sieve-mode' faces from 'font-lock'
Jim Porter [Tue, 5 Sep 2023 04:37:56 +0000 (21:37 -0700)]
Inherit 'sieve-mode' faces from 'font-lock'

These Sieve faces were already a close mapping onto the Font Lock
ones, so this should usually look the same to users with the default
theme.  However, this makes it easier to theme these faces (just
define the usual 'font-lock-*-face' colors you want) and also fixes a
few edge cases (bug#62370).

* lisp/net/sieve-mode.el (sieve-control-commands)
(sieve-action-commands, sieve-test-commands, sieve-tagged-arguments):
Inherit from 'font-lock' faces.

15 months agoAvoid virtual function dispatch overhead
Po Lu [Tue, 5 Sep 2023 02:43:07 +0000 (10:43 +0800)]
Avoid virtual function dispatch overhead

* src/androidvfs.c (android_saf_move_document): Circumvent JNI
dynamic function dispatch on call to final method.

15 months agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Mon, 4 Sep 2023 21:14:14 +0000 (17:14 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

15 months ago* lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case
Stefan Monnier [Mon, 4 Sep 2023 21:13:45 +0000 (17:13 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case

The new/current Edebug spec gives the name `SYM@cl-flet@NN` to the
expression building that function rather than to the body of that
function as would be expected, leading to misleading code coverage.

This basically reverts 999de2a5ea36cc0f546825e0, and 18c85306ac21 :-(

15 months agoAdd 'appt-notification' face (Bug#61661)
Protesilaos Stavrou [Mon, 20 Feb 2023 19:03:08 +0000 (21:03 +0200)]
Add 'appt-notification' face (Bug#61661)

* lisp/calendar/appt.el (appt-notification): Declare the new face.
(appt-check): Implement the new face.
* etc/NEWS: Announce the new face.

15 months agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Mon, 4 Sep 2023 20:42:15 +0000 (16:42 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

15 months ago* lisp/tab-bar.el (cl--set-substring): Remove left-over autoload
Stefan Monnier [Mon, 4 Sep 2023 20:41:40 +0000 (16:41 -0400)]
* lisp/tab-bar.el (cl--set-substring): Remove left-over autoload

And remove left-over `require` of `seq` while at it.

15 months agoMove `setf substring` to cl-lib since it relies on it (bug#60102)
Stefan Monnier [Mon, 4 Sep 2023 20:39:55 +0000 (16:39 -0400)]
Move `setf substring` to cl-lib since it relies on it (bug#60102)

* lisp/emacs-lisp/cl-lib.el (substring): Move gv-expander here...
* lisp/emacs-lisp/gv.el (substring): ...from here.

15 months agoEglot: add new chapter about Elisp extensions to Eglot manual
João Távora [Mon, 4 Sep 2023 00:39:05 +0000 (01:39 +0100)]
Eglot: add new chapter about Elisp extensions to Eglot manual

bug#65418

Co-authored-by: Filippo Argiolas <filippo.argiolas@gmail.com>
* doc/misc/eglot.texi (Extending Eglot): New chapter.

15 months agoEglot: reorganize Elisp API section, export new functions
João Távora [Sun, 3 Sep 2023 23:15:55 +0000 (00:15 +0100)]
Eglot: reorganize Elisp API section, export new functions

bug#65418

Co-authored-by: Filippo Argiolas <filippo.argiolas@gmail.com>
* lisp/progmodes/eglot.el (Obsolete aliases): New section, move
all obsolete aliases here.
(eglot-uri-to-path)
(eglot-path-to-uri)
(eglot-range-region)
(eglot-server-capable)
(eglot-server-capable-or-lose): New functions and backward compability
aliases.

15 months agoRevert use of seq-count in shr-count
Stefan Kangas [Mon, 4 Sep 2023 19:28:33 +0000 (21:28 +0200)]
Revert use of seq-count in shr-count

* lisp/net/shr.el (shr-count): Prefer handwritten code to using
'seq-count', as it's more performant.
Problem reported by Mattias Engdegård <mattiase@acm.org>.

15 months ago; * lisp/net/shr.el (shr-count): Fix typo.
Stefan Kangas [Mon, 4 Sep 2023 16:27:54 +0000 (18:27 +0200)]
; * lisp/net/shr.el (shr-count): Fix typo.

15 months agoUse seq-count in three functions
Stefan Kangas [Mon, 4 Sep 2023 16:24:31 +0000 (18:24 +0200)]
Use seq-count in three functions

* lisp/net/shr.el (shr-count):
* lisp/progmodes/idlwave.el (idlwave-count-memq): Use seq-count.
(idlwave-count-eq): Use seq-count.  Make obsolete, as it is unused.

15 months agoUse new ERT `skip-when` macro in tests
Stefan Kangas [Sun, 3 Sep 2023 19:04:02 +0000 (21:04 +0200)]
Use new ERT `skip-when` macro in tests

* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests):
* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--library-completion):
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-pipeline):
* test/lisp/filenotify-tests.el (file-notify-test11-symlinks):
* test/lisp/ibuffer-tests.el (ibuffer-0autoload):
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-part1):
* test/lisp/net/network-stream-tests.el (echo-server-nowait)
(connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait)
(open-network-stream-tls-wait, open-network-stream-tls-nowait)
(open-network-stream-tls, open-network-stream-tls-nocert)
(open-gnutls-stream-new-api-nowait)
(open-gnutls-stream-old-api-nowait):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-10483)
(cperl-test-hyperactive-electric-else):
* test/lisp/progmodes/elisp-mode-tests.el
(eval-last-sexp-print-format-sym-echo)
(eval-last-sexp-print-format-small-int-echo)
(eval-last-sexp-print-format-large-int-echo)
(eval-defun-prints-edebug-when-instrumented):
* test/lisp/progmodes/python-tests.el (python-ffap-module-path-1):
* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test02-files)
(shadow-test03-expand-cluster-in-file-name)
(shadow-test04-contract-file-name, shadow-test05-file-match)
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
* test/lisp/simple-tests.el
(eval-expression-print-format-sym-echo)
(eval-expression-print-format-small-int-echo)
(eval-expression-print-format-large-int-echo):
* test/lisp/term-tests.el (term-simple-lines)
(term-carriage-return, term-line-wrap, term-colors)
(term-colors-bold-is-bright, term-cursor-movement)
(term-scrolling-region, term-set-directory)
(term-line-wrapping-then-motion, term-to-margin):
* test/lisp/thread-tests.el
(thread-tests-list-threads-error-when-not-configured):
* test/lisp/vc/vc-tests.el (backend):
* test/manual/scroll-tests.el (scroll-tests-scroll-margin-0)
(scroll-tests-scroll-margin-negative)
(scroll-tests-scroll-margin-max)
(scroll-tests-scroll-margin-over-max)
(scroll-tests-scroll-margin-whole-window):
* test/misc/test-custom-libs.el (test-custom-libs):
* test/src/emacs-module-tests.el (module/async-pipe):
* test/src/fileio-tests.el (fileio-tests--odd-symlink-chars):
* test/src/filelock-tests.el (filelock-tests-lock-spoiled)
(filelock-tests-file-locked-p-spoiled)
(filelock-tests-unlock-spoiled)
(filelock-tests-kill-buffer-spoiled)
(filelock-tests-detect-external-change):
* test/src/image-tests.el
(image-tests-image-size/error-on-nongraphical-display)
(image-tests-image-mask-p/error-on-nongraphical-display)
(image-tests-image-metadata/error-on-nongraphical-display):
* test/src/process-tests.el (make-process/mix-stderr)
(process-tests/fd-setsize-no-crash/make-network-process)
(process-tests/fd-setsize-no-crash/make-serial-process):
Use ERT `skip-when` macro in tests.

15 months agoAdd `skip-when` macro to `ert-deftest`
Stefan Kangas [Sun, 3 Sep 2023 16:45:16 +0000 (18:45 +0200)]
Add `skip-when` macro to `ert-deftest`

This can help avoid some awkward test skip conditions.

For example, this triple negation:
    (skip-unless (not noninteractive))

Can be written as the simpler:
    (skip-when noninteractive)

* lisp/emacs-lisp/ert.el (ert-deftest): Add new 'skip-when' macro.
(ert--skip-when): New internal function.
* doc/misc/ert.texi (Tests and Their Environment): Document above
new macro.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-skip-when): New test.

15 months ago* etc/NEWS (static-if): Clarify the entry.
Alan Mackenzie [Mon, 4 Sep 2023 13:06:44 +0000 (13:06 +0000)]
* etc/NEWS (static-if): Clarify the entry.

15 months agoCorrect the handling of symbols with position in equal
Alan Mackenzie [Mon, 4 Sep 2023 12:51:24 +0000 (12:51 +0000)]
Correct the handling of symbols with position in equal

* src/fns.c (internal_equal): Only regard symbols with position
as their symbols when symbols-with-pos-enabled is non-nil.

* doc/lispref/symbols.texi (Symbols with Position): Expand the
description of symbols with position, in particular the way
they work with eq and equal.

* doc/lispref/objects.texi (Equality Predicates): Describe how
eq and equal handle symbols with position.

* test/src/fns-tests.el (fns-tests-equal-symbols-with-position):
New tests for symbols with position.

15 months agoAnnounce user option tramp-completion-multi-hop-methods
Gene Goykhman [Mon, 4 Sep 2023 09:43:18 +0000 (11:43 +0200)]
Announce user option tramp-completion-multi-hop-methods

* doc/misc/tramp.texi (Ad-hoc multi-hops):
Add tramp-completion-multi-hop-methods.

* etc/NEWS: New user option tramp-completion-multi-hop-methods.

15 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Mon, 4 Sep 2023 01:42:42 +0000 (09:42 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

15 months agoCorrect deadlock in Android port
Po Lu [Mon, 4 Sep 2023 01:42:10 +0000 (09:42 +0800)]
Correct deadlock in Android port

* java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo):
Delete extraneous whitespace.
(updateExtractedText): Encase synchronous IM manager operation
in deadlock prevention mechanism.

15 months agoRevert "Eglot: reorganize Elisp API section, export new functions"
João Távora [Mon, 4 Sep 2023 01:09:17 +0000 (02:09 +0100)]
Revert "Eglot: reorganize Elisp API section, export new functions"

This reverts commit 726499305b50ff75979a9067d411b27adf7d495e.

One of the co-authors doesn't yet have a FSF copyright assignment.

15 months agoRevert "Eglot: add new chapter about Elisp extensions to Eglot manual"
João Távora [Mon, 4 Sep 2023 01:08:58 +0000 (02:08 +0100)]
Revert "Eglot: add new chapter about Elisp extensions to Eglot manual"

This reverts commit 2a66334bada5173f351e452f40d4289b5e06f04c.

One of the co-authors doesn't yet have a FSF copyright assignment.

15 months agoEglot: add new chapter about Elisp extensions to Eglot manual
João Távora [Mon, 4 Sep 2023 00:39:05 +0000 (01:39 +0100)]
Eglot: add new chapter about Elisp extensions to Eglot manual

bug#65418

Co-authored-by: Filippo Argiolas <filippo.argiolas@gmail.com>
* doc/misc/eglot.texi (Extending Eglot): New chapter.

15 months agoEglot: reorganize Elisp API section, export new functions
João Távora [Sun, 3 Sep 2023 23:15:55 +0000 (00:15 +0100)]
Eglot: reorganize Elisp API section, export new functions

bug#65418

Co-authored-by: Filippo Argiolas <filippo.argiolas@gmail.com>
* lisp/progmodes/eglot.el (Obsolete aliases): New section, move
all obsolete aliases here.
(eglot-uri-to-path)
(eglot-path-to-uri)
(eglot-range-region)
(eglot-server-capable)
(eglot-server-capable-or-lose): New functions and backward compability
aliases.

15 months ago; Fix previous commit touching lisp/international/emoji.el
Jonas Bernoulli [Sun, 3 Sep 2023 16:06:52 +0000 (18:06 +0200)]
; Fix previous commit touching lisp/international/emoji.el

15 months agoMake emoji commands compatible with repeat and repeat-complex-command
Jonas Bernoulli [Sun, 3 Sep 2023 15:50:16 +0000 (17:50 +0200)]
Make emoji commands compatible with repeat and repeat-complex-command

* lisp/international/emoji.el (emoji-search): Read user input
inside 'interactive'.
* (emoji-insert-glyph): Determine glyph inside 'interactive',
using 'emoji--recent' when not invoked from one of its transient
prefixes but using 'recent' or 'recent-complex-command'.

15 months agoFix Edebug specification for 'cl-define-compiler-macro'.
Philipp Stephani [Sun, 3 Sep 2023 14:55:12 +0000 (16:55 +0200)]
Fix Edebug specification for 'cl-define-compiler-macro'.

* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Give the
instrumented name a suffix to make it unique.  Otherwise it will clash
with the name of the main function.

15 months agocheckdoc: Don't warn for () in cl-defmacro args
Stefan Kangas [Sun, 3 Sep 2023 13:02:05 +0000 (15:02 +0200)]
checkdoc: Don't warn for () in cl-defmacro args

Seen with, for example:

    (cl-defmacro foo (bar () &body baz) ...)

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Improve support for `cl-defmacro' by ignoring "nil" in parameter list.

15 months agoNew documentation for static-if.
Alan Mackenzie [Sun, 3 Sep 2023 13:08:36 +0000 (13:08 +0000)]
New documentation for static-if.

* doc/lispref/control.texi (Conditional Compilation): New
section documenting static-if.

15 months agoNew conditional compilation macro static-if.
Alan Mackenzie [Sun, 3 Sep 2023 12:54:47 +0000 (12:54 +0000)]
New conditional compilation macro static-if.

* etc/NEWS: Record the new macro.

* lisp/subr.el (static-if): New macro.

15 months agoUpdate Android port
Po Lu [Sun, 3 Sep 2023 12:13:29 +0000 (20:13 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsService.java (browseUrl): Confer
rights to write the URI indefinitely.

15 months agoFix defcustoms in filesets.el (Bug#65708)
Mauro Aranda [Sat, 2 Sep 2023 23:16:30 +0000 (20:16 -0300)]
Fix defcustoms in filesets.el (Bug#65708)

* lisp/filesets.el (filesets-browse-dir-function)
(filesets-open-file-function filesets-save-buffer-function)
(filesets-commands filesets-external-viewers): Don't override default
value for the function widget with an invalid default value.
Remove redundant ":" in tag.
Fix default values for choice and list widgets.

15 months agoFix indentation in `syntax-ppss'
Jim Blandy [Sun, 3 Sep 2023 10:42:35 +0000 (12:42 +0200)]
Fix indentation in `syntax-ppss'

* lisp/emacs-lisp/syntax.el: Fix indentation in
`syntax-ppss'.  (Bug#58665)

15 months ago* lisp/vc/vc-git.el (vc-git-annotate-switches): Add useful tip.
Stefan Kangas [Sun, 3 Sep 2023 10:04:20 +0000 (12:04 +0200)]
* lisp/vc/vc-git.el (vc-git-annotate-switches): Add useful tip.

15 months agoReplace completion--some with seq-some
Stefan Kangas [Sun, 3 Sep 2023 09:04:35 +0000 (11:04 +0200)]
Replace completion--some with seq-some

This is safe, as 'seq' is preloaded before 'minibuffer'.
* lisp/loadup.el ("minibuffer"): Document 'seq' dependency.
* lisp/minibuffer.el (completion--some): Remove.  Replace all uses
with 'seq-some'.

15 months ago; Silence warnings about obsolete functions
Mattias Engdegård [Sun, 3 Sep 2023 09:40:20 +0000 (11:40 +0200)]
; Silence warnings about obsolete functions

* lisp/obsolete/url-ns.el (dnsResolve, isResolvable): Suppress.
* lisp/progmodes/ebnf2ps.el (ebnf-eps-finish-and-write):
Use delete-dups instead of ps-remove-duplicates.

15 months agoMove `wholenump` alias definition
Mattias Engdegård [Sun, 3 Sep 2023 09:22:06 +0000 (11:22 +0200)]
Move `wholenump` alias definition

* src/data.c (syms_of_data): From here...
* lisp/subr.el (wholenump): ...to here, with the other aliases.

15 months agoPrefer reusing seq-remove in reftex
Stefan Kangas [Sun, 3 Sep 2023 07:59:16 +0000 (09:59 +0200)]
Prefer reusing seq-remove in reftex

* lisp/textmodes/reftex.el (reftex-remove-symbols-from-list): Make
obsolete in favor of 'seq-remove'.  Update single caller.

15 months agoDon't native compile lock files
Joseph Turner [Sat, 2 Sep 2023 17:14:22 +0000 (10:14 -0700)]
Don't native compile lock files

* lisp/emacs-lisp/package.el (package--delete-directory):
Exclude lock files in regex.  (Bug#65666)

15 months agoLog org export errors to package-vc doc buffer
Joseph Turner [Fri, 1 Sep 2023 23:22:45 +0000 (16:22 -0700)]
Log org export errors to package-vc doc buffer

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Wrap the org-export logic in condition-case, allowing package
installation to continue while preserving error messages.  (Bug#65649)

15 months agoInclude package name in package-vc documentation log buffer name
Joseph Turner [Thu, 31 Aug 2023 06:24:16 +0000 (23:24 -0700)]
Include package name in package-vc documentation log buffer name

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Modify buffer name generation.  (Bug#65649)

15 months ago; * lisp/term/android-win.el: Correct header.
Po Lu [Sun, 3 Sep 2023 05:00:16 +0000 (13:00 +0800)]
; * lisp/term/android-win.el: Correct header.

15 months agoMove Android port internals documentation to admin/notes
Po Lu [Sun, 3 Sep 2023 02:04:44 +0000 (10:04 +0800)]
Move Android port internals documentation to admin/notes

* admin/notes/java: New file.  Move most of its contents from
README, and introduce a section on compatibility.

* java/README: Move internals to admin/notes/java.

15 months ago; Reintroduce menus beneath chapters in the Transient manual
Po Lu [Sun, 3 Sep 2023 01:12:32 +0000 (09:12 +0800)]
; Reintroduce menus beneath chapters in the Transient manual

* doc/misc/transient.texi (Introduction)
(Modifying Existing Transients, Predicate Slots): Return the
menus to their proper location, so Texinfo 4.13 can infer up
pointers for nodes within.  The previous merge from emacs-29
overwrote this change.

15 months agoReplace ps-remove-duplicates with seq-uniq
Stefan Kangas [Sun, 3 Sep 2023 00:55:01 +0000 (02:55 +0200)]
Replace ps-remove-duplicates with seq-uniq

* lisp/ps-print.el (ps-remove-duplicates): Make obsolete in favor of
seq-uniq.  Update all callers.

; * lisp/tab-line.el: Remove stale comment.

15 months agoproject.el: Fix bug in project-ignores method for VC-aware backend
Damien Cassou [Sat, 2 Sep 2023 16:08:49 +0000 (18:08 +0200)]
project.el: Fix bug in project-ignores method for VC-aware backend

The variable `backend' was always nil preventing the 25-line long
`when' block from doing anything.  This bug was introduced in commit
785fa801596ad7bb9f838cac865f00de29e253d1 "New user option:
project-vc-extra-root-markers". (Bug#65704)

* lisp/progmodes/project.el (project-ignores): Make sure the variable
is initialized, so that backend-specific code is used if any.

15 months agoApply Eshell tilde expansion before glob expansion
Jim Porter [Sat, 2 Sep 2023 23:17:27 +0000 (16:17 -0700)]
Apply Eshell tilde expansion before glob expansion

By treating 'eshell-current-modifiers' as a hook, we can simplify much
of the code working with it and ensure that we call modifiers in a
more-correct order.

* lisp/eshell/em-dirs.el (eshell-expand-user-reference-1)
(eshell-expand-user-reference): Simplify.  We now only get a single
argument.
(eshell-parse-user-reference):
* lisp/eshell/em-glob.el (eshell-add-glob-modifier):
* lisp/eshell/em-pred.el (eshell-parse-arg-modifier): Use 'add-hook'.

15 months ago; Add debug instrumentation for Eshell argument modifiers
Jim Porter [Sat, 2 Sep 2023 23:07:59 +0000 (16:07 -0700)]
; Add debug instrumentation for Eshell argument modifiers

* lisp/eshell/esh-arg.el (eshell-resolve-current-argument): Add debug
instrumentation, and simplify modifier application.

15 months ago; * etc/NEWS: Tell users they don't need to change 'eshell-prompt-regexp'.
Jim Porter [Sat, 2 Sep 2023 22:47:36 +0000 (15:47 -0700)]
; * etc/NEWS: Tell users they don't need to change 'eshell-prompt-regexp'.

15 months agoDisplay the exit code if the last command failed in Eshell
Davide Masserut [Tue, 29 Aug 2023 20:33:48 +0000 (22:33 +0200)]
Display the exit code if the last command failed in Eshell

* lisp/eshell/esh-io.el (eshell-last-command-status): Make
buffer-local.

* lisp/eshell/em-prompt.el (eshell-prompt-function): Insert the exit
code if last command failed.

* test/lisp/eshell/em-prompt-tests.el (em-prompt-test/after-failure):
New test.
(em-prompt-test/next-previous-prompt-1)
(em-prompt-test/forward-backward-matching-input-1): Add a failing
command to tests.

* doc/misc/eshell.texi (Invocation): Document change.

* etc/NEWS: Announce change (bug#65604).

15 months agoProvide our own implementation of paragraph navigation in Eshell
Jim Porter [Sat, 2 Sep 2023 22:03:10 +0000 (15:03 -0700)]
Provide our own implementation of paragraph navigation in Eshell

This lets us finally obsolete 'eshell-prompt-regexp', making it
simpler for users to customize their prompts.

* lisp/eshell/em-prompt.el (eshell-prompt-function): Update docstring.
(eshell-prompt-regexp): Make obsolete.
(eshell-prompt-initialize): Remove 'eshell-prompt-regexp' code.
(eshell-prompt-mode-map): Remap paragraph navigation commands to...
(eshell-forward-paragraph, eshell-backward-paragraph): ... these new
commands.

15 months agoBe more precise about navigating forward/backward through Eshell prompts
Jim Porter [Sat, 2 Sep 2023 21:44:33 +0000 (14:44 -0700)]
Be more precise about navigating forward/backward through Eshell prompts

* lisp/eshell/em-prompt.el (eshell-next-prompt): Make N optional.
When navigating, first move to the end of the prompt.  This makes the
subsequent navigation more predictable.
(eshell-previous-prompt): Mane N optional.

* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test--with-multiline): Move to "Code" section.
(em-prompt-test/next-previous-prompt-with): Rename to...
(em-prompt-test/next-previous-prompt-1): ... this, and add additional
test cases.  Update callers.
(em-prompt-test/forward-backward-matching-input-with): Rename to...
(em-prompt-test/forward-backward-matching-input-1): ... this, and
improve existing test cases.

15 months agoFix and extend applying substitution in widget-choose
Stephen Berman [Sat, 2 Sep 2023 21:22:01 +0000 (23:22 +0200)]
Fix and extend applying substitution in widget-choose

* lisp/wid-edit.el (widget-choose): Iterate only over proper lists
when applying substitution (bug#64046, Message #53).  With simple
item definitions, apply substitution only to the item text, not to
its value (bug#64046, Message #86).  Apply substitution also to
the widget title (bug#64046, Message #92).

15 months ago; gdb-mi.el: remove unused variable
Mattias Engdegård [Sat, 2 Sep 2023 11:04:39 +0000 (13:04 +0200)]
; gdb-mi.el: remove unused variable

* lisp/progmodes/gdb-mi.el (gdb-active-process): Remove.
It went out of use in 2010 (691cf4a0a2), and was initialised to what
was clearly meant as a doc string.

15 months agoUpdate selected packages when deleting last package
Stefan Kangas [Sat, 2 Sep 2023 16:22:23 +0000 (18:22 +0200)]
Update selected packages when deleting last package

* lisp/emacs-lisp/package.el (package--save-selected-packages): Allow
setting 'package-selected-packages' to a nil value.  (bug#65475)

15 months agoOutput better error messages on certain edebug spec errors
Alan Mackenzie [Sat, 2 Sep 2023 13:50:03 +0000 (13:50 +0000)]
Output better error messages on certain edebug spec errors

This fixes bug#65620.  The error thrown up to now was "Void
function edebug-after".  This has been replaced by "Invalid
call to `edebug-before'.  Is the edebug spec for `foo'
correct?".

* lisp/emacs-lisp/edebug.el (edebug-b/a-error): New function
which throws the new friendlier error message.
(edebug-before, edebug-after): Replace the defalias's to nil
with actual functions which just call edebug-b/a-error.

* doc/lispref/edebug.texi (Specification List): In the entry
for `sexp', warn against mistakenly using `form' for an

15 months agoMake ediff-m-empty-t-f obsolete in favor of make-temp-file
Stefan Kangas [Sat, 2 Sep 2023 13:07:09 +0000 (15:07 +0200)]
Make ediff-m-empty-t-f obsolete in favor of make-temp-file

* lisp/vc/ediff-util.el (ediff-make-empty-tmp-file): Make obsolete
in favor of 'make-temp-file'.  Update callers.

15 months agoMake emerge-m-t-f obsolete in favor of make-temp-file
Stefan Kangas [Sat, 2 Sep 2023 12:42:30 +0000 (14:42 +0200)]
Make emerge-m-t-f obsolete in favor of make-temp-file

* lisp/vc/emerge.el (emerge-make-temp-file): Make obsolete in favor of
'make-temp-file'.  Update all callers.

15 months agoAdapt tramp-get-completion-methods
Michael Albinus [Sat, 2 Sep 2023 11:15:17 +0000 (13:15 +0200)]
Adapt tramp-get-completion-methods

* lisp/net/tramp.el (tramp-get-completion-methods): Make MULTI-HOP
optional.

15 months agoEglot: slightly simplify eglot--propose-changes-as-diff
João Távora [Sat, 2 Sep 2023 09:51:24 +0000 (10:51 +0100)]
Eglot: slightly simplify eglot--propose-changes-as-diff

bug#60338

* lisp/progmodes/eglot.el (eglot--propose-changes-as-diff):
Simplify slightly.

15 months ago; * src/treesit.c (treesit_recursion_limit): Fix compilation error.
Eli Zaretskii [Sat, 2 Sep 2023 08:50:27 +0000 (11:50 +0300)]
; * src/treesit.c (treesit_recursion_limit): Fix compilation error.

15 months agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 2 Sep 2023 08:39:01 +0000 (04:39 -0400)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

15 months agoRemove newsticker--lists-intersect-p
LdBeth [Mon, 26 Dec 2022 00:55:03 +0000 (18:55 -0600)]
Remove newsticker--lists-intersect-p

* lisp/net/newst-backend.el (newsticker--lists-intersect-p): Remove.
* lisp/net/newst-plainview.el (newsticker-w3m-show-inline-images)
(newsticker-next-new-item, newsticker-previous-new-item)
(newsticker-next-item, newsticker-next-item-same-feed)
(newsticker-previous-item, newsticker-next-item-available-p)
(newsticker-previous-item-available-p): Replace corresponding calls by
`invisible-p'.  (Bug#60328)

15 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 2 Sep 2023 08:33:44 +0000 (04:33 -0400)]
Merge from origin/emacs-29

dbbcf4a6599 Fix fontification of " in edit-kbd-macro
2137fdfd550 * lisp/emacs-lisp/gv.el (buffer-local-value): Unobsolete ...
e660ee88e3d ; Remove incorrect example from ELisp Reference manual
c32fd92d67e Add documentation to plstore.el
57760f585e2 * lisp/help.el (substitute-quotes): Improve docstring.
60dcea7658a Fix two defcustom :types
890a4c209ab Fix `image-auto-resize-on-window-resize' custom :type
369f2eea100 Add "terraform-ls" LSP server to Eglot
5cbe96d17f6 ; Improve documentation of 'char-table-range'
a219ee8c314 Fix minor bugs in vc-git and vc-hg on Windows uncovered b...
3f7598806eb Add syntax-propertize-function to js-ts-mode
18b292140ee ; * src/treesit.c: Add ts function boilerplate
ec4d29c4494 Improve performance of treesit_cursor_helper_1

# Conflicts:
# lisp/vc/vc-git.el
# src/treesit.c

15 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 2 Sep 2023 08:28:29 +0000 (04:28 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

f26622b2a47 * lisp/subr.el (combine-change-calls-1): Fix bug#64989

15 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 2 Sep 2023 08:28:17 +0000 (04:28 -0400)]
Merge from origin/emacs-29

648a5e33e80 Update to Org 9.6.8-3-g21171d
458442fe78c Escape percent character in treesit--inspect-name (bug#65...
bc0426ce8ed Don't add an extraneous slash in remote PATH list in Eshell
34f7a47c9ce Fix Tramp on MS Windows
ea5fd6c96bc * Fix native disassemble on Windows platforms (bug#65455)
91d2d8439bb * Handle missing eln file when trying to disassble (bug#6...
e7ac50a1539 * lisp/emacs-lisp/comp.el (comp--native-compile): Fix OUT...
45cf3a0cede Update to Transient v0.4.3
31d3808fb9d Adapt Eshell manual
0c50af054f9 Fix applying patches with Git on MS-Windows

# Conflicts:
# doc/misc/transient.texi
# test/lisp/eshell/esh-util-tests.el

15 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 2 Sep 2023 08:23:58 +0000 (04:23 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

de335cb3dc9 ; Effect a safer version of that fix for Emacs 29
a6cb8e3a1fa Repair bug#65068 on Emacs 29

15 months agoFix fontification of " in edit-kbd-macro
Stefan Kangas [Sat, 2 Sep 2023 07:48:18 +0000 (09:48 +0200)]
Fix fontification of " in edit-kbd-macro

* lisp/edmacro.el (edit-kbd-macro): Fix fontification when editing
keyboard macros containing the " character.

15 months ago* lisp/emacs-lisp/gv.el (buffer-local-value): Unobsolete (bug#65555).
Eli Zaretskii [Sat, 2 Sep 2023 07:44:50 +0000 (10:44 +0300)]
* lisp/emacs-lisp/gv.el (buffer-local-value): Unobsolete (bug#65555).

15 months ago; Remove incorrect example from ELisp Reference manual
Eli Zaretskii [Sat, 2 Sep 2023 07:38:16 +0000 (10:38 +0300)]
; Remove incorrect example from ELisp Reference manual

* doc/lispref/commands.texi (Event Examples): Remove incorrect
example of using SIGUSR1 signal as an event.  (Bug#65577)

15 months agoAdd documentation to plstore.el
Jens Schmidt [Wed, 16 Aug 2023 21:31:30 +0000 (23:31 +0200)]
Add documentation to plstore.el

* lisp/plstore.el: Add link to epa manual.  Describe more
restrictions.  Fix a typo in the examples.  Fix terminology.  Mark
FIXMEs as such.
* lisp/plstore.el (plstore-save): Describe edge case when no recipient
matches and mark as FIXME.  (Bug#63627)

15 months ago; Minor fixes of treesit docs
Eli Zaretskii [Sat, 2 Sep 2023 07:08:21 +0000 (10:08 +0300)]
; Minor fixes of treesit docs

* src/treesit.c (treesit_traverse_validate_predicate)
(Ftreesit_search_subtree, Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree, Ftreesit_node_match_p):
* lisp/treesit.el (treesit-beginning-of-thing)
(treesit-end-of-thing, treesit--things-around): Fix commentary and
doc strings.

15 months agoFix treesit-thing-definition
Yuan Fu [Sat, 2 Sep 2023 05:30:21 +0000 (22:30 -0700)]
Fix treesit-thing-definition

* lisp/treesit.el (treesit-thing-definition): Add LANGUAGE parameter.
(treesit-major-mode-setup): Update treesit-thing-definition.  Don't
enable tree-sitter sexp transpose if sexp isn't defined.

15 months ago; * lisp/treesit.el (treesit-thing-settings): Declare in treesit.el.
Yuan Fu [Sat, 2 Sep 2023 04:02:36 +0000 (21:02 -0700)]
; * lisp/treesit.el (treesit-thing-settings): Declare in treesit.el.

15 months ago; * src/treesit.c (Vtreesit_thing_settings): Update docstring.
Yuan Fu [Sat, 2 Sep 2023 02:47:20 +0000 (19:47 -0700)]
; * src/treesit.c (Vtreesit_thing_settings): Update docstring.

15 months agoDon't signal error when calling treesit-node-match-p in treesit.el
Yuan Fu [Sat, 2 Sep 2023 02:27:07 +0000 (19:27 -0700)]
Don't signal error when calling treesit-node-match-p in treesit.el

Specifically, don't signal error when the thing isn't defined.

* lisp/treesit.el (treesit-node-top-level)
(treesit-forward-sentence)
(treesit--things-around): Add IGNORE-MISSING argument.

15 months agoRename PRED to THING in tree-sitter navigation functions
Yuan Fu [Sat, 2 Sep 2023 00:37:46 +0000 (17:37 -0700)]
Rename PRED to THING in tree-sitter navigation functions

The primary way to use these functions should be to supply a thing
symbol. Change the parameter name to THING to reflect that.

* lisp/treesit.el (treesit-beginning-of-thing)
(treesit-end-of-thing)
(treesit--things-around)
(treesit--navigate-thing)
(treesit-thing-at-point): Change parameter.

15 months agoAdd an optional arg to Ftreesit_node_match_p
Yuan Fu [Sat, 2 Sep 2023 00:29:06 +0000 (17:29 -0700)]
Add an optional arg to Ftreesit_node_match_p

* src/treesit.c (treesit_traverse_child_helper): Fix typo.
(treesit_traverse_get_predicate): Add ignore_missing.

(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Update docstring.
(Ftreesit_node_match_p): Add ignore_missing.

15 months agoObsolete treesit-block/sexp/sentence/text-type-regexp
Yuan Fu [Sat, 2 Sep 2023 00:14:44 +0000 (17:14 -0700)]
Obsolete treesit-block/sexp/sentence/text-type-regexp

And replace them with treesit-thing-settings.

* doc/lispref/positions.texi (List Motion): Remove mention of
treesit-sexp/sentence-type-regexp.

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode)
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/json-ts-mode.el (json-ts-mode)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode)
(tsx-ts-mode)
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)
* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun)
* lisp/textmodes/html-ts-mode.el (html-ts-mode): Replace
treesit-sexp/sentence/text-type-regexp with treesit-thing-settings.

* lisp/treesit.el (treesit-sexp-type-regexp)
(treesit-sentence-type-regexp): Mark obsolete.
(treesit-block-type-regexp): Remove.

* lisp/treesit.el (treesit-forward-sexp)
(treesit-transpose-sexps)
(treesit-beginning-of-defun)
(treesit-end-of-defun)
(treesit-forward-sentence)
(treesit-defun-at-point): Make use of treesit-thing-settings.

(treesit-thing-definition)
(treesit-thing-defined-p): New functions.

(treesit-major-mode-setup): Replace
treesit-sexp/sentence-type-regexp with treesit-thing-settings.

15 months agoOpen org-protocol:// links on Android
Po Lu [Sat, 2 Sep 2023 02:05:23 +0000 (10:05 +0800)]
Open org-protocol:// links on Android

* doc/emacs/android.texi (Android Startup): Revise to reflect
changes in the set of files registered for Emacsclient and
mention org-protocol support.

* java/AndroidManifest.xml.in: Open all files, not just a
particular subset of image and data files.  Register an
org-protocol scheme handler.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Provide
URI to Emacs verbatim if its scheme is `org-protocol'.

15 months agoxref.el: Ensure that the return value is the buffer
Dmitry Gutov [Sat, 2 Sep 2023 01:59:20 +0000 (04:59 +0300)]
xref.el: Ensure that the return value is the buffer

* lisp/progmodes/xref.el (xref--show-xrefs, xref--show-defs):
Ensure the return value of the funcall is returned (bug#65631).

15 months agoUpdate Android port
Po Lu [Sat, 2 Sep 2023 01:28:50 +0000 (09:28 +0800)]
Update Android port

* lisp/touch-screen.el (touch-screen-handle-point-up) <held>:
Treat `held' as `drag' as well.

* src/android.c (android_is_special_directory): Return bool
rather than a pointer to the remainder of the file name, given
that said pointer is never used.

* src/android.h (android_is_special_directory): Modify
correspondingly.

15 months agoDelete references to gnuserv
Stefan Kangas [Sat, 2 Sep 2023 00:42:07 +0000 (02:42 +0200)]
Delete references to gnuserv

* doc/misc/mh-e.texi (Incorporating Mail):
* doc/misc/octave-mode.texi (Concept Index):
* lisp/net/browse-url.el (browse-url-w3-gnudoit): Delete
references to gnuserv; these days we use emacsclient.