1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

170708 commits

Author SHA1 Message Date
Paul Eggert
a3d7092114 Rename TAG_PTR to TAG_PTR_INITIALLY
* src/lisp.h (TAG_PTR_INITIALLY): Rename from TAG_PTR, since calls
can be used only as initializers, and the convention elsewhere in
lisp.c is to give these macros names ending in ‘_INITIALLY’.
This should help avoid confusion such as we recently experienced
in make_lisp_symbol_internal.  All uses changed.
2024-01-28 00:26:44 -08:00
Paul Eggert
fcf69960e8 * src/lisp.h: Improve TAG_PTR comments. 2024-01-28 00:26:44 -08:00
Paul Eggert
99a122b5b8 Fix C conformance issue in LISPSYM_INITIALLY
* src/lisp.h (LISPSYM_INITIALLY): Remove unnecessary cast to char *.
The C standard allows but does not require support for casts to
pointers in constant expressions in static initializers.
2024-01-28 00:26:44 -08:00
Eli Zaretskii
e1970c99f0 Fix "emacs -nw" on MS-Windows
* src/w32term.c (w32_flip_buffers_if_dirty): Do nothing if F is
not a GUI frame.  This avoids rare crashes in "emacs -nw".
* src/w32console.c (initialize_w32_display): Set the
ENABLE_EXTENDED_FLAGS bit in 'prev_console_mode'.
2024-01-28 10:19:48 +02:00
Jim Porter
c4d16909fa ; Be more strict with command arguments for a few Eshell commands
* lisp/eshell/em-dirs.el (eshell/pwd):
* lisp/eshell/em-unix.el (eshell/whoami):
* lisp/eshell/esh-proc.el (eshell/jobs): Don't accept arguments.
2024-01-27 22:21:29 -08:00
Jim Porter
a3cd284b90 Support setting umask symbolically in Eshell
* lisp/eshell/em-basic.el (eshell/umask): Handle setting umask
symbolically, and make setting umask take precedence over "-S".

* test/lisp/eshell/em-basic-tests.el
(em-basic-test/umask-print-numeric, em-basic-test/umask-read-symbolic,
em-basic-test/umask-set): Rename to...
(em-basic-test/umask/print-numeric)
(em-basic-test/umask/print-symbolic, em-basic-test/umask/set-numeric):
... these.
(em-basic-test/umask/set-symbolic, em-basic-test/umask/set-with-S):
New tests.

