]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 weeks agoUnexec removal: Build system
Pip Cet [Wed, 21 Aug 2024 08:50:02 +0000 (08:50 +0000)]
Unexec removal: Build system

* configure.ac (CYGWIN_OBJ): Remove comment.
* src/Makefile.in (PAXCTL, SETFATTR, PAXCTL_dumped, PAXCTL_notdumped):
Remove definitions.
(emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
* src/deps.mk: Remove 'unexec'-specific code.

(cherry picked from commit a54ff8c18fa9b97b737d0de1a5e160b454ac294d)

2 weeks agoUnexec removal: Documentation adjustments
Pip Cet [Wed, 21 Aug 2024 08:45:13 +0000 (08:45 +0000)]
Unexec removal: Documentation adjustments

* doc/lispref/internals.texi (Building Emacs):
* doc/lispref/os.texi (Command-Line Arguments): Remove documentation for
'unexec'-specific code and arguments.
* etc/PROBLEMS: Remove unexec-specific problems.

(cherry picked from commit 0e37b11e659dd58c520d557820b006a8d03c71e6)

2 weeks agoDon't recognize "bootstrap" option for --temacs
Pip Cet [Wed, 21 Aug 2024 08:44:14 +0000 (08:44 +0000)]
Don't recognize "bootstrap" option for --temacs

This option only makes sense for unexec dumping.

* src/emacs.c (main): Recognize "pbootstrap" only, not "bootstrap".

(cherry picked from commit 9a0728af9df7c208a7e93f8e970b7348b1273fee)

2 weeks agoPure storage removal: Documentation
Pip Cet [Wed, 21 Aug 2024 08:59:25 +0000 (08:59 +0000)]
Pure storage removal: Documentation

* etc/NEWS: Document removal of unexec dumper.
* etc/PROBLEMS: Remove pure space problems.

(cherry picked from commit 1c495735b4fd7411bca39161b45e0115d0d377b9)

2 weeks agoPure storage removal: Bump nativecomp ABI
Pip Cet [Tue, 20 Aug 2024 19:16:58 +0000 (19:16 +0000)]
Pure storage removal: Bump nativecomp ABI

Use "9" as MPS builds use "7" and "8".

* src/comp.c (ABI_VERSION): Bump.

(cherry picked from commit 647f6aa4c06f681df8d2ab6520d8bcd273dff1a8)

2 weeks agoPure storage removal: Remove documentation
Pip Cet [Tue, 20 Aug 2024 19:15:16 +0000 (19:15 +0000)]
Pure storage removal: Remove documentation

As pure storage is now gone, it no longer needs to be documented.

* doc/lispref/elisp.texi (Top):
* doc/lispref/internals.texi (GNU Emacs Internals): Remove "Pure
Storage" section.
(Building Emacs, Garbage Collection, Writing Emacs Primitives):
* doc/lispref/symbols.texi (Standard Properties): Remove references to
pure storage.
* src/alloc.c (Fgarbage_collect): Remove docstring text referring to
pure storage.

(cherry picked from commit c9ab3258760c5ef2baf3ecf2a2a0051fc3fb4612)

2 weeks agoPure storage removal: Adjust nativecomp code
Pip Cet [Tue, 20 Aug 2024 19:09:14 +0000 (19:09 +0000)]
Pure storage removal: Adjust nativecomp code

* lisp/emacs-lisp/comp.el (comp-curr-allocation-class, comp-ctxt)
(comp--emit-for-top-level, comp--emit-lambda-for-top-level)
(comp--finalize-relocs): Remove 'd-impure' allocation class.
* src/comp.c (PURE_RELOC_SYM, DATA_RELOC_IMPURE_SYM)
(TEXT_DATA_RELOC_IMPURE_SYM): Remove definitions.
(comp_t): Remove 'pure_ptr', 'check_impure', 'data_relocs_impure',
'd_impure_idx'.
(helper_link_table): Remove 'pure_write_error'.
(obj_to_reloc): Adjust to removal of 'data_relocs_impure'.
(emit_PURE_P): Remove function.
(declare_imported_data, declare_runtime_imported_funcs)
(emit_ctxt_code): Adjust to removed fields.
(define_setcar_setcdr): Don't call 'CHECK_IMPURE'.
(define_CHECK_IMPURE): Remove function.
(Fcomp__compile_ctxt_to_file0, check_comp_unit_relocs, load_comp_unit)
(Fcomp__register_lambda): Adjust to removed allocation class 'd-impure'.
(syms_of_comp): Don't define 'd-impure'.
* src/comp.h (struct Lisp_Native_Comp_Unit): Drop support for allocation
class 'd-impure'.
* src/lisp.h (allocate_native_comp_unit):
* src/pdumper.c (dump_do_dump_relocation): Adjust to struct change.

(cherry picked from commit bd2b59f07337c4f5980666875207bf877634b1b3)

2 weeks agoPure storage removal: Remove docstring hack
Pip Cet [Tue, 20 Aug 2024 19:08:33 +0000 (19:08 +0000)]
Pure storage removal: Remove docstring hack

This should no longer be needed.

* src/eval.c (Fautoload): Don't try to work around pure storage bug.

(cherry picked from commit 69fea4f29a1390912e4140a3ebacc50b7338db6f)

2 weeks agoPure storage removal: Remove purecopy hash table flag
Pip Cet [Tue, 20 Aug 2024 19:04:44 +0000 (19:04 +0000)]
Pure storage removal: Remove purecopy hash table flag

* lisp/emacs-liqsp/comp.el (comp--jump-table-optimizable): Adjust
comment.
* src/category.c (hash_get_category_set):
* src/emacs-module.c (syms_of_module):
* src/fns.c (make_hash_table): Remove 'purecopy' flag and update
docstring.
(Fmake_hash_table): Ignore ':purecopy' argument.
* src/frame.c (make_frame):
* src/image.c (xpm_make_color_table_h):
* src/lisp.h (struct Lisp_Hash_Table): Drop 'purecopy' flag.
* src/pdumper.c (dump_hash_table): Don't dump 'purecopy' flag.
* src/print.c (print_object): Don't print 'purecopy' flag

* src/json.c (json_parse_object):
* src/lread.c (readevalloop, read_internal_start):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/profiler.c (export_log):
* src/xfaces.c (syms_of_xfaces):
* src/xterm.c (syms_of_xterm): Adjust calls to 'make_hash_table'.

(cherry picked from commit afd61deaaeb5e5e6845bdf995ac5ee9a3479599c)

2 weeks agoPure storage removal: Remove support for pinned objects
Pip Cet [Tue, 20 Aug 2024 19:02:29 +0000 (19:02 +0000)]
Pure storage removal: Remove support for pinned objects

* src/alloc.c (symbol_block_pinned): Remove variable.
(init_symbol): Don't initialize 'pinned flag'.
(pinned_objects): Remove variable.
(mark_pinned_objects, mark_pinned_symbols): Remove functions.
(garbage_collect): Don't call 'mark_pinned_objects',
'mark_pinned_symbols'.
* src/lisp.h (struct Lisp_Symbol): Remove 'pinned' flag.
* src/pdumper.c (dump_symbol): Remove 'pinned' flag from dump.

(cherry picked from commit e1e101c6c10b6e5110c2c47946d477a752828a78)

2 weeks agoPure storage removal: Replace calls to removed functions
Pip Cet [Tue, 20 Aug 2024 19:00:20 +0000 (19:00 +0000)]
Pure storage removal: Replace calls to removed functions

* src/alloc.c (string_bytes, pin_string, valid_lisp_object_p)
(process_mark_stack, survives_gc_p, syms_of_alloc):
* src/androidterm.c (android_term_init): Replace call to
'build_pure_c_string'.
* src/buffer.c (init_buffer_once, syms_of_buffer):
* src/bytecode.c (exec_byte_code):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/category.c (Fdefine_category):
* src/coding.c (syms_of_coding):
* src/comp.c (Fcomp__compile_ctxt_to_file0)
(maybe_defer_native_compilation, syms_of_comp):
* src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/doc.c (Fsnarf_documentation):
* src/emacs-module.c (syms_of_module):
* src/eval.c (Finternal__define_uninitialized_variable)
(Fdefconst_1, define_error, syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table):
* src/fontset.c (syms_of_fontset):
* src/frame.c (make_initial_frame):
* src/haikufns.c (syms_of_haikufns):
* src/intervals.c (create_root_interval):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent)
(store_in_keymap, syms_of_keymap):
* src/lisp.h:
* src/lread.c (Fload, read0, intern_c_string_1, define_symbol)
(Fintern, defsubr, syms_of_lread):
* src/pdumper.c (Fdump_emacs_portable):
* src/pgtkfns.c (syms_of_pgtkfns):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sqlite.c (syms_of_sqlite):
* src/syntax.c (syms_of_syntax):
* src/treesit.c (syms_of_treesit):
* src/w32fns.c (syms_of_w32fns):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xftfont.c (syms_of_xftfont):
* src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE',
'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list',
'pure_listn', etc., by impure equivalents.

