1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-09 05:01:02 -08:00
Commit graph

173827 commits

Author SHA1 Message Date
Po Lu
5c09557df3 Merge from savannah/emacs-30
6f9f9a2155 Fix two tests for --without-all build
2024-06-28 14:46:53 +08:00
Stefan Monnier
b595b4598e (buf_bytepos_to_charpos): Fix mixup introduced in commit b300052fb4
* src/marker.c (buf_bytepos_to_charpos): Don't compare byte-positions
with char-positions.
2024-06-27 15:36:28 -04:00
F. Jason Park
2531721621 Change ERC version to 5.6.1-git
* doc/misc/erc.texi: Change ERCVER to 5.6.1.
* lisp/erc/erc.el: (erc-version): Change working version to 5.6.1-git.
Do the same for the package Version header.  Don't bother updating
`customize-package-emacs-version-alist' until needed.
2024-06-27 06:36:18 -07:00
Andrea Corallo
6f9f9a2155 Fix two tests for --without-all build
* test/src/image-tests.el
(image-tests-image-mask-p/error-on-nongraphical-display)
(image-tests-image-metadata/error-on-nongraphical-display): xpm images
are not supported in all configurations so use xbm for non graphical
display tests.
2024-06-27 15:32:51 +02:00
Po Lu
a67928c6ba Merge from savannah/emacs-30
98daa10f06 ; * etc/PROBLEMS (PGTK): Remove redundant 2nd PGTK section.
ced33bc239 Fix handling of non-nil 'dired-movement-style'
b1e9b6fd67 ; * lisp/gnus/message.el (message-idna-to-ascii-rhs): Doc...
5eb9a0d2c7 ; * etc/NEWS: Fix last change (bug#71720).
6ec77f580d Do not prematurely truncate python eldoc string
f475a1a254 ; Fix simple-tests as fallout of last change
aa10d0c5ac Add tests for `kill-whole-line' (bug#65734)
058bb4ca25 kill-whole-line: Honor visibility; fix kill-ring when rea...
e45173d114 * lisp/hi-lock.el (hi-lock-file-patterns-policy): Add val...
d6afb017de * lisp/progmodes/xref.el (xref-revert-buffer-restore-poin...
82125b1a66 Use 'revert-function' in *xref* buffer

# Conflicts:
#	etc/NEWS
2024-06-27 20:32:08 +08:00
Eli Zaretskii
98daa10f06 ; * etc/PROBLEMS (PGTK): Remove redundant 2nd PGTK section. 2024-06-27 13:34:21 +03:00
Eli Zaretskii
ced33bc239 Fix handling of non-nil 'dired-movement-style'
* lisp/dired.el (dired--move-to-next-line): Treat any non-nil
value of 'dired-movement-style' except 'cycle' as 'bounded'.
(dired-movement-style): Mention this in the doc string.
(Bug#71770)
2024-06-27 12:42:43 +03:00
Eli Zaretskii
b1e9b6fd67 ; * lisp/gnus/message.el (message-idna-to-ascii-rhs): Doc fix (bug#71757). 2024-06-27 12:33:47 +03:00
Eli Zaretskii
5eb9a0d2c7 ; * etc/NEWS: Fix last change (bug#71720). 2024-06-27 11:55:29 +03:00
James Thomas
6ec77f580d Do not prematurely truncate python eldoc string
'eldoc-echo-area-use-multiline-p' is there for that.
* lisp/progmodes/python.el (python-eldoc-setup-code):
Make the change.  (Bug#71720)

* etc/NEWS: Announce the change in behavior.
2024-06-27 11:53:29 +03:00
Eli Zaretskii
f475a1a254 ; Fix simple-tests as fallout of last change
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): Fix test broken by new
kill-whole-line tests.  (Bug#65734)
2024-06-27 11:37:15 +03:00
Sebastian Miele
aa10d0c5ac Add tests for `kill-whole-line' (bug#65734)
* test/lisp/simple-tests.el (simple-test-point-tag):
(simple-test-mark-tag):
(simple-test--set-buffer-text-point-mark):
(simple-test--get-buffer-text-point-mark): Add helper functions used by
the tests.
(kill-whole-line-invisible):
(kill-whole-line-read-only):
(kill-whole-line-after-other-kill):
(kill-whole-line-buffer-boundaries):
(kill-whole-line-line-boundaries): Add tests for `kill-whole-line'.
2024-06-27 10:49:01 +03:00
Sebastian Miele
058bb4ca25 kill-whole-line: Honor visibility; fix kill-ring when read-only (bug#65734)
* lisp/simple.el (kill-whole-line): Use visibility state before
performing any edits as reference instead of expecting that visibility
cannot change.  First of the two calls to `kill-region' may trigger
`after-change-functions' that might alter the visibility state.
Make sure that we populate the `kill-ring' with the contents of the
whole line when buffer is in `read-only-mode'.
2024-06-27 10:48:18 +03:00
Juri Linkov
e45173d114 * lisp/hi-lock.el (hi-lock-file-patterns-policy): Add value 'always'.
(hi-lock-mode): Update docstring.
(hi-lock-find-patterns): Return t for value 'always'.
(hi-lock-revert-buffer-rehighlight): Rewrite to correctly handle
all possible cases (bug#57534).
2024-06-27 09:52:06 +03:00
Juri Linkov
d6afb017de * lisp/progmodes/xref.el (xref-revert-buffer-restore-point): New function.
(xref--xref-buffer-mode): Add xref-revert-buffer-restore-point
to revert-buffer-restore-functions (bug#71466).
2024-06-27 09:42:34 +03:00
Po Lu
2078ce4220 Merge from savannah/emacs-30
860840621a Prevent crashes and related issues if initial activity is...
d5c6eb1f96 Doc fix in 'php-ts-mode'
fb15affde8 Avoid compiler warnings in the Cygwin-w32 build
8d354925dd Add new face 'widget-unselected' to wid-edit.el

# Conflicts:
#	etc/NEWS
2024-06-27 11:08:31 +08:00
Po Lu
4af6a13aed ; Merge from savannah/emacs-30
The following commit was skipped:

1809f6a93e Always perform Eshell process cleanup runs in the Eshell ...
2024-06-27 11:08:25 +08:00
Po Lu
860840621a Prevent crashes and related issues if initial activity is destroyed on Android
* java/org/gnu/emacs/EmacsWindow.java
(EmacsWindow) <initialWindowCreated>: New variable.
(EmacsWindow): If the initial frame has not yet been created,
set attachmentToken to -1.

* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow):
When the window's attachment token is -1 (i.e., it is the
default window), start EmacsActivity rather than
EmacsMultitaskActivity.  Catch exceptions around startActivity.
2024-06-27 11:07:38 +08:00
Po Lu
fa322155ad Disable preprocessing of assembler files with m4 on non-MIPS systems
* exec/Makefile.in (is_mips): New substitution.
(.s.o): Avoid calling m4 unless it be set.

* exec/configure.ac: Substitute is_mips, and don't generate
config-mips.m4 otherwise.

* exec/loader-x86.s:

* exec/loader-x86_64.s: Use assembler rather than m4-defined
comment syntax.
2024-06-27 10:15:13 +08:00
Stefan Kangas
da11a2a5cc Improve Local Directory Variables auto-insert
* lisp/autoinsert.el (auto-insert-alist): Confirm after entering
in a non-existent mode in Local Directory Variables skeleton.
2024-06-27 01:50:18 +02:00
Vincenzo Pupillo
d5c6eb1f96 Doc fix in 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--custom-html-font-lock-settings): Doc fix.  (Bug#71759)
2024-06-27 01:47:27 +02:00
Stefan Kangas
a2c3a91f0e Support .dir-locals-2.el in auto-insert-mode
* lisp/autoinsert.el (auto-insert-alist): Use Directory Local Variables
skeleton also for ".dir-locals-2.el".
2024-06-27 01:40:54 +02:00
Eshel Yaron
82125b1a66
Use 'revert-function' in *xref* buffer
* lisp/progmodes/xref.el (xref--xref-buffer-mode-map): Cease
binding 'g' to 'xref-revert-buffer'.
(xref--xref-buffer-mode): Set 'revert-buffer-function' to...
(xref--revert-buffer): ...this.  New function, renamed from...
(xref-revert-buffer): ...this.  Make it an alias of
'revert-buffer'.
* etc/NEWS: Announce it.
* doc/emacs/maintaining.texi (Xref Commands): Update docs.
2024-06-26 22:59:42 +02:00
Stefan Monnier
78951610a6 (quail-input-method): Fix bug#70541
* lisp/international/quail.el (quail-input-method): Don't bind
`inhibit-modification-hooks`.
(quail-point-in-conversion-region): Simplify.
2024-06-26 16:18:57 -04:00
Ken Brown
fb15affde8 Avoid compiler warnings in the Cygwin-w32 build
* src/w32fns.c [DEFAULT_IMAGE_BASE]: Don't define on Cygwin.
* src/cygw32.h (w32_get_resource): Add prototype.  (Bug#71786)
2024-06-26 15:58:35 -04:00
Eshel Yaron
9cb2a20408
Minor improvements to new Completion Preview commands
* lisp/completion-preview.el (Commentary): Mention
`completion-preview-partial-insert' and elaborate about
`completion-preview-insert-sexp'.
(completion-preview--barf-if-no-preview): New function.
(completion-preview-insert, completion-preview-complete):
Use it.
(completion-preview-partial-insert): Rename arg to FUN; only
compute (+ end (length aft)) once; bind 'deactivate-mark' to
nil while inserting/deleting to allow commands that use this
function to work as expected with 'shift-select-mode';
improve behavior when called with point not at the start of
the completion preview overlay (e.g. when point is in the
middle of a multi-word symbol and this function is called
via 'completion-preview-insert-word'); add the base part of
the completion candidate to when calling exit-function.
(completion-preview-insert-word): Improve docsting, rename
argument ARG to N.
(completion-preview-insert-sexp): Likewise, and also remove
second argument INTERACTIVE.
(completion-preview--active-p): Rename to...
(completion-preview-active-p): ...this.  Make this function
public so users can leverage it for their own commands.
Extend docstring to explain how to do that.

* test/lisp/completion-preview-tests.el
(completion-preview-insert-calls-exit-function)
(completion-preview-insert-word): Break long lines.
(completion-preview-insert-sexp)
(completion-preview-insert-nonsubword)
(completion-preview-insert-subword): Fix docstrings.
(completion-preview-insert-mid-symbol): New test.
2024-06-26 12:26:50 +02:00
Jules Tamagnan
b3017e7c25
New commands 'completion-preview-insert-{word,sexp}'
* lisp/completion-preview.el
(completion-preview-partial-insert): New function.
(completion-preview-insert-word)
(completion-preview-insert-sexp): New commands.
(completion-preview-commands): Add them.
(Commentary): Document them.
(completion-preview-active-mode-map): Add comment.
* test/lisp/completion-preview-tests.el
(completion-preview-insert-calls-exit-function): Update.
(completion-preview-insert-nonsubword)
(completion-preview-insert-subword)
(completion-preview-insert-sexp):  New tests.  (Bug#71716)
2024-06-26 12:26:50 +02:00
Stephen Berman
8d354925dd Add new face 'widget-unselected' to wid-edit.el
* doc/misc/widget.texi (Customization): Document it.

* etc/NEWS: Announce 'widget-unselected' face.

* lisp/wid-edit.el (widget-unselected): New face.
(widget-specify-unselected, widget-specify-selected): New functions.
(widget-checkbox-action, widget-checklist-add-item)
(widget-radio-add-item, widget-radio-value-set)
(widget-radio-action): Use them.
2024-06-26 08:42:19 +02:00
Jim Porter
1809f6a93e Always perform Eshell process cleanup runs in the Eshell buffer
Previously, some code executed in a timer, which could execute in the
wrong buffer, leading to a hang.

* lisp/eshell/esh-proc.el (eshell-sentinel): Use 'with-current-buffer'
in the timer function.

* test/lisp/eshell/esh-proc-tests.el (eshell-test-value): New variable.
(esh-proc-test/sentinel/change-buffer): New test.

(cherry picked from commit da4bc5c927)
2024-06-25 21:42:28 -07:00
Jim Porter
da4bc5c927 Always perform Eshell process cleanup runs in the Eshell buffer
Previously, some code executed in a timer, which could execute in the
wrong buffer, leading to a hang.

* lisp/eshell/esh-proc.el (eshell-sentinel): Use 'with-current-buffer'
in the timer function.

* test/lisp/eshell/esh-proc-tests.el (eshell-test-value): New variable.
(esh-proc-test/sentinel/change-buffer): New test.
2024-06-25 21:39:35 -07:00
Po Lu
f8399633b4 Merge from savannah/emacs-30
8b1841021c Avert crash in store_mode_line_string on Android 5.0 and ...
e7c85f9235 Use HarfBuzz in Cygwin-w32 build
8e3e206bd3 ; * src/buffer.c (syms_of_buffer) <mode-line-format>: ASC...
2024-06-26 12:13:52 +08:00
Po Lu
4ce30903c5 ; Merge from savannah/emacs-30
The following commit was skipped:

fe0d9dfb3b ; * lisp/treesit.el (treesit--syntax-propertize-start): F...
2024-06-26 12:13:52 +08:00
Po Lu
f4e4f17267 Merge from savannah/emacs-30
2f18929319 Fix tabbing between widgets (bug#70594)
6ad6507532 ; * lisp/which-key.el (which-key-dont-use-unicode): Add :...
2024-06-26 12:13:51 +08:00
Po Lu
8b1841021c Avert crash in store_mode_line_string on Android 5.0 and earlier
* src/xdisp.c (store_mode_line_string)
[__ANDROID_API__ < 22]: Call strlen on STRING if the limit
would otherwise be SIZE_MAX, or if the address of the string
is within PRECISION bytes of UINTPTR_MAX, in which case it
cannot possibly be larger than PRECISION.
2024-06-26 12:12:20 +08:00
Ken Brown
e7c85f9235 Use HarfBuzz in Cygwin-w32 build
* src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper) [CYGWIN]:
Use cygharfbuzz-0.dll as HarfBuzz DLL name instead of
libharfbuzz-0.dll. (Bug#71766)
2024-06-25 11:30:08 -04:00
Eli Zaretskii
8e3e206bd3 ; * src/buffer.c (syms_of_buffer) <mode-line-format>: ASCIIfy. 2024-06-25 16:42:47 +03:00
Yuan Fu
fe0d9dfb3b ; * lisp/treesit.el (treesit--syntax-propertize-start): Fix doc.
(cherry picked from commit 2ba39a30bf)
(Bug#71753)
2024-06-25 15:33:04 +03:00
Stephen Berman
2f18929319 Fix tabbing between widgets (bug#70594)
* lisp/wid-edit.el (widget-move): Don't error when tabbing in a
buffer with only one active widget and 'widget-skip-inactive'
enabled.  Improve code by handling forward and backward movement
in a single loop.
2024-06-25 12:38:03 +02:00
Philip Kaludercic
6ad6507532
; * lisp/which-key.el (which-key-dont-use-unicode): Add :initialize
This fixes the change from 768e92b9, which accidentally would call
'custom-reevaluate-setting' on user options before they were registered,
initialising their default value to nil.  When the 'defcustom'
expressions were evaluated later on, they were not properly initialised
as their variables were already bound to some value (nil).

https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00825.html
2024-06-25 08:36:37 +02:00
Po Lu
b9da5ee06f Merge from savannah/emacs-30
60b38c317b * lisp/touch-screen.el (touch-screen-inhibit-drag): Anoth...
2024-06-25 12:53:33 +08:00
Po Lu
be0d57f7ed ; Merge from savannah/emacs-30
The following commit was skipped:

a4ca30ac2e Fix rescaling of images via 'text-scale-mode' in EWW
2024-06-25 12:53:33 +08:00
Po Lu
60b38c317b * lisp/touch-screen.el (touch-screen-inhibit-drag): Another typo. 2024-06-25 12:52:56 +08:00
Jim Porter
a4ca30ac2e Fix rescaling of images via 'text-scale-mode' in EWW
* lisp/net/eww.el (eww--rescale-images): Handle a :scale of 'default'
(bug#71741).

(cherry picked from commit 3abcfe013d)
2024-06-24 21:38:02 -07:00
Jim Porter
6837828219 Support rescaling sliced images in EWW via 'text-scale-mode'
* src/xdisp.c (find_display_property): When the property value has
multiple elements, return the whole list.

* lisp/net/eww.el (eww--rescale-images): Use 'get-display-property'.

* doc/lispref/display.texi (Display Property): Describe the new
'get-display-property' behavior (bug#71741).
2024-06-24 21:36:32 -07:00
Jim Porter
3abcfe013d Fix rescaling of images via 'text-scale-mode' in EWW
* lisp/net/eww.el (eww--rescale-images): Handle a :scale of 'default'
(bug#71741).
2024-06-24 21:36:04 -07:00
Po Lu
feac6e298d Merge from savannah/emacs-30
0e43606b20 * lisp/touch-screen.el (touch-screen-inhibit-drag): Fix t...
2024-06-25 12:27:47 +08:00
Po Lu
0e43606b20 * lisp/touch-screen.el (touch-screen-inhibit-drag): Fix typo. 2024-06-25 12:27:08 +08:00
Po Lu
34e2adc699 Merge from savannah/emacs-30
1b4c562721 Fix latent side-effects of respecting field boundaries in...
e4046f33ab ; * lisp/simple.el (undo-auto--boundaries): Doc fix (bug#...
008eeb21fd ; * lisp/language/cyrillic.el: Delete obsolete commentary...
680155d3f0 Add missing builtin package declarations
2024-06-25 11:38:01 +08:00
Po Lu
279974c14e ; Merge from savannah/emacs-30
The following commit was skipped:

ce4f56caf7 Extend treesitter tests on emba
2024-06-25 11:38:01 +08:00
Po Lu
dd08da6200 Merge from savannah/emacs-30
7e8a97ac78 Show entries from key-translation-map in which-key mode
4a0958642d * lisp/tab-bar.el (tab-bar-tab-group-face-function): Impr...
a769f171e7 ; Fix flymake tests with GCC 14.
96e27c2ecf Don't show char name for multi-char translations
0715abfa86 Reset ls-lisp-use-string-collate when ls-lisp-emulation c...
4fcc38966b Update to Transient v0.7.2-1-gf273c0c8
2024-06-25 11:38:01 +08:00