Commit graph

177684 commits

Author SHA1 Message Date
Po Lu
c3492b969d ; * msdos/emacs.djl: Don't interfere with the order of other symbols. 2025-03-25 10:38:43 +08:00
Po Lu
49eab999f1 Fix the DJGPP build
* msdos/emacs.djl (.bss): Guarantee that lread.o is 8-byte
aligned.

* msdos/sed2v2.inp (ALIGNOF_INT, ALIGNOF_LONG)
(ALIGNOF_LONG_LONG): Correct typos.

* src/term.c (tty_free_frame_resources): Synchronize with
non-DOS variant.
2025-03-25 10:38:43 +08:00
Philipp Stephani
8efcdcab86 Mimic behavior of 'aref' when signalling out-of-range errors.
The convention used by 'aref' and friends is that for
'args-out-of-range', the error data is a list (SEQ INDEX).  Use the same
convention for the vector-related module functions.

* src/emacs-module.c (check_vec_index): Use vector and index as error
data.
2025-03-25 02:56:01 +01:00
Philipp Stephani
96a1a07fb1 Don't use 'args-out-of-range' error for too-small buffers.
'args-out-of-range' means that some index argument isn't valid for a
given sequence/range, which isn't the case here.  Instead, define a new
error symbol to mean "user-supplied buffer is too small."  Since we
never specified nor tested which error symbol was signalled in this
case, changing it shouldn't cause severe breakages.

* src/emacs-module.c (module_buffer_too_small): New helper function.
(module_copy_string_contents, module_extract_big_integer): Use it.
(syms_of_module): Define 'buffer-too-small' error symbol.
2025-03-25 02:54:08 +01:00
Philipp Stephani
8be7e98557 Add an ERT explainer for 'time-equal-p'.
* lisp/emacs-lisp/ert.el (ert--explain-time-equal-p): New explainer
function.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-time-equal-p): New
test.
2025-03-25 00:12:20 +01:00
Stefan Monnier
cf6d0b48d8 lisp/loadup.el (max-lisp-eval-depth): Bump up a bit
This is to accommodate the deep backquoted thingy in `cus-start.el`.
2025-03-24 17:31:35 -04:00
Stefan Monnier
f66c92a793 Expose some lambdas currently hidden in quoted data
* lisp/language/chinese.el ("Chinese-GB", "Chinese-BIG5")
("Chinese-CNS", "Chinese-EUC-TW", "Chinese-GBK"):
* lisp/isearch.el (isearch-menu-bar-map):
* lisp/international/mule-cmds.el (language-info-custom-alist):
* lisp/font-lock.el (cpp-font-lock-keywords):
* lisp/cus-start.el (<toplevel>): Expose lambda-expressions to the compiler.
2025-03-24 17:14:26 -04:00
Stefan Monnier
c26862a6c9 (byte-compile-maybe-guarded): Make its code edebuggable
* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Hoist
subexpression out of `if`.
(byte-compile-variadic-numeric, byte-compile--cond-vars)
(byte-compile--cond-switch-prefix, byte-compile-file-form-defalias):
Obey `lexical-binding` when evaluating the code we're compiling.
(byte-compile--maybe-guarded): New function, extracted from
`byte-compile-maybe-guarded`.
(byte-compile-maybe-guarded): Use it so we can edebug the code.
2025-03-24 17:12:16 -04:00
Stefan Monnier
e343055f63 (buffer-local-set-state): Optimize away unused data
* lisp/subr.el (buffer-local-set-state--get): Simplify by making it
take only the vars rather than the pairs.
(buffer-local-set-state): Adjust accordingly so we don't needlessly keep
part of the source code in the compiled code.
2025-03-24 17:08:26 -04:00
Stefan Kangas
4194d5af45 New test for function-get
* test/lisp/subr-tests.el (subr-tests-function-get): New test.
2025-03-24 21:20:36 +01:00
Eshel Yaron
119931a9ce
; Populate completions list before scrolling it
This fixes a regression introduced in b12a3a03ae, where
repeating a completion command (e.g. TAB in the minibuffer)
would no longer scroll through all available completions.

* lisp/minibuffer.el (completion--in-region-1): Call
'completion--lazy-insert-strings' before scrolling
the completions list.
2025-03-24 16:32:12 +01:00
Sean Whitton
0cfe700e33 Merge from origin/emacs-30
0c32f7521b ; * admin/notes/spelling: More precisely qualify saying j...
bc51fabc10 Add a choice to 'dired-movement-style' to restore the pre...
10d534023a ; Fix some markup in doc/lispref/commands.texi.
c2c287b325 Improve docstring of should-error
2025-03-24 10:41:45 +08:00
Sean Whitton
a0864880d8 ; Merge from origin/emacs-30
The following commit was skipped:

