summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-lisp/comp.el (comp-lookup-eln): Add autoload cookie.Andrea Corallo2021-03-211-0/+1
|
* * lisp/emacs-lisp/comp.el (comp-lookup-eln): Add new function.Andrea Corallo2021-03-211-0/+14
|
* Revert "* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all..."Andrea Corallo2021-03-211-5/+2
| | | | | | This reverts commit be22cda7be9e77e67f224f6f07cca9dd44aaa078. Older binaries might still need those .eln if they where preloaded.
* ; Remove two unnecessary quotesAndrea Corallo2021-03-212-2/+2
| | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Remove unnecessary quote. * lisp/emacs-lisp/comp.el (comp-compile-ctxt-to-file): Likewise.
* * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.Andrea Corallo2021-03-211-2/+5
|
* Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-03-197-75/+134
|\
| * Fix copyright lines mistakenly treated as outline headersStefan Monnier2021-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/generator.el: * test/lisp/cedet/semantic-utest.el: * test/lisp/cedet/semantic/format-tests.el: * test/lisp/cedet/semantic/fw-tests.el: * test/lisp/cedet/semantic/bovine/gcc-tests.el: * test/lisp/cedet/semantic/format-resources/test-fmt.el: * test/manual/cedet/semantic-tests.el: * lisp/obsolete/inversion.el: Use only 2 semi-colons before "Copyright".
| * * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Optimize the "return nil" caseStefan Monnier2021-03-181-6/+12
| |
| * Optimise tail calls in `and` and `or` forms in `cl-labels` functionsMattias Engdegård2021-03-181-0/+6
| | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Handle `and` and `or`. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test cases.
| * Compute chart-face-list dynamicallyLars Ingebrigtsen2021-03-181-28/+36
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/chart.el (chart-face-list): Allow a function as the value (bug#47133) so that we can compute the faces dynamically on different displays. (chart--face-list): New function. (chart-draw-data): Use it.
| * Make memory-report work with buffer-local unbound varsLars Ingebrigtsen2021-03-181-1/+1
| | | | | | | | | | * lisp/emacs-lisp/memory-report.el (memory-report--buffer-data): Protect against buffer-local unbound variables (bug#47057).
| * * lisp/emacs-lisp/benchmark.el (benchmark-call): New functionStefan Monnier2021-03-171-31/+67
| | | | | | | | | | (benchmark-run, benchmark-run-compiled, benchmark): Use it. (benchmark--adaptive): New internal function.
| * Init archive and add noconfirm to 'package-install-selected-packages'Gabriel do Nascimento Ribeiro2021-03-151-6/+10
| | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-install-selected-packages): Add call to 'package--archives-initialize' and add optional argument NOCONFIRM to skip user confirmation when installing packages. (Bug#47124)
| * Merge from origin/emacs-27Glenn Morris2021-03-121-2/+1
| |\ | | | | | | | | | | | | 02a5cfce47 (origin/emacs-27) * lisp/mouse.el: Fix mouse-1-clock-follo... c881e990e3 * lisp/emacs-lisp/gv.el (edebug-after): Don't run the gett...
| | * * lisp/emacs-lisp/gv.el (edebug-after): Don't run the getter in the setterStefan Monnier2021-03-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug#46573 which was introduced by commit d79cf638f278e50c22feb53d6ba556f5ce9d7853. The new code is a middle ground, which makes sure the instrumentation point is used (so the coverage checker won't have ghost unreachable instrumentation points) yet without artificially running the getter when we only need to run the setter.
* | | Fix `no-byte-compile' native compilation interaction (bug#47169)Andrea Corallo2021-03-162-3/+3
| | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-spill-lap-function): Throw no-native-compile when `byte-native-qualities' are null. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): No need to consider `no-byte-compile'.
* | | Have `no-byte-compile' implies also `no-native-compile'.Andrea Corallo2021-03-162-1/+4
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (no-native-compile): Update doctring. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): when `no-byte-compile' is set to non-nil it overrides this.
* | | * lisp/emacs-lisp/byte-opt.el: Fix native re-compilation (bug#47161).Eli Zaretskii2021-03-151-0/+1
| | |
* | | * lisp/emacs-lisp/bytecomp.el: Fix native re-compilation (bug#47161).Andrea Corallo2021-03-151-0/+1
| | |
* | | Prefer expand-file-name to concat in native-compilation codeEli Zaretskii2021-03-151-3/+3
| | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): * src/comp.c (Fcomp_el_to_eln_filename) (eln_load_path_final_clean_up): Prefer expand-file-name to concat. (Bug#43725)
* | | Fix some entry in `comp-known-type-specifiers' (bug#46847)Andrea Corallo2021-03-141-8/+8
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Some fix. * test/src/comp-tests.el (comp-tests-46670-1): Update test.
* | | * Fix circular dependecy when loading a modified comp.el (bug#47049)Andrea Corallo2021-03-121-14/+17
| | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Move it before other functional code.
* | | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-03-1211-69/+80
|\| |
| * | ; Fix typos in doc stringsMattias Engdegård2021-03-121-1/+1
| | |
| * | * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Simplify (doh!)Stefan Monnier2021-03-111-1/+1
| | |
| * | * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Tune down the warningStefan Monnier2021-03-111-1/+2
| | | | | | | | | | | | | | | Don't warn for always-nil bindings if the binding is made explicit. Fixes bug#47080.
| * | * lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Use `macroexp-let2`Stefan Monnier2021-03-111-6/+7
| | | | | | | | | | | | This also silences the recently introduced compilation warning.
| * | Make byte-compiled uses of `define-minor-mode' more compatibleLars Ingebrigtsen2021-03-121-5/+13
| | | | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Be more defensive about accessing minor mode variables.
| * | * lisp: Remove yet more always-nil variablesStefan Monnier2021-03-112-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align-region): Remove always-nil variable `group-c`. * lisp/ido.el (ido-make-prompt): Remove always-nil variable `prefix`. * lisp/xdg.el (xdg-mime-collect-associations): Remove always-nil variable `end`. * lisp/calc/calc-yank.el (calc-edit): Remove always-nil variable `flag`. * lisp/calendar/todo-mode.el (todo-edit-item--header): Remove always-nil variable `dayname`. (todo-show-categories-table): Remove always-nil variable `sortkey`. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-docstring-engine): Remove always-nil variable `err`. * lisp/emacs-lisp/tcover-ses.el: Remove always-nil variable `pause`. * lisp/eshell/em-ls.el (eshell-ls-files): Remove always-nil variable `ignore`. * lisp/net/ange-ftp.el (ange-ftp-copy-file-internal): Remove always-nil variable `temp2`. * lisp/progmodes/cperl-mode.el (cperl-tags-hier-init): Remove always-nil variables `l1`, `l2`, `l3`. (cperl-tags-treeify): Remove always-nil variable `l1`. * lisp/progmodes/ebrowse.el (ebrowse-tags-read-member+class-name): Remove always-nil variable `class`. * lisp/textmodes/artist.el (artist-draw-ellipse-with-0-height): Remove always-nil variable `fill-info`. * lisp/textmodes/flyspell.el (flyspell-emacs-popup): Remove always-nil variable `show-affix-info`. * lisp/textmodes/rst.el (rst-Ado): Remove always-nil variable `char`. * lisp/vc/vc.el (vc-diff-build-argument-list-internal): Remove always-nil variable `rev2-default`.
| * | * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Warn never-initialized varsStefan Monnier2021-03-111-5/+8
| | | | | | | | | | | | (byte-compile-not-lexical-var-p): Remove Emacs<24 compatibility.
| * | Fix byte-compilation warning in benchmark-runLars Ingebrigtsen2021-03-101-1/+2
| | | | | | | | | | | | | | | * lisp/emacs-lisp/benchmark.el (benchmark-run): Avoid a byte-compilation warning about an empty let body (bug#46819).
| * | Mark string predicates side-effect-freeMattias Engdegård2021-03-101-0/+2
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add string>, string-greaterp, string-empty-p, string-prefix-p, string-suffix-p and string-blank-p, all recently marked pure.
| * | Fix duplicate ":" in ert-find-test-other-window promptStefan Kangas2021-03-101-1/+1
| | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-find-test-other-window): Don't insert duplicate ":" in prompt.
| * | Do mode tagging in ert.elStefan Kangas2021-03-101-13/+14
| | |
| * | * lisp/emacs-lisp/cconv.el: Don't confuse a string for a docstringStefan Monnier2021-03-091-2/+3
| | | | | | | | | | | | | | | | | | | | | (cconv--convert-funcbody): Check there's something after a docstring. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-string-vs-docstring): New corresponding test.
| * | Fix structure of condition object in nested 'ert-fail'.Philipp Stephani2021-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | See the test 'ert-test-fail' for the expected structure. * lisp/emacs-lisp/ert.el (ert--should-signal-hook): Condition list should be (SYMBOL . DATA), not (SYMBOL DATA). * test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Fix unit test.
| * | Make checkdoc--next-docstring use the doc-string-elt propertyMauro Aranda2021-03-081-24/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows from a fix for Bug#46918 and a discussion to use doc-string-elt: https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00232.html * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Check for a non-nil doc-string-elt property, instead of hard-coding the supported symbols. Use that property to position point at the doc-string.
| * | Normalize version specifiers for make-obsolete and friendsStefan Kangas2021-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-forget-user-or-password) (auth-source-user-or-password, auth-source-hide-passwords): * lisp/calendar/icalendar.el (icalendar--datetime-to-noneuropean-date): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist): * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): * lisp/obsolete/nnir.el (nnir-swish-e-index-file): * lisp/obsolete/starttls.el (starttls-any-program-available): Normalize version specifiers for make-obsolete and friends.
| * | * lisp/emacs-lisp/bytecomp.el: Warn about unprefixed vars in `boundp`Stefan Monnier2021-03-071-4/+12
| | | | | | | | | | | | | | | | | | | | | (byte-compile--check-prefixed-var): New fun, extracted from `byte-compile--declare-var`. (byte-compile--declare-var): Use it. (byte-compile-maybe-guarded): Use it as well.
* | | Implement `no-native-compile' (bug#46983)Andrea Corallo2021-03-122-43/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Capture `no-native-compile'. * lisp/emacs-lisp/comp.el (no-native-compile): Define new variable. (comp-spill-lap-function): Throw when `no-native-compile' was captured non-nil. (comp--native-compile): Catch `no-native-compile' if necessary and return nil in case.
* | | * Fix error reporting for async native compilation (bug#47024)Andrea Corallo2021-03-121-5/+17
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--native-compile): During async compilation if we catch an error print it in a parsable way so we can report it to the user.
* | | * Fix truncated warnings (bug#47024)Andrea Corallo2021-03-101-1/+2
| | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind `warning-fill-column' to `most-positive-fixnum'.
* | | Merge commit '9cbdf20316' into native-compAndrea Corallo2021-03-0925-715/+1129
|\| |
| * | * lisp/emacs-lisp/bindat.el (bindat-struct): Fix Edebug defStefan Monnier2021-03-061-2/+2
| | |
| * | Various map.el improvementsBasil L. Contovounesios2021-03-062-147/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-do-indexed): Return nil as per doc. * lisp/emacs-lisp/map.el: Require Emacs >= 26 due to dependence on 5-arg alist-get. Bump package to version 3.0. Fix other headers. (Bug#46754) (map--plist-p): Detect list starting with nil as plist, not alist. (map-elt, map-filter, map-apply, map--make-pcase-bindings) (map--make-pcase-patterns): Simplify. (map-let, map-put, map-nested-elt, mapp): Update docstring for plist support. (map-delete): Fix OBOE on arrays. Split into cl-defmethods. (map-values, map-values-apply): Specialize for arrays. (map-pairs, map-keys-apply, map-put!): Improve docstring. (map-length): Clarify docstring w.r.t. duplicate keys. Split into cl-defmethods. Optimize default implementation. (map-copy): Use copy-alist on alists. Split into cl-defmethods. (map-contains-key): Add plist support. Clarify docstring w.r.t. optional argument. Simplify default implementation. (map-some, map-every-p, map-merge, map-merge-with, map--into-hash): Don't use map-apply for side effects. (map-into): Preserve plist ordering. Improve docstrings. (map-insert): Add hash-table and array support. (map-inplace): Remove unused error symbol. (map-do): Return nil as per doc. * etc/NEWS: Announce new user-visible behavior. * test/lisp/emacs-lisp/map-tests.el: Prefer should-not over (should (not ...)) in general. (with-maps-do): Fix docstring. (with-empty-maps-do): New macro. (test-map-elt-default, test-mapp, test-map-keys, test-map-values) (test-map-pairs, test-map-length, test-map-copy, test-map-apply) (test-map-do, test-map-keys-apply, test-map-values-apply) (test-map-filter, test-map-remove, test-map-empty-p) (test-map-contains-key, test-map-some, test-map-every-p): Use it. (test-map-plist-p, test-map-put!-new-keys, test-map-insert-empty) (test-map-insert, test-map-delete-empty, test-map-copy-alist) (test-map-contains-key-testfn, test-map-into-hash-test) (test-map-into-empty, test-map-merge, test-map-merge-empty): New tests. (test-map-elt): Test array key that is within bounds but not fixnum. (test-map-put!): Use map--plist-p. Remove redundant tests. (test-map-put-alist-new-key): Don't modify list literal. (test-map-put-testfn-alist, test-map-put-return-value): Silence obsoletion warnings. (test-map-delete): Check for OBOE on arrays. (test-map-delete-return-value): Remove test made redundant by test-map-delete. (test-map-nested-elt, test-map-into): Test plists too.
| * | ; Fix typo.Stefan Kangas2021-03-061-1/+1
| | |
| * | Bindat: new macro-expansion based data layout languageStefan Monnier2021-03-051-151/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thorough redesign of the Bindat system, which makes it possible to define new Bindat type forms, define recursive types, control the values returned when unpacking, freely mix arbitrary computations with type definitions, as well as support for arbitrary sized integers. This also reverts the recent addition of the `bindat-spec` macro and the support for 64bit integers in the old Bindat language since that is now considered obsolete anyway. * doc/lispref/processes.texi (Bindat Types): Rename from `Bindat Spec` and rewrite for the new sublanguage. (Bindat Functions): Adjust to the new terminology. (Bindat Computed Types): New node. * lisp/emacs-lisp/bindat.el (bindat--type): New type. (bindat--unpack-u64, bindat--unpack-u64r): Delete functions. (bindat--unpack-item, bindat--pack-item, bindat--fixed-length-alist): Revert addition of support for 64bit integers. (bindat--unpack-group, bindat--length-group, bindat--pack-group): Handle the new `bindat--type` values. (bindat-spec): Revert addition of this macro. (bindat--unpack-uint, bindat--unpack-uintr, bindat--pack-uint) (bindat--pack-uintr): New functions. (bindat-type, bindat-defmacro, bindat--pcase): New macros. (bindat-type): New Edebug elem. (bindat--type): New generic function. (bindat--primitives): New constant. (bindat--macroenv, bindat--op): New vars. (bindat--make-docstring, bindat--fun, bindat--makefun, bindat--toplevel): New functions. * test/lisp/emacs-lisp/bindat-tests.el: Use `bindat-type`. (ip): New Bindat type. (header-bindat-spec, data-bindat-spec, packet-bindat-spec): Adjust to new `bindat-type` macro. (bindat-test-unpack): Simplify now that the order of fields is preserved. (bindat-test--int-websocket-type, bindat-test--LEB128): New consts. (bindat-test--pack-val, bindat-test--sint, bindat-test--recursive): New tests.
| * | Make lambda-lifting work againMattias Engdegård2021-03-051-1/+1
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Fix typo. * test/lisp/emacs-lisp/cconv-tests.el (cconv-convert-lambda-lifted): Add test case.
| * | * lisp/emacs-lisp/bindat.el: Minor refactoringStefan Monnier2021-03-051-69/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (bindat--unpack-str, bindat--unpack-strz, bindat--unpack-bits): New functions, extracted from `bindat--unpack-item`. (bindat--unpack-item): Use them. (bindat--align): New function. (bindat--unpack-group, bindat--length-group, bindat--pack-group): Use it. (bindat-get-field): Allow integers to index both lists (as returned by `repeat`) and vectors (as returned by `vec`). (bindat--pack-str, bindat--pack-bits): New functions, extracted from `bindat--pack-item`. (bindat--pack-item): Use them. * test/lisp/emacs-lisp/bindat-tests.el (struct-bindat): Place the fields in the order in which they appear in the structs.
| * | Improve the documentation of :extra in cl-defmethodLars Ingebrigtsen2021-03-051-3/+7
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/functions.texi (Generic Functions): Improve documentation of :extra (bug#46917). * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Ditto.