Commit graph

176279 commits

Author SHA1 Message Date
Pip Cet
d5f99f4431 Fix a GTK memory leak (Bug#75636)
* src/gtkutil.c (xg_create_frame_widgets): Don't call g_object_ref.
2025-01-19 03:27:34 +00:00
Po Lu
59167e2de8 Revert "Use @xref more consistently; "See @ref" -> "@xref""
This reverts commit e54b94c28c,
which prevented building Emacs on a number of my machine(s).
2025-01-19 08:59:28 +08:00
Stefan Kangas
e54b94c28c Use @xref more consistently; "See @ref" -> "@xref"
* doc/lispref/commands.texi (Using Interactive):
* doc/lispref/customize.texi (Type Keywords):
* doc/lispref/edebug.texi (Using Edebug, Specification List):
* doc/lispref/frames.texi (Frame Layout):
* doc/lispref/functions.texi (What Is a Function, Related Topics):
* doc/lispref/keymaps.texi (Controlling Active Maps, Key Lookup):
* doc/lispref/minibuf.texi (Completion Variables):
* doc/lispref/os.texi (Terminal Input):
* doc/lispref/text.texi (JSONRPC Overview):
* doc/misc/calc.texi (More About Embedded Mode, Customizing Calc):
* doc/misc/cc-mode.texi (Movement Commands, Auto-newlines)
(Config Basics, Custom Auto-newlines):
* doc/misc/gnus.texi (Email Based Diary):
* doc/misc/htmlfontify.texi (Interactive, Non-interactive):
(Variables):
* doc/misc/idlwave.texi (Using the Shell):
* doc/misc/srecode.texi (Quick Start, User Templates)
(Parts of SRecode, Compound Variable Values, Template Macros):
* doc/misc/tramp.texi (Inline methods, FUSE-based methods)
(Predefined connection information, Remote shell setup)
(Frequently Asked Questions):
* doc/misc/transient.texi (Configuration, Technical Introduction):
(Binding Suffix and Infix Commands, Transient State):
(Prefix Slots, Predicate Slots):
* doc/misc/wisent.texi (Example, Compiling a grammar, Conflicts):
(Grammar Debugging, Error recovery):
2025-01-19 01:34:44 +01:00
Stefan Kangas
2c7b08c60a Initialize full range in parse_menu_item
* src/keyboard.c (parse_menu_item): Initialize the full range of item,
in case future changes makes ITEM_PROPERTY_ENABLE != ITEM_PROPERTY_MAX.
Problem reported by Pip Cet <pipcet@protonmail.com>.
Ref: https://mail.gnu.org/r/emacs-devel/2025-01/msg00680.html
2025-01-19 00:49:30 +01:00
Paul Eggert
8661f40ce4 Remove unnecessary stdalign.in.h
* lib/stdalign.in.h: Remove.  This file was already removed in
commit b429274c5b (2023-02-04)
but was brought back mistakenly by a merge from emacs-29 in
commit ecf08f0621 (2024-01-02).
* nt/inc/stdalign.h: Don’t mention removed file in comment.
2025-01-18 11:27:48 -08:00
Arsen Arsenović
311b3f70f5 ruler-mode: Improve compatibility with text-scale (bug#75168)
* lisp/ruler-mode.el (ruler-mode-ruler): Use pixelwise line-number
display width for alignment with line numbers.
2025-01-18 17:53:17 +02:00
Eli Zaretskii
63a322b616 ; * lisp/repeat.el (cl-extra): Require, to shut up byte-compiler. 2025-01-18 15:17:28 +02:00
Eli Zaretskii
dcfc31dabd Merge from origin/emacs-30
853719c4c2 ; * lisp/net/eww.el (eww-download): Doc fix (bug#75585)
45ec5865aa ; * etc/NEWS: Tweak wording of NSM items.
b981889e9e ; cperl-mode-tests.el: Don't run the newest test in perl-...
6a864ef8f3 Add smtpmail cross-reference to 'auth-sources'.
1fd7957bc7 ; cperl-mode.el: Add a test for Bug#74245
8d289670d6 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b74ac4af94 ; cperl-mode.el: Allow bare $ in a signature (Bug#74245)
30e84fc653 Emphasize the use of :tag for new customization types

# Conflicts:
#	etc/NEWS
2025-01-18 07:46:34 -05:00
Eli Zaretskii
fae75737c8 ; Merge from origin/emacs-30
The following commit was skipped:

30e84fc653 Emphasize the use of :tag for new customization types
2025-01-18 07:46:31 -05:00
Eli Zaretskii
840057bb1b ; Fix last change by using 'cl-oddp' and 'cl-evenp' (bug#75633). 2025-01-18 13:08:45 +02:00
Ahmed Khanzada
103ae72ee9 New unit-tests for cl-lib (bug#75633). 2025-01-18 13:03:19 +02:00
Eli Zaretskii
853719c4c2 ; * lisp/net/eww.el (eww-download): Doc fix (bug#75585) 2025-01-18 12:56:48 +02:00
Eli Zaretskii
43c2e49d19 ; * nt/gnulib-cfg.mk: Remove unused modules. (Bug#75551) 2025-01-18 09:44:26 +02:00
Eli Zaretskii
17d9c22b80 ; * doc/lispref/parsing.texi (Pattern Matching): Fix markup in @example. 2025-01-18 09:22:39 +02:00
Eli Zaretskii
d6151e9da5 ; * doc/lispref/parsing.texi (Pattern Matching): Fix punctuation. 2025-01-18 09:18:09 +02:00
Gerd Möllmann
bee2f814f2 ; Fix a declare-function for reconsider-frame-fonts
* lisp/dynamic-setting.el (reconsider-frame-fonts): Declare.
2025-01-18 08:09:17 +01:00
Yuan Fu
fae424aba9
Fix treesit.el tests
* lisp/treesit.el (treesit--imenu-merge-entries):
(Ftreesit_parser_set_included_ranges): Warn in the docstring
that the function is destructive/owns the argument.
* test/src/treesit-tests.el (treesit-range-fixup-after-edit):
(treesit-imenu): Fix tests.
2025-01-17 18:24:45 -08:00
Yuan Fu
f7e41ba3d0
Make sure treesit.el doesn't create parsers by itself (bug#75456)
Up to this point, functions in
treesit.el (font-lock/indentation/etc) creates a parser if one
doesn't exist.  This doesn't work well with local parsers,
because local parsers are not visible at global level and
font-lock or indentation functions might accidentally create a
global parser for an embedded language.

The solution is to not create parsers automatically.  This has
the potential of breaking things, but I don't expect any actual
breakage: all the major modes create parsers they need in the
major mode body, even though previously it isn't technically
necessary.

* lisp/treesit.el (treesit-buffer-root-node):
(treesit--update-ranges-local):
(treesit-update-ranges):
(treesit--guess-primary-parser): Use treesit-parser-list instead
of treesit-parser-create.
2025-01-17 17:40:04 -08:00
Yuan Fu
197d09a5fa
Remap language symbol in treesit-query-compile (bug#72388)
* src/treesit.c (Ftreesit_query_compile): Use remapped language.
2025-01-17 17:27:23 -08:00
Yuan Fu
e3b9de03e6
Use treesit-query-first-valid in c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Use treesit-query-first-valid.  Use :default-language keyword.
(c-ts-mode--test-virtual-named-p): Remove function.
2025-01-17 17:27:23 -08:00
Yuan Fu
814b45775f
Add treesit-query-first-valid
This should help major modes to support grammar versions.

* doc/lispref/parsing.texi (Pattern Matching): Mention new function.
* lisp/treesit.el (treesit-query-first-valid): New function.
(treesit-query-valid-p): New function.
2025-01-17 17:27:23 -08:00
Paul Eggert
d3a2ec5210 Simplify alloc by assuming MALLOC_IS_LISP_ALIGNED
Problem reported by Hong Xu <https://bugs.gnu.org/75551#14>.
* src/alloc.c (MALLOC_IS_LISP_ALIGNED): static_assert it,
since it is true on all current Emacs platforms.
All uses simplified to assume it is true.
(xmalloc, xzalloc, xrealloc, lisp_malloc): Just use
malloc/calloc/realloc.  Since we are using the malloc-gnu
and realloc-posix modules, we need not worry about whether
these functions return a null pointer for zero-size requests.
(xrealloc): Stop worrying about no-longer-existing platforms
where realloc (nullptr, ...) did not work.
(laligned, lmalloc, lrealloc): Remove.  All uses removed.
2025-01-17 15:56:30 -08:00
Paul Eggert
29794c7145 Let Gnulib deal with malloc/realloc 0
Instead of worrying about whether malloc and realloc yield a
non-null pointer when given size 0 (the traditional behavior
recommended by Doug McIlroy, and the only behavior that makes
sense for Emacs), let Gnulib arrange for the traditional behavior.
* admin/merge-gnulib (GNULIB_MODULES): Add malloc-gnu (which we
were already depending on indirectly) and realloc-posix.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate by running admin/merge-gnulib.
2025-01-17 15:56:30 -08:00
Paul Eggert
9eefe7ccda Update from Gnulib by running admin/merge-gnulib 2025-01-17 15:56:30 -08:00
Pip Cet
2a00bedeae Fix build on Solaris 10 (bug#75451)
* autogen.sh: Avoid bashism.
* configure.ac (AC_PROG_AWK): Use.
* src/Makefile.in (AWK): Set.
(dmpstruct.h): Use "$(AWK)", not "awk".
* src/dired.c (DT_UNKNOWN, DT_DIR, DT_LNK): Define all three constants
or none of them.
2025-01-17 17:22:45 +00:00
Stefan Kangas
91b2b3654f Turn macros into enums in keyboard.h
* src/keyboard.h (item_property_idx, menu_item_pane_idx): Turn macros
into enums.
(ITEM_PROPERTY_MAX): New constant.
* src/keyboard.c (parse_menu_item): Use above new constant.
2025-01-17 18:17:35 +01:00
Stefan Kangas
45ec5865aa ; * etc/NEWS: Tweak wording of NSM items. 2025-01-17 17:28:24 +01:00
Pranshu Sharma
efd4fb51ec Do not rotate dedicated windows
* lisp/window-x.el (rotate-windows): Do not rotate windows
dedicated to their buffers.
2025-01-17 16:35:43 +01:00
Stefan Monnier
4fada67748 (hack-one-local-variable): Refine last patch (bug#74964)
* lisp/files.el (hack-local-variables--inhibit-eval): Rename from
`hack-local-variables--inhibit`.
(hack-one-local-variable): Skip only those eval forms we're already
in the process of evaluating.
2025-01-17 08:43:50 -05:00
Stefan Kangas
965e50e3ae Make NSM warn for TLS 1.1
* lisp/net/nsm.el (nsm-protocol-check--version): Warn also for
TLS 1.1.  Update docstring.
2025-01-17 12:25:39 +01:00
João Távora
f7ff5f1ba4 Flymake: fix bug introduced recently
Must protect against flymake--state never having been a hash
table at all, so that flymake-mode can be safely turned off even
if it never turned on in the first place.

Github-reference: https://github.com/joaotavora/eglot/discussions/1480

* lisp/progmodes/flymake.el (flymake-mode): Fix bug.
2025-01-17 10:58:15 +00:00
Stefan Kangas
c9196cf64e Make NSM warn for DH key exchange on medium severity
* lisp/net/nsm.el (network-security-protocol-checks): Bump dhe-kx
severity to medium.
(nsm-protocol-check--dhe-kx): Update docstring to describe the so-called
Racoon Attack, discovered in 2020.
2025-01-17 11:38:25 +01:00
Eli Zaretskii
0b6ac3c6c1 ; * doc/lispref/variables.texi (Lexical Binding): Fix a recent change. 2025-01-17 10:14:18 +02:00
Paul Eggert
bc4c5818df Update from Gnulib by running admin/merge-gnulib 2025-01-16 23:22:34 -08:00
Po Lu
37b5b3ea91 Fix the Lisp reference manual for older Texinfo
* doc/lispref/symbols.texi (Standard Properties): Don't provide
empty reference.

* doc/lispref/variables.texi (Lexical Binding): Don't abuse xref
in a standalone sentence.
2025-01-17 09:25:39 +08:00
Stephen Gildea
863fd1c276 Property definition-type becomes find-function-type-alist
lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): Use
symbol property 'find-function-type-alist' instead of 'definition-type'
(find-function-update-type-alist): New convenience function.
* doc/lispref/symbols.texi (Standard Properties): Update example to use
'find-function-type-alist' and 'find-function-update-type-alist'
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/tips.texi (Coding Conventions):
* doc/misc/ert.texi (How to Write Tests):
* etc/NEWS: Change reference to 'definition-type' to name
'find-function-type-alist' instead
2025-01-16 15:35:01 -08:00
Stefan Monnier
dace7fa2ab (cl-block, cl-return-from): Fix bug#75498
* lisp/emacs-lisp/cl-macs.el (cl-block, cl-return-from):
Change encoding so it obeys variable coping (i.e. lexical scoping when
`lexical-binding` is non-nil).
(cl--block-wrapper, cl--block-throw): Adjust accordingly.

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs--test-cl-block-lexbind-bug-75498): New test.
2025-01-16 17:48:21 -05:00
Stefan Monnier
8fc5001ba5 (asm-mode): Fix bug#75542
* lisp/progmodes/asm-mode.el (asm-mode): Be careful not to override
changes in the mode map or in `comment-start`.
Move the use of `asm-mode-set-comment-hook` back to where it was before
commit 0cff4e67f1de.
(asm-mode-set-comment-hook): Declare it obsolete.
2025-01-16 17:18:24 -05:00
Thierry Volpiatto
78f5ea750a Handle correctly DISPLAY-FUNCTION arg in 'bookmark--jump-via'
This fixes bug #75354 where when jumping to a eww bmk to other
window (or frame) the buffer is displayed both in other window
and current window.
Previously 'bookmark--jump-via' was calling DISPLAY-FUNCTION on the
current-buffer from the new buffer created by bookmark handler
(e.g. eww) now DISPLAY-FUNCTION is called on the new buffer from
the current buffer (winconf is saved when calling handler).
In addition to make eww bookmarks displayed properly, this fix as
well w3m bookmarks and as a side effect fix the eww quit function
which restore properly winconf after quitting (previously leaving
two windows open).
* lisp/bookmark.el (bookmark--jump-via): Fix it.
2025-01-16 18:43:06 +02:00
Kierin Bell
edec6e2264 Improve usability and documentation of Iroquoian input methods
* lisp/leim/quail/iroquoian.el: Add variants for Mohawk and Oneida
endonyms in comments and docstrings.  Update the 'oneida-postfix' input
method to make the most commonly used glottal stop character easiest to
input.  Update the 'onondaga-postfix' input method with mnemonic keys
for nasals in the Onondaga Nation, New York orthography.  (Bug#75448)

* etc/NEWS: Add variants for Mohawk and Oneida endonyms to NEWS entry.
2025-01-16 18:33:29 +02:00
Pip Cet
7fdec438ef ; * src/font.c (syms_of_font): Fix typo. 2025-01-16 15:55:30 +00:00
Eli Zaretskii
8d471adece Fix subtle problem with updating 'font_style_table'
* src/font.c (font_style_to_value): Update the Vfont_* variables
to keep them in sync with their slots in 'font_style_table'.
(Bug#75521)
(syms_of_font): Comment on usage of DEFVAR_LISP_NOPRO.
2025-01-16 17:51:47 +02:00
Eli Zaretskii
b86b8f52a6 ; * lisp/emacs-lisp/rx.el: Remove extra dash. (Bug#75603) 2025-01-16 17:15:42 +02:00
Stephen Gildea
d30351e038 Update recent find-func change to fix elisp-mode-tests
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
Check that symbol is a symbol before trying to get a property.
2025-01-16 06:10:57 -08:00
Steven Allen
ec20ebf241 Take the tab-line into account when computing the window edges
window-body-height correctly subtracts the tab-line's height but
window-edges did not add this same height to the y-offset.

See https://github.com/emacs-exwm/exwm/pull/114

* lisp/window.el (window-edges): Add the tab-line-height to the y-offet
of the window body.  (Bug#75576)
2025-01-16 09:50:22 +02:00
Paul Eggert
74dc2bd280 Update from Gnulib by running admin/merge-gnulib 2025-01-15 19:31:39 -08:00
Stefan Kangas
4f946a6522 Fix clear-string crash with text properties
* src/fns.c (Fclear_string): Fix crash by clearing all text
properties.  (Bug#75581)
* doc/lispref/strings.texi (Modifying Strings): Document the above
behavior change.
Fix proposed by Andreas Schwab <schwab@linux-m68k.org>.
2025-01-15 23:16:19 +01:00
Stefan Kangas
86916c136b Add clear-string to symbol-releases.eld
* etc/symbol-releases.eld (clear-string): Add function.
2025-01-15 23:12:00 +01:00
Stefan Kangas
e092aabf71 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'
* src/comp.c (emit_limple_insn):
* src/msdos.c (dos_set_keyboard, dos_rawgetc):
* src/sysdep.c (convert_speed, list_system_processes):
* src/w32fns.c (deliver_wm_chars, Fx_file_dialog):
* src/w32term.c (record_event, w32_read_socket):
Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.

* admin/coccinelle/arrayelts.cocci: New file.
2025-01-15 20:19:39 +01:00
Stefan Kangas
16c89c5ae5 Use calln instead of calling Ffuncall directly
* src/bytecode.c (bcall0):
* src/comp.c (bcall0):
* src/eval.c (apply1):
* src/lisp.h (call0):
* src/thread.c (invoke_thread_function): Use calln instead of calling
Ffuncall directly.

* admin/coccinelle/calln.cocci: New semantic patch.
2025-01-14 21:37:04 +01:00