summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* * lisp/emacs-lisp/benchmark.el (benchmark-elapse): TweakStefan Monnier2021-06-111-2/+1
|
* Constant-propagate (function SYMBOL)Mattias Engdegård2021-06-031-1/+1
| | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p): Consider #'SYMBOL a constant for compile-time propagation purposes.
* Optimise (cons X nil) to (list X)Mattias Engdegård2021-06-031-0/+8
| | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-cons): New function.
* ; End recently added sentences with a period.Basil L. Contovounesios2021-06-011-1/+1
|
* * Add `native-compile-target-directory' (bug#48743)Andrea Corallo2021-06-011-5/+9
| | | | | | * lisp/emacs-lisp/comp.el (native-compile-target-directory): New variable. (comp-spill-lap-function): Make use of.
* Rename batch-byte-native-compile-for-bootstrap (bug#48743)Andrea Corallo2021-06-012-7/+7
| | | | | | | | | | | | | | | | * lisp/Makefile.in : Rename `batch-byte-native-compile-for-bootstrap' -> `batch-byte+native-compile. * lisp/emacs-lisp/bytecomp.el (byte+native-compile) (byte-compile-file): Rename `batch-byte-native-compile-for-bootstrap' -> `batch-byte+native-compile + `byte-native-for-bootstrap' -> `byte+native-compile'. * lisp/emacs-lisp/comp.el (comp-spill-lap-function, comp-final) (batch-native-compile, batch-byte+native-compile): Likewise. * lisp/emacs-lisp/bytecomp.el (byte+native-compile) (byte-compile-file): Likewise. * test/src/comp-tests.el (comp-tests-bootstrap): Rename `byte-native-for-bootstrap' -> `byte+native-compile'.
* * Make *Async-native-compile-log* buffer read-only (bug#48763)Andrea Corallo2021-05-311-3/+8
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Make "*Async-native-compile-log*" read-only.
* Put ELP results in a special-mode bufferLars Ingebrigtsen2021-05-311-8/+10
| | | | | | * lisp/emacs-lisp/elp.el (elp-results): Make `q' work in ELP results buffer (bug#14104). (elp-results-mode): Define as an empty special mode derivation.
* Give 'syntax-propertize-wholelines' a docstring.Philipp Stephani2021-05-301-0/+4
| | | | | | | This function is generally useful. * lisp/emacs-lisp/syntax.el (syntax-propertize-wholelines): Add docstring.
* Add a new documentation group for overlaysDaniel Martín2021-05-301-0/+46
| | | | | * lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for buffer overlays(bug#48730).
* Improve the documentation of documentation groupsDaniel Martín2021-05-301-0/+2
| | | | | | | * doc/lispref/help.texi (Documentation Groups): Fix typos and add an example. * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Add :no-eval* and :result-string keywords to the docstring. (Bug#48730)
* ; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephraseMattias Engdegård2021-05-291-4/+3
|
* Fix shortdoc examplesMattias Engdegård2021-05-291-4/+4
| | | | | | | | | | Make sure that each example in shortdoc actually contains the function it illustrates, and add a test for it. * lisp/emacs-lisp/shortdoc.el (string, list, buffer, number): Use the right functions in examples for string-version-lessp, lax-plist-put, point-min and ffloor. * test/lisp/emacs-lisp/shortdoc-tests.el: New test file.
* Fix looking-at-p example in shortdoc.elDaniel Martín2021-05-281-1/+1
| | | | | * lisp/emacs-lisp/shortdoc.el (regexp): Use `looking-at-p' instead of `looking-at' (bug#48709).
* * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Silence warningsStefan Monnier2021-05-271-18/+28
| | | | | (byte-optimize--lexvars): Move before first use instead of using `dlet` on that first use.
* Don't propagate lexical variables into inlined functionsMattias Engdegård2021-05-271-1/+4
| | | | | | | | | | | | | | | | Functions compiled when inlined (thus from inside the optimiser) mustn't retain the lexical environment of the caller or there will be tears. See discussion at https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg01227.html . Bug found by Stefan Monnier. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Bind byte-optimize--lexvars to nil when re-entering the compiler recursively. * test/lisp/emacs-lisp/bytecomp-resources/bc-test-alpha.el: * test/lisp/emacs-lisp/bytecomp-resources/bc-test-beta.el: New files. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-defsubst): New test.
* * lisp/emacs-lisp/byte-opt.el: Make the build more reproducibleStefan Monnier2021-05-251-27/+13
| | | | | | (byte-compile-inline-expand): When inlining code from another file, always inline the byte-code version of the function. (byte-optimize--pcase): Simplify edebug spec.
* Allow years in a copyright range to be separated by en dashes.Philipp Stephani2021-05-251-7/+7
| | | | | | | | | * lisp/emacs-lisp/copyright.el (copyright-regexp) (copyright-years-regexp, copyright-update-year) (copyright-fix-years): Also include en dash. * test/lisp/emacs-lisp/copyright-tests.el (copyright-tests--data): New test cases.
* * lisp/emacs-lisp/subr-x.el (if-let*, if-let): Use looser Edebug specStefan Monnier2021-05-221-12/+5
| | | | | | This makes the same spec work both for `if-let` and `when-let`. (when-let*, and-let*, when-let): Simplify accordingly.
* Fix native-comp-async-report-warnings-errors :typeBasil L. Contovounesios2021-05-221-1/+1
| | | | | | | | * doc/lispref/compile.texi (Native-Compilation Variables): Document 'silent' alternative of native-comp-async-report-warnings-errors. * lisp/emacs-lisp/comp.el (native-comp-async-report-warnings-errors): Fix quoting in :type expression (bug#48586).
* Give 'when-let' and 'when-let*' their own Edebug specification.Philipp Stephani2021-05-221-2/+7
| | | | | | | | | The Edebug specification of 'if-let' and 'if-let*' doesn't work if the body is empty. While that's a pathological case, it's not wrong per se, and could arguably happen due to macro expansion. * lisp/emacs-lisp/subr-x.el (when-let*, when-let): Don't reuse Edebug specification from 'if-let*' and 'if-let'.
* * lisp/emacs-lisp/cl-macs.el (cl-loop): Add missing 'when' to specPhilipp Stephani2021-05-221-1/+2
|
* * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Use a closureStefan Monnier2021-05-181-13/+14
|
* * lisp/emacs-lisp/lisp-mode.el (lisp-outline-level): Fix imprecise numbers.Juri Linkov2021-05-181-3/+9
| | | | | (lisp-outline-level): Return right levels starting from 1 instead of 5. Suggested by Howard Melman <hmelman@gmail.com> in bug#46878.
* Look for ElDoc buffer in all visible framesBasil L. Contovounesios2021-05-181-1/+1
| | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p): Look for a window displaying the ElDoc documentation buffer in all visible frames, as promised by the user option eldoc-echo-area-prefer-doc-buffer (bug#48278).
* Fix the length= shortdoc exampleAlexandr Vityazev2021-05-181-1/+1
| | | | | | | * lisp/emacs-lisp/shortdoc.el (list): Fix the length= example (bug#48495). Copyright-paperwork-exempt: yes
* Fix pcase 'rx' patterns with a single named submatch (bug#48477)Mattias Engdegård2021-05-181-5/+16
| | | | | | | | | | | | | | | pcase 'rx' patterns with a single named submatch, like (rx (let x "a")) would always succeed because of an over-optimistic transformation. Patterns with 0 or more than 1 named submatches were not affected. Reported by Philipp Stephani. * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): Special case for a single named submatch. * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add tests.
* * lisp/emacs-lisp/subr-x.el (if-let): Swap &or branches (Bug#48489)Philipp Stephani2021-05-181-2/+2
|
* Fix a few Edebug specifications where code is wrapped in lambdas.Philipp Stephani2021-05-177-8/+12
| | | | | | | | | | | | | | | | | | | | | | As the Info node `(elisp) Specification List' explains, it is not correct to use `body' or t for a piece of code that the macro wraps in a `lambda' form. These should use `def-body' instead. * lisp/info-xref.el (info-xref-with-file): * lisp/subr.el (subr--with-wrapper-hook-no-warnings, track-mouse) (combine-change-calls, with-eval-after-load): * lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings): * lisp/emacs-lisp/cl-macs.el (cl-do-symbols, cl-progv): * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): * lisp/emacs-lisp/gv.el (gv-letplace): * lisp/emacs-lisp/nadvice.el (define-advice): * lisp/emacs-lisp/thunk.el (thunk-delay): * lisp/vc/vc-dispatcher.el (vc-run-delayed): Use 'def-body' instead of t or 'body' where applicable. * lisp/emacs-lisp/package.el (package--with-response-buffer): Remove evaluation of the body altogether. I have no idea how to write it correctly in this case.
* Add a 'silent option for native-comp-async-report-warnings-errorsEric Abrahamsen2021-05-161-10/+19
| | | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-report-warnings-errors): Set to 'silent to log warnings, but not pop up the *Warnings* buffer. * lisp/emacs-lisp/comp.el (comp-accept-and-process-async-output): Check value.
* Optimize calls to 'eql', 'memql' and similar for fixnums.Philipp Stephani2021-05-161-6/+20
| | | | | | | | | | | | | It's good practice to compare integers using 'eql' because two bignum objects representing the same integer might not be 'eq'. However, 'eql' is slower and doesn't have its own byte code. Therefore, replace it with 'eq' if one argument is guaranteed to be a fixnum on all platforms. * lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): New helper function. (byte-optimize-equal, byte-optimize-member, byte-optimize-assoc): Use it to optimize 'eql' etc. to 'eq' if it will always compare fixnums.
* Even further `text-property-search-forward' clarificationsLars Ingebrigtsen2021-05-121-6/+8
| | | | | * lisp/emacs-lisp/text-property-search.el (text-property-search-forward): Further doc string clarifications.
* Further corrections for the text-property-search doc stringsLars Ingebrigtsen2021-05-121-4/+5
| | | | | | * lisp/emacs-lisp/text-property-search.el (text-property-search-forward): Correct doc string. (text-property-search-backward): Ditto.
* Fix the tests for 'string-limit'Eli Zaretskii2021-05-121-0/+12
| | | | | | | | | * test/lisp/emacs-lisp/subr-x-tests.el (subr-string-limit-coding): Fix the expected results of string-limit when encoding with UTF-16. Add tests for UTF-8 with BOM. (Bug#48324) * lisp/emacs-lisp/subr-x.el (string-limit): Add FIXME comment about the current implementation, which is faulty by design.
* * Rename comp-deferred-compilation-deny-listAndrea Corallo2021-05-111-3/+3
| | | | | | | * lisp/emacs-lisp/comp.el (native-comp-deferred-compilation-deny-list) (native-compile-async-skip-p): Rename comp-deferred-compilation-deny-list -> native-comp-deferred-compilation-deny-list.
* `text-property-search-forward' doc string improvementLars Ingebrigtsen2021-05-111-13/+22
| | | | | | * lisp/emacs-lisp/text-property-search.el (text-property-search-forward): Correct and clarify the doc string (bug#48317).
* Reintroduce autoloads for edebug-all-defs/edebug-all-formsLars Ingebrigtsen2021-05-091-0/+2
| | | | | | | * lisp/emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms): Reintroduce ;;;###autoload of these user options that were removed in bae2cfe63c, because this leads to errors in a common (and recommended) use case (bug#47516).
* ; Fix recent re-builder doc changes.Basil L. Contovounesios2021-05-081-1/+1
|
* Mention that Emacs is usually case-insensitive in a couple of placesdalanicolai2021-05-081-1/+6
| | | | | | | | | | * doc/lispref/searching.texi (Regular Expressions): Mention `case-fold-search'. * lisp/emacs-lisp/re-builder.el (re-builder): Mention case sensitivity toggles (bug#47534). Copyright-paperwork-exempt: yes
* Fix a recent change in rmc.elEli Zaretskii2021-05-071-28/+29
| | | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix. Improve the message when entering recursive-edit.
* Rename comp-eln-load-path → native-comp-eln-load-pathAndrea Corallo2021-05-061-10/+10
| | | | | | | | | | | | * src/comp.c (Fcomp_el_to_eln_filename): Rename comp-eln-load-path → native-comp-eln-load-path. * src/lread.c (maybe_swap_for_eln): Likewise. * lisp/startup.el (native-comp-eln-load-path) (normal-top-level): Likewise. * lisp/emacs-lisp/comp.el (comp-spill-lap-function, comp-final) (comp-eln-load-path-eff, comp-trampoline-compile) (comp-clean-up-stale-eln, comp-run-async-workers) (comp-lookup-eln, batch-byte-native-compile-for-bootstrap): Likewise.
* Rename comp-warning-on-missing-sourceAndrea Corallo2021-05-061-1/+1
| | | | | | | | | * src/lread.c (maybe_swap_for_eln): Rename comp-warning-on-missing-source → native-comp-warning-on-missing-source. * src/comp.c (syms_of_comp): Likewise. * lisp/emacs-lisp/comp.el (native-comp-warning-on-missing-source): Likewise.
* Rename comp-native-driver-options → native-comp-driver-optionsAndrea Corallo2021-05-062-9/+9
| | | | | | | | | * src/comp.c (add_driver_options, syms_of_comp): Rename comp-native-driver-options → native-comp-driver-options. * lisp/emacs-lisp/comp.el (native-comp-driver-options) (comp-ctxt, comp-spill-lap-function, comp-final) (comp-run-async-workers): Likewise. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Likewise.
* * Rename comp-async-query-on-exit → native-comp-async-query-on-exitAndrea Corallo2021-05-061-2/+2
| | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-query-on-exit) (comp-run-async-workers): Rename comp-async-query-on-exit → native-comp-async-query-on-exit.
* * Rename comp-async-report-warnings-errorsAndrea Corallo2021-05-061-2/+2
| | | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-report-warnings-errors) (comp-accept-and-process-async-output): Rename comp-async-report-warnings-errors → native-comp-async-report-warnings-errors.
* * Rename comp-async-env-modifier-form → native-comp-async-env-modifier-formAndrea Corallo2021-05-061-3/+3
| | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-env-modifier-form) (comp-final, comp-run-async-workers): Rename comp-async-env-modifier-form → native-comp-async-env-modifier-form.
* * Rename comp-async-all-done-hook → native-comp-async-all-done-hookAndrea Corallo2021-05-061-3/+3
| | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-all-done-hook) (comp-run-async-workers): Rename comp-async-all-done-hook → native-comp-async-all-done-hook.
* * Rename comp-async-cu-done-functions → native-comp-async-cu-done-functionsAndrea Corallo2021-05-061-2/+2
| | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-cu-done-functions) (comp-run-async-workers): Rename comp-async-cu-done-functions → native-comp-async-cu-done-functions.
* * Rename comp-async-jobs-number → native-comp-async-jobs-numberAndrea Corallo2021-05-061-5/+5
| | | | | | | * lisp/emacs-lisp/comp.el (native-comp-async-jobs-number) (comp-effective-async-max-jobs, native--compile-async) (native-compile-async): Rename comp-async-jobs-number → native-comp-async-jobs-number.
* Rename comp-never-optimize-functions → native-comp-never-optimize-functionsAndrea Corallo2021-05-062-10/+10
| | | | | | | * lisp/emacs-lisp/nadvice.el (advice--add-function): Rename comp-never-optimize-functions → native-comp-never-optimize-functions. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions) (comp-subr-trampoline-install, comp-call-optim-form-call): Likewise.