emacs.git
19 months ago; * src/epaths.in: Declare and use android_game_path.
Po Lu [Mon, 13 May 2024 00:26:04 +0000 (08:26 +0800)]
; * src/epaths.in: Declare and use android_game_path.

19 months agoComplete pacification of build warnings on Android
Po Lu [Mon, 13 May 2024 00:25:39 +0000 (08:25 +0800)]
Complete pacification of build warnings on Android

* build-aux/makecounter.sh: Introduce extern declaration of
emacs_shortlisp_counter.

* src/android.c (android_class_path): Declare static.

* src/androidfont.c (font_driver_class, font_spec_class)
(integer_class, font_metrics_class, font_object_class): Declare
static.

* src/androidterm.c (android_frame_parm_handlers): Move
declaration...

* src/androidterm.h (android_frame_parm_handlers): ... here.

19 months agoFix 'C-u C-x p g' globally and 'A' in dired-mode
Dmitry Gutov [Sun, 12 May 2024 17:42:08 +0000 (20:42 +0300)]
Fix 'C-u C-x p g' globally and 'A' in dired-mode

* lisp/progmodes/project.el (project-find-regexp): Ensure the
DEFAULT-DIRECTORY is set correctly for the 'C-u' case (bug#70888).

* lisp/progmodes/project.el (project--files-in-directory):
Ensure that the DIR argument ends with a slash --
'dired-do-find-regexp' passes it differently, for example.

* lisp/progmodes/xref.el (xref--group-name-for-display): Ensure
the project-relative and absolute display modes work well for
groups with "relative" file names.
(xref--analyze, xref--add-log-current-defun): Change accordingly.

* test/lisp/progmodes/project-tests.el
(project-find-regexp-with-prefix): New test.

19 months agocompletion--replace: Fix completion cycling
Dmitry Gutov [Sun, 12 May 2024 02:57:10 +0000 (05:57 +0300)]
completion--replace: Fix completion cycling

* lisp/minibuffer.el (completion--replace):
Don't "insert before markers" after all because in some cases
(https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html)
- like cycling - BEG can be denoted by a marker as well.
(minibuffer-completion-help): Make FIELD-END simply a fixnum.  And
adjust its value manually inside the local
completion-list-insert-choice-function (bug#48356).

19 months agoFix offset of reported conversion regions
Po Lu [Sun, 12 May 2024 13:42:52 +0000 (21:42 +0800)]
Fix offset of reported conversion regions

* src/androidterm.c (request_class, text_class): Pacify new
warning.
(android_update_selection): Don't redundantly subtract 1 from
compose region start.

19 months agoRevert "Avoid resizing mutation in subst-char-in-string"
Mattias Engdegård [Sun, 12 May 2024 13:18:19 +0000 (15:18 +0200)]
Revert "Avoid resizing mutation in subst-char-in-string"

This reverts commit 184d6e8c02345583264b053bb59ae031bb1c5a00.

It wasn't quite correct: the path through `string-replace` would not
preserve text properties in the input string, which broke Gnus.

19 months agoSilence some macOS build warnings
Mattias Engdegård [Sun, 12 May 2024 12:55:55 +0000 (14:55 +0200)]
Silence some macOS build warnings

* src/image.c (native_image_type): Declare static.
* src/keyboard.c (lispy_function_keys): Declare static on NS.
* src/nsmenu.m (context_menu_value):
* src/nsterm.m (ns_frame_parm_handlers): Move extern declarations...
* src/nsterm.h: ...here.
* test/src/emacs-module-resources/mod-test.c: Add extern declaration.

19 months agoSafer and faster string sorting
Mattias Engdegård [Sun, 12 May 2024 09:22:23 +0000 (11:22 +0200)]
Safer and faster string sorting

* lisp/emacs-lisp/cl-seq.el (cl-sort):
Don't use string mutation when sorting the characters in a string.
This avoids O(n^2) run time and makes it future-safe.

19 months agoProperly deinitialize directory cursors on closedir
Po Lu [Sun, 12 May 2024 12:24:19 +0000 (20:24 +0800)]
Properly deinitialize directory cursors on closedir

* src/androidvfs.c (android_saf_tree_closedir): Call
cursor.close, for deleting the local reference to enable its
garbage collection is not sufficient to release all related
resources.

19 months agoAdditional changes to processing of Num Lock on Android
Po Lu [Sun, 12 May 2024 07:46:38 +0000 (15:46 +0800)]
Additional changes to processing of Num Lock on Android

* java/org/gnu/emacs/EmacsView.java (onKeyDown, onKeyMultiple)
(onKeyDown): Disregard Num and Scroll Lock keys, and return
value of window functions to the system.

* java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Return
normalized meta state, not only those bits the system considers
modifiers.
(onKeyDown, onKeyUp): Ignore numpad keys to which no base
characters are assigned, so that the system may generate the
proper action keys instead.

19 months agoCorrect earlier changes to processing of Num Lock on Android
Po Lu [Sun, 12 May 2024 06:13:27 +0000 (14:13 +0800)]
Correct earlier changes to processing of Num Lock on Android

* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Cease stripping META_NUM_LOCK_ON and META_SCROLL_LOCK_ON from
meta masks reported to getUnicodeChar.

19 months ago; Fix a recent change in fns.c
Eli Zaretskii [Sun, 12 May 2024 06:51:51 +0000 (09:51 +0300)]
; Fix a recent change in fns.c

* src/fns.c (value_cmp): Use 'subprocesses', not 'MSDOS', as
conditional for process-related functionalities.

19 months agoPacify warnings in gmalloc.c
Po Lu [Sun, 12 May 2024 05:27:43 +0000 (13:27 +0800)]
Pacify warnings in gmalloc.c

* src/gmalloc.c (__malloc_initialize_hook): Also declare in
advance on Glibc 2.24 and later.
(__after_morecore_hook, __morecore): Likewise on Glibc 2.34 and
later.

19 months ago* oldXMenu/Activate.c (x_menu_grab_keyboard): Declare static.
Po Lu [Sun, 12 May 2024 05:21:09 +0000 (13:21 +0800)]
* oldXMenu/Activate.c (x_menu_grab_keyboard): Declare static.

19 months agoFix the DJGPP build
Po Lu [Sun, 12 May 2024 02:38:26 +0000 (10:38 +0800)]
Fix the DJGPP build

* src/fns.c (value_cmp) [MSDOS]: Consider processes unordered
on DOS.

19 months ago* src/keyboard.c (lispy_function_keys): Define as static on Android.
Po Lu [Sun, 12 May 2024 02:18:02 +0000 (10:18 +0800)]
* src/keyboard.c (lispy_function_keys): Define as static on Android.

19 months ago; Update last change
Po Lu [Sun, 12 May 2024 02:16:56 +0000 (10:16 +0800)]
; Update last change

* msdos/sedlibmk.inp (STDDEF_NOT_IDEMPOTENT): Define to 1.

19 months agoFix the DJGPP build
Po Lu [Sun, 12 May 2024 02:13:41 +0000 (10:13 +0800)]
Fix the DJGPP build

* msdos/sedlibmk.inp (HAVE_STRTOF, NULLPTR_T_NEEDS_STDDEF):
Define to 1.

19 months agoPacify gcc -Wmissing-variable-declarations
Paul Eggert [Sat, 4 May 2024 17:08:48 +0000 (10:08 -0700)]
Pacify gcc -Wmissing-variable-declarations

This is a new warning diagnostic in GCC 14.
* lib-src/etags.c (mercury_heuristics_ratio):
* src/pgtkselect.c, src/xselect.c (selection_request_stack):
* src/xselect.c (outstanding_transfers):
* src/xterm.c (pending_selection_requests)
(x_dnd_waiting_for_motif_finish_display):
Now static.
* lib-src/make-docfile.c (close_emacs_globals):
Arrange for lispsym to be declared with extern first,
when compiling lread.c.
* src/alloc.c (gdb_make_enums_visible) [__GNUC__]:
* src/emacs.c (RCS_Id):
* src/keyboard.c (stop_character):
* src/print.c (print_output_debug_flag):
Now declared with extern first.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]:
Arrange for ID to be declared extern first.
* src/lisp.h (garbage_collection_inhibited):
* src/xterm.h (x_frame_parm_handlers):
Declare here, so that its interface is properly checked.  Other decls
removed.

19 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 11 May 2024 20:16:48 +0000 (13:16 -0700)]
Update from Gnulib by running admin/merge-gnulib