(cherry picked from commit 5ec86966638885a0f8df8afa28a01ca103ad2a49)

2 weeks agoPure storage removal: Main part
Pip Cet [Tue, 20 Aug 2024 18:52:35 +0000 (18:52 +0000)]
Pure storage removal: Main part

* src/alloc.c (pure, PUREBEG, purebeg, pure_size)
(pure_bytes_used_before_overflow, pure_bytes_used_lisp)
(pure_bytes_used_non_lisp): Remove definitions.
(init_strings): Make empty strings impure.
(cons_listn): Drop 'cons' argument.
(pure_listn): Remove function.
(init_vectors): Allocate zero vector manually to avoid freelist issues.
(pure_alloc, check_pure_size, find_string_data_in_pure)
(make_pure_string, make_pure_c_string, pure_cons, make_pure_float)
(make_pure_bignum, make_pure_vector, purecopy_hash_table): Remove
functions.
(purecopy): Reduce to hash consing our argument.
(init_alloc_once_for_pdumper): Adjust to lack of pure space.
(pure-bytes-used): Adjust docstring to mark as obsolete.
(purify-flag): Keep for hash consing, but adjust docstring.
* src/bytecode.c:
* src/comp.c: Don't include "puresize.h".
* src/conf_post.h (SYSTEM_PURESIZE_EXTRA): Remove definition.
* src/data.c (pure_write_error): Remove function.
* src/deps.mk: Remove puresize.h dependency throughout.
* src/emacs.c:
* src/fns.c:
* src/intervals.c:
* src/keymap.c: Don't include "puresize.h".
* src/lisp.h (struct Lisp_Hash_Table): Adjust comment.
(pure_listn, pure_list, build_pure_c_string): Remove.
* src/w32heap.c (FREEABLE_P): Don't do use 'dumped_data'.
(malloc_before_dump, realloc_before_dump, free_before_dump): Remove
functions.
* src/w32heap.h: Adjust prototype.
* lisp/loadup.el:
* lisp/startup.el: Remove purespace code.

(cherry picked from commit f84ccff5a6275782a37534ed55b706db35f228ac)

2 weeks agoPure storage removal: Delete puresize.h
Pip Cet [Tue, 20 Aug 2024 18:52:04 +0000 (18:52 +0000)]
Pure storage removal: Delete puresize.h

* puresize.h: Delete file.

(cherry picked from commit d359858b5d02e60c1d46c26750e5510c2606916a)

2 weeks agoUnexec removal: Adjust and simplify W32-specific code
Pip Cet [Tue, 20 Aug 2024 18:48:42 +0000 (18:48 +0000)]
Unexec removal: Adjust and simplify W32-specific code

* src/emacs.c (main): Unconditionally call 'init_heap' without an
argument.  Adjust comment.
* src/w32heap.c (dumped_data, DUMPED_HEAP_SIZE): Remove definitions.
(heap): Remove variable.
(dumped_data_commit): Remove function.
(init_heap): Drop unexec-specific code.

(cherry picked from commit aab5a2fe4c4164019b8b5bf09cce835b2aa8549c)

2 weeks agoUnexec removal: Remove HYBRID_MALLOC support
Pip Cet [Tue, 20 Aug 2024 18:40:29 +0000 (18:40 +0000)]
Unexec removal: Remove HYBRID_MALLOC support

* src/gmalloc.c (gdefault_morecore): Remove HYBRID_MALLOC code.
(allocated_via_gmalloc, hybrid_malloc, hybrid_calloc, hybrid_free_1)
(hybrid_free, hybrid_aligned_alloc, hybrid_realloc): Remove functions.

* msdos/sed1v2.inp:
* msdos/sedlibmk.inp:
* src/alloc.c (GC_MALLOC_CHECK, USE_ALIGNED_ALLOC)
(refill_memory_reserve, aligned_alloc):
* src/emacs.c (main):
* src/lastfile.c (my_edata):
* src/lisp.h:
* src/ralloc.c:
* src/sysdep.c (get_current_dir_name_or_unreachable):
* src/xdisp.c (decode_mode_spec): Remove HYBRID_MALLOC conditions.

* configure.ac (hybrid_malloc, HYBRID_MALLOC): Remove variables and
dependent code.
* src/conf_post.h (hybrid_malloc, hybrid_calloc, hybrid_free)
(hybrid_aligned_alloc, hybrid_realloc): Remove conditional prototypes.
* src/Makefile.in (HYBRID_MALLOC): Remove variable.
(base_obj): Remove sheap.o
(LIBEGNU_ARCHIVE):
* lib/Makefile.in (libgnu_a_OBJECTS): Remove libegnu.a support.

(cherry picked from commit b2bc337a5f8d84978029873ce8e51b8d3d53121a)

2 weeks agoUnexec removal: Main part
Pip Cet [Tue, 20 Aug 2024 18:31:05 +0000 (18:31 +0000)]
Unexec removal: Main part

