Alan Mackenzie [Sat, 5 Oct 2024 17:28:28 +0000 (17:28 +0000)]
CC Mode: Remove search limit to fontify first decl in xdisp.c
An unneeded 10,000 character search limit prevents the full
fontification of the first declaration of xdisp.c, since the
introductory commentary is longer than that.
* lisp/progmodes/cc-engine (c-find-decl-spots): Remove the
10,000 char limit.
Sean Whitton [Fri, 4 Oct 2024 00:19:40 +0000 (08:19 +0800)]
icomplete-completions: Revise computation of prospects-len
* lisp/icomplete.el (icomplete-completions): Revise computation of
prospects-len (i) to avoid calling string-width on the entire
buffer-string, which could be slow; and (ii) to better handle minibuffer
prompts with embedded newlines (bug#72826).
Eli Zaretskii [Fri, 4 Oct 2024 13:32:13 +0000 (16:32 +0300)]
Expand email abbrevs in X-Debbugs-Cc header.
* lisp/mail/mailabbrev.el (mail-abbrev-mode-regexp):
* lisp/mail/mailalias.el (mail-address-field-regexp)
(mail-complete-alist): Add "X-Debbugs-Cc" to headers where email
aliases should be expanded, for compatibility with emacsbug.el.
Eli Zaretskii [Fri, 4 Oct 2024 11:39:50 +0000 (14:39 +0300)]
Fix 'list-tags' when invoked from a non-file buffer
This use case was broken by the improvement that attempts to
offer the current buffer's file name as the default file whose
tags to list.
* lisp/progmodes/etags.el
(tags--get-current-buffer-name-in-tags-file): Doc fix. Return nil
if no file is associated with the current buffer, and avoid
signaling an error if 'buffer-file-name' returns nil. (Bug#37611)
(list-tags): Doc fix. Signal an error if the user specifies no
file name at the prompt.
* doc/emacs/maintaining.texi (List Identifiers): Fix wording of
the documentation of 'list-tags'.
Sean Whitton [Fri, 4 Oct 2024 09:28:38 +0000 (17:28 +0800)]
count-windows: Fix reference to walk-windows
* lisp/window.el (count-windows): Refer to walk-windows for the
precise meaning of both the MINIBUF and ALL-FRAMES arguments,
not just the ALL-FRAMES argument. In both functions, these
arguments are both passed through to window-list-1.
john muhl [Sat, 13 Jul 2024 23:36:38 +0000 (18:36 -0500)]
Tag interactive commands in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-send-buffer)
(lua-ts-send-file, lua-ts-send-region): Mark inferior interaction
commands that are only relevant in Lua buffers. (Bug#73586)
Stefan Kangas [Mon, 30 Sep 2024 22:15:08 +0000 (00:15 +0200)]
Change :group of 'eglot' defgroup to 'tools'
In 'M-x customize', Eglot fits in better in "Programming -> Tools", with
the likes of Flymake and Gud, than it does in "Applications", with ERC
and Newsticker.
* lisp/progmodes/eglot.el (eglot): Change :group of defgroup to 'tools'.
Stefan Kangas [Mon, 30 Sep 2024 18:37:27 +0000 (20:37 +0200)]
Remove out-of-date documentation from python.el
* lisp/progmodes/python.el: Remove out-of-date documentation about
automatic indentation; 'electric-indent-mode' is enabled by default in
Emacs 24.4 or later, so this is no longer an issue.
Visuwesh [Wed, 2 Oct 2024 08:18:25 +0000 (13:48 +0530)]
Add imenu index function for DjVu files in doc-view
* lisp/doc-view.el (doc-view-pdfdraw-program): Prefer mutool
over other names.
(doc-view-imenu-enabled): Tweak the default value to check for
'djvused', and make it obsolete.
(doc-view--djvu-outline, doc-view--parse-djvu-outline): Add new
functions to return imenu index for a Djvu file.
(doc-view--outline): Add new function to create the imenu index
depending on the file type.
(doc-view--outline): Document new possible variable value.
(doc-view-imenu-index): Use the above function instead.
(doc-view-imenu-setup): Try to create the imenu index
unconditionally.
* doc/emacs/misc.texi (DocView Navigation): Mention index
creation using 'djvused' too.
* etc/NEWS: Announce the change. (Bug#73530)
Dmitry Gutov [Thu, 3 Oct 2024 19:03:09 +0000 (22:03 +0300)]
xref-location-marker: Use find-file-noselect to ensure uptodateness
* lisp/progmodes/xref.el (xref-location-marker):
Always call 'find-file-noselect' rather than 'get-file-buffer' to
go through the visited-file-modtime verification every time.
Stefan Monnier [Thu, 3 Oct 2024 18:32:09 +0000 (14:32 -0400)]
track-changes.el: Improve error tracing to help debugging
Add a new `trace` setting for `track-changes-record-errors` to
record more information in order to try and help find the root
cause of errors.
* lisp/emacs-lisp/track-changes.el (track-changes--trace): New var.
(track-changes-record-errors): Document new `trace` setting.
(track-change--backtrace, track-changes--trace): New functions.
(track-changes--recover-from-error): Use them.
(track-changes--error-log): Document new format.
(track-changes-register, track-changes-unregister)
(track-changes-fetch, track-changes--before, track-changes--after):
Call `track-changes--trace`.
Stefan Monnier [Thu, 3 Oct 2024 15:55:58 +0000 (11:55 -0400)]
(key-translate-select): Minor tweaks
* lisp/keymap.el (key-translate-select): Rename from
`key-select-translation` so as to stick to the `key-translate-` prefix.
Silence compilation warning.
Hugo Heagren [Sun, 4 Aug 2024 11:54:27 +0000 (12:54 +0100)]
Add commands to interactively set/unset keyboard translations
* lisp/keymap.el (key-translate): Add an interactive form, prompting for
keys to translate, and update docstring to reflect this.
(key-translate-selection-function): New custom option.
(key-select-translation): New function, default value of above option.
(key-translate-remove): New command, for removing entries from
`keyboard-translate-table'.
Sean Whitton [Thu, 3 Oct 2024 10:36:45 +0000 (18:36 +0800)]
New M-~ entry in save-some-buffers-action-alist
* lisp/files.el (save-some-buffers-action-alist): New M-~ entry.
(save-some-buffers):
* doc/emacs/files.texi (Save Commands):
* etc/NEWS: Document the new M-~ binding during C-x s.
Eli Zaretskii [Thu, 3 Oct 2024 10:32:10 +0000 (13:32 +0300)]
Avoid assertion violations due to wrong 'min-width' property
* src/xdisp.c (display_min_width): Ignore 'min-width' display
specs which produce stretch glyphs wider than the window when
lines are truncated. (Bug#73600)
Teach term the difference between an unset foreground or
background color and a color that happens to match an existing
color. This way, when we insert text after a color
reset:(e.g. from an SGR0), we insert it without :foreground or
:background (whichever we've reset) face properties, allowing
that inserted text to inherit the colors of the underlying face.
This way, if we change, e.g., the background color of a buffer,
the background color of already-inserted text from the term
child changes along with that of the buffer instead of being
"locked" to whatever the background color of the buffer was at
the time the text was inserted.
This change aligns term.el with other terminal emulators.
Dmitry Gutov [Thu, 3 Oct 2024 01:17:35 +0000 (04:17 +0300)]
Make xref-find-references work in Help buffers outside of projects
* lisp/help-fns.el (xref-backend-references):
New context-dependent override. Don't call project-current and
use elisp-load-path-roots directly (bug#69462).
(help-fns--setup-xref-backend): No need to set
project-vc-external-roots-function then.
Sean Whitton [Wed, 2 Oct 2024 07:23:06 +0000 (15:23 +0800)]
New function shell-command-do-open
* lisp/dired-aux.el (shell-command-do-open): Factor out of
dired-do-open.
(dired-do-open): Call shell-command-do-open.
* etc/NEWS: Announce the new function.
Sean Whitton [Wed, 2 Oct 2024 01:22:52 +0000 (09:22 +0800)]
Move error check from vc-next-action to diff-vc-deduce-fileset
* lisp/vc/diff-mode.el (diff-vc-deduce-fileset): Signal
user-error when the buffer is narrowed.
* lisp/vc/vc.el (vc-next-action): Remove code signalling a
user-error when the buffer is narrowed.
Stefan Kangas [Wed, 2 Oct 2024 00:28:52 +0000 (02:28 +0200)]
Warn about bad defcustom :local keyword at compile time
* lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): Warn about
invalid values for the defcustom :local keyword.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-local): New test.
Stefan Kangas [Tue, 1 Oct 2024 23:03:08 +0000 (01:03 +0200)]
New value 'permanent-only' for defcustom :local keyword
* lisp/custom.el (custom-declare-variable): Make the :local keyword
accept the symbol 'permanent-local', meaning that the variable is
permanent but not marked as automatically buffer-local.
(defcustom):
* doc/lispref/customize.texi (Variable Definitions): Document the
above change.
* test/lisp/custom-tests.el
(custom-tests-defcustom-:local-keyword): New test.
Stefan Monnier [Tue, 1 Oct 2024 18:46:06 +0000 (14:46 -0400)]
* lisp/emacs-lisp/package.el (package-isolate): Use `package-activate-all`
`package-initialize` is used to initialize the whole machinery needed
to list/download/install/remove packages, whereas here we only need to use
the installed packages.