19 months agoAdjust to recent Gnulib changes
Paul Eggert [Sat, 4 May 2024 16:55:27 +0000 (09:55 -0700)]
Adjust to recent Gnulib changes

* admin/merge-gnulib: Also remove the new Gnulib file
m4/off64_t.m4, as Emacs doesn’t need off64_t.
* configure.ac (gl_TYPE_OFF64_T): Define a nearly no-op.

19 months ago; * lisp/cus-edit.el (custom-save-all): Remove offensive commentary.
Eli Zaretskii [Sat, 11 May 2024 17:13:17 +0000 (20:13 +0300)]
; * lisp/cus-edit.el (custom-save-all): Remove offensive commentary.

19 months agoFix test of whether to insert lexical-binding cookies in custom files
Po Lu [Sat, 11 May 2024 14:24:23 +0000 (22:24 +0800)]
Fix test of whether to insert lexical-binding cookies in custom files

* lisp/cus-edit.el (custom-save-all): Test whether the buffer is
empty, not whether point is at EOB.

19 months ago; More coding style fixes
Po Lu [Sat, 11 May 2024 13:35:42 +0000 (21:35 +0800)]
; More coding style fixes

* src/sort.c (reverse_sortslice, tim_sort): Correct not-so
egregious misformattings.

19 months ago; Fix coding style in timsort.c
Po Lu [Sat, 11 May 2024 13:34:30 +0000 (21:34 +0800)]
; Fix coding style in timsort.c

* src/sort.c (reverse_slice, sortslice): Fix egregious coding
style inconsistencies.

19 months ago; Fix byte-compilation warnings in lua-ts-mode.el
Eli Zaretskii [Sat, 11 May 2024 10:54:35 +0000 (13:54 +0300)]
; Fix byte-compilation warnings in lua-ts-mode.el

* lisp/progmodes/lua-ts-mode.el (treesit-node-eq)
(treesit-node-prev-sibling): Declare.

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 11 May 2024 10:50:56 +0000 (06:50 -0400)]
Merge from origin/emacs-29

0ec9a02a0d5 ; Fix doc strings of two scroll-bar functions.
2f8bccf9d8c ; * doc/emacs/frames.texi (Scroll Bars): Improve formatting.
f9832e80b89 ; * lisp/textmodes/ispell.el (ispell-message): Add commen...
a7d247be90c ; * etc/PROBLEMS: Document macOS problems with Emacs.clr ...
8560ee7b5ca ; * doc/misc/auth.texi (The Unix password store): Fix var...
74c6b59af15 ; Advertise scroll bars some more
3d65d4306b9 Avoid errors in 'image-dired-tag-thumbnail'

19 months agoSupport Python 3 in 'package-test-update-archives-async'
kobarity [Thu, 9 May 2024 15:39:10 +0000 (00:39 +0900)]
Support Python 3 in 'package-test-update-archives-async'

