1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

172356 commits

Author SHA1 Message Date
Michael Heerdegen
34fc71c004 Further tweak pp code printing
This fixes an aspect of Bug#70868.

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print characters with
`prin1-char'.  In all other cases consistently print with `prin1'.
2024-05-26 14:17:21 +02:00
Naofumi Yasufuku
3ea451042a Fix --enable-checking build with macOS clang 15.0.0
search.c:3428:7: error: call to undeclared library function 'free' ...

configure:9131: checking for C compiler version
configure:9140: gcc --version >&5
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

* src/search.c: Include stdlib.h for free(), and stdio.h for
open_memstream(), fclose().

Copyright-paperwork-exempt: yes
2024-05-26 13:41:19 +02:00
Mattias Engdegård
236034a24d Clean up legacy bytecode loading
Complete some unfinished work from the elimination of lazy bytecode
loading in 9bcc9690a8: remove code which became unreachable by that
reform.  This simplifies some of the lower-level parts of the reader
which helps performance somewhat.

* src/doc.c (read_bytecode_pointer, read_bytecode_char)
(read_doc_string): Remove.
(get_doc_string): Remove last argument, all callers adapted.  Simplify.
* src/lread.c (readbyte_for_lambda, readbyte_from_string)
(readbyte_for_lambda, readbyte_from_string): Remove.
(readchar, unreadchar): Remove unused code paths for Qlambda and cons
arguments.
(bytecode_from_rev_list): Remove last use of a quirky code path,
decoding force-loaded lazy bytecode explicitly.
2024-05-26 13:04:51 +02:00
Joost Kremers
cfd654c418 Update documentation for 'width' slot of vtable ':column' object
Bug#71167
2024-05-26 12:19:21 +03:00
Lin Sun
b241ec0e78 Enhance 'python-shell-send-block' for convenience
* lisp/progmodes/python.el (python-shell-send-block):
'python-shell-send-block' will now send block without header
by default.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Update the test case.
(Bug#71083)
2024-05-26 11:23:12 +03:00
kobarity
9ca89cb483 ; Fix merge error (bug#71093). 2024-05-26 11:21:07 +03:00
Eli Zaretskii
06541762d7 ; Fix Calc manual
* doc/misc/calc.texi (History and Acknowledgments)
(Musical Notes): Fix markup due to makeinfo 4.13 support.
2024-05-26 10:28:35 +03:00
Eli Zaretskii
45a631134f ; Merge from origin/emacs-29
The following commit was skipped:

21b2954c90 ; Fix markup in manuals
2024-05-26 03:01:29 -04:00
Eli Zaretskii
21b2954c90 ; Fix markup in manuals
* doc/emacs/files.texi (Visiting):
* doc/lispref/processes.texi (Filter Functions, Sentinels): Fix
markup and punctuation.  Reported by Andrés Ramírez
<rrandresf@hotmail.com>.
2024-05-26 09:49:52 +03:00
Po Lu
74ceb6922c Address compilation errors and warnings on x86 Solaris 10 systems
* doc/misc/ede.texi (Extending EDE):

* doc/misc/flymake.texi (Top, Using Flymake): Insert punctuation
after xrefs.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Print
number of files being scraped.

* src/dired.c (directory_files_internal):

* src/eval.c (Fmake_interpreted_closure, Fdefvaralias):

* src/fns.c (Fassoc): Work around optimizer failures.
2024-05-26 11:50:45 +08:00
Dmitry Gutov
2a12f39ffe Improve navigation to cl-defgeneric uses
* lisp/emacs-lisp/cl-generic.el
(cl--generic-find-defgeneric-regexp):
Use "symbol end" boundary (bug#71068).
2024-05-26 05:56:14 +03:00
Dmitry Gutov
7ca238c441 xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer
* lisp/progmodes/xref.el (xref-revert-buffer): Make sure that the
inhibit-modification-hooks binding does not cover xref--fetcher
funcall.  Only the printing step (issue mentioned in bug#53749).
2024-05-26 02:03:13 +03:00
Jim Porter
57dc1ed665 Fix a race condition when evaluating Eshell commands
* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't defer when all the
processes are done.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/pipeline-wait/nested-pipes): New test.
2024-05-25 13:46:24 -07:00
Michael Albinus
91509d5d2a Make Tramp's async processes more robust
* lisp/simple.el (shell-command-sentinel): Check process property
`remote-command' first.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
Set sentinel `ignore'.  (Bug#71049)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Don't suppress
internal sentinel.
(tramp-test32-shell-commanddirect-async): Don't tag it :unstable.
2024-05-25 17:23:30 +02:00
Andrea Corallo
129c6778e6 * src/Makefile.in (ELN_DESTDIR, BIN_DESTDIR): Give a default (bug#70842). 2024-05-25 17:20:47 +02:00
Eli Zaretskii
ed7e576975 Merge from origin/emacs-29
4f0121f8db Avoid assertion violations in displaying under 'outline-m...
1bf6583662 Improve documentation of 'no-special-glyphs' frame parameter
3647645e94 Fix Python font lock of chained assignment statement
3291dea441 Fix example in Calc manual
350ae75f5c Avoid crashes on MS-Windows due to invalid UNC file names
ccf8dba44a ; * lisp/face-remap.el (text-scale-adjust): Doc fix.
5ab144c77c ; Improve documentation of backing up files
2024-05-25 08:00:48 -04:00
Eli Zaretskii
4f0121f8db Avoid assertion violations in displaying under 'outline-minor-mode'
* src/xdisp.c (init_from_display_pos): Initialize BYTEPOS
correctly, since 'init_iterator' no longer computes it from
CHARPOS as needed.  This fixes a change made on Mar 13, 2013.
(Bug#71194)
2024-05-25 14:23:43 +03:00
Mattias Engdegård
cb67c34bcf Omit store-substring from lisp manual (bug#70784)
* doc/lispref/strings.texi (Modifying Strings): Remove `store-substring`
which is not really useful enough to merit a mention here.
2024-05-25 12:50:14 +02:00
Eli Zaretskii
1bf6583662 Improve documentation of 'no-special-glyphs' frame parameter
* doc/lispref/frames.texi (Layout Parameters): Document
limitations of support for 'no-special-glyphs' frame parameter.
(Bug#71163)
* doc/lispref/display.texi (Truncation): Update for when
'fringe-mode' is off.
2024-05-25 13:22:45 +03:00
Eli Zaretskii
d54178f535 Improve documentation of sending commands to shells
* doc/lispref/processes.texi (Synchronous Processes):
* lisp/subr.el (call-shell-region):
* lisp/simple.el (shell-command-on-region)
(shell-command-to-string): Document system-dependent aspects of
sending commands to shells.  (Bug#71081)
2024-05-25 13:02:20 +03:00
Michael Albinus
1a48b53040 Adapt Tramp's progress-reporter messages
* lisp/net/tramp-androidsu.el (tramp-androidsu-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Adapt progress-reporter message.

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Divide progress-reporter into two parts.  (Bug#70901)
2024-05-25 11:34:04 +02:00
Eli Zaretskii
9fbe9dc4c3 ; Improve doc strings in textsec.el
* lisp/international/textsec.el (textsec-email-address-suspicious-p)
(textsec-email-address-header-suspicious-p, textsec-scripts)
(textsec-single-script-p, textsec-covering-scripts)
(textsec-restriction-level, textsec-mixed-numbers-p)
(textsec-resolved-script-set)
(textsec-single-script-confusable-p)
(textsec-mixed-script-confusable-p)
(textsec-whole-script-confusable-p)
(textsec-local-address-suspicious-p)
(textsec-bidi-controls-suspicious-p, textsec-name-suspicious-p)
(textsec-suspicious-nonspacing-p): Doc fixes.
2024-05-25 11:59:21 +03:00
Eli Zaretskii
5f3f461cd0 Avoid rare errors in dabbrev.el
* lisp/dabbrev.el (dabbrev-expand, dabbrev--find-expansion): Make
sure 'dabbrev--last-buffer' is a live buffer before using its
value.  (Bug#70824)
2024-05-25 10:33:07 +03:00
Eli Zaretskii
d50e3226b1 Fix encoding of text when saving a gpg-encoded file
* lisp/epa-file.el (epa-file-write-region): Revert inadvertent
change from July 15, 2020 which broke selection of a correct
encoding for stuff sent to 'gpg'.  (Bug#71080)
2024-05-25 09:12:42 +03:00
Robin Joy
984fb346fd Erase existing duplicates in eshell-history-ring
Erase all existing duplicates instead of just the last duplicate entry
when 'eshell-hist-ignoredups' is set to 'erase'.  Multiple duplicates
can exist in case 'eshell-hist-ignoredups' was set to something else
than 'erase' in the past or if the history file contains duplicates
(bug#71107).

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Remove all
duplicates from history ring.

* test/lisp/eshell/em-hist-tests.el
(em-hist-test/add-to-history/erase-existing-dups): New test.
2024-05-24 19:29:20 -07:00
Tassilo Horn
f3dd0d981c ; Fix previous fix for bug#70796 2024-05-24 23:04:33 +02:00
Spencer Baugh
c812c93548 Fix usage of cons cells in grep-find-ignored-files
grep-find-ignored-files is documented to also include cons
cells, not just globs, but there were two places outside grep.el
where we were using it as if it was only a string list.

To fix this, add a helper function named grep-find-ignored-files
which handles grep-find-ignored-files properly and returns the
list of globs, and use it everywhere.

* lisp/progmodes/grep.el (grep--filter-list-by-dir)
(grep-find-ignored-files): New functions.
(rgrep-find-ignored-directories): Use grep--filter-list-by-dir.
(lgrep, rgrep-default-command):
Use grep-find-ignored-files function.
* lisp/dired-aux.el (dired-do-find-regexp):
Use grep-find-ignored-files function.
* lisp/progmodes/project.el (project-ignores):
Use grep-find-ignored-files function, if bound. (bug#71115)
2024-05-24 23:04:32 +03:00
Tassilo Horn
59d7730a46 bug-reference: signal fontified bounds back to jit-lock (bug#70796)
* lisp/progmodes/bug-reference.el (bug-reference-fontify): Signal
fontified bounds back to jit-lock in order to allow for redisplay
optimizations (bug#70796).
2024-05-24 21:52:34 +02:00
Juri Linkov
9ebe6aa5f1 * lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).
(dired-mode-immediate-menu): Add menu item "Display Externally"
for 'dired-do-open'.

* lisp/dired-aux.el (dired-do-open): Add autoload cookie.
2024-05-24 20:55:30 +03:00
Juri Linkov
74f15ad72d New variable shell-command-guess-dired-optional (bug#18132)
* doc/emacs/dired.texi (Shell Command Guessing):
Add dired-guess-shell-alist-optional.

* lisp/dired.el (dired-guess-shell-alist-user):
* lisp/dired-aux.el (dired-do-shell-command):
Add dired-guess-shell-alist-optional to docstring.
(dired-guess-shell-alist-default): Move media commands to
'dired-guess-shell-alist-optional'.
(dired-guess-shell-alist-optional): New variable.
(dired-guess-default): Add 'dired-guess-shell-alist-optional'
to the end after 'dired-guess-shell-alist-user'
and 'dired-guess-shell-alist-default'.
(shell-command-guess-functions): Add more options.
(shell-command-guess-dired): Remove function.
(shell-command-guess-dired-user)
(shell-command-guess-dired-default)
(shell-command-guess-dired-optional): New functions.
2024-05-24 20:48:42 +03:00
kobarity
3647645e94 Fix Python font lock of chained assignment statement
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Allow chaining
of single assignment statements.
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-20): New test.
(Bug#71093)
2024-05-24 17:53:34 +03:00
Eshel Yaron
6d856acf17
; Refine 'completion-preview-exact' face
* lisp/completion-preview.el (completion-preview-exact): Use
different underline color to further distinguish this face from
'completion-preview-common', and improve legibility with dark
background color.
2024-05-24 11:21:16 +02:00
Eshel Yaron
fda9ecc150
; Exclude a few more modes in 'global-completion-preview-mode'
* lisp/completion-preview.el (global-completion-preview-mode):
Exclude a few non-edit major modes whose definition sets
'major-mode' directly, rather than using 'define-derived-mode'.
2024-05-24 11:18:33 +02:00
Brad Knotwell
3291dea441 Fix example in Calc manual
* doc/misc/calc.texi (Defining Simple Commands): Fix typo in
command names.  (Bug#71166)

Copyright-paperwork-exempt: yes
2024-05-24 10:43:40 +03:00
Andrea Corallo
e650a04dc4 * src/comp.c (check_comp_unit_relocs): Remove unneccesary double access. 2024-05-24 08:38:44 +02:00
Eshel Yaron
9d3fb195af
Fix argument name highlighting in 'describe-function' output
This fixes a regression introduced in
dd38097f0b, which prevented proper
argument name highlighting in function docstrings in the output
buffer of 'describe-function'.

* lisp/help-fns.el (help-do-arg-highlight): New optional arg
that says if we're highlighting arguments in the usage string or
in the docstring.  Tweak generated regex to only expect argument
name to be preceded by function name in usage string.
(help-highlight-arguments): Use new argument for usage string.
2024-05-23 22:14:14 +02:00
Eshel Yaron
52acabcbe8
Fix 'help-view-source' for variables defined in C
This fixes an issue that Juri Linkov mentioned in Bug#71117.

* lisp/help-mode.el (help-function-def--button-function): When
searching for the definition of a variable, make sure to call
'help-C-file-name' with KIND argument set to 'var'.
2024-05-23 22:14:14 +02:00
Eli Zaretskii
e1789f66ac Improve Dired context menu
* lisp/dired.el (dired-context-menu): Add 'w32-shell-execute' menu
item on MS-Windows.  Improve help-echo.
2024-05-23 21:14:13 +03:00
Eli Zaretskii
b53a20c61d Documentation followup for last change
* etc/NEWS: Announce the change in 'key-translate'.

* doc/lispref/commands.texi (Event Mod): Update documentation of
'key-translate'.  (Bug#70139)
2024-05-23 16:23:57 +03:00
Charalampos Mitrodimas
8f010e9a29 Improve 'key-translate' to support removing translations
This patch enhances the key-translate function to allow removing
keyboard translations by passing nil as the second argument (TO).
If TO is nil, any existing translation for the FROM key will be
removed.  The compiler macro is updated to only check TO when it
is non-nil.  This change makes key-translate more consistent with
the behavior of 'keyboard-translate', providing a way to remove
translations without having to specify the same key for both FROM
and TO.
The documentation string is updated to reflect the new behavior.

* lisp/keymap.el (key-translate): Support removing translations
by passing nil as the second argument (TO).  Also signal an error
if multiple items are passed.  (Bug#70139)
2024-05-23 16:16:34 +03:00
Lin Sun
a2ca5d0198 Enhance python-tests to adapt different Python interpreters (bug#70815)
* test/lisp/progmodes/python-tests.el
(python-tests-get-shell-interpreter): New function to get Python
interpreter for testing; and also introduce new env variable
EMACS_PYTHON_INTERPRETER to support customer Python interpreter.

Co-authored-by: kobarity <kobarity@gmail.com>
2024-05-23 16:07:52 +03:00
Eli Zaretskii
f75fec5cac Fix uncompressing a .tar.gz archive whose files have no leading dir
* lisp/dired-aux.el (dired-compress): Handle the case when
NEW-FILE is not produced in the current directory by uncompressing
a compressed file.  (Bug#47058)
2024-05-23 12:51:19 +03:00
Po Lu
e96e4906c8 Work around one Android bug and document another
* etc/PROBLEMS (Runtime problems specific to Android): Document
deficiency of "Android Keyboard (AOSP)."

* java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard):
Revert yesterday's change.

* java/org/gnu/emacs/EmacsWindow.java (toggleOnScreenKeyboard):
Sync with the UI thread after displaying the on-screen keyboard.
2024-05-23 17:46:48 +08:00
Po Lu
64cced2c37 Restore specbound keyboard-locals in the correct KBOARD
* doc/lispref/variables.texi (Intro to Buffer-Local): Fix typo
in documentation.

* src/data.c (KBOARD_OBJFWDP): Move to lisp.h.
(kboard_for_bindings): New variable.
(do_symval_forwarding, store_symval_forwarding): Call
kboard_for_bindings rather than retrieving this value directly.
(set_default_internal): New argument WHERE; if valcontents be a
Lisp_Kboard_Objfwd and WHERE be specified, save the binding
there.  All callers changed.

* src/eval.c (specpdl_where): Adjust for changes in structure
layout.
(specpdl_kboard): New function.
(do_specbind): Clear let->where.kbd in ordinary SPECPDL_LETs,
and set it to the kboard where the binding will be installed if
binding keyboard forwards.
(specbind, do_one_unbind, specpdl_unrewind): Provide
specpdl_kboard in invocation of set_default_internal.

* src/keyboard.c (delete_kboard): Clean thread specpdls of
references to kboards.

* src/keyboard.h (KBOARD_OBJFWDP): Move from data.c.

* src/lisp.h (union specbinding) <let.where>: Convert into
union of KBOARD and Lisp_Object.

* src/thread.c (all_threads): Export.

* src/thread.h: Adjust correspondingly.
2024-05-23 15:19:46 +08:00
Po Lu
ad0b9b9ab5 ; * src/unexelf.c (unexec): Fix compiler warning. 2024-05-23 13:54:48 +08:00
Manuel Giraud
599504a87d ; Fix typo in NEWS (bug#71130). 2024-05-23 08:21:41 +03:00
Eli Zaretskii
5f3feb504c ; Fix recently-added documentation
* doc/lispref/parsing.texi (Tree-sitter Major Modes): Mention
'treesit-indent-function'.  (Bug#71086)
2024-05-22 21:43:43 +03:00
Stefan Monnier
d8af7c99bb * lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Fix bootstrap failure
`rm lisp/emacs-lisp/cl-preloaded.elc src/bootstrap-emacs`
followed by `make` ended up loading right after defining
`built-in-class-p` but before actually defining the
built-in-classes so the computation of bitsets failed.
2024-05-22 13:27:50 -04:00
Po Lu
70effed88d Improve compatibility with Android's default text editor
* java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard):
Request a selection update if `inputConnection' has been
established, to more closely emulate the OS text editing widget.
(onCreateInputConnection) [EmacsService.DEBUG_IC]: Print current
selection values before reporting them.
2024-05-22 22:00:26 +08:00
Eli Zaretskii
350ae75f5c Avoid crashes on MS-Windows due to invalid UNC file names
* src/w32.c (parse_root): Avoid crashes due to invalid (too short)
UNC names, such as "\\".  (Bug#70914)

* test/src/fileio-tests.el (fileio-tests-invalid-UNC): New test.
2024-05-22 14:10:53 +03:00