1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
Commit graph

172170 commits

Author SHA1 Message Date
Basil L. Contovounesios
af27ecbf15 ; Tweak last docstring addition in lisp/imenu.el. 2024-05-13 09:58:50 +02:00
Michael Albinus
af526f8856 Fix bug#70900
* lisp/net/tramp.el (tramp-handle-unlock-file): Be quiet if user
isn't interested in lock files.  Bug#70900
2024-05-13 09:23:58 +02:00
Michael Albinus
66a12698ab Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2024-05-13 09:23:32 +02:00
Juri Linkov
431f8ff1e3 * lisp/imenu.el: Support more values for imenu-flatten (bug#70846)
(imenu-flatten): Change type boolean to choice
of more values for prefix/suffix section names.
(imenu--completion-buffer): Add :annotation-function if
'imenu-flatten' is 'annotation'.
(imenu--flatten-index-alist): Put property 'imenu-section' if
'imenu-flatten' is 'annotation'.
2024-05-13 09:59:07 +03:00
Po Lu
9443f8145e Communicate frame titles to the window manager on Android
* java/org/gnu/emacs/EmacsActivity.java (detachWindow)
(attachWindow): Call updateWmName.
(updateWmName): New function; transfer wm name from the window
attached to the task's description.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
<wmName>: New field.
(setWmName): New function.

* src/android.c (android_init_emacs_window): Link to new
function.
(android_set_wm_name): New function.

* src/android.h (struct android_emacs_service): Delete unused
entries.

* src/androidfns.c (android_set_name_internal, android_set_name)
(android_implicitly_set_name, android_explicitly_set_name)
(android_set_title): Port from X.

* src/androidterm.c (android_term_init): Compute default frame
title.

* src/androidterm.h (struct android_display_info) <x_id_name>:
New field.
2024-05-13 14:42:35 +08:00
Michael Albinus
41ec1d7960 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2024-05-13 07:24:30 +02:00
Dmitry Gutov
f560e75933 ruby-rubocop-use-bundler: New user option
* lisp/progmodes/ruby-mode.el (ruby-rubocop-use-bundler):
New user option.
(ruby-flymake-rubocop--use-bundler-p): Use it.

* etc/NEWS: Mention it.
2024-05-13 05:37:05 +03:00
Po Lu
ad588f8131 ; * src/epaths.in: Declare and use android_game_path. 2024-05-13 08:26:04 +08:00
Po Lu
b86359d4ab 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.
2024-05-13 08:25:39 +08:00
Dmitry Gutov
b20d4ab374 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.
2024-05-12 20:56:55 +03:00
Michael Albinus
e53e8b4cf4 Add Tramp method "nspawn"
* doc/misc/tramp.texi: Adapt some markups.
(Inline methods) <nspawn>: Add.
(Default Host): Mention default host for "nspawn".
(Customizing Methods): Remove tramp-nspawn.
(Password handling): Add "nspawn".

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

* lisp/net/tramp-compat.el (tramp-nspawn): Warn, if that package is used.

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

* lisp/net/tramp.el (tramp-local-host-regexp): Add OpenSUSE host names.
2024-05-12 19:40:08 +02:00
Dmitry Gutov
2c759b9ce6 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).
2024-05-12 19:02:36 +03:00
Po Lu
6e8bee27a5 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.
2024-05-12 21:43:58 +08:00
Mattias Engdegård
9d7b22fcb4 Revert "Avoid resizing mutation in subst-char-in-string"
This reverts commit 184d6e8c02.

It wasn't quite correct: the path through `string-replace` would not
preserve text properties in the input string, which broke Gnus.
2024-05-12 15:18:25 +02:00
Mattias Engdegård
9365feadcc 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.
2024-05-12 15:04:47 +02:00
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