]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 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.

(cherry picked from commit 78761d699eed9e05bc4007927e63246c77c70ceb)

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

(cherry picked from commit 3129fed4bec1137b7bb377594766b61ee76cd268)

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

(cherry picked from commit 0f67ddd8d9e855ce0b9c17a4a1410dbd40318055)

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

(cherry picked from commit 4306aba2d0447fd79c0b749a984ccd7bdbc92361)

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

(cherry picked from commit 33878f29d1dee4aa1c7d0f30ed57e52138aa566b)

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

(cherry picked from commit ea2b251ab2b2bc9a3d6f52a22408655be20de266)

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

(cherry picked from commit dc5390d06a65f4d481b8bb20da4f6715c2079ea6)

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

(cherry picked from commit 671c9e08b2286d8c32ac6ca00eadc4c8d5e1d5e4)

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

(cherry picked from commit c900c707e8f3075dfe57c39a8a6363ba4575035f)

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

(cherry picked from commit d335f28aa9bfb85d0e35b838ca867d97ebe5b974)

11 months ago; Skip commit 006d5b70f343d95c7154632a2b59056d940018d5
Eshel Yaron [Fri, 10 May 2024 13:40:22 +0000 (15:40 +0200)]
; Skip commit 006d5b70f343d95c7154632a2b59056d940018d5

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

(cherry picked from commit e29eb0e0f18d7b1e4724c1bb26ff9718fe08548b)

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

(cherry picked from commit 1b8613063cf6a3b9a1f484e1179877e36ba4b5e0)

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

(cherry picked from commit 082666e528646aa9a299bd77854305c9b8231015)

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

(cherry picked from commit 42c0686d6180a7ca1b89f7bde2f9fd17d6a67217)

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

(cherry picked from commit e2e8c892ceaf27dcde9049f4a757d8fa853fe54a)

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

(cherry picked from commit fd333fd214f8e0740a4ec51705a32ed6cca93c57)

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

(cherry picked from commit e8ac15500424ebf40739422f40d966dc067f42df)

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

(cherry picked from commit 04363f9924c0f63d28f789ccdadd81a87e6f7417)

11 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
(cherry picked from commit e0ca21f9fb82fb27bb6a55a3c07b2ad1492f7680)

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

(cherry picked from commit 751e21af42e905d0448baa7be4a7ae6d6ae6734a)

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

(cherry picked from commit 08799957f0bade04a8f65a06dac1606346ee8733)

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

(cherry picked from commit 58a7b99823c5c42161e9acf2abf6c22afd4da4cd)

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

(cherry picked from commit 67ab6bcdbac572a6266d7c9d15833bd2ddd049fa)

11 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).

(cherry picked from commit 9b7dd30807ed4be9afe4f66cfa5130aa7d178989)

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

(cherry picked from commit 24c02c700cad3ed94687cf694856a0bee42405ba)

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

(cherry picked from commit c6a5aae3da17459be7550c8f183c0c350ba8ccb0)

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

(cherry picked from commit 80ba6b7b96aad3659675b76a8965788fd0d73476)

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

(cherry picked from commit 73d2b829f06124fec8b65eebc68e87da48808086)

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

(cherry picked from commit 4eb363acc825ef3aaa5468ab5e206ecab5883acb)

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

(cherry picked from commit 03d4b96da62fbb7abfb7fa8fcfc963313e394f22)

11 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).

(cherry picked from commit 86187d43e2db841f8ca2893a31f05669f4a1247b)

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

(cherry picked from commit ff3f17ca3cdd9e82355942f577e7807acc76ddcd)

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

(cherry picked from commit 8bc4292673dfc04ce781e242596779809f1a3634)

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

(cherry picked from commit 36c68e7e34df996bbde4cc82c04ea1619349b64a)

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

(cherry picked from commit d647a5238705bbb4a9277d71bb8069fba2cac7f3)

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

(cherry picked from commit caddc4e727a46e6b6ec7146c9e1cdc7b954f5c16)

