]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 months agoAdd missing builtin package declarations
Stefan Kangas [Sat, 16 Sep 2023 12:34:20 +0000 (14:34 +0200)]
Add missing builtin package declarations

* lisp/finder.el (finder--builtins-alist): Add new package
directories 'leim' and 'obsolete' as part of the 'emacs' package.
Add new package directory 'use-package' as part of the
'use-package' package.
* lisp/net/eudc-capf.el:
* lisp/net/eudcb-ecomplete.el:
* lisp/net/eudcb-macos-contacts.el:
* lisp/net/eudcb-mailabbrev.el: Declare library as part of the
'eudc' package.
* lisp/mail/ietf-drums-date.el: Declare library as part of the
'ietf-drums' package.
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el: Declare library as part of the
'image-dired' package.
* lisp/emacs-lisp/oclosure.el:
* lisp/keymap.el:
* lisp/progmodes/c-ts-common.el: Declare library as part of the
'emacs' package.  (Bug#62751)

13 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 16 Sep 2023 11:36:49 +0000 (07:36 -0400)]
Merge from origin/emacs-29

755ae813a6a ; Declare some treesit.c functions in typescript-ts-mode.el.
89fa204b706 Fix loss of encrypted data in plstore.el
d9a1175a611 Close SQL database when corresponding 'sqlite-mode' buffe...
cbd8fac283a Fix Unicode normalization of characters
825be05b379 Support one-time passwords in Tramp
f880b94e649 Fix the 'C' and 'c' categories of characters
58fd212d8a2 Fix Emoji zooming commands
8970cdd009a ; Fix last change.
ba924be4522 ; * etc/DEBUG: Improve the redisplay section.
e110312ad95 ; * doc/lispref/minibuf.texi (Text from Minibuffer): Ment...
65f4810003b tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
6fe11b88ed0 Avoid using --display in emacsclient to reuse frames on PGTK
2fc7463c0e5 ; * INSTALL: Don't advertise -O3.  (Bug#65988)
29055412f2d ; Fix doc string of 'lsh'
738d8543337 Support emacsclient on Windows with server on GNU or Unix...
f0a89fa1d0e ; * lisp/saveplace.el (save-place-ignore-files-regexp): F...
c9cb8ee0fc0 Fix defcustom in saveplace.el (Bug#65977)
5ec8be1d589 ; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc ...
809305e6d8f Fix 'window-text-pixel-size' when there are several image...
ea14b0dcc20 : Doc fix.
01e8a0c6cbf Doc fix for prettify-symbols-unprettify-at-point
0065621d0d3 (report_overlay_modification): Fix bug#65929
6cc6455e931 Fix SVG colors (bug#56182)
9396d73942e * doc/emacs/text.texi (Outline Minor Mode): Add a note ab...
a65d1a5a167 Improve documentation of 'list-abbrevs'
5dcc4b7eab1 Tweak s-p-f for js-ts-mode
1fb2fb501f3 typescript-ts-mode, tsx-ts-mode: Fix syntax properties fo...
946b395e7e1 * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug...
33ee3e588fd Fix regression of treesit_cursor_helper_1
d11d81dfcc6 ; Fix doc typos (Bug#65868)
6554ec22465 Update docs for passing of Thien-Thi Nguyen
5ab2792d5c1 Update defvar usage tips example in manual
35d88c657e1 Document using Flymake together with Eglot
3f04efe9e7d ; * src/font.h (struct font): Comment about use of averag...
459b5f6b6d1 ; * admin/authors.el (authors-aliases): Update.
0c029ae8bcb ; tweak etc/TODO item

# Conflicts:
# admin/authors.el
# lisp/subr.el

13 months ago; Declare some treesit.c functions in typescript-ts-mode.el.
Eli Zaretskii [Sat, 16 Sep 2023 11:26:46 +0000 (14:26 +0300)]
; Declare some treesit.c functions in typescript-ts-mode.el.

13 months agoFix loss of encrypted data in plstore.el
Jens Schmidt [Tue, 30 May 2023 21:00:56 +0000 (23:00 +0200)]
Fix loss of encrypted data in plstore.el

* lisp/plstore.el (plstore--insert-buffer): Fix loss of encrypted
data when a plstore gets opened and saved without being decrypted
between these steps.  (Bug#63627)

13 months ago; Fix last change in gdb-mi.el
Eli Zaretskii [Sat, 16 Sep 2023 10:41:07 +0000 (13:41 +0300)]
; Fix last change in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-display-io-buffer): Move to before
the first use.  Doc fix.  Change the group to 'gdb-buffers'.

* etc/NEWS: Announce the new option.  (Bug#65007)

13 months agobug#65007: Allow displaying program IO in the GDB buffer
StrawberryTea [Sat, 16 Sep 2023 06:08:44 +0000 (01:08 -0500)]
bug#65007: Allow displaying program IO in the GDB buffer

* lisp/progmodes/gdb-mi.el (gdb-split-io-flag): Don't create
IO buffer if `gdb-split-io-flag' is nil.
(gdb-split-io-flag): New user option.

Copyright-paperwork-exempt: yes

13 months agoClose SQL database when corresponding 'sqlite-mode' buffer is killed
Thomas Hilke [Fri, 15 Sep 2023 08:30:25 +0000 (10:30 +0200)]
Close SQL database when corresponding 'sqlite-mode' buffer is killed

* lisp/sqlite-mode.el (sqlite-mode-open-file): Close DB when the
buffer is killed.  (Bug#65998)

Copyright-paperwork-exempt: yes

13 months agoDeclare more functions as shift-translatable motion commands
Jens Schmidt [Tue, 12 Sep 2023 20:35:13 +0000 (22:35 +0200)]
Declare more functions as shift-translatable motion commands

* lisp/comint.el (comint-next-prompt, comint-previous-prompt): Declare
as shift-translatable motion commands.
* lisp/textmodes/sgml-mode.el (sgml-skip-tag-backward)
(sgml-skip-tag-forward): Declare as shift-translatable motion
commands.  (Bug#65876)

13 months agobug#65673: Add lua-ts-mode
bug-gnu-emacs@gnu.org [Mon, 11 Sep 2023 15:03:13 +0000 (10:03 -0500)]
bug#65673: Add lua-ts-mode

* lisp/progmodes/lua-ts-mode.el:
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
* test/lisp/progmodes/lua-ts-mode-tests.el: New files.
* etc/NEWS: Mention the new mode.
* lisp/progmodes/eglot.el (eglot-server-programs):
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
Support 'lua-ts-mode'.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add Lua.
* test/infra/Dockerfile.emba:
* test/infra/test-jobs.yml: Include lua-ts-mode tests.

13 months agoAvoid errors when a restricted-sexp widget is empty
Mauro Aranda [Sat, 9 Sep 2023 13:59:30 +0000 (21:59 +0800)]
Avoid errors when a restricted-sexp widget is empty

* lisp/wid-edit.el (restricted-sexp): Don't try to read
an empty string when converting the current value to the
external format.  (Bug#63838)

* test/lisp/wid-edit-tests.el (widget-test-restricted-sexp-empty-val):
New test.

13 months ago; * lisp/edmacro.el (edmacro-reverse-macro-lines): Fix last change.
Eli Zaretskii [Sat, 16 Sep 2023 09:54:08 +0000 (12:54 +0300)]
; * lisp/edmacro.el (edmacro-reverse-macro-lines): Fix last change.

13 months agoMake using Edmacro easier for long sequences of keys
Earl Hyatt [Sat, 19 Aug 2023 22:26:45 +0000 (18:26 -0400)]
Make using Edmacro easier for long sequences of keys

* lisp/edmacro.el (edmacro-set-macro-to-region-lines)
(edmacro-reverse-key-order): New command and user option to
make working with longer lists of keys, such as from
'kmacro-edit-lossage', easier.
(edit-kbd-macro): Move regexps used to identify parts of
buffer to internal variables.
(edmacro--macro-lines-regexp, edmacro-mode-font-lock-keywords):
Allow noting whether the most recent line of keys is displayed
first.
(edmacro-mode-map): Bind the new command to 'C-c C-r'.
(edmacro-mode): Describe the new command in the mode
documentation string.

* doc/emacs/kmacro.texi (Edit Keyboard Macro): Mention
'edmacro-insert-key' and the newly added
'edmacro-set-macro-to-region-lines' and
'edmacro-reverse-key-line-order'.

* etc/NEWS (Edmacro): Add section describing the new features.

(Bug#65605)

13 months agoFix Unicode normalization of characters
Eli Zaretskii [Sat, 16 Sep 2023 09:17:23 +0000 (12:17 +0300)]
Fix Unicode normalization of characters

* lisp/international/ucs-normalize.el
(ucs-normalize-composition-exclusions, check-range): Update from
Unicode 15.0 data.  (Bug#65996)

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update to reflect
changes in ucs-normalize.el.

* admin/notes/unicode: Mention the updates in ucs-normalize.el.

13 months agoSupport one-time passwords in Tramp
Michael Albinus [Sat, 16 Sep 2023 07:59:31 +0000 (09:59 +0200)]
Support one-time passwords in Tramp

* doc/misc/tramp.texi (Remote shell setup):
Describe tramp-otp-password-prompt-regexp.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-otp-password-prompt-regexp'.

* lisp/net/tramp.el (tramp-otp-password-prompt-regexp): New defcustom.
(tramp-action-otp-password): New defun.

13 months agoFix the 'C' and 'c' categories of characters
Eli Zaretskii [Sat, 16 Sep 2023 07:53:05 +0000 (10:53 +0300)]
Fix the 'C' and 'c' categories of characters

* lisp/international/characters.el: Fix categories of Chinese
characters.  (Bug65995)

13 months agoFix Emoji zooming commands
Eli Zaretskii [Sat, 16 Sep 2023 07:33:10 +0000 (10:33 +0300)]
Fix Emoji zooming commands

* lisp/international/emoji.el (emoji-zoom-increase): Handle the
case where face property at point is a list of faces.  (Bug#65994)

13 months agoUpdate pdumper hashes
Andreas Schwab [Sat, 16 Sep 2023 07:07:26 +0000 (09:07 +0200)]
Update pdumper hashes

* src/pdumper.c (dump_vectorlike_generic, dump_vectorlike)
(dump_buffer): Update hash.

13 months ago; Fix last change.
Eli Zaretskii [Sat, 16 Sep 2023 06:26:30 +0000 (09:26 +0300)]
; Fix last change.

13 months ago; * etc/DEBUG: Improve the redisplay section.
Eli Zaretskii [Sat, 16 Sep 2023 06:25:08 +0000 (09:25 +0300)]
; * etc/DEBUG: Improve the redisplay section.

13 months ago; * doc/lispref/minibuf.texi (Text from Minibuffer): Mention alias.
Eli Zaretskii [Sat, 16 Sep 2023 05:55:17 +0000 (08:55 +0300)]
; * doc/lispref/minibuf.texi (Text from Minibuffer): Mention alias.

13 months ago; * src/sfntfont.c (sfntfont_list_family): Remove unused variable.
Po Lu [Sat, 16 Sep 2023 02:55:43 +0000 (10:55 +0800)]
; * src/sfntfont.c (sfntfont_list_family): Remove unused variable.

13 months agoUpdate Android port
Po Lu [Sat, 16 Sep 2023 02:38:46 +0000 (10:38 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsContextMenu.java (display): Return
false if the list of menu buttons is empty, lest Android cease
displaying menus on the assumption that Emacs is defective.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Likewise.

* src/fns.c (sort_list): Render sentence motion commands
functional within commentary

* src/sfntfont.c (sfntfont_list_family): Sort and deduplicate
the returned family list and make it a list of symbols.
(syms_of_sfntfont) <Qstring_lessp>: New defsym.

13 months agoFix documented Eshell behavior of ignoring leading nils in commands
Jim Porter [Fri, 15 Sep 2023 20:40:37 +0000 (13:40 -0700)]
Fix documented Eshell behavior of ignoring leading nils in commands

* lisp/eshell/esh-var.el (eshell-handle-local-variables): Simplify,
and move leading-nil handling to...
* lisp/eshell/esh-cmd.el (eshell-named-command): ... here.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/skip-leading-nils):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/local-variables/skip-nil): New tests.

* doc/misc/eshell.texi (Expansion): Document this behavior.

13 months ago(mutually_exclusive_p): Fix the regression from commit 6fad73d7cc53
Stefan Monnier [Fri, 15 Sep 2023 18:44:59 +0000 (14:44 -0400)]
(mutually_exclusive_p): Fix the regression from commit 6fad73d7cc53

Commit 6fad73d7cc53 throws away some useful optimization because
it misfired in some cases (as seen in bug#657260).  Here we try to
recover those useful optimizations with a slightly more careful
algorithm.

* src/regex-emacs.c (mutually_exclusive_aux): Rename from
`mutually_exclusive_p`.  Add two new args.  Improve the
case where we need to recurse.
(mutually_exclusive_p): New function defined on top of it.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Re-enable the test.

13 months ago* src/regex-emacs.c (mutually_exclusive_p): Refactor
Stefan Monnier [Fri, 15 Sep 2023 18:16:48 +0000 (14:16 -0400)]
* src/regex-emacs.c (mutually_exclusive_p): Refactor

Minor refactoring to avoid swapping p1/p2.

* src/regex-emacs.c (mutually_exclusive_exactn)
(mutually_exclusive_charset): New functions, extracted from
`mutually_exclusive_p`.
(mutually_exclusive_p): Use them.

13 months agotsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
Dmitry Gutov [Fri, 15 Sep 2023 13:30:58 +0000 (16:30 +0300)]
tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve

* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
Test the more complex query, because the current one leads to
false positives (mentioned in bug#65470).

13 months agoAvoid using --display in emacsclient to reuse frames on PGTK
Davide Masserut [Thu, 24 Aug 2023 16:33:39 +0000 (18:33 +0200)]
Avoid using --display in emacsclient to reuse frames on PGTK

Using hard-coded display values can cause PGTK graphical frames to
open using the wrong backend or not open at all.
* Makefile.in (install-etc): Use --reuse-frame instead of
--display=$DISPLAY.  (Bug#65509)

13 months ago; * INSTALL: Don't advertise -O3. (Bug#65988)
Eli Zaretskii [Fri, 15 Sep 2023 11:28:09 +0000 (14:28 +0300)]
; * INSTALL: Don't advertise -O3.  (Bug#65988)

13 months agoMark two tests as expensive
Stefan Kangas [Fri, 15 Sep 2023 08:52:03 +0000 (10:52 +0200)]
Mark two tests as expensive

* test/lisp/calendar/todo-mode-tests.el
(todo-test-add-and-delete-file):
* test/lisp/simple-tests.el (simple-tests-shell-command-39067):
Mark tests taking more than 10 seconds to run on a MacBook Pro from
2015 as expensive.

13 months agoFix describing packages where maintainer lacks email
Stefan Kangas [Fri, 15 Sep 2023 07:48:26 +0000 (09:48 +0200)]
Fix describing packages where maintainer lacks email

* lisp/emacs-lisp/package.el (describe-package-1): Fix describing
packages with one maintainer without an email address.  (Bug#65987)

13 months agoAdd dot SVG icons
Yuan Fu [Fri, 15 Sep 2023 07:28:31 +0000 (00:28 -0700)]
Add dot SVG icons

The advantage of SVG dots over Unicode dots is that their size is
fixed.  With Unicode dots, the size varies with the font.

Dot icons can be useful for status indicator: green dot for online,
red dot for offline, etc.

* etc/images/symbols/dot_large_16.pbm:
* etc/images/symbols/dot_large_16.svg:
* etc/images/symbols/dot_medium_16.pbm:
* etc/images/symbols/dot_medium_16.svg:
* etc/images/symbols/dot_small_16.pbm:
* etc/images/symbols/dot_small_16.svg: New file.

13 months agoAllow treesit-font-lock-recompute-features to be language-specific
Yuan Fu [Fri, 15 Sep 2023 04:32:23 +0000 (21:32 -0700)]
Allow treesit-font-lock-recompute-features to be language-specific

* lisp/treesit.el:
(treesit-font-lock-recompute-features): Add LANGUAGE parameter.

13 months ago; Fix doc string of 'lsh'
Eli Zaretskii [Fri, 15 Sep 2023 07:17:30 +0000 (10:17 +0300)]
; Fix doc string of 'lsh'

* lisp/subr.el (lsh): Doc fix.  Suggested by Richard Stallman
<rms@gnu.org>.

13 months agoSupport emacsclient on Windows with server on GNU or Unix systems
Eli Zaretskii [Fri, 15 Sep 2023 07:02:00 +0000 (10:02 +0300)]
Support emacsclient on Windows with server on GNU or Unix systems

* lisp/server.el (server-process-filter): If 'tty-name' is literally
"CONOUT$", assume the client runs on MS-Windows and force the
frame type to GUI.  This allows to run emacsclient on MS-Windows
when the server runs on a Posix host.  (Bug#65812)

13 months ago; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919).
Eli Zaretskii [Fri, 15 Sep 2023 06:05:14 +0000 (09:05 +0300)]
; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919).

13 months ago; * src/xterm.c (handle_one_xevent): Cite the bug meant to be fixed.
Po Lu [Fri, 15 Sep 2023 02:35:06 +0000 (10:35 +0800)]
; * src/xterm.c (handle_one_xevent): Cite the bug meant to be fixed.

13 months agoCorrect bug#65919
Po Lu [Fri, 15 Sep 2023 02:30:12 +0000 (10:30 +0800)]
Correct bug#65919

* src/process.c (child_signal_notify): Expunge call to
non-reentrant function from signal handler.

* src/xfns.c (setup_xi_event_mask): Cease selecting for
XI_FocusIn and XI_FocusOut under X toolkit builds.

* src/xterm.c (xi_handle_interaction, xi_handle_focus_change)
(xi_handle_focus_change): Make conditional on GTK 3 or no
toolkit builds.
(xi_handle_delete_frame, x_free_frame_resources): Adjust
correspondingly.
(handle_one_xevent) <EnterNotify, LeaveNotify>: Examine
EnterNotify and LeaveNotify events for focus changes
irrespective of whether XI2 is enabled under the X toolkit and
GTK 2.x.

13 months agoCollapse 'if' forms in Eshell iterative evaluation
Jim Porter [Fri, 15 Sep 2023 00:51:36 +0000 (17:51 -0700)]
Collapse 'if' forms in Eshell iterative evaluation

* lisp/eshell/esh-cmd.el (eshell-do-eval): After evaluating 'if'
conditional, replace the form with the THEN or ELSE body.

13 months ago; Simplify how to use 'eshell-debug-command'
Jim Porter [Fri, 15 Sep 2023 00:51:16 +0000 (17:51 -0700)]
; Simplify how to use 'eshell-debug-command'

Now, 'eshell-debug-command' works more like 'format-message', which is
how we usually use it.

* lisp/eshell/esh-util.el (eshell-always-debug-command): New function.
(eshell-debug-command): Simplify.  Update callers.

13 months ago; * lisp/saveplace.el (save-place-ignore-files-regexp): Fix last change.
Eli Zaretskii [Thu, 14 Sep 2023 13:18:03 +0000 (16:18 +0300)]
; * lisp/saveplace.el (save-place-ignore-files-regexp): Fix last change.

13 months agoFix defcustom in saveplace.el (Bug#65977)
Mauro Aranda [Thu, 14 Sep 2023 11:24:43 +0000 (08:24 -0300)]
Fix defcustom in saveplace.el (Bug#65977)

* lisp/saveplace.el (save-place-ignore-files-regexp): Allow nil.

13 months ago; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc fix.
Eli Zaretskii [Thu, 14 Sep 2023 13:08:54 +0000 (16:08 +0300)]
; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc fix.

13 months agoFix Tramp test on NetBSD
Michael Albinus [Thu, 14 Sep 2023 12:38:27 +0000 (14:38 +0200)]
Fix Tramp test on NetBSD

* test/lisp/net/tramp-tests.el (tramp--test-netbsd-p): New defun.
(tramp--test-check-files): Use it.

13 months agoFix 'window-text-pixel-size' when there are several images at START
Eli Zaretskii [Thu, 14 Sep 2023 09:52:14 +0000 (12:52 +0300)]
Fix 'window-text-pixel-size' when there are several images at START

* src/xdisp.c (window_text_pixel_size): Remove unnecessary call to
'move_it_to'.  (Bug#65899)  (Bug#54862)

13 months agoAvert a crash in the Android last resort font driver
Po Lu [Thu, 14 Sep 2023 08:53:04 +0000 (16:53 +0800)]
Avert a crash in the Android last resort font driver

* java/org/gnu/emacs/EmacsFontDriver.java (FONT_INVALID_CODE):
New constant.
(hasChar, encodeChar): Accept a jint character code rather than
a jchar.

* java/org/gnu/emacs/EmacsSdk23FontDriver.java (hasChar)
(encodeChar): Return 0 or FONT_INVALID_CODE if the character is
not representable in a Java char.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (hasChar): Ditto.

* src/androidfont.c (android_init_font_driver): Adjust signature
to match.

13 months ago: Doc fix.
Eli Zaretskii [Thu, 14 Sep 2023 06:21:28 +0000 (09:21 +0300)]
: Doc fix.

* lisp/progmodes/prog-mode.el
(prettify-symbols-unprettify-at-point): Doc fix.

13 months agoDoc fix for prettify-symbols-unprettify-at-point
Stefan Kangas [Wed, 13 Sep 2023 20:45:02 +0000 (22:45 +0200)]
Doc fix for prettify-symbols-unprettify-at-point

* lisp/progmodes/prog-mode.el
(prettify-symbols-unprettify-at-point): Document that it has to be
set before enabling 'prettify-symbols-mode'.  (Bug#65884)

13 months ago; * src/treesit.c (Ftreesit_parser_set_included_ranges): Minor fix.
Yuan Fu [Thu, 14 Sep 2023 04:41:56 +0000 (21:41 -0700)]
; * src/treesit.c (Ftreesit_parser_set_included_ranges): Minor fix.

13 months agoRefactor treesit-font-lock-fontify-region
Yuan Fu [Thu, 14 Sep 2023 04:04:18 +0000 (21:04 -0700)]
Refactor treesit-font-lock-fontify-region

* lisp/treesit.el (treesit-font-lock-fontify-region): Extract out
treesit--font-lock-fontify-region-1.

13 months ago; * admin/notes/tree-sitter/performance (Facts): Fix filling.
Yuan Fu [Thu, 14 Sep 2023 03:36:47 +0000 (20:36 -0700)]
; * admin/notes/tree-sitter/performance (Facts): Fix filling.

13 months agoFix treesit-font-lock-fontify-region wrt local parsers
Yuan Fu [Thu, 14 Sep 2023 02:16:04 +0000 (19:16 -0700)]
Fix treesit-font-lock-fontify-region wrt local parsers

* lisp/treesit.el (treesit--update-ranges-local): Minor change.
(treesit-font-lock-fontify-region): Don't try to fontify if node is
nil.  Don't use alist-get to get the root node for a language: there
might be multiple root nodes (from multiple local parsers) for the
same language.
(treesit-major-mode-setup): Remove existing local parsers when major
mode is activated.

13 months agoImprove the Android last resort font driver
Po Lu [Thu, 14 Sep 2023 01:57:09 +0000 (09:57 +0800)]
Improve the Android last resort font driver

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7Typeface):
Rename fileName to familyName and cease attempting to infer a
style from it.
(EmacsSdk7FontDriver): Employ preset typefaces rather than
enumerating each typeface within the system fonts directory.
(draw): Circumvent kerning difficulties by advancing past each
character individually.

13 months agoImprove process instrumentation in Eshell
Jim Porter [Thu, 14 Sep 2023 01:19:18 +0000 (18:19 -0700)]
Improve process instrumentation in Eshell

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Add more logging,
and try to bulletproof the implementation.
(eshell-sentinel): Add more logging.

13 months agoImprove docstring for treesit-language-at
Yuan Fu [Thu, 14 Sep 2023 01:14:03 +0000 (18:14 -0700)]
Improve docstring for treesit-language-at

* lisp/treesit.el (treesit-language-at-point-function)
(treesit-language-at): Several people has confused over this, make it
extra clear than treesit-language-at requires
treesit-language-at-point-function to work.

13 months agoAdd tree-sitter performance note
Yuan Fu [Thu, 14 Sep 2023 00:56:07 +0000 (17:56 -0700)]
Add tree-sitter performance note

13 months agoUpdate tree-sitter traversing functions' docstrings
Yuan Fu [Thu, 14 Sep 2023 00:55:36 +0000 (17:55 -0700)]
Update tree-sitter traversing functions' docstrings

* src/treesit.c (Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Update docstring.

13 months ago; * test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp): Tag unstable.
F. Jason Park [Wed, 13 Sep 2023 23:04:43 +0000 (16:04 -0700)]
; * test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp): Tag unstable.

13 months ago(report_overlay_modification): Fix bug#65929
Stefan Monnier [Wed, 13 Sep 2023 22:49:55 +0000 (18:49 -0400)]
(report_overlay_modification): Fix bug#65929

Somehow the new overlay code in Emacs-29 changed slightly
the test to decide when to run the `modification-hooks` of overlays,
with the consequence that these hook functions end up being executed
also when text is deleted right after an empty overlay, which is
contrary to Emacs-28 behavior as well as contrary to the Texinfo doc.

* src/buffer.c (report_overlay_modification): Better reproduce the
Emacs-28 code.

* test/src/buffer-tests.el (overlay-modification-hooks):
Add corresponding test.

13 months agoFix last Ibuffer change and improve feedback messages
Stephen Berman [Wed, 13 Sep 2023 21:43:54 +0000 (23:43 +0200)]
Fix last Ibuffer change and improve feedback messages

* lisp/ibuf-macs.el (define-ibuffer-op): Emit grammatically
correct message on finishing operation, and don't operate when
there are no marked buffer lines and point is not on a buffer
line.  (bug#64230, Message #21)

* lisp/ibuffer.el (ibuffer-map-lines): Take acting on only one
buffer line and using non-nil 'ibuffer-expert' into account.

13 months agoWhen waiting for processes in Eshell, wait until all the I/O is complete
Jim Porter [Wed, 13 Sep 2023 18:50:39 +0000 (11:50 -0700)]
When waiting for processes in Eshell, wait until all the I/O is complete

This should fix bug#59103, bug#65590, and bug#65601.

* lisp/eshell/esh-proc.el (eshell-sentinel): Set ':eshell-handles' to
nil when finished with I/O.
(eshell-wait-for-process): Wait until ':eshell-handles' is nil.

13 months ago; Fix an Eshell error when calling a lambda with form logging enabled
Jim Porter [Wed, 13 Sep 2023 19:46:58 +0000 (12:46 -0700)]
; Fix an Eshell error when calling a lambda with form logging enabled

* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't call 'symbol-name';
the function might be a closure.

13 months agoFix build error on older macOS versions
Alan Third [Wed, 13 Sep 2023 19:26:54 +0000 (20:26 +0100)]
Fix build error on older macOS versions

* src/nsterm.m (ns_scroll_run): Use srcRect instead of destRect.

13 months agoFix SVG colors (bug#56182)
Alan Third [Mon, 11 Sep 2023 18:58:14 +0000 (19:58 +0100)]
Fix SVG colors (bug#56182)

* src/image.c (svg_load_image): Reverse the R and B bytes in the
Windows colors before using them to generate the SVG.

13 months ago; * lisp/eshell/esh-cmd.el (eshell-do-eval): Fix 'eshell-manipulate' call.
Jim Porter [Wed, 13 Sep 2023 18:30:32 +0000 (11:30 -0700)]
; * lisp/eshell/esh-cmd.el (eshell-do-eval): Fix 'eshell-manipulate' call.

13 months ago* doc/emacs/text.texi (Outline Minor Mode): Add a note about value 'insert'.
Juri Linkov [Wed, 13 Sep 2023 16:49:29 +0000 (19:49 +0300)]
* doc/emacs/text.texi (Outline Minor Mode): Add a note about value 'insert'.

* lisp/outline.el (outline-minor-mode-use-buttons): Add a note and
a comment about the value 'insert' (bug#65874).

13 months ago; Fix bootstrap
Stefan Kangas [Wed, 13 Sep 2023 16:22:51 +0000 (18:22 +0200)]
; Fix bootstrap

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't use void variable.

13 months agoFix defcustom :type in replace.el (Bug#65920)
Mauro Aranda [Wed, 13 Sep 2023 15:49:40 +0000 (12:49 -0300)]
Fix defcustom :type in replace.el (Bug#65920)

* lisp/replace.el (list-matching-lines-face)
(list-matching-lines-buffer-name-face): Allow a nil value.

13 months agoShorten docstrings generated by cl-defstruct
Damien Cassou [Tue, 12 Sep 2023 06:28:37 +0000 (08:28 +0200)]
Shorten docstrings generated by cl-defstruct

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Split the first line of
generated docstrings if either the struct name or a field name is very
long.  This reduces the likelihood of "docstring wider than 80
characters" errors.  (Bug#65790)

13 months agoShorten docstrings generated by cl-defsubst
Damien Cassou [Tue, 12 Sep 2023 06:28:37 +0000 (08:28 +0200)]
Shorten docstrings generated by cl-defsubst

* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Split the first line of
the docstring into 2 lines if the function name is very long.
Additionally, remove the word "inlining" in the generated docstring as
it is not very useful and increases the likelihood of "docstring wider
than 80 characters" errors.  (Bug#65790)

13 months agobytecomp-tests.el: Add new helper function
Damien Cassou [Mon, 11 Sep 2023 19:59:45 +0000 (21:59 +0200)]
bytecomp-tests.el: Add new helper function

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--without-warning-test): Add helper function.
(bytecomp-warn--ignore): Use the helper.

13 months agoImprove documentation of 'list-abbrevs'
Eli Zaretskii [Wed, 13 Sep 2023 14:23:03 +0000 (17:23 +0300)]
Improve documentation of 'list-abbrevs'

* doc/emacs/abbrevs.texi (Editing Abbrevs): Describe how system
abbrevs are shown by 'list-abbrevs'.  Suggested by Shynur Xie
<one.last.kiss@outlook.com>.  (Bug#65907)

13 months agoFix problem with long file names in Tramp
Michael Albinus [Wed, 13 Sep 2023 14:21:13 +0000 (16:21 +0200)]
Fix problem with long file names in Tramp

* lisp/net/tramp-sh.el (tramp-ls-file-attributes): New defconst.
(tramp-do-file-attributes-with-ls): Use it.  (Bug#65324)

13 months agoReorganize Android permissions documentation
Po Lu [Wed, 13 Sep 2023 13:39:22 +0000 (21:39 +0800)]
Reorganize Android permissions documentation

* doc/emacs/android.texi (Android Environment): Illustrate the
behavior of modern Android versions first.  Reported by Stefan
Kangas <stefankangas@gmail.com>.

13 months agoExclude ``regular'' from font adstyle
Po Lu [Wed, 13 Sep 2023 05:42:29 +0000 (13:42 +0800)]
Exclude ``regular'' from font adstyle

* src/sfntfont.c (sfnt_parse_style): Disregard tokens matching
Regular entirely.

13 months agoRequest additional permissions on Android
Po Lu [Wed, 13 Sep 2023 01:25:42 +0000 (09:25 +0800)]
Request additional permissions on Android

* doc/emacs/android.texi (Android Environment): List two
additional permissions within the summary of permissions granted
by default.

* java/AndroidManifest.xml.in: Request READ_CALENDAR and
WRITE_CALENDAR.

13 months agoFacilitate opening content:// files without a linked file name
Po Lu [Wed, 13 Sep 2023 01:24:16 +0000 (09:24 +0800)]
Facilitate opening content:// files without a linked file name

* java/org/gnu/emacs/EmacsOpenActivity.java
(checkReadableOrCopy): If FILE is NULL, return a matching
content URI if possible, else generate a file name with the URI
as a reference.
(onCreate): Catch SecurityException around calls to
openFileDescriptor.

13 months ago; Improve recent change to printing exit status in Eshell
Jim Porter [Wed, 13 Sep 2023 01:13:52 +0000 (18:13 -0700)]
; Improve recent change to printing exit status in Eshell

* lisp/eshell/esh-proc.el (eshell-interactive-filter): Declare.
(eshell-interactive-process-filter): Simplify.
(eshell-sentinel): Call 'eshell-interactive-filter'.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-process/redirect-message): Use
'eshell-with-temp-buffer'.

13 months agoTweak s-p-f for js-ts-mode
Dmitry Gutov [Tue, 12 Sep 2023 23:21:04 +0000 (02:21 +0300)]
Tweak s-p-f for js-ts-mode

* lisp/progmodes/js.el (js-ts--s-p-query):
Consider two more contexts (bug#65470).

13 months agotypescript-ts-mode, tsx-ts-mode: Fix syntax properties for regexp and jsx
Jostein Kjønigsen [Tue, 5 Sep 2023 19:29:27 +0000 (21:29 +0200)]
typescript-ts-mode, tsx-ts-mode: Fix syntax properties for regexp and jsx

Propertize regexps as strings and JSX elements as generic strings.

* lisp/progmodes/typescript-ts-mode.el (ts-ts--s-p-query)
(tsx-ts--s-p-query): New variables.
(ts-ts--syntax-propertize, tsx-ts--syntax-propertize)
(ts-ts--syntax-propertize-captures): New functions.
(typescript-ts-mode, tsx-ts-mode): Use them (bug#65470).

13 months agoAvoid unnecessary tree-sitter reparse when setting the same range
Yuan Fu [Tue, 12 Sep 2023 07:36:07 +0000 (00:36 -0700)]
Avoid unnecessary tree-sitter reparse when setting the same range

* src/treesit.h (Lisp_TS_Parser)
* src/treesit.c (make_treesit_parser): Remove has_range field, add
last_set_ranges field.
(Ftreesit_parser_set_included_ranges): Return early if the new range
is the same as the old one.
(Ftreesit_parser_included_ranges): Change has_range to
last_set_ranges.

13 months agoMake sure undefined tree-sitter thing doesn't raise an error
Yuan Fu [Tue, 12 Sep 2023 03:59:50 +0000 (20:59 -0700)]
Make sure undefined tree-sitter thing doesn't raise an error

A previous change should've achived this, but that wasn't enough.
This one actually achieves the intended effect, namely,
treesit-node-match-p doesn't raise an error if IGNORE-MISSING is
non-nil, and traverse functions don't raise error by default.

* src/treesit.c (treesit_traverse_validate_predicate): Remove
ignore_missing parameter, return error symbol.
(Ftreesit_node_match_p)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Check returned error symbol.
(syms_of_treesit): New symbol.

13 months ago* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug#65895).
Eli Zaretskii [Tue, 12 Sep 2023 18:45:19 +0000 (21:45 +0300)]
* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug#65895).

13 months agoEnsure that Eshell doesn't consider a process complete until stderr is done
Jim Porter [Tue, 12 Sep 2023 05:05:38 +0000 (22:05 -0700)]
Ensure that Eshell doesn't consider a process complete until stderr is done

This will hopefully help resolve some timing issues with subprocesses
in Eshell.  There's now much less chance of output going missing when
using redirects.

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Set
':eshell-stderr-live'...
(eshell-sentinel): ... use it.

13 months agoBe more careful about when to print abnormal exit status in Eshell
Jim Porter [Tue, 12 Sep 2023 04:32:05 +0000 (21:32 -0700)]
Be more careful about when to print abnormal exit status in Eshell

* lisp/eshell/esh-proc.el (eshell-sentinel): Only output abnormal
status when stderr is interactive.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-process/redirect-message): New test.

13 months agoDon't do anything in 'eshell-sentinel' if the process status is "run"
Jim Porter [Fri, 18 Aug 2023 05:40:03 +0000 (22:40 -0700)]
Don't do anything in 'eshell-sentinel' if the process status is "run"

This doesn't change anything right now, but it will prevent future
issues when we add the ability to resume suspended processes in
Eshell.

* lisp/eshell/esh-proc.el (eshell-sentinel): Check for "run" status
earlier.

13 months ago* src/alloc.c (garbage_collect): Run `post-gc-hook` later (bug#65700)
Stefan Monnier [Tue, 12 Sep 2023 18:06:54 +0000 (14:06 -0400)]
* src/alloc.c (garbage_collect): Run `post-gc-hook` later (bug#65700)

13 months agoAddress "Useless clause following default cond clause" warnings
Stefan Monnier [Tue, 12 Sep 2023 16:59:03 +0000 (12:59 -0400)]
Address "Useless clause following default cond clause" warnings

* lisp/gnus/message.el (message-position-point): Fix paren typo.

* lisp/org/org.el: Remove dead-code.

13 months ago(read-char-from-minibuffer): Allow use of `quoted-insert` (bug#65805)
Stefan Monnier [Tue, 12 Sep 2023 16:55:54 +0000 (12:55 -0400)]
(read-char-from-minibuffer): Allow use of `quoted-insert` (bug#65805)

* lisp/subr.el (read-char-from-minibuffer-map): No need to remap
`self-insert-command` any more.
(read-char-from-minibuffer): Use `post-command-hook` to exit as soon as
a char is provided.

13 months agoCorrect the XEmacs version of c-put-char-properties
Alan Mackenzie [Tue, 12 Sep 2023 14:45:47 +0000 (14:45 +0000)]
Correct the XEmacs version of c-put-char-properties

* lisp/progmodes/cc-defs.el (c-put-char-properties): Use the
put-text-property interface rather than make-extent for XEmacs
as well as Emacs.

13 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Tue, 12 Sep 2023 02:39:51 +0000 (10:39 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

13 months agoExtract font foundry metadata from the OS/2 table
Po Lu [Tue, 12 Sep 2023 02:37:55 +0000 (10:37 +0800)]
Extract font foundry metadata from the OS/2 table

* src/sfnt.c (sfnt_table_names): Append an entry for OS/2
tables.
(sfnt_read_OS_2_table): New function.
(main): Introduce a new test for the OS/2 table reader.

* src/sfnt.h (sfnt_read_OS_2_table): New declaration.

* src/sfntfont.c (sfnt_decode_foundry_name): Delete function.
(sfnt_enum_font_1): Read the font's OS/2 table and extract the
foundry name from there.  Use `misc' if absent.
(sfntfont_desc_to_entity, sfntfont_open): Cease interning
desc->designer, as that is now a symbol.
(syms_of_sfntfont) <Qmisc>: New defsym Qmisc.  (bug#65865)

13 months ago; * lisp/treesit.el (treesit-explore-mode): Support local parsers.
Yuan Fu [Tue, 12 Sep 2023 01:06:23 +0000 (18:06 -0700)]
; * lisp/treesit.el (treesit-explore-mode): Support local parsers.

13 months agoFix tracing for advanced scoring in gnus-logic.el
Łukasz Stelmach [Mon, 21 Nov 2022 21:30:55 +0000 (22:30 +0100)]
Fix tracing for advanced scoring in gnus-logic.el

* lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing code
outside conditional so it's executed for both branches.  (Bug#59458)

13 months agoMatch recent version of GNU global in CEDET
Stefan Kangas [Mon, 11 Sep 2023 23:50:28 +0000 (01:50 +0200)]
Match recent version of GNU global in CEDET

* lisp/cedet/cedet-global.el (cedet-gnu-global-version-check):
Match recent version of GNU global.  (Bug#62581)

13 months agoFix regression of treesit_cursor_helper_1
Yuan Fu [Mon, 11 Sep 2023 19:47:32 +0000 (12:47 -0700)]
Fix regression of treesit_cursor_helper_1

* src/treesit.c (treesit_cursor_helper_1)
(treesit_cursor_first_child_for_byte): Use
ts_tree_cursor_goto_first_child_for_byte first, and
ts_tree_cursor_goto_first_child second.

13 months agoRemove check for appdefined events on the queue (bug#65843)
Alan Third [Mon, 11 Sep 2023 16:18:31 +0000 (17:18 +0100)]
Remove check for appdefined events on the queue (bug#65843)

It seems this was likely a bug in macOS 10.10.1. I have no way to find
out when it was fixed, but hopefully before 10.10.5, the most recent
release of that version.

* src/nsterm.m (ns_send_appdefined): Remove check for whether previous
appdefined events have been lost.

13 months agoFix crash on child frame creation (bug#65817)
Alan Third [Fri, 8 Sep 2023 18:33:06 +0000 (19:33 +0100)]
Fix crash on child frame creation (bug#65817)

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Reorder the way the
frame and layers are created.
([EmacsView makeBackingLayer]): Change to the newly renamed method
below.
([EmacsLayer initWithColorSpace:doubleBuffered:]):
([EmacsLayer initWithDoubleBuffered:]): Rename the method and remove
the colorspace argument as it's no longer able to be set on initial
creation.
* src/nsterm.h: Use new method prototype.

13 months agoSimplify the EmacsLayer double buffering code (bug#63187)
Alan Third [Sun, 23 Jul 2023 11:00:30 +0000 (12:00 +0100)]
Simplify the EmacsLayer double buffering code (bug#63187)

13 months ago; Fix doc typos (Bug#65868)
shynur [Mon, 11 Sep 2023 14:56:39 +0000 (22:56 +0800)]
; Fix doc typos (Bug#65868)

13 months agoAvoid confusing message in Ibuffer (bug#64230)
Stephen Berman [Mon, 11 Sep 2023 14:15:29 +0000 (16:15 +0200)]
Avoid confusing message in Ibuffer (bug#64230)

* lisp/ibuffer.el (ibuffer-map-lines): With `ibuffer-auto-mode'
enabled, Ibuffer counts the automatically popped up (and hence not
user-marked) buffer "*Ibuffer confirmation*".  Since Ibuffer
reports how many user-marked buffers were acted upon, and in this
case the reported count would be too high by one, decrement the
count to avoid the confusing message.