]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 months ago* Don't install unnecessary trampolines (bug#69573)
Andrea Corallo [Fri, 15 Mar 2024 13:18:51 +0000 (14:18 +0100)]
* Don't install unnecessary trampolines (bug#69573)

* lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install):
Check that subr-name actually matches the target subr.

(cherry picked from commit 005536285585bcdf5a67a01cdfd8e1242742f953)

13 months ago* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Don't declare.
Andrea Corallo [Fri, 15 Mar 2024 11:32:06 +0000 (12:32 +0100)]
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Don't declare.

(cherry picked from commit c393c0467972cba9dc7ed256acd72b553204c33a)

13 months ago; Fix documentation of a recent change (bug#68235)
Eli Zaretskii [Fri, 15 Mar 2024 12:22:14 +0000 (14:22 +0200)]
; Fix documentation of a recent change (bug#68235)

* etc/NEWS:
* doc/lispref/windows.texi (Window Configurations): Improve
wording of 'window-restore-killed-buffer-windows's doc.
* src/window.c (syms_of_window)
<window-restore-killed-buffer-windows>: Doc fix.

* etc/NEWS:
* doc/lispref/buffers.texi (Buffer Names): Document
'buffer-last-name'.

(cherry picked from commit bf3d296d24ea24fb707a9410fccd745523347d2a)

13 months ago; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.
Eli Zaretskii [Fri, 15 Mar 2024 11:29:31 +0000 (13:29 +0200)]
; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.

(cherry picked from commit ed48b0d657cbf183a3e391a95672f921688e6ba8)

13 months agoFix bug with CHECK_STRUCTS introduced by last buffer.h change
Martin Rudalics [Fri, 15 Mar 2024 10:53:31 +0000 (11:53 +0100)]
Fix bug with CHECK_STRUCTS introduced by last buffer.h change

* src/pdumper.c (dump_buffer): Fix HASH_buffer_.  Assign
last_name_ field.

(cherry picked from commit 3858e4f22946dc49d2d3dde5f45a65eab83fd7aa)

13 months agoFurther adjustments for restoring killed buffer windows (Bug#68235)
Martin Rudalics [Fri, 15 Mar 2024 09:35:27 +0000 (10:35 +0100)]
Further adjustments for restoring killed buffer windows (Bug#68235)

* etc/NEWS: Announce 'window-restore-killed-buffer-windows'.
* src/buffer.h (struct buffer) : New field last_name_.
* src/buffer.c (Fbuffer_last_name): New function to return last
name of buffer before it was killed or renamed.
(bset_last_name, Fget_buffer_create, Fmake_indirect_buffer)
(Frename_buffer, Fkill_buffer, init_buffer_once): Set buffer's
last_name_ field accordingly.
* src/window.c (window_restore_killed_buffer_windows): New
variable replacing Vwindow_kept_windows_functions.
(Fset_window_configuration): Use
window_restore_killed_buffer_windows instead of
Vwindow_kept_windows_functions.
* lisp/window.el (window--state-put-2, window-state-put): Use
'window-restore-killed-buffer-windows' instead of
'window-kept-windows-functions'.
* doc/lispref/windows.texi (Window Configurations): Describe
'window-restore-killed-buffer-windows' which replaces
'window-kept-windows-functions'.

(cherry picked from commit 5bba1b95b8088048808b306bf8b00eb9b342ce92)

13 months ago; * src/lread.c (maybe_swap_for_eln): Clarify warning message.
Eli Zaretskii [Thu, 14 Mar 2024 19:08:36 +0000 (21:08 +0200)]
; * src/lread.c (maybe_swap_for_eln): Clarify warning message.

(cherry picked from commit b708e639d63f488a98c7416866665c16730b9e8f)

13 months ago; Fix bibtex-biblatex-field-alist docstring typo.
Basil L. Contovounesios [Tue, 12 Mar 2024 21:47:45 +0000 (22:47 +0100)]
; Fix bibtex-biblatex-field-alist docstring typo.

(cherry picked from commit db027a06976ee1bcbe6294e281bd5954dd1052ef)

13 months ago; * doc/lispref/control.texi (Conditionals): Add missing paren (bug#69742).
Arash Esbati [Tue, 12 Mar 2024 11:53:32 +0000 (12:53 +0100)]
; * doc/lispref/control.texi (Conditionals): Add missing paren (bug#69742).

(cherry picked from commit a9be5c7ea92e7868873d6d3c721d5a0be62ee3ad)

13 months agoFix 'with-sqlite-transaction'
F. Jason Park [Mon, 11 Mar 2024 03:13:42 +0000 (20:13 -0700)]
Fix 'with-sqlite-transaction'

* lisp/sqlite.el (with-sqlite-transaction): Tuck misplaced body
of else form back into feature-test control structure whence it
escaped.  (Bug#67142)

* test/lisp/sqlite-tests.el: New file to accompany
test/src/sqlite-tests.el.

(cherry picked from commit db5915f30ba063b72b007d243fbd832e8a4e8961)

13 months ago; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
Eli Zaretskii [Sat, 9 Mar 2024 09:40:27 +0000 (11:40 +0200)]
; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).

(cherry picked from commit fe491173e8f839653cb22eea63a7261f4aa1dca9)

13 months agoNew completions sort order 'minibuffer-sort-by-length'
Eshel Yaron [Mon, 18 Mar 2024 15:38:18 +0000 (16:38 +0100)]
New completions sort order 'minibuffer-sort-by-length'

13 months agoSimplify 'completion-all-sorted-completions'
Eshel Yaron [Mon, 18 Mar 2024 15:37:46 +0000 (16:37 +0100)]
Simplify 'completion-all-sorted-completions'

13 months agoNew command 'minibuffer-narrow-completions-by-regexp'
Eshel Yaron [Mon, 18 Mar 2024 08:08:37 +0000 (09:08 +0100)]
New command 'minibuffer-narrow-completions-by-regexp'

13 months agoNew command 'minibuffer-toggle-completions-annotations'
Eshel Yaron [Mon, 18 Mar 2024 08:08:11 +0000 (09:08 +0100)]
New command 'minibuffer-toggle-completions-annotations'

13 months agoImprove default *Completions* header line format
Eshel Yaron [Mon, 18 Mar 2024 08:06:50 +0000 (09:06 +0100)]
Improve default *Completions* header line format

13 months ago; Fix documentation of 'flyspell-check-changes'
Eli Zaretskii [Fri, 15 Mar 2024 08:44:23 +0000 (10:44 +0200)]
; Fix documentation of 'flyspell-check-changes'

* lisp/textmodes/flyspell.el (flyspell-check-changes): Doc fixes.

* etc/NEWS: Improve wording of entry for 'flyspell-check-changes'.

(cherry picked from commit 1c4233b9a391ba5d5746acf6b6fd4b352b8c3a58)

13 months ago; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix.
Eli Zaretskii [Fri, 15 Mar 2024 08:29:06 +0000 (10:29 +0200)]
; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix.

(cherry picked from commit ebd32040e06bf57761f59638b600cfdeb408cbc5)

13 months ago* lisp/vc/diff-mode.el (diff-mode-menu): Add menu item "Apply all hunks".
Juri Linkov [Fri, 15 Mar 2024 07:45:48 +0000 (09:45 +0200)]
* lisp/vc/diff-mode.el (diff-mode-menu): Add menu item "Apply all hunks".

It's bound to the recently added command 'diff-apply-buffer'.

(cherry picked from commit ffbf876a93c7b34c84806e43659efbac519279fa)

13 months ago; Skip commit 9dcb28d6014f72e5f52ad46d6141e9be4e11bfa5
Eshel Yaron [Fri, 15 Mar 2024 09:07:08 +0000 (10:07 +0100)]
; Skip commit 9dcb28d6014f72e5f52ad46d6141e9be4e11bfa5

13 months agoKeep indenting text when 'shr-fill-text' is nil (bug#69555)
Kévin Le Gouguec [Sun, 3 Mar 2024 16:20:56 +0000 (17:20 +0100)]
Keep indenting text when 'shr-fill-text' is nil (bug#69555)

The 'shr-fill-...' functions handle both hard-filling (adding
newlines to break long lines) and indentation.  Setting
'shr-fill-text' to nil currently causes these functions to be
short-circuited completely, so e.g. blockquotes are no longer
indented, whereas the intent of this user option is only to
prevent hard-filling to let visual-line-mode reflow text.

* lisp/net/shr.el (shr-fill-lines): Document that the function
handles more than just filling; move the 'shr-fill-text' check...
(shr-fill-line): ... here, after indentation has been taken care
of.
* test/lisp/net/shr-resources/blockquote.html:
* test/lisp/net/shr-resources/blockquote.txt: New test resources.
* test/lisp/net/shr-tests.el (shr-test--rendering-check): Rename
from 'shr-test', to make the relationship with the 'rendering'
testcase clearer; prefer 'file-name-concat' to 'format'; raise
ERT failure if need be, calling (ert-fail ...) directly instead
of (should (not (list ...))).
(shr-test--rendering-extra-configs): New variable to easily check
that user customizations do not degrade rendering.
(rendering): Consult that new variable; delegate failure-raising
to reduce duplication.

(cherry picked from commit 09ab66935154ea0cc4a351b8320bc0e9276b7780)

13 months ago; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string.
Po Lu [Fri, 15 Mar 2024 03:50:27 +0000 (11:50 +0800)]
; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string.

(cherry picked from commit 1be33963f068b884d1f8cbd37372638c47a79e84)

13 months ago* src/sfntfont-android.c (init_sfntfont_android): Fix SDK check.
Po Lu [Fri, 15 Mar 2024 03:50:09 +0000 (11:50 +0800)]
* src/sfntfont-android.c (init_sfntfont_android): Fix SDK check.

(cherry picked from commit c453c82dc6af2178ce10ffddccd9f38543ea6e88)

13 months ago(project--value-in-dir): Ensure that the global value is still honored
Dmitry Gutov [Fri, 15 Mar 2024 02:28:45 +0000 (04:28 +0200)]
(project--value-in-dir): Ensure that the global value is still honored

* lisp/progmodes/project.el (project--value-in-dir):
Ensure that the global value of the variable is still honored,
when the variable is not in dir-locals.

(cherry picked from commit 77a86d738eebc7a80b7d4a6357a5fa675df9de8c)

13 months agofix: project submodule detection does not work for worktrees
Patrick Bader [Mon, 4 Mar 2024 15:14:25 +0000 (16:14 +0100)]
fix: project submodule detection does not work for worktrees

(cherry picked from commit 5037b9eed711dec0ef73dd6fca1e60e0b521c13b)

13 months ago(set-auto-mode): Streamline to fix bug#67795
Stefan Monnier [Fri, 15 Mar 2024 02:15:41 +0000 (22:15 -0400)]
(set-auto-mode): Streamline to fix bug#67795

The old code tested if the mode function is `fboundp` but in an
inconsistent way and without paying attention to
`major-mode-remap`.

* lisp/files.el (set-auto-mode-0): Return `:keep` rather than nil if
the mode was already set.  And emit a warning when the mode function
doesn't exist.
(set-auto-mode): Remove checks that the mode function exists now that
`set-auto-mode-0` does it for us.  Adjust to the new return values of
that function, and simplify the code using a big `or` instead of
a sequence of steps each setting&testing `done`.
(hack-local-variables--find-variables): Use `major-mode-remap`
when skipping the "mode:" entries that specify modes we don't have.
Also, when (eq handle-mode t), don't bother building a list of results
only to return a single element in the end.

(cherry picked from commit 9422a6737447b186ca017929da79985cef7898a8)

13 months ago; Skip commit c8c0d0a9550620adb111bf5d9e0155332498a6bf
Eshel Yaron [Fri, 15 Mar 2024 09:05:30 +0000 (10:05 +0100)]
; Skip commit c8c0d0a9550620adb111bf5d9e0155332498a6bf

13 months agoFix last change
Po Lu [Fri, 15 Mar 2024 00:36:21 +0000 (08:36 +0800)]
Fix last change

* src/xwidget.c (Fmake_xwidget): Cast boolean value to gboolean.
(syms_of_xwidget): Fix coding style and improve doc string.

(cherry picked from commit 9a2c7d865ff8df960793e19c3f854db66b40e0fb)

13 months ago* lisp/textmodes/flyspell.el (flyspell-check-changes): New user option.
Juri Linkov [Thu, 14 Mar 2024 18:11:33 +0000 (20:11 +0200)]
* lisp/textmodes/flyspell.el (flyspell-check-changes): New user option.

(flyspell--mode-on): Add flyspell-check-changes to post-command-hook
when flyspell-check-changes is non-nil.
(flyspell--mode-off): Remove flyspell-check-changes from post-command-hook.
(flyspell-check-changes): New function (bug#61874).

(cherry picked from commit f03f14165ed51148b72b431ac99c4a4829bb1a7f)

13 months ago* lisp/progmodes/project.el: Don't run modes from .dir-locals.el.
Juri Linkov [Thu, 14 Mar 2024 17:37:44 +0000 (19:37 +0200)]
* lisp/progmodes/project.el: Don't run modes from .dir-locals.el.

(project--value-in-dir): Use 'alist-get' on 'file-local-variables-alist'
to avoid calling 'hack-local-variables-apply' via
'hack-dir-local-variables-non-file-buffer' because it might enable
undesirable modes such as flyspell-mode in a temporary buffer (bug#69740).

(cherry picked from commit bd6b64e0a8856a735b484f0482af0e937eb585d3)

13 months agoContext menu for project (bug#69566)
Juri Linkov [Thu, 14 Mar 2024 17:29:16 +0000 (19:29 +0200)]
Context menu for project (bug#69566)

* lisp/menu-bar.el (menu-bar-project-item): New variable from
'project-menu-entry'.
(menu-bar-tools-menu): Use 'menu-bar-project-item'.

* lisp/mouse.el (context-menu-functions): Add
'context-menu-project' to choice.
(context-menu-project): New function.

* lisp/progmodes/project.el (project-menu-entry): Remove variable.
(project-mode-line-map): Use 'menu-bar-project-item' instead of
'project-menu-entry'.

(cherry picked from commit f3deaa117acfc975be3edbe8461b18fc29b4adf0)

13 months agoAdd language server for Move to eglot
Pankaj Jangid [Thu, 14 Mar 2024 11:41:43 +0000 (17:11 +0530)]
Add language server for Move to eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Added
'move-analyzer' language server.  (Bug#69796)

(cherry picked from commit eae2c73edb3f09a06a31a38edd28e9751626e761)

13 months agoDetect the readline support for Python shell completion
Liu Hui [Mon, 26 Feb 2024 10:46:36 +0000 (18:46 +0800)]
Detect the readline support for Python shell completion

* lisp/progmodes/python.el
(python-shell-comint-watch-for-first-prompt-output-filter):
Detect the readline support.
(python-shell-readline-completer-delims): Update docstring.
(python-shell-completion-native-setup): Move the readline
detection code to ...
(python-shell-readline-detect): ... new function.
(python-shell-completion-native-turn-on-maybe): Skip if Python
has no readline support.
(python-shell-completion-at-point): Respect the delimiter of
readline completer in non-native completion.
* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1, python-completion-at-point-2)
(python-completion-at-point-pdb-1)
(python-completion-at-point-while-running-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Skip tests if
Python has no readline support.
(python-shell-completion-at-point-jedi-completer): Add test for
non-native Python shell completion. (bug#68559)

(cherry picked from commit a7057745f5ef903a2655c6d9e7813168e361baf7)

13 months agoHandle the case where 'vtable-update-object' doesn't find old object
Adam Porter [Tue, 12 Mar 2024 21:01:57 +0000 (16:01 -0500)]
Handle the case where 'vtable-update-object' doesn't find old object

* lisp/emacs-lisp/vtable.el (vtable-update-object): If OLD-OBJECT
is not found, don't call ELT, since SEQ-POSITION may return nil.
(Bug#69664)

(cherry picked from commit c94d680f6eb46a47549633c7076fe32660b3cd42)

13 months ago; Simplify (with-current-buffer (get-buffer ...) ...)
Tim Landscheidt [Tue, 12 Mar 2024 00:21:06 +0000 (00:21 +0000)]
; Simplify (with-current-buffer (get-buffer ...) ...)

There's no need to call 'get-buffer', since 'with-current-buffer'
does that internally.
* lisp/calendar/todo-mode.el (todo-merge-category):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-error):
* lisp/emacs-lisp/debug.el (debug, debugger-record-expression):
* lisp/emacs-lisp/eieio-opt.el (eieio-browse):
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/eshell/em-unix.el (eshell-poor-mans-grep):
* lisp/gnus/gnus-group.el (gnus-add-mark):
* lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark):
* lisp/net/sieve.el (sieve-upload):
* lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers):
* lisp/obsolete/quickurl.el (quickurl-list-populate-buffer):
* lisp/org/ob-calc.el: (org-babel-execute:calc):
* lisp/org/org-agenda.el (org-agenda-use-sticky-p):
* lisp/pcomplete.el (pcomplete-show-completions):
* lisp/progmodes/bug-reference.el
(bug-reference--try-setup-gnus-article):
* lisp/progmodes/idlw-help.el
(idlwave-highlight-linked-completions):
* lisp/progmodes/verilog-mode.el (verilog-preprocess):
* lisp/replace.el (occur-1):
* lisp/term.el (term-dynamic-list-completions):
* lisp/time.el (world-clock-update):
* lisp/url/url-cache.el (url-store-in-cache):
* lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news):
* lisp/vc/vc-rcs.el (vc-rcs-system-release):
* lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news):
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export):
* test/lisp/erc/erc-dcc-tests.el
(pcomplete/erc-mode/DCC--get-1flag)
(pcomplete/erc-mode/DCC--get-2flags)
(pcomplete/erc-mode/DCC--get-2flags-reverse):
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--existing--noreuse):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-tests.el (erc--refresh-prompt):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).

(cherry picked from commit 6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d)

13 months agobug#69685: Add language server for Fennel to eglot
Phil Hagelberg [Sat, 9 Mar 2024 23:36:11 +0000 (15:36 -0800)]
bug#69685: Add language server for Fennel to eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add
fennel-ls language server.

Copyright-paperwork-exempt: yes
(cherry picked from commit 3807f380b3334205bfcbba88003ff96507c86fc4)

13 months agoffap.el: Exclude angle brackets from file names in XML
StrawberryTea [Sat, 9 Mar 2024 21:37:44 +0000 (15:37 -0600)]
ffap.el: Exclude angle brackets from file names in XML

* lisp/ffap.el (ffap-string-at-point-mode-alist): Add elements for
XML, to better recognize file names in XML buffers.

Copyright-paperwork-exempt: yes
(cherry picked from commit fd0a6cb172dbae8779dae768fa8c475eb0af50ee)

13 months agoAdd bounds-of-thing-at-point property for 'number'
Visuwesh [Sat, 9 Mar 2024 09:47:26 +0000 (15:17 +0530)]
Add bounds-of-thing-at-point property for 'number'

* lisp/thingatpt.el (thing-at-point-decimal-regexp)
(thing-at-point-hexadecimal-regexp): Extract regexps from...
(number-at-point): ...here.  Use them in 'number-at-point'.
(number): Add 'bounds-of-thing-at-point' property as
`forward-word' does not always return the right boundary,
e.g., in latex-mode buffers.  (Bug#69239)

(cherry picked from commit cb9ee24ea69be4a70f68cb2d564b23a55cb84216)

13 months ago; Fix last change (bug#68604)
Eli Zaretskii [Thu, 14 Mar 2024 09:32:00 +0000 (11:32 +0200)]
; Fix last change (bug#68604)

* lisp/xwidget.el (xwidget-webkit-disable-javascript): Move from
here...
* lisp/cus-start.el (standard): ...to here.

* src/xwidget.c (syms_of_xwidget)
<xwidget-webkit-disable-javascript>: Doc fix.

* doc/emacs/misc.texi (Embedded WebKit Widgets): Fix wording.

(cherry picked from commit a60804ab954e0de73a80a217f677142176678465)

13 months agoAdd user option to disable JavaScript in xwidget webview
Noé Lopez [Fri, 19 Jan 2024 22:40:53 +0000 (23:40 +0100)]
Add user option to disable JavaScript in xwidget webview

* src/xwidget.c: Add the 'xwidget-webkit-disable-javascript'
variable to disable JavaScript in WebKit sessions.  (Bug#68604)

* etc/NEWS:
* doc/emacs/misc.texi (Embedded Webkit Widgets): Document
the change.

(cherry picked from commit f6a27bc32d19727dfcbee65fb9894b53aec46c65)

13 months ago* lisp/emacs-lisp/vtable.el (vtable-update-object): Fix.
Adam Porter [Sat, 9 Mar 2024 04:28:52 +0000 (22:28 -0600)]
* lisp/emacs-lisp/vtable.el (vtable-update-object): Fix.

The order of the arguments to 'seq-position' was wrong, and it did not
compare the correct values.  (Bug#69664)

(cherry picked from commit 013114664ef4923872ffad26a97f4d314c9a84bf)

13 months ago; Fix last change to compile with mingw.org's MinGW
Eli Zaretskii [Thu, 14 Mar 2024 08:22:52 +0000 (10:22 +0200)]
; Fix last change to compile with mingw.org's MinGW

* src/w32xfns.c:
* src/w32fns.c (WTS_VIRTUAL_CLASS) [!MINGW_W64]: Declare.
* src/w32xfns.c: Include wtsapi32.h.

(cherry picked from commit 7971537d3cdab62f7ce1924cbb2effde73b59b1e)

13 months agoFix resetting keyboard hook state on MS-Windows
Raffael Stocker [Mon, 4 Mar 2024 18:06:07 +0000 (19:06 +0100)]
Fix resetting keyboard hook state on MS-Windows

Register session notifications so Emacs is notified when the
computer is being locked, as required to reset the low level
keyboard hook state.  (Bug#69083).
* src/w32term.h:
* src/w32fns.c (setup_w32_kbdhook, remove_w32_kbdhook)
(w32_wnd_proc, globals_of_w32fns, maybe_pass_notification):
Register and manage session notifications in GUI Emacs.
* src/w32console.c (initialize_w32_display, find_ime_window):
* src/w32xfns.c (drain_message_queue): Register notifications
and reset keyboard hook state in console Emacs.
* src/w32.c (term_ntproc): Un-register session notifications
when terminating.

(cherry picked from commit e7b1743b798cab338e0fa7b98dfb20c0ba7204b1)

13 months ago* exec/trace.c (rpl_stpcpy): Replace stpcpy if absent.
Po Lu [Thu, 14 Mar 2024 06:21:49 +0000 (14:21 +0800)]
* exec/trace.c (rpl_stpcpy): Replace stpcpy if absent.

(cherry picked from commit 1b94f800ae34de5f4e72682a81de1d42bdda9276)

13 months agoImprove /proc/self/exe substitution on Android
Po Lu [Thu, 14 Mar 2024 05:45:48 +0000 (13:45 +0800)]
Improve /proc/self/exe substitution on Android

* exec/configure.ac (USER_SWORD): New macro.

* exec/exec.c (format_pid): Export this function.

* exec/exec.h:

* exec/trace.c (canon_path): New function.
(handle_readlinkat, handle_openat): Test complete file name
against /proc/self/exe, and further check for /proc/pid/exe.

(cherry picked from commit 30bc867aecc59265b6e315acf459f8d79c423bca)

13 months ago; * java/org/gnu/emacs/EmacsDesktopNotification.java (display1): Another fix.
Po Lu [Thu, 14 Mar 2024 00:24:42 +0000 (08:24 +0800)]
; * java/org/gnu/emacs/EmacsDesktopNotification.java (display1): Another fix.

(cherry picked from commit db5c8bda638468f8798c974f4ef4ab3905dbddd3)

13 months agons_select fix for macOS terminals (bug#69561)
Gerd Möllmann [Wed, 13 Mar 2024 19:27:20 +0000 (20:27 +0100)]
ns_select fix for macOS terminals (bug#69561)

* src/nsterm.m (ns_select_1): Return early for terminals.

(cherry picked from commit d95f2a882d5f0587a8e02c5be6f0fd005d4a6a43)

13 months agoFix name of gnus-notification(s)-close; ignore argument
Eric Abrahamsen [Wed, 13 Mar 2024 14:38:49 +0000 (07:38 -0700)]
Fix name of gnus-notification(s)-close; ignore argument

* lisp/gnus/gnus-notifications.el (gnus-notifications-close): Original
name was probably a typo.

(cherry picked from commit c5945e0f9eaf01e653d5afbce72837a05e3e347a)

13 months agoFix crash when displaying notifications on Android 3.0
Po Lu [Wed, 13 Mar 2024 07:33:24 +0000 (15:33 +0800)]
Fix crash when displaying notifications on Android 3.0

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't call setPriority until Jelly Bean.

(cherry picked from commit e7e285ec348c8c19b1ce06a52b89baec71956d7a)

13 months agoPrevent freezes on macOS (bug#69561)
Gerd Möllmann [Sat, 9 Mar 2024 14:06:29 +0000 (15:06 +0100)]
Prevent freezes on macOS (bug#69561)

* src/nsterm.m (ns_select_1): Store pending input_events. Always call
[NSApp run].

(cherry picked from commit 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68)

13 months agoPort more notification senders to non-XDG systems
Po Lu [Wed, 13 Mar 2024 02:59:39 +0000 (10:59 +0800)]
Port more notification senders to non-XDG systems

* doc/lispref/os.texi (Desktop Notifications): Document that
`:timeout' is now implemented.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification): New field delay.
(display1): Set delay on Android 8.0 and up.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Call Android or Haiku notification
functions on those systems.

* lisp/gnus/gnus-notifications.el (gnus-notifications-action)
(gnus-notification-close): Remove dismissed notifications from
the notification to message map.
(gnus-notifications-notify): Call android-notifications-notify
if possible.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update accordingly.
(android_notifications_notify_1): New argument TIMEOUT.
(Fandroid_notifications_notify): New argument QCtimeout.
(syms_of_androidselect) <QCtimeout>: New symbol.

(cherry picked from commit 6b40d557c4a9a4152565c1a1b0da49a1aaaec84f)

13 months agoTry and avoid hardcoding lists of function types
Stefan Monnier [Tue, 12 Mar 2024 20:09:23 +0000 (16:09 -0400)]
Try and avoid hardcoding lists of function types

* lisp/bind-key.el (bind-key--get-binding-description):
Show docstrings for compiled functions also.  Don't hardcode knowledge
about various particular kinds of functions.

* lisp/emacs-lisp/bytecomp.el (display-call-tree): Remove special
support for functions with a `byte-code` body since we never generate
that nowadays.  Don't hardcode knowledge
about various particular kinds of functions.

(cherry picked from commit 4afafa03704aab0c21e4cb4f028256ecead5f795)

13 months agoCleanup some type predicates
Stefan Monnier [Tue, 12 Mar 2024 19:43:43 +0000 (15:43 -0400)]
Cleanup some type predicates

Use the new `cl--define-built-in-type` to reduce the manually
maintained list of built-in type predicates.
Also tweak docstrings to use "supertype" rather than "super type",
since it seems to be what we use elsewhere.

* lisp/subr.el (special-form-p): Remove redundant `fboundp` test.
(compiled-function-p): Don'Return nil for subrs that aren't functions.

* lisp/emacs-lisp/cl-macs.el (type predicates): Trim down the list.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-built-in-type):
Register the corresponding predicate if applicable.
(atom, null): Specify the predicate name explicitly.

(cherry picked from commit 8df673907781bce8b080b91b056cb9987587387c)

13 months agocl-generic: Signal an error when a type specializer won't work
Stefan Monnier [Tue, 12 Mar 2024 16:00:17 +0000 (12:00 -0400)]
cl-generic: Signal an error when a type specializer won't work

* lisp/emacs-lisp/cl-generic.el (cl--generic--unreachable-types): New var.
(cl-generic-generalizers :extra "typeof"): Use it to signal an
error for those types we can't handle.

(cherry picked from commit 3e96dd4f8851a45c66ebc9b8666ae449cc4c2725)

13 months ago; * admin/MAINTAINERS: Add Daniel Pettersson.
Eli Zaretskii [Tue, 12 Mar 2024 13:30:18 +0000 (15:30 +0200)]
; * admin/MAINTAINERS: Add Daniel Pettersson.

(cherry picked from commit 0cc44094613530744d3650e4a169335374d6727b)

13 months agoJsonrpc: improve performance of process filter function
Daniel Pettersson [Wed, 28 Feb 2024 12:03:56 +0000 (13:03 +0100)]
Jsonrpc: improve performance of process filter function

`run-at-time' keeps `timer-list' list sorted by inserting each
timer based on the timer value.  This means that
`timer--time-less-p' needs is executed ~N*N/2 times for each N
pending messages.  This means that jsonrpc becomes unusable
for connections that generate a lot messages at the same time.

* lisp/jsonrpc.el (Version): Bump to 1.0.25.
(jsonrpc--process-filter): Improve performance by activating
timers in a different order.  (Bug#69241)

(cherry picked from commit 7c552b22e64fa9173557e3511aa4e37ac1d5ea59)

13 months ago(comp-known-predicates): Fix overly optimistic `functionp`
Stefan Monnier [Tue, 12 Mar 2024 12:48:09 +0000 (08:48 -0400)]
(comp-known-predicates): Fix overly optimistic `functionp`

* lisp/emacs-lisp/comp.el (comp-known-predicates): `functionp` can also
be true for `cons` objects.

(cherry picked from commit d5773276fb1671da619eeee2c316098d6b1c25c4)

13 months agoFix CheckJNI crash on Android 2.2
Po Lu [Tue, 12 Mar 2024 04:24:59 +0000 (12:24 +0800)]
Fix CheckJNI crash on Android 2.2

* src/androidfns.c (syms_of_androidfns_for_pdumper): Don't free
local reference to script name if nonexistent.

(cherry picked from commit 3ed5777fa732123e8bf630293020f9d1766694b7)

13 months ago; Check in missing change to AndroidManifest.xml.in
Po Lu [Tue, 12 Mar 2024 02:46:00 +0000 (10:46 +0800)]
; Check in missing change to AndroidManifest.xml.in

* java/AndroidManifest.xml.in: Register CancellationReceiver.

(cherry picked from commit fd293c7c67d03204356be3cd6a0cb565dec9ecbf)

13 months ago(gnus-convert-old-newsrc): Remove ancient converters
Stefan Monnier [Tue, 12 Mar 2024 01:51:29 +0000 (21:51 -0400)]
(gnus-convert-old-newsrc): Remove ancient converters

* lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): Remove converters
from 2004 and before.
* lisp/gnus/legacy-gnus-agent.el: Delete file.

(cherry picked from commit 2704ec54fd3e33a0914b06ad762be42c4956110d)

13 months agoResolve inconsistency between Android and XDG notifications
Po Lu [Tue, 12 Mar 2024 01:58:51 +0000 (09:58 +0800)]
Resolve inconsistency between Android and XDG notifications

* doc/lispref/os.texi (Desktop Notifications):

* src/androidselect.c (android_notifications_notify_1)
(Fandroid_notifications_notify, android_notification_action)
(syms_of_androidselect): Rename `:on-cancel' to `:on-close'.

(cherry picked from commit 7ea3a464036f123f70d89b4571afcdeb3e650688)

13 months ago; Fix omission from last change
Po Lu [Tue, 12 Mar 2024 01:54:54 +0000 (09:54 +0800)]
; Fix omission from last change

* src/androidselect.c (android_notification_deleted): Adjust for
changed notification list format.

(cherry picked from commit fd33b637e986e7ec1c34a1358b5c71e31db95c11)

13 months agoImplement notification residency on Android
Po Lu [Tue, 12 Mar 2024 01:48:53 +0000 (09:48 +0800)]
Implement notification residency on Android

* doc/lispref/os.texi (Desktop Notifications): Document support
for `:resident'.

* java/org/gnu/emacs/EmacsService.java (cancelNotification):

* src/android.c (android_init_emacs_service):

* src/android.h (struct android_emacs_service): New function.

* src/androidselect.c (android_notifications_notify_1)
(Fandroid_notifications_notify): New parameter QCresident; save
it within notification lists.
(android_notification_deleted, android_notification_action):
Adjust for changes to the format of notification lists and
cancel non-resident notifications when an action is selected.
(syms_of_androidselect): <QCresident>: New symbol.

(cherry picked from commit d7ded996082503ca00546c220c7ce8d96e16b76a)

13 months agoFix notification cancellation detection on Android
Po Lu [Tue, 12 Mar 2024 00:51:52 +0000 (08:51 +0800)]
Fix notification cancellation detection on Android

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't specify FLAG_ONE_SHOT in cancel intents.

(cherry picked from commit bf38783c32e794e46fd03210242f265f34257940)

13 months agoImplement notification callbacks on Android
Po Lu [Mon, 11 Mar 2024 13:40:47 +0000 (21:40 +0800)]
Implement notification callbacks on Android

* doc/lispref/os.texi (Desktop Notifications): Document that
:on-cancel, :on-action and :actions are now supported on
Android.

* java/org/gnu/emacs/EmacsActivity.java (onNewIntent): New
function.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(NOTIFICATION_ACTION, NOTIFICATION_TAG, NOTIFICATION_DISMISSED):
New constants.  <actions, titles>: New fields.
(insertActions): New function.
(display1, display): Insert actions on Jelly Bean and up, and
arrange to be notified when the notification is dismissed.
(CancellationReceiver): New class.

* java/org/gnu/emacs/EmacsNative.java (sendNotificationDeleted)
(sendNotificationAction): New functions.

* src/android.c (sendDndDrag, sendDndUri, sendDndText): Correct
return types.
(sendNotificationDeleted, sendNotificationAction)
(android_exception_check_5, android_exception_check_6): New
functions.

* src/android.h:

* src/androidgui.h (struct android_notification_event): New
structure.
(union android_event): New member for notification events.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update JNI signatures.
(android_notifications_notify_1, Fandroid_notifications_notify):
New arguments ACTIONS, ACTION_CB and CANCEL_CB.  Convert and
record them as appropriate.
(android_notification_deleted, android_notification_action): New
functions.
(syms_of_androidselect): Prepare a hash table of outstanding
notifications.
<QCactions, QCon_action, QCon_cancel> New defsyms.

* src/androidterm.c (handle_one_android_event)
<ANDROID_NOTIFICATION_DELETED>
<ANDROID_NOTIFICATION_ACTION>: Dispatch event contents to
androidselect.c for processing.

* src/androidterm.h:

* src/androidvfs.c (java_string_class): Export.

* src/keyboard.c (kbd_buffer_get_event) <NOTIFICATION_EVENT>:
Call callback specified by the event.

* src/termhooks.h (enum event_kind) [HAVE_ANDROID]: New
enum NOTIFICATION_EVENT.

(cherry picked from commit a7a37341cad230448e487d0ffa343eeeb8a66a65)

13 months ago; Fix error message in last change to bindat.el
Basil L. Contovounesios [Mon, 11 Mar 2024 10:16:20 +0000 (11:16 +0100)]
; Fix error message in last change to bindat.el

Remove trailing period as per "(elisp) Error Symbols".

Relates to the following discussion:
https://lists.gnu.org/r/emacs-devel/2023-10/msg00473.html
https://lists.gnu.org/r/emacs-devel/2024-03/msg00340.html

(cherry picked from commit 75cfc6c73faa1561018b1212156964a7919c69fe)

13 months agoChange bare-symbol back to match intent
Paul Eggert [Mon, 11 Mar 2024 07:03:39 +0000 (00:03 -0700)]
Change bare-symbol back to match intent

Also, attempt to document the intent better.
Problem reported by Alan Mackenzie (Bug#69684).
* src/data.c (Fbare_symbol): Do not signal if the SYM is a symbol
with position and symbols-with-pos-enabled is nil.  Instead,
ignore symbols-with-pos-enabled, as that was the intent.
* test/src/data-tests.el (data-tests-bare-symbol):
New test, to help prevent this bug from reoccurring.

(cherry picked from commit 2d61ebb505977af4f9fd90f92a776599a73f8501)

13 months agoImprove pp-emacs-lisp-code backquote form printing
Michael Heerdegen [Sun, 18 Feb 2024 00:55:54 +0000 (01:55 +0100)]
Improve pp-emacs-lisp-code backquote form printing

* lisp/emacs-lisp/pp.el (pp--quoted-or-unquoted-form-p): New helper
function.
(pp--insert-lisp): Take care of quoted, backquoted and
unquoted expressions; print using an recursive call.
(pp--format-list): Exclude more cases from printing as a function call
by default.  Print lists whose second-last element is an (un)quoting
symbol using dotted list syntax; e.g. (a b . ,c) instead of (a b \, c).

(cherry picked from commit bbc53e0bcf3fe18e7c1cd51fb8719cf62b9f6c71)

13 months agoFix pp-emacs-lisp-code printing of symbols
Michael Heerdegen [Sun, 18 Feb 2024 01:48:15 +0000 (02:48 +0100)]
Fix pp-emacs-lisp-code printing of symbols

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print symbols
readably (bug#69168).

(cherry picked from commit 9a2ce74c3783c4be8ba70642da374d8e77c6f9ac)

13 months ago(bindat--unpack-item): Sanitize vector length
Petteri Hintsanen [Mon, 11 Mar 2024 03:30:11 +0000 (23:30 -0400)]
(bindat--unpack-item): Sanitize vector length

Copyright-paperwork-exempt: yes

* lisp/emacs-lisp/bindat.el (bindat--unpack-item): Sanitize vector length

(cherry picked from commit ed43ad5b5652aed075348357121d9193256721c0)

13 months agoAvoid dependency on nonexisting target in lispref makefile
Andreas Schwab [Sun, 10 Mar 2024 22:02:26 +0000 (23:02 +0100)]
Avoid dependency on nonexisting target in lispref makefile

* doc/lispref/Makefile.in (auxfiles): Change target into a
variable.
($(buildinfodir)/elisp.info): Adjust dependency.
(infoclean): Clean $(auxfiles).

(cherry picked from commit 887789eecc8546d60a296ce9771ecb20fc280a4d)

13 months agoLet 'browse-url-interactive-arg' return more values for NEW-WINDOW-FLAG
Jim Porter [Fri, 8 Mar 2024 05:55:45 +0000 (21:55 -0800)]
Let 'browse-url-interactive-arg' return more values for NEW-WINDOW-FLAG

Previously it always returned t or nil for NEW-WINDOW-FLAG, but now it
can return the actual prefix arg when appropriate.  This lets functions
for 'browse-url-browser-function' consult it and do more things than
just open a new window or not (for example, you could use "C--" as the
prefix arg to do something special in a custom function).

* lisp/net/browse-url.el (browse-url-interactive-arg): Use 'xor' to
adjust the value of 'current-prefix-arg'.
(browse-url): Update docstring.

(cherry picked from commit 46afc91c9f7e6ee6a7917537c83052e0877fa4f2)

13 months agosyncdoc-type-hierarchy.el: Sort and remove `comp` dependency
Stefan Monnier [Sun, 10 Mar 2024 19:12:00 +0000 (15:12 -0400)]
syncdoc-type-hierarchy.el: Sort and remove `comp` dependency

* admin/syncdoc-type-hierarchy.el: Delay loading `org-table` so as
not to "pollute" the table with Org-specific types.
(syncdoc-all-types): Sort the types topologically from the root.
(syncdoc-hierarchy): Use `cl--class-parents` instead if
`comp--direct-supertypes` so we don't depend on `comp-cstr`.
(syncdoc-make-type-table): Sort the table so supertypes always come before
their subtypes.
(syncdoc-make-type-table): Require `org-table` here.

* doc/lispref/elisp_type_hierarchy.jpg:
* doc/lispref/elisp_type_hierarchy.txt: Refresh.

(cherry picked from commit c17ecd2dcd27b73d673df51ce66f4b188afff6db)

13 months ago* src/keyboard.c (read_key_sequence): Remove MSVC compatibility hack
Tim Ruffing [Sat, 9 Mar 2024 11:15:22 +0000 (12:15 +0100)]
* src/keyboard.c (read_key_sequence): Remove MSVC compatibility hack

(cherry picked from commit 2fdb281a276af57c104008d68ae95c7f4b1c3da8)

13 months ago* lisp/calc/calc-prog.el: Switch to new method of detecting end of kbd macro
Tim Ruffing [Sat, 9 Mar 2024 11:29:39 +0000 (12:29 +0100)]
* lisp/calc/calc-prog.el: Switch to new method of detecting end of kbd macro

'read-char' will no longer return -1 as of
ac82baea1c41ec974ad49f2861ae6c06bda2b4ed. This switches to a cleaner
method of detecting whether the end of a keyboard macro has been
reached.

* lisp/calc/calc-prog.el (calc--at-end-of-kmacro-p): New function.
(calc-kbd-skip-to-else-if): Use the function.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
(cherry picked from commit df3e0bcbdbcfe907d7572b5561dd2bf9c3715a4a)

13 months agoRemove workarounds for solved 'read-event' bug
Tim Ruffing [Wed, 27 Dec 2023 13:32:09 +0000 (14:32 +0100)]
Remove workarounds for solved 'read-event' bug

* lisp/subr.el (read-char-choice-with-read-key):
* lisp/net/dbus.el (dbus-call-method):
Remove workarounds for the bug fixed in the previous commit
ac82baea1c41ec974ad49f2861ae6c06bda2b4ed, where 'read-event',
'read-char' and 'read-char-exclusively' could return wrongly -1.
In the case of lisp/dbus.el, this reverts commit
7177393826c73c87ffe9b428f0e5edae244d7a98.

(cherry picked from commit d444390ec569afee35628e112a8d96d11f40175c)

13 months agoContinue reading in 'read-event' etc. at the end of a keyboard macro
Tim Ruffing [Wed, 27 Dec 2023 13:32:09 +0000 (14:32 +0100)]
Continue reading in 'read-event' etc. at the end of a keyboard macro

This fixes a bug that could make 'read-event', 'read-char', and
'read-char-exclusive' erroneously return -1, an internal magic return
value of 'read_char' leaked from C to lisp. Instead of returning -1, the
aforementioned lisp functions now transparently continue reading
available input (e.g., from the keyboard) when reaching the end of a
keyboard macro.

* src/keyboard.c (read_char, read_key_sequence): Move handling
of the end of a keyboard macro from 'read_char' to its caller
'read_key_sequence', which is the only caller that can
meaningfully deal with this case.
* src/macros.c (Fexecute_kbd_macro): Document how the end of keyboard
macro is processed.
* etc/NEWS: Announce this change.

(cherry picked from commit 6f46dd516b84ad7d59b49c2e9e3fc1a2d4ef4d1c)

13 months ago* src/keyboard.c (requeued_events_pending_p): New function
Tim Ruffing [Wed, 27 Dec 2023 13:29:34 +0000 (14:29 +0100)]
* src/keyboard.c (requeued_events_pending_p): New function

* src/keyboard.c, src/keyboard.h (requeued_events_pending_p): Add
function 'requeued_events_pending_p' (whose name was made available in
the previous commit). As opposed to the previous function with the same
name, the new function covers both command and other events.
* src/keyboard.c (Finput_pending_p): Use the new function.

(cherry picked from commit d6f326452ecc761498d627a365c8014a467812eb)

13 months ago* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment
Tim Ruffing [Wed, 27 Dec 2023 13:29:34 +0000 (14:29 +0100)]
* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment

* src/keyboard.c, src/keyboard.h (requeued_events_pending_p): Rename to
'requeued_command_events_pending_p' to clarify that the function covers
only command events. Fix wrong comment that claimed that the function
was unused.
* src/process.c (wait_reading_process_output): Update caller to use the
new name.

(cherry picked from commit 385a02cffde6d0fd80ff189704ad70cfebc3e8d4)

13 months agoExtract check for end of macro to function
Tim Ruffing [Wed, 27 Dec 2023 13:26:26 +0000 (14:26 +0100)]
Extract check for end of macro to function

* src/macros.h (at_end_of_macro_p):
* src/macros.c (at_end_of_macro_p):
New function.
* src/keyboard.c (read_char): Use the new function.

(cherry picked from commit fbc5fb2561d9e1d4e5b69b349a26c49d30ffc938)

13 months agoFix faulty decoded-time adjustment in erc-stamp
F. Jason Park [Sun, 10 Mar 2024 13:08:30 +0000 (06:08 -0700)]
Fix faulty decoded-time adjustment in erc-stamp

* lisp/erc/erc-stamp.el (erc-stamp--lr-date-on-pre-modify): Remove
disruptive assertion for now.
(erc-stamp--time-as-day): Attempt to fix date being rewound by a whole
day when daylight saving time is in effect.  Do this by forcing the
`dst' slot of the `decoded-time' object to -1 and the `zone' to nil.

(cherry picked from commit f3da3d1c68bef60ef28d67c6d8fa5d0cba8c9f08)

13 months agoRedefine erc-spoiler-face to indicate revealed text
F. Moukayed [Fri, 8 Mar 2024 08:39:03 +0000 (08:39 +0000)]
Redefine erc-spoiler-face to indicate revealed text

* lisp/erc/erc-goodies.el (erc-spoiler-face): Redefine role and redo
definition to inherit from `erc-control-default-face'.
(erc-controls-propertize): Include `cursor-face' in the applied hover
properties for spoiler text, and ensure they aren't clobbered by other
built-in modules, like `button'.
(Bug#69597)

Copyright-paperwork-exempt: yes
(cherry picked from commit 166c8a989491c21ea3baf96e4730a4ad9b78308f)

13 months agoMake important text props more resilient in ERC
F. Jason Park [Fri, 8 Mar 2024 05:53:23 +0000 (21:53 -0800)]
Make important text props more resilient in ERC

* lisp/erc/erc-button.el (erc-button-remove-old-buttons): Restore
original `mouse-face' values in areas marked as important after
clobbering.
* lisp/erc/erc.el (erc--reserve-important-text-props): New function.
(erc--restore-important-text-props): New function.
* test/lisp/erc/erc-tests.el (erc--restore-important-text-props): New
test.
(Bug#69597)

(cherry picked from commit e2620fd73441af19d478f7a9262de8c08a47ee2f)

13 months agoLeverage inverse-video for erc-inverse-face
F. Jason Park [Fri, 8 Mar 2024 05:53:11 +0000 (21:53 -0800)]
Leverage inverse-video for erc-inverse-face

* lisp/erc/erc-goodies.el (erc-inverse-face): Specify face attribute
`:inverse-video' (née :reverse-video) to swap foreground and
background colors over affected intervals, as per
https://modern.ircdocs.horse/formatting#reverse-color.
(erc-control-default-fg erc-control-default-bg): New faces for IRC
color-code number 99.  Ignore the ERC convention of prefixing
control-code-derived faces with "fg:" and "bg:" because it doesn't
comport with modern sensibilities, which demand identifiers normally
be namespaced.
(erc-get-bg-color-face, erc-get-fg-color-face): Return new, dedicated
faces instead of `default', and don't nest them in a list.
* test/lisp/erc/erc-goodies-tests.el
(erc-controls-highlight--inverse): Redo completely, asserting behavior
described in the spec linked to above.
(erc-controls-highlight--spoilers): New test based on the body of the
old `erc-controls-highlight--inverse', except without shadowing
`erc-insert-modify-hook' with an unrealistic, idealized value.  Adjust
expected buffer state to reflect the new role of
`erc-spoiler-face'.  (Bug#69597)

(cherry picked from commit 7b4ca9e609e2eadc824313053e70d7272d360b9d)

13 months ago; * java/org/gnu/emacs/EmacsPreferencesActivity.java: Fix commentary.
Po Lu [Sun, 10 Mar 2024 02:37:14 +0000 (10:37 +0800)]
; * java/org/gnu/emacs/EmacsPreferencesActivity.java: Fix commentary.

(cherry picked from commit 18b6289adfd15029fbaf4a259c44f8df10b9d702)

13 months ago(eglot-server-programs): Comment and whitespace only change
Stefan Monnier [Fri, 8 Mar 2024 17:39:59 +0000 (12:39 -0500)]
(eglot-server-programs): Comment and whitespace only change

* lisp/progmodes/eglot.el (eglot-server-programs): Add comment.
Make the definition fit into 80 columns.

(cherry picked from commit 357eb52e094ee751b2ee2f736f7a5e8cc1cdc99c)

13 months agoSimplify mode-indexed tables in packages
Stefan Monnier [Fri, 8 Mar 2024 17:50:33 +0000 (12:50 -0500)]
Simplify mode-indexed tables in packages

Now that we use extra-parents to group alternative major modes,
some tables can be simplified to mention only the group's leader.

* lisp/align.el (align-c++-modes, align-rules-list):
Don't bother listing TS alternatives.
(align-perl-modes): Don't bother listing CPerl alternative.

* lisp/info-look.el (perl-mode): Simplify.

* lisp/cedet/semantic/symref/grep.el (semantic-symref-filepattern-alist):
Don't bother listing TS alternatives.

* lisp/emulation/viper.el (viper-vi-state-mode-list): Don't bother
listing CPerl alternative.

* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions-if-enabled):
Take into account the modes hierarchy.
(gud-tooltip-modes): Don't bother listing TS alternatives.

* .dir-locals.el (c-ts-mode): Simplify.

(cherry picked from commit 41de53d4a1c49ef6c6e8ac4ecb0c10cb1b6e07ce)

13 months agoAdd non-TS modes as extra parent of TS modes (bug#68246)
Stefan Monnier [Fri, 8 Mar 2024 17:58:11 +0000 (12:58 -0500)]
Add non-TS modes as extra parent of TS modes (bug#68246)

Record the fact that TS modes are alternatives to the non-TS
modes using the new `derived-mode-add-parents` functionality.
Do the same for long standing similar issues with CPerl-mode.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode):
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode):
* lisp/textmodes/html-ts-mode.el (html-ts-mode):
* lisp/textmodes/css-mode.el (css-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode, tsx-ts-mode):
* lisp/progmodes/sh-script.el (bash-ts-mode):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/python.el (python-ts-mode):
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode):
* lisp/progmodes/json-ts-mode.el (json-ts-mode):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/java-ts-mode.el (java-ts-mode):
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
* lisp/progmodes/go-ts-mode.el (go-ts-mode, go-mod-ts-mode):
* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode):
* lisp/progmodes/csharp-mode.el (csharp-ts-mode):
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode):
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode):
Add non-TS mode as extra parent.

* lisp/progmodes/cperl-mode.el (cperl-mode): Add `perl-mode` as
extra parent.

(cherry picked from commit c79a509384d33dab6a964ef9a97cbc9a1f1b5bf7)

13 months ago(dir-locals-collect-variables): Avoid spurious safety warnings
Stefan Monnier [Fri, 8 Mar 2024 17:44:38 +0000 (12:44 -0500)]
(dir-locals-collect-variables): Avoid spurious safety warnings

* lisp/files.el (dir-locals-collect-variables): Silence warnings for
extra parents' variables.

(cherry picked from commit 454a55dbd963d4b07c0dc0f6d540cc5fd4b4faa7)

13 months agoRun 'syncdoc-update-type-hierarchy'.
Andrea Corallo [Sat, 9 Mar 2024 15:14:14 +0000 (16:14 +0100)]
Run 'syncdoc-update-type-hierarchy'.

* doc/lispref/elisp_type_hierarchy.jpg: Update.
* doc/lispref/elisp_type_hierarchy.txt: Likewise.

(cherry picked from commit 3be70a13d7b27ccdffbd4efb44752d15376d5e57)

13 months ago* 'syncdoc-type-hierarchy.el' update due to recent changes
Andrea Corallo [Sat, 9 Mar 2024 15:13:47 +0000 (16:13 +0100)]
* 'syncdoc-type-hierarchy.el' update due to recent changes

* admin/syncdoc-type-hierarchy.el (syncdoc-all-types): Update.

(cherry picked from commit cc2579c10bc67dc375247490bb55367ef0800435)

13 months agoAuto-commit of loaddefs files.
Eli Zaretskii [Sat, 9 Mar 2024 09:24:30 +0000 (04:24 -0500)]
Auto-commit of loaddefs files.

(cherry picked from commit 1ea3b369021c90701c634c512426f75ce1291d77)

13 months agoEnable stack overflow recovery on Android
Po Lu [Sat, 9 Mar 2024 08:12:40 +0000 (16:12 +0800)]
Enable stack overflow recovery on Android

* src/sysdep.c (handle_sigsegv): Return after restoring the
original signal handler, which should proceed to call debuggerd
to generate a tombstone.
(init_sigsegv): Save the original signal handler on Android, to
be restored after a signal is received.
(init_signals): Call init_sigsegv on Android.

(cherry picked from commit 5d9a8c3704c156cccea90a46362e6bfae0de87f2)

13 months agoFix case-sensitivity in 'complete-tag'
Eli Zaretskii [Sat, 9 Mar 2024 08:09:36 +0000 (10:09 +0200)]
Fix case-sensitivity in 'complete-tag'

* lisp/progmodes/etags.el (complete-tag): Bind
'completion-ignore-case', so that 'completion-in-region' is
affected by it.  This fixes a bug made in 30 Apr 2010, when this
function was refactored to use
'tags-completion-at-point-function'.  Reported by Morgan Willcock
<morgan@ice9.digital>.

(cherry picked from commit a4473afefe1a0f171ac6e811853836dd675f93d2)

13 months agoDo interactive mode tagging for locate.el
Charalampos Mitrodimas [Thu, 7 Mar 2024 18:38:15 +0000 (18:38 +0000)]
Do interactive mode tagging for locate.el

* lisp/locate.el (locate-tags, locate-find-directory)
(locate-find-directory-other-window): Do interactive mode
tagging.  (Bug#69619)

Copyright-paperwork-exempt: yes
(cherry picked from commit 966e1be5b337cf71f404a509cae4057b73f3f381)

13 months ago(eieio--generic-subclass-specializers): Autoload class
Stefan Monnier [Fri, 8 Mar 2024 16:57:22 +0000 (11:57 -0500)]
(eieio--generic-subclass-specializers): Autoload class

* lisp/emacs-lisp/eieio-core.el (eieio--generic-subclass-specializers):
Don't forget to handle autoloaded classes.

(cherry picked from commit 345cdd7a70558cd47c2ab3e124e2352debaa57cb)

13 months agoEIEIO: Fix regession (bug#69631)
Stefan Monnier [Fri, 8 Mar 2024 16:24:18 +0000 (11:24 -0500)]
EIEIO: Fix regession (bug#69631)

Not sure why earlier tests did not catch it, but there are more
places where we bump into problems because `eieio--class-precedence-list`
now returns also non-EIEIO classes.

* lisp/obsolete/eieio-compat.el
(eieio--generic-static-object-generalizer):
* lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer)
(eieio--generic-subclass-specializers): Handle non-EIEIO parents.

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-7): Adjust test.

(cherry picked from commit 5beb56fb53b2d6ee9d5ad621b7fc2c9d1d0ec9c5)

13 months agoeieio-core.el: Try and fix bug#69631
Stefan Monnier [Fri, 8 Mar 2024 15:47:01 +0000 (10:47 -0500)]
eieio-core.el: Try and fix bug#69631

* lisp/emacs-lisp/eieio-core.el (eieio--class-precedence-c3)
(eieio--class-precedence-dfs, eieio--class-precedence-bfs): Use
`cl--class-parents` since some of the parents aren't EIEIO classes.

(cherry picked from commit 055e31f1d021ef2c8ac5cca505b5f73118736cff)

13 months ago* Fix `capitalize` entry in `comp-known-type-specifiers` (bug#69631)
Andrea Corallo [Fri, 8 Mar 2024 13:26:14 +0000 (14:26 +0100)]
* Fix `capitalize` entry in `comp-known-type-specifiers` (bug#69631)

* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Fix
'capitalize' entry.

(cherry picked from commit 966d0a62a1a13a3df5155476d36eafe17999497e)

13 months ago; Improve documentation of 'minibuffer-allow-text-properties'
Eli Zaretskii [Fri, 8 Mar 2024 13:06:37 +0000 (15:06 +0200)]
; Improve documentation of 'minibuffer-allow-text-properties'

* doc/lispref/minibuf.texi (Text from Minibuffer): Document the
default value of 'minibuffer-allow-text-properties'.

(cherry picked from commit b9f7a2274f6a8352085d01c15bf9086ffe25f437)