Commit graph

7430 commits

Author SHA1 Message Date
Andrea Corallo
dbdc44db15 Allow for `comp-native-driver-options' to work as a file-local variable. 2021-03-07 20:19:20 +01:00
Eli Zaretskii
619f66f423 Use MS-Windows system APIs to get number of processors
* lisp/emacs-lisp/comp.el: Use 'w32-get-nproc' instead of the
environment variable NUMBER_OF_PROCESSORS.

* src/w32proc.c (Fw32_get_nproc): New primitive.
* src/w32.c (w32_get_nproc): New function.
(sample_system_load): Call w32_get_nproc to initialize the number
of processors on this system.
* src/w32.h (w32_get_nproc): Add prototype.
2021-03-07 15:32:55 +02:00
Andrea Corallo
c60f2f458a Fix `comp-cstr-intersection-no-hashcons' for negated result cstr
* lisp/emacs-lisp/comp-cstr.el
	(comp-cstr-intersection-no-hashcons): When negated and
	necessary relax dst to t.
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
2021-03-06 23:17:14 +01:00
Pip Cet
6c73418c95 Fix miscompilation of funcall forms in some cases (bug#46974)
* lisp/emacs-lisp/comp.el (comp-call-optim-func): Call
comp-cstr-imm-vld-p before relying on comp-cstr-imm to return the
right value.
2021-03-06 20:53:57 +00:00
Andrea Corallo
3848f3bff0 * lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-simple): Suppress warning. 2021-03-06 20:52:34 +01:00
Andrea Corallo
05259c4a23 Fix `=' propagation to handle -0.0 0.0 case
* lisp/emacs-lisp/comp-cstr.el
	(comp-cstr-intersection-homogeneous): Fix indent + use `memql'.
	(comp-cstr-=): Handle 0.0 -0.0 idiosyncrasy
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
	tests and fix enumeration.
2021-03-06 20:38:00 +01:00
Eli Zaretskii
b456b19ec4 Fix typos and doc strings in native-compilation files
* lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose)
(comp-always-compile, comp-deferred-compilation-deny-list)
(comp-bootstrap-deny-list, comp-never-optimize-functions)
(comp-async-jobs-number, comp-async-cu-done-hook)
(comp-async-all-done-hook, comp-async-env-modifier-form)
(comp-pass, comp-native-compiling, comp-post-pass-hooks)
(comp-known-predicate-p, comp-pred-to-cstr)
(comp-symbol-values-optimizable, comp-limple-assignments)
(comp-limple-calls, comp-limple-branches, comp-block)
(comp-vec--verify-idx, comp-vec-aref, comp-vec-append)
(comp-vec-prepend, comp-block-preds)
(comp-ensure-native-compiler, comp-log, comp-log-func)
(comp-loop-insn-in-block, comp-byte-frame-size)
(comp-add-func-to-ctxt, comp-spill-lap-function, comp-spill-lap)
(comp-lap-fall-through-p, comp-new-frame, comp-emit-set-call)
(comp-copy-slot, comp-latch-make-fill, comp-emit-cond-jump)
(comp-body-eff, comp-op-case, comp-prepare-args-for-top-level)
(comp-limplify-top-level, comp-negate-arithm-cmp-fun)
(comp-emit-assume, comp-cond-cstrs-target-mvar)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-form-tco-call-seq, comp-clean-up-stale-eln)
(comp-delete-or-replace-file, comp--native-compile)
(native--compile-async, native-compile)
(batch-byte-native-compile-for-bootstrap): Fix typos, wording, and
punctuation in doc strings.
* lisp/loadup.el: Fix typos.

* src/lread.c (syms_of_lread): Doc fix.
2021-03-04 20:36:43 +02:00
Andrea Corallo
0c5ba41b72 Fix two compiler ICEs dealing with nan and infinity
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Don't crash when
	truncate fails.
	* test/src/comp-test-funcs.el (comp-test-=-nan): Add two functions
	to be compiled.