* configure.ac: Remove unexec-specific parts.
(EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC
feature.
(AC_ECHO): No longer display a line about the unexec feature.
* lisp/loadup.el:
* lisp/startup.el: Remove unexec-specific code.
* src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'.
* src/alloc.c (staticvec): Never initialize this variable.
(BLOCK_ALIGN): Always allow large blocks.
(mmap_lisp_allowed_p): Remove unexec-specific code.
* src/buffer.c (init_buffer):
* src/conf_post.h (ADDRESS_SANITIZER):
* src/emacs.c (load_pdump, main): Remove unexec-specific code.
(Fdump_emacs): Remove function.
(syms_of_emacs): Remove 'Fdump_emacs'.
* src/lastfile.c: Remove unexec-specific code.
* src/lisp.h (gflags): Remove unexec-specific flags.
(will_dump_p, will_bootstrap_p, will_dump_with_unexec_p)
(dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust
predicates.
(SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition.
* src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning.
* src/process.c (init_process_emacs): Remove !unexec condition
* src/sysdep.c (maybe_disable_address_randomization): Adjust comment.
(init_signals):
* src/timefns.c (init_timefns): Remove unexec-specific code.
* src/w32heap.c (report_temacs_memory_usage): Remove function.
* src/w32heap.h: Adjust comment.
* src/w32image.c (globals_of_w32image): Remove unexec-specific code.

(cherry picked from commit 15e2b14f03796467fab8e8086d293a5813afaa5b)

2 weeks agoUnexec removal: Remove obsolete files
Pip Cet [Tue, 20 Aug 2024 18:29:53 +0000 (18:29 +0000)]
Unexec removal: Remove obsolete files

* src/sheap.c, src/sheap.h, src/unexec.h, src/unexaix.c, unexcoff.c:
* src/unexcw.c, src/unexelf.c, src/unexhp9k800.c, src/unexmacosx.c:
* src/unexsol.c, src/unexw32.c: Remove files.

(cherry picked from commit 7ce34a3bcf5ed277ef37aa75e1ccbd858543b6cf)

3 weeks ago; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Thu, 30 Jan 2025 12:03:20 +0000 (14:03 +0200)]
; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.

(cherry picked from commit f2e97338eb96739711f9d4cb308219ed3df46c06)

3 weeks ago; * src/pdumper.c (dump_do_fixup): Pacify GCC.
Eli Zaretskii [Thu, 30 Jan 2025 09:02:47 +0000 (11:02 +0200)]
; * src/pdumper.c (dump_do_fixup): Pacify GCC.

(cherry picked from commit a99ba59aa02ef8cfd314737950b6cd8d97015925)

3 weeks agoTramp cleanup
Michael Albinus [Thu, 30 Jan 2025 07:40:34 +0000 (08:40 +0100)]
Tramp cleanup

* doc/misc/tramp.texi (Predefined connection information):
Mention also "androidsu" as special case of "tmpdir".
(Remote processes): Signals are not delivered to remote direct
async processes.  Say, that there are restrictions for transfer of
binary data to remote direct async processes.

* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
Simplify.

(cherry picked from commit 6b3d69b16ed50c8a4dea1e3f1f9f231657e66590)

3 weeks agoFix tree-sitter language remapping
Yuan Fu [Thu, 30 Jan 2025 07:20:38 +0000 (23:20 -0800)]
Fix tree-sitter language remapping

* src/treesit.c (resolve_language_symbol): Move forward.
(treesit_ensure_query_compiled): Resolve language remapping
here.
(Ftreesit_parser_list): Don't resolve language remaping here,
because there's no need: parsers now carries the remapped
language.
(Ftreesit_query_compile): Don't resolve language remapping here,
because we resolve language remapping when actually compiling
the query.  Also we want the query to carry the unmapped
language.

(cherry picked from commit 3be04f3dab85348006a8567e172c3dcb0a6831a4)

3 weeks agoAdd back tree-sitter declare-function for python.el (bug#75526)
Yuan Fu [Tue, 28 Jan 2025 02:00:16 +0000 (18:00 -0800)]
Add back tree-sitter declare-function for python.el (bug#75526)

treesit-declare-unavailable-functions is not available for old
emacs versions, but python.el is a core package available on
ELPA.

Remove the treesit-declare-unavailable-functions until compat.el
releases a new version that contains it.

* lisp/progmodes/python.el: Remove
treesit-declare-unavailable-functions and add back
declare-function forms.

(cherry picked from commit c81b50aaf520daa2c9c8b45715f75149bc254014)

3 weeks agoFurther fixes for cursor positioning (bug#75056)
Gerd Möllmann [Wed, 29 Jan 2025 12:42:40 +0000 (13:42 +0100)]
Further fixes for cursor positioning (bug#75056)

* src/dispnew.c (write_matrix): Don't set the cursor here. Parameter to
set the cursor or not removed.
(combine_updates_for_frame): Call tty_set_cursor here, depending on
whether or not the selected frame is related to the updated frame.
(update_frame_with_menu): Adapt to change of write_matrix.

(cherry picked from commit 782be196e52f8912c3e26c646f04fe48cf703aca)

3 weeks agoReplace two macros with functions in dispnew.c (bug#75056)
Gerd Möllmann [Wed, 29 Jan 2025 07:34:43 +0000 (08:34 +0100)]
Replace two macros with functions in dispnew.c (bug#75056)

* src/dispnew.c (WINDOW_TO_FRAME_VPOS, WINDOW_TO_FRAME_VPOS): Macros
removed.
(window_to_frame_vpos, window_to_frame_vpos): Always define, and use
them instead of the removed macros.

(cherry picked from commit 7aacefba6bfe4c0e658f09d2ac7f025f9a9a827f)

3 weeks agoDon't use selected frame in tty_set_cursor (bug#75056)
Gerd Möllmann [Wed, 29 Jan 2025 07:28:58 +0000 (08:28 +0100)]
Don't use selected frame in tty_set_cursor (bug#75056)

* src/dispnew.c (tty_set_cursor): Add frmae parameter.
(write_matrix): Pass to the updated frame to tty_set_cursor.

(cherry picked from commit 6cf479931d1adc03661116ef827f77fdc615db22)

3 weeks agoCC Mode: Don't propertize parens in macros incorrectly
Alan Mackenzie [Wed, 29 Jan 2025 18:35:31 +0000 (18:35 +0000)]
CC Mode: Don't propertize parens in macros incorrectly

Parentheses in macros were getting incorrectly propertized with
the '(1) (punctuation) syntax-table text property.  This was
due to a typo in the patch "CC Mode: Rationalize and optimize
cache invalidation (1)" from 2024-10-06.  Correct this.

* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Move the
first c-clear-syntax-table-with-value-trim-caches invocation
from inside the enclosing `when' form to after it.

(cherry picked from commit b34c069d8250e9557d5ef5e7997a5a7e370c7ad2)

3 weeks agoFix args in treesit-beginning-of-defun and treesit-end-of-defun
Juri Linkov [Wed, 29 Jan 2025 17:58:10 +0000 (19:58 +0200)]
Fix args in treesit-beginning-of-defun and treesit-end-of-defun

* lisp/treesit.el (treesit-beginning-of-defun): Set arg to 1 when nil.
(treesit-end-of-defun): Fix arg names in docstring.

(cherry picked from commit 6a92f674fe5123742b2c1bc890bab7b3743582c8)

3 weeks ago; Remove duplicate defvar in comp-run.el.
Basil L. Contovounesios [Wed, 29 Jan 2025 13:15:44 +0000 (14:15 +0100)]
; Remove duplicate defvar in comp-run.el.

* lisp/emacs-lisp/comp-run.el (comp-async-compilations): Remove
duplicate definition (bug#75925).

(cherry picked from commit 25c254aa417baa9a5f8fd987e3467bd7a5f0de5b)

3 weeks ago; Fix Cygw32 build
Eli Zaretskii [Wed, 29 Jan 2025 15:55:58 +0000 (17:55 +0200)]
; Fix Cygw32 build

(cherry picked from commit cb62a47896bb21420a709c655034e8acfcb08082)

3 weeks agoEglot: don't auto-shutdown when reverting of single managed buffer
João Távora [Wed, 29 Jan 2025 08:37:37 +0000 (08:37 +0000)]
Eglot: don't auto-shutdown when reverting of single managed buffer

When eglot-autoshutdown is t and the only reason we're
considering it is because of a revert (which tears down Eglot's
minor mode as if by killing), detect that situation and
purposedly cancel the shutdown.

* lisp/progmodes/eglot.el (eglot--managed-mode): Tweak.

(cherry picked from commit 142fe5ace4e5d4ed667505f73fc95757a764d530)

3 weeks agoEglot: in eglot-code-action-indications, make 'margin' interactive
João Távora [Wed, 29 Jan 2025 08:33:54 +0000 (08:33 +0000)]
Eglot: in eglot-code-action-indications, make 'margin' interactive

Didn't know it was possible, thanks to Ergus <spacibba@aol.com> for the
tip about binding [left-margin mouse-2] in the keymap.

The technique adopted in 'eglot-mouse-call' possibly still doesn't work
very well if the margin thing we're clicking on is not on the line point
is currently on.  But we don't have that problem (yet?) because LSP
action suggestions function mostly on a "at point" basis.

* lisp/progmodes/eglot.el (eglot-code-action-indications): Adjust docstring.
(eglot--mouse-call): Don't go anywhere except in text area.
(eglot-diagnostics-map): Bind eglot-mouse-actions to left-margin.

(cherry picked from commit e2ff77052da91e662bbd3cb19a742604db742d32)

3 weeks agoHideshow support for tree-sitter in hs-minor-mode (bug#75609)
Juri Linkov [Tue, 28 Jan 2025 19:07:16 +0000 (21:07 +0200)]
Hideshow support for tree-sitter in hs-minor-mode (bug#75609)

* lisp/progmodes/hideshow.el (hs-inside-comment-p-func):
New buffer-local variable.
(hs-hide-block-at-point): Check if 'hs-block-end-regexp' is
a string or a function.
(hs-inside-comment-p): Move body to 'hs-inside-comment-p--default'.
Call 'hs-inside-comment-p-func' if it's a function.
(hs-inside-comment-p--default): New function with body from
'hs-inside-comment-p'.
(hs-hide-all): Don't use 'hs-block-start-regexp' when it's not a string.
(hs-minor-mode): Don't call 'hs-grok-mode-type' when
'hs-inside-comment-p-func' already has a buffer-local value.

* lisp/treesit.el (treesit-hs-block-end)
(treesit-hs-find-block-beginning, treesit-hs-find-next-block)
(treesit-hs-looking-at-block-start-p)
(treesit-hs-inside-comment-p): New functions.
(treesit-major-mode-setup): Set hs-minor-mode buffer-local variables.

(cherry picked from commit 2e3b085d447bc2cd1a0e779145be9cab9a15d7af)

3 weeks ago* lisp/treesit.el: Use default display behavior for treesit-explore.
Juri Linkov [Tue, 28 Jan 2025 18:49:52 +0000 (20:49 +0200)]
* lisp/treesit.el: Use default display behavior for treesit-explore.

(treesit-explorer-switch-parser, treesit-explore):
Revert to previous behavior (bug#75079).

(cherry picked from commit cd6aed5c9e905a8fc7608a172a689e99ff27fe25)

3 weeks agoFix two more drawings in windows.texi
Martin Rudalics [Tue, 28 Jan 2025 17:46:31 +0000 (18:46 +0100)]
Fix two more drawings in windows.texi

* doc/lispref/windows.texi (Changing Window Layouts): Fix two more
drawings.

(cherry picked from commit af033548aa7900c02c01ae8c5a13720eb50742e3)

3 weeks ago; Fix last change
Eli Zaretskii [Tue, 28 Jan 2025 16:18:24 +0000 (18:18 +0200)]
; Fix last change

* src/buffer.c (Fother_buffer):
* lisp/frame.el (make-frame):
* doc/lispref/frames.texi (Creating Frames): Fix em-dash.

(cherry picked from commit 8c4a4b4eab8ac4dc26e65d552821f3f0b49c79c4)

3 weeks agoNew variable 'expose-hidden-buffer' (Bug#75828)
Martin Rudalics [Tue, 28 Jan 2025 15:59:45 +0000 (16:59 +0100)]
New variable 'expose-hidden-buffer' (Bug#75828)

* src/frame.c (make_frame): Handle 'expose-hidden-buffer'.
(expose-hidden-buffer): New variable to handle hidden buffers.
* src/buffer.c (Fother_buffer): Mention that it does not return
a hidden buffer.
* lisp/frame.el (make-frame): In doc-string describe handling
of hidden buffers.
* doc/lispref/frames.texi (Creating Frames): Explain handling
of hidden buffers in description of 'make-frame'.

(cherry picked from commit 7f01dd8906cbc8839ffecc55cfa7ff789f3fa298)

3 weeks ago; * admin/MAINTAINERS: Remove Bastien Guerry.
Bastien Guerry [Tue, 28 Jan 2025 13:25:22 +0000 (14:25 +0100)]
; * admin/MAINTAINERS: Remove Bastien Guerry.

(cherry picked from commit c400ac680f4db86686126876e2d709b1e6099544)

3 weeks agoEglot: allow customizing the mode line (bug#71823)
João Távora [Tue, 28 Jan 2025 10:39:25 +0000 (10:39 +0000)]
Eglot: allow customizing the mode line (bug#71823)

* lisp/progmodes/eglot.el (eglot-code-action-indications): Adjust docstring.
(eglot--mode-line-props): Tweak.
(eglot--mode-line-format): Delete.
(eglot-mode-line-format): New defcustom.
(eglot-mode-line-menu, eglot-mode-line-session)
(eglot-mode-line-error, eglot-mode-line-pending-requests)
(eglot-mode-line-progress, eglot-mode-line-action-suggestion): New
constants.
(mode-line-misc-info): Adjust setting

* etc/EGLOT-NEWS: Mention new feature.

* doc/misc/eglot.texi (Customization Variables): Mention new variable.

(cherry picked from commit b4e9115f4fcfc174a9c3b974bf414ae4af060ae7)

3 weeks agoEglot: suggest code actions at point
João Távora [Sun, 26 Jan 2025 23:26:51 +0000 (23:26 +0000)]
Eglot: suggest code actions at point

* lisp/progmodes/eglot.el (eglot-code-action-indicator-face): New face.
(eglot-code-action-indications, eglot-code-action-indicator): New defcustoms.
(eglot--highlights): Move up here.
(eglot--managed-mode): Rework.
(eglot--server-menu-map, eglot--main-menu-map): Extract maps into
variables (avoids odd mode-line bug).
(eglot--mode-line-format): Rework.
(eglot--code-action-params): New helper.
(eglot-code-actions): Rework.
(eglot--read-execute-code-action): Tweak.
(eglot-code-action-suggestion): New function.

* etc/EGLOT-NEWS: Mention new feature.

* doc/misc/eglot.texi (Eglot Features): Mention new feature.
(Customization Variables): Mention new variables.

(cherry picked from commit d6a502fc7a69dfa11aa100da5966a6962a82f613)

3 weeks agoEglot: introduce eglot-advertise-cancellation
João Távora [Tue, 14 Jan 2025 15:58:57 +0000 (15:58 +0000)]
Eglot: introduce eglot-advertise-cancellation

Setting this variable to true causes Eglot to send special
cancellation notification for certain stale client request.

This may help some LSP servers avoid doing costly but ultimately useless
work on behalf of the client, improving overall performance.

Request cancellation is described in

   https://microsoft.github.io/language-server-protocol/
      specifications/lsp/3.17/specification/#cancelRequest

* lisp/jsonrpc.el (jsonrpc-request): Accept function as value for
CANCEL-ON-INPUT.

* lisp/progmodes/eglot.el (eglot--request): Rework.

* doc/misc/eglot.texi (Customizing Eglot): Mention
eglot-advertise-cancellation.

(cherry picked from commit 7f0ef9655cdc28c3b8055e32c9e84ea57339b139)

3 weeks agoEglot: restructure and overhaul documentation
João Távora [Tue, 28 Jan 2025 10:37:41 +0000 (10:37 +0000)]
Eglot: restructure and overhaul documentation

* doc/misc/eglot.texi (Starting Eglot): Tweak.
(Using Eglot): Remove link to 'Eglot Variables'.
(Eglot Features): Rework.
(Eglot and Buffers): Rework.
(Eglot Commands): Rework.
(Customizing Eglot): New chapter.
(Customization Variables): Now contains what 'Eglot Variables'
used to contain.
(Other Variables): New section.
(More Customization): New section.
(...elsewhere...): Apply 'fill-paragraph'.

(cherry picked from commit 9e4b626f7eea788966a1ad92d4af76f8b0a2573f)

3 weeks agoEglot: symbol highlighting now done in eldoc-documentation-functions
João Távora [Fri, 24 Jan 2025 22:51:54 +0000 (22:51 +0000)]
Eglot: symbol highlighting now done in eldoc-documentation-functions

Even though highlighting the thing at point isn't really producing
documentation at point, theory and practice have shown that using
eldoc-documentation-functions for this is a feasible way to avoid
reimplementing all the idle timer logic for such functionality.

In fact, we were already using ElDoc for this purpose, but this commit
makes it so the new eglot-highlight-eldoc-function is a first class
citizen in eldoc-documentation-functions, so users can manipulate it if
so desired.

* lisp/progmodes/eglot.el (eglot--managed-mode): Use
eglot-highlight-eldoc-function
(eglot-hover-eldoc-function): Don't mix highlighting with hover.
(eglot-highlight-eldoc-function): Rename and rework from
eglot--highlight-piggyback

(cherry picked from commit 60166a419f601b413db86ddce186cc387e8ec269)

3 weeks agoFix previous commit for Changing Window Layouts
Martin Rudalics [Tue, 28 Jan 2025 09:00:50 +0000 (10:00 +0100)]
Fix previous commit for Changing Window Layouts

* doc/lispref/windows.texi (Changing Window Layouts): Remove wrong
example.  Change some indentations.

(cherry picked from commit 33827bed049e348da7544489903c7d6870f1500a)

3 weeks agoFix frame-visible-p for tty root frames
Gerd Möllmann [Tue, 28 Jan 2025 03:37:56 +0000 (04:37 +0100)]
Fix frame-visible-p for tty root frames

* src/frame.c (Fframe_visible_p): Don't unconditionally return t for tty
root frames.

(cherry picked from commit d60198d7a49acd8cd2c250625ac57deef484cee2)

3 weeks agoAvoid some make_formatted_string mallocs
Paul Eggert [Tue, 28 Jan 2025 01:15:47 +0000 (17:15 -0800)]
Avoid some make_formatted_string mallocs

* src/alloc.c (make_formatted_string):
Grow the local buffer from 64 to MAX_ALLOCA bytes.

(cherry picked from commit 1f1088188e8b9319f60141a093431f1f85c2b03c)

3 weeks agoMake vmessage a bit safer
Paul Eggert [Tue, 28 Jan 2025 01:13:02 +0000 (17:13 -0800)]
Make vmessage a bit safer

* src/xdisp.c (vmessage): Avoid undefined behavior if
FRAME_MESSAGE_BUF_SIZE (f) is zero, or if doprnt generates output
containing only encoding errors.  Although it’s not clear whether
either is possible, it is better to be safe.  Also, clarify via a
new local message_bufsize.

(cherry picked from commit 8e7588a2675655b88dc3ac5b7ed46ab6f1b891ec)

3 weeks agoAvoid printing NUL characters in 'message' (bug#75900)
Pip Cet [Mon, 27 Jan 2025 21:06:27 +0000 (13:06 -0800)]
Avoid printing NUL characters in 'message' (bug#75900)

* src/xdisp.c (vmessage): Increase buffer size to fit an extra
multibyte character.  On buffer overflow, drop the last multibyte
character to determine an accurate byte length.

(cherry picked from commit 8812f526cfb145e00ee4cb74eac05b25953da02c)

3 weeks agoFix buffer overflows in doprnt (bug#75900)
Pip Cet [Mon, 27 Jan 2025 21:05:07 +0000 (13:05 -0800)]
Fix buffer overflows in doprnt (bug#75900)

* src/doprnt.c (doprnt): Clear rest of buffer on multibyte overflow.
Always decrement bufsize when writing a byte.

(cherry picked from commit 0ed913cf46a8b07a39b065216272a7aa07123282)

3 weeks agodoprnt %X support
Paul Eggert [Mon, 27 Jan 2025 21:01:47 +0000 (13:01 -0800)]
doprnt %X support

* src/doprnt.c (doprnt): Also support %X, since callers
now use %X.

(cherry picked from commit 9b2e230c063f3e716c08a31685e16dff91130f4d)

3 weeks agoDon't use obsolete face variables in lisp-mode.el
Stefan Kangas [Mon, 27 Jan 2025 21:48:28 +0000 (22:48 +0100)]
Don't use obsolete face variables in lisp-mode.el

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1)
(lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2)
(lisp-cl-font-lock-keywords-2): Don't use obsolete face variables.

(cherry picked from commit ba60fa3deaa030eb4815caa8c180ac841709e86a)

3 weeks ago; Skip commit 29c6dad78db6d599108612f120cd0fb1fb18e105
Eshel Yaron [Thu, 30 Jan 2025 18:08:30 +0000 (19:08 +0100)]
; Skip commit 29c6dad78db6d599108612f120cd0fb1fb18e105

3 weeks ago; Skip commit 2d386fc4490c8e61ed05384ec486ef0d5e7164b1
Eshel Yaron [Thu, 30 Jan 2025 18:08:28 +0000 (19:08 +0100)]
; Skip commit 2d386fc4490c8e61ed05384ec486ef0d5e7164b1

3 weeks agoFix clicking in child frames with GPM
jared [Sun, 26 Jan 2025 22:43:51 +0000 (14:43 -0800)]
Fix clicking in child frames with GPM

* src/term.c (handle_one_term_event): Store child frame
coordinates in event.

(cherry picked from commit 5eae7f5227c7789dea45cef26fec17c057024670)

3 weeks ago; Fix workaround for xt-mouse-tests
Gerd Möllmann [Mon, 27 Jan 2025 09:21:08 +0000 (10:21 +0100)]
; Fix workaround for xt-mouse-tests

* lisp/xt-mouse.el (xterm-mouse-event): For running this in batch mode,
fix computation of x and y.

(cherry picked from commit 59050c3e8c500e216ec7214195c9441ecb4a031c)

3 weeks agoIn Elisp manual document new functions for changing window layouts
Martin Rudalics [Mon, 27 Jan 2025 09:06:51 +0000 (10:06 +0100)]
In Elisp manual document new functions for changing window layouts

* doc/lispref/windows.texi (Changing Window Layouts): New section
to document the new functions for changing window layouts.
* doc/lispref/elisp.texi (Top): Add entry for new section.

(cherry picked from commit 827dfe5a72f36cb6b61b435a85d50ac725616a09)

3 weeks ago; Fix byte-compilation warnings
Stefan Kangas [Mon, 27 Jan 2025 07:50:35 +0000 (08:50 +0100)]
; Fix byte-compilation warnings

(cherry picked from commit d2ffa0fa488fcfec26c042d30d125915eb558444)

3 weeks agoPacify -Wanalyzer-use-of-uninitialized-value
Paul Eggert [Mon, 27 Jan 2025 07:04:21 +0000 (23:04 -0800)]
Pacify -Wanalyzer-use-of-uninitialized-value

With ‘configure --enable-gcc-warnings’,
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7) on x86-64
complained, as it apparently did not want to assume that enum
variables have one of the listed values.
Work around the problem by using tables rather than
switch statements.  This gives up a little static
checking but I don’t see any other easy way to pacify
GCC without disabling the warnings entirely.
* src/pdumper.c (dump_fwd_int, dump_fwd_bool, dump_fwd_obj)
(dump_fwd_buffer_obj, dump_fwd_kboard_obj):
Last arg is now void const * so that these functions’ addresses
can all be put into the same array.
(dump_fwd, dump_anonymous_allocate_posix, dump_map_file_posix):
Use an array rather than a switch.
(mem_prot_posix_table): New static constant table.

(cherry picked from commit 1ed769a3cb753a86badba8a2878fa788a6fdc1f8)

3 weeks agoFix unlikely eassert failure in invalid_radix_integer
Paul Eggert [Mon, 27 Jan 2025 06:15:50 +0000 (22:15 -0800)]
Fix unlikely eassert failure in invalid_radix_integer

* src/lread.c (invalid_radix_integer):
Simplify by using sprintf with a big-enough buffer.

(cherry picked from commit a5c47258ffe6d037e3e3c3665ca82a18661cc82c)

3 weeks agoFix unlikely eassert failure in xg_set_widget_bg
Paul Eggert [Mon, 27 Jan 2025 06:15:50 +0000 (22:15 -0800)]
Fix unlikely eassert failure in xg_set_widget_bg

* src/gtkutil.c (xg_set_widget_bg): Simplify by using
sprintf with a big-enough buffer.

(cherry picked from commit f809302fe5543e20ff7f06a81c263fd29f3ff995)

3 weeks agoFix unlikely eassert failure in pgtk_enumerate_devices
Paul Eggert [Mon, 27 Jan 2025 06:15:50 +0000 (22:15 -0800)]
Fix unlikely eassert failure in pgtk_enumerate_devices

* src/pgtkterm.c (pgtk_enumerate_devices): Prefer
make_formatted_string to snprintf + build_string + eassert, as
it’s simpler and won’t crash Emacs if the eassert fails.

(cherry picked from commit 901659bb7046bef4ca10490cf47644fb2bc6d753)

3 weeks agoMinor format_string tuneup
Paul Eggert [Mon, 27 Jan 2025 06:15:50 +0000 (22:15 -0800)]
Minor format_string tuneup

* src/comp.c (format_string): Prefer strcpy to doing things by hand
in a place where strcpy is easier to read, generates
more-efficient code, and similar parts of Emacs do strcpy.

(cherry picked from commit f8b8dddce90f5cbf6ca0be2e72b4e11cdcf581fe)

3 weeks agoIgnore -fanalyzer-null-argument in pgtkterm.c
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Ignore -fanalyzer-null-argument in pgtkterm.c

* src/pgtkterm.c: Ignore -Wanalyzer-null-dereference.
I don’t have time to look into all the diagnostics,
but the ones I checked seemed to be false alarms with
gcc -std=gnu23 on x86-64, and we are ignoring this
diagnostic in other modules.  This is GCC 14.2.1
20250110 (Red Hat 14.2.1-7).

(cherry picked from commit 8d8272d02e38ee3624cd3f16767f3c60fb3383ea)

3 weeks agoPacify -fanalyzer-null-argument on pgtk_term_init
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Pacify -fanalyzer-null-argument on pgtk_term_init

* src/pgtkterm.c (pgtk_term_init): Use xstrdup, not g_strdup.
The value is never freed so the allocator shouldn’t matter.

(cherry picked from commit 728c7904fef23059524eeab3193e1634a98d1d35)

3 weeks agoProtect against GCing of last_mouse_window
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Protect against GCing of last_mouse_window

* src/window.c (last_mouse_window): New global var.  All static
instances removed, and all their uses replaced with this global
var.  This fixes a very unlikely bug where last_mouse_window was
GC’ed and a new window created in its place.  It also fixes several
places that assumed NIL_IS_ZERO without static_asserting it.
(init_window_once): Initialize the new var.

(cherry picked from commit 2e8ef0910412aef8f9f1beba7c942473ad8602bb)

3 weeks agoPacify GCC in pgtkselect malloc alignment
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Pacify GCC in pgtkselect malloc alignment

* src/pgtkselect.c (pgtk_size_for_format): Remove.
(pgtk_get_window_property): Third arg is now void **, not unsigned
char **.  Omit last arg.  All callers changed.  Simplify
allocation to pacify GCC 14.2.1 complaint about malloc size
mismatching size of array: there’s no need for an extra byte when
converting from ldata to idata.
(selection_data_to_lisp_data): Third arg is now void const *,
not unsigned char const *.  All callers changed.
Omit unnecessary casts.  Make some locals more local.

(cherry picked from commit ff65cc9944dc0b37986d512ee8b9817c6913db36)

3 weeks agoAvoid undefined behavior with botched pgtk menu
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Avoid undefined behavior with botched pgtk menu

* src/pgtkmenu.c (pgtk_menu_show): Do not dereference save_wv if
null.  Problem found by gcc 20250110 (Red Hat 14.2.1-7)
-Wanalyzer-null-dereference.

(cherry picked from commit c0d83876f18cb21abae299d3b4a2a2bd7f117252)

3 weeks agoUse gtk_disable_setlocale
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Use gtk_disable_setlocale

* src/pgtkterm.c (pgtk_term_init):
* src/xterm.c (x_term_init):
Use gtk_disable_setlocale rather than fixup_locale.

(cherry picked from commit 06fd3f4e98d683b6595899861e47e931724e7020)

3 weeks agoAvoid unlikely int overflow.
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Avoid unlikely int overflow.

* src/pgtkterm.c (pgtk_term_init):
* src/xterm.c (x_term_init):
Use a bool, not an int that keeps incrementing,
to record whether initialization has occurred.

(cherry picked from commit a1e4f6a35c70cf265c77b445288f4e0ab6ffc19f)

3 weeks agoBeware large stack growth in pgtk_menu_show
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Beware large stack growth in pgtk_menu_show

* src/pgtkmenu.c (pgtk_menu_show): USE_SAFE_ALLOCA instead of alloca.
Problem found with --enable-gcc-warnings.

(cherry picked from commit 6ff06ff738ead96d7b4cb59eda15a1c72e2b5776)

3 weeks agoFix x-show-tip bignum crash
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Fix x-show-tip bignum crash

* src/pgtkfns.c (compute_tip_xy): Fix crash if user specifies
bignums.  Bug found with --enable-gcc-warnings.

(cherry picked from commit 17a8bf53f390718756e397cc0b31c1ef2c7de5f0)

3 weeks agoPrefer make_formatted_string in svg_load_image
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Prefer make_formatted_string in svg_load_image

* src/image.c (svg_load_image): Prefer make_formatted_string to
snprintf, as this simplifies the code and does not truncate the
resulting string arbitrarily.

(cherry picked from commit c50e8c24247eb69d85b004a72197e710c8e1e32a)

3 weeks agoSimplify building of color names in image.c
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Simplify building of color names in image.c

* src/image.c (make_color_name): New function.
(image_background, image_build_heuristic_mask, png_load_body): Use it.

(cherry picked from commit 028fae966142b6e2330b9250fb4cdf2cbd8e1446)

3 weeks agoSimplify make_formatted_string API
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Simplify make_formatted_string API

From a suggestion by Pip Cet.
* src/alloc.c (make_formatted_string): Omit first argument,
to simplify the calling convention.  All callers changed.
* src/doprnt.c (doprnt): Also support %u.  Update doc.

(cherry picked from commit f885806fdf1aa862ad55d124e9795794fed0b964)

3 weeks agoFix unlikely time zone abbreviation bug
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Fix unlikely time zone abbreviation bug

* src/timefns.c (Fcurrent_time_zone): Fix double-"-" bug when time
zone name is not known and time zone offset is -3600 or less.
Also, stop assuming that make_formatted_string works with "*"
precisions; this might ease future changes.

(cherry picked from commit bcfd4d21b0a62c5c15b919fa28673066c493775a)

3 weeks agoDon't use obsolete face alias in themes
Stefan Kangas [Mon, 27 Jan 2025 06:47:29 +0000 (07:47 +0100)]
Don't use obsolete face alias in themes

* etc/themes/leuven-dark-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el: Don't use obsolete face alias
'smerge-refined-change', preferring instead 'smerge-refined-changed'.

(cherry picked from commit b06364f1b667e7960d1724293398179f280e910b)

3 weeks ago; Skip commit 52c41a66bad451dd43940cb313c62a95f464db1e
Eshel Yaron [Thu, 30 Jan 2025 18:06:10 +0000 (19:06 +0100)]
; Skip commit 52c41a66bad451dd43940cb313c62a95f464db1e

3 weeks ago; Skip commit 2b3599bb08e8ccfe49bbaa28693fed8dca62440b
Eshel Yaron [Thu, 30 Jan 2025 18:06:05 +0000 (19:06 +0100)]
; Skip commit 2b3599bb08e8ccfe49bbaa28693fed8dca62440b

3 weeks agoFix the Android port
Po Lu [Mon, 27 Jan 2025 01:11:21 +0000 (09:11 +0800)]
Fix the Android port

* src/term.c (tty_frame_at) [HAVE_ANDROID]: Always return nil.

* src/terminal.c (cursor_to, raw_cursor_to) [HAVE_ANDROID]:
Don't call root_xy.

(cherry picked from commit 8d11871c63e65459fd14f1cbe08bf0460c452ac6)

3 weeks agoFix compilation warnings in pdumper with !HAVE_NATIVECOMP
Stefan Kangas [Sun, 26 Jan 2025 20:17:31 +0000 (21:17 +0100)]
Fix compilation warnings in pdumper with !HAVE_NATIVECOMP

* src/pdumper.c [!HAVE_NATIVECOMP] (cold_op, dump_subr): Fix
compilation warnings.
Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg01003.html

(cherry picked from commit aec9e66178793e631f0583768315a6371054c907)

3 weeks agoPrefer static switch-case checking in pdumper
Stefan Kangas [Sun, 26 Jan 2025 19:04:07 +0000 (20:04 +0100)]
Prefer static switch-case checking in pdumper

* src/pdumper.c (dump_fwd, dump_symbol, dump_drain_cold_data)
(dump_do_fixup, dump_anonymous_allocate_w32)
(dump_anonymous_allocate_posix, dump_map_file_w32, dump_map_file_posix)
(dump_do_emacs_relocation): Remove default clauses to allow static
checking using -Wswitch.

(cherry picked from commit 6e2e7265a04f63f482db7fbdfd8e2519d8bfe03e)

3 weeks ago* lisp/progmodes/xref.el (xref-after-jump-hook): Remove 'recenter'
Eshel Yaron [Thu, 30 Jan 2025 17:59:52 +0000 (18:59 +0100)]
* lisp/progmodes/xref.el (xref-after-jump-hook): Remove 'recenter'

3 weeks agoscope.el: Initial 'cl-tagbody' support
Eshel Yaron [Mon, 27 Jan 2025 09:25:04 +0000 (10:25 +0100)]
scope.el: Initial 'cl-tagbody' support

3 weeks agoAvoid crashes in Fdocumentation caused by incorrect data types
Pip Cet [Sun, 26 Jan 2025 14:34:45 +0000 (14:34 +0000)]
Avoid crashes in Fdocumentation caused by incorrect data types

Note that this can only change things when function-documentation is
defined or overloaded incorrectly.

* src/doc.c (Fdocumentation): Check that the cdr of a docstring cons
is a fixnum.

(cherry picked from commit b07c12ce59c96db753a1f8f3a829f9ab5514e35f)

3 weeks ago; Fix last change
Eli Zaretskii [Sun, 26 Jan 2025 15:50:34 +0000 (17:50 +0200)]
; Fix last change

* lisp/disp-table.el (display-table-slot)
(set-display-table-slot):
* etc/NEWS:
* doc/lispref/display.texi (Display Tables): Fix punctuation and
typos.

(cherry picked from commit 8cfb4e35da4b7ffa84c521e28fd592c40209d04e)

3 weeks agoDisplay separators on tty menus with display table entries
Gerd Möllmann [Sun, 26 Jan 2025 10:31:32 +0000 (11:31 +0100)]
Display separators on tty menus with display table entries

* src/xdisp.c (display_tty_menu_separator): Lookup separator char in
standard-display-table, make a string, and display that using
display_string.
* src/xdisp.c (display_tty_menu_separator_char): New function.
(display_tty_menu_separator): Use it.
* lisp/disp-table.el (display-table): Increase from 12 to 18.
(box-double-vertical, box-double-horizontal, box-double-down-right)
(box-double-down-left, box-double-up-right, box-double-up-left): New
symbols for extra slots.
(display-table-slot, set-display-table-slot): Change doc string.
(describe-display-table): Describe new slots.
(standard-display-unicode-special-glyphs): Define new slots.
* src/disptab.h (DISP_TABLE_P): Add enumerators.
(DISP_TABLE_EXTRA_SLOTS): Define based on enum box.
* src/dispnew.c (produce_box_glyphs): Add new enumerators to switch to
make it exhaustive.
* src/xdisp.c (display_tty_menu_separator): Use BOX_DOUBLE_HORIZONTAL
for '=' if present.
* doc/lispref/display.texi: Add documentation.
* etc/NEWS: Mention in NEWS.

(cherry picked from commit 4e78a3e117f4ca0b6b9f3b7a2d7919cb5b2e0295)

3 weeks agoTweak .gitattributes
Eshel Yaron [Sun, 26 Jan 2025 19:02:14 +0000 (20:02 +0100)]
Tweak .gitattributes

3 weeks agoUse dired--inhibit-auto-revert for fixing bug#71264
Tassilo Horn [Sun, 26 Jan 2025 08:44:59 +0000 (09:44 +0100)]
Use dired--inhibit-auto-revert for fixing bug#71264

The original fix bound auto-revert-mode to nil which had the side-effect
of disabling auto-revert forever in this buffer because
auto-revert-handler removes the buffer from auto-revert-buffer-list when
it's called but auto-revert-mode is nil.

* lisp/dired.el (dired-internal-do-deletions): Bind
dired--inhibit-auto-revert during deletion (bug#71264).

(cherry picked from commit 01d93d56cd469ddb45d142da948caef9f2dc1a3f)

3 weeks agoChange doc string of frame-visible-p
Gerd Möllmann [Sat, 25 Jan 2025 20:18:00 +0000 (21:18 +0100)]
Change doc string of frame-visible-p

* src/frame.c (Fframe_visible_p): Don't say it always returns t for tty
frames.

(cherry picked from commit 35d39278599caf30eb4bfbd83118ffe15d2bc705)

3 weeks agoReplace is_frame_ancestor with frame_ancestor_p
Gerd Möllmann [Sat, 25 Jan 2025 18:42:52 +0000 (19:42 +0100)]
Replace is_frame_ancestor with frame_ancestor_p

* src/dispnew.c (is_frame_ancestor): Removed.
(frame_z_order_cmp): Use frame_ancestor_p.
(copy_child_glyphs): Ditto.
* src/dispextern.h: Declaration removed.
* src/term.c (mouse_get_xy): Use frame_ancestor_p.

(cherry picked from commit 85aec497c71e26b66ecfc85c20d7888336300e1f)

3 weeks agoAdd 'treesit-forward-comment' with 'forward-comment-function'
Juri Linkov [Sat, 25 Jan 2025 18:14:15 +0000 (20:14 +0200)]
Add 'treesit-forward-comment' with 'forward-comment-function'

* lisp/treesit.el (treesit-forward-comment): New function.
(treesit-major-mode-setup): Set 'forward-comment-function' to
'treesit-forward-comment' if the 'comment' thing is defined.

* src/syntax.c (forward-comment-function): New variable.
(Fforward_comment): Call the function from 'forward-comment-function'
when it's non-nil (bug#75609).

(cherry picked from commit 63df2164903e0cd6819187483a64b892aa7e0219)

3 weeks ago* lisp/treesit.el: Display treesit-explore buffer below selected window.
Juri Linkov [Sat, 25 Jan 2025 17:59:56 +0000 (19:59 +0200)]
* lisp/treesit.el: Display treesit-explore buffer below selected window.

(treesit-explorer-switch-parser, treesit-explore):
Use display-buffer-below-selected for display-buffer (bug#75079).

(cherry picked from commit 3bc6b88cc71b8ccc96b5e61d895e5208009aa3c0)

3 weeks ago(scope-define-global-minor-mode): Remove.
Eshel Yaron [Sun, 26 Jan 2025 18:48:11 +0000 (19:48 +0100)]
(scope-define-global-minor-mode): Remove.

3 weeks agoscope.el: Optimize.
Eshel Yaron [Sun, 26 Jan 2025 18:21:35 +0000 (19:21 +0100)]
scope.el: Optimize.

3 weeks ago(elisp-completion-at-point): Complete custom theme names
Eshel Yaron [Sun, 26 Jan 2025 18:11:30 +0000 (19:11 +0100)]
(elisp-completion-at-point): Complete custom theme names

3 weeks ago(cl-case): Leave keywords unquoted.
Eshel Yaron [Sun, 26 Jan 2025 18:10:53 +0000 (19:10 +0100)]
(cl-case): Leave keywords unquoted.

3 weeks agoRemove 'ispell-help'
Eshel Yaron [Sun, 26 Jan 2025 18:10:31 +0000 (19:10 +0100)]
Remove 'ispell-help'

3 weeks ago; (let-alist): Document double-dot escape syntax.
Eshel Yaron [Sun, 26 Jan 2025 07:56:15 +0000 (08:56 +0100)]
; (let-alist): Document double-dot escape syntax.

3 weeks agoHandle `let-alist' double-dot escape
Eshel Yaron [Sun, 26 Jan 2025 07:55:39 +0000 (08:55 +0100)]
Handle `let-alist' double-dot escape

3 weeks agoscope.el: Finalize refactor and let-alist support
Eshel Yaron [Sat, 25 Jan 2025 18:54:19 +0000 (19:54 +0100)]
scope.el: Finalize refactor and let-alist support

3 weeks ago(when-let*): Warn if body is empty
Stefan Monnier [Sat, 25 Jan 2025 15:39:12 +0000 (10:39 -0500)]
(when-let*): Warn if body is empty

* lisp/subr.el (when-let*): Warn if body is empty.
* lisp/textmodes/tex-mode.el (xref-backend-references): Fix use of
`when-let*`.

(cherry picked from commit 442d04081bbe9913def50b543e499422c4ad9ece)