1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 15:11:30 -08:00
Commit graph

173671 commits

Author SHA1 Message Date
Mattias Engdegård
38091e43be 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.
2024-05-12 14:58:38 +02:00
Po Lu
86d196c71d 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.
2024-05-12 20:24:19 +08:00
Po Lu
ea98a6af2f 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.
2024-05-12 15:49:53 +08:00
Po Lu
af6df8e045 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.
2024-05-12 15:49:53 +08:00
Eli Zaretskii
5b9995052d ; Fix a recent change in fns.c
* src/fns.c (value_cmp): Use 'subprocesses', not 'MSDOS', as
conditional for process-related functionalities.
2024-05-12 09:51:51 +03:00
Po Lu
67b1da215c 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.
2024-05-12 13:27:43 +08:00
Po Lu
26a407cebe * oldXMenu/Activate.c (x_menu_grab_keyboard): Declare static. 2024-05-12 13:21:09 +08:00
Po Lu
ed03b7ab9f Fix the DJGPP build
* src/fns.c (value_cmp) [MSDOS]: Consider processes unordered
on DOS.
2024-05-12 10:38:26 +08:00
Po Lu
41596bd711 * src/keyboard.c (lispy_function_keys): Define as static on Android. 2024-05-12 10:18:02 +08:00
Po Lu
15fd1e2cb6 ; Update last change
* msdos/sedlibmk.inp (STDDEF_NOT_IDEMPOTENT): Define to 1.
2024-05-12 10:16:56 +08:00
Po Lu
47a0fc91df Fix the DJGPP build
* msdos/sedlibmk.inp (HAVE_STRTOF, NULLPTR_T_NEEDS_STDDEF):
Define to 1.
2024-05-12 10:13:41 +08:00
Paul Eggert
99a5c75f3b 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.
2024-05-11 18:46:27 -07:00
Paul Eggert
7ae091d933 Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
Paul Eggert
2e13c2adba 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.
2024-05-11 18:46:25 -07:00
Eli Zaretskii
dcb6a9ebcb ; * lisp/cus-edit.el (custom-save-all): Remove offensive commentary. 2024-05-11 20:13:17 +03:00
Po Lu
6d4179957a 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.
2024-05-11 22:24:23 +08:00
Po Lu
b990c37b9a ; More coding style fixes
* src/sort.c (reverse_sortslice, tim_sort): Correct not-so
egregious misformattings.
2024-05-11 21:35:42 +08:00
Po Lu
f43f7d7a43 ; Fix coding style in timsort.c
* src/sort.c (reverse_slice, sortslice): Fix egregious coding
style inconsistencies.
2024-05-11 21:34:30 +08:00
Eli Zaretskii
733ff78581 ; Fix byte-compilation warnings in lua-ts-mode.el
* lisp/progmodes/lua-ts-mode.el (treesit-node-eq)
(treesit-node-prev-sibling): Declare.
2024-05-11 13:54:35 +03:00
Eli Zaretskii
48c9285c19 Merge from origin/emacs-29
0ec9a02a0d ; Fix doc strings of two scroll-bar functions.
2f8bccf9d8 ; * doc/emacs/frames.texi (Scroll Bars): Improve formatting.
f9832e80b8 ; * lisp/textmodes/ispell.el (ispell-message): Add commen...
a7d247be90 ; * etc/PROBLEMS: Document macOS problems with Emacs.clr ...
8560ee7b5c ; * doc/misc/auth.texi (The Unix password store): Fix var...
74c6b59af1 ; Advertise scroll bars some more
3d65d4306b Avoid errors in 'image-dired-tag-thumbnail'
2024-05-11 06:50:56 -04:00
kobarity
6380806196 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>
2024-05-11 13:06:08 +03:00
Eli Zaretskii
5fdc6d8357 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>.
2024-05-11 12:16:48 +03:00
Eli Zaretskii
3eca0bc307 ; * lisp/net/dictionary.el (dictionary-default-strategy): Doc fix. 2024-05-11 11:17:34 +03:00
Michael Albinus
b43c31d2f5 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.
2024-05-11 10:03:45 +02:00
Po Lu
1c4b1ce8fa 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>.
2024-05-11 14:38:54 +08:00
Po Lu
3ff83246c8 Delete unused functions
* java/org/gnu/emacs/EmacsNative.java (dup, close):

* src/android.c (dup, close): Delete functions no longer
referenced.
2024-05-11 14:34:32 +08:00
Eli Zaretskii
0ec9a02a0d ; 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.
2024-05-11 08:29:22 +03:00
Eric Abrahamsen
41bfca0005 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.
2024-05-10 12:38:57 -07:00
Eric Abrahamsen
b1e94b7bd3 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.
2024-05-10 10:29:00 -07:00
Juri Linkov
5d8c2bad21 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.
2024-05-10 19:48:00 +03:00
Jim Porter
ffc70962ca ; 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.
2024-05-10 09:27:30 -07:00
Mattias Engdegård
184d6e8c02 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.
2024-05-10 15:45:15 +02:00
Eli Zaretskii
78761d699e ; * etc/NEWS: Announce user-level change in dictionary.el. 2024-05-10 15:59:24 +03:00
Eli Zaretskii
3129fed4be 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.
2024-05-10 15:56:30 +03:00
Po Lu
0f67ddd8d9 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.
2024-05-10 16:45:33 +08:00
Juri Linkov
4306aba2d0 * 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.
2024-05-10 09:52:09 +03:00
Eli Zaretskii
2f8bccf9d8 ; * doc/emacs/frames.texi (Scroll Bars): Improve formatting. 2024-05-10 08:52:33 +03:00
Jim Porter
33878f29d1 ; Remove unnecessary defvars defined in a file we already 'require'
* lisp/eshell/esh-cmd.el (eshell-output-handle, eshell-error-handle):
Remove superfluous declarations.
2024-05-09 22:02:00 -07:00
Po Lu
ea2b251ab2 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.
2024-05-10 11:42:37 +08:00
Po Lu
dc5390d06a Document a problem with Microsoft SwiftKey
* etc/PROBLEMS (Runtime problems specific to Android): Document
incompatibility with Microsoft Swiftkey.
2024-05-10 11:32:42 +08:00
Po Lu
671c9e08b2 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)
2024-05-10 11:01:29 +08:00
Po Lu
c900c707e8 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.
2024-05-10 09:05:54 +08:00
Andrew G Cohen
d335f28aa9 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.
2024-05-10 08:39:35 +08:00
Andrew G Cohen
006d5b70f3 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.
2024-05-10 08:25:48 +08:00
Andrew G Cohen
e29eb0e0f1 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.
2024-05-10 08:25:48 +08:00
Andrew G Cohen
1b8613063c ; 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.
2024-05-10 08:25:48 +08:00
Andrew G Cohen
082666e528 ; * lisp/mail/smtpmail.el (smtpmail-try-auth-method): quote symbol. 2024-05-10 08:25:48 +08:00
Jim Porter
42c0686d61 ; 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.
2024-05-09 17:15:14 -07:00
Jakub Ječmínek
e2e8c892ce ; Reference the xoauth2 method in nnimap-authenticator docstring
* lisp/gnus/nnimap.el (nnimap-authenticator): Update variable
documentation to include xoauth2 method.
2024-05-09 17:02:18 -07:00
Paul Eggert
fd333fd214 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.
2024-05-09 12:24:53 -07:00