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

11 months agoSimplify handling of command-line arguments on Android
Po Lu [Sat, 4 May 2024 08:06:00 +0000 (16:06 +0800)]
Simplify handling of command-line arguments on Android

* java/org/gnu/emacs/EmacsActivity.java
(EXTRA_STARTUP_ARGUMENTS): New constant.
(onCreate): Read a string array, not a string extra from the
intent with this key.

* java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity)
<fileToOpen>: Delete field.
(onCreate): Provide file name as a command line argument when
starting the Emacs service.

* java/org/gnu/emacs/EmacsPreferencesActivity.java (startEmacsQ)
(startEmacsDebugInit): In like manner, replace ad-hoc
command-line argument extra with a proper array.

* java/org/gnu/emacs/EmacsService.java (EmacsService): Rename
extraStartupArgument to extraStartupArguments, and change its
type to a string array.
(onCreate): Adjust to match.

* java/org/gnu/emacs/EmacsThread.java (EmacsThread)
<extraStartupArguments>: Ditto.
<fileToOpen>: Delete field.
(run): Adjust correspondingly.

(cherry picked from commit 41dd78cd362a80f1becc006a37f163119b93df10)

11 months agoDelete redundant backquotes in android-win.el
Po Lu [Sat, 4 May 2024 06:54:12 +0000 (14:54 +0800)]
Delete redundant backquotes in android-win.el

* lisp/term/android-win.el (android-encode-jni)
(android-decode-jni): Replace redundant backquotes with ordinary
quotes.

(cherry picked from commit ecfbd0ff992adcb5b1b4b37884db8dbfda2fca6b)

11 months ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sat, 4 May 2024 06:57:05 +0000 (09:57 +0300)]
; * etc/NEWS: Fix last change.

(cherry picked from commit 01b626ccbcc23798b430121cd300aa337bc9b36e)

11 months ago; * etc/NEWS: Fix a recently-added entry.
Eli Zaretskii [Sat, 4 May 2024 06:34:18 +0000 (09:34 +0300)]
; * etc/NEWS: Fix a recently-added entry.

(cherry picked from commit c74c65f5e1b2b2372910b3ebc41632b730ea46e9)

11 months agoSimplify management of Android handle IDs
Po Lu [Sat, 4 May 2024 03:36:09 +0000 (11:36 +0800)]
Simplify management of Android handle IDs

* java/org/gnu/emacs/EmacsCursor.java (EmacsCursor):

* java/org/gnu/emacs/EmacsGC.java (EmacsGC):

* java/org/gnu/emacs/EmacsHandleObject.java (EmacsHandleObject):
Remove HANDLE argument to constructor.

* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow):

* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection) <windowHandle>: Change type to long.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative)
(sendConfigureNotify, sendKeyPress, sendKeyRelease, sendFocusIn)
(sendFocusOut, sendWindowAction, sendEnterNotify)
(sendLeaveNotify, sendMotionNotify, sendButtonPress)
(sendButtonRelease, sendTouchDown, sendTouchUp, sendTouchMove)
(sendWheel, sendIconified, sendDeiconified, sendContextMenu)
(sendExpose, sendDndDrag, sendDndUri, sendDndText)
(beginBatchEdit, commitCompletion, endBatchEdit, commitText)
(deleteSurroundingText, finishComposingText, replaceText)
(getSelectedText, getTextAfterCursor, getTextBeforeCursor)
(setComposingText, setComposingRegion, setSelection)
(performEditorAction, performContextMenuAction, getExtractedText)
(requestSelectionUpdate, requestCursorUpdates, clearInputFlags)
(getSurroundingText, takeSnapshot, getSelection): Accept handles
as longs, rather than shorts.  All callers changed.

* java/org/gnu/emacs/EmacsService.java (queryTree): Return
handles as longs rather than shorts.
(viewGetSelection): Take long WINDOW, not short.