2021-03-03 20:36:12 +01:00
Andrea Corallo
8c7228e8cd Fix = propagation semantic for constrained inputs
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Synthesize
	`comp-cstr-shallow-copy'.
	(comp-cstr-=): Relax inputs before intersecting them.
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Add three
	tests.
2021-03-02 14:36:09 +01:00
Andrea Corallo
3d014e1bf4 Fix eql' equal' propagation of non hash consed values (bug#46843)
Extend assumes allowing the following form:

(assume dst (and-nhc src1 src2))

`and-nhc' assume operator allow for constraining correctly
intersections where non hash consed values are not propagated as
values but rather promoted to their types.

	* lisp/emacs-lisp/comp-cstr.el
	(comp-cstr-intersection-no-hashcons): New function.
	* lisp/emacs-lisp/comp.el (comp-emit-assume): Logic update to emit
	`and-nhc' operator (implemented in fwprop by
	`comp-cstr-intersection-no-hashcons').
	(comp-add-cond-cstrs): Map `eq' to `and' assume operator and
	`equal' `eql' into `and-nhc'.
	(comp-fwprop-insn): Update to handle `and-nhc'.
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
	tests covering `eql' and `equal' propagation of non hash consed
	values.
2021-03-01 18:09:40 +01:00
Andrea Corallo
5bc08559e8 Don't treat '=' as simple equality emitting constraints (bug#46812)
Extend assumes allowing the following form

(assume dst (= src1 src2))

to caputure '=' semanting during fwprop handling float integer
conversions.

	* lisp/emacs-lisp/comp.el (comp-equality-fun-p): Don't treat '=' as
	simple equality.
	(comp-arithm-cmp-fun-p, comp-negate-arithm-cmp-fun)
	(comp-reverse-arithm-fun): Rename and add '=' '!='.
	(comp-emit-assume, comp-add-cond-cstrs, comp-fwprop-insn): Update
	for new function nameing and to handle '='.
	* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): New function.
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a bunch
	of '=' specific tests.
2021-02-28 23:30:03 +01:00
Andrea Corallo
2acc46b55b Migrate and rename a bunch of functions from comp.el to comp-cstr.el
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-imm-vld-p)
	(comp-cstr-imm, comp-cstr-fixnum-p, comp-cstr-symbol-p)
	(comp-cstr-cons-p): Move and rename from 'comp.el'.
	* lisp/emacs-lisp/comp.el (comp-mvar-type-hint-match-p)
	(make-comp-mvar, comp-emit-assume, comp-fwprop-prologue)
	(comp-function-foldable-p, comp-function-call-maybe-fold)
	(comp-fwprop-call, comp-fwprop-insn, comp-call-optim-func)
	(comp-compute-function-type): Update for renamed functions.
	* src/comp.c (emit_mvar_rval): Likewise.
	* test/src/comp-tests.el (comp-tests-mentioned-p-1)
	(comp-tests-cond-rw-checker-val): Likewise.