11 months agoRecognize '-fdiagnostics-parseable-fixits' compilation messages
Eshel Yaron [Thu, 9 May 2024 06:39:34 +0000 (08:39 +0200)]
Recognize '-fdiagnostics-parseable-fixits' compilation messages

11 months ago(tramp-enable-method): Add minibuffer action
Eshel Yaron [Wed, 8 May 2024 17:10:56 +0000 (19:10 +0200)]
(tramp-enable-method): Add minibuffer action

11 months ago; Skip commit 840c33070dc789d5095a47fa65f4f77564cd6e59
Eshel Yaron [Wed, 8 May 2024 16:53:24 +0000 (18:53 +0200)]
; Skip commit 840c33070dc789d5095a47fa65f4f77564cd6e59

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

(cherry picked from commit de5a89254cb8645143e9f4e51a1727a7237109e8)

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

(cherry picked from commit b82a003544c607b5c54bab13870d52b53e70aeb8)

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

(cherry picked from commit 32b8c078177d6a27da535cdb5365aad90bf0f8af)

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

(cherry picked from commit 339b8349f436b3738cfa02b236e05c3da4c5a8a5)

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

(cherry picked from commit e020f4e9ce5d98438033fea098d943c311b0fa3d)

11 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

(cherry picked from commit d0b36be59ab9840eebbda45609bc8c075ece40c0)

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

(cherry picked from commit f60e5f18745fc73fb0c71ecaeba2f3e52f323805)

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

(cherry picked from commit 45e134fea72848d9aacde73b3e0a8d4138319895)

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

(cherry picked from commit ead7252353290d030b2f66d4bc46535122c7e447)

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

(cherry picked from commit 4b31074f5f49898ba0499a2b617cad425750eafa)

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

(cherry picked from commit a06b365cbf8c1b12f785ad0988cb27b26c1ab463)

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

(cherry picked from commit c2bca6fe0f1c191444d2dc632190706b2a5b663d)

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

(cherry picked from commit 1ac70626fa6720a407a23b1b9c14364e5a9230ae)

11 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)).

(cherry picked from commit b08d5158c4f96849dde763029be7bf25a2b10d4b)

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

(cherry picked from commit 4808c63d43f529f41aac2f2bb14df7ab8f882440)

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

(cherry picked from commit 3bc9c38c471983431bc6768dd6cfe9e059e44a3b)

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

(cherry picked from commit d4d9db8dc6ee20d3c0c1b2e647f40ebf2cc719f3)

11 months agoFix bug#66151
Po Lu [Tue, 7 May 2024 00:51:25 +0000 (08:51 +0800)]
Fix bug#66151

