Commit graph

179375 commits

Author SHA1 Message Date
Robert Pluim
7efa4e34bb ; * lisp/font-lock.el: Remove unneeded "cl-lib" require. 2025-08-27 11:24:53 +02:00
Robert Pluim
6aa0be3d46 ; * etc/NEWS: Correct AUTH=PLAIN description. 2025-08-27 11:24:53 +02:00
Robert Pluim
b7cef00571 ; Fix formatting
* src/process.c (clear_fd_callback_data, delete_write_fd,
delete_keyboard_wait_descriptor): Space before paren.
2025-08-27 11:24:53 +02:00
Michael Albinus
29c35668d0 Extend info-xref-test-emacs-manuals, fix info reference
* doc/lispref/loading.texi (Autoload): Fix reference.

* test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals):
Print output buffer.
2025-08-27 11:24:12 +02:00
john muhl
f908d854d6 ; Various code cleanup in 'lua-mode' (Bug#79309)
* lisp/progmodes/lua-mode.el (lua-indent-level): Contemporary Lua
style guides no longer recommend 3 as default. Change type to
'natnum'.
(lua-always-show, lua-get-block-token-info)
(lua--backward-up-list-noerror, lua-make-indentation-info-pair)
(lua-accumulate-indentation-info)
(lua-calculate-indentation-block-modifier): Quote function names.
(lua-toggle-electric-state): Re-format to avoid confusion.
(lua-is-continuing-statement-p-1): Fix typo.
(lua--builtins): Move docstring to correct location.
(lua-is-continuing-statement-p-1): Remove unnecessary 'or'.
(lua-make-lua-string): Remove excessive backslashes and
unnecessary use of a temporary buffer.
(lua-find-matching-token-word): Make it clear that 'goto-char' is
only used only for its side-effect.
2025-08-27 10:05:49 +02:00
john muhl
6b0b70233a ; ruby-flymake-simple: Only match relative file name (bug#79257) 2025-08-27 00:09:41 +03:00
Eli Zaretskii
ff83b735f9 Fix last change in 'next_element_from_display_vector'
* src/xdisp.c (next_element_from_display_vector): Only switch the
iterator from unibyte to multibyte, never in the other direction,
and not if the original character came from a unibyte buffer.
(Bug#79317)
2025-08-26 16:24:55 +03:00
F. Jason Park
d98e1a8375 Remove scrolltobottom dependency from erc-fill module
This mostly reverts 9668b4f97c
"Make erc-fill-wrap depend on scrolltobottom".

* etc/ERC-NEWS: Mention removal of formal dependency.
* lisp/erc/erc-fill.el (erc-fill--wrap-scrolltobottom-exempt-p): Remove
unused variable.
(erc-fill--wrap-ensure-dependencies): Remove unused dependency check.
(erc-fill-wrap-mode): Remove scrolltobottom dependency from doc string.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Remove unused binding from var list.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Remove unused binding.
2025-08-25 21:17:48 -07:00
F. Jason Park
c711ba3c7b Prefer window-text-pixel-size in erc-fill
* lisp/erc/erc-fill.el (erc-fill--wrap-measure): Using
`buffer-text-pixel-size' for measuring text size in the selected window
can end up triggering a scroll, which then requires imperfect countering
by the scrolltobottom module, especially with regard to the option
`erc-scrolltobottom-all'.  Thanks to Alcor for reporting and helping
with this bug, which was introduced along with fill-wrap in ERC 5.6.
2025-08-25 21:15:29 -07:00
john muhl
54bd2264d3 Fix 'ruby-flymake-simple' for Ruby 3.4 (Bug#79257)
* lisp/progmodes/ruby-mode.el (ruby-flymake-simple): Update
regular expression to handle new versions of Ruby including the
location of the executable in the output.
2025-08-26 02:21:10 +03:00
Eli Zaretskii
21b072c607 Fix use of display-table for mode-line display
* src/xdisp.c (next_element_from_display_vector): Fix handling
non-ASCII characters in display-table cells corresponding to
ASCII characters.  (Bug#79311)
2025-08-25 22:27:10 +03:00
Michael Albinus
9bde50d6fd ; Comment out tramp-hlo in tramp.texi
* doc/misc/tramp.texi (Frequently Asked Questions): Comment out
tramp-hlo.  It hasn't landed in GNU ELPA yet.
2025-08-25 20:13:02 +02:00
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