c6a11128d5 Use debian:bookworm for emba tests (don't merge)
2025-03-24 10:41:44 +08:00
Sean Whitton
3b38aa2cb5 Merge from origin/emacs-30
84abd43f42 * lisp/treesit.el (treesit-indent-region): Handle markers...
2025-03-24 10:41:43 +08:00
Sean Whitton
0c32f7521b ; * admin/notes/spelling: More precisely qualify saying just "Lisp" 2025-03-24 10:40:22 +08:00
Sean Whitton
0503766495 log-edit: Don't add rear-nonsticky to font-lock-extra-managed-props
* lisp/vc/log-edit.el (log-edit-mode): Don't add rear-nonsticky
to font-lock-extra-managed-props (bug#77197).  Investigated by
Paul D. Nelson <ultrano@gmail.com>.  Fix due to Stefan Monnier.
2025-03-24 10:32:40 +08:00
Stefan Kangas
5830d1fa65 Add basic and low-level tests for hash tables
* test/src/fns-tests.el (test-hash-table)
(test-hash-table-wrong-keywords, test-remhash, test-clrhash)
(test-hash-table-p, test-hash-table-count, test-maphash)
(test-copy-hash-table): New tests.
2025-03-24 00:57:47 +01:00
Stefan Kangas
1b56e0f169 Improve docstring of cl-defstruct accessors
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Improve generated
docstring by not leaking the internal CL-X argument name, preferring X
instead.  Set property 'document-generalized-variable', used below.
* lisp/help-fns.el (help-fns--generalized-variable): When function has
non-nil property 'document-generalized-variable', document it as a
generalized variable.
2025-03-24 00:57:47 +01:00
Juri Linkov
bc51fabc10 Add a choice to 'dired-movement-style' to restore the previous behavior
* lisp/dired.el (dired-movement-style): Add new values
'bounded-files' and 'cycle-files' (bug#76596).
(dired--move-to-next-line): Use new values for users
who prefer the default behavior of Emacs 30.1.
2025-03-23 19:48:28 +02:00
Stephen Gildea
9e005e9da0 ; Move time-stamp release info from symbol-releases.eld to NEWS
Update the appropriate historical NEWS files with time-stamp feature
releases.  Suggested by Stefan Monnier.  All dates are from my notes.

* etc/symbol-releases.eld: Remove time-stamp,
reverting commit 69210eb84e of 17 March.
* etc/NEWS.19:
* etc/NEWS.20: Add 'time-stamp' feature paragraphs that
should have been written then.
* etc/NEWS.21: Add missing quotes, so symbol names can be identified.
2025-03-23 10:39:52 -07:00
Basil L. Contovounesios
10d534023a ; Fix some markup in doc/lispref/commands.texi. 2025-03-23 18:13:52 +01:00
Stefan Kangas
c2c287b325 Improve docstring of should-error
* lisp/emacs-lisp/ert.el (should-error): Improve docstring.
2025-03-23 17:46:07 +01:00
Andrea Corallo
d565a6747a Fix a nativecomp type propagation bug (bug#74771)
* lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Don't emit negated
cstr.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
2025-03-23 17:33:27 +01:00
Stefan Kangas
408ad273ee checkdoc: Delete redundant check for wide docstrings
With Emacs 28.1, wide docstrings are now flagged by the byte-compiler.
The logic in the byte-compiler for catching these issues is complex
and continuously evolving, particularly to avoid incorrectly flagging
`substitute-command-keys` substitutions.  Unfortunately, the checkdoc
implementation incorrectly flags correct docstrings as overly wide.

Rather than duplicating the byte-compiler logic in checkdoc, which
would introduce unnecessary maintenance overhead, we acknowledge that
this check is now redundant and remove it.  Users utilizing the
byte-compiler, whether manually or through `flymake`, will continue to
be warned about this issue.

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Remove check for overly wide docstrings; duplicates byte-compiler
logic.
2025-03-23 17:22:51 +01:00
Po Lu
7d14e35498 Patch bug#77128
* src/pgtkterm.c (pgtk_flash): Destroy `cr_surface_visible_bell'
if still present.  (bug#77128)
2025-03-23 19:44:46 +08:00
Stefan Kangas
81404bf3c2 Improve documentation of cl-defstruct
* doc/misc/cl.texi (Structures): Organize more logically, slightly
expand, and add more examples.
2025-03-23 12:28:26 +01:00
Eli Zaretskii
939a2a3c2d Avoid rare crashes due to "C-g C-g" on TTY frames
* src/term.c (tty_send_additional_strings): Don't use SBYTES, as
this function could be called in the middle of GC.  (Bug#77205)
2025-03-23 13:17:06 +02:00
Eli Zaretskii
467aba67db ; * src/dispnew.c (check_window_matrix_pointers): Fix last change. 2025-03-23 11:35:25 +02:00
Eli Zaretskii
e20e853861 Avoid rare segfaults in 'check_matrix_pointers'
* src/dispnew.c (check_window_matrix_pointers): No-op if the
window's frame not ready yet.  (Bug#77200)
2025-03-23 11:30:17 +02:00
Michael Albinus
c6a11128d5 Use debian:bookworm for emba tests (don't merge)
There are problems with treesitter installation from debian:sid.

* test/infra/Dockerfile.emba (emacs-base): Use debian:bookworm.
(emacs-eglot, emacs-tree-sitter): Use emacs-base.
(emacs-native-comp): Install libgccjit-12-dev.
2025-03-23 09:33:57 +01:00
Eli Zaretskii
ab25b4fca9 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-03-23 07:45:16 +02:00
Stephen Gildea
aa12cebaa6 Consistent wording in top-level headers in NEWS.19
* etc/NEWS.19: Put the word "Emacs" in front of each version number.
This change lets 'help-fns--first-release' parse the headers, which
produces more accurate "probably introduced at" versions from
'describe-function' and 'describe-variable'.
2025-03-22 17:08:49 -07:00
Stefan Kangas
92b373318d Reduce code duplication in ns_set_appearance
* src/nsterm.h (ns_set_appearance_1): Declare.
* src/nsterm.m (ns_set_appearance_1): Break out new function...
(ns_set_appearance): ...here.
* src/nsfns.m (Fx_create_frame): Use above new function.
2025-03-22 22:42:18 +01:00
shipmints
81c21d89ed Ensure .dir-locals-2.el behavior as documented (bug#75890)
* lisp/files.el
(dir-locals--all-files): New &optional 'base-el-only' argument.
(dir-locals--base-file): New function.
(dir-locals-find-file): 'locate-dominating-file' only for the base
.dir-locals.el.

* test/lisp/files-tests.el
(files-test-dir-locals-2-solo): New test.
* test/lisp/files-resources/dir-locals-2-solo: New test support.
(files-test-dir-locals-2-paired): New test.
* test/lisp/files-resources/dir-locals-and-2: New test support.
2025-03-22 16:47:27 -04:00
Eli Zaretskii
62368f93a5 Avoid rare segfaults due to crazy creation of new child frames
* src/dispnew.c (combine_updates, combine_updates_for_frame): Skip
frames and child frames that were not yet completely made.
(Bug#77046)
2025-03-22 21:32:16 +02:00
Sora Takai
893c40c63e Make isearch lazy-highlights non-sticky at both ends (bug#77121)
Copyright-paperwork-exempt: yes
2025-03-22 21:16:46 +02:00
Paul Eggert
25d7575358 Remove ctags program
Remove our old ctags and suggest Universal Ctags instead.
This fixes a FIXME in lib-src/Makefile.in and speeds up compilation
quite a bit on my older CPU when I compile with	--enable-gcc-warnings.
It also lessens installation and runtime footprint. (Bug#76322)
* .gitignore: Remove lib-src/ctags.
* admin/authors.el (authors-renamed-files-alist): Remove ctags.1.
* admin/check-man-pages: ctags.1 is no longer a special case.
* admin/quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove ctags.
* cross/Makefile.in (LIBSRC_BINARIES): Remove lib-src/ctags.
* doc/man/ctags.1, lib-src/ctags.c: Remove.
* java/Makefile.in (CROSS_LIBSRC_BINS): Remove ctags.
* lib-src/Makefile.in (INSTALLABLES): Remove ctags${EXEEXT}.
(ctags${EXEEXT}): Remove.
* lib-src/etags.c (CTAGS): Remove.  All uses replaced by ...
(ctags): ... this new static var.
(STDIN): Remove macro.  All uses replaced by new STDIN_OPTION constant.
(CTAGS_OPTION, STDIN_OPTION): New contants.
(longopts): New --ctags option.
(ctags_default_C_help): New constant,
to override default_C_help at runtime.
(default_C_help): Now always the etags version.
(C_LANG_NAMES_INDEX): New macro.
(print_language_names): Do not assume etags.
(PROGRAM_NAME): Remove.  All uses removed.
(print_help): Document --ctags if PRINT_UNDOCUMENTED_OPTIONS_HELP.
(main): Support new --ctags option, and support all [ce]tags options.
* test/manual/etags/Makefile (CTAGS_PROG):
Now etags --ctags, since there is no longer a ctags.
2025-03-22 11:57:29 -07:00
Juri Linkov
84abd43f42 * lisp/treesit.el (treesit-indent-region): Handle markers (bug#77077).
Ensure that markers are converted to integers for 'beg' and 'end'.
2025-03-22 20:37:35 +02:00
Michael Albinus
2658f4eab9 ; Another Tramp fix
* lisp/net/tramp.el (tramp-skeleton-file-truename):
Remove possible trailing slash.
2025-03-22 17:49:53 +01:00
Eli Zaretskii
9816c61c48 Fix usage of string data pointers in xfaces.c
* src/xfaces.c (tty_defined_color): Don't use SSDATA pointers
across calls to Lisp.  (Bug#77046)
2025-03-22 18:45:38 +02:00
Sean Whitton
764f23ef43 Merge from origin/emacs-30
1364bbc6a5 ; * admin/notes/spelling: Grammar fix
dc80a8f050 ; Add index entry "code completion" to user manual
0d9b14ed05 ; * doc/emacs/programs.texi (Program Modes): Add info abo...
f224475f57 ; admin/notes/spelling: Notes on abbreviation of "Emacs L...
86c354dd0d Fix OSX build without pdumper
2d12754ee2 ; Add indexing for Eglot in user manual
a30b9b640b ; Change some instances of cl to cl-lib in docs
b681d62436 ; Improve introduction to use-package manual
f1acefd86f ; Add cross-references to push and pop docstrings
2025-03-22 21:09:37 +08:00
Sean Whitton
1364bbc6a5 ; * admin/notes/spelling: Grammar fix 2025-03-22 21:07:28 +08:00
Eli Zaretskii
42e116bb10 ; Fix last change (bug#76980)
* lisp/window.el (window--state-normalize-buffer-name): Doc fix.

* doc/lispref/windows.texi (Window Configurations): Add indexing.
2025-03-22 14:14:22 +02:00
shipmints
4266514dc8 'window-state-normalize-buffer-name' option for `uniquify' buffers
If 'window-state-normalize-buffer-name' is non-nil, 'window-state-get'
will normalize stored buffer names, making them easier to restore for
users that use 'uniquify' buffer naming.
* doc/lispref/windows.texi (Window Configurations): Document
'window-state-normalize-buffer-name'.
* lisp/window.el (window-state-normalize-buffer-name): New defvar.
(window--state-normalize-buffer-name): New function.
(window--state-get-1): Call 'window--state-normalize-buffer-name'
rather than 'buffer-name'.
* etc/NEWS: Announce 'window-state-normalize-buffer-name'.
(Bug#76980)
2025-03-22 14:10:37 +02:00
James Cherti
1aebb02611 ElDoc: Add more commands using 'eldoc-add-command-completions'
Add more commands to 'eldoc-add-command-completions' to fix
disappearing ElDoc help in the minibuffer for the following
cases:
- All modes: Added "comment-indent-new-line".
- All modes: Added "delete-char" for handling when the user presses delete.
- Python mode: Added "python-indent-dedent-line-backspace" for handling
  when the user presses backspace.
* lisp/emacs-lisp/eldoc.el (eldoc-remove-command-completions):
* lisp/progmodes/python.el (python-base-mode): Add more commands
to 'eldoc-add-command-completions'.

Copyright-paperwork-exempt: yes
2025-03-22 13:55:09 +02:00
Stefan Kangas
20687ab617 Delete now unused constants in nsterm.h
* src/nsterm.h (NS_DUMPGLYPH_NORMAL, NS_DUMPGLYPH_CURSOR)
(NS_DUMPGLYPH_FOREGROUND, NS_DUMPGLYPH_MOUSEFACE): Delete now unused
constants.
2025-03-22 12:47:06 +01:00
Stefan Kangas
69013ed73d ; Clean up comments in nsterm.h 2025-03-22 12:45:37 +01:00
Eli Zaretskii
d9386cb546 ; Fix recent documentation changes
* doc/lispref/frames.texi (Frames, Visibility of Frames):
* etc/NEWS: Fix wording, punctuation, and markup.
2025-03-22 12:55:43 +02:00
Eli Zaretskii
098fe4b73b Improve 'C-u C-x =' for ligatures of ASCII characters
* lisp/composite.el (composition-find-pos-glyph): New function.
* lisp/descr-text.el (describe-char): Use it to get the font glyph
code of "trivial" compositions.
(describe-char-display): Accept an additional optional argument
and use it as the font glyph code for the character.
2025-03-22 12:39:46 +02:00
Michael Albinus
172e35afce Tramp: Improve handling of cyclic symlinks
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Add FIXME.

* lisp/net/tramp.el (tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.
2025-03-22 09:52:22 +01:00