shipmints [Sat, 25 Jan 2025 19:04:51 +0000 (14:04 -0500)]
Add auto save timer to save-place (bug#75837)
* lisp/saveplace.el (save-place-autosave-interval):
New user option 'save-place-autosave-interval' which defaults to nil,
and has a custom :set to manage the timer. Add
'save-place--manage-timer' to enable or cancel the timer if the mode is
enabled and 'save-place-autosave-interval' is non-nil. Amend
'save-place-mode' to invoke save-place--manage-timer. Add
'save-place--cancel-timer'. Add 'save-place--autosave'.
Pip Cet [Sat, 18 Jan 2025 20:55:18 +0000 (20:55 +0000)]
Use #$ for lambda fixups in native compilation data vectors
The "#$" syntax is recognized by Fread, which substitutes
Vload_file_name in its place. If Vload_file_name is bound
appropriately, no other value can produce an object EQ to the one
produced by "#$".
We use this to check the data vector for entries that we know should
have been initialized: if the value is still equal to what we bound
Vload_file_name to when it was read, it wasn't initialized, and we
abort.
* lisp/emacs-lisp/comp.el (comp--#$): New defvar.
(comp--finalize-container): Use it.
* src/comp.c (ABI_VERSION): Bump.
(emit_static_object): Ensure 'comp--#$' prints as "#$".
(load_static_obj): Ensure '#$' reads as Vcomp__hashdollar.
(check_comp_unit_relocs): Adjust assertion.
(syms_of_comp): Define 'comp--#$'.
* src/pdumper.c (dump_do_dump_relocation): Adjust assertion.
When the visited TAGS file was removed, commands that depend on
TAGS, such as auto-completion, may invoke an interactive question
whether a user wants to re-read the file. From that point on,
the question will be asked over and over, because the file no
longer exists, which results in mtime mismatch and inability to
"fix the mismatch" by reading from the file. Fix that by simply
ignoring the mismatch if the file no longer exists.
* lisp/progmodes/etags.el (tags-verify-table): Avoid infinite
questions if TAGS file was removed. (Bug#75946)
Pengji Zhang [Mon, 27 Jan 2025 11:42:00 +0000 (19:42 +0800)]
New user option 'Buffer-menu-human-readable-sizes'
* lisp/buff-menu.el (Buffer-menu-human-readable-sizes): New user
option.
(list-buffers--refresh): Use it.
* etc/NEWS: Announce the new user option. (Bug#75825)
shipmints [Mon, 27 Jan 2025 16:16:04 +0000 (11:16 -0500)]
Add new user option bookmark-bmenu-type-column-width
* lisp/bookmark.el (bookmark-bmenu-mode):
Add new user option bookmark-bmenu-type-column-width, defaulting to 8
for backwards compatibility, and use it when creating the tabulated
bookmark list. (Bug#75826)
Eli Zaretskii [Sat, 1 Feb 2025 10:22:13 +0000 (12:22 +0200)]
Rename a recently-added variable (bug#56197)
* lisp/emacs-lisp/lisp-mode.el
(lisp-fill-paragraphs-as-doc-string): Renamed from
'lisp-fill-paragraph-as-displayed' and default value reversed.
(lisp-fill-paragraph): Adjust to the change.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-fill-paragraph-as-displayed): Likewise.
Paul Eggert [Fri, 31 Jan 2025 22:42:33 +0000 (14:42 -0800)]
Don’t use garbage after tty_frame_at returns nil
* src/term.c (handle_one_term_event): Don’t access possibly
uninitialized storage if frame is nil. This fixes an issue introduced
in commit 5eae7f5227c7789dea45cef26fec17c057024670 dated 2025-01-26
14:43:51 -0800. Issue caught by --enable-gcc-warnings, which enables
-Wanalyzer-use-of-uninitialized-value with gcc (GCC) 14.2.1 20250110
(Red Hat 14.2.1-7).
Paul Eggert [Fri, 31 Jan 2025 22:42:33 +0000 (14:42 -0800)]
Port dest-mountpoint test to suspicious bwrap
* test/lisp/emacs-lisp/bytecomp-tests.el:
(bytecomp-tests--dest-mountpoint): Skip test if bwrap prohibits
even ‘true’, which it does on my Ubuntu 24.10 platform.
João Távora [Fri, 31 Jan 2025 10:31:37 +0000 (10:31 +0000)]
Eglot: add server menu into main menu
* lisp/progmodes/eglot.el (eglot-menu): Add separator at end
and add in eglot-server menu at load-time.
(eglot-server-menu): Rework menu title and description.
Martin Rudalics [Fri, 31 Jan 2025 08:31:05 +0000 (09:31 +0100)]
In 'replace-buffer-in-windows' try to preserve current buffer (Bug#75949)
* lisp/window.el (replace-buffer-in-windows): Preserve current
buffer when 'kill-buffer-quit-windows' is non-nil and a window
showing BUFFER shall be quit. Running 'kill-buffer-hook' relies
on it (Bug#75949).
shipmints [Thu, 30 Jan 2025 17:57:00 +0000 (12:57 -0500)]
Add new variable tab-bar-format-tab-help-text-function
* lisp/tab-bar.el (tab-bar--format-tab):
Add new variable 'tab-bar-format-tab-help-text-function' and a default
function 'tab-bar-format-tab-help-text-default'. 'tab-bar--format-tab'
respects this new variable when producing a tab's help text, normally
shown in the echo area or via tooltips (bug#75950).
Yuan Fu [Fri, 31 Jan 2025 00:54:20 +0000 (16:54 -0800)]
Add treesit-add-simple-indent-rules
* lisp/treesit.el:
(treesit-add-simple-indent-rules): New function.
* etc/NEWS: Update NEWS.
*
test/src/treesit-tests.el:
(treesit-test-add-simple-indent-rules): Add a test for the new
function.
Stefan Kangas [Sun, 26 Jan 2025 13:53:49 +0000 (14:53 +0100)]
Do not set `trusted-content` in major modes
* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
* lisp/ielm.el (inferior-emacs-lisp-mode): Do not set `trusted-content.
* lisp/ielm.el (ielm):
* lisp/simple.el (get-scratch-buffer-create): Set `trusted-content` here
instead.
* lisp/files.el (trusted-content): Doc fix; warn against setting this
option to :all in a major or mode mode.
Problem reported by Max Nikulin <manikulin@gmail.com>.
shipmints [Thu, 30 Jan 2025 12:20:34 +0000 (07:20 -0500)]
* lisp/tab-bar.el (tab-bar-select-tab): Fix wc-bl/wc-bbl when nil
Remove the nil-check conditionals around 'wc-bl' and 'wc-bbl' that reset
frame parameters 'buffer-list' and 'buried-buffer-list'. This ensures
originating nil values correctly propagate (bug#75935).
shipmints [Wed, 29 Jan 2025 18:43:04 +0000 (13:43 -0500)]
Add new user option tab-bar-define-keys
* lisp/tab-bar.el (tab-bar-define-keys):
Add new defcustom tab-bar-define-keys. Reorganize key binding functions
to accommodate. Also remove checks for tab-bar-mode enabled in
'tab-bar-select-tab-modifiers', as unnecessary and which prevented user
changes from being accepted in cases where the user defers enabling
tab-bar-mode (bug#75918).
Stefan Kangas [Sun, 26 Jan 2025 20:57:34 +0000 (21:57 +0100)]
Update cc-mode URL to point to nongnu.org
* doc/misc/cc-mode.texi (Getting Started)
(Custom Filling and Breaking, Updating CC Mode)
(Mailing Lists and Bug Reports):
* lisp/progmodes/cc-mode.el: Update cc-mode URL to point to nongnu.org,
instead of old URL on SourceForge.
Eli Zaretskii [Mon, 27 Jan 2025 13:19:06 +0000 (15:19 +0200)]
; Improve documentation of '.dir-locals.el'
* doc/lispref/variables.texi (Directory Local Variables):
* doc/emacs/custom.texi (Directory Variables): Document that
'.dir-locals-2.el' must be in the same directory as
'.dir-locals.el'. (Bug#75890)
Stefan Kangas [Sun, 26 Jan 2025 21:39:10 +0000 (22:39 +0100)]
; Prefer HTTPS to HTTP in docs
* doc/emacs/android.texi (Android Software):
* doc/lispref/frames.texi (X Selections):
* doc/misc/cc-mode.texi (Custom Filling and Breaking):
* doc/misc/efaq.texi (Basic editing):
* doc/misc/gnus.texi (Propagating marks, Spam Statistics Package):
* doc/misc/org.org (External Links, Images in HTML export)
(LaTeX Export, LaTeX math snippets): Prefer HTTPS to HTTP. Fix or
mark some broken links while we're at it.
Stefan Kangas [Tue, 10 Dec 2024 22:35:31 +0000 (23:35 +0100)]
Delete variable pure-space-overflow
* lisp/startup.el (pure-space-overflow): Make variable obsolete.
* lisp/loadup.el (pure-space-overflow): Do not set. Remove call to
`garbage-collect', as that is done by `dump-emacs-portable'.
Stefan Kangas [Tue, 10 Dec 2024 18:39:03 +0000 (19:39 +0100)]
Make 'purecopy' an obsolete function alias for 'identity'
* lisp/subr.el (purecopy): New obsolete function alias for 'identity'.
* src/alloc.c (purecopy): Remove function.
(Fpurecopy): Remove DEFUN.
(syms_of_alloc): Remove defsubr for above DEFUN.
* lisp/loadup.el (purify-flag): Don't set to hash table.
Stefan Kangas [Tue, 10 Dec 2024 10:07:01 +0000 (11:07 +0100)]
Remove check for working malloc_set_state
This check was added to 'malloc_initialize_hook' in order to "insulate
Emacs better from configuration screwups" (commit b4788b9394f3). With
unexec gone, we no longer use 'malloc_set_state', and thus don't need
this check.
Note that this patch removes the last uses of the deprecated glibc
functions 'malloc_set_state' and 'malloc_get_state' from our code.
* src/alloc.c (malloc_initialize_hook) [DOUG_LEA_MALLOC]:
Remove check for working 'malloc_set_state'.
(alloc_unexec_pre) [DOUG_LEA_MALLOC]: Delete unused function.
(alloc_unexec_post) [DOUG_LEA_MALLOC]: Delete function.
(malloc_state_ptr) [DOUG_LEA_MALLOC]: Delete variable.
* configure.ac (emacs_cv_var_doug_lea_malloc): Don't check for
malloc_set_state and malloc_get_state.
Stefan Kangas [Wed, 21 Aug 2024 22:09:51 +0000 (00:09 +0200)]
Make bindings--define-key obsolete
It used to be like 'define-key', but was used for making pure copies of
as much of a menu's data as possible. With purespace now gone, it can
be replaced by 'define-key'.
* lisp/bindings.el (bindings--define-key): Make into obsolete
alias for 'define-key'. Update all callers.
Pip Cet [Wed, 21 Aug 2024 19:13:23 +0000 (19:13 +0000)]
Purecopy removal: Lisp code
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table): Don't
request our hash tables be purecopied. Adjust comment.
* lisp/progmodes/elisp-mode.el (elisp--local-variables-completion-table):
Use 'defconst' rather than 'defvar' now the purespace problem is gone
* lisp/rfn-eshadow.el (file-name-shadow-properties): Remove obsolete
comment.