2021-02-28 23:29:49 +01:00
Andrea Corallo
5c922cc3a4 Merge remote-tracking branch 'savannah/master' into native-comp 2021-02-26 19:54:59 +01:00
Stefan Kangas
cedc55041e Make some defcustom types stricter in comp.el
* lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose)
(comp-async-jobs-number, comp-async-env-modifier-form): Use stricter
types.
2021-02-26 18:11:29 +01:00
Stefan Kangas
720bd747a8 Add :version tags to defcustoms in comp.el
* lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose)
(comp-never-optimize-functions, comp-async-jobs-number)
(comp-async-cu-done-hook, comp-async-all-done-hook)
(comp-async-env-modifier-form)
(comp-async-report-warnings-errors, comp-native-driver-options)
(comp-libgccjit-reproducer): Add :version tags.
2021-02-26 18:01:02 +01:00
Stefan Kangas
1205301e09 Fix syntax highlighting of easy-menu-define docstrings
* lisp/emacs-lisp/easymenu.el (easy-menu-define): Add doc-string
declaration for correct syntax highlighting.
2021-02-26 15:59:56 +01:00
Stefan Kangas
54af0d4298 Remove redundant requires of easymenu
* lisp/allout.el:
* lisp/emacs-lisp/edebug.el:
* lisp/emacs-lisp/ert.el:
* lisp/erc/erc-menu.el:
* lisp/help-mode.el:
* lisp/net/dictionary.el:
* lisp/nxml/rng-nxml.el:
* lisp/progmodes/ebrowse.el:
* lisp/progmodes/meta-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ps-mode.el:
* lisp/progmodes/vera-mode.el:
* lisp/wid-browse.el: Remove redundant require of easymenu.  We only
use the autoloaded macro 'easy-menu-define' here.
2021-02-26 15:52:26 +01:00
Eli Zaretskii
5540d73441 Fix last change
* lisp/emacs-lisp/comp.el (comp-async-report-warnings-errors):
Improve wording of the doc string.
2021-02-26 16:50:41 +02:00
Andrea Corallo
ad74b1b2b6 * Improve `comp-async-report-warnings-errors' docstring
* lisp/emacs-lisp/comp.el (comp-async-report-warnings-errors):
	Improve docstring.
2021-02-26 15:24:34 +01:00
Eli Zaretskii
3266093af9 Improve documentation of last change
* lisp/emacs-lisp/comp.el (comp-async-query-on-exit)
(comp-async-report-warnings-errors): Improve wording.
2021-02-26 16:08:44 +02:00
Andrea Corallo
54df918ad1 * Add `comp-async-query-on-exit' customize.
* lisp/emacs-lisp/comp.el (comp-async-query-on-exit): New customize.
	(comp-run-async-workers): Make use of.
2021-02-26 14:33:08 +01:00
Basil L. Contovounesios
752278834b Function-quote completion property of declare form
For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-02/msg01666.html

