Commit graph

7901 commits

Author SHA1 Message Date
Lars Ingebrigtsen
d671cd57c4 Update cl-struct-sequence-type doc string
* lisp/emacs-lisp/cl-macs.el (cl-struct-sequence-type): Fix doc
string to reflect what it does (bug#46523).
2022-06-17 16:48:02 +02:00
Štěpán Němec
a9f17ccce3 ; Fix some doc typos and minor language issues 2022-05-26 10:29:10 +02:00
Lars Ingebrigtsen
5ee959aa87 Add a comment about cl-concatenate
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Add a comment.
2022-04-13 06:11:51 +02:00
Lars Ingebrigtsen
ab2b822b9b Revert "Make cl-concatenate an alias of seq-concatenate"
This reverts commit 78f76fe16e.

The commit made calls to cl-concatenate bug out, since
autoloading defalises doesn't work very well (bug#54901).
2022-04-13 06:11:51 +02:00
Stefan Monnier
4161a36849 cl-generic.el: Fix bug#46722
Fix longstanding bug due to unexpected interference via side-effect.

* lisp/emacs-lisp/cl-generic.el (cl--generic-get-dispatcher):
Copy the `dispatch` arg before storing it into the hash-table.

Backport from `master` (cherrypick from commit 61f8f7f68f).
2022-04-06 14:26:40 -04:00
Lars Ingebrigtsen
3bb01a499b Fix regression in derived-mode-init-mode-variables
* lisp/emacs-lisp/derived.el (derived-mode-init-mode-variables):
Fix regression caused by lexical-binding derived.el (bug#54240).
2022-03-04 16:19:54 +01:00
Raffael Stocker
3a8c3f7abd ; Don't reference obsolete variables in edebug.el
* lisp/emacs-lisp/edebug.el (edebug-mode, edebug-eval-mode):
Don't reference obsolete variables in the doc strings.
(Bug#54070)
2022-02-20 17:50:45 +02:00
Andrea Corallo
69e82968d7 Fix integer arithmetic miss-compilation (bug#53451)
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm):
When one of the two sources is negated revert to set dst as
number.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to
verify this is effective.
2022-02-09 17:58:57 +01:00
Lars Ingebrigtsen
c5b0019e10 Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

Do not merge to master.
2022-01-26 15:03:56 +01:00
Lars Ingebrigtsen
ed18d08f6f Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

Do not merge to master.
2022-01-26 15:03:33 +01:00
Sergey Vinokurov
fbc9b121e0 Fix memory-report-object-size to initialize memory-report--type-size
* lisp/emacs-lisp/memory-report.el (memory-report-object-size):
Allow using function directly (bug#53310).

Do not merge to master.
2022-01-21 12:43:19 +01:00
Andrea Corallo
9e64aeff40 * Fix native comp for non trivial function names (bug#52833)
* lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation
for functions with function names containing non trivial
characters (bug#52833).

This commit is the backport of e7699bf290.

Do not merge to master
2022-01-17 11:54:52 +01:00
Philipp Stephani
34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068).
* lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug specification.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-inline): New unit
test.
2022-01-13 13:52:40 +01:00
Mattias Engdegård
22ddd2ba13 Revert "Fix closure-conversion of shadowed captured lambda-lifted vars"
This reverts commit 3ec8c8b3ae.

It was committed to a stable branch without prior discussion;
see bug#53071.
2022-01-12 20:23:09 +01:00
Mattias Engdegård
3ec8c8b3ae Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).

Reported by Paul Pogonyshev.

* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.

(cherry picked from commit 45252ad8f9)
2022-01-12 16:51:01 +01:00
Eli Zaretskii
99a9b545f0 Revert "Remove the filename argument from the command line after an ELC+ELN build"
This reverts commit ffc047c896.

Please don't install anything non-trivial on the release branch
without asking first.
2022-01-10 20:02:39 +02:00
Alan Mackenzie
ffc047c896 Remove the filename argument from the command line after an ELC+ELN build
This fixes bug #53164.  Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.
2022-01-10 17:05:41 +00:00
Eli Zaretskii
e28849eb02 Revert "Fix alignment on font size change in tabulated-list-mode"
This reverts commit 2767c89db7.

That change caused a regression in a much more important use
case, see bug#53133.
2022-01-09 12:38:26 +02:00
Eli Zaretskii
4c724af1e3 ; * lisp/emacs-lisp/package.el (package-native-compile): Fix doc wording. 2022-01-09 10:25:36 +02:00
Stefan Kangas
30f1bdb41f Clarify docstring of package-native-compile
* lisp/emacs-lisp/package.el (package-native-compile): Clarify
docstring.
2022-01-09 03:18:38 +01:00
Philipp Stephani
c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require 2022-01-05 01:41:46 +01:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
fef3e60061 * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Minor doc fix. 2021-12-04 13:23:35 +01:00
Lars Ingebrigtsen
a6905e90cc Fix problem with temp buffer killing in package-install-file
* lisp/emacs-lisp/package.el (package-install-file): Allow killing
the temporary buffer without querying (bug#51769).
2021-11-12 04:44:09 +01:00
Eli Zaretskii
20ebd91a73 Improve documentation of string truncation APIs
* doc/lispref/display.texi (Size of Displayed Text):
* lisp/international/mule-util.el (truncate-string-to-width):
Document caveats of using 'truncate-string-to-width' when
character composition is involved.

* lisp/emacs-lisp/subr-x.el (string-limit):
* doc/lispref/strings.texi (Creating Strings): Improve the
documentation of 'string-limit'.
2021-10-30 10:26:38 +03:00
Lars Ingebrigtsen
91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el 2021-10-29 14:37:08 +02:00
Martin Rudalics
d2849cc645 Fix 'calculate-lisp-indent' when "[" starts containing sexp (Bug#51312)
* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Handle
arbitrary paren syntax after skipping whitespace backwards within
containing sexp (Bug#51312).
2021-10-22 10:16:17 +02:00
Andrea Corallo
2971a6890f * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix target dir. 2021-10-16 10:56:50 +02:00
Andrea Corallo
ced72b6e4c * Fix `native-compile-target-directory' effectiveness on trampolines
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix
`native-compile-target-directory' effectiveness on trampoline
compilation.
2021-10-15 09:32:20 +02:00
Andrea Corallo
1af45ad04e ; * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix comment. 2021-10-15 09:18:54 +02:00
Stefan Kangas
4e9452a399 Improve shortdoc for vector
* lisp/emacs-lisp/shortdoc.el (vector): Improve shortdoc with titles.
Add mapc.  Fix typo where 'seq-reduce' is incorrectly written as
'reduce'.
2021-10-13 05:04:34 +02:00
Lars Ingebrigtsen
07edc28bdb Fix ert errors when there's a test that binds `debug-on-error'
* lisp/emacs-lisp/ert.el (ert--run-test-internal): Don't infloop
on errors when signalling errors (bug#51131).
2021-10-11 11:14:26 +02:00
Paul Eggert
96278de8ac New function num-processors
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
2021-10-10 14:00:26 -07:00
Stefan Kangas
1d1e96377c ; * lisp/emacs-lisp/shortdoc.el: Fix typo. 2021-10-10 13:53:55 +02:00
Stephen Gildea
d86b2e59c7 native-comp-available-p is the definitive test
* doc/lispref/compile.texi (Native Compilation): Document
native-comp-available-p as the way to test for native compilation.
* lisp/emacs-lisp/package.el (package--native-compile-async):
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
Test for native compilation with native-comp-available-p.

Thank you to Andrea Corallo for reviewing this patch.
2021-10-05 09:24:11 -07:00
Augusto Stoffel
90575a6c0c Disable 'nobreak-char-display' in Eldoc buffers
* lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Set
'nobreak-char-display' to nil in Eldoc buffers (bug#50989).
2021-10-05 11:12:05 +02:00
Stefan Kangas
0a7bab689c ; Minor stylistic fixes found by checkdoc 2021-10-05 02:06:57 +02:00
Andrea Corallo
e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess
* lisp/emacs-lisp/comp.el (comp-running-batch-compilation): New var.
(comp-final): Use it.
(batch-native-compile): Bind `comp-running-batch-compilation' it.
2021-10-04 21:55:57 +02:00
Lars Ingebrigtsen
7fb2789509 Fix substitution of pretty quotes in code in easy-mmode
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Adjust.
(easy-mmode--mode-docstring): Avoid making quotes into pretty
quotes in code (bug#50968).
2021-10-03 11:35:28 +02:00
Stefan Kangas
6c01a21365 Clarify the purpose of internal--format-docstring-line
* test/lisp/subr-tests.el (subr-test-internal--format-docstring-line):
* lisp/subr.el (internal--format-docstring-line): Make it more clear
that this function is not intended for the first line of a docstring.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining
why we use 'internal--format-docstring-line'.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
2021-10-03 01:59:52 +02:00
Nikolay Kudryavtsev
8477d3b339 Make checkdoc's docstring substitution consistent with other docs
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
In error text, say "mapvar" instead of "keymap", and "command"
instead of "function", to be consistent with the ELisp manual.
(Bug#50903)
2021-09-30 19:24:35 +03:00
Mattias Engdegård
41723a329e Revert "Indent bodies of local function definitions properly in elisp-mode"
This reverts commit 38037e04cb.
2021-09-30 16:52:16 +02:00
Mattias Engdegård
be493ea67a Revert "Fix regressions in cl-flet indentation"
This reverts commit c42af5aee7.
2021-09-30 16:52:16 +02:00
akater
c42af5aee7 Fix regressions in cl-flet indentation
* lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p):
Rename (from -p-less form) and fix indentation regression
introduced by 38037e04cb
(bug#9622).  Also add cl-macrolet cl-flet* cl-symbol-macrolet.
2021-09-30 08:33:14 +02:00
Lars Ingebrigtsen
b4b4cc98ac Revert "Obsolete local set difference functions in favor of seq-difference"
This reverts commit 20f7fa691b.

gnus-set-difference is orders of magnitude faster than seq-difference
(on these sets), and using seq-difference makes nnimap too
slow.
2021-09-29 17:28:02 +02:00
Lars Ingebrigtsen
c4866ad1ac Tweak the whitespace before "This is a generic function"
* lisp/emacs-lisp/cl-generic.el (cl--generic-describe): Make the
number of blank lines before this section consistent (whether
there's an indented section before it or not).
2021-09-29 08:25:14 +02:00
Stefan Kangas
7cc6e1dda7 Add shortdoc for text properties
* lisp/emacs-lisp/shortdoc.el (text-properties): New shortdoc.

e for your changes. Lines starting
2021-09-28 20:45:08 +02:00
Stefan Kangas
ccb35fb8fb Mention describe-symbol in cl-defstruct docstring
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Mention 'describe-symbol'
in docstring.
2021-09-28 18:38:10 +02:00
Stefan Kangas
b9611e9c7e Mention cl-describe-type in cl-defstruct docstring
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Mention
'cl-describe-type' in docstring.
2021-09-28 18:09:36 +02:00
Stefan Monnier
fa92b040c6 * lisp/emacs-lisp/map.el: Restore compatibility with Emacs-26
Don't use the new `eql` syntax.
2021-09-28 10:29:27 -04:00