Commit graph

9884 commits

Author SHA1 Message Date
Eli Zaretskii
4a1f2053cd ; Avoid byte-compiler warning in package.el
* lisp/emacs-lisp/package.el (lm-package-needs-footer-line): Declare.
2024-07-07 08:51:16 +03:00
Po Lu
247b88e5c5 Merge from savannah/emacs-30
48f4c9cbbc ; Reflow "Commentary" in lisp-mnt.el
22155753a4 ; * lisp/emacs-lisp/comp-run.el (native--compile-async): ...
235b9e85a6 package-buffer-info: Move 'require' earlier
2024-07-07 10:23:08 +08:00
Stefan Kangas
48f4c9cbbc ; Reflow "Commentary" in lisp-mnt.el
* lisp/emacs-lisp/lisp-mnt.el: Reflow "Commentary" section.
2024-07-06 19:35:28 +02:00
Eli Zaretskii
22155753a4 ; * lisp/emacs-lisp/comp-run.el (native--compile-async): Improve warning. 2024-07-06 20:32:49 +03:00
Stefan Kangas
d826240fa5 checkdoc: Relax footer line check for recent Emacs
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't require a footer line unless 'lm-package-needs-footer-line'
returns true.
2024-07-06 19:00:19 +02:00
Stefan Kangas
3cde006699 Make lm-homepage into an obsolete alias for 'lm-website'
* lisp/emacs-lisp/lisp-mnt.el (lm-homepage): Make into an obsolete
function alias for 'lm-website'.
2024-07-06 18:57:37 +02:00
Stefan Kangas
af21ac1665 Make lm-verify obsolete in favor of checkdoc
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Make obsolete in favor
of checkdoc.
2024-07-06 18:57:37 +02:00
Stefan Kangas
c302c5fab0 Add new function lm-package-needs-footer-line
* lisp/emacs-lisp/lisp-mnt.el (lm-package-needs-footer-line):
Factor out new function...
* lisp/emacs-lisp/package.el (package-buffer-info): ...from here.
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm-tests--lm-package-needs-footer-line/empty-dependencies)
(lm-tests--lm-package-needs-footer-line/old-version)
(lm-tests--lm-package-needs-footer-line/new-version):
New tests.
2024-07-06 18:57:37 +02:00
Stefan Kangas
235b9e85a6 package-buffer-info: Move 'require' earlier
* lisp/emacs-lisp/package.el (package-buffer-info):
Move 'require' earlier, before it is needed.
2024-07-06 15:22:20 +02:00
Eli Zaretskii
38ce85c547 Merge from origin/emacs-30
f910514721 Fix treesit range rule for jsdoc
de3fa00a61 Fix documentation of 'balance-windows'
c986387c79 nnatom: Ensure some parsed values are one line
2fb6a98ecf nnfeed: (Mostly) fix group descriptions
74b82e6802 Eglot: support deprecated MarkedString (bug#71353)
a6a588ccf1 ; * doc/lispref/strings.texi (Creating Strings): Followup...
a3e57a29be ; Fix doc string of 'string-fill'
1b5cf29431 Fix returning to original TTY frame after 'rmail-reply'
814710067f Improve warnings from native compiler
cefec59df7 Document adding package dependency on Emacs version
d190cb0e88 Fix file-name detection in Dired under -F
2024-07-06 07:42:51 -04:00
Eli Zaretskii
a3e57a29be ; Fix doc string of 'string-fill'
* lisp/emacs-lisp/subr-x.el (string-fill): Rename LENGTH to WIDTH
and update the doc string accordingly.  (Bug#71856)
2024-07-06 11:28:39 +03:00
Eli Zaretskii
814710067f Improve warnings from native compiler
* src/comp.c (syms_of_comp) <native-compiler>: Rename from 'comp'.

* src/lread.c (maybe_swap_for_eln):
* lisp/emacs-lisp/comp.el (comp--fwprop):
* lisp/emacs-lisp/comp-run.el
(comp--accept-and-process-async-output, native--compile-async):
Adjust to the new symbol.
2024-07-05 22:00:08 +03:00
Po Lu
507a13f5a1 Merge from savannah/emacs-30
334d513220 (edebug--called-interactively-skip): Fix bug#71934
6e8b9ccaec ; * lisp/ibuffer.el (ibuffer-mode): Doc fix.
3eaf1abbff Fix MS-Windows build with native-compilation
fc375359ed Tag dbus-test05-register-signal-with-nils as unstable
99230d7080 ; * src/w32fns.c (funhook): Restore mistakenly lost line.
81a7358a33 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b085d68396 Fix treesit test (bug#71907)
f39cf0beb7 Focus more on MS-Windows than MS-DOS in FAQ
d64396b8e4 Autoload some string functions
bd482b745a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b534183135 * etc/NEWS: Fix typos.
850fc68481 ; (grep-read-files): Fix completion table
2853259935 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
921d40759e Remove a reference to a non-existant variable from a doc-...
5d2a115ab0 ; * src/fns.c (value_cmp): ASCIIfy.
2024-07-05 10:05:23 +08:00
Stefan Monnier
334d513220 (edebug--called-interactively-skip): Fix bug#71934
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip):
Adjust to new interpreted functions.
2024-07-04 11:47:01 -04:00
Stefan Kangas
d64396b8e4 Autoload some string functions
These functions are documented in both `(elisp) Creating Strings' and
'M-x shortdoc RET string RET', so users will expect them to be available
without having to require 'subr-x'.

* lisp/emacs-lisp/subr-x.el (string-fill, string-limit, string-pad)
(string-chop-newline): Autoload.
2024-07-03 02:08:19 +02:00
Po Lu
e2561e267f Merge from savannah/emacs-30
72cf9964f3 Inaccuracy in efaq.texi
fc48e9e8ed ; Fix typos in DOS Makefile scripts
9b8d754579 ; * etc/NEWS: Explain Nextstep.
8819e5a45d Fix treesit crash (bug#71681)
eaf2dc96c1 ; Fix SHR test on MS-Windows
57880f597c Delete redundant mention of `with-eval-after-load'
ea8ce98434 * doc/misc/efaq.texi (New in Emacs 30): Fix typos.
45a20d781a ; Fix typos in symbols
d95f039af4 Document security fixes in FAQ
d063af203c Add "New in Emacs 30" to FAQ
ca6b484162 ; * etc/NEWS: Move "Minibuffer and Completions"
35c46663e4 ; * etc/NEWS: Move item to "Lisp Changes".
0515b38d28 ; * etc/NEWS: Move keyboard macro items closer together.
22af3a7103 ; * etc/NEWS: More copy-edits.
000ef8876a ; * etc/NEWS: Move items to "Incompatible Lisp Changes".
4088dc8e4c ; * etc/NEWS: Rearrange "Incompatible Lisp Changes".
179800f36b ; * lisp/epg.el (epg--start): Add commentary about encoding.
73898f0214 Fix non-ASCII filename operatiion on EasyPG (bug#71500)
a65b6aac6b Silence warning with global minor mode :predicate
f5f7343ac4 ; * etc/NEWS: Move an item to "Startup Changes"
c95066bf18 ; * etc/NEWS: Move some Lisp items to better place.
bf7db88ce1 ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1"
000424eb9e ; * etc/NEWS: Make touch screen support more prominent.
5b5671587f ; * etc/NEWS: Rearrange "Changes in Emacs 30.1".
31124abdef ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777).
44f269d6e6 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards
358085997c Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
5f3d964e39 Update to Transient v0.7.2-4-gf75bc48d

# Conflicts:
#	etc/NEWS
2024-06-30 10:06:09 +08:00
Stefan Kangas
45a20d781a ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
Stefan Kangas
a65b6aac6b Silence warning with global minor mode :predicate
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Silence byte-compiler warning when :predicate is used.
2024-06-29 14:39:35 +02:00
Po Lu
c4709d6bcd Merge from origin/emacs-30
2d8881d526 Fix typo incurring leaks of face structures
219501dd62 ; Fix use of @footnote in cc-mode.texi
c7be2dcac4 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
f0a4879975 Sync with Tramp 2.7.1
53dcf2b949 ; * etc/NEWS: Move the mwheel entry to a better place.
a5726782d0 ; Sort tree-sitter modes in NEWS
daa89dc939 ; * etc/NEWS: Rearrange "New Modes and Packages in Emacs ...
4ddbf4f70e ; * etc/NEWS: Move many items.
437b1ced26 ; * etc/NEWS: Copy-edits.
7372b2eb30 Expand docstring of which-key-mode
df0eb5be1e Improve documentation of 'remove-overlays' in ELisp manual
73c1252bb6 Fix link to major mode variable in docstring
c4ad54812a Make `shell-mode' more robust

# Conflicts:
#	etc/NEWS
2024-06-29 20:04:05 +08:00
Jules Tamagnan
d3b100d419 Flag checkdoc-package-keywords-flag as a :safe variable
* lisp/emacs-lisp/checkdoc.el: Mark 'checkdoc-package-keywords-flag'
as a safe local variable.  (Bug#71812)
2024-06-29 05:32:49 +02:00
Stefan Kangas
73c1252bb6 Fix link to major mode variable in docstring
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Fix link to
major mode variable in docstring.  (Bug#71815)
2024-06-28 12:18:04 +02:00
Po Lu
c4ec905c9a Correct ommissions in rmc.el
* lisp/emacs-lisp/rmc.el (touch-screen-scroll)
(touch-screen-pinch): Declare functions.
(read-multiple-choice--short-answers): Call the same functions
directly and prevent the on-screen keyboard from being
deactivated immedately before it is reopened.
2024-06-28 14:44:28 +08:00
Mattias Engdegård
923aad81d4 Don't hide not and null arity errors
* lisp/emacs-lisp/byte-opt.el (byte-optimize-not):
Don't silently convert incorrect `not` and `null` applications to nil.
2024-06-17 13:14:08 +02:00
Po Lu
6aa5068ac7 Improve treatment of touch screen input by rmc and its callers
* lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers):
Run touch screen event translation on touch screen events
received, and respond to pinch, tap and scrolling gestures.

* lisp/net/nsm.el (nsm-query-user): Disable use-dialog-box in
the details window.

* lisp/touch-screen.el (touch-screen-translate-touch): Autoload.
2024-06-17 17:45:48 +08:00
Philip Kaludercic
1980624816 Add new command 'package-vc-log-incoming'
* lisp/emacs-lisp/package-vc.el (package-vc-log-incoming):
Implement it.
* etc/NEWS: Mention it.
2024-06-09 12:39:47 +02:00
Stefan Monnier
e9a0256a55 (pcase--app-subst-match): Try and fix performance regression (bug#71398)
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match): Optimize matches
against (quote VAL).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Add new test case.
2024-06-08 17:34:56 -04:00
Juri Linkov
9cd182dae8 * lisp/buff-menu.el (Buffer-menu-group-sort-by): New defcustom.
(list-buffers--refresh): Use Buffer-menu-group-sort-by instead of the
hard-coded function (bug#70150).
(Buffer-menu-group-sort-alphabetically): New function as an option for
'Buffer-menu-group-sort-by'.
(list-buffers-noselect): Remove setting	outline-minor-mode-use-buttons
to 'in-margins' that it not required for this feature to work correctly.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-groups-sort):
Add optional argument 'level'.
2024-06-07 19:57:07 +03:00
Mattias Engdegård
32bfc825a7 Format string warnings for more functions (bug#71379)
* lisp/emacs-lisp/bytecomp.el (byte-compile-format-like):
Add message-box, message-or-box, warn and user-error.
2024-06-06 10:10:16 +02:00
Juri Linkov
ec8c0b0d0d Allow multi-level outlines in tabulated-list-groups used by list-buffers
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-groups)
(tabulated-list-groups-categorize, tabulated-list-groups-sort)
(tabulated-list-groups-flatten): New functions (bug#70150).

* lisp/buff-menu.el (Buffer-menu-group-by): Change type from a function
to a list of functions.
(list-buffers--refresh): Use the function 'tabulated-list-groups' where
:path-function uses a list of functions from 'Buffer-menu-group-by', and
:sort-function is hard-coded to sort groups by name.
(Buffer-menu-group-by-mode, Buffer-menu-group-by-root): Remove prefix "*".
2024-06-05 20:07:28 +03:00
Paul Eggert
3dcac22dd4 Spelling fixes 2024-06-04 22:16:28 -07:00
Stefan Monnier
16fc5b6c0c pcase.el (\`): Try and handle large patterns better
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html

* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
2024-06-03 13:40:39 -04:00
Andrea Corallo
2ae6451ec1 Add 'message' to 'comp-primitive-type-specifiers'
* lisp/emacs-lisp/comp-common.el (comp-primitive-type-specifiers): Add
message.
2024-06-03 17:55:16 +02:00
Andrea Corallo
e39e96c9b9 * lisp/emacs-lisp/comp.el (native-compile): Type declare. 2024-06-03 17:55:16 +02:00
Stefan Monnier
436b344be3 track-changes.el: Keep a bit more info when logging an error
* lisp/emacs-lisp/track-changes.el (track-changes--recover-from-error):
Add arg `info`.
(track-changes-fetch, track-changes--after): Use it to preserve a bit
more information about errors.
2024-05-30 19:00:23 -04:00
Stefan Monnier
2e16bcd8ed ad-activate-advised-definition: Use proper function objects
* lisp/emacs-lisp/advice.el (ad-activate-advised-definition):
Use interpreted functions rather than lambda lists.
2024-05-30 18:57:56 -04:00
Davide Pola
fd61cf3976 Rename comp-run.el and comp-cstr.el private functions
* lisp/emacs-lisp/comp-run.el (native-compile-async-skip-p)
(comp-async-runnings, comp-effective-async-max-jobs)
(comp-accept-and-process-async-output, comp-run-async-workers)
(comp-trampoline-search): rename using '--' separator convention for
private functions.
* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-copy, comp-cstrs-homogeneous, comp-split-pos-neg)
(comp-normalize-valset, comp-union-valsets)
(comp-intersection-valsets, comp-normalize-typeset)
(comp-union-typesets, comp-intersect-two-typesets)
(comp-intersect-typesets, comp-range-union)
(comp-range-intersection, comp-range-negation, comp-cstr-add-2)
(comp-cstr-sub-2, comp-cstr-union-homogeneous-no-range)
(comp-cstr-union-homogeneous, comp-cstr-union-1-no-mem)
(comp-cstr-union-1, comp-cstr-union-make)
(comp-cstr-intersection-make): Likewise.
2024-05-29 17:43:23 +02:00
Stefan Monnier
fde8dc9287 Redirect calls to subr-native-elisp-p to native-comp-function-p
* test/src/comp-tests.el (comp-tests-bootstrap, lambda-return)
(lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1)
(compile-forms, comp-test-defsubst, primitive-redefine-compile-44221)
(48029-1, 61917-1, tco, fw-prop-1, pure):
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun):
* lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file):
* lisp/help-fns.el (find-lisp-object-file-name):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/emacs-lisp/comp.el (comp--call-optim-form-call):
* lisp/emacs-lisp/comp-run.el (comp-warn-primitives):
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p`
to `native-comp-function-p`.
2024-05-28 20:53:25 -04:00
Stefan Monnier
1a1170cde7 Rename subr-native-elisp to native-comp-function (bug#71123)
Now that this type name is displayed in *Help*, it is more
important to use a name that is less weird for the unsuspecting user.

* lisp/emacs-lisp/cl-preloaded.el (cl-functionp): Adjust to new name of
native function's type.
(subr-native-elisp-p): Redefine as an obsolete alias.
(native-comp-function): Rename from `subr-native-elisp`

* src/data.c (Fcl_type_of): Return `Qnative_comp_function` i.s.o
`Qsubr_native_elisp`.
(Fnative_comp_function_p): Rename from `Fsubr_native_elisp_p`.
(syms_of_data): Adjust accordingly.

* src/doc.c (Fsubr_documentation): Use new `Fnative_comp_function_p` name.
2024-05-28 20:52:40 -04:00
Andrea Corallo
509e7f877b * Rework 'comp-normalize-valset' (bug#71116)
* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Rework to
improve consistency.
2024-05-27 20:41:06 +02:00
Michael Heerdegen
804f36d5ab Don't let pp fall back to prin1 for conses
* lisp/emacs-lisp/pp.el (pp--insert-lisp): Don't `prin1' non-list
conses; use our pp function for cons and list printing
`pp--format-list' instead.
2024-05-27 19:51:39 +02:00
Michael Heerdegen
3580dc155c Don't try to pretty-print non-lists as binding list
* lisp/emacs-lisp/pp.el (pp--format-definition): Ensure that what we try
to print as a list of bindings has an appropriate format.  This avoids
raising an error for SEXPs like (let X Y) inside `pcase' forms where our
heuristic expects a binding list in the X position.
2024-05-27 18:44:48 +02:00
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
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
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
Andrea Corallo
931663f123 Silence 3 warnings for non sqlite builds
* lisp/emacs-lisp/multisession.el (sqlite-commit)
(sqlite-transaction, sqlite-rollback): Declare.
2024-05-19 14:54:10 +02:00
Joost Kremers
4f27d763bb Make 'vtable-insert-object' more versatile
* lisp/emacs-lisp/vtable.el (vtable-insert-object): Rename
argument AFTER-OBJECT to LOCATION; allow use of index to
refer to the insertion position; add argument BEFORE.
(Bug#70664).

* etc/NEWS:
* doc/misc/vtable.texi (Interface Functions): Document the
change.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable-insert-object): New test.
2024-05-18 11:52:33 +03:00
Stefan Monnier
acfb2c6163 (describe-package-1): Handle (nil . "string") in :maintainer
* lisp/emacs-lisp/package.el (describe-package-1): Refine the
check to distinguish the old single-maintainer format from the
new multi-maintainer format.  (bug#69712)
2024-05-16 11:04:50 -04:00
Andrea Corallo
1b622ff66e * Fix bootstrap with checking enabled
* lisp/emacs-lisp/comp.el (comp--limplify-top-level): Set function
safety.
2024-05-16 07:53:48 +02:00
Andrea Corallo
b87670b564 * Allow for optional function name parameter in 'ftype' declaration
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Allow for
optional function name parameter in 'ftype' declaration.
2024-05-14 11:17:25 +02:00