* test/lisp/emacs-lisp/package-resources/package-test-server.py:
Support Python 3.
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives-async): Search for an executable
named "python", "python3", or "python2".  (Bug#70722)

Co-authored-by: Lin Sun <sunlin7@hotmail.com>
19 months agoFix Rmail summary by thread
Eli Zaretskii [Sat, 11 May 2024 09:16:48 +0000 (12:16 +0300)]
Fix Rmail summary by thread

* lisp/mail/rmailsum.el (rmail-summary-by-thread): Use value of
'rmail-total-messages' local to 'rmail-buffer'.  Patch by Andrea
Monaco <andrea.monaco@autistici.org>.

19 months ago; * lisp/net/dictionary.el (dictionary-default-strategy): Doc fix.
Eli Zaretskii [Sat, 11 May 2024 08:17:34 +0000 (11:17 +0300)]
; * lisp/net/dictionary.el (dictionary-default-strategy): Doc fix.

19 months agoNew Tramp method "run0"
Michael Albinus [Sat, 11 May 2024 08:03:45 +0000 (10:03 +0200)]
New Tramp method "run0"

* doc/misc/tramp.texi (Quick Start Guide, Inline methods)
(Password handling, Predefined connection information)
(Ad-hoc multi-hops): Add "run0".
(Remote processes): Mention tramp-use-connection-share.

* etc/NEWS: New Tramp method "run0".

* lisp/net/tramp.el (tramp-completion-dissect-file-name):
* lisp/net/tramp-cmds.el (tramp-list-remote-buffers):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `tramp-compat-keep-seq'.

* lisp/net/tramp-cmds.el (tramp-file-name-with-method): Add "run0".

* lisp/net/tramp-sh.el (tramp-enable-run0-method): New defun.
(tramp-sh-handle-expand-file-name): Add "run0".
(tramp-maybe-open-connection): Simplify setting timeout.

19 months agoImprove documentation of p-s-p-scroll-down-page
Po Lu [Sat, 11 May 2024 06:38:54 +0000 (14:38 +0800)]
Improve documentation of p-s-p-scroll-down-page

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Document unit in
which the height of the window is measured, and what manner of
height applies.  Reported by Eli Zaretskii <eliz@gnu.org>.

19 months agoDelete unused functions
Po Lu [Sat, 11 May 2024 06:34:32 +0000 (14:34 +0800)]
Delete unused functions

* java/org/gnu/emacs/EmacsNative.java (dup, close):

* src/android.c (dup, close): Delete functions no longer
referenced.

19 months ago; Fix doc strings of two scroll-bar functions.
Eli Zaretskii [Sat, 11 May 2024 05:29:22 +0000 (08:29 +0300)]
; Fix doc strings of two scroll-bar functions.

* lisp/scroll-bar.el (toggle-horizontal-scroll-bar): Fix typo and
wording.  (Bug#70864).
(toggle-scroll-bar): Fix wording.

19 months agoUpdate gnus-draft-check-draft-articles to use find-buffer-visiting
Eric Abrahamsen [Fri, 10 May 2024 19:38:57 +0000 (12:38 -0700)]
Update gnus-draft-check-draft-articles to use find-buffer-visiting

* lisp/gnus/gnus-draft.el (gnus-draft-check-draft-articles): Don't loop
through all the buffers; this removes the need for the `file-remote-p'
check. Also give the user some nicer feedback about what's going on.

19 months agoRemove extra message-set-auto-save-file-name call in Gnus drafts
Eric Abrahamsen [Fri, 10 May 2024 15:49:57 +0000 (08:49 -0700)]
Remove extra message-set-auto-save-file-name call in Gnus drafts

Bug#70579

* lisp/gnus/gnus-draft.el (gnus-draft-setup): This function is already
being called as part of the message-mail -> message-mode call
above. Running it twice results in a jump in assigned article numbers,
and the corresponding active value of the drafts group.

19 months agoSupport customization of sorting order for Imenu completion candidates
Juri Linkov [Fri, 10 May 2024 16:45:21 +0000 (19:45 +0300)]
Support customization of sorting order for Imenu completion candidates

* lisp/imenu.el (imenu--completion-buffer):
Set completion-extra-properties to '(:category imenu).
(imenu--flatten-index-alist): Use imenu--subalist-p to handle
newer format (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...)
as well (bug#70846).

* doc/emacs/misc.texi (DocView Navigation): Fix typo.

19 months ago; Clean up some 'require' and 'declare-function' calls in Eshell
Jim Porter [Fri, 10 May 2024 16:27:30 +0000 (09:27 -0700)]
; Clean up some 'require' and 'declare-function' calls in Eshell

* lisp/eshell/em-ls.el:
* lisp/eshell/esh-cmd.el:
* lisp/eshell/esh-mode.el:
* lisp/eshell/esh-ext.el: Remove superfluous 'declare-function' calls.

* lisp/eshell/esh-proc.el (pcomplete): Require this explicitly instead
of transitively.

19 months agoAvoid resizing mutation in subst-char-in-string
Mattias Engdegård [Fri, 10 May 2024 08:35:39 +0000 (10:35 +0200)]
Avoid resizing mutation in subst-char-in-string

* lisp/subr.el (subst-char-in-string):
Use string-replace to avoid resizing mutation and O(n^2) time.

19 months ago; * etc/NEWS: Announce user-level change in dictionary.el.
Eli Zaretskii [Fri, 10 May 2024 12:59:24 +0000 (15:59 +0300)]
; * etc/NEWS: Announce user-level change in dictionary.el.

19 months agoFix 'dictionary-tooltip-mode'
Eli Zaretskii [Fri, 10 May 2024 12:56:30 +0000 (15:56 +0300)]
Fix 'dictionary-tooltip-mode'

* lisp/tooltip.el (tooltip-event-buffer): Make sure 'posn-window'
returns a window before calling 'window-buffer'.

* lisp/net/dictionary.el (dictionary-default-dictionary)
(dictionary-tooltip-dictionary): Doc fixes.
(dictionary-tooltip-dictionary): Change default value to t, which
means the same dictionary as 'dictionary-default-dictionary'.
(dictionary-do-search): If NOMATCHING is non-nil, do not insert
anything into the current buffer, as that is unexpected when
showing definitions in tooltips.
(dictionary-word-at-mouse-event): Be defensive about the values
returned by 'tooltip-event-buffer' and 'posn-point': they can be
unexpected when the mouse pointer is on the tool bar or mode line
etc.
(dictionary-display-tooltip): Ignore errors in this function.
(dictionary-tooltip-mode): Ignore mouse-movement events on tool
bar and tab-bar.
(dictionary-dictionaries): Decode the server response to present
dictionaries in human-readable form.  Document in the doc string
the format of the return value.

19 months agoImplement dots and dashes on MS-Windows
Po Lu [Fri, 10 May 2024 08:44:35 +0000 (16:44 +0800)]
Implement dots and dashes on MS-Windows

* src/haikuterm.c (haiku_draw_dash): Correct whitespace error.

* src/w32term.c (w32_draw_dash, w32_fill_underline)
(w32_draw_glyph_string): Port display of dash and dot underline
styles from X.

19 months ago* lisp/imenu.el (imenu-flatten): New defcustom (bug#70846).
Juri Linkov [Fri, 10 May 2024 06:52:09 +0000 (09:52 +0300)]
* lisp/imenu.el (imenu-flatten): New defcustom (bug#70846).

(imenu-level-separator): Adjust the docstring.
(imenu--flatten-index-alist): New function revived
from the initial implementation of this package.
(imenu-choose-buffer-index): Use imenu--flatten-index-alist
when imenu-flatten is non-nil.
(imenu-buffer-menubar): Remove obsolete variable.

* doc/emacs/programs.texi (Imenu): Document imenu-flatten.

19 months ago; * doc/emacs/frames.texi (Scroll Bars): Improve formatting.
Eli Zaretskii [Fri, 10 May 2024 05:52:33 +0000 (08:52 +0300)]
; * doc/emacs/frames.texi (Scroll Bars): Improve formatting.

19 months ago; Remove unnecessary defvars defined in a file we already 'require'
Jim Porter [Fri, 10 May 2024 05:02:00 +0000 (22:02 -0700)]
; Remove unnecessary defvars defined in a file we already 'require'

* lisp/eshell/esh-cmd.el (eshell-output-handle, eshell-error-handle):
Remove superfluous declarations.

19 months agoRemove redundant encoding of strings in androidvfs.c
Po Lu [Fri, 10 May 2024 03:42:37 +0000 (11:42 +0800)]
Remove redundant encoding of strings in androidvfs.c

* java/org/gnu/emacs/EmacsService.java (getDocumentTrees):
Accept PROVIDER as a String.

* src/android.c (android_init_emacs_service):

* src/androidvfs.c (android_saf_root_opendir): Adjust to match.

19 months agoDocument a problem with Microsoft SwiftKey
Po Lu [Fri, 10 May 2024 03:32:42 +0000 (11:32 +0800)]
Document a problem with Microsoft SwiftKey

* etc/PROBLEMS (Runtime problems specific to Android): Document
incompatibility with Microsoft Swiftkey.

19 months agoFix bug#70856
Po Lu [Fri, 10 May 2024 03:01:29 +0000 (11:01 +0800)]
Fix bug#70856

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down)
(pixel-scroll-precision-scroll-up): Apply finer threshold for
the minimum unit of scrolling.
(pixel-scroll-precision-scroll-down-page): Document true
restrictions on DELTA.  (bug#70856)

19 months agoFix earlier change to content URI resolution on Android
Po Lu [Fri, 10 May 2024 01:05:54 +0000 (09:05 +0800)]
Fix earlier change to content URI resolution on Android

* java/org/gnu/emacs/EmacsService.java (openContentUri): Return
-1 if fd be NULL.

* src/androidvfs.c (android_authority_open): Detect
SecurityException and suchlike.
(android_vfs_init): Initialize exception classes on Android 4.4.

19 months agoDon't limit gnus thread searches to a single message
Andrew G Cohen [Sun, 7 Apr 2024 23:36:17 +0000 (07:36 +0800)]
Don't limit gnus thread searches to a single message

* lisp/gnus/gnus-search.el (gnus-search-single-p): Searches for a
single message id finish after finding this one message; thread searches
continue until all messages are found.

19 months agoImprove doc-type determination in doc-view
Andrew G Cohen [Fri, 6 Oct 2023 06:34:28 +0000 (14:34 +0800)]
Improve doc-type determination in doc-view

* lisp/doc-view.el (doc-view-set-doc-type): If buffer-file-name is not
set try the buffer-name to identify the doc type.

19 months agoFind correct parent for articles in gnus
Andrew G Cohen [Sat, 27 Apr 2024 01:10:44 +0000 (09:10 +0800)]
Find correct parent for articles in gnus

* lisp/gnus/gnus-sum.el (gnus-summary-refer-parent-article): When an
article's headers have been altered, use the altered headers to find the
parent.

19 months ago; Provide documentation example for gnus-alter-header-function
Andrew G Cohen [Thu, 9 May 2024 08:44:21 +0000 (16:44 +0800)]
; Provide documentation example for gnus-alter-header-function

* doc/misc/gnus.texi (Low-Level Threading): Provide an example of using
gnus-alter-header-function to remove unwanted items in References
header.

19 months ago; * lisp/mail/smtpmail.el (smtpmail-try-auth-method): quote symbol.
Andrew G Cohen [Fri, 10 May 2024 00:01:15 +0000 (08:01 +0800)]
; * lisp/mail/smtpmail.el (smtpmail-try-auth-method): quote symbol.

19 months ago; Fix an edge case with Eshell globs when the directory part is quoted
Jim Porter [Fri, 10 May 2024 00:15:14 +0000 (17:15 -0700)]
; Fix an edge case with Eshell globs when the directory part is quoted

* lisp/eshell/esh-util.el (eshell-split-filename): Escaping shouldn't
matter for splitting the name (no other shells handle it like this).

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/convert/quoted-start-directory): New test.

19 months ago; Reference the xoauth2 method in nnimap-authenticator docstring
Jakub Ječmínek [Tue, 19 Mar 2024 20:34:57 +0000 (21:34 +0100)]
; Reference the xoauth2 method in nnimap-authenticator docstring

* lisp/gnus/nnimap.el (nnimap-authenticator): Update variable
documentation to include xoauth2 method.

19 months agoImprove static checking when using upcoming GCC 13.3
Paul Eggert [Thu, 9 May 2024 19:24:18 +0000 (12:24 -0700)]
Improve static checking when using upcoming GCC 13.3

* src/lisp.h: In GCC 13.3 and later, do not ignore
-Wanalyzer-allocation-size.
* src/marker.c: In GCC 13.3 and later, do not ignore
-Wanalyzer-deref-before-check.

19 months ago; * lisp/textmodes/ispell.el (ispell-message): Add commentary.
Eli Zaretskii [Thu, 9 May 2024 17:44:52 +0000 (20:44 +0300)]
; * lisp/textmodes/ispell.el (ispell-message): Add commentary.

19 months ago; Fix example code in nnfeed
Daniel Semyonov [Mon, 29 Apr 2024 20:40:50 +0000 (23:40 +0300)]
; Fix example code in nnfeed

* lisp/gnus/nnfeed.el: Backend declaration example was incorrect.

19 months agoTramp code cleanup
Michael Albinus [Thu, 9 May 2024 08:38:37 +0000 (10:38 +0200)]
Tramp code cleanup

* lisp/net/tramp-compat.el (tramp-compat-seq-keep): New defalias.

* lisp/net/tramp.el (tramp-enable-method):
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
* lisp/net/tramp-cache.el (tramp-list-connections):
* lisp/net/tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers):
* lisp/net/tramp-container.el (tramp-container--completion-function)
(tramp-toolbox--completion-function)
(tramp-flatpak--completion-function)
(tramp-apptainer--completion-function):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Use it.

19 months agoFix 'srecode-all-template-hash' always returning nil
Charalampos Mitrodimas [Sat, 4 May 2024 19:45:15 +0000 (22:45 +0300)]
Fix 'srecode-all-template-hash' always returning nil

The issue was that the function always returned nil because
the closing parentheses were in the wrong position.  This
meant that the function couldn't give back the data it was
supposed to, making the whole srecode system not work
properly.
By moving the parentheses to the correct place, the function
now returns a hash table with all the templates it finds.
* lisp/cedet/srecode/find.el (srecode-all-template-hash):
Adjusted the position of closing parentheses so that the mhash
variable is returned correctly.  (Bug#70765)

Copyright-paperwork-exempt: yes

19 months ago; Check process in 'python-shell-completion-at-point'
Lin Sun [Wed, 1 May 2024 06:55:31 +0000 (06:55 +0000)]
; Check process in 'python-shell-completion-at-point'

* lisp/progmodes/python.el (python-shell-completion-at-point):
Check the PROCESS argument at the beginning of the function.
(Bug#70707)

19 months agoAdd bitwise assignment operators to 'python--treesit-operators'
Noah Peart [Tue, 30 Apr 2024 10:19:11 +0000 (03:19 -0700)]
Add bitwise assignment operators to 'python--treesit-operators'

* lisp/progmodes/python.el (python--treesit-operators): Add
bitwise assignment operators.  (Bug#70666)

19 months agoIntern additional symbols ahead-of-time
Po Lu [Thu, 9 May 2024 07:02:06 +0000 (15:02 +0800)]
Intern additional symbols ahead-of-time

* src/gnutls.c (Fgnutls_available_p, syms_of_gnutls):

* src/minibuf.c (Fread_buffer, syms_of_minibuf): Define and
intern symbols overlooked in the previous change.

19 months agoReplace calls to intern with a constant string with DEFSYMs
Po Lu [Thu, 9 May 2024 06:58:45 +0000 (14:58 +0800)]
Replace calls to intern with a constant string with DEFSYMs

* src/alloc.c (display_malloc_warning, syms_of_alloc):

* src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables)
(Frename_buffer, Fkill_buffer, Fset_buffer_major_mode)
(Fset_buffer_multibyte, syms_of_buffer):

* src/callint.c (read_file_name, Fcall_interactively)
(syms_of_callint):

* src/callproc.c (call_process, create_temp_file)
(syms_of_callproc):

* src/charset.c (Fdefine_charset_internal, syms_of_charset):

* src/cmds.c (internal_self_insert, syms_of_cmds):

* src/coding.c (record_conversion_result)
(Fdefine_coding_system_internal, syms_of_coding):

* src/dbusbind.c (xd_signature, Fdbus_message_internal)
(syms_of_dbusbind):

* src/dispnew.c (init_faces_initial):

* src/doc.c (Fsnarf_documentation, syms_of_doc):

* src/dosfns.c (system_process_attributes, syms_of_dosfns):

* src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path)
(syms_of_emacs):

* src/eval.c (call_debugger, Fdefvaralias, syms_of_eval):

* src/fileio.c (barf_or_query_if_file_exists)
(Finsert_file_contents, auto_save_error, Fdo_auto_save)
(syms_of_fileio):

* src/filelock.c (lock_file_1, syms_of_filelock):

* src/fontset.c (fontset_from_font, syms_of_fontset):

* src/frame.c (make_frame_without_minibuffer, syms_of_frame):

* src/gnutls.c (emacs_gnutls_certificate_details)
(Fgnutls_peer_status_warning_describe, Fgnutls_peer_status)
(gnutls_verify_boot, syms_of_gnutls):

* src/gtkutil.c (style_changed_cb, find_rtl_image):

* src/image.c (imagemagick_filename_hint, gs_load)
(syms_of_image):

* src/keyboard.c (command_loop_1, read_char, timer_start_idle)
(read_char_minibuf_menu_prompt, Fsuspend_emacs)
(syms_of_keyboard):

* src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector)
(describe_vector, syms_of_keymap):

* src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread):

* src/minibuf.c (Fabort_minibuffers, Fread_buffer)
(Fcompleting_read, syms_of_minibuf):

* src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos):