* src/fontset.c (free_realized_fontsets): Never call
recompute_basic_faces on dead frames.  (bug#66151)

(cherry picked from commit 6583916a058324f857d83af5a716d1142f94758f)

11 months ago`read': give fuller error message for errors following "#".
Alan Mackenzie [Mon, 6 May 2024 20:14:57 +0000 (20:14 +0000)]
`read': give fuller error message for errors following "#".

This solves bug#70702.

* src/lread.c (READ_AND_BUFFER, INVALID_SYNTAX_WITH_BUFFER):
New macros.
(read0): For errors in characters sequences beginning with "#",
output the entire character sequence rather than just "#".

* test/src/lread-tests.el (lread-test-bug70702): New test.

(cherry picked from commit 67e1b9d0553238ec6a5af68b41f43ba157f529e1)

11 months agoSimplify 'read-multiple-choice' prompt formatting
Eshel Yaron [Wed, 8 May 2024 16:47:29 +0000 (18:47 +0200)]
Simplify 'read-multiple-choice' prompt formatting

11 months agoedebug.el: Fix `edebug-remove-instrumentation` (bug#70791)
Stefan Monnier [Mon, 6 May 2024 18:33:43 +0000 (14:33 -0400)]
edebug.el: Fix `edebug-remove-instrumentation` (bug#70791)

* lisp/emacs-lisp/edebug.el (edebug-unwrap*): Traverse interpreted
functions.

(cherry picked from commit f63615208adf2852b9384fe817e930588920a894)

11 months ago; * lisp/kmacro.el (kmacro-add-counter): cut useless variable ref
Mattias Engdegård [Mon, 6 May 2024 14:09:08 +0000 (16:09 +0200)]
; * lisp/kmacro.el (kmacro-add-counter): cut useless variable ref

(cherry picked from commit 92147d2c9334d3df731562b039cfc26c3486c621)

11 months ago* lisp/tab-bar.el (tab-bar-mouse-1): Avoid infinite recursion (bug#70086).
Juri Linkov [Mon, 6 May 2024 17:10:43 +0000 (20:10 +0300)]
* lisp/tab-bar.el (tab-bar-mouse-1): Avoid infinite recursion (bug#70086).

(cherry picked from commit 13d8b0eb63c568196cf692cde6a9153a00696a57)

11 months ago* lisp/emacs-lisp/warnings.el (display-warning): Add guardrails for window.
Juri Linkov [Mon, 6 May 2024 17:00:23 +0000 (20:00 +0300)]
* lisp/emacs-lisp/warnings.el (display-warning): Add guardrails for window.

Check for non-nil 'window' returned from 'display-buffer' for the case when
users decide to use 'allow-no-window' in 'display-buffer-alist' (#70795).

(cherry picked from commit 446031722546513ace2dc6f3ee86999bb7e17b39)

11 months ago* lisp/tab-bar.el (tab-bar-select-restore-windows): Use 'special-mode'.
Juri Linkov [Mon, 6 May 2024 16:48:04 +0000 (19:48 +0300)]
* lisp/tab-bar.el (tab-bar-select-restore-windows): Use 'special-mode'.

(cherry picked from commit 6e835dfaca2655a9ba1cfac2d3d3e236fd59674f)

11 months ago* lisp/tab-bar.el: Support mouse clicks for multi-item 'global-mode-string'.
Juri Linkov [Mon, 6 May 2024 16:43:50 +0000 (19:43 +0300)]
* lisp/tab-bar.el: Support mouse clicks for multi-item 'global-mode-string'.

(tab-bar-format-global): Split elements of 'global-mode-string'
to separate items of the tab bar, so events for each item are
handled separately (bug#70086).

(cherry picked from commit 9ecd65a6607aaaaf4ef74f52e252ab1c64dcbdff)

11 months ago(Fkey_description): Fix corner (bug#59305)
Stefan Monnier [Mon, 6 May 2024 15:19:11 +0000 (11:19 -0400)]
(Fkey_description): Fix corner (bug#59305)

* src/keymap.c (Fkey_description): Don't mistake latin-1 chars for
ASCII-chars-with-meta.

(cherry picked from commit 5522cc7879a17cab28383c4b1cce611c78c28995)

11 months agoExpressly disable large file APIs on Android 4.4 and earlier
Po Lu [Mon, 6 May 2024 12:55:49 +0000 (20:55 +0800)]
Expressly disable large file APIs on Android 4.4 and earlier

* configure.ac (CFLAGS): Add -D_FILE_OFFSET_BITS=32 on SDK 20
and earlier that unserviceable functions may not be selected.
Problem reported by Ruth Elburn <ruth@noreply.invalid>.

(cherry picked from commit c5b4bd69faf9e9af9d95f7c995fffb80a7fc47c9)

11 months agoRevert "Disable text conversion in map-ynp"
Eli Zaretskii [Mon, 6 May 2024 12:02:37 +0000 (15:02 +0300)]
Revert "Disable text conversion in map-ynp"

This reverts commit f50a58123a3d386b9bba7c4ba14df62479887bd4.
Please don't make such changes without discussing them.

(cherry picked from commit e091967ce2d0b14cfe5444858d065b1f203121fa)

11 months ago; Avoid byte-compiler warning in comp.el
Eli Zaretskii [Mon, 6 May 2024 10:54:19 +0000 (13:54 +0300)]
; Avoid byte-compiler warning in comp.el

* lisp/emacs-lisp/comp.el (comp--symbol-func-to-fun): Move to
before its first use.

(cherry picked from commit 74ebd729c7b8a4b957ab9eebc603c69d6aac00be)

11 months ago; * java/org/gnu/emacs/EmacsTileObject.java: Fix copyright dates.
Po Lu [Mon, 6 May 2024 09:23:57 +0000 (17:23 +0800)]
; * java/org/gnu/emacs/EmacsTileObject.java: Fix copyright dates.

(cherry picked from commit 5bf4ff806b8ad12fa8a0ab7a8c8032d46b363b6c)

11 months agoDisable text conversion in map-ynp
Po Lu [Mon, 6 May 2024 07:53:49 +0000 (15:53 +0800)]
Disable text conversion in map-ynp

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Read response with
read-key, not read-char.

(cherry picked from commit f50a58123a3d386b9bba7c4ba14df62479887bd4)

11 months agoOptimize stipples on Android
Po Lu [Mon, 6 May 2024 04:09:21 +0000 (12:09 +0800)]
Optimize stipples on Android

* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>:
Change type to EmacsTileObject.
(markDirty): Create an EmacsTileObject rather than a
BitmapDrawable.

* java/org/gnu/emacs/EmacsTileObject.java: New file,
significantly leaner than BitmapDrawable.

(cherry picked from commit 2f36fc1b4f78aa27f4f484fbd09fcabacee36504)

11 months agoRemove unnecessary cons in function-type property
Andrea Corallo [Sun, 5 May 2024 21:39:01 +0000 (23:39 +0200)]
Remove unnecessary cons in function-type property

* lisp/emacs-lisp/comp-common.el (comp-function-type-spec): Remove
unnecessary car.
* lisp/emacs-lisp/comp.el (comp--intern-func-in-ctxt): Likewise.
* lisp/emacs-lisp/byte-run.el (byte-run--set-function-type): Update
lambda list.

(cherry picked from commit f920959ac98afa8f8eb142abe94bec276fa7a2b7)

11 months agoFix intra compilation unit function type declaration
Andrea Corallo [Sun, 5 May 2024 21:16:20 +0000 (23:16 +0200)]
Fix intra compilation unit function type declaration

* lisp/emacs-lisp/comp.el (comp-func): Add 'slot'.
(comp--intern-func-in-ctxt): Update.
(comp--get-function-cstr): Update.

(cherry picked from commit 77f87d4b489fcb332fc3d8d3d4a8080e7e1818fd)

11 months agoeglot.el: Require `track-changes` unconditionally
Stefan Monnier [Sun, 5 May 2024 21:23:29 +0000 (17:23 -0400)]
eglot.el: Require `track-changes` unconditionally

* lisp/emacs-lisp/track-changes.el: Bump version.

* lisp/progmodes/eglot.el: Require `track-changes` unconditionally.
(Package-Requires:): Add `track-changes`.
(eglot--track-changes-signal, eglot--signal-textDocument/didChange)
(eglot--managed-mode): Remove non-track-changes alternative code.
(eglot--before-change, eglot--after-change): Delete functions.

(cherry picked from commit 44036b32ba398cf284320285b60be35874b6eea5)

11 months agoFix Eshell handling of remote files like "/ssh:remote:~/file.txt"
Jim Porter [Sun, 5 May 2024 20:09:08 +0000 (13:09 -0700)]
Fix Eshell handling of remote files like "/ssh:remote:~/file.txt"

* lisp/eshell/em-glob.el (eshell-glob-convert): Use 'concat' instead of
'file-name-concat' to avoid extraneous slashes.
(eshell-extended-glob): Bail out if we didn't find a glob after all.

* test/lisp/eshell/em-glob-tests.el (tramp): Require.
(em-glob-test/convert/remote-start-directory): Use the mock remote
connection.
(em-glob-test/remote-user-directory): New test.

(cherry picked from commit 1529ad0315f8d4a96ca07969c1c91c1c50bb6075)

11 months agoFix tab-line-tabs-buffer-groups (bug#59438)
Gabriel do Nascimento Ribeiro [Sun, 5 May 2024 18:37:23 +0000 (21:37 +0300)]
Fix tab-line-tabs-buffer-groups (bug#59438)

* lisp/tab-line.el (tab-line-tabs-buffer-groups): Handle case
when variable 'tab-line-tabs-buffer-groups-sort-function' is nil.

(cherry picked from commit 451863adf942bf4e3c1b9346c0f37e546e16b1fd)

11 months ago* lisp/tab-line.el: Use defcustom for group sort variables (bug#59438).
Juri Linkov [Sun, 5 May 2024 18:32:22 +0000 (21:32 +0300)]
* lisp/tab-line.el: Use defcustom for group sort variables (bug#59438).

(tab-line-tabs-buffer-group-sort-function)
(tab-line-tabs-buffer-groups-sort-function): Turn defvar into defcustom.
Suggested by Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>.
(tab-line-tabs-buffer-group-name): Fall back to
'tab-line-tabs-buffer-group-by-mode' when
'tab-line-tabs-buffer-group-function' is nil (its previous default value).

(cherry picked from commit 12132ec1efb1c4ea5f73d7018896964ce2e0311e)

11 months agoFix lock-file format in Tramp
Michael Albinus [Sun, 5 May 2024 17:54:07 +0000 (19:54 +0200)]
Fix lock-file format in Tramp

* lisp/net/tramp.el (tramp-lock-file-info-regexp): BOOT_TIME can
be negative.  (Bug#70415)

(cherry picked from commit 6f16ef1c04c1ab3524eab6bb98376afc50a6078b)

11 months agoproject--vc-list-files: Use vc-git-command for better error reporting
Dmitry Gutov [Sun, 5 May 2024 17:19:48 +0000 (20:19 +0300)]
project--vc-list-files: Use vc-git-command for better error reporting

* lisp/progmodes/project.el (project--vc-list-files):
Use 'vc-git-command' for better error reporting
(https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00399.html).

(cherry picked from commit 8d3e4e823f21d5a70f7e6c51e161b2322f1bccc3)

11 months agoproject-find-regexp: Fix test
Dmitry Gutov [Sun, 5 May 2024 16:42:05 +0000 (19:42 +0300)]
project-find-regexp: Fix test

* test/lisp/progmodes/project-tests.el (project-find-regexp):
Add binding for project-list-file, to fix the test when running
in the terminal (reported on the mailing list).

(cherry picked from commit 696b1cb8de2cbd808d572edbd3beca4813af3514)

11 months agoFix lock files on some versions of Cygwin
Eli Zaretskii [Sun, 5 May 2024 16:30:57 +0000 (19:30 +0300)]
Fix lock files on some versions of Cygwin

* src/filelock.c (current_lock_owner): Support negative boot-time
on rare systems.  (Bug#70415)

(cherry picked from commit d5b6627faa9bbd0059600a91d1cd45c0b31e3cd8)

11 months ago(read-passwd-toggle-visibility): Fix some loose ends
Stefan Monnier [Sun, 5 May 2024 14:43:37 +0000 (10:43 -0400)]
(read-passwd-toggle-visibility): Fix some loose ends

* lisp/auth-source.el (read-passwd-toggle-visibility): Make sure
we operate on the minibuffer even if some other window was
selected when the little icon was pressed.  Don't hardcode the
keymap representation.  Use the `keymap` property rather than
the `local-map` property so it can't be accidentally shadowed
by something like a minor-mode map.

(cherry picked from commit 61ad641893bc521e98cc06162634299d57b2bf8a)

11 months ago; * etc/NEWS: Move 'Miscellaneous' subtopics last.
Mattias Engdegård [Sun, 5 May 2024 14:20:58 +0000 (16:20 +0200)]
; * etc/NEWS: Move 'Miscellaneous' subtopics last.

(cherry picked from commit 63f9f2259e9cf6b17c5092b09c3cf0e37c7e6fae)

11 months agoRetract lexical cookie source load warning
Mattias Engdegård [Sat, 4 May 2024 14:18:09 +0000 (16:18 +0200)]
Retract lexical cookie source load warning

On balance it seems likely that the warning would annoy more people than
it would help, so let them deal with any actual problems when the
default is changed instead.  See discussion at:
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00250.html

* src/lread.c (string_suffix_p, warn_missing_cookie, Fload)
(Feval_buffer):
* lisp/international/mule.el (load-with-code-conversion):
* lisp/startup.el (command-line--load-script):
* etc/NEWS:
Revert all changes, except for the generalised
`lisp_file_lexical_cookie` which may prove useful in the future.

(cherry picked from commit d51de0c5d90117bc1dc4bc5bc700253d71cd4579)

11 months agoRun c-unmark-<>-around-region in after-change-functions always.
Alan Mackenzie [Sun, 5 May 2024 11:34:14 +0000 (11:34 +0000)]
Run c-unmark-<>-around-region in after-change-functions always.

This fixes bug#70435.

* lisp/progmodes/cc-engine.el (c-unmark-<>-around-region): Run
its contents in after-change-functions for a deletion, so that
c-new-BEG and c-new-END get set.  Add a new test (> end beg)
in a check for unterminated string handling.

(cherry picked from commit 71491fe6f4a944457cb56f6323983ef431e0c422)

11 months ago; Improve documentation of a recent change
Eli Zaretskii [Sun, 5 May 2024 05:20:39 +0000 (08:20 +0300)]
; Improve documentation of a recent change

* lisp/progmodes/project.el (project-files-relative-names):
* etc/NEWS: Improve documentation of 'project-files-relative-names'.

(cherry picked from commit 8098ad9679c7f5ea19493bdae18227f7a81b3eb4)

11 months agoNew variable 'project-files-relative-names'
Dmitry Gutov [Sun, 5 May 2024 03:27:39 +0000 (06:27 +0300)]
New variable 'project-files-relative-names'

* lisp/progmodes/project.el (project-files-relative-names):
New variable (bug#69233).
(project--files-in-directory): Honor it.
(project--vc-list-files): Here too.
(project-find-regexp): Use it to improve performance.
(project-or-external-find-regexp): Add a TODO.
(project-find-file): Use it here too.
(project--read-file-cpd-relative, project--read-file-absolute):
Try to handle file lists with absolute and relative files names.
(project-find-file-in): Set default-directory, so relative names
are interpreted correctly.

* lisp/progmodes/xref.el (xref-matches-in-files):
Consider that the first in FILES can be a relative file name.

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

* etc/NEWS: Mention it.

(cherry picked from commit 370b216f08699bdd85b910868642df441c06306c)

11 months agoDon't permit C-x 8 RET &c in isearch.el to contaminate search string
Po Lu [Sun, 5 May 2024 01:49:09 +0000 (09:49 +0800)]
Don't permit C-x 8 RET &c in isearch.el to contaminate search string

* lisp/isearch.el (isearch-char-by-name, isearch-emoji-by-name):
Concatenate new character to the query string saved by
with-isearch-suspended, not the current string, which might have
been modified by recursive I-search sessions within
completing-read.

(cherry picked from commit e0993f5169ebf761d520b2e23630a3de7d13ccb3)

11 months agoFix cursor misalignment on truncated RTL rows
Po Lu [Sun, 5 May 2024 01:38:27 +0000 (09:38 +0800)]
Fix cursor misalignment on truncated RTL rows

* src/xdisp.c (set_cursor_from_row): Begin computing the
position of the rightmost glyph from row->x, not 0.

(cherry picked from commit 129312aa12c2f9c2cc44fcbdecb6b6a45b7588f4)

11 months agoFix inadvertent removal in EmacsWindow
Po Lu [Sun, 5 May 2024 01:03:57 +0000 (09:03 +0800)]
Fix inadvertent removal in EmacsWindow

* java/org/gnu/emacs/EmacsWindow.java (onKeyUp): Send KeyPress
events upon deferred KEYCODE_BACK.

(cherry picked from commit 51791fd1781729baeb38551e833861d9c24c302f)

11 months ago(eglot--track-changes-signal): Improve last fix (bug#70541)
Stefan Monnier [Sat, 4 May 2024 21:14:46 +0000 (17:14 -0400)]
(eglot--track-changes-signal): Improve last fix (bug#70541)

* lisp/progmodes/eglot.el (eglot--add-one-shot-hook): New function.
(eglot--track-changes-signal): Use it.

(cherry picked from commit 043bb36312039f60a464b918daa1dd214cd369f1)

11 months agotextsec: handle email address without domain part
Andreas Schwab [Fri, 28 Jul 2023 09:53:03 +0000 (11:53 +0200)]
textsec: handle email address without domain part

* lisp/international/textsec.el
(textsec-email-address-suspicious-p): Handle missing domain part.
(textsec-email-address-header-suspicious-p): Likewise.

(cherry picked from commit 672ca232db0a30e45b7f3f5e06b8fc6f12e23faa)

11 months ago(ruler-mode-ruler): Minor optimization
Stefan Monnier [Sat, 4 May 2024 16:06:16 +0000 (12:06 -0400)]
(ruler-mode-ruler): Minor optimization

* lisp/ruler-mode.el (ruler-mode-ruler): Don't compute
`line-number-display-width` redundantly.  Use `add-text-properties`.
Remove redundant `local-map` property.

(cherry picked from commit ea752667cd8a146e79e5646bbedc76be08c50141)

11 months agoAllow `letrec` binding without init expression
Mattias Engdegård [Sat, 4 May 2024 12:09:23 +0000 (14:09 +0200)]
Allow `letrec` binding without init expression

For example, (letrec (... (x) ...) ...) is now allowed.

* lisp/subr.el (letrec): Allow omitted init expression.
* test/lisp/subr-tests.el (subr--tests-letrec): Add test case.

(cherry picked from commit fd859fbea2e9d13e76db1c5295d9ddd1c5955d83)

11 months ago; Fix last change
Eli Zaretskii [Sat, 4 May 2024 11:51:05 +0000 (14:51 +0300)]
; Fix last change

* lisp/progmodes/python.el
(python-shell-compilation-regexp-alist): Add :version.
(Bug#70653)

(cherry picked from commit fdfadd6f467063dc83032b4e0dbe4e7b96690670)

11 months agoLocate error source of ExceptionGroup in Python shell
shynur [Fri, 3 May 2024 11:40:23 +0000 (19:40 +0800)]
Locate error source of ExceptionGroup in Python shell

The Python shell recognizes the line containing a file path and
a line number when an exception is raised up to the top-level,
in order to locate the source of error.  It's supposed to
recognize the built-in ExceptionGroup as well.  (Bug#70653)
* lisp/progmodes/python.el (python-shell-compilation-regexp-alist):
Take the single leading vertical line into account.
* etc/NEWS: Announce this change.

(cherry picked from commit bfb31a06acadd5e819a3cb8dc6886122e53646f3)

11 months agoFix implementation of the --terminal command-line switch
Eli Zaretskii [Sat, 4 May 2024 10:12:21 +0000 (13:12 +0300)]
Fix implementation of the --terminal command-line switch

It sounds like this has been broken ever since multi-tty was
added to Emacs.
* src/keyboard.c (dev_tty): New global variable.
* src/keyboard.h: Declare 'dev_tty'.
* src/emacs.c (main): Initialize 'dev_tty'.
* src/term.c (Fcontrolling_tty_p, Fresume_tty, init_tty):
* src/process.c (dissociate_controlling_tty):
* src/keyboard.c (handle_interrupt_signal, handle_interrupt)
(Fset_quit_char): Use 'dev_tty' instead of 'DEV_TTY'.  (Bug#70519)

(cherry picked from commit fa0f65aa342e181e0e98f55cbf5d9a9be5ed3be6)

11 months agoOnly issue lexical cookie warning for elisp files
Mattias Engdegård [Sat, 4 May 2024 08:08:19 +0000 (10:08 +0200)]
Only issue lexical cookie warning for elisp files

* src/lread.c (string_suffix_p): New.
(warn_missing_cookie): Suppress warning for files not ending in ".el",
except ".emacs".
* etc/NEWS: Update accordingly, and mention how the warning can be
suppressed.

(cherry picked from commit 1121f17d7c4bc3b71edcd0799b894f50aa3a715e)