* lisp/emacs-lisp/byte-run.el (byte-run--set-completion): Quote with
'function' for syntactical consistency with other declare form
properties.  This allows writing (declare (completion foo)) instead
of (declare (completion 'foo)).
* lisp/emacs-lisp/easymenu.el (easy-menu-do-define):
* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Prefer
function-put over put for function symbols.
* lisp/subr.el (ignore, undefined): Remove #'-quoting from declare
form; it is no longer needed.
2021-02-26 11:26:22 +00:00
Mattias Engdegård
70f2d658e4 Fix pcase rx pattern bugs
Two unrelated bugs: A missing type check caused an error in rx
patterns for non-string match targets, and rx patterns did not work at
all in pcase-let or pcase-let*.

Second bug reported by Basil Contovounesios and Ag Ibragimov; fixes
proposed by Stefan Monnier.  Discussion and explanation in thread at
https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg01924.html

* lisp/emacs-lisp/rx.el (rx): Add (pred stringp) to avoid type errors,
and replace the `pred` clause for the actual match with something that
works with pcase-let(*) without being optimised away.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test cases.
2021-02-26 10:09:42 +01:00
Andrea Corallo
3a31fca5db * Fix some comp-vec logic
* lisp/emacs-lisp/comp.el (comp-vec-length, comp-vec-append)
	(comp-vec-prepend): Fix logic.
	(comp-vec-aref): Fix indentation.
2021-02-25 21:00:07 +01:00
Andrea Corallo
9ae48ae714 * Fix two docstrings in comp.el
* lisp/emacs-lisp/comp.el (comp-new-frame,
	comp-maybe-add-vmvar): Fix docstring.
2021-02-25 20:26:27 +01:00
Juri Linkov
297c0e0306 New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'
* lisp/cus-start.el: Add use-short-answers.

* lisp/emacs-lisp/map-ynp.el (read-answer): Handle use-short-answers.
(read-answer-short): Add use-short-answers to docstring.

* src/fns.c (Fyes_or_no_p): Call y-or-n-p if use_short_answers is true.
(syms_of_fns): Add DEFVAR_BOOL use-short-answers (bug#46594).
2021-02-25 20:45:40 +02:00
Stefan Monnier
4b1ace22be Remove last remaining external uses of edebug-form-spec
* lisp/emacs-lisp/gv.el (gv-place): Use `def-edebug-elem-spec`.

* lisp/obsolete/erc-compat.el (erc-define-minor-mode): Remove redundant
`edebug-form-spec`.
2021-02-24 23:08:47 -05:00
Stefan Monnier
b7f67d432b * lisp/emacs-lisp/macroexp.el (macroexp-file-name): Work in eval-buffer
Rely on `current-load-list` instead of `load-file-name`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Change the var we override accordingly.
2021-02-24 17:16:00 -05:00
Stefan Monnier
2766f9fdb9 * lisp/emacs-lisp/macroexp.el (macroexp-file-name): New function.
Yes, finally: a function that tells you the name of the file where
the code is located.  Finding this name is non-trivial in practice,
as evidenced by the "4 shift/reduce conflicts" warning when compiling
CEDET's python.el, because its `wisent-source` got it wrong in that
case, thinking the grammar came from `python.el` instead of
`python-wy.el`.

While at it, also made `macroexp-compiling-p` public, since it's
useful at various places.

(macroexp-compiling-p): Rename from `macroexp--compiling-p`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Bind `load-file-name` to nil so we can distinguish a load that calls
the byte compiler from a byte compilation which causes a load.

* lisp/cedet/semantic/wisent/python.el (wisent-python--expected-conflicts):
Remove; it was just a workaround.
* lisp/subr.el (do-after-load-evaluation): Avoid `byte-compile--` vars.
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete):
Use `macroexp-compiling-p` and `macroexp-file-name`.
* lisp/cedet/semantic/wisent/comp.el (wisent-source): Use `macroexp-file-name`
(wisent-total-conflicts): Tighten regexp.
* lisp/emacs-lisp/cl-lib.el (cl--compiling-file): Delete function
and variable.  Use `macroexp-compiling-p` instead.
* lisp/progmodes/flymake.el (flymake-log):
* lisp/emacs-lisp/package.el (package-get-version):
* lisp/emacs-lisp/ert-x.el (ert-resource-directory):
Use `macroexp-file-name`.
2021-02-24 13:52:45 -05:00
Protesilaos Stavrou
7c48c83dab Use named faces in shortdoc
* shortdoc.el (shortdoc-heading): Define new face for headings.
(shortdoc-display-group): Apply new heading face.
(shortdoc--display-function): Use existing face for section text.
* etc/NEWS: Document new face (bug#46748).
2021-02-24 17:18:26 +01:00
Andrea Corallo
0ee1a16769 Fix async compilation and paramenter naming
* lisp/emacs-lisp/comp.el (native--compile-async)
	(native-compile-async): Fix broken parameter renaming.
2021-02-24 00:07:07 +01:00
Andrea Corallo
bddd7a2d13 Do not emit assumptions referencing clobbered mvars (bug#46670)
* lisp/emacs-lisp/comp.el (comp-func): Add `vframe-size' slot.
	(comp-new-frame): Add `vsize' parameter.
	(comp-limplify-top-level, comp-limplify-function): Update for new
	`comp-new-frame'.
	(comp-maybe-add-vmvar): New function.
	(comp-add-cond-cstrs): Logic update to emit assumptions not
	referencing clobbered variables.
	(comp-place-phis, comp-ssa, comp-ssa-rename-insn)
	(comp-ssa-rename): Update rename logic to rename also negative
	slots.
	(comp-fwprop-insn): Update to handle `(assume mvar mvar)' form.
	* test/src/comp-tests.el (46670-1): Add testcase.
	* test/src/comp-test-funcs.el (comp-test-46670-1-f)
	(comp-test-46670-2-f): New functions.
2021-02-23 23:19:36 +01:00
Andrea Corallo
89e9b05180 * Move ssa rename from vector to comp-vec
* lisp/emacs-lisp/comp.el (comp-block): Updated `final-frame' slot
	type.
	(comp-limplify): Updated `frame' slot type.
	(comp-slot-n, comp-new-frame, comp-place-phis, comp-ssa)
	(comp-ssa-rename-insn, comp-ssa-rename, comp-finalize-phis): Use
	`comp-vec'.
2021-02-23 23:19:36 +01:00
Andrea Corallo
ec88bdba6f * Add a simple growable vector like type
* lisp/emacs-lisp/comp.el (comp-vec): Define struct.
	(comp-vec-copy, comp-vec-length, comp-vec--verify-idx)
	(comp-vec-aref, comp-vec-append, comp-vec-prepend): New functions.
2021-02-23 23:19:36 +01:00
Juri Linkov
6172454ff3 Small fixes
* lisp/emacs-lisp/seq.el (seq-contains): Move the ‘declare’ form
after the docstring.
* lisp/misc.el (copy-from-above-command): Fix whitespace regexp.
2021-02-23 21:05:30 +02:00
Stefan Kangas
9202106a99 Improve easymenu.el Commentary section
* lisp/emacs-lisp/easymenu.el: Improve Commentary section.
2021-02-23 03:24:39 +01:00
Andrea Corallo
28ce6f980f * Some clean-up in comp.el
* lisp/emacs-lisp/comp.el (comp-func): Remove 'array-h'.
	(comp-spill-lap-function, comp-intern-func-in-ctxt)
	(comp-spill-lap-function, comp-addr-to-bb-name): Update
	accordingly.
2021-02-22 20:49:11 +01:00
Stefan Monnier
8d5dfafab7 Prefer declare over a put of list-indent-function.
While at it, I enabled lexical-binding in the affected files.

* lisp/cedet/semantic/sb.el: Enable lexical-binding.
(semantic-sb-with-tag-buffer): Use `declare`.

* lisp/cedet/semantic/bovine/el.el: Enable lexical-binding.
(semantic-elisp-setup-form-parser): Use `declare`.

* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/ert-x.el: Remove redundant `put`.

* lisp/emulation/cua-rect.el: Enable lexical-binding.
(cua--rectangle-operation, cua--rectangle-aux-replace): Use `declare`.

* lisp/mh-e/mh-acros.el: Enable lexical-binding.
(mh-do-in-gnu-emacs, mh-do-in-xemacs, mh-funcall-if-exists, defun-mh)
(defmacro-mh, with-mh-folder-updating, mh-in-show-buffer)
(mh-do-at-event-location, mh-iterate-on-messages-in-region)
(mh-iterate-on-range): Use `declare`.

* lisp/mh-e/mh-compat.el: Enable lexical-binding.
(mh-flet): Use `declare`.

* lisp/mh-e/mh-e.el: Enable lexical-binding.
(defgroup-mh, defcustom-mh, defface-mh): Use `declare`.

* lisp/net/sieve.el: Enable lexical-binding.  Remove redundant :group args.
(sieve-activate, sieve-remove, sieve-edit-script): Remove unused arg
from the interactive spec.
(sieve-deactivate-all): Remove unused var `name`.
(sieve-change-region): Use `declare`.

* lisp/obsolete/fast-lock.el: Enable lexical-binding.
Remove redundant :group args.  Remove XEmacs compat code.
(save-buffer-state): Remove macro.
(fast-lock-add-properties): Use `with-silent-modifications` instead.

* lisp/obsolete/lazy-lock.el: Enable lexical-binding.
Remove redundant :group args.
(do-while): Use `declare`.
(save-buffer-state): Remove macro.
(lazy-lock-fontify-rest-after-change, lazy-lock-defer-line-after-change)
(lazy-lock-defer-rest-after-change, lazy-lock-after-fontify-buffer)
(lazy-lock-after-unfontify-buffer, lazy-lock-fontify-region):
Use `with-silent-modifications` instead.

* lisp/obsolete/pgg.el: Enable lexical-binding.  Remove XEmacs compat code.
(pgg-save-coding-system, pgg-as-lbt, pgg-process-when-success):
Use `declare`.
(pgg-add-passphrase-to-cache): Remove unused var `new-timer`.
(pgg-decrypt-region): Remove unused var `buf`.

* lisp/org/org-agenda.el (org-let, org-let2): Move from org-macs and
use `declare`.

* lisp/org/org-macs.el (org-let, org-let2): Move these functions that
are inherently harmful to your karma to the only package that uses them.
(org-scroll): Use `pcase` to avoid `eval` and use more readable syntax
for those integers standing for events.

* lisp/progmodes/antlr-mode.el: Enable lexical-binding.
(save-buffer-state-x): Use `declare` and `with-silent-modifications`.

* lisp/international/mule-util.el (with-coding-priority):
* lisp/cedet/ede/proj-comp.el (proj-comp-insert-variable-once):
* lisp/org/org-element.el (org-element-map):
* test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load):
* test/lisp/emacs-lisp/generator-tests.el (cps-testcase): Use `declare`.
2021-02-22 11:54:17 -05:00
Julian Scheid
f8d8759059 cl-extra: Fix docstring retrieval
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Fix
docstring retrieval (bug#46662).
2021-02-22 16:06:58 +01:00
Andrea Corallo
81b1013555 * Don't use paths to indicate filenames
* lisp/emacs-lisp/comp.el (native--compile-async)
	(native-compile-async): Replace `paths' argname with `files'.
2021-02-22 14:31:23 +01:00
Andrea Corallo
d6227f6edc * Fix union constraint for mixed pos/neg constraints
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): Fix neg
	type shadowing pos values.
	* test/lisp/emacs-lisp/comp-cstr-tests.el
	(comp-cstr-typespec-tests-alist): Add testcase.
	* test/src/comp-tests.el (comp-tests-type-spec-tests): Fix testcase.
2021-02-22 13:59:56 +01:00
Mattias Engdegård
88a02e4c89 Fix compilation of closures with nontrivial doc strings
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure):
Use the supplied doc string if it's a literal; fall back to the old
slow way of building a closure otherwise.
2021-02-22 11:46:04 +01:00
Andrea Corallo
da4da88c76 * lisp/emacs-lisp/comp.el (comp-spill-lap): Fix doc string. 2021-02-21 22:20:59 +01:00
Andrea Corallo
cf1e8e792f Merge remote-tracking branch 'savannah/master' into HEAD 2021-02-21 22:08:01 +01:00
Mattias Engdegård
d0c47652e5 Faster, more compact, and readable closure creation
Simplify closure creation by calling a single function at run time
instead of putting it together from small pieces.  This is faster
(by about a factor 2), takes less space on disk and in memory, and
makes internal functions somewhat readable in disassembly listings again.

This is done by creating a prototype function at compile-time whose
closure variables are placeholder values V0, V1... which can be seen
in the disassembly.  The prototype is then cloned at run time using
the new make-closure function that replaces the placeholders with
the actual closure variables.

* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure):
Generate call to make-closure from a prototype function.
* src/alloc.c (Fmake_closure): New function.
(syms_of_alloc): Defsubr it.
* src/data.c (syms_of_data): Defsym byte-code-function-p.
2021-02-21 21:58:25 +01:00
Stefan Kangas
669b911c66 ; Fix previous easy-menu-define conversion
* lisp/emacs-lisp/re-builder.el (reb-mode-menu):
* lisp/progmodes/make-mode.el (makefile-mode-menu): Replace :button
attribute with :style and :selected.
2021-02-21 10:49:07 +01:00
Lars Ingebrigtsen
12578d6aca Change how (declare (modes store the data
* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Change from
being a predicate to storing the modes.  This allows using the
modes for positive command discovery, too.
* src/data.c (Fcommand_modes): Look at the `command-modes' symbol
property, too.
2021-02-20 14:29:41 +01:00
Lars Ingebrigtsen
825aed11d2 Add the `always' function
* doc/lispref/functions.texi (Calling Functions): Document it.
* lisp/subr.el (always): New function.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark it as
side effect free.
2021-02-20 13:44:19 +01:00
Stefan Kangas
d184895a42 Convert re-builder menu to easy-menu-define
* lisp/emacs-lisp/re-builder.el (reb-mode-map): Move menu
definition from here...
(reb-mode-menu): ...to here, and rewrite using easy-menu-define.
2021-02-20 07:55:04 +01:00
Stefan Monnier
b6eccad06c * lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args
(byte-compile-check-lambda-list): Skip warnings of repeated arg for
those that are declared as unused anyway.
2021-02-19 12:51:36 -05:00