* src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class)
(Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame)
(x_hide_tip, Fx_show_tip, syms_of_nsfns):

* src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity)
(syms_of_nsfont):

* src/pdumper.c (Fdump_emacs_portable):

* src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame)
(Fx_show_tip, syms_of_pgtkfns):

* src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames):

* src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty)
(Fresume_tty, tty_menu_activate, syms_of_term):

* src/terminal.c (create_terminal, syms_of_terminal):

* src/w32fns.c (Fx_display_backing_store)
(Fx_display_visual_class, Fset_message_beep, Fx_open_connection)
(Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash)
(Fw32_toggle_lock_key, syms_of_w32fns):

* src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font):

* src/w32term.c (w32_bitmap_icon, syms_of_w32term):

* src/xdisp.c (message_dolog, define_frame_cursor1)
(syms_of_xdisp):

* src/xfaces.c (tty_lookup_color, syms_of_xfaces):

* src/xml.c (make_dom, syms_of_xml):

* src/xterm.c (syms_of_xterm):

* src/xwidget.c (store_xwidget_download_callback_event)
(store_xwidget_js_callback_event, syms_of_xwidget): Define
symbols for symbols interned with `intern' from a constant
string, delete duplicate DEFSYM directives, and substitute them
for such calls to intern.  This excludes only those symbols
which are interned and referenced only once during Emacs's
initialization, the timing of whose interning is
inconsequential, and symbols in w32.c, which would need to be
transferred to a new syms_of_w32 function that I cannot test.

19 months ago* lisp/treesit.el (treesit-outline-search): Handle bobp specially.
Juri Linkov [Thu, 9 May 2024 06:28:50 +0000 (09:28 +0300)]
* lisp/treesit.el (treesit-outline-search): Handle bobp specially.

At the beginning of the buffer call 'treesit-outline-search'
recursively with the `looking-at' argument set to t, since
`treesit-navigate-thing' can't find a thing at bobp (bug#70789).

19 months ago; * etc/PROBLEMS: Document macOS problems with Emacs.clr (bug#70836).
Eli Zaretskii [Thu, 9 May 2024 06:05:22 +0000 (09:05 +0300)]
; * etc/PROBLEMS: Document macOS problems with Emacs.clr (bug#70836).

19 months agoFontify for_statement variable in python-ts-mode (bug#70718)
Noah Peart [Thu, 2 May 2024 13:58:34 +0000 (06:58 -0700)]
Fontify for_statement variable in python-ts-mode (bug#70718)

* lisp/progmodes/python.el (python--treesit-settings): Add
font-lock query for for_statement variable in assignment feature.

19 months agoFontify namespace in c++-ts-mode
Yuan Fu [Thu, 9 May 2024 04:25:40 +0000 (21:25 -0700)]
Fontify namespace in c++-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add a
rule for namespace.

19 months agoFix #if defined directive fontification in c-ts-mode
Yuan Fu [Thu, 9 May 2024 03:50:24 +0000 (20:50 -0700)]
Fix #if defined directive fontification in c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fontify
each part separately so the identifier isn't overriden.

19 months agoImprove indentation in 'lua-ts-mode' (bug#70785)
john muhl [Fri, 3 May 2024 20:51:01 +0000 (15:51 -0500)]
Improve indentation in 'lua-ts-mode' (bug#70785)

* lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
- Ignore comments when aligning arguments, parameters and fields.
- Apply simpler rules to simpler usage of anonymous functions.
- Better handling of table as a function argument.
(lua-ts--comment-first-sibling-matcher):
(lua-ts--first-real-sibling-anchor):
(lua-ts--last-arg-function-call-matcher):
(lua-ts--top-level-function-call-matcher): New function.
(lua-ts--g-parent):
(lua-ts--g-g-parent): New function.
(lua-ts--g-g-g-parent): Use it.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Add tests.

19 months ago; Quietly skip 'lua-ts-mode' tests (bug#70786)
john muhl [Sat, 27 Apr 2024 23:52:41 +0000 (18:52 -0500)]
; Quietly skip 'lua-ts-mode' tests (bug#70786)

* test/lisp/align-tests.el (align-lua):
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-indentation):
(lua-ts-test-movement):
(lua-ts-test-font-lock):
(lua-ts-test-which-function): Suppress warnings when the grammar is not
installed.

19 months agoFontify doc comment in c-ts-mode with doc-face
Yuan Fu [Thu, 9 May 2024 03:27:12 +0000 (20:27 -0700)]
Fontify doc comment in c-ts-mode with doc-face

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add
rule for /** comments.

19 months agoxref--collect-matches: Fix the application of syntax-propertize
Dmitry Gutov [Thu, 9 May 2024 02:57:07 +0000 (05:57 +0300)]
xref--collect-matches: Fix the application of syntax-propertize

* lisp/progmodes/xref.el (xref--collect-matches):
Add syntax-ppss-flush-cache call when needed (bug#53749).

19 months agochoose-completion: Retain the suffix after completion boundary
Dmitry Gutov [Thu, 9 May 2024 02:30:32 +0000 (05:30 +0300)]
choose-completion: Retain the suffix after completion boundary

* lisp/minibuffer.el (completion-base-suffix):
Remove as not optimal after all (bug#48356).
(completion--replace): Use insert-before-markers-and-inherit.
(minibuffer-completion-help): Don't set completion-base-affixes,
implement the same logic more optimally by local search and
querying for field boundaries.  Also fix the problem with
completion table, predicate and extra-props being looked up in the
wrong buffer.
(minibuffer-next-completion, minibuffer-choose-completion):
Don't bind completion-use-base-affixes anymore.

* lisp/simple.el (completion-base-affixes)
(completion-use-base-affixes): Remove.
(completion-list-insert-choice-function):
Don't pass them through anymore.

19 months agoDon't report erroneous /content directory on Android 4.3 and earlier
Po Lu [Thu, 9 May 2024 01:00:02 +0000 (09:00 +0800)]
Don't report erroneous /content directory on Android 4.3 and earlier

* src/androidvfs.c (android_content_opendir): Skip two, not one,
elements on Android <= 4.4.

19 months agoPrefer erc--skip property to erc-track--skipped-msgs
F. Jason Park [Tue, 7 May 2024 04:59:48 +0000 (21:59 -0700)]
Prefer erc--skip property to erc-track--skipped-msgs

* lisp/erc/erc-stamp.el (erc-add-timestamp): Honor an overriding
`erc--ts' "msg prop".
(erc-stamp--defer-date-insertion-on-post-modify): Add `erc--skip'
for the `track' module.
* lisp/erc/erc-track.el (erc-track--skipped-msgs): Remove unused
variable.  Originally added as part of bug#60936.
(erc-track-modified-channels): Rely on the `erc--skip' "msg prop"
instead of the now defunct `erc-track--skipped-msgs' variable for
detecting requests to omit `track' mode-line updates during
`erc-display-message'.