* etc/NEWS: Announce this change.
2024-01-27 22:21:23 -08:00
Yuan Fu
236317e5d2
Fix treesit-range-rules
* lisp/treesit.el (treesit-range-rules): Reset :local like other
keywords.  The other chunk is indentation fix.
2024-01-27 22:04:30 -08:00
Eli Zaretskii
6d76e39912 ; Fix last change in package.texi
* doc/lispref/package.texi (Multi-file Packages): Fix wording and
markup.  (Bug#65027)
2024-01-28 07:43:25 +02:00
Jim Porter
744a10a4d7 * doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore". 2024-01-27 12:31:32 -08:00
Jim Porter
3c680968e4 Fix command replacement with the Eshell builtin versions of "sudo" and "doas"
This is particularly important when the inner command to execute is an
alias.  Aliases throw 'eshell-replace-command' too, so we want to do
this in two phases: first, replace the "sudo"/"doas" with a
let-binding of 'default-directory', and then later, let the alias code
do its own replacement (bug#68074).

* lisp/eshell/em-tramp.el (eshell/sudo, eshell/doas): Use
'eshell-replace-command' to wrap the inner command.
* test/lisp/eshell/em-tramp-tests.el (mock-eshell-named-command):
Remove.
(em-tramp-test/sudo-basic, em-tramp-test/sudo-user)
(em-tramp-test/doas-basic, em-tramp-test/doas-user): Catch
'eshell-replace-command'.
2024-01-27 12:22:57 -08:00
Eli Zaretskii
aa386cd92f ; * src/pdumper.c: Fix comments. 2024-01-27 22:21:11 +02:00
Konstantin Kharlamov
54c6588952 Support a local repo as URL in 'treesit-language-source-alist'
Sometimes people may need to bisect to find specific revision
in a grammar library's repo.  In this case they'd want to point
the URL to the local repo to avoid cloning it on every rebuild.
So add support for a directory instead of URL in
'treesit-language-source-alist'.
* lisp/treesit.el (treesit--install-language-grammar-1): Test
if URL is a local directory.  Then if it is, avoid cloning the
repo and removing the path on success.
(treesit--git-clone-repo): Factor out the code for cloning to
a separate function.
(treesit--git-checkout-branch): A helper to checkout the
revision for cases where we didn't clone the repo but want it
to point the revision.  (Bug#68579)
2024-01-27 21:18:27 +02:00
Manuel Giraud
12afe75cf7 Enable marking tagged with ls -F
Bug#68637

* lisp/image/image-dired-dired.el (image-dired-mark-tagged-files):
Enable marking tagged for executable and symlink images when
'dired-listing-switches' includes -F.
2024-01-27 20:44:01 +02:00
Eli Zaretskii
6da9dc9048 ; * lisp/visual-wrap.el: Fix typos. 2024-01-27 19:18:16 +02:00
Eli Zaretskii
37c0607241 ; * lisp/visual-wrap.el (visual-wrap-fill-context-prefix): Doc fix. 2024-01-27 19:15:00 +02:00
Eli Zaretskii
58f0603d40 Allow users to opt out of following Windows Dark mode
* src/w32fns.c (globals_of_w32fns) <w32-follow-system-dark-mode>:
New variable.
(w32_applytheme): Disable application of Dark mode if
'w32-follow-system-dark-mode' is nil.

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc): Document
'w32-follow-system-dark-mode'.
2024-01-27 19:11:22 +02:00
Stefan Monnier
3c4b6823c3 * src/pdumper.c (Fdump_emacs_portable): Simplify commit 16a16645f5 2024-01-27 11:15:54 -05:00
Eli Zaretskii
4e5dd1a796 ; * doc/misc/calc.texi (Fractions): Fix typos. (Bug#66944) 2024-01-27 16:47:10 +02:00
Daniel Brooks
77d9d05df8 Calc parses fractions written using U+2044 FRACTION SLASH
Fractions of the form 123⁄456 are handled as if written 123:456. Note
in particular the difference in behavior from U+2215 DIVISION SLASH
and U+002F SOLIDUS, which result in division rather than a rational
fraction.
* lisp/calc/calc-aent.el (math-read-replacement-list): Substitute a
colon for any fraction slash.  (Bug#66944)

* test/lisp/calc/calc-tests.el (calc-frac-input): Test various
fraction types.

* etc/NEWS:
* doc/misc/calc.texi (Fractions): Mention fraction slash, precomposed
fractions.

Copyright-paperwork-exempt: yes
2024-01-27 16:42:47 +02:00
Eshel Yaron
63a12ffbc3 Avoid signaling errors in emoji.el
* lisp/international/emoji.el (emoji--read-emoji): Signal
user-error on empty input (bug#68671).
2024-01-27 15:51:39 +02:00
Eli Zaretskii
6176924238 Merge from origin/emacs-29
53481cc954 Fix description of when "\xNNN" is considered a unibyte c...
1ef8b90ae0 Simplify imenu setup for {cmake,dockerfile}-ts-modes
7338af9c98 ; * etc/PROBLEMS: Document that GnuPG 2.4.4 solves the Ea...
5483a1df99 Improve documentation of profiler commands
fb4cf0ab46 ; Fix xref under Output Overrides in Elisp manual.
aa6c24da61 Fix broken links to Freedesktop notifications spec
14d68221d2 Fix nasty cut'n'waste error in Tramp
51ca049608 Fix image-dired-tags-db-file void variable error
c450eec07f typescript-ts-mode: Skip test if tsx grammar missing
9841ced147 ; Fix typos
557ed9c046 * admin/README: Document the run-codespell script.
5701f96335 * admin/README: Fix entry on coccinelle subdirectory.
1805f4bfd6 Add script admin/run-codespell and supporting files
2024-01-27 08:14:31 -05:00
Eli Zaretskii
9b10aca6af ; Merge from origin/emacs-29
The following commit was skipped:

115908469d Sync with Tramp 2.6.3-pre (don't merge with master)
2024-01-27 08:14:31 -05:00
Eli Zaretskii
67392fc0dd Merge from origin/emacs-29
3a541b25df Update Polish translation of tutorial
6df731431a * doc/misc/gnus.texi (Summary Mail Commands): Fix command...
409bb8eb24 ; * doc/misc/gnus.texi (Scoring): Typo (bug#68581).
25734dd40c ; Delete pre-release remainder in NEWS.27
2024-01-27 08:14:30 -05:00
Eli Zaretskii
fbe2596531 ; Merge from origin/emacs-29
The following commits were skipped:

4e500d9d5a Bump Emacs version to 29.2.50.
ef01b634d2 ; Regenerate lisp/ldefs-boot.el and etc/AUTHORS for 29.2.
2024-01-27 08:14:30 -05:00
Eli Zaretskii
9d3229c7d1 Merge from origin/emacs-29
b4baf0f821 ; Update ChangeLog.4 with latest changes.
c633c90993 * Update etc/HISTORY and ChangeLog.4 for 29.2 release.
2024-01-27 08:14:29 -05:00
Eli Zaretskii
393f1f7d24 ; Merge from origin/emacs-29
The following commit was skipped:

1ab88d8aa5 Bump Emacs version to 29.2
2024-01-27 08:14:29 -05:00
Eli Zaretskii
58e2569bd3 Merge from origin/emacs-29
20125ad97b ; admin/authors.el (authors-aliases): Update for Emacs 29.2.
92a7132bd6 ; * etc/NEWS: Clean up for Emacs 29.2.
314ac2e431 ; * lisp/mail/rmail.el (rmail-show-message-verbose-min): ...
2cb1b76696 diff-mode: Support committing diff with file deletions
b96aa528f6 * lisp/net/eww.el (eww-retrieve): Fix args of eww-render ...
2024-01-27 08:13:22 -05:00
Eli Zaretskii
3b091c4af8 ; Merge from origin/emacs-29
The following commits were skipped:

d4b9cb6b5b Fix folder creation error (Bug#67361)
53b5b77010 Simplify 'without-restriction'
2024-01-27 08:07:26 -05:00
Eli Zaretskii
47ee5aacdc ; Declare tree-sitter functions in yaml-ts-mode.el
* lisp/textmodes/yaml-ts-mode.el (treesit-node-start)
(treesit-node-end, treesit-node-type): Declare.
2024-01-27 15:05:40 +02:00
Mattias Engdegård
85faf90761 ; * lisp/visual-wrap.el: use regexp-unmatchable 2024-01-27 12:37:53 +01:00
Mattias Engdegård
da726c6de2 Add DOHASH_SAFE, make DOHASH faster (bug#68690)
Revert DOHASH to the fast (field-caching) implementation but with
an assertion to detect misuses.  Add DOHASH_SAFE for use in
code that must tolerate arbitrary mutation of the table being
iterated through.

* src/lisp.h (DOHASH): Go back to fast design that only allows
restricted mutation, but with a checking assertion.
(DOHASH_SAFE): New macro that tolerates arbitrary mutation while being
much simpler (and acceptably fast).
* src/fns.c (Fmaphash):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
Use DOHASH_SAFE.
2024-01-27 12:37:53 +01:00
Eli Zaretskii
9b3f43fa08 ; * lisp/textmodes/refill.el (refill-fill-paragraph-at): Fix typo. 2024-01-27 13:28:32 +02:00
Eli Zaretskii
d36c370ce5 ; Minor improvements of last change
* lisp/register.el (register-use-preview): Doc fix.
* doc/emacs/regs.texi (Registers): Fix wording.  (Bug#68654)
2024-01-27 12:52:55 +02:00
Thierry Volpiatto
6b93e16e43 Add new option to 'register-use-preview'
When set to 'insist', exit minibuffer with same key as
register name, instead of pressing RET.  E.g., pressing
"a" selects register "a", then pressing "a" again exits
the minibuffer.

* lisp/register.el (register-use-preview): New option 'insist'.
(register-read-with-preview-fancy): Handle new option.
* doc/emacs/regs.texi: Document it.
* etc/NEWS: Mention 'insist'.  (Bug#68654)
2024-01-27 12:46:32 +02:00
Brad Howes
fc70eced27 Downcase host names in ansi-osc.el to match URL parsing behavior
* lisp/ansi-osc.el (ansi-osc-directory-tracker): Compare
with 'system-name' case-insensitively.  (Bug#68632)

Copyright-paperwork-exempt: yes
2024-01-27 12:30:55 +02:00
Mekeor Melire
756daa93b3 Add option Info-url-alist
* lisp/info.el (Info-url-alist): New option mapping manuals
to URLs.
(Info-url-for-node): Use it.
* test/lisp/info-tests.el (test-info-urls): Add more tests.
In particular, 'Info-url-for-node' should error when
manual-name is not handled in 'Info-url-alist'.
* etc/NEWS: Announce the change.  (Bug#67615)
2024-01-27 12:18:17 +02:00
Jakub Ječmínek
09cdf8a406 Fix syntax highlighting after string literal concat in python-mode
* lisp/progmodes/python.el (python-syntax-stringify): Fix
incorrect font-lock after string literal concatenation.
(Bug#45897)

* test/lisp/progmodes/python-tests.el
(python-font-lock-string-literal-concatenation): New test.

Co-authored-by: kobarity <kobarity@gmail.com>
Copyright-paperwork-exempt: yes
2024-01-27 12:05:48 +02:00
Eshel Yaron
f0c573d806 Optionally avoid extending 'completion-at-point-functions'
It is now possible to avoid extending
'completion-at-point-functions' in Text mode and its descendants.
* lisp/textmodes/text-mode.el
(text-mode-meta-tab-ispell-complete-word): Rename to...
(text-mode-ispell-word-completion): ...this.  Extend with another
option 'completion-at-point'.
(text-mode): Only extend 'completion-at-point-functions' when
'text-mode-ispell-word-completion' is 'completion-at-point'.
(Bug#67527)

* etc/NEWS: Update the entry about 'M-TAB' in Text mode.
2024-01-27 11:53:17 +02:00
Eli Zaretskii
fa7543eeb7 Minor fix in 'describe-language-environment'
* lisp/international/mule-cmds.el (describe-language-environment):
Use 'current-language-environment' as DEFAULT in the prompt.
Patch by Thierry Volpiatto <thievol@posteo.net>.  (Bug#68602)
2024-01-27 11:44:54 +02:00
Eli Zaretskii
8163e0b20c Improve 'refill-mode' in Org buffers
* lisp/textmodes/refill.el (refill-fill-paragraph-at): Use
'fill-forward-paragraph' instead of 'forward/backward-paragraph',
so that modes could customize the behavior.  (Bug#68418)
2024-01-27 10:52:47 +02:00
Eli Zaretskii
43e2f3acdd ; Minor improvements in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap-extra-indent): Add :version.
(visual-wrap-fill-context-prefix): Doc fix.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Move the menu to
a better place, improve the help-echo text.

* etc/NEWS:
* doc/emacs/basic.texi (Continuation Lines): Improve documentation
and indexing of 'visual-wrap-prefix-mode'.
2024-01-27 10:38:14 +02:00
Eli Zaretskii
53481cc954 Fix description of when "\xNNN" is considered a unibyte character
* doc/lispref/objects.texi (Non-ASCII in Strings): More accurate
description of when a hexadecimal escape sequence yields a unibyte
character.  (Bug#68751)
2024-01-27 10:11:32 +02:00
Randy Taylor
1ef8b90ae0
Simplify imenu setup for {cmake,dockerfile}-ts-modes
* lisp/progmodes/cmake-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-child, treesit-node-start, cmake-ts-mode--imenu,
cmake-ts-mode--imenu-1): Remove.
(treesit-search-subtree): Declare.
(cmake-ts-mode--function-name): New function.
(cmake-ts-mode): Use it.

* lisp/progmodes/dockerfile-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-start, dockerfile-ts-mode--imenu,
dockerfile-ts-mode--imenu-1): Remove.
(dockerfile-ts-mode--stage-name): New function.
(dockerfile-ts-mode): Use it.
2024-01-26 20:41:17 -08:00
Stefan Monnier
08007a030e pdumper.c: Minor improvements found while debugging
* src/pdumper.c (dump_hash_table_list): Remove unused return value;
and simplify with `vconcat`.
(dump_charset): Don't copy uninitialized fields.
2024-01-26 23:15:57 -05:00
Stefan Monnier
89734c4f1d pdumder.c: Fix bug#68690
The problem was that the offset computed for the `charset_table` array
was a multiple of 4 but the `struct charset` needed an alignment on
a multiple of 8, so `dump_charset` inserted 4 bytes of padding,
whereas you can't have padding at the beginning of an array.

* src/pdumper.c (dump_charset): Don't set alignment here.
(dump_charset_table): Set it here instead.
2024-01-26 23:08:13 -05:00
Po Lu
c37b50ad41 Intercept calls to `openat' under Android
* exec/configure.ac (OPEN_SYSCALL, OPENAT_SYSCALL): Define new
macros.

* exec/exec.h (struct exec_tracee): New field `sp'.

* exec/trace.c (handle_openat): New function.
(process_system_call): If handle_openat executes successfully,
save the unmodified stack pointer within the tracee structure to
be restored once the system call completes.
2024-01-27 10:36:30 +08:00
Po Lu
55f0b3e561 Move Visual Wrap menu to menu-bar.el
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Insert new
menu item controlling visual-wrap-prefix-mode.

* lisp/visual-wrap.el: Remove menu bar autoload.
2024-01-27 09:38:46 +08:00
Po Lu
d50300c500 * lisp/visual-wrap.el (visual-wrap-prefix-mode): Improve doc string. 2024-01-27 09:31:38 +08:00
Po Lu
6667d6c19c Import ELPA package adaptive-wrap as visual-wrap
* doc/emacs/basic.texi (Continuation Lines): Document
visual-wrap and its applications.

* etc/NEWS (Editing Changes in Emacs 30.1): Ditto.

* lisp/visual-wrap.el (visual-wrap-extra-indent)
(visual-wrap--face-extend-p, visual-wrap--prefix-face)
(visual-wrap--prefix, visual-wrap-fill-context-prefix)
(visual-wrap-prefix-function, visual-wrap-prefix-mode, lookup-key)
(visual-wrap): New file.  Update copyright years and rename to
`visual-wrap'.
2024-01-27 09:30:16 +08:00
João Távora
972466dce2 Eglot: fix eglot--dumb-tryc for "only possible completion" case
* lisp/progmodes/eglot.el (eglot--dumb-tryc): Fix for "only possible
  completion" case.
2024-01-26 18:04:51 -06:00