1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-28 01:00:52 -07:00
Commit graph

179363 commits

Author SHA1 Message Date
Eli Zaretskii
f884b1acef Fix assertion violations caused by recent redisplay changes
* src/xdisp.c (push_it): Don't rest the string_from_prefix_prop_p
flag.  (Bug#79304)
2025-08-25 20:44:36 +03:00
Eli Zaretskii
0c49f5917f Attempt to fix assertion violations in bug#79304
The following changes make the changes for bug#79275 less
radical, closer to their previous shape, while still fixing
that bug.
* src/xdisp.c (push_prefix_prop, get_it_property): Restore
original code that determined the object and position on it.
(get_line_prefix_it_property): Take FROM_BUFFER from the actual
object of the prefix property.
2025-08-25 18:19:14 +03:00
Andre A. Gomes
e1ee5c6289 Pass remote name explicitly in bug-reference-try-setup-from-vc.
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add comment explaining the meaning of the nil argument when calling
vc-call-backend.  Even though "origin" and nil are equivalent when using
the git backend, it is more intelligible to see "upstream" and "origin"
passed explicitly (bug#79276).
2025-08-25 16:09:53 +02:00
Juri Linkov
c934a4188b * lisp/progmodes/lua-ts-mode.el: Simplify non-ts/ts mode mapping.
(lua-ts-mode-maybe): Remove since lua-mode is added to core.
2025-08-25 09:33:10 +03:00
Po Lu
2852967233 Merge remote-tracking branch 'savannah/master' into master-android-1 2025-08-25 10:01:41 +08:00
john muhl
c5656af2ff ; Add tests for 'lua-mode'
* test/lisp/progmodes/lua-mode-resources/font-lock.lua:
* test/lisp/progmodes/lua-mode-resources/hide-show.lua:
* test/lisp/progmodes/lua-mode-resources/indent.erts:
* test/lisp/progmodes/lua-mode-resources/movement.erts:
* test/lisp/progmodes/lua-mode-resources/which-function.lua:
* test/lisp/progmodes/lua-mode-tests.el: New file.
2025-08-25 09:59:04 +08:00
john muhl
38a0775742 * etc/NEWS: Mention 'lua-mode' merge. 2025-08-25 09:59:04 +08:00
john muhl
c042611106 Add warn to 'lua-mode' builtins
* lisp/progmodes/lua-mode.el (lua--builtins): Include warn.
2025-08-25 09:59:04 +08:00
john muhl
22e3ba30fa ; Improve compliance of 'lua-mode'
* lisp/progmodes/lua-mode.el: Fix byte-compiler warnings, placate
checkdoc and improve consistency of comment formatting.
2025-08-25 09:59:04 +08:00
john muhl
7fabc65484 ; Update comments & requires in 'lua-mode' 2025-08-25 09:59:04 +08:00
john muhl
8af0064a74 Remove trivial cl-* stuff from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-process-buffer, lua--signum):
Replace 'cl-assert'.
(lua-accumulate-indentation-info): Replace 'cl-dolist' with
'dolist'.
2025-08-25 09:59:04 +08:00
john muhl
426167a8f3 Replace big regexps w/ rx expressions in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-block-regexp)
(lua-indentation-modifier-regexp, lua-cont-eol-regexp)
(lua-cont-bol-regexp): Use rx.
2025-08-25 09:59:04 +08:00
john muhl
2e454bea03 ; Adjust code style in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-prefix-key)
(lua-goto-matching-block): Replace 'let...if' with 'if-let*'.
(lua--fill-paragraph, lua-goto-matching-block-token): Replace
'let...when' with 'when-let*'.
(lua-comment-start-pos): Replace 'unless..and' with 'if-let*'.
(lua-skip-ws-and-comments-backward)
(lua-skip-ws-and-comments-forward): Remove unnecessary 'setq'.
(lua-indent-line): Replace 'when...not' with 'unless'.
(lua-calculate-string-or-comment-indentation): Formatting.
(lua-find-matching-token-word): Remove a level of 'let' nesting,
replace 'when...not' with 'unless'.
(lua-indent-line): Combine 'setq's.
2025-08-25 09:59:04 +08:00
john muhl
bf9e502e70 Remove unnecessary 'progn' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-accumulate-indentation-info)
(lua--goto-line-beginning-rightmost-closer): Delete.
2025-08-25 09:59:04 +08:00
john muhl
142f1b2a9b Replace 1-armed 'if' with 'when' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--customize-set-prefix-key)
(lua-electric-match, lua-prefix-key-update-bindings)
(lua-indent-line, lua-find-matching-token-word)
(lua-goto-matching-block-token, lua-last-token-continues-p)
(lua-is-continuing-statement-p)
(lua--goto-line-beginning-rightmost-closer, lua-start-process)
(lua-prompt-line): Replace.
2025-08-25 09:59:04 +08:00
john muhl
ee36cac7ba Prefer 'defvar-local' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-default-command-switches)
(lua-electric-flag, lua--repl-buffer-p): Replace
'make-variable-buffer-local' with 'defvar-local'.
2025-08-25 09:59:04 +08:00
john muhl
fd6d5b65b5 Remove unnecessary 'setq' from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--rx-bindings): Combine variable
definition and assignment.
2025-08-25 09:59:04 +08:00
john muhl
2fe72d48d3 Cleanup whitespace in 'lua-mode' 2025-08-25 09:59:04 +08:00
john muhl
6465b3cbec Cleanup defcustoms in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-mode-hook): Add options.
(lua-indent-level, lua-comment-start, lua-comment-start-skip)
(lua-default-application, lua-default-command-switches)
(lua-always-show, lua-documentation-function)
(lua-documentation-url, lua-prefix-key, lua-prompt-regexp)
(lua-indent-string-contents)
(lua-indent-nested-block-content-align)
(lua-indent-close-paren-align, lua-jump-on-traceback)
(lua-mode-hook, lua-mode, lua-luacheck-program): Delete group,
add version.
2025-08-25 09:59:04 +08:00
john muhl
b7d13f0de0 Remove unnecessary code from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-traceback-line-re)
(lua-start-process): compile.el has Lua support now.
2025-08-25 09:59:04 +08:00
john muhl
509c1af9fc Remove advice from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--compilation-find-file)
(compilation-find-file, lua--compilation-goto-locus)
(compilation-goto-locus): Delete.
2025-08-25 09:59:04 +08:00
john muhl
3fa5aa47be Use easy-menu in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-mode-menu): Delete.
(lua-mode-map): Use 'easy-menu-define'.
2025-08-25 09:59:04 +08:00
john muhl
0b1b967781 Remove obsolete code from 'lua-mode'
* lisp/progmodes/lua-mode.el: Remove Emacs<27 compatibility code.
(lua-emacs-menu): Remove XEmacs compatibility code.
2025-08-25 09:59:04 +08:00
Juergen Hoetzel
0d3504227a * lisp/progmodes/lua-mode.el: Import lua-mode. 2025-08-25 09:58:34 +08:00
F. Jason Park
45ffc0e102 Don't set bufbar cursor-type in erc-mode buffers
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Set
`cursor-type' in `erc-status-sidebar-mode' buffer instead.  This bug was
introduced along with the bufbar module for bug#63595 in ERC 5.6.  It's
a regression because it also affects the status-sidebar module.
2025-08-24 15:15:02 -07:00
F. Jason Park
40219c39a1 Use existing X-Debbugs-CC header in erc-bug
* lisp/erc/erc.el (erc-bug): On Emacs 30 and later, search for and
ideally use an existing "X-Debbugs-CC" header instead of inserting a new
one at the top.  Section 4.5 Obsolete Header Fields of RFC 5322 says,
"except for destination address fields (described in section 4.5.3), the
interpretation of multiple occurrences of fields is unspecified."
Anecdotal fiddling suggests the Savannah servers aren't confused by the
second "empty" header field, so this change is probably just cosmetic.
2025-08-24 15:12:15 -07:00
Juri Linkov
5ac0b39bc9 * lisp/treesit.el (treesit-enabled-modes): Use 'add-to-list'.
Using 'add-to-list' instead of 'cons' in :set avoids
adding duplicate entries to 'major-mode-remap-alist'.
2025-08-24 20:45:21 +03:00
Jim Porter
9f33fb2258 ; * doc/misc/eshell.texi (Globbing): Fix typo and clarify (bug#79175). 2025-08-24 10:38:59 -07:00
Mattias Engdegård
308e3ab1db Disallow string data resizing (bug#79784)
Only allow string mutation that is certain not to require string data to
be resized and reallocated: writing bytes into a unibyte string, and
changing ASCII to ASCII in a multibyte string.

This ensures that mutation will never transform a unibyte string to
multibyte, that the size of a string in bytes never changes, and that
the byte offsets of characters remain the same.  Most importantly, it
removes a long-standing obstacle to reform of string representation and
allow for future performance improvements.

* src/data.c (Faset): Disallow resizing string mutation.
* src/fns.c (clear_string_char_byte_cache):
* src/alloc.c (resize_string_data):  Remove.
* test/src/data-tests.el (data-aset-string): New test.
* test/lisp/subr-tests.el (subr--subst-char-in-string):
Skip error cases.
* test/src/alloc-tests.el (aset-nbytes-change):
Remove test that is no longer relevant.
* doc/lispref/strings.texi (Modifying Strings):
* doc/lispref/sequences.texi (Array Functions):
* doc/lispref/text.texi (Substitution):  Update manual.
* etc/NEWS: Announce.
2025-08-24 10:28:27 +02:00
Mattias Engdegård
230ed1f9b6 * lisp/emacs-lisp/bytecomp.el (mutating-fns): cl-fill and cl-replace 2025-08-24 10:28:27 +02:00
Eli Zaretskii
d70e2aac6c ; * etc/NEWS: Fix punctuation in last change. 2025-08-24 07:32:45 +03:00
Dmitry Gutov
bb0ede711e Have project-switch-to-buffer use a distinct completion category
* etc/NEWS: Mention the change.

* lisp/minibuffer.el (completion-category-defaults):
Add an entry for it.

* lisp/progmodes/project.el (project--buffers-completion-table):
Return category 'project-buffer'.
2025-08-24 03:23:48 +03:00
Dmitry Gutov
0e37977546 Follow-up to previous changes in project--read-project-buffer
* lisp/progmodes/project.el (project--buffers-completion-table):
New function, use it to implement the no-internal/internal
fallback logic from 'internal-complete-buffer', apply the
category and cycle-sort-function (bug#77312).
(project--read-project-buffer): Use it.  Skip 'read-buffer' in
favor of 'completing-read'.  But make sure to honor
read-buffer-completion-ignore-case and use format-prompt when
the function is available.  Unify two execution paths.
2025-08-24 03:23:48 +03:00
Dmitry Gutov
b2186b5c20 Add NEWS entry for project-switch-buffer change from bug#77312 2025-08-24 03:23:48 +03:00
Eli Zaretskii
d3d93bc382 ; * lisp/ldefs-boot.el: Update. 2025-08-23 10:34:23 -04:00
Eli Zaretskii
9ef78272f6 Merge from origin/emacs-30
b3ed4876b6 ; Improve documentation of Edebug
fdad3417dc ; Fix typo in 'cursor-type' widget
2025-08-23 10:30:47 -04:00
Eli Zaretskii
26329bed6e ; * etc/symbol-releases.eld (dired-click-to-select-mode): Add. 2025-08-23 16:34:43 +03:00
Eli Zaretskii
90c44826f5 Improve and clarify documentation of 'dired-click-to-select-mode'
* lisp/dired.el (dired-click-to-select-mode)
(dired-post-do-command):
* doc/emacs/dired.texi (Marks vs Flags): Improve documentation of
'dired-click-to-select-mode'.
2025-08-23 16:33:45 +03:00
Jeremy Bryant
5d23fc9467 * doc/lispref/control.texi (cond* Macro): Update bind* entry
Update manual to match docstring of (bind*) clause, including
the qualifier `all subsequent clauses'.  (Bug#79246)
2025-08-23 16:03:46 +03:00
Eli Zaretskii
8e9277042c Use better temporary file names under 'file-precious-flag'
* lisp/files.el (basic-save-buffer-2): Use a more meaningful
temporary file name under 'file-precious-flag'.  (Bug#79252)

* etc/NEWS: Announce the change in behavior.
2025-08-23 15:09:31 +03:00
Eli Zaretskii
45bc42bddf Rmail can fetch email from several inboxes with different passwords
* lisp/mail/rmail.el (rmail--remote-password-host)
(rmail--remote-password-user): New variables.
(rmail-get-remote-password): Use them to ask for the password
whenever we need to fetch email from an inbox whose user or host
are different from the last ones.  (Bug#79214)
2025-08-23 14:55:09 +03:00
Spencer Baugh
aae9eddb58 flymake: stop trying to automatically fall back to margins
The code to automatically fallback to margins is not correct: it
relies implicitly on the buffer being displayed in a window
while flymake-mode is running.  If the buffer is created while
not displayed, we will always automatically fallback to margins,
which is incorrect.
Avoid the regression by simply disabling this code.  I'll try
again to fall back automatically in the future.  (Bug#79244)

* doc/misc/flymake.texi (Customizable variables): Remove section
about automatic fallback to margins.
* etc/NEWS: Un-announce removed feature.
* lisp/progmodes/flymake.el (flymake-indicator-type)
(flymake-mode): Stop automatically falling back to
margins. (bug#77313)
2025-08-23 14:44:35 +03:00
Eli Zaretskii
60a2923d50 ; * lisp/play/doctor.el (llm): Add. 2025-08-23 14:25:06 +03:00
Eli Zaretskii
b3ed4876b6 ; Improve documentation of Edebug
* doc/lispref/edebug.texi (Edebug Execution Modes, Jumping)
(Edebug Misc, Breaks, Breakpoints, Global Break Condition)
(Source Breakpoints, Edebug Views, Edebug Eval, Eval List)
(Printing in Edebug, Trace Buffer, Coverage Testing)
(Checking Whether to Stop, Edebug Display Update)
(Edebug Recursive Edit, Edebug and Macros)
(Instrumenting Macro Calls, Specification List, Edebug Options):
Improve indexing and cross-references.
2025-08-23 13:44:23 +03:00
Michael Albinus
1d88931a1c Minor fixes for file notifications on MS Windows
* lisp/filenotify.el (file-notify-rm-all-watches): Clear hash.

* test/lisp/filenotify-tests.el (file-notify--test-event-test):
Fix check.
(file-notify-test09-watched-file-in-watched-dir): Adapt test.
2025-08-23 12:20:02 +02:00
Eli Zaretskii
f3434a4f53 Fix line-prefix display when there's a 'display' string at BOL
* src/xdisp.c (push_it): Reset the 'string_from_prefix_prop_p' flag.
(try_window_id): Disable this optimization if the last unchanged
at-beg row begins with a display or overlay string and there;s a
line/wrap-prefix property on the row.
(push_prefix_prop): Accept an additional argument FROM_BUFFER to
indicate that the prefix property was found on buffer text
underlying a display or overlay property, and set up the position
to pop to accordingly.  Reset the 'string_from_display_prop_p' flag
of the iterator after pushing IT to set up for iterating the
prefix string.
(get_it_property): Use it->string, not it->object, as indication
that prefix property is on a string.
(get_line_prefix_it_property): Accept an additional argument:
pointer to a flag indicating that the prefix property was found on
buffer text underlying a display or overlay property.  Callers
adjusted.
(handle_line_prefix): Use the FROM_BUFFER flag to correctly handle
prefix properties on buffer text at the same position as a display
string.  (Bug#79275)
2025-08-23 11:34:10 +03:00
Harald Jörg
bc0202bc88 ; cperl-mode.el: Do not warn with valid character escapes
See https://github.com/emacs-mirror/emacs/pull/41.  This is a
one-liner, safely exempt from copyright paperwork.

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): delete
valid character escapes from the list which causes warning-face
to be applied
2025-08-22 15:03:17 +02:00
Michael Albinus
ce9def14c6 Minor tramp.texi changes
* doc/misc/tramp.texi (File name syntax): Describe port for IPv6 address.
(Traces and Profiles): Fix default value of tramp-debug-buffer-limit.
2025-08-22 14:08:52 +02:00
Michael Albinus
64bb65c7d8 ; * admin/MAINTAINERS: Add myself for connection-local variables. 2025-08-22 14:08:26 +02:00
Michael Albinus
7658f4c30a Skip eglot-test-rust-completion-exit-function on emba 2025-08-22 13:18:08 +02:00