19 months agoAvoid shared-ref read syntax in ERC message catalogs
F. Jason Park [Wed, 8 May 2024 22:26:29 +0000 (15:26 -0700)]
Avoid shared-ref read syntax in ERC message catalogs

* lisp/erc/erc.el (erc--message-speaker-ctcp-action-input)
(erc--message-speaker-ctcp-action-statusmsg-input): Don't use
shared/circular references, like #1=foo ... #1#, in literal strings
because it triggers CI validation failures.  These message-format
definitions were originally introduced as part of bug#67677.

19 months agoAdd format-catalog entry for unknown chan mode in ERC
F. Jason Park [Fri, 3 May 2024 03:16:07 +0000 (20:16 -0700)]
Add format-catalog entry for unknown chan mode in ERC

* lisp/erc/erc.el (erc--process-channel-modes): Use format spec
catalog entry, and convert char to string.
(erc-message-english-channel-mode-unknown): New variable.
;; * test/lisp/erc/erc-scenarios-base-renick.el
;; (erc-scenarios-base-renick-queries-solo): Adjust timeout.
;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic):
;; Adjust timeouts.
;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic):
;; Adjust timeouts.
;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts.
;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout.
;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust
;; timeout.

19 months ago; * doc/misc/auth.texi (The Unix password store): Fix variable name.
Illia Ostapyshyn [Fri, 3 May 2024 17:27:15 +0000 (19:27 +0200)]
; * doc/misc/auth.texi (The Unix password store): Fix variable name.