* src/android.c (struct android_emacs_handle): New structure.
(handle_class): New variable.
(android_init_emacs_service, android_init_emacs_pixmap)
(android_init_emacs_gc_class, android_init_emacs_cursor): Adjust
to match signature changes in constructors.
(android_init_emacs_handle): New function.
(initEmacs): Initialize the handle class, its fields and metods.
(sendConfigureNotify, sendKeyPress, sendKeyRelease, sendFocusIn)
(sendFocusOut, sendWindowAction, sendEnterNotify)
(sendLeaveNotify, sendMotionNotify, sendButtonPress)
(sendButtonRelease, sendTouchDown, sendTouchUp, sendTouchMove)
(sendWheel, sendIconified, sendDeiconified, sendContextMenu)
(sendExpose, sendDndDrag, sendDndUri, sendDndText): Update for
changes to handle type.
(android_alloc_id, android_resolve_handle)
(android_resolve_handle2): Remove functions; replace the second
with a macro that accepts one fewer argument.  All callers
changed.
(android_destroy_handle): Cease indexing the handle list for the
handle object.
(android_globalize_reference): New function.
(android_create_window, android_create_gc, android_create_pixmap)
(android_create_font_cursor): Call android_globalize_reference
to convert global references into handles.
(android_free_cursor, android_destroy_window): Cease verifying
the handle type.
(android_copy_area): Check destination object type rather than
handle entry.
(android_query_tree): Adjust for changes to return types.
(likely): Define __builtin_expect variant unconditionally.

* src/android.h (android_resolve_handle): New macro.

* src/androidgui.h (android_handle): Define to intptr_t.

* src/androidterm.c (deleteSurroundingText, finishComposingText)
(performEditorAction, performContextMenuAction, getExtractedText)
(getSelectedText, requestSelectionUpdate, requestCursorUpdates)
(clearInputFlags, getSurroundingText)
(android_get_surrounding_text_internal): Accept handles as
longs, not jshorts.

(cherry picked from commit 139931fefb4cde3132ca68c3caa6ee9c4889c1b6)

11 months ago; * src/lread.c (warn_missing_cookie): Fix typo.
Po Lu [Sat, 4 May 2024 03:12:16 +0000 (11:12 +0800)]
; * src/lread.c (warn_missing_cookie): Fix typo.

(cherry picked from commit 7a7dd87842fde85666208b1ce26882aa83d99107)

11 months ago* src/lread.c (warn_missing_cookie): Exempt the user init file.
Po Lu [Sat, 4 May 2024 03:11:36 +0000 (11:11 +0800)]
* src/lread.c (warn_missing_cookie): Exempt the user init file.

(cherry picked from commit a5acc89712151645525bd2c0e2c90bf46a8e61ec)

11 months ago* lisp/progmodes/eglot.el (eglot--track-changes-signal): More typo
Stefan Monnier [Fri, 3 May 2024 20:51:57 +0000 (16:51 -0400)]
* lisp/progmodes/eglot.el (eglot--track-changes-signal): More typo

(cherry picked from commit d0e391957b01f101b214f055cd27bb89c8d6fec9)

11 months ago* lisp/emacs-lisp/track-changes.el (track-changes-inconsistent-state-p): Typo
Stefan Monnier [Fri, 3 May 2024 20:39:10 +0000 (16:39 -0400)]
* lisp/emacs-lisp/track-changes.el (track-changes-inconsistent-state-p): Typo

(cherry picked from commit c9b0e2bd8eb1941da0ec937fc6e65772a8f85304)

11 months agoQuery Eglot version via package.el
Philip Kaludercic [Thu, 7 Mar 2024 09:21:45 +0000 (10:21 +0100)]
Query Eglot version via package.el

* lisp/progmodes/eglot.el (eglot--version): Remove constant.
(eglot--connect): Use 'package-get-version'.

(cherry picked from commit 3d4918c2f1d10df4051ca7dc1d17decf157adb3f)

11 months agoWarn when loading .el files without lexical-binding declaration
Mattias Engdegård [Fri, 3 May 2024 15:58:44 +0000 (17:58 +0200)]
Warn when loading .el files without lexical-binding declaration

This corresponds to the byte-compiler warning for the same issue,
here emitted for files that aren't compiled but loaded from source.
It should make the planned change to enable lexical binding by default
in Emacs 31 go smoother.

* src/lread.c (lexical_cookie_t): New type.
(lisp_file_lexically_bound_p): Renamed to...
(lisp_file_lexical_cookie): ...this, with the return value retyped.
* src/lread.c (warn_missing_cookie): New.
(Fload): Warn when loading source file and cookie missing.
(Feval_buffer): Add LOADING arg; warn when set and cookie missing.
* lisp/international/mule.el (load-with-code-conversion):
* lisp/startup.el (command-line--load-script):
Call eval-buffer with LOADING arg set.
* etc/NEWS: Announce.

(cherry picked from commit 81bad84a617be38459da313a75719b5627bb15fe)

11 months agotrack-changes.el: Add a workaround for bug#70541
Stefan Monnier [Fri, 3 May 2024 17:23:00 +0000 (13:23 -0400)]
track-changes.el: Add a workaround for bug#70541

* lisp/emacs-lisp/track-changes.el (track-changes-inconsistent-state-p):
 New function.
* lisp/progmodes/eglot.el (eglot--track-changes-signal): Use it.

(cherry picked from commit b6d4e81a487ce40f5ea6520c53a88a1c2e7359a9)

11 months agomhtml-mode: Use `run-mode-hook' to run `prog-mode-hook' (bug#70671)
Ihor Radchenko [Fri, 3 May 2024 07:46:22 +0000 (10:46 +0300)]
mhtml-mode: Use `run-mode-hook' to run `prog-mode-hook' (bug#70671)

* lisp/textmodes/mhtml-mode.el (mhtml-mode): When running hooks
simulating inheritance from `prog-mode', use `run-mode-hooks' that
honors `delay-mode-hooks' macro.  Note that `delay-mode-hooks' is bound
to non-nil when major mode body is evaluated, so there is no chance that
any major mode-related hooks are executed twice.

(cherry picked from commit 15c77f2fce418983147346589158e2f0da97fa43)

11 months ago* doc/lispref/keymaps.texi (Creating Keymaps): Add :repeat :hints (bug#70576).
Juri Linkov [Fri, 3 May 2024 06:22:39 +0000 (09:22 +0300)]
* doc/lispref/keymaps.texi (Creating Keymaps): Add :repeat :hints (bug#70576).

(cherry picked from commit 4078d0fd3ee9e55c3da219aa6e7788ac6130697b)

11 months agoFix bug#70711
Elias G. Perez [Thu, 2 May 2024 16:33:43 +0000 (10:33 -0600)]
Fix bug#70711

* lisp/progmodes/flymake.el (flymake--indicator-overlay-spec):
Check if `flymake-fringe-indicator-position' or
`flymake-margin-indicator-position' are non-nil for allow no
indicators.

(cherry picked from commit dc77164104451293ccc32b687090370c70df4481)

11 months agoOnly run 'eshell-first-time-mode-hook' once per Emacs session
Lin Sun [Sat, 27 Apr 2024 06:55:49 +0000 (06:55 +0000)]
Only run 'eshell-first-time-mode-hook' once per Emacs session

* lisp/eshell/esh-mode.el (eshell-mode): Set 'eshell-first-time-p' to
nil (bug#70610).

(cherry picked from commit a2ccda71c15f75edef0711f94351af0dd7241beb)

11 months agoPrevent reporting of crashes when Emacs is restarted on Android
Po Lu [Fri, 3 May 2024 02:43:31 +0000 (10:43 +0800)]
Prevent reporting of crashes when Emacs is restarted on Android

* src/emacs.c (Fkill_emacs): Ignore SIGBUS and SIGSGEV
immediately before calling exit.

(cherry picked from commit 6171a9a628fb71b172598c7d7bbea8448ee251d6)

11 months ago; Set explicit hook depth for erc-once-with-server-event
F. Jason Park [Thu, 25 Apr 2024 12:09:50 +0000 (05:09 -0700)]
; Set explicit hook depth for erc-once-with-server-event

* lisp/erc/erc.el (erc-once-with-server-event): Set hook depth to -95.
* test/lisp/erc/erc-scenarios-base-association-nick.el: Improve
comment.
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d--render-entries): Remove do-nothing assertion since its purpose
was unclear and likely dubious, as was incidentally highlighted by the
addition of a function not present on older Emacsen, which this test
still needs to run on.

(cherry picked from commit 068e44ed754344667cf42fe252ebb601d7a8db93)

11 months agoEliminate string data mutation in ruler-mode
Mattias Engdegård [Thu, 2 May 2024 19:49:40 +0000 (21:49 +0200)]
Eliminate string data mutation in ruler-mode

* lisp/ruler-mode.el (ruler-mode-ruler):
Mutate a vector instead of a string.

(cherry picked from commit a156c98df0f24da365872678e20e84e1157d1225)

11 months ago* lisp/tab-bar.el: Support mouse clicks bound in keymap properties.
Juri Linkov [Thu, 2 May 2024 17:55:03 +0000 (20:55 +0300)]
* lisp/tab-bar.el: Support mouse clicks bound in keymap properties.

(tab-bar--event-to-item): Handle mouse bindings for commands
bound in keymap properties of global-mode-string (bug#70086).
(tab-bar-mouse-down-1, tab-bar-mouse-1, tab-bar-touchscreen-begin):
Add the symbol 'global' to the list of handled items.

(cherry picked from commit 14cd4fce4b723a7f06cd7d8dba60c730670191d0)

11 months agoMake the buffer displayed by tab-bar-select-restore-windows internal
Juri Linkov [Thu, 2 May 2024 17:44:04 +0000 (20:44 +0300)]
Make the buffer displayed by tab-bar-select-restore-windows internal

* lisp/tab-bar.el (tab-bar-select-restore-windows): Make the buffer
" *Old buffer %s*" internal with the leading space in its name.

(cherry picked from commit a914667a0071e3a19846fff9ea5ff8e8f1457e17)

11 months ago; Fix last change
Eli Zaretskii [Thu, 2 May 2024 16:30:40 +0000 (19:30 +0300)]
; Fix last change

* etc/NEWS: Fix wording of a recently-added item.

* doc/lispref/functions.texi (Declare Form): Fix markup.

(cherry picked from commit 12e3ffcc97af739f0134959ce4a5ff2f23ffa971)

11 months agoetc/NEWS (Function type declaration): Mark it +++.
Andrea Corallo [Thu, 2 May 2024 14:42:45 +0000 (16:42 +0200)]
etc/NEWS (Function type declaration): Mark it +++.

(cherry picked from commit 64d3100cb5973f2e8372d29f7658c32a63e191e2)

11 months ago* doc/lispref/functions.texi (Declare Form): Improve again declare type.
Andrea Corallo [Thu, 2 May 2024 14:38:14 +0000 (16:38 +0200)]
* doc/lispref/functions.texi (Declare Form): Improve again declare type.

(cherry picked from commit 02690d95f9e47163ecca9b26a01270215727cd69)

11 months ago* doc/lispref/functions.texi (Declare Form): Better warn about UB.
Andrea Corallo [Thu, 2 May 2024 10:15:30 +0000 (12:15 +0200)]
* doc/lispref/functions.texi (Declare Form): Better warn about UB.

(cherry picked from commit 390b606ffcedd7a14e94631c8ab1155db623e723)

11 months agoAdd lexical cookie to new init files
Mattias Engdegård [Thu, 2 May 2024 11:34:22 +0000 (13:34 +0200)]
Add lexical cookie to new init files

* lisp/cus-edit.el (custom-save-all):
Add lexical cookie if the file is empty.

(cherry picked from commit 2f5c9b31161306b2b4c46c77c351c6ea6a46ff98)

11 months ago; Fix last change
Eli Zaretskii [Thu, 2 May 2024 10:04:15 +0000 (13:04 +0300)]
; Fix last change

* lisp/progmodes/python.el (python-shell-send-block): Doc fix.

* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Avoid byte-compiler warnings.
(Bug#70609)

(cherry picked from commit 59c18389bdd89d48e92c485ba27721490ea03e16)

11 months agoNew function 'python-shell-send-block' for python-mode
Lin Sun [Sat, 27 Apr 2024 06:54:27 +0000 (06:54 +0000)]
New function 'python-shell-send-block' for python-mode

* lisp/progmodes/python.el (python-shell-send-block): New
function.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Test case for the new
function.
* etc/NEWS: Document 'python-shell-send-block'.
(Bug#70609)

(cherry picked from commit b2e92c746eb7d1135d3d4ccecc774d79555ffb99)

11 months agoImprove performance of `file-truename' (bug#70036)
Ihor Radchenko [Tue, 30 Apr 2024 11:27:04 +0000 (14:27 +0300)]
Improve performance of `file-truename' (bug#70036)

* lisp/files.el (file-truename): Avoid repetitive calls to
`file-name-nondirectory'.  These calls contribute
significantly to CPU time.  See the benchmarks in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70036#47

(cherry picked from commit bf00762745c07816e7a9c64e0fce037039852971)

11 months agoAdd ExceptionGroup as a Python keyword
kobarity [Tue, 30 Apr 2024 05:10:57 +0000 (14:10 +0900)]
Add ExceptionGroup as a Python keyword

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration)
(python--treesit-exceptions): Add ExceptionGroup.  (Bug#70653)

(cherry picked from commit d15efe965d8317bb5413a8aa8caabcb9f5382206)

11 months agoFix display of stipples on NS with respect to cursor highlight
Po Lu [Thu, 2 May 2024 08:56:26 +0000 (16:56 +0800)]
Fix display of stipples on NS with respect to cursor highlight

* src/nsfont.m (nsfont_draw): Delete redundant code.

* src/nsterm.m (ns_maybe_dumpglyphs_background): Conform logic
to X version by always displaying the background if s->stipple_p
should be set.
(ns_draw_stretch_glyph_string): Set stipple background as
appropriate.
(ns_set_glyph_string_gc): New function.
(ns_draw_glyph_string): Call it, as on X.  Reported by Arash
Esbati <arash@gnu.org>.

(cherry picked from commit ef6ffbdc79645e719d3b5ef23c9200405c58c61e)

11 months ago; * doc/lispref/commands.texi (Event Mod): Add motivation (bug#70596).
Eli Zaretskii [Thu, 2 May 2024 09:20:09 +0000 (12:20 +0300)]
; * doc/lispref/commands.texi (Event Mod): Add motivation (bug#70596).

(cherry picked from commit b392169e541a29178d7ae20f329d48b3d2bd78cf)

11 months ago; Fix python test case for testing completion with ipython
Lin Sun [Thu, 25 Apr 2024 06:54:27 +0000 (06:54 +0000)]
; Fix python test case for testing completion with ipython

* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-ipython): Fix value of
'python-test-shell-interpreter'.  (Bug#70578)

(cherry picked from commit 0e0fe20040413d682f8078a2ddfb8f502cb89fb8)

11 months agoEglot: Add 'command-modes' property to all suitable commands
Augusto Stoffel [Sun, 21 Apr 2024 09:21:58 +0000 (11:21 +0200)]
Eglot: Add 'command-modes' property to all suitable commands

Those are the commands that call 'eglot--current-server-or-lose'.
* lisp/progmodes/eglot.el (eglot--managed-mode),
(eglot-list-connections-mode): Make non-interactive.  (Bug#70554)

(cherry picked from commit b98a6af8ca086ddbf891e54e50d0cb3f578f42b5)

11 months ago* lisp/emacs-lisp/warnings.el: Fix 'warning-display-at-bottom'.
Juri Linkov [Thu, 2 May 2024 06:53:06 +0000 (09:53 +0300)]
* lisp/emacs-lisp/warnings.el: Fix 'warning-display-at-bottom'.

(display-warning): Move point to the beginning of the last line
instead of its end for 'warning-display-at-bottom' (bug#69983).

(cherry picked from commit 592873a52d00fa46bcf63b0dd38073f038ecb935)

11 months ago; Improve commentary in intervals.h
Eli Zaretskii [Thu, 2 May 2024 06:50:37 +0000 (09:50 +0300)]
; Improve commentary in intervals.h

* src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P)
(INTERVAL_EXPRESSLY_WRITABLE_P): Clarify commentary.

(cherry picked from commit 7d15d17353c02b0ded3671ecfaf2f4a8c19d43c1)

11 months agoSupport hints in the :repeat keyword of defvar-keymap for repeat-mode
Juri Linkov [Thu, 2 May 2024 06:46:48 +0000 (09:46 +0300)]
Support hints in the :repeat keyword of defvar-keymap for repeat-mode

* lisp/keymap.el (defvar-keymap): Add :hints to the :repeat keyword.
Put the property 'repeat-hint' on the command symbol.

* lisp/repeat.el (repeat-echo-message-string): Show hint strings
defined with the property 'repeat-hint' on the command symbol (bug#70576).

(cherry picked from commit 0023891e84285c2ea2a8029f479135f792c9d1e9)

11 months ago* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036).
Juri Linkov [Thu, 2 May 2024 06:28:53 +0000 (09:28 +0300)]
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036).

Add 'text' lambda to 'treesit-thing-settings' that should fall back
to the default functions for sentence/sexp navigation.

(cherry picked from commit a1613505e24e8d5eae79b130809d217b1db23065)

11 months agoTighten regexp for rust-ts-mode keyword workaround
Yuan Fu [Thu, 2 May 2024 04:50:21 +0000 (21:50 -0700)]
Tighten regexp for rust-ts-mode keyword workaround

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add bos and eos.

(cherry picked from commit bf026b8e55626b35144f93056744f3fd50bc126b)

11 months agoFix fontification for else in macro body in rust-ts-mode
Yuan Fu [Thu, 2 May 2024 04:21:00 +0000 (21:21 -0700)]
Fix fontification for else in macro body in rust-ts-mode

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add a rule for else in macro body.  Also added the same rule for "in"
and "move" keyword, as they seems to have the same problem.

(cherry picked from commit 07c47ea002b4702285bbf467ec09c9b281eb19b7)

11 months agoAdd font-locking for typed parameters in python-ts-mode (bug#70665)
Noah Peart [Tue, 30 Apr 2024 09:55:18 +0000 (02:55 -0700)]
Add font-locking for typed parameters in python-ts-mode (bug#70665)

* lisp/progmodes/python.el (python--treesit-settings): Add
tree-sitter font-locking rule for typed parameters.
* test/lisp/progmodes/python-tests.el
(python-ts-mode-types-face-1): Test for
font-lock-variable-name-face in typed parameter.

(cherry picked from commit 0f92d433d2b806eb58a9a4c0197344b08ea5ae65)

11 months agoPort visible bell to Android
Po Lu [Thu, 2 May 2024 03:31:37 +0000 (11:31 +0800)]
Port visible bell to Android

* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Ignore
GC_INVERT.

* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle) <invertFilter>: New variable.
(perform): If the transfer mode is invert, copy the source
to itself with invertFilter as the color filter.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <xorAlu, srcInAlu>:
Delete now-redundant ALUs.
(markDirty): Cease updating the paint's transfermode.

* java/org/gnu/emacs/EmacsSafThread.java (openDocument1): Fix
typo in documentation.

* src/android.c (android_blit_xor): Delete unused function.
(android_copy_area): Remove calls to unused blit functions.

* src/androidgui.h (enum android_gc_function): Rename XOR to
INVERT.

* src/androidterm.c (android_flash): Replace with GXinvert.

(cherry picked from commit b84fa71f8985284560bacda7d407e3559583844f)

11 months agoSwitch to GXinvert in XTflash
Po Lu [Thu, 2 May 2024 02:23:09 +0000 (10:23 +0800)]
Switch to GXinvert in XTflash

* src/xterm.c (XTflash): Move to inverting the regions of the
display being flashed.  Suggested by Manuel Giraud
<manuel@ledu-giraud.fr>.

(cherry picked from commit d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5)

11 months ago; * doc/emacs/android.texi (Android Startup): Correct wording.
Po Lu [Thu, 2 May 2024 01:54:16 +0000 (09:54 +0800)]
; * doc/emacs/android.texi (Android Startup): Correct wording.

(cherry picked from commit bcaf946cb143f9d2e5c17c89012c4f9f7541379a)

11 months ago; Update commentary in intervals.h
Po Lu [Thu, 2 May 2024 01:51:31 +0000 (09:51 +0800)]
; Update commentary in intervals.h

* src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P)
(INTERVAL_EXPRESSLY_WRITABLE_P): Mention significance of RO.

(cherry picked from commit 08a38d6e7aad1c918b95801402de189aeaf64da5)

11 months ago* etc/NEWS (Function type declaration): Add entry.
Andrea Corallo [Wed, 1 May 2024 20:49:01 +0000 (22:49 +0200)]
* etc/NEWS (Function type declaration): Add entry.

(cherry picked from commit 8e1e8099aad0fbb2bc375b45379913b8ca55e926)

11 months ago(disassemble): Fix case of `(byte-code ...)` argument
Andrea Corallo [Wed, 1 May 2024 18:14:01 +0000 (14:14 -0400)]
(disassemble): Fix case of `(byte-code ...)` argument

* lisp/emacs-lisp/disass.el (disassemble): Handle (byte-code ...) here..
(disassemble-internal): ...instead of here.
(disassemble-1): Adjust text to reflect the existence of other
compiled functions.

(cherry picked from commit 468f3f1cb44b8807c49add4235af3fe20ea7a73b)

11 months ago* doc/lispref/functions.texi (Declare Form): Improve declare type.
Andrea Corallo [Wed, 1 May 2024 18:03:02 +0000 (20:03 +0200)]
* doc/lispref/functions.texi (Declare Form): Improve declare type.

(cherry picked from commit fccd35f2c89a50675ed8c14d4814b603fd4fa166)

11 months agoAdd Compat as an Eglot dependency
Philip Kaludercic [Sat, 9 Mar 2024 07:11:03 +0000 (08:11 +0100)]
Add Compat as an Eglot dependency

* lisp/progmodes/eglot.el (eglot--format-markup): Remove fboundp
check for 'text-property-search-forward'.
(eglot-alternatives): Use Compat's 'executable-find'
(eglot--executable-find): Remove function.

Additionally this should make 'package-get-version' available
for releases of Emacs previous to 27.1.  (bug#62198)

(cherry picked from commit f68e9172735963950428eafc466fd10473fca7c1)

11 months agoFix minor typos in haikuterm.c
Po Lu [Wed, 1 May 2024 13:34:50 +0000 (21:34 +0800)]
Fix minor typos in haikuterm.c

* src/haikuterm.c (haiku_fill_underline)
(haiku_draw_text_decoration): Don't pass view to unused frame
parameter.

(cherry picked from commit 83bdeee92b0c8bf27ff18f99f3414c725308d2ed)

11 months agoImplement dots and dashes on Nextstep
Po Lu [Wed, 1 May 2024 14:02:15 +0000 (22:02 +0800)]
Implement dots and dashes on Nextstep

* src/Makefile.in (NON_OBJC_CFLAGS): Add -Wstrict-flex-arrays.

* src/nsterm.m (ns_draw_dash, ns_fill_underline): New functions.
(ns_draw_text_decoration): Port dash and dot display from X.

(cherry picked from commit a5f57a86347eb950d201875cb8bba92d424611db)

11 months ago; Silence obsoletion warning in mwheel-tests.
Basil L. Contovounesios [Wed, 1 May 2024 11:08:30 +0000 (13:08 +0200)]
; Silence obsoletion warning in mwheel-tests.

(cherry picked from commit 04635f399b01925b8ed6bcf555e2f528cba2e401)

11 months ago; Update pvec_type hash for CHECK_STRUCTS
Basil L. Contovounesios [Wed, 1 May 2024 11:07:17 +0000 (13:07 +0200)]
; Update pvec_type hash for CHECK_STRUCTS

This follows commit 2fa839c1886 of 2024-04-28
"(COMPILED): Rename to CLOSURE".

(cherry picked from commit f804a492bf890b53d704809bd8cf6306f9c17d76)

11 months agoAssume match before calling help-xref-button
Basil L. Contovounesios [Tue, 30 Apr 2024 06:31:58 +0000 (08:31 +0200)]
Assume match before calling help-xref-button

help-xref-button fails if not preceded by a valid match, so a
preceding unconditional search should not be allowed to fail
silently.

* lisp/emacs-lisp/ert.el (ert-describe-test):
* lisp/help-fns.el (help-fns--compiler-macro)
(help-fns-function-description-header, describe-variable)
(help-fns--customize-variable, describe-face)
(help-fns--face-attributes, describe-keymap): Let unconditional
re-search-backward before help-xref-button fail early, as that would
indicate a logic bug, and the backtrace would more accurately point
to the actual source of the mistake.

(cherry picked from commit 65fa47e3fa15c5553974a6d99080f21b4117245b)

11 months agoDisable on-screen keyboard outside fields in Custom buffers
Po Lu [Wed, 1 May 2024 07:57:29 +0000 (15:57 +0800)]
Disable on-screen keyboard outside fields in Custom buffers

* lisp/cus-edit.el (Custom-display-on-screen-keyboard-p): New
function.
(Custom-mode): Install it as the touch-screen-keyboard-function.

* lisp/touch-screen.el (touch-screen-keyboard-function): New
variable.
(touch-screen-handle-point-up): Don't special-case the splash
screen with respect to touch-screen-display-keyboard in keeping
with user feedback.

(cherry picked from commit 54dbd8b4fa2253682d044cc53bd658e361bff8a0)

11 months ago; * src/androidselect.c (extract_fd_offsets): Fix typos.
Po Lu [Wed, 1 May 2024 04:03:26 +0000 (12:03 +0800)]
; * src/androidselect.c (extract_fd_offsets): Fix typos.

(cherry picked from commit c00105626ace43919706819da4057a358e62bafe)

11 months agoFix compatibility issues with Android clipboards
Po Lu [Wed, 1 May 2024 03:45:53 +0000 (11:45 +0800)]
Fix compatibility issues with Android clipboards

* java/org/gnu/emacs/EmacsClipboard.java (getClipboardData):
Return an AssetFileDescriptor.

* java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick):
Typo corrections in commentary.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Raise
minimum version on which to read file descriptors from
ParcelFileDescriptor objects to Honeycomb.

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Return the asset file descriptor.

* java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardData):
Adjust return type to match.

* src/android.h (struct android_parcel_file_descriptor_class):
Move from androidselect.c.

* src/androidselect.c (fd_class): Export function.
(android_init_emacs_clipboard): Adjust signature of
getClipboardData.
(android_init_asset_file_descriptor, close_asset_fd)
(extract_fd_offsets): New functions.
(Fandroid_get_clipboard_data): Extract file descriptor and
offset from the AssetFileDescriptor here, rather than in
getClipboardData.
(init_androidselect): Call android_init_asset_file_descriptor.

* src/androidvfs.c (android_init_fd_class): Export and enable
calling this function more than once.

(cherry picked from commit 2451456695d0e03b89365cbbe64effb2f99af2d5)

11 months ago; Fix widget button press cancellation
Po Lu [Wed, 1 May 2024 00:56:23 +0000 (08:56 +0800)]
; Fix widget button press cancellation

* lisp/wid-edit.el (widget-button--check-and-call-button): Throw
nil if a mouse-button-derived press is canceled.  Reported by
David Ponce <da_vid@orange.fr>.

(cherry picked from commit 294335b2304028cc97aca036bd37adf2f8e1c508)

11 months agoFix first appearance records for some misdated functions
Mattias Engdegård [Tue, 30 Apr 2024 16:01:52 +0000 (18:01 +0200)]
Fix first appearance records for some misdated functions

* etc/NEWS.unknown: Add approximate version records for
defsubst, mark, nreverse, let*, rassq, >=,
transpose-sexps, buffer-modified-p, current-column, downcase,
previous-line, catch, throw, and count-lines,
which all were given much more recent introduction versions
by describe-function.

(cherry picked from commit b094b2b9dc31c4dc03450b5905472a8e6dd531aa)

11 months ago* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Simplify.
Mattias Engdegård [Tue, 30 Apr 2024 13:20:34 +0000 (15:20 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Simplify.

(cherry picked from commit c15d67ecfc8f586165674c289880618caf7f270e)

11 months ago* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Simplify.
Mattias Engdegård [Tue, 30 Apr 2024 12:51:07 +0000 (14:51 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Simplify.

Remove the add-lambda argument.  All callers adapted.

(cherry picked from commit c3c2e3b4d3e9eac09293fca23e93f644e00e9431)

11 months ago; Update description of 'mail-mode'
Eli Zaretskii [Tue, 30 Apr 2024 13:04:26 +0000 (16:04 +0300)]
; Update description of 'mail-mode'

* doc/emacs/sending.texi (Mail Methods): More accurate description
of mail-mode's deficiencies.

(cherry picked from commit e272fd3da9286d4b87e687b291bdf1fd5489af96)

11 months agoFix deletion of text holding `inhibit-read-only' properties
Po Lu [Tue, 30 Apr 2024 10:26:39 +0000 (18:26 +0800)]
Fix deletion of text holding `inhibit-read-only' properties

* src/intervals.h (INTERVAL_VISIBLE_P): Split into ...
(INTERVAL_GENERALLY_WRITABLE_P, INTERVAL_EXPRESSLY_WRITABLE_P):
... two new macros.

* src/textprop.c (verify_interval_modification): If the buffer
is read only, verify not that there is only a single exempting
interval spanning the area of a multiple-character operation,
but that every intervening interval in such an operation exempts
it from write restrictions, either by providing a read-only
property that appears in Vinhibit_read_only, or by providing an
inhibit-read-only property.

* test/src/textprop-tests.el (textprop-interval-immutability):
New test.

(cherry picked from commit b36fd07560fd12c5e819e808a6f0eb9579f77c25)

11 months agoWork around bad GCC diagnostic in select_window
Paul Eggert [Tue, 30 Apr 2024 08:20:13 +0000 (01:20 -0700)]
Work around bad GCC diagnostic in select_window

* src/textconv.c (select_window): Add an eassume to work
around GCC bug 114893.

(cherry picked from commit aad80e1934f09b643b93aeb3bf9c1d583af6e2ec)

11 months agoPacify GCC 14 -Wanalyzer-out-of-bounds in hbfont.c
Paul Eggert [Tue, 30 Apr 2024 08:20:13 +0000 (01:20 -0700)]
Pacify GCC 14 -Wanalyzer-out-of-bounds in hbfont.c

* src/hbfont.c (hbfont_shape): Add an eassume.

(cherry picked from commit c57a03c75e91a42c49a293a9466b087a1e1592da)