Commit graph

9326 commits

Author SHA1 Message Date
Po Lu
7196d2d18e Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 19:52:01 +08:00
Po Lu
f9bbe3189b Merge from origin/emacs-29
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary.
3af27a4b81 Improve commentary in nsfns.m
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary.
86f2d6d62f ; * src/xdisp.c: Improve commentary.  (Bug#64596)
ac075176bf ; * admin/notes/bugtracker: Fix punctuation.
8151853447 ; * admin/notes/bugtracker: Use 'e.g.' throughout the doc...
f063f79a49 Convert NUL-containing NSString objects to Lisp strings c...
d172cd5985 ; * doc/lispref/keymaps.texi (Modifying Menus): Add cross...
927e8b470f ; * doc/lispref/keymaps.texi (Extended Menu Items): Add @...
77f489421e ; * src/xdisp.c: Minor improvements of the commentary.
ce3f9fba1a ; Improve accuracy of out-out-order message insertion
17073af84d ; Improve robustness of package-report-bug
2023-07-20 19:50:45 +08:00
Po Lu
4d3442ebad Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 09:23:06 +08:00
Alan Mackenzie
f9f9c95ab5 Fix native compilation in dynamically bound files.
This fixes bug#64642.

* lisp/emacs-lisp/comp.el (comp-spill-lap-function/symbol): Add
code for dynamically bound functions.

* test/src/comp-tests.el (comp-tests-result-lambda): New test.

* test/src/comp-resources/comp-test-funcs-dyn2.el: New test
file.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
#	modified:   lisp/emacs-lisp/comp.el
#	new file:   test/src/comp-resources/comp-test-funcs-dyn2.el
#	modified:   test/src/comp-tests.el
#
# Changes not staged for commit:
#	modified:   .gitignore
#
# Untracked files:
#	.gitignore.acm
#	.gitignore.backup
#	.timestamps.txt
#	2021-01-03.err
#	2021-01-06.err
#	2021-12-16.make
#	2021-12-30.err
#	2021-12-31.err
#	2022-01-01.err
#	2022-01-02.check.err
#	2022-01-02.err
#	2022-01-04.err
#	2022-01-05.err
#	2022-01-06.err
#	2022-01-07.err
#	2022-01-07.outerr
#	2022-01-08.err
#	2022-01-09.err
#	2022-01-09b.err
#	2022-01-10.err
#	2022-01-11
#	2022-01-11.err
#	2022-02-22.err
#	2022-02-22.outerr
#	checkout.20220228.out
#	checkout.20220301.out
#	checkout.20220302.out
#	doc/lispref/syntax.20160318.techsi
#	doc/lispref/syntax.20160318b.techsi
#	lib/.deps/
#	lisp/2022-01-09.err
#	lisp/emacs-lisp/comp.el.rej
#	src/2021-12-20.err
#	src/globals.20211124.aitch
#	src/lisp.20211127.aitch
#	test/lisp/calendar/icalendar-tests.elcr5m9Wq
#
2023-07-19 11:26:11 +00:00
Po Lu
324d66e390 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-18 08:09:01 +08:00
Mattias Engdegård
157e735ce8 Don't distort character ranges in rx translation
The Emacs regexp engine interprets character ranges from ASCII to raw
bytes, such as [a-\xfe], as not including non-ASCII Unicode at all;
ranges from non-ACII Unicode to raw bytes, such as [ü-\x91], are
ignored entirely.

To make rx produce a translation that works as intended, split ranges
that that go from ordinary characters to raw bytes. Such ranges may
appear from set manipulation and regexp optimisation.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split intervals that
straddle the char-raw boundary when rendering a string regexp from an
interval set.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte):
Add test cases.
2023-07-17 17:56:54 +02:00
Po Lu
d78d7aa783 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-16 08:18:13 +08:00
Spencer Baugh
17073af84d ; Improve robustness of package-report-bug
* lisp/emacs-lisp/package.el (package-report-bug): Do not assume that
every entry in 'custom-current-group-alist' has a non-nil entry for a
filename.

It is possible for a group to not be associated with any file, e.g. when
a 'defgroup' form is evaluated using 'eval-expression'.  (bug#64543)
2023-07-16 00:27:40 +02:00
Eli Zaretskii
748d2ed515 Merge from origin/emacs-29
7ac947f34c ; * src/lisp.h (struct Lisp_Overlay): Update commentary (...
9bc93c7996 Replace duplicate text from epa.texi by a reference
74cc1d27f1 Add basic usage information and fix references
f24bdbfaf5 Add concept index, title-case structure titles
0165b50b0f ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc...
4cf33b6bd0 ; * doc/misc/modus-themes.org: Fix whitespace (bug#64548).
4821da1ad7 Fix show-paren-mode when the parentheses is partially vis...
419b4d4491 ; Improve documentation of with-restriction
be34e8294a ; * admin/git-bisect-start: Update failing commits
8e06809fcc Merge branch 'scratch/bug64391' into emacs-29
dbac807605 * lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.
01fb898420 Simplify after adding internal function to enter a labele...
b741dc7fcd Add internal function to enter a labeled restriction

# Conflicts:
#	doc/misc/modus-themes.org
2023-07-15 05:30:14 -04:00
Po Lu
4f95ab3837 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-14 15:35:21 +08:00
Stefan Monnier
47c2da092a cl-print: Allow expanding the contents of hash-tables
* lisp/emacs-lisp/cl-print.el (cl-print-object) <hash-table>:
Add an ellipsis.
(cl-print-object-contents) <hash-table>: New method.
2023-07-13 22:26:19 -04:00
Stefan Monnier
badbfd57cd * lisp/emacs-lisp/backtrace.el (backtrace--change-button-skip): Typo) 2023-07-13 21:51:23 -04:00
Eli Zaretskii
4e8d579f3d Use 'emacs-lisp-compilation-mode' in native compilation buffers
Re-install this commit 40492581f9, now that source of
the recursive-load has been fixed (bug#64494).

* lisp/emacs-lisp/comp.el (comp-log-to-buffer)
(comp-run-async-workers): Use 'emacs-lisp-compilation-mode' in the
buffers where we log the results of native compilation.  Suggested
by No Wayman <iarchivedmywholelife@gmail.com>.  (Bug#64452)
2023-07-13 21:24:24 -04:00
Stefan Monnier
fcade74066 src/comp.c: Use pending_funcalls to fix bug#64494
Make sure `comp.el` is never loaded synchronously by simply
delaying all calls to `native--compile-async` via `pending_funcalls`.

* lisp/startup.el (comp--compilable, comp--delayed-sources): Don't declare.
(startup--require-comp-safely)
(startup--honor-delayed-native-compilations): Delete functions.
(normal-top-level): Don't call `startup--honor-delayed-native-compilations`.

* src/comp.c (maybe_defer_native_compilation): Use `pending_funcalls`.
(syms_of_comp): Delete `Vcomp__delayed_sources` and `comp__compilable`.
Define `Qnative__compile_async`.
2023-07-13 20:13:32 -04:00
Po Lu
a65960c5b9 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-14 07:58:49 +08:00
Stefan Monnier
3ffb99f28f cl-print: Put buttons on ellipses
Currently, in *Backtrace* we have a nice behavior for cl-printed objects
where they're truncated by default to a manageable size but we can click
on the "..." to expand them when needed.

The patch below moves that functionality to `cl-print.el` such
that it can be enjoyed "everywhere" (bug#64536).  It also has the
benefit of simplifying the code since `backtrace.el` had to look for
ellipses in order to add buttons to them, whereas now we can put
the ellipses right when we write them.

* lisp/emacs-lisp/cl-print.el (cl-print-object-contents): Improve docstring.
(cl-print-expand-ellipsis-function): New var.
(cl-print--default-expand-ellipsis): New function.
(cl-print-expand-ellipsis): New command.
(cl-print-insert-ellipsis): Allow nil instead of 0 to mean "this elides
the whole object".
(cl-print-ellipsis): Move button type from `backtrace.el`.
(cl-print-propertize-ellipsis): Put a button.
(cl-print--expand-ellipsis): Rename from `cl-print-expand-ellipsis`.
(cl-print-to-string-with-limit): Allow new value t for `limit`.

* lisp/emacs-lisp/backtrace.el (backtrace--font-lock-keywords): Simplify.
(backtrace--match-ellipsis-in-string): Delete function.
(backtrace--change-button-skip): Adjust to new button type name.
(backtrace--expand-ellipsis): New function, extracted from
`backtrace-expand-ellipsis`.
(backtrace-expand-ellipsis): Delete function.
(backtrace-ellipsis): Move button type to `cl-print.el`.
(backtrace--print-to-string): Don't look for cl-print ellipses any more.
(backtrace-mode): Use `backtrace--expand-ellipsis`.

* lisp/ielm.el (ielm--expand-ellipsis): New function.
(inferior-emacs-lisp-mode): Use it to fill the data when expanded.

* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-check-ellipsis-expansion)
(cl-print-tests-check-ellipsis-expansion-rx): Adjust to new internal
function name.
2023-07-13 19:00:51 -04:00
Eli Zaretskii
0165b50b0f ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc string. 2023-07-12 15:19:10 +03:00
Po Lu
f812d92f67 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-09 08:40:38 +08:00
Stefan Monnier
9c282faf26 cl-print.el: Reduce code duplication
While at it, fix a bug in `cl-print-object-contents` for strings,
where we forgot to pass `stream` to `princ` at one place and simplify
a `substring` call using a negative offset.

* lisp/emacs-lisp/cl-print.el (cl-print--cons-tail)
(cl-print--vector-contents, cl-print--struct-contents)
(cl-print--string-props): New functions, extracted from
`cl-print-object-contents`.
(cl-print-object, cl-print-object-contents): Use them.
2023-07-08 20:19:02 -04:00
Stefan Monnier
1b7c9ecc8f pp-fill: Fix missing indentation in some cases
* lisp/emacs-lisp/pp.el (pp-fill): Improve handling of char-tables.
(pp-buffer): Improve backward compatibility.
2023-07-08 15:10:23 -04:00
Eli Zaretskii
375dac936f Merge from origin/emacs-29
600b90ed56 Mark failing icalendar test as unstable (bug#56241)
f8a918c977 ; * src/coding.c (Fcoding_system_put): Improve doc string.
40f84e906f ; * doc/lispref/keymaps.texi (Key Binding Commands): Fix ...
502a780031 ; Improve documentation of 'vertical-motion' in ELisp manual
0d90873fa4 ; * src/indent.c (Fvertical_motion): Doc fix.
9b38773a20 ; * lisp/dired.el (dired-no-confirm): Doc fix.  (Bug#64493)
a30ebe7a55 ; Improve documentation of key-binding commands
c3fefb2b3a Improve natnump shortdoc
244d4c837a correct info documentation of benchmark-call
67def1f550 * lisp/progmodes/grep.el (rgrep): Fix docstring.
8da2091362 ; Fix documentation of minibuffer-completion commands
aa030698ce ; Fix typos in documented names of keymap-* functions
a9b46bb25d Include a help-echo for flymake's modeline counters
37ed3d15f3 Avoid errors in completion due to 'completion-regexp-list'
15ff876177 ; * lisp/register.el (register-val-describe): Doc fix.
fe7b909c16 ; Fix two typos in recent changes in the manual
7a74b8c327 C Mode: Don't fontify foo globally as type due to "struct...
823bf6bdb1 * lisp/rect.el (rectangle--duplicate-right): Fix rectangl...
e339d0080d ; * test/lisp/misc-tests.el (ert): require misc to avoid ...

# Conflicts:
#	lisp/rect.el
2023-07-08 05:46:10 -04:00
Po Lu
dcf0fc2c43 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-08 08:53:55 +08:00
Stefan Monnier
3710178024 * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Fix bug#64232 2023-07-07 12:09:50 -04:00
Eli Zaretskii
65c90040eb Revert "Use 'emacs-lisp-compilation-mode' in native compilation buffers"
This reverts commit 40492581f9.
It caused a recursive-load error when native-compiling files.
(Bug#64391)
2023-07-06 18:00:05 +03:00
Eli Zaretskii
40492581f9 Use 'emacs-lisp-compilation-mode' in native compilation buffers
* lisp/emacs-lisp/comp.el (comp-log-to-buffer)
(comp-run-async-workers): Use 'emacs-lisp-compilation-mode' in the
buffers where we log the results of native compilation.  Suggested
by No Wayman <iarchivedmywholelife@gmail.com>.  (Bug#64452)
2023-07-06 11:50:41 +03:00
Po Lu
af8232a150 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-06 08:34:26 +08:00
Stefan Monnier
26f31fe3b5 * lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Fix bug#64459 2023-07-05 11:37:28 -04:00
Robert Pluim
c3fefb2b3a Improve natnump shortdoc
* lisp/emacs-lisp/shortdoc.el (number): Make it clear that zero
satisfies 'natnump'.  Move 'natnump' next to 'cl-plusp' to highlight
the difference between them.
2023-07-04 17:44:43 +02:00
Po Lu
61a38b470d Merge remote-tracking branch 'origin/master' into feature/android 2023-07-03 08:05:55 +08:00
Mattias Engdegård
59a350cb91 Warn about misplaced :success in condition-case (bug#64404)
* lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case):
Warn if :success is part of a list of conditions (it must come alone).
2023-07-02 11:53:36 +02:00
Po Lu
2baf2c5fd9 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-02 08:26:54 +08:00
Eli Zaretskii
3ba9f9657f Merge from origin/emacs-29
edd36786e1 ; * lisp/bookmark.el (bookmark-bmenu-locate): Doc fix (bu...
16eac20a5d ; Fix last change
ab8d0f7b76 Add project command entries to the menu-bar
fc6099bf04 ; Improve documentation of text-property-search-* functions
cc660bd265 ; * etc/PROBLEMS: Mention MinGW problems with -D_FORTIFY_...
a5bd9fb8c4 ; Improve doc strings in register.el
0be18d8097 ; Fix @xref in last change to doc/emacs/regs.texi.
624c779517 ; Fix tree-sitter C binding typos in Elisp manual.
16e9bdff4f Improve documentation of registers
2023-07-01 06:30:00 -04:00
Eli Zaretskii
e45ddf2fdc Merge from origin/emacs-29
4df510c7a7 Fix VC package build when doc file isn't in a subdir
382f5fa813 ; * doc/emacs/package.texi (Fetching Package Sources): Fi...
fc7e7c3fde Fix type check in tramp-get-buffer-string
2aa57fe6cf ; Fix typo in maintaining.texi (bug#64279)
2023-07-01 06:29:43 -04:00
Eli Zaretskii
fc6099bf04 ; Improve documentation of text-property-search-* functions
* doc/lispref/text.texi (Property Search): Improve wording and markup.

* lisp/emacs-lisp/text-property-search.el (text-property-search-forward)
(text-property-search-backward): Doc fixes.  (Bug#64367)
2023-07-01 12:28:33 +03:00
Po Lu
df761843f0 Merge remote-tracking branch 'origin/master' into feature/android 2023-06-29 08:28:41 +08:00
Stefan Monnier
dcd9209095 * lisp/emacs-lisp/cl-macs.el (cl--slet): Fix bug#64315 2023-06-28 09:24:30 -04:00
Po Lu
8f87af4237 Merge remote-tracking branch 'origin/master' into feature/android 2023-06-28 08:29:27 +08:00
Stefan Monnier
82875b1575 cl-macs-tests.el (cl-&key-arguments): Fix regression
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Turn "cannot use
lexical var" errors into warnings.
Make the obey `with-suppressed-warnings`.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
Suppress warnings.
2023-06-27 16:14:32 -04:00
Po Lu
259bec95de Merge remote-tracking branch 'origin/master' into feature/android 2023-06-26 08:16:23 +08:00
Daniel Semyonov
4df510c7a7 Fix VC package build when doc file isn't in a subdir
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Expand 'file' before attempting to get its directory.  (Bug#64242)
2023-06-25 23:33:24 +02:00
Stefan Monnier
4c50af02ab cl-macs.el: Silence recent new "lexical arg shadows" warnings
* lisp/emacs-lisp/cl-macs.el (cl--slet): Add `nowarn` arg.
(cl--defsubst-expand): Use it.
(cl-defstruct): Silence warnings abour lexical shadowing when a slot's
name happens to be the same as a dynbound var.
2023-06-25 11:38:40 -04:00
Stefan Monnier
0228421e34 Allow suppressing the "lexical arg shadows dynbound var" warning
In most cases the right way to fix this warning is by renaming
the offending argument, but in some cases this is inconvenient, as is
the case in `cl-defstruct` where arg names are imposed by slot names.

This patch also happens to fix a few bugs along the way:
- miscompilation of (lambda (gcs-done) (lambda (x) (+ x gcs-done)))
- errors about void function `byte-compile-warn-x` if the warning was
  emitted via `cconv-fv` when bytecomp was not loaded.
Oh, and it improves the warning by making the location info slightly
more precise.

* lisp/emacs-lisp/cconv.el (cconv--analyze-function): Remove this warning.
* lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list):
Warn about it here instead.  Let `with-suppressed-warnings` control it
under `lexical`.
2023-06-25 11:14:03 -04:00
Po Lu
7b5d32fa87 Merge remote-tracking branch 'origin/master' into feature/android 2023-06-25 08:16:34 +08:00
Stefan Monnier
e85ebb3d82 (macroexp--unfold-lambda): Obey the lexbind semantics
While at it, rework the code so as not to rely on an
intermediate rewriting of (funcall (lambda ..) ...)
to ((lambda ..) ...) since that forms is deprecated.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-funcall): Unfold lambdas
instead of turning them into the deprecated ((lambda ..) ..).
(byte-optimize-form-code-walker): Don't unfold ((lambda ..) ..) any more.
(byte-compile-inline-expand): Revert to non-optimized call if the unfolding
can't be optimized.

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Don't unfold
((lambda ..) ..) any more.

* lisp/emacs-lisp/cl-macs.el (cl--slet): Remove workaround.

* lisp/emacs-lisp/disass.el (disassemble): Make sure the code is
compiled with its own `lexical-binding` value.

* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda): Make it work
both for ((lambda ..) ..) and for (funcall #'(lambda ..) ..).
Be careful not to move dynbound vars from `lambda` to `let`.
(macroexp--expand-all): Unfold (funcall #'(lambda ..) ..) instead of
turning it into ((lambda ..) ..).  Don't unfold ((lambda ..) ..) any more.
2023-06-24 17:53:41 -04:00
Stefan Monnier
f559bd1248 * lisp/emacs-lisp/cl-macs.el (cl--slet): Unbreak bootstrap 2023-06-24 11:44:32 -04:00
Eli Zaretskii
8e8667246a Merge from origin/emacs-29
d0147ff9e5 * lisp/emacs-lisp/shortdoc.el: More and better `substring...
fa06249a9f Fix "C-x RET r" when the new encoding is UTF
679e9d7c56 ; Mention MinGW64 GCC 13.1 problems in PROBLEMS
fdc1a12ed1 Fix "vc-print-log does not erase buffer" and associated p...
d507aa7336 Add selector_expression indentation rule
1f664a0af7 Add "nixd" LSP server to Eglot
e962cf4ba7 Fix building --with-native-compilation=aot from release t...
4ca371e9cc Fix bug#64152 (Minibuffer sometimes goes "modal")
a0ccf1859c Disable target-async by default in gdb-mi.el
2bad5829ff Revert "Fix parsing of dn line if WITHDN is non-nil"
7637e361d3 Don't truncate filenames with "emacs.el" in them
2591eb1190 Improve documentation of 'minibuffer-message'
6f211bc57b Eglot: again fix positions of coinciding inlay hint overl...
a24e9e3fee ; Update ChangeLog.4 and etc/AUTHORS.
2023-06-24 07:13:42 -04:00
Eli Zaretskii
5fa9458511 Merge from origin/emacs-29
8f62e7b85f Describe primarily the Emacs s-exp dialect for treesit qu...
eacd75df4e ; Improve documentation of overlay priorities
b3f11e94fa Fix documentation of :predicate in 'define-globalized-min...
2023-06-24 06:57:25 -04:00
Mattias Engdegård
d0147ff9e5 * lisp/emacs-lisp/shortdoc.el: More and better substring examples.
Suggested by Juri Linkov.
2023-06-24 12:27:08 +02:00
Po Lu
f5d142f663 Merge remote-tracking branch 'origin/master' into feature/android 2023-06-24 09:20:14 +08:00
Stefan Monnier
e2ee646b16 cl-defsubst: Use static scoping for args
* lisp/emacs-lisp/cl-macs.el (cl--slet): New function, partly extracted
from `cl--slet*`.
(cl--slet*): Use it.
(cl--defsubst-expand): Use it to fix bug#47552.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct-dynbound-label):
New test.
2023-06-23 11:37:12 -04:00