(Bug#70767)

Copyright-paperwork-exempt: yes

19 months ago(repeat-echo-message-string): Reuse 'r-m-c' prompt formatting
Eshel Yaron [Wed, 8 May 2024 16:05:20 +0000 (18:05 +0200)]
(repeat-echo-message-string): Reuse 'r-m-c' prompt formatting

Now that 'repeat-mode' supports adding labels ("hints") next to
available keys, its prompt is very similar in its structure to
what we have in 'read-multiple-choice' (a list of labeled keys).
To make the two interfaces more consistent, reuse the prompt
formatting that 'read-multiple-choice' employs.

See short discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00467.html

* lisp/repeat.el (repeat-echo-message-string): Use
'rmc--add-key-description' to format keys and their labels.

19 months agoDon't mutate strings in cl-substitute
Mattias Engdegård [Wed, 8 May 2024 10:13:48 +0000 (12:13 +0200)]
Don't mutate strings in cl-substitute

This fixes cl-substitute, cl-substitute-if, cl-substitute-if-not,
cl-nsubstitute, cl-nsubstitute-if and cl-nsubstitute-if-not,
when called with a string sequence argument.

* lisp/emacs-lisp/cl-seq.el (cl-nsubstitute):
Avoid running in O(n^2) time and make future-safe.

19 months ago; Advertise scroll bars some more
Eli Zaretskii [Wed, 8 May 2024 13:44:05 +0000 (16:44 +0300)]
; Advertise scroll bars some more

* doc/emacs/display.texi (Scrolling, Horizontal Scrolling):
Mention the scroll bars as alternative means of scrolling.

19 months agoAvoid errors in 'image-dired-tag-thumbnail'
Eli Zaretskii [Wed, 8 May 2024 13:13:27 +0000 (16:13 +0300)]
Avoid errors in 'image-dired-tag-thumbnail'

* lisp/image/image-dired.el (image-dired-tag-thumbnail)
(image-dired-tag-thumbnail-remove): Move here from
image-dired-tags.el.  (Bug#70821)

19 months agoCorrect documentation relating to tool-bar-position
Po Lu [Wed, 8 May 2024 12:25:47 +0000 (20:25 +0800)]
Correct documentation relating to tool-bar-position

* doc/emacs/android.texi (Android Windowing): Don't claim that
tool-bar-position is unsupported on Android.

* lisp/tool-bar.el (tool-bar-position): Update doc string to
mention that bottom is supported on all systems but Nextstep.

19 months agoCorrect earlier change to map-ynp
Po Lu [Wed, 8 May 2024 12:22:29 +0000 (20:22 +0800)]
Correct earlier change to map-ynp

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't call
set-text-conversion-style if not bound.

19 months agoMore Tramp optional methods
Michael Albinus [Wed, 8 May 2024 11:44:15 +0000 (13:44 +0200)]
More Tramp optional methods

* doc/misc/tramp.texi (Inline methods) <krlogin, ksu>:
(External methods) <fcp, nc>: These are optional methods.

* etc/NEWS: Mention more optional Tramp methods.

* lisp/net/tramp-androidsu.el (tramp-enable-androidsu-method):
Use proper regexp for `tramp-default-user-alist'.

* lisp/net/tramp-sh.el (tramp-enable-nc-method)
(tramp-enable-ksu-method, tramp-enable-krlogin-method)
(tramp-enable-fcp-method): New defuns.  Move respective
configurations there.

* lisp/net/tramp.el (tramp-enable-method): Implement completion
for interactive use.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults)
(tramp-test03-file-name-host-rules): Extend tests.

19 months agoFix hang after failed yank-media on Android
Po Lu [Wed, 8 May 2024 08:03:49 +0000 (16:03 +0800)]
Fix hang after failed yank-media on Android

* java/org/gnu/emacs/EmacsClipboard.java (getClipboardTargets)
(getClipboardData):

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardTargets, getClipboardData):

* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(getClipboardTargets, getClipboardData): Return string data as
Strings rather than byte arrays.

* src/androidselect.c (android_init_emacs_clipboard)
(Fandroid_get_clipboard_targets): Adjust to match.
(extract_fd_offsets): Remove duplicated semicolon.
(Fandroid_get_clipboard_data): Call unblock_input before
returning if extract_fd_offsets fails.

19 months agoFix last change in tramp-androidsu.el
Michael Albinus [Tue, 7 May 2024 17:44:19 +0000 (19:44 +0200)]
Fix last change in tramp-androidsu.el

19 months ago; xref-matches-in-files: Fix the previous change (bug#70813)
Dmitry Gutov [Tue, 7 May 2024 16:09:28 +0000 (19:09 +0300)]
; xref-matches-in-files: Fix the previous change (bug#70813)

19 months ago; * doc/misc/reftex.texi (Options - Creating Citations): Minor fix.
Arash Esbati [Tue, 7 May 2024 14:21:24 +0000 (16:21 +0200)]
; * doc/misc/reftex.texi (Options - Creating Citations): Minor fix.

19 months agoSupport biblatex field in `reftex-cite-format'
Arash Esbati [Tue, 7 May 2024 13:50:03 +0000 (15:50 +0200)]
Support biblatex field in `reftex-cite-format'

* lisp/textmodes/reftex-cite.el (reftex-format-citation):
Recognize the alternative "journaltitle" field which is preferred
by biblatex.  (bug#38762)

* test/lisp/textmodes/reftex-tests.el
(reftex-format-citation-test): Adjust test.

19 months ago; * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Add commentary.
Eli Zaretskii [Tue, 7 May 2024 12:00:31 +0000 (15:00 +0300)]
; * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Add commentary.

19 months ago; * lib-src/emacsclient.c (local_sockname): Whitespace.
Eli Zaretskii [Tue, 7 May 2024 11:24:40 +0000 (14:24 +0300)]
; * lib-src/emacsclient.c (local_sockname): Whitespace.

19 months ago* etc/NEWS: Elaborate `type` declare entry and regroup.
Mattias Engdegård [Tue, 7 May 2024 10:17:39 +0000 (12:17 +0200)]
* etc/NEWS: Elaborate `type` declare entry and regroup.

19 months agoUse clear-string instead of fillarray to clobber secret strings
Mattias Engdegård [Tue, 7 May 2024 07:19:09 +0000 (09:19 +0200)]
Use clear-string instead of fillarray to clobber secret strings

* lisp/net/sasl-cram.el (sasl-cram-md5-response):
* lisp/net/sasl-digest.el (sasl-digest-md5-response-value):
* lisp/net/sasl.el (sasl-plain-response):
`fillarray` signals an error for strings that contain multibyte chars;
`clear-string` always works for this purpose.

19 months agoDo not report text conversion information from tooltip frames
Po Lu [Tue, 7 May 2024 08:50:14 +0000 (16:50 +0800)]
Do not report text conversion information from tooltip frames

* src/xdisp.c (mark_window_display_accurate_1): Skip
report_point_change if FRAME_WINDOW_P (WINDOW_XFRAME (w)).

19 months agoAdd Tramp method "apptainer"
Michael Albinus [Tue, 7 May 2024 07:56:05 +0000 (09:56 +0200)]
Add Tramp method "apptainer"

* doc/misc/tramp.texi (Top, Configuration): Add "Optional methods".
(Optional methods): New section.
(Inline methods) <androidsu, toolbox, flatpak>: These are optional
methods.
(Inline methods) <apptainer>: Add.

* etc/NEWS: New Tramp method "apptainer".
Some Tramp methods are optional.
Fix typos.

* lisp/net/tramp-androidsu.el (tramp-enable-androidsu-method):
New defun.  Call it when `system-type' is `android'.

* lisp/net/tramp-container.el (tramp-apptainer-program): New defcustom.
(tramp-apptainer-method): New defconst.
(tramp-apptainer--completion-function)
(tramp-enable-toolbox-method, tramp-enable-flatpak-method)
(tramp-enable-apptainer-method): New defuns.

* lisp/net/tramp.el (tramp-enable-method): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "apptainer".
(tramp--test-supports-processes-p): Extend function.

19 months agoSimplify Emacs server detection on Android
Po Lu [Tue, 7 May 2024 01:21:59 +0000 (09:21 +0800)]
Simplify Emacs server detection on Android

* lib-src/emacsclient.c (set_local_socket) [HAVE_ANDROID]: Do
not consider XDG_RUNTIME_DIR or test the ownership or
accessibility of TMPDIR.

19 months agoDisable text-conversion in map-ynp
Po Lu [Tue, 7 May 2024 01:02:00 +0000 (09:02 +0800)]
Disable text-conversion in map-ynp

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Bind
overriding-text-conversion-style to nil around read-event and
arrange that the input method be reset.