Commit graph

9505 commits

Author SHA1 Message Date
Eli Zaretskii
050086931a Merge from origin/emacs-29
196def4fa6 Fix description of 'Package-Requires' library header
c177843279 ; * doc/misc/tramp.texi (FUSE setup): Fix typo.
a64336cbb9 * lisp/emacs-lisp/cl-lib.el (cl--defalias): Improve&fix d...
da8b85b577 Add two docstrings in cl-lib.el
2023-11-04 05:21:39 -04:00
Andrea Corallo
6218278a67 * lisp/emacs-lisp/comp-cstr.el (comp--direct-supertype): Remove unused. 2023-11-03 19:03:51 +01:00
Mattias Engdegård
425d23fbea Suggest alternative reason for ERT test duplication error
* lisp/emacs-lisp/ert.el (ert-set-test):
Amend error message; maybe the redefinition was caused by a file
loaded twice (bug#66782).

Suggested by Xiyue Deng.
2023-11-03 18:06:04 +01:00
Stefan Monnier
fc8d225328 * lisp/emacs-lisp/oclosure.el (oclosure--lambda): Burp in dynbind mode
The "fixes" bug#66867.
2023-11-02 23:12:27 -04:00
Jeremy Bryant
445029da58 Add two docstrings in cl-macs.el
* lisp/emacs-lisp/cl-macs.el (cl--simple-exprs-p)
(cl--const-expr-p): Add docstrings
2023-11-01 08:10:24 -04:00
Stefan Monnier
b93f931e9e lisp/emacs-lisp/comp-cstr.el: Fix bootstrap
* lisp/emacs-lisp/comp-cstr.el: Remove redundant require of `cl-macs`
and add missing require of `cl-extra`.

* lisp/emacs-lisp/cl-generic.el: Improve warning message.
* lisp/emacs-lisp/cl-extra.el (cl--print-table): Remove redundant arg.
2023-10-31 19:20:58 -04:00
Stefan Monnier
5f371ca07b * lisp/emacs-lisp/comp.el: Remove redundant requires 2023-10-31 12:24:51 -04:00
Stefan Monnier
a64336cbb9 * lisp/emacs-lisp/cl-lib.el (cl--defalias): Improve&fix docstring 2023-10-30 18:50:47 -04:00
Jeremy Bryant
da8b85b577 Add two docstrings in cl-lib.el
* lisp/emacs-lisp/cl-lib.el (cl--set-buffer-substring)
(cl--defalias): Add docstrings.  (Bug#66828)
2023-10-30 13:41:19 +02:00
Mattias Engdegård
0d452d61d0 ; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use. 2023-10-30 11:48:04 +01:00
Stefan Monnier
bdec2d2d46 comp-cstr.el: The type hierarchy is a DAG, not a tree
Adjust the type operations to account for the fact that types can have
several parents.

* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy):
Use `cl--class-allparents`.  Add FIXME.
(comp--direct-supertype): Declare obsolete.
(comp--direct-supertypes): New function.
(comp--normalize-typeset0): Rewrite to use `comp--direct-supertypes`;
adjust to account for the DAG structure; use `cl-set-difference`.
(comp--direct-subtypes): Rewrite.
(comp--intersection): New function.
(comp-supertypes): Rewrite and change return type.
(comp-subtype-p): Simplify.
(comp-union-typesets): Use `comp-supertypes` instead of iterating over
`comp-cstr-ctxt-typeof-types`.
* lisp/emacs-lisp/comp.el (comp--native-compile): Don't catch
errors if we're debugging.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Adjust tests.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix mishap when we
evaluate (cl-defstruct cl-structure-object ..) during the compilation
of `cl-preloaded.el`.
* lisp/emacs-lisp/cl-preloaded.el: Add corresponding assertion.
2023-10-30 00:59:19 -04:00
Stefan Monnier
b27e2bbb34 Use OClosure to drop advice--buffer-local-function-sample hack
* lisp/emacs-lisp/nadvice.el (advice--forward): New OClosure, to
replace `advice--buffer-local-function-sample`.
(advice--set-buffer-local, advice--buffer-local): Adjust accordingly.
2023-10-29 14:12:22 -04:00
Michael Albinus
54c9467a99 Merge from origin/emacs-29
5f60913208 Fix State button for customize-icon (Bug#66635)
27c71979ff ; Another Texinfo fix
889a550ca0 ; Fix Texinfo warnings
893c344b4e Fix the use of adaptive-fill-regexp in treesit indent preset
1098c114b7 Fix treesit-install-language-grammar (bug#66673)
491ee428c0 Fix treesit-explore-mode (bug#66431)
ee043a2703 tsx-ts-mode--font-lock-compatibility-bb1f97b: Re-fix the ...
2023-10-27 15:28:43 +02:00
Dmitry Gutov
70e25298f1 Tweak the DOI URL and the description
* lisp/emacs-lisp/smie.el: Use a friendlier (HTTPS) DOI URL.  And
fix the year in the description.
2023-10-26 02:39:12 +03:00
Mauro Aranda
5f60913208 Fix State button for customize-icon (Bug#66635)
* lisp/cus-edit.el (custom-icon-action): New function.
(custom-icon): Use it as the :action.  Otherwise, clicking the State
button is a noop.  Remove irrelevant stuff from the docstring and
comment out some copy-pasta.
(custom-icon-extended-menu): New variable, the menu to show upon
:action.
(custom-icon-set): Really redraw the widget with the new settings.
Comment out strange call to custom-variable-backup-value.
(custom-icon-save): New function.

* lisp/emacs-lisp/icons.el (icons--merge-spec): Fix call to plist-get
and avoid infloop.
2023-10-22 18:39:52 +02:00
Mattias Engdegård
a3db503351 Move lexical-binding warning from checkdoc to byte-compiler
This warning is much more appropriate for the compiler, since lexical
binding affects what it can reason and warn about, than for checkdoc
as the warning has no bearing to documentation at all.
The move also improves the reach of the warning.

* etc/NEWS: Update.
* lisp/emacs-lisp/checkdoc.el (checkdoc-lexical-binding-flag)
(checkdoc-file-comments-engine): Move warning from here....
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): ...to here.
* test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el:
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals)
(bytecomp-tests-function-put, bytecomp-tests--not-writable-directory)
(bytecomp-tests--target-file-no-directory):
Update tests.
(bytecomp-tests--log-from-compilation)
(bytecomp-tests--lexical-binding-cookie): New test.
2023-10-21 15:12:55 +02:00
Eli Zaretskii
a8b14b77ff ; * lisp/emacs-lisp/comp-cstr.el: Fix punctuation. 2023-10-20 15:46:20 +03:00
Stefan Monnier
d7c91d74b6 (cl--typeof-types): Complete last change
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
Add `integer-or-marker` in the hierarchy as well.
2023-10-19 10:21:22 -04:00
Andrea Corallo
a567faf4c2 Add two missing 'number-or-marker' entries to the cl machinery (bug#66615)
Assuming 'number-or-marker' is a type (as present multiple times in
cl--typeof-types) adding some missing entries for coherency.

* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
'number-or-marker' as supertype of 'number' in the 'float' branch.

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add
'number-or-marker'.

* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist):
Update test.

* test/src/comp-tests.el (comp-tests-type-spec-tests): Update two testes.
2023-10-19 13:59:57 +02:00
Andrea Corallo
3e193edd68 Improve cstr typeset normalization
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add four tests.

* lisp/emacs-lisp/comp-cstr.el (comp--sym-lessp)
(comp--direct-supertype, comp--normalize-typeset0): New functions.
(comp-normalize-typeset): Rework to make use of
'comp--normalize-typeset0'.
(comp--direct-subtypes): New function.
2023-10-19 13:58:46 +02:00
Michael Albinus
2071904d51 Merge from origin/emacs-29
07c45f20fd Fix test in files-tests
5d3f3288d2 ; * doc/emacs/search.texi (Regexp Backslash): Improve ind...
9525315c11 Add missing :version to two defcustoms
9044d4d94b Fix a defcustom :type in eldoc.el
8141d73ea7 Document 'M-x align' in the Emacs manual
2023-10-16 09:02:39 +02:00
Stefan Kangas
9525315c11 Add missing :version to two defcustoms
* lisp/emacs-lisp/eldoc.el (eldoc-print-after-edit)
(eldoc-echo-area-prefer-doc-buffer): Add missing custom :version.
2023-10-14 21:00:00 +02:00
Mauro Aranda
9044d4d94b Fix a defcustom :type in eldoc.el
* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-prefer-doc-buffer): Make
:type a choice, to allow for the value 'maybe'.  (Bug##66539)
2023-10-14 20:54:04 +02:00
Mattias Engdegård
1f95f91d85 Simplify and describe docstrings-wide check
* lisp/emacs-lisp/bytecomp.el
(byte-compile--wide-docstring-substitution-len): Remove.
* lisp/emacs-lisp/bytecomp.el (bytecomp--docstring-line-width):
Add back explanatory comments lost in a previous change.
2023-10-14 13:26:20 +02:00
Mattias Engdegård
fbbe40cf50 Make the docstrings-wide check 70x faster
Instead of performing a number of expensive transformations on the
original doc string and then use a dynamically-created regexp to find
wide lines, step through the lines in the unmodified string and only
perform the transformations on lines that exceed the limit.
This is sound because the transformations are contractive.

The new check will usually not cons nor perform any regexp matching.

* lisp/emacs-lisp/bytecomp.el (bytecomp--docstring-line-width): New.
(byte-compile--wide-docstring-p): Cheaper implementation.
2023-10-14 12:15:33 +02:00
Mattias Engdegård
548bc3e3d1 Sort byte compiler warnings in alphabetic order
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types):
Rearrange.  Add a few missing ones.
2023-10-14 10:34:10 +02:00
Jens Schmidt
115a940a4b Fix beginning-of-defun not jumping to BOF
In batch mode or when font-lock and some other niceties are switched
off, function `syntax-ppss' can modify match data held by function
`beginning-of-defun-raw'.  In that case, `beginning-of-defun' can jump
to some seemingly arbitrary position, and not the actual BOF.

* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Save match data
around a call to `syntax-ppss'. (Bug#66218)
2023-10-14 11:01:52 +03:00
Michael Albinus
bbccef3ceb Merge from origin/emacs-29
c8ea14e782 Handle quoted tilde in Tramp
30239759ee ; Set maintainer for elint.el to emacs-devel
eedd9db619 Update to Org 9.6.10

# Conflicts:
#	lisp/net/tramp-gvfs.el
2023-10-13 16:18:06 +02:00
Mattias Engdegård
77daafbb36 Add convenience wrapper for regexp disassembly
* lisp/emacs-lisp/disass.el (re-disassemble): New.
* etc/NEWS: Describe the new function instead of the internal
`re--describe-compiled`.
2023-10-13 15:24:10 +02:00
Mattias Engdegård
a52d627b37 Separate docstrings-wide warning identifier
This allows the docstring line width warning to be disabled without
also disabling the one checking for curly quotes etc.

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile-docstring-style-warn):
Add `docstrings-wide`.
* etc/NEWS: Annonuce.
2023-10-13 14:31:18 +02:00
Stefan Kangas
30239759ee ; Set maintainer for elint.el to emacs-devel
* lisp/emacs-lisp/elint.el: Set maintainer to emacs-devel.
2023-10-12 13:25:31 +02:00
Alan Mackenzie
aa45ea8a33 In cl-prin1, enable raw printing for a byte-compiled function
* lisp/emacs-lisp/cl-print.el (cl-print-compiled): document the
new option `raw'.
(cl-print-object/compiled-function): when cl-print-compiled is
`raw', just print the function using `prin1'.  Apply a button
to this output which, when activated disassembles the function.

* etc/NEWS (cl-print): Add an entry for this new feature.
2023-10-11 13:26:01 +00:00
Joseph Turner
35205f19ca Make package-vc-install-from-checkout NAME argument optional
* lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
Allow nil NAME; update documentation.  (Bug#66393)
2023-10-08 23:29:23 +02:00
Philip Kaludercic
68318dfd16 Do not scrape :ignored-files for dependencies
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): If a file
matches the ignored packages in :ignored-files, do not install any
dependencies it lists.
2023-10-08 23:20:32 +02:00
Eli Zaretskii
1c9ddf3948 Merge from origin/emacs-29
e9b88f61cc Fix a defcustom :type
3216cd9695 Fix pulse-flag :type
2065ab5562 Fix defcustoms in timeclock.el
bdd3013249 ; * lisp/image-mode.el (image-mode-to-text, image-mode-as...
5c2d9ae48e ; * lisp/image-mode.el: Fix typos in doc strings (bug#663...
fa0d3f45ae ; Improve wording of last change
3ef259e28a Improve documentation of `ns-use-proxy-icon`
712505a82b Document assigning libraries to packages in make-tarball.txt
6bdc5cfe38 Doc fix; more consistently refer to "text terminals"
d210d761b1 ; Fix doc strings of overlay-arrow variables
4fd00ff1f7 Fix defcustoms in type-break.el (Bug#66210)
47770b0eca Fix term-scroll-to-bottom-on-output :type
f8bdc8dff0 ; Normalize GNU ELPA :core package statements
63ec6d998d ; * doc/emacs/custom.texi (Early Init File): Improve inde...
a4185f87bd ; Silence macOS 14 warning
d9d6e14a69 ; * lisp/vc/vc.el (vc-next-action): Improve commentary.
d558f38fe5 ; * lisp/emacs-lisp/let-alist.el (let-alist): Fix quoting...
71feee7930 Doc fix in let-alist for keys with nil value
72cc9cf2cd ; Fix typos
2023-10-07 03:46:48 -04:00
Jens Schmidt
86e8f31505 Silence macro expansion during completion at point
* lisp/emacs-lisp/macroexp.el (macroexp-inhibit-compiler-macros): Add
variable.
(macroexp--compiler-macro): Inspect that new variable and, if it is
non-nil, return the input form unchanged.
* lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
messages.  Avoid compiler macros.  (Bug#58148)
2023-10-05 14:00:36 -04:00
Eli Zaretskii
511acc2ed8 ; * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Typo. 2023-10-04 20:04:53 +03:00
Alan Mackenzie
849de5aa1a Correct the `cond' forms in cl-print-string-with-limit
In this function, calling with limit bound to t will cause an
error in any of the cond forms which set print-length, etc.
Correct them!

* lisp/emacs-lisp/cl-print.el (cl-print-string-with-limit):
Amend the doc string.  In the cond forms in the bindings for
print-length, etc., test the value t first.  Amend those for
print-length and print-level also to test for a zero value of
limit.
2023-10-03 10:22:26 +00:00
Stefan Kangas
3df581972f ; Simplify recent change in cl-defstruct
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use bound-and-true-p.
Suggested by Robert Pluim <rpluim@gmail.com>.
2023-10-01 18:45:36 +02:00
Ivan Sokolov
a96dc984dd Sort package-selected-packages on save 2023-10-01 14:25:13 +02:00
Stefan Kangas
f8bdc8dff0 ; Normalize GNU ELPA :core package statements
* lisp/emacs-lisp/let-alist.el:
* lisp/progmodes/project.el: Normalize GNU ELPA :core package
statement.
2023-10-01 01:35:23 +02:00
Stefan Kangas
820deac94b ; Add missing GNU ELPA :core package statements
* lisp/bind-key.el:
* lisp/emacs-lisp/map.el:
* lisp/erc/erc.el:
* lisp/external-completion.el:
* lisp/net/ntlm.el:
* lisp/net/soap-client.el:
* lisp/progmodes/python.el:
* lisp/svg.el:
* lisp/use-package/use-package.el: Add GNU ELPA :core package
statements.
2023-10-01 00:09:05 +02:00
Alan Mackenzie
01229fe009 Stop truncating strings too much in cl-print-string-with-limit
This fixes bug#65680, by introducing a new variable limiting
the length of a printed string, rather than abusing
print-length for that purpose.

* lisp/emacs-lisp/cl-print.el (cl-print-string-length): New
variable.
(cl-print-object <string>, cl-print--string-props): Use
cl-print-string-length rather than print-length here.
(cl-print-string-with-limit): bind cl-print-string-length based
on argument `limit'.  Decrement it by a quarter at each trial
iteration of printing.
2023-09-29 16:14:04 +00:00
Mattias Engdegård
6e4432673c Small clean-up of byte-compile-docstring-style-warn
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Make the code slightly cheaper.  It's still dominated by the
huge cost of `byte-compile--wide-docstring-p`, though.
2023-09-29 17:59:50 +02:00
Mattias Engdegård
5959a28cce Include all in byte-compile-warnings defcustom type
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Let "All" mean `all`, not `t`.
2023-09-29 17:59:50 +02:00
Eli Zaretskii
d558f38fe5 ; * lisp/emacs-lisp/let-alist.el (let-alist): Fix quoting in doc string. 2023-09-29 08:41:42 +03:00
Stefan Kangas
71feee7930 Doc fix in let-alist for keys with nil value
* lisp/emacs-lisp/let-alist.el (let-alist): Clarify that keys with a
nil value will give the same result as if they were missing.
2023-09-29 00:28:28 +02:00
Eshel Yaron
8a635ac849 ; Substitute quotes in obsoletion notice in 'C-h f'
* lisp/help-fns.el (help-fns--obsolete): Substitute quotes in string
arguments to 'obsolete' declarations.

* lisp/emacs-lisp/advice.el (defadvice): Markup symbols in 'obsolete'
declaration.  (Bug#66240)
2023-09-28 21:44:09 +02:00
Alan Mackenzie
6956382033 Revert "Don't use ellipses while cl-printing strings."
This reverts commit 761f8901ff.
2023-09-27 09:54:33 +00:00
Mattias Engdegård
215bfb24dd ; checkdoc.el: remove unnecessary regexp groups
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-next-string):
Remove remains from when the regexp was not written in rx.
2023-09-26 13:33:54 +02:00