1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-08 00:33:13 -08:00
Commit graph

175068 commits

Author SHA1 Message Date
Stefan Kangas
84c66625e5 ; Minor cleanup of python-interpreter variable
* lisp/progmodes/python.el (python-interpreter)
(python-shell-interpreter): Simplify definition.
2024-10-05 11:48:36 +02:00
Sean Whitton
50e5221236 ; Tweak line breaks in last change 2024-10-05 17:23:26 +08:00
Sean Whitton
a96954b982 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).
2024-10-05 15:42:49 +08:00
Eshel Yaron
9f54f24e94
; Fix clean up of local variables in Help buffers
* lisp/help-mode.el (help-setup-xref): Kill local values of
'xref-backend-functions' and
'semantic-symref-filepattern-alist' regardless of
'outline-minor-mode'.
2024-10-05 08:55:26 +02:00
Sean Whitton
069ecc9c4c work-buffer--release: Bind inhibit-read-only
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind
inhibit-read-only while erasing the buffer.
2024-10-05 09:15:46 +08:00
Stefan Kangas
6e8fc4f6ea Use python-mode for SCons build files
SCons is a build system whose associated files are Python scripts.
Ref: https://www.scons.org/doc/0.96/HTML/scons-user/x325.html

* lisp/progmodes/python.el (python--auto-mode-alist-regexp):
Use 'python-mode' for SCons build files.
2024-10-05 01:08:14 +02:00
Stefan Kangas
e2b8e9d940 Also use "Python Module Index" for info lookup
* lisp/info-look.el (:mode): Also search Python module index.
2024-10-05 00:43:06 +02:00
Stefan Kangas
0cca6146dc Future-proof searching for Python info manual
* lisp/info-look.el (:mode): Python is released annually (PEP 602), so
search for minor version based on the current year.
2024-10-05 00:21:42 +02:00
Stefan Kangas
776ca54e8d ; * etc/NEWS: Document Python electric-layout-mode support. 2024-10-04 23:39:22 +02:00
Stefan Kangas
ee6e737fdf python: Better support := in electric-layout-mode
* lisp/progmodes/python.el (python-base-mode): Use heuristic to better
support the Python walrus operator := in electric-layout-rules.
2024-10-04 23:39:22 +02:00
Stefan Kangas
e9727982cf * lisp/info-look.el (:mode): Support IELM. 2024-10-04 23:36:12 +02:00
Stefan Kangas
ecac8ca62e Shorten info-lookup-mode docstring
* lisp/info-look.el (info-lookup-mode): Shorten variable docstring by
removing information that is auto-generated by 'describe-variable'.
2024-10-04 23:35:33 +02:00
Stefan Kangas
9ba20e8f39 Expose lambdas in info-look.el to byte-compiler
* lisp/info-look.el (:mode): Expose lambdas to byte-compiler.
2024-10-04 19:06:41 +02:00
Sean Whitton
1094c3f914 find-function-mode: Define keys at a low precedence level
* lisp/emacs-lisp/find-func.el (find-function-mode-map): Delete.
(find-function-mode): Define keys at the precedence level of
the global map for compatibility with the historical behavior of
find-function-setup-keys.
2024-10-04 20:46:00 +08:00
Mattias Engdegård
ea7be865ac * lisp/net/sieve-mode.el (sieve-tagged-arguments): Face name typo. 2024-10-04 13:38:58 +02:00
Mattias Engdegård
336e977f18 ; * lisp/doc-view.el (doc-view-djvused-program): allow nil in type 2024-10-04 10:19:26 +02:00
Eli Zaretskii
598f15bcaf ; * lisp/files.el (save-some-buffers-action-alist): Fix comment. 2024-10-04 08:43:54 +03:00
Eli Zaretskii
f3f57c1198 ; * doc/emacs/misc.texi (DocView Navigation): Fix wording. 2024-10-04 08:40:39 +03:00
Visuwesh
d6dd71cd56 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)
2024-10-04 07:27:13 +02:00
Daniel Colascione
5e0935d991 Fix term.el tests; refine previous change
Fix the term.el tests by making them match the new expected output.

* test/lisp/term-tests.el: defvar - defconst
(ansi-test-strings): remove unwanted text properties from
expectations

* lisp/term.el:
(term--handle-colors-list): further shrink common-case face list
2024-10-04 00:56:37 -04:00
Sean Whitton
d9e76c87a1 ; diff-delete-other-hunks manual entry: Expand explanation 2024-10-04 09:40:59 +08:00
Sean Whitton
eeeb13bed4 ; Fix word order in a recently-added comment 2024-10-04 09:25:08 +08:00
Sean Whitton
c3e989ca9d New minor mode find-function-mode replaces find-function-setup-keys
* lisp/emacs-lisp/find-func.el (find-function-mode-map):
(find-function-mode): New minor mode.
(find-function-setup-keys): Replace with stub function that just
enables the new minor mode.  Mark as obsolete.
* etc/NEWS: Announce the change.
2024-10-04 08:28:21 +08:00
Theodor Thornhill
c9e30e8c77 Add sentence and sexp movement to python-ts-mode
* lisp/progmodes/python.el (python-ts-mode): Add relevant node
types.  (Bug#60856)
2024-10-04 01:51:44 +02:00
Stefan Kangas
59dcd11433 Fix two warnings in smerge.el
* lisp/vc/smerge-mode.el (smerge-upper, smerge-lower): Fix warnings.
2024-10-04 01:38:11 +02:00
Stefan Kangas
e20ce5fcc5 Prefer defcustom :local specifier
* lisp/dirtrack.el (dirtrack-list):
* lisp/emacs-lisp/lisp.el (defun-prompt-regexp):
* lisp/emulation/viper-init.el
(viper-related-files-and-buffers-ring):
* lisp/emulation/viper-util.el (viper-syntax-preference):
* lisp/erc/erc.el (erc-ignore-list):
* lisp/files.el (buffer-offer-save, backup-by-copying-when-mismatch):
* lisp/find-file.el (ff-pre-find-hook, ff-pre-load-hook)
(ff-post-load-hook, ff-not-found-hook, ff-file-created-hook)
(ff-case-fold-search, ff-always-in-other-window)
(ff-ignore-include, ff-quiet-mode, ff-other-file-alist)
(ff-search-directories):
* lisp/mh-e/mh-e.el (mh-scan-prog):
* lisp/newcomment.el (comment-column):
* lisp/obsolete/rlogin.el (rlogin-directory-tracking-mode):
* lisp/play/decipher.el (decipher-ignore-spaces):
* lisp/plstore.el (plstore-encrypt-to):
* lisp/proced.el (proced-format, proced-filter, proced-sort)
(proced-descend, proced-auto-update-flag, proced-tree-flag):
* lisp/progmodes/fortran.el (fortran-line-length):
* lisp/shell.el (shell-history-file-name):
* lisp/simple.el (goal-column, fill-prefix):
* lisp/vc/ediff-init.el (ediff-use-faces)
(ediff-highlight-all-diffs, ediff-autostore-merges):
* lisp/vc/ediff-merg.el (ediff-show-clashes-only)
(ediff-skip-merge-regions-that-differ-from-default): Prefer defcustom
:local specifier to using 'make-variable-buffer-local' directly.
2024-10-04 01:38:11 +02:00
Dmitry Gutov
bde00266db help-setup-xref: Clean up xref backend before non-Lisp uses
* lisp/help-mode.el (help-setup-xref): Kill more local variables,
previously set in help-fns--setup-xref-backend (bug#69462).
2024-10-03 22:19:56 +03:00
Dmitry Gutov
4d43fbe3f5 ; Update a comment accordingly 2024-10-03 22:07:58 +03:00
Dmitry Gutov
a9e36fc3bf 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.
2024-10-03 22:03:34 +03:00
Stefan Monnier
ef587bf6b4 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`.
2024-10-03 14:32:09 -04:00
Stefan Monnier
03a1e942c0 * doc/misc/eieio.texi (Writing Methods): Typo 2024-10-03 13:43:25 -04:00
Stefan Monnier
0894d3835e (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.
2024-10-03 11:55:58 -04:00
Hugo Heagren
3139ce7ad4 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'.
2024-10-03 11:52:29 -04:00
Michael Albinus
042eee61ee ; Fix last change in gitlab-ci.yml 2024-10-03 16:41:40 +02:00
Stefan Monnier
8683d64cc5 (help--symbol-completion-table): Try and fix bug#73473
* lisp/help-fns.el (help--symbol-completion-table): Be more
careful with `help-enable-completion-autoload` so we don't load
a package in cases where we already know it won't impact the result.
2024-10-03 10:25:13 -04:00
Andrea Corallo
b9ebacf403 * Fix few warnings in lisp/shell.el
* lisp/shell.el (shell-highlight-undef-defined-face)
(shell-highlight-undef-undefined-face)
(shell-highlight-undef-alias-face): Unquote :inherit argument.
2024-10-03 13:15:58 +02:00
Andrea Corallo
abb932290d * src/comp.c (compile_function, Fcomp__compile_ctxt_to_file0): Use DOHASH. 2024-10-03 13:10:09 +02:00
Andrea Corallo
f985bab71b * etc/TODO (Native compiler improvements): Add entry. 2024-10-03 13:10:09 +02:00
Sean Whitton
cc2ad5c2d1 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.
2024-10-03 18:37:01 +08:00
Eli Zaretskii
1aeec0db7d Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-10-03 13:34:40 +03:00
Eli Zaretskii
d5b02b7ad6 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)
2024-10-03 13:32:10 +03:00
Michael Albinus
748f76c5b3 ; Minor changes in gitlab-ci.yml
* test/infra/gitlab-ci.yml (.job-template): Comment test prints.
(.test-template): Adapt paths:
2024-10-03 09:26:24 +02:00
Daniel Colascione
3d609375f9 Track nil colors in term
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.

* lisp/term.el (term-ansi-current-color):
(term--color-as-hex): track nil fg, bg colors
2024-10-02 21:39:56 -07:00
Dmitry Gutov
ad52983101 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.
2024-10-03 04:24:20 +03:00
Sean Whitton
11e7aa75ee ; Rework documentation for diff-delete-other-hunks 2024-10-03 08:50:55 +08:00
Dmitry Gutov
c8ecd7fa0d Use Emacs Lisp xref backend in Lisp Help buffers
* lisp/help-fns.el (help-fns--setup-xref-backend):
New function (bug#69462).
(describe-function, describe-variable): Use it here.

* lisp/emacs-lisp/cl-extra.el (cl-describe-type): And here.

* lisp/progmodes/elisp-mode.el (xref-backend-definitions):
Only infer namespace in emacs-lisp-mode (use 'any' otherwise).
2024-10-03 03:05:18 +03:00
Daniel Colascione
79d66b4b29 Process focus-in events immediately on NS
* src/nsterm.m ([EmacsView windowDidBecomeKey]): kick the main
event loop when we get a focus-in event so it gets processed
immediately (Bug#73559).
2024-10-02 10:35:22 -07:00
Stefan Kangas
4bb62af326 Prefer defcustom :local specifier in textmodes
* lisp/textmodes/fill.el (default-justification):
* lisp/textmodes/ispell.el (ispell-local-dictionary)
(ispell-skip-html):
* lisp/textmodes/less-css-mode.el (less-css-output-file-name)
(less-css-input-file-name):
* lisp/textmodes/refer.el (refer-bib-directory, refer-bib-files)
(refer-cache-bib-files):
* lisp/textmodes/two-column.el (2C-separator, 2C-window-width):
Prefer defcustom :local specifier to using 'make-variable-buffer-local'
directly.
2024-10-02 12:19:22 +02:00
Stefan Kangas
67e807d897 ; Fix thinko in my last change
* lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): Fix thinko.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-local): Update test.
2024-10-02 12:03:45 +02:00
Sean Whitton
9e51815265 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.
2024-10-02 15:24:21 +08:00