]> git.eshelyaron.com Git - emacs.git/log
emacs.git
18 months ago; * doc/lispref/display.texi (Low-Level Font): Fix last change.
Eli Zaretskii [Fri, 8 Sep 2023 12:06:03 +0000 (15:06 +0300)]
; * doc/lispref/display.texi (Low-Level Font): Fix last change.

18 months agoFix typos
Po Lu [Fri, 8 Sep 2023 11:57:40 +0000 (19:57 +0800)]
Fix typos

* src/android.c (android_set_task_name):

* src/sfnt.c (main): Test if fd < 0, not fd < 1.

18 months agoFix Perl script in Tramp
Michael Albinus [Fri, 8 Sep 2023 09:07:54 +0000 (11:07 +0200)]
Fix Perl script in Tramp

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Fix Perl script.  (Bug#65744)

18 months agoProperly detect content files in Doc View
Po Lu [Fri, 8 Sep 2023 08:12:12 +0000 (16:12 +0800)]
Properly detect content files in Doc View

* lisp/doc-view.el (doc-view-mode): Detect if file name starts
with /content or /assets, and don't regard it as available to
subprocesses in that case.

18 months agoFix typos in last change
Po Lu [Fri, 8 Sep 2023 03:00:10 +0000 (11:00 +0800)]
Fix typos in last change

* src/font.c (font_dynamic_unparse_xlfd): Remove unused variable.
(Ffont_xlfd_name): Initialize name.

18 months ago; * src/fontset.c: Remove extraneous portion of last change.
Po Lu [Fri, 8 Sep 2023 02:37:53 +0000 (10:37 +0800)]
; * src/fontset.c: Remove extraneous portion of last change.

18 months agoPermit XLFD names to exceed 255 characters
Po Lu [Fri, 8 Sep 2023 02:37:18 +0000 (10:37 +0800)]
Permit XLFD names to exceed 255 characters

* doc/lispref/display.texi (Low-Level Font)
<font-xlfd-name>: Document new argument `long-xlfds'.

* etc/NEWS: Mention removal of XLFD length restrictions.

* src/font.c (font_build_object): Dynamically allocate XLFD,
permitting them to surpass 255 characters in length.
(font_parse_xlfd_1): Cease rejecting XLFDs more than 255
characters in length.
(font_dynamic_unparse_xlfd): New function.  Like
font_unparse_xlfd, but allocate the XLFD dynamically.
(font_delete_unmatched): Dynamically allocate XLFD if necessary.
(Ffont_xlfd_name): New arg LONG_XLFDs.  If t, return a
dynamically allocated XLFD.  All callers changed.

* src/font.h: Update prototypes.

* src/fontset.c (Fnew_fontset): Dynamically allocate XLFD when
establishing fontset name.

19 months agoFix treesit-thing-definition
Yuan Fu [Fri, 8 Sep 2023 00:56:11 +0000 (17:56 -0700)]
Fix treesit-thing-definition

* lisp/treesit.el (treesit-thing-definition): Don't modify
treesit-thing-settings itself.

19 months ago; * lisp/treesit.el (treesit-node-on): Fix treesit-local-parsers-on.
Yuan Fu [Fri, 8 Sep 2023 00:44:32 +0000 (17:44 -0700)]
; * lisp/treesit.el (treesit-node-on): Fix treesit-local-parsers-on.

19 months agoFix treesit-thing-settings for c++-ts-mode (bug#65810)
Yuan Fu [Thu, 7 Sep 2023 23:08:42 +0000 (16:08 -0700)]
Fix treesit-thing-settings for c++-ts-mode (bug#65810)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--thing-settings): New varaible.
(c-ts-base-mode): Use c-ts-mode--thing-settings.

19 months ago; * lisp/treesit.el (treesit-update-ranges): Fix use of parser-list.
Yuan Fu [Thu, 7 Sep 2023 23:03:01 +0000 (16:03 -0700)]
; * lisp/treesit.el (treesit-update-ranges): Fix use of parser-list.

19 months agoAdd Ftreesit_parser_tag
Yuan Fu [Thu, 7 Sep 2023 05:15:21 +0000 (22:15 -0700)]
Add Ftreesit_parser_tag

* lisp/treesit.el (treesit-parser-tag): Add.
* src/treesit.c (Ftreesit_parser_tag): Add.

19 months agoChange treesit-local-parsers-in to treesit-local-parsers-on
Yuan Fu [Thu, 7 Sep 2023 23:04:29 +0000 (16:04 -0700)]
Change treesit-local-parsers-in to treesit-local-parsers-on

To improve consistency. We already have treesit-node-at and
treesit-node-on.

* doc/lispref/parsing.texi (Multiple Languages): Update manual.
* lisp/treesit.el (treesit-local-parsers-on): Change to in.
(treesit-font-lock-fontify-region): Change to in.

19 months agoError when trying to make nil or t obsolete
Stefan Kangas [Wed, 6 Sep 2023 09:21:39 +0000 (11:21 +0200)]
Error when trying to make nil or t obsolete

* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Signal error if the symbol to make obsolete is nil or t.  (Bug#62248)
(byte-run--constant-obsolete-warning): New function.
* test/lisp/emacs-lisp/byte-run-tests.el: New file.

19 months agoAdd note regarding `seq` on GNU ELPA
Stefan Kangas [Thu, 7 Sep 2023 21:50:50 +0000 (23:50 +0200)]
Add note regarding `seq` on GNU ELPA

* lisp/emacs-lisp/seq.el: Add note regarding seq on GNU ELPA.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
19 months agoFix detection of vtable start and end
Lämppi Lütti [Sat, 22 Oct 2022 04:58:46 +0000 (07:58 +0300)]
Fix detection of vtable start and end

* lisp/emacs-lisp/vtable.el (vtable-beginning-of-table)
(vtable-end-of-table): Fix detection of vtable limits.  (Bug#58712)

Copyright-paperwork-exempt: yes

19 months agoTranslate backslash-saturated regexp to rx
Mattias Engdegård [Thu, 7 Sep 2023 16:06:34 +0000 (18:06 +0200)]
Translate backslash-saturated regexp to rx

* lisp/minibuffer.el (minibuffer--regexp-propertize):
The original regexp had 83 backslashes in 147 characters which may be
some kind of record.  This transformation cuts it down to 6, and the
generated regexp string is about 14 % shorter.

19 months ago* admin/unidata/emoji-zwj.awk: More efficient code generation
Mattias Engdegård [Thu, 7 Sep 2023 09:25:46 +0000 (11:25 +0200)]
* admin/unidata/emoji-zwj.awk: More efficient code generation

Hoist the `eval-when-compile` to encompass the entire list, since
backquote forms aren't automatically evaluated at compile time.
This results in a single constant list in the generated code, and
much less actual code.

19 months agoFix java-ts-mode tests (bug#65738)
john muhl [Mon, 4 Sep 2023 16:36:42 +0000 (11:36 -0500)]
Fix java-ts-mode tests (bug#65738)

* admin/notes/tree-sitter/build-module/batch.sh (languages):
Add Java.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Pass a list
to 'treesit-thing-settings'.

19 months ago; Fix documentation of last change
Eli Zaretskii [Thu, 7 Sep 2023 08:56:16 +0000 (11:56 +0300)]
; Fix documentation of last change

* lisp/minibuffer.el (minibuffer-regexp-prompts):
* doc/lispref/minibuf.texi (Minibuffer Misc): Fix docs (bug#50766).

19 months agoNew minor mode 'minibuffer-regexp-mode'
martin rudalics [Wed, 6 Sep 2023 08:09:49 +0000 (10:09 +0200)]
New minor mode 'minibuffer-regexp-mode'

This mode is for editing regexps in minibuffer, it highlights
parens via `show-paren-mode' and `blink-matching-paren' in a
user-friendly way, avoids reporting false paren mismatches,
and makes sexp navigation more intuitive.
* lisp/minibuffer.el (minibuffer-regexp-mode)
(minibuffer--regexp-primed, minibuffer--regexp-prompt-regexp):
New variables.
(minibuffer--regexp-propertize, minibuffer--regexp-primed)
(minibuffer--regexp-before-change)
(minibuffer--regexp-after-change)
(minibuffer--regexp-post-self-insert, minibuffer--regexp-setup)
(minibuffer--regexp-exit, minibuffer-regexp-mode): New functions.
(minibuffer-regexp-prompts): New option.

* doc/lispref/minibuf.texi (Minibuffer Misc): Document the new
mode and its option.

* etc/NEWS: Announce the new mode.

Bug#50766

19 months ago; Fix recent changes in treesit documentation
Eli Zaretskii [Thu, 7 Sep 2023 08:09:56 +0000 (11:09 +0300)]
; Fix recent changes in treesit documentation

* lisp/treesit.el (treesit-local-parsers-at)
(treesit-local-parsers-in):
* doc/lispref/parsing.texi (Multiple Languages):
 (Using Parser): Fix wording of recently added docs.

19 months agoTag NEWS
Po Lu [Thu, 7 Sep 2023 03:02:12 +0000 (11:02 +0800)]
Tag NEWS

* etc/NEWS: Tag Android as documented, given that all pertinent
documentation has been written.

19 months ago; * ChangeLog.android: Minor formatting correction.
Po Lu [Thu, 7 Sep 2023 02:32:23 +0000 (02:32 +0000)]
; * ChangeLog.android: Minor formatting correction.

19 months agoPort Proced to Android
Po Lu [Thu, 7 Sep 2023 01:35:59 +0000 (09:35 +0800)]
Port Proced to Android

* configure.ac (HAVE_PROCFS): Define if opsys is `android'.

* src/android.c (android_set_task_name): New function.
(android_run_select_thread, android_run_debug_thread): Set the
name of the LWP for debugging purposes.

* src/process.c (create_process): Set F_SETPIPE_SZ on Android in
addition to GNU/Linux.

* src/sysdep.c (procfs_ttyname, system_process_attributes)
[__ANDROID__]: Enable procfs_ttyname on Android systems.

19 months agoRemedy bug#63395
Po Lu [Thu, 7 Sep 2023 00:58:21 +0000 (08:58 +0800)]
Remedy bug#63395

* src/gtkutil.c (xg_update_frame_menubar): Avoid scaling the
requisiton height twice.  (bug#63395)

19 months agoFix perl-mode indentation after a hanging paren
Mauro Aranda [Thu, 20 Oct 2022 11:41:42 +0000 (08:41 -0300)]
Fix perl-mode indentation after a hanging paren

* lisp/progmodes/perl-mode.el (perl-hanging-paren-p): Allow
comments.  (Bug#34245)
* test/lisp/progmodes/perl-mode-tests.el (perl-test-bug-34245): New
test.

19 months ago* lisp/progmodes/project.el: Bump version to 0.10.0.
Dmitry Gutov [Wed, 6 Sep 2023 20:54:30 +0000 (23:54 +0300)]
* lisp/progmodes/project.el: Bump version to 0.10.0.

19 months ago(project-try-vc): When found non-VC project root, still search for the backend
Dmitry Gutov [Wed, 6 Sep 2023 20:30:27 +0000 (23:30 +0300)]
(project-try-vc): When found non-VC project root, still search for the backend

* lisp/progmodes/project.el (project-try-vc): When finding a
non-VC project root, still try to search for the containing
responsible VC backend, if any (bug#65704).

19 months agoRemove compat code from flyspell
Stefan Kangas [Wed, 6 Sep 2023 16:34:40 +0000 (18:34 +0200)]
Remove compat code from flyspell

* lisp/textmodes/flyspell.el: Delete redundant autoloads.

19 months ago; Silence byte-compiler
Stefan Kangas [Wed, 6 Sep 2023 11:00:30 +0000 (13:00 +0200)]
; Silence byte-compiler

* test/lisp/emacs-lisp/cl-lib-tests.el (old-struct)
(cl-lib-old-struct):
* test/lisp/progmodes/eglot-tests.el
(eglot-test-rust-analyzer-watches-files)
(eglot-test-capabilities, eglot-test-path-to-uri-windows):
Silence byte-compiler.

19 months ago; * lisp/leim/quail/indian.el: correct argument order
Mattias Engdegård [Wed, 6 Sep 2023 08:36:51 +0000 (10:36 +0200)]
; * lisp/leim/quail/indian.el: correct argument order

19 months agoindian.el: fix sorting predicate
Mattias Engdegård [Wed, 6 Sep 2023 08:05:25 +0000 (10:05 +0200)]
indian.el: fix sorting predicate

* lisp/leim/quail/indian.el
(quail-tamil-itrans-compute-syllable-table): Add missing comparison.
Patch from Visuwesh; bug found by an experimental tool.

19 months agoUse *p in interactive form in transpose-chars
Theodor Thornhill [Sat, 17 Dec 2022 12:14:22 +0000 (13:14 +0100)]
Use *p in interactive form in transpose-chars

* lisp/simple.el (transpose-chars): Use '*p' instead of '*P' like the
other transpose-* functions.  (Bug#60157)

19 months agoSupport local parser in treesit-node-at/on
Yuan Fu [Wed, 6 Sep 2023 04:02:13 +0000 (21:02 -0700)]
Support local parser in treesit-node-at/on

* lisp/treesit.el (treesit-node-at)
(treesit-node-on): Support local parser.

19 months ago; Update Ftreesit_parser_list docstring.
Yuan Fu [Wed, 6 Sep 2023 03:15:11 +0000 (20:15 -0700)]
; Update Ftreesit_parser_list docstring.

* doc/lispref/parsing.texi (Using Parser): Update manual.
* src/treesit.c (Ftreesit_parser_list): Update docstring.

19 months agoFix c-ts-mode BSD style indentation
Yuan Fu [Wed, 6 Sep 2023 03:12:19 +0000 (20:12 -0700)]
Fix c-ts-mode BSD style indentation

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Add else_clause.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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>.

19 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)

19 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.

19 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.

19 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>.

19 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

19 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.

19 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)

19 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"

19 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.

19 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.

19 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.

19 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.

19 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'

19 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 :-(

19 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.

19 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'

19 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.

19 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.

19 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.

19 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.

19 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>.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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

19 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.

19 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.

19 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.

19 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.

19 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.

19 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

19 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'.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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.

19 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)

19 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.

19 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'.

19 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.

19 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.

19 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.

19 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)

19 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)

19 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)

19 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.

19 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.

19 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.

19 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.

19 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.