1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

177321 commits

Author SHA1 Message Date
Po Lu
98ca8b46e6 ; * java/AndroidManifest.xml.in (Version-code): Update for Emacs 31. 2025-03-05 15:00:58 +08:00
Po Lu
b06d605bc0 Merge from savannah/emacs-30
121371a706 Move java/incrementing-version-code to AndroidManifest.xm...
8099dc6e3a Provide an Android version code derived from the Emacs ve...
59fcb2aa1b ; * lisp/register.el (register-use-preview): Doc fix (bug...
0383937a70 ; Improve documentation of 'shortdoc'
2025-03-05 15:00:22 +08:00
Po Lu
f5730e0251 ; Merge from savannah/emacs-30
The following commit was skipped:

d6288eeb42 image-dired: Don't croak on file names with regexp charac...
2025-03-05 15:00:22 +08:00
Po Lu
3d7cc22d25 Permit executing programs with >1024 args on Android
* src/android.c (MAXARGS): Delete enumerator.
(android_rewrite_spawn_argv): Don't mandate a maximum number of
arguments.
2025-03-05 15:00:14 +08:00
Po Lu
336cc32f2a ; * src/nsterm.m (syms_of_nsterm): Fix typo in comment. 2025-03-05 15:00:14 +08:00
Po Lu
121371a706 Move java/incrementing-version-code to AndroidManifest.xml.in
* admin/admin.el (admin-android-version-code-regexp): New
variable.
(set-version): Modify AndroidManifest.xml.in instead.

* java/AndroidManifest.xml.in (Version-code): Define version
code.

* java/incrementing-version-code: Delete file.
2025-03-05 14:59:19 +08:00
Peter Oliver
8099dc6e3a Provide an Android version code derived from the Emacs version
The version code is intended to be an integer that increments
for each Android package release
(https://developer.android.com/studio/publish/versioning#versioningsettings).

If we keep this updated under version control, then F-Droid (a
third-party Android package repository), can watch for that, and
use it to automatically build Emacs packages for Android each
time a new Emacs release is tagged
(https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckData).

* admin/admin.el (set-version): Update version code in
java/incrementing-version-code
* java/incrementing-version-code: New file containing an Android
version code corresponding to the current Emacs version.
(bug#75809)
2025-03-05 14:58:18 +08:00
Stefan Kangas
7ba6228413 Make byte-compile-cond-use-jump-table obsolete
This user option was introduced in 2017, with the rationale:

    "This is a workaround for when `byte-compile-cond-jump-table'
    accidentally generates wrong code (hasn't happened so far in my
    tests), and should be removed once we're sure there are no issues
    with it."  https://lists.gnu.org/r/emacs-devel/2017-02/msg00223.html

There hasn't been any bugs in this area within the last 6 years, and the
few we did see before that were quickly resolved.  Let's declare this
variable obsolete now, while keeping its behavior when set to nil.  We
can always revert the obsoletion if it turns out to be needed after all.

* lisp/emacs-lisp/bytecomp.el
(byte-compile-cond-use-jump-table): Declare obsolete.
2025-03-05 03:41:49 +01:00
Stefan Kangas
8c8ff13e7b Clean up 'cl-' prefixes for local variables
The 'cl-' prefixes used for let-bound variables and argument names is a
holdover from the dynbind days.  They are no longer necessary, and make
the code hard to read.  This was partially cleaned up in the past; let's
finish the job now.

* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many, cl-map, cl-maplist)
(cl-mapc, cl-mapl, cl-mapcan, cl-mapcon, cl-some, cl-every, cl-notany)
(cl-notevery, cl--map-keymap-recursively, cl--map-intervals)
(cl--map-overlays):
* lisp/emacs-lisp/cl-lib.el (cl-mapcar, cl-adjoin, cl-subst)
(cl--do-subst):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
* lisp/emacs-lisp/cl-seq.el (cl-reduce, cl-fill, cl-replace, cl-remove)
(cl-remove-if, cl-remove-if-not, cl-delete, cl-delete-if)
(cl-delete-if-not, cl-remove-duplicates, cl-delete-duplicates)
(cl--delete-duplicates, cl-substitute, cl-substitute-if)
(cl-substitute-if-not, cl-nsubstitute, cl-nsubstitute-if)
(cl-nsubstitute-if-not, cl-find, cl-find-if, cl-find-if-not)
(cl-position, cl--position, cl-position-if, cl-position-if-not)
(cl-count, cl-count-if, cl-count-if-not, cl-mismatch, cl-search)
(cl-sort, cl-stable-sort, cl-merge, cl-member, cl-member-if)
(cl-member-if-not, cl--adjoin, cl-assoc, cl-assoc-if, cl-assoc-if-not)
(cl-rassoc, cl-rassoc-if, cl-rassoc-if-not, cl-union, cl-nunion)
(cl-intersection, cl-nintersection, cl-set-difference)
(cl-nset-difference, cl-set-exclusive-or, cl-nset-exclusive-or)
(cl-subsetp, cl-subst-if, cl-subst-if-not, cl-nsubst, cl-nsubst-if)
(cl-nsubst-if-not, cl-sublis, cl--sublis-rec, cl-nsublis)
(cl--nsublis-rec, cl-tree-equal, cl--tree-equal-rec): Clean up 'cl-'
prefixes for let-bound variables and arguments.
2025-03-05 03:16:59 +01:00
Stefan Kangas
2230876265 ; * etc/symbol-releases.eld: Add cl-defun. 2025-03-05 02:41:52 +01:00
Po Lu
7678047a8a ; * etc/NEWS: Rearrange lightly. 2025-03-05 09:03:50 +08:00
Stefan Kangas
c18089a658 Avoid rare warning when byte-compiling cl-loaddefs.el
* lisp/emacs-lisp/cl-extra.el: Add autoloaded declare-function to avoid
rare byte-compilation warning.
Problem reported by Eli Zaretskii <eliz@gnu.org>.
2025-03-04 22:55:44 +01:00
Philipp Stephani
e978737f57 Make Emacs buildable with -std=c11.
With -std=c11, GCC doesn't recognize 'asm' as a keyword, see
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html and
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html.  Use __asm__
instead.

* src/lisp.h (flush_stack_call_func): Use __asm__ instead of asm.
2025-03-04 20:52:16 +01:00
F. Jason Park
4be2574851 ; Use ert-skip instead of skip-when in erc-match test
* test/lisp/erc/erc-match-tests.el (erc-add-entry-to-list): The local
macro `skip-when' first appeared in Emacs 30, but ERC supports Emacs 27+
and runs its test suite on all supported versions.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Temporarily tag as
:unstable in all CI environments.
2025-03-04 11:23:04 -08:00
Daniel Colascione
3a8ce5ac9c Add ns-click-through option to control activation click handling
* src/nsterm.m (acceptsFirstMouse):
Use ns_click_through variable instead of always returning YES.
(syms_of_nsterm): Define ns-click-through variable.

* lisp/cus-start.el: Add customization definition for ns-click-through.

* etc/NEWS: Document the new option.
2025-03-04 08:14:59 -08:00
Eli Zaretskii
59fcb2aa1b ; * lisp/register.el (register-use-preview): Doc fix (bug#76739). 2025-03-04 17:23:16 +02:00
Eli Zaretskii
0383937a70 ; Improve documentation of 'shortdoc'
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Fix doc
string and wording of prompt.  (Bug#76723)
2025-03-04 16:01:32 +02:00
Eli Zaretskii
a382bfdfa4 Fix 'etc/DOC' for a few functions/variables
* src/term.c (Ftty_frame_at):
* src/menu.c (syms_of_menu) <x-popup-menu-function>:
* src/dispnew.c (Fredisplay): Fix "doc:".  The extra blank was
preventing 'make-docfile' from recognizing the functions and
variables and extracting their documentation to 'etc/DOC'.
(Bug#76722)
2025-03-04 15:45:33 +02:00
Po Lu
25e2656dd9 ; * src/nsterm.m (ns_draw_stretch_glyph_string): One more spelling fix. 2025-03-04 21:10:36 +08:00
Po Lu
cd0a8c00a7 ; Fix style and language in src/nsterm.m
* src/nsterm.m (ns_maybe_dumpglyphs_background)
(ns_draw_stretch_glyph_string): Fix coding style.  Use American
English spelling.
2025-03-04 21:09:47 +08:00
Ben Simms
9cbbdcee13 Support colored stipples on Cocoa NS (Bug#73384)
On Cocoa builds of NS Emacs, stipples are now rendered
using masked CGImages instead of patterned NSColors so that
stipples now render with color.
* src/nsimage.m ([EmacsImage stippleMask:]): Use a CGImageMask to
store the stipple mask when building for Cocoa.
* src/nsterm.m (ns_maybe_dumpglyphs_background): Perform a masked
fill to draw stipples when building for Cocoa.
(ns_draw_stretch_glyph_string): Perform a masked fill to draw
stipples when building for Cocoa.
2025-03-04 14:31:35 +02:00
Vitaliy Chepelev
d6288eeb42 image-dired: Don't croak on file names with regexp characters
* lisp/image/image-dired-dired.el (image-dired-mark-tagged-files):
* lisp/image/image-dired-tags.el (image-dired-get-comment)
(image-dired-write-comments, image-dired-list-tags)
(image-dired-remove-tag, image-dired-write-tags): Quote file name
for search-forward-regexp.  (Bug#73445)

Copyright-paperwork-exempt: yes
(cherry picked from commit 7930fe2f44)
2025-03-04 10:58:41 +01:00
Po Lu
fe7a8c92be Merge from savannah/emacs-30
1b80bc67aa ; * doc/emacs/android.texi (Android Software): Minor mark...
dcfbf7d186 ; * etc/PROBLEMS: Document the same problem here.
b09bbf22af Document requirements respecting XDG MIME databases on An...
365a91622e ; (completion-preview--try-table): Propagate extra proper...

# Conflicts:
#	lisp/completion-preview.el
2025-03-04 14:32:48 +08:00
Po Lu
d9f93e8fdc ; Merge from savannah/emacs-30
The following commit was skipped:

828e08a996 Improve instructions for running with -fsanitize=address ...
2025-03-04 14:32:33 +08:00
Po Lu
9daab9be34 Merge from savannah/emacs-30
7dcf9b71e6 ; Don't document package-x.el
a5fd518d52 ; Document spurious warnings on macOS 15
625ed68aea Fix the use of xref-window-local-history together with Xr...
8091772767 completing-read-multiple: Fix support for ":" as separator
38cc36a375 ; Improve docstring of cl-check-type
2025-03-04 14:32:33 +08:00
Po Lu
1b80bc67aa ; * doc/emacs/android.texi (Android Software): Minor markup nits. 2025-03-04 14:30:31 +08:00
Po Lu
dcfbf7d186 ; * etc/PROBLEMS: Document the same problem here. 2025-03-04 14:29:37 +08:00
Po Lu
b09bbf22af Document requirements respecting XDG MIME databases on Android
* doc/emacs/android.texi (Android Software): State that librsvg
requires a MIME database to display embedded images, and how to
acquire such a database.
2025-03-04 14:29:37 +08:00
Paul Eggert
9415941a9c Revert “Avoid some union buffered_input_event uses”
Revert my commit 29a9fd4f4b
and the following commit 1ec0889e7b.
This fixes a bug where ‘emacs -nw’ would sometimes freeze when Emacs is
configured with ‘--with-pgtk --enable-link-time-optimization
--disable-gc-mark-trace’ on GNU/Linux x86-64 (Bug#76729).
As it is not yet clear whether this freeze is due to an Emacs bug that
I introduced, or due to GCC bug 117423
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423>,
play it safe for now and revert to the previous state.
2025-03-03 22:28:59 -08:00
Philipp Stephani
3e39b2418b ; * src/eval.c (Fdefvar_1, Fdefconst_1): Properly quote apostrophe. 2025-03-04 06:13:22 +01:00
Sean Whitton
a38ed1618d Fix unwanted revert file prompt after repeated vc-ediff (bug#11605)
* lisp/vc/ediff-vers.el (vc-find-revision-no-save): Declare.
(ediff-vc-internal, ediff-vc-merge-internal): Bind
vc-find-revision-no-save instead of calling
ediff-delete-version-file (bug#11605).
(ediff-delete-version-file): Delete.
2025-03-04 11:58:15 +08:00
Stefan Monnier
035077febe (advice--make-nadvice-docstring): Rename
* lisp/emacs-lisp/nadvice.el (advice--make-nadvice-docstring): Rename
from `nadvice--make-docstring`, to stick to the `advice-` namespace.
Update all callers.
2025-03-03 22:18:02 -05:00
Stefan Kangas
93c3a269ca ; Fix copyright years of the Spanish translations
These translations were created in 2025, so that is the correct
copyright year, even if the source material was created earlier.
2025-03-04 03:08:31 +01:00
Stefan Kangas
50baeb95c6 Update Makefile and docs for new Spanish refcards
* etc/refcards/Makefile (PDF_SPANISH, PS_SPANISH): New variables.
(PDF_TARGETS): Use above new variables.
(spanish, spanish-ps): New targets for Spanish translation.  (Bug#76300)
* admin/release-process:
* etc/refcards/README: Document new Spanish translation.
2025-03-04 03:02:16 +01:00
Elías Gabriel Pérez
05f0f14068 Add Spanish translation for survival.tex
* etc/refcards/es-survival.tex: New file.  (Bug#76300)
2025-03-04 03:02:16 +01:00
Elías Gabriel Pérez
00ff7d7503 Add Spanish translation for refcard.tex
* etc/refcards/es-refcard.tex: New file.  (Bug#76300)
2025-03-04 03:02:16 +01:00
Elías Gabriel Pérez
cf0dbc34e8 Add Spanish translation for dired-ref.tex
* etc/refcards/es-dired-ref.tex: New file.  (Bug#76300)
2025-03-04 03:02:16 +01:00
Po Lu
144b268a84 Render Android hourglass cursor mechanics more consistent with X
* src/androidterm.c (android_show_hourglass): Always define the
hourglass cursor, but...
(android_hide_hourglass): ... restore the invisible cursor
subsequently, if need be.
(android_toggle_visible_pointer): Do not hide the current cursor
if it is an hourglass.
2025-03-04 09:47:30 +08:00
Po Lu
d6aea7cc94 Circumvent another styling issue in Android 15 QPR1
* java/org/gnu/emacs/EmacsView.java (popupMenu): On Android 15
and later, reload the default theme before displaying popup
menus.
2025-03-04 09:47:30 +08:00
Matthew Bauer
ec517d1dcf Replace anonymous lambda timers with named functions
* lisp/emacs-lisp/eldoc.el (eldoc--update, eldoc-schedule-timer):
* lisp/jit-lock.el (jit-lock-context--update)
(jit-lock--antiblink-update): New functions broken out from...
* lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer):
* lisp/jit-lock.el (jit-lock-mode, jit-lock--antiblink-post-command):
...here.  Use them as values for timers, to give them readable names
in 'M-x list-timers'.  (Bug#71354)
2025-03-04 02:42:45 +01:00
Stefan Kangas
d9218651b6 ; Fix my last commit
* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single-from-archive/string-type): Delete test.
2025-03-04 02:42:45 +01:00
Stefan Kangas
5dd8b7e752 Don't accept strings in package-(install|upgrade)
* lisp/emacs-lisp/package.el (package-install): Revert recent change to
accept string PKG argument.
(package-upgrade): No longer accept string NAME argument.  (Bug#72160)
2025-03-04 01:58:12 +01:00
Eli Zaretskii
c116dad608 Avoid crashes on MS-Windows on repeated client connections
* src/w32uniscribe.c (uniscribe_close): Zero out dwrite cache.
Suggested by Richard Copley <rcopley@gmail.com>.  (Bug#76121)
2025-03-03 21:29:45 +02:00
Eli Zaretskii
1ec0889e7b Fix MS-Windows build broken by buffered_input_event changes
* src/keyboard.c (kbd_buffer_store_selection_event_hold):
* src/keyboard.h (kbd_buffer_store_selection_event_hold): Declare
and define only for (HAVE_X11 || HAVE_PGTK).
2025-03-03 21:08:35 +02:00
Juri Linkov
dbc0e5a52d Improve treesit settings for js-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Add 'class' alongside 'class_declaration'.
(js--treesit-defun-name): Add "variable_declaration"
alongside "lexical_declaration".
(js--treesit-valid-imenu-entry): Add "variable_declaration"
and provide the predicate to 'treesit-node-top-level'.
(js--treesit-sentence-nodes): Add "jsx_attribute" like in html-ts-mode
instead of jsx elements matched in 'js--treesit-list-nodes'.
(js--treesit-list-nodes): Add "jsx_element" and "jsx_self_closing_element"
instead of "_jsx_string".
(js--treesit-simple-imenu-settings): Move "method_definition" to separate
section "Method" from the "Class" section.  Add "variable_declaration"
to the "Variable" section.
(js-ts-mode--outline-predicate): New variable.
(js--treesit-defun-type-regexp): Add bos/eos.
(js--treesit-jsdoc-comment-regexp): Add bos/eos.
(js-ts-mode): Set treesit-outline-predicate to
'js-ts-mode--outline-predicate'.

* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--html-defun-name):
Remove unused function.
(mhtml-ts-mode): Use 'js-ts-mode--outline-predicate' in
'treesit-aggregated-outline-predicate'.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--outline-predicate):
Use 'treesit-node-top-level' instead of 'treesit-parent-until'.
2025-03-03 20:38:40 +02:00
Stefan Kangas
10abb87f05 Fix fontification outside hunks in Git patches
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Don't fontify lines in
Git patches starting with + or - as added/removed, if they are either
before the first hunk, or in the email signature.  (Bug#75884)
(diff-buffer-type): Move definition up.
(diff--indicator-added-re, diff--indicator-removed-re): New variables.
(diff--git-preamble-end, diff--git-footer-start)
(diff--indicator-matcher-helper, diff--indicator-added-matcher)
(diff--indicator-removed-matcher): New functions.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature): New tests.
* test/lisp/vc/diff-mode-resources/git.patch: New file.
2025-03-03 18:57:17 +01:00
Stefan Kangas
eeda2a8ab1 Improve argument type error in load-theme
* lisp/custom.el (load-theme): Improve error message when passing in a
non-symbol THEME argument.
2025-03-03 18:57:17 +01:00
Paul Eggert
29a9fd4f4b Avoid some union buffered_input_event uses
Simplify by using separate local vars for struct input_event and
struct selection_input_event, rather than a single local var that
is the union of the two.  This makes the code easier to follow by
the human reader, and should help avoid GCC bug 117423
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423> and
therefore work around Emacs bug 76559 <https://bugs.gnu.org/76559>.
* src/androidterm.c (handle_one_android_event):
* src/gtkutil.c (xg_widget_key_press_event_cb):
* src/pgtkterm.c (evq_flush):
* src/xterm.c (handle_one_xevent): Use struct input_event and
kbd_buffer_store_event_hold, or struct selection_input_event and
kbd_buffer_store_selection_event_hold, rather than union
buffered_input_event and union buffered_input_event.
* src/keyboard.c (beware_long_paste, maybe_quit_while_no_input):
New functions, broken out from kbd_buffer_store_buffered_event.
(kbd_buffer_store_event_hold): Define here, with a simplified
version of the body of the old kbd_buffer_store_buffered_event,
rather than defining in keyboard.h.  Specialize to struct
input_event.
(kbd_buffer_store_selection_event_hold): New function; it is
a simplified version of the old kbd_buffer_store_buffered_event,
specialized to struct selection_input_event.
(is_ignored_event_kind): Accept enum event_kind instead of
union buffered_input_event.  All callers changed.
* src/keyboard.h (kbd_buffer_store_event_hold):
Remove definition, as keyboard.c now defines it.
* src/pgtkterm.c (evq_grow_if_needed): New function.
(evq_enqueue, evq_selection_enqueue): Two functions now,
not one.  Args are now struct input_event const * or
struct selection_input_event const *, not
union buffered_input_event *.  All callers changed.
This lets us simplify the callers so that they need
not use the union.
2025-03-03 09:44:42 -08:00
Po Lu
96d26b4936 Fix styling issues on Android 15 QPR1
* java/org/gnu/emacs/EmacsView.java (EmacsView): Guarantee that
frame views are created with the correct theme.

* java/res/values-v20/style.xml (EmacsStyle):

* java/res/values-v29/style.xml (EmacsStyle): Disable a swiping
gesture enabled on certain Android systems.

* java/res/values-v35/style.xml: Rename from `styles'.xml.
2025-03-03 21:59:41 +08:00
Po Lu
f372508f68 ; Adapt another test to Android
* test/lisp/erc/erc-match-tests.el (erc-add-entry-to-list): Skip
on Android as it hangs for reasons unknown.
2025-03-03 21:59:41 +08:00