1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

176949 commits

Author SHA1 Message Date
Po Lu
9faa8d32a3 Merge from savannah/emacs-30
ded77fefff Fix remaining Android bugs reported over the past months
2025-02-19 20:42:22 +08:00
Po Lu
ded77fefff Fix remaining Android bugs reported over the past months
* java/org/gnu/emacs/EmacsActivity.java (attachWindow):
Guarantee that child windows promoted to toplevels receive
layout parameters that direct them to receive their parents'
dimensions.  Otherwise, the size of the window as a child is
retained on Huawei HarmonyOS 4.2 and possibly other Android
distributions.

* java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo):
Run anchor updates on the UI thread, as
`InputMethodManager#updateCursorAnchorInfo' is liable to call
`View#requestLayout'.

* java/org/gnu/emacs/EmacsView.java (onMeasure): Always call
`measureChildren', or child frames' onLayout handlers might not
be invoked after they request a layout cycle and are duly
processed in `onLayout'.
(swapBuffers): Delete erroneous commentary.

* java/org/gnu/emacs/EmacsWindow.java (viewLayout): If
overrideRedirect, don't inadvertently clear rect.left and
rect.top by recording the window's WM window-relative position.
Fix typos.
(reparentTo): Invalidate focus after transferring frame.
(translateCoordinates): Account for override-redirect windows.
Mostly important for mouse-drag-and-drop-region.
2025-02-19 20:40:12 +08:00
Jared Finder
0c8abe8bb5 * lisp/subr.el (read-key): Add 'tab-line' (bug#76408). 2025-02-19 09:41:44 +02:00
Gerd Möllmann
23bf94a011 Don't call x-popup-function for non-tty frames
* src/menu.c (x_popup_menu_1): Don't call x-popup-function for non-tty
frames
(syms_of_menu): Remove Qx_popup_menu_function because unused, extend doc
string of x-popup-menu-function.
2025-02-19 08:36:59 +01:00
Po Lu
4fb5ff5426 Merge from savannah/emacs-30
e97be722d3 Properly move existing tooltips on Android
0cf3d34152 ; * ChangeLog.4: Reformat down to 28 March 2024.
ccaa0be8e7 ; * ChangeLog.4: Check in ommitted change.
b5410cbea2 ; * ChangeLog.4: Fix log entries down to the 1 May 2024.
be7625cae7 ; Fix typos
d447cd9fcc ; * ChangeLog.4: Update.
5dc2a57375 ; * admin/authors.el (authors-ignored-files): Ignore gnus...
2025-02-19 15:36:08 +08:00
Po Lu
e97be722d3 Properly move existing tooltips on Android
* java/org/gnu/emacs/EmacsWindow.java (requestViewLayout): If an
override redirect window, additionally notify the window manager
of layout changes.
2025-02-19 15:34:51 +08:00
Po Lu
0cf3d34152 ; * ChangeLog.4: Reformat down to 28 March 2024. 2025-02-19 15:33:59 +08:00
Gerd Möllmann
1194ebe3a7 Handle nil top frame (bug#76410)
* src/frame.c (do_switch_frame): Don't assume that top_frame is always a
frame, it can be nil.
2025-02-19 08:05:56 +01:00
Stefan Monnier
9143c18ae4 (json-pretty-print): Rework a bit
* lisp/json.el (json-pretty-print): Call 'replace-buffer-contents'
separately for each json object rather than once at the end, so
its work is easier.  Use 'json--print' rather than 'json-encode' so as
to avoid creating yet more temp buffers.
2025-02-18 22:27:31 -05:00
Po Lu
bb45d35ea7 ; * etc/NEWS: Document the previous change. 2025-02-19 10:18:10 +08:00
Po Lu
d05894f82d Don't insist on the presence of a mouse in strokes-mode
* lisp/strokes.el (strokes-mode): Don't test `display-mouse-p',
as the presence of a mouse may vary over the course of an Emacs
session.
2025-02-19 10:18:10 +08:00
kobarity
4509662236 Add python-ts-mode to ffap-alist
* lisp/progmodes/python.el (ffap-alist): Add
python-ts-mode.  (Bug#76364)
2025-02-19 03:07:34 +01:00
Stefan Kangas
4faade9f84 ; * etc/NEWS: Move cl-lib related entries to proper section. 2025-02-18 22:36:33 +01:00
Stefan Kangas
4c4f907bad Make cl-locally obsolete
* doc/misc/cl.texi (Declarations): Don't document cl-locally.
* lisp/emacs-lisp/cl-macs.el (cl-locally): Make into obsolete
function alias for progn.
2025-02-18 22:30:41 +01:00
Stefan Kangas
ef34303eaf ; Fix copyright year in last commit 2025-02-18 21:56:00 +01:00
Rahul Martim Juliato
a102dcebb7 Add markdown-ts-mode
* lisp/textmodes/markdown-ts-mode.el: New file.
Ref: https://lists.gnu.org/r/emacs-devel/2024-06/msg01061.html
2025-02-18 21:56:00 +01:00
Stefan Monnier
d685d21e8a (lexical-binding): Allow changing the default value (bug#74145)
* lisp/loadup.el: Preserve (default-toplevel-value 'lexical-binding).

* src/lread.c (Fload, Feval_buffer): Obey (default-toplevel-value
'lexical-binding).

* doc/lispintro/emacs-lisp-intro.texi (Lexical vs Dynamic Binding
Example): Use the lexical dialect also for the dynamic
scoping example.
* doc/lispref/edebug.texi (Edebug Eval): Remove long-obsolete mention
of Edebug support for `lexical-let`.
2025-02-18 15:37:50 -05:00
Gerd Möllmann
790c2f7c1c ; * .mailmap: Change my entries. 2025-02-18 21:27:03 +01:00
Liu Hui
db8af88222 Disable PyREPL in Python shell
The new default REPL (PyREPL) in Python 3.13 is incompatible
with Python shell and displays a warning message when reverting
to the old basic REPL.

* lisp/progmodes/python.el
(python-shell--calculate-process-environment): Use the basic
REPL.  (Bug#76205)
2025-02-18 20:04:17 +01:00
kobarity
a75f4449fa Improve completion in IPython/Python 3.13
IPython/Python 3.13 indirectly imports rlcompleter, and the
completer is set up to reference rlcompleter.__main__.
However, this rlcompleter.__main__ is different from the
__main__ in the REPL execution.  Therefore, this completer
cannot correctly complete the REPL globals.  To address this
issue, we override rlcompleter.__main__ with __main__ only in
the case of IPython.

* lisp/progmodes/python.el (python-shell-completion-native-setup):
Modify __PYTHON_EL_native_completion_setup().  (Bug#76205)
2025-02-18 20:04:16 +01:00
Stefan Kangas
c180966b31 Prefer defvar-keymap in tcl.el
* lisp/progmodes/tcl.el (tcl-mode-map, inferior-tcl-mode-map): Prefer
defvar-keymap.
2025-02-18 20:04:16 +01:00
Stefan Kangas
697e7c3211 Prefer defvar-keymap in pascal.el
* lisp/progmodes/pascal.el (pascal-mode-map, pascal-outline-map):
Prefer defvar-keymap.
2025-02-18 20:04:16 +01:00
Stefan Kangas
941ba65d1e Prefer defvar-keymap in meta-mode.el
* lisp/progmodes/meta-mode.el (meta-common-mode-map): Prefer
defvar-keymap.
2025-02-18 20:04:16 +01:00
Stefan Kangas
93206cd138 Prefer plusp to open-coding it in image-dired
* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-forward-image, image-dired-slideshow-start)
(image-dired-line-up-interactive): Prefer plusp to open-coding it.
2025-02-18 20:04:16 +01:00
Stefan Monnier
20edecd21f Merge remote-tracking branch 'refs/remotes/origin/master' 2025-02-18 10:07:34 -05:00
Gerd Möllmann
4d3a618941 ; * src/menu.c (x_popup_menu_1): Fix typo. 2025-02-18 16:05:38 +01:00
Stefan Monnier
41624d94ce (replace_range): Delete last arg, always the negation of the first bool
* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.
2025-02-18 10:05:34 -05:00
Stefan Monnier
19f5ccbf39 src/search.c (Freplace_match): Let replace_range call the a-c-f 2025-02-18 09:54:48 -05:00
Stefan Monnier
9854103b52 * src/editfns.c (Fsubst_char_in_region): Delete left-over code
This code was missed back in 2000 (commit 1b16afa45bb6).
2025-02-18 09:52:35 -05:00
Gerd Möllmann
bf067daf0d * src/menu.c (x_popup_menu_1): Use calln. 2025-02-18 15:47:18 +01:00
Eli Zaretskii
c54d6680d3 ; * etc/NEWS: Fix punctuation. 2025-02-18 16:40:42 +02:00
Po Lu
37fad04830 * src/menu.c (x_popup_menu_1): Fix coding style. 2025-02-18 21:00:08 +08:00
Po Lu
0cf3823463 Don't access overriding-text-conversion-style when unbound
* lisp/replace.el (perform-replace): Don't access
overriding-text-conversion-style when unbound, and also avoid
needlessly polluting this symbol with a binding.  (bug#76371)
2025-02-18 20:58:55 +08:00
Po Lu
ccaa0be8e7 ; * ChangeLog.4: Check in ommitted change. 2025-02-18 20:51:31 +08:00
Po Lu
b5410cbea2 ; * ChangeLog.4: Fix log entries down to the 1 May 2024. 2025-02-18 20:47:32 +08:00
Stefan Kangas
be7625cae7 ; Fix typos 2025-02-18 05:42:12 +01:00
Stefan Kangas
d447cd9fcc ; * ChangeLog.4: Update. 2025-02-18 05:42:12 +01:00
Stefan Kangas
5dc2a57375 ; * admin/authors.el (authors-ignored-files): Ignore gnus-nocem.el. 2025-02-18 05:42:12 +01:00
Gerd Möllmann
17bf6b9efe Add x-popup-menu-function
* src/menu.c (x_popup_menu_1): If non-nil call x-popup-menu-function.
(syms_of_menu): DEFSYM x-popup-menu-function, DEFVAR_LISP it.
2025-02-18 05:13:16 +01:00
Gerd Möllmann
a51cfbbd15 Hide cursor based on tty frame's `cursor-type'
* src/dispnew.c (terminal_cursor_magic): if selected-frame has
`(cursor-type . nil)' parameter.
2025-02-18 05:05:39 +01:00
john muhl
df93e53a1c Add MPD stats viewer to 'mpc' (Bug#76350)
* lisp/mpc.el (mpc-server-stats): New command.
(mpc-mode-menu): Add menu item.
(mpc--server-stats-date, mpc--server-stats-duration):
New variable.
(mpc--server-stats-date, mpc--server-stats-duration):
(mpc--server-stats-format): New function.
(mpc-song-viewer-value, mpc-song-viewer-tag):
(mpc-song-viewer-empty): Remove face.
(mpc-table-value, mpc-table-key, mpc-table-empty): New face.
(mpc-describe-song): Use new table face names.
2025-02-17 22:40:29 -05:00
Basil L. Contovounesios
2e3cf73e05 Improve autoconf-mode macro detection
* doc/lispref/modes.texi (Search-based Fontification): Fix
indentation of (MATCHER . FACESPEC) example.
* doc/misc/cc-mode.texi (Performance Issues): Index
defun-prompt-regexp under variables, not functions.

* lisp/progmodes/autoconf.el (autoconf--symbol, autoconf--macro):
New rx definitions.
(autoconf-definition-regexp): Use an optional second capture group
to indicate a function rather than variable definition.  Detect
AC_DEFINE defining a function-like CPP macro.  Skip more shell
syntax such as variable ${} expansion and command `` substitution in
AC_DEFINE_UNQUOTED variable.  Match AH_VERBATIM, AM_CONDITIONAL, and
AM_MISSING_PROG as defining variables, and AC_DEFUN, AC_DEFUN_ONCE,
AU_ALIAS, and AU_DEFUN as defining functions.  Document first
capture group in docstring.
(autoconf-font-lock-keywords): Use autoconf--macro to match more
Autoconf macros, such as those defined in the Autoconf Archive and
Gnulib.  Reserve font-lock-function-name-face for function
definitions as determined by autoconf-definition-regexp, and use
font-lock-variable-name-face for the rest instead.  Use Font Lock
face symbols directly in place of their corresponding variable.
Fontify M4 changequote primitive only as a standalone symbol.
(autoconf-imenu-generic-expression): Add commentary mentioning new
submenu possibility.
(autoconf-current-defun-function): Update docstring accuracy.
Replace line-end-position with pos-eol since there are no fields.
(autoconf-mode): Define defun-prompt-regexp in terms of
autoconf--macro to support more toplevel macros, such as those
defined in Autoheader, M4sh, etc.  Set
open-paren-in-column-0-is-defun-start to nil to avoid false
positives when an Autoconf quote character is in column zero.

* test/lisp/progmodes/autoconf-resources/configure.ac: New file.
* test/lisp/progmodes/autoconf-tests.el
(autoconf-tests-current-defun-function-define)
(autoconf-tests-current-defun-function-subst): Replace character
motion with search.
(autoconf-tests-autoconf-mode-comment-syntax): Ditto.  Test both dnl
and # comments.  Use syntax-ppss-context.
(autoconf-tests-font-lock): New test.
2025-02-17 17:28:05 -08:00
Antero Mejr
9cedb434ee Add file completion for git apply, am to pcomplete
* lisp/pcmpl-git.el (pcomplete/git): Add an "apply" and "am" clause to
complete all files.  (Bug#76356)
2025-02-18 00:03:05 +01:00
Stefan Kangas
515542b653 Prefer oddp/evenp to open-coding in a few more cases
* lisp/arc-mode.el (archive-zip-summarize):
* lisp/cus-edit.el (setopt):
* lisp/isearch.el (isearch-backslash):
* lisp/simple.el (blink-paren-post-self-insert-function):
* lisp/subr.el (setq-local, buffer-local-set-state):
* lisp/term.el (term-within-quotes):
* test/src/data-tests.el (test-bool-vector-bv-from-hex-string): Use
oddp/evenp instead of open-coding them.
Reported by Pip Cet <pipcet@protonmail.com>.
2025-02-18 00:00:31 +01:00
Richard Stallman
abd861ca26 merging with my changes in cond-star.el. 2025-02-17 16:56:22 -05:00
Stefan Kangas
8a7c1a31ac Prefer plusp/minusp to open-coding them in subr.el
* lisp/subr.el (lsh, nbutlast, number-sequence, add-to-history)
(read-char-from-minibuffer, split-string, subst-char-in-string)
(forward-whitespace, forward-symbol, forward-same-syntax)
(progress-reporter-do-update, version-list-<): Prefer plusp/minusp to
open-coding them.
2025-02-17 22:48:47 +01:00
Stefan Kangas
83bc811f7f Prefer plusp/minusp to cl-plusp/cl-minusp
* lisp/dired.el (dired--move-to-next-line):
* lisp/emacs-lisp/ert.el (ert-run-tests-batch, ert-face-for-stats):
* lisp/emacs-lisp/pp.el (pp--format-definition):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--org-timestamp):
* lisp/ibuffer.el (ibuffer-compile-format, ibuffer--format-title)
(ibuffer--format-summary):
* lisp/image-mode.el (image-transform-set-percent):
* lisp/international/emoji.el (emoji--list-generate, emoji--read-emoji):
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation)
(ebrowse-set-member-buffer-column-width)
(ebrowse-cyclic-display-next/previous-member-list)
(ebrowse-draw-member-short-fn)
(ebrowse-switch-member-buffer-to-sibling-class, ebrowse-push-position):
* lisp/textmodes/dns-mode.el (dns-mode-reverse-and-expand-ipv6):
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--not-writable-directory)
(bytecomp-tests--dest-mountpoint)
(bytecomp-tests--target-file-no-directory):
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-member-if-test)
(cl-member-if-not-test, cl-assoc-if-not-test, cl-rassoc-if-test)
(cl-rassoc-if-not-test):
* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid):
Prefer plusp and minusp to cl-plusp and cl-minusp.
2025-02-17 22:46:56 +01:00
Stefan Kangas
afbf932106 New functions plusp and minusp
* lisp/emacs-lisp/cl-lib.el (cl-plusp, cl-minusp): Move from here...
* lisp/subr.el (plusp, minusp): ...to here.  Make old names into
aliases, documented as deprecated.  Add type declarations.  Change from
defsubst to regular functions with compiler macros.
* lisp/obsolete/cl.el: Don't alias plusp and minusp.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-plusp)
(cl-lib-test-minusp): Move tests from here...
* test/lisp/subr-tests.el (subr-test-plusp, subr-test-minusp):
...to here.

* doc/lispref/numbers.texi (Predicates on Numbers): Document plusp
and minusp.
* doc/misc/cl.texi (Predicates on Numbers): Delete cl-plusp and
cl-minusp.
* lisp/emacs-lisp/shortdoc.el (number): Document plusp and minusp
instead of cl-plusp and cl-minusp.
2025-02-17 22:46:56 +01:00
Yuan Fu
1d27028df8
; Update comments for mhtml-ts-mode--treesit-indent-rules
* lisp/textmodes/mhtml-ts-mode.el:
(mhtml-ts-mode--treesit-indent-rules): Update comments.
2025-02-17 13:41:30 -08:00
Yuan Fu
237afc82b2
Rename treesit-add-simple-indent-rules
* lisp/treesit.el (treesit-add-simple-indent-rules): Rename to
treesit-simple-indent-add-rules.
* etc/NEWS: Update.
* test/src/treesit-tests.el:
(treesit-test-simple-indent-add-rules): Update accordingly.
2025-02-17 13:38:15 -08:00