summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-run.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Don't use remq (breaks bootstrapping)Mattias EngdegÄrd2021-11-281-1/+1
|
* Avoid unused argument warnings in lambda compiler macrosMattias EngdegÄrd2021-11-281-0/+1
| | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-compiler-macro): Don't warn when a compiler macro with lambda-form expander does not use all the arguments of the function. Nobody expected any warning since the arguments look like free variables inside the lambda form.
* Mark def* macros for indentationLars Ingebrigtsen2021-10-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/widget.el (define-widget-keywords): * lisp/vc/pcvs.el (defun-cvs-mode): * lisp/subr.el (defvar-local): (defvar-keymap): * lisp/skeleton.el (define-skeleton): * lisp/simple.el (define-alternatives): * lisp/progmodes/gud.el (gdb-script-mode): * lisp/progmodes/gdb-mi.el (def-gdb-preempt-display-buffer): (def-gdb-auto-update-trigger): (def-gdb-auto-update-handler): (def-gdb-trigger-and-handler): (def-gdb-thread-buffer-command): (def-gdb-thread-buffer-simple-command): (def-gdb-thread-buffer-gud-command): (def-gdb-set-positive-number): (def-gdb-memory-format): (def-gdb-memory-unit): (def-gdb-memory-show-page): * lisp/progmodes/compile.el (define-compilation-mode): * lisp/progmodes/cc-vars.el (defcustom-c-stylevar): * lisp/obsolete/cl.el (define-setf-expander): (defsetf): (define-modify-macro): * lisp/obsolete/cl-compat.el (defkeyword): * lisp/net/hmac-def.el (define-hmac-function): * lisp/international/mule-conf.el (define-iso-single-byte-charset): * lisp/international/ccl.el (define-ccl-program): * lisp/image.el (defimage): * lisp/gnus/gmm-utils.el (defun-gmm): * lisp/ezimage.el (defezimage): * lisp/erc/erc.el (define-erc-module): * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/eieio-compat.el (defgeneric): (defmethod): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): (define-globalized-minor-mode): * lisp/emacs-lisp/derived.el (define-derived-mode): * lisp/emacs-lisp/byte-run.el (defsubst): (define-obsolete-function-alias): (define-obsolete-variable-alias): * lisp/custom.el (defcustom): (defface): (defgroup): (deftheme): * lisp/cedet/semantic/wisent.el (define-wisent-lexer): * lisp/cedet/semantic/lex.el (define-lex): (define-lex-analyzer): (define-lex-regex-analyzer): (define-lex-simple-regex-analyzer): (define-lex-block-analyzer): (define-lex-keyword-type-analyzer): (define-lex-sexp-type-analyzer): (define-lex-regex-type-analyzer): (define-lex-string-type-analyzer): (define-lex-block-type-analyzer): * lisp/cedet/semantic/lex-spp.el (define-lex-spp-macro-declaration-analyzer): (define-lex-spp-macro-undeclaration-analyzer): (define-lex-spp-include-analyzer): * lisp/cedet/semantic/dep.el (defcustom-mode-local-semantic-dependency-system-include-path): * lisp/cedet/semantic/decorate/mode.el (define-semantic-decoration-style): * lisp/cedet/mode-local.el (define-child-mode): (define-overloadable-function): (define-mode-local-override): * lisp/calc/calc.el (defcalcmodevar): (defmath): Explicitly mark all macros that have names that start with "def" that should indent defunly-like (bug#43329).
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-10-051-1/+2
|
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-181-5/+5
|
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-3/+3
|
* Merge commit '9cbdf20316' into native-compAndrea Corallo2021-03-091-2/+2
|\
| * * lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warningsStefan Monnier2021-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of warning about unused vars during the analysis phase of closure conversion, do it in the actual closure conversion by annotating the code with "unused" warnings, so that the warnings get emitted later by the bytecomp phase, like all other warnings, at which point the line-number info is a bit less imprecise. Take advantage of this change to wrap the expressions of unused let-bound vars inside (ignore ...) so the byte-compiler can better optimize them away. Finally, promote `macroexp--warn-and-return` to "official" status by removing its "--" marker. (cconv-captured+mutated, cconv-lambda-candidates): Remove vars. (cconv-var-classification): New var to replace them. (cconv-warnings-only): Delete function. (cconv--warn-unused-msg, cconv--var-classification): New functions. (cconv--convert-funcbody): Add warnings for unused args. (cconv-convert): Add warnings for unused vars in `let` and `condition-case`. (cconv--analyze-use): Don't emit an "unused var" warning any more, but instead remember the fact in `cconv-var-classification`. * lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings): Remove variable. (byte-compile-preprocess): Remove corresponding case. * lisp/emacs-lisp/pcase.el (pcase--if): Don't throw away `test` effects. (\`): * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Use `car-safe` instead of `car`, so it can more easily be removed by the optimizer if the result is not used. * lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): New function. (macroexp-warn-and-return): Rename from `macroexp--warn-and-return`.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-02-261-1/+1
|\|
| * Function-quote completion property of declare formBasil L. Contovounesios2021-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-02-211-3/+1
|\|
| * Change how (declare (modes store the dataLars Ingebrigtsen2021-02-201-3/+1
| | | | | | | | | | | | | | | | * 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.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-02-171-1/+18
|\|
| * Change name for the completion-* predicatesLars Ingebrigtsen2021-02-171-2/+3
| | | | | | | | | | | | | | | | | | | | * lisp/simple.el (command-completion-default-include-p) (command-completion-with-modes-p, command-completion-button-p): Rename from completion-*. (read-extended-command-predicate): Adjust default predicate. * lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Adjust predicate name.
| * * lisp/emacs-lisp/byte-run.el (compiler-macro): Make it EdebuggableStefan Monnier2021-02-141-0/+3
| | | | | | | | | | * lisp/emacs-lisp/gv.el (gc-expander, gv-setter): Reuse the spec of `compiler-macro`.
| * Fix byte-run--set-modes call signatureLars Ingebrigtsen2021-02-141-2/+2
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-modes): We take a list of modes, not a single one (and fix the quoting).
| * Add new 'declare' forms for command completion predicatesLars Ingebrigtsen2021-02-141-1/+14
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/functions.texi (Declare Form): Document the new `completion' and `modes' declarations. * lisp/simple.el (completion-with-modes-p): New helper functions. * lisp/emacs-lisp/byte-run.el (byte-run--set-completion) (byte-run--set-modes): (defun-declarations-alist): New declarations for `completion' and `modes'.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-01-241-5/+11
|\|
| * Fix missing file&line info in "Unknown defun property" warningsStefan Monnier2021-01-231-5/+11
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defmacro, defun): Use `macroexp--warn-and-return` rather than `message`. * lisp/emacs-lisp/macroexp.el: Fix `macroexp--compiling-p`. (macroexp--warn-and-return): Don't try and detect repetition on forms like `nil`. (macroexp-macroexpand): Don't forget to bind `macroexpand-all-environment`.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-01-081-20/+9
|\|
| * * lisp/emacs-lisp/byte-run.el (make-obsolete): Make `when` mandatoryStefan Monnier2021-01-031-20/+9
| | | | | | | | | | (define-obsolete-function-alias, make-obsolete-variable) (define-obsolete-variable-alias): Adjust similarly.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-01-021-1/+1
|\|
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Fix defsubst effectiveness (bug#44209)Andrea Corallo2020-10-251-4/+4
| | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defsubst): Fix macro definition. * test/src/comp-tests.el (comp-test-defsubst): New testcase. * test/src/comp-test-funcs.el (comp-test-defsubst-f): New function.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-10-231-4/+10
|\|
| * Tweak the documentation for define-obsolete-variable-aliasLars Ingebrigtsen2020-10-201-4/+10
| | | | | | | | | | | | | | | | * doc/lispref/variables.texi (Variable Aliases): Actually describe the macro parameters (bug#44088). * lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias): Ditto (bug#44088).
* | * Fix defsbust declare effectiveness introduced by 80d7f710 (Bug#43280).Andrea Corallo2020-09-131-6/+5
| | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defsubst): Do not add a speed declaration as this breaks a pre existing ones if present but rather calls directly `byte-run--set-speed'.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-08-091-2/+15
|\|
| * Make 'byte-compile-info*' functions more logicalLars Ingebrigtsen2020-08-061-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-compile-info): New function that's more flexible that replaces 'byte-compile-info-string' and 'byte-compile-info-message'. (byte-compile-info-string): Make obsolete. (byte-compile-info-message): Ditto. * lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix) (skkdic-collect-okuri-nasi, skkdic-set-okuri-nasi): * lisp/finder.el (finder-compile-keywords): * lisp/cus-dep.el (custom-make-dependencies): Adjust callers to use the new function.
* | * Fix defsubst missing inline Bug#42664Andrea Corallo2020-08-021-1/+6
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defsubst): Do not native compile defsubsts to have them always effective.
* | Allow per function speed declarationAndrea Corallo2020-06-221-1/+7
|/ | | | | | | | | | | | | | | | | | | | | * src/comp.c (COMP_SPEED): Rename. (comp_t): Add 'func_speed' field. (emit_mvar_lval, compile_function): Update for per function speed. (Fcomp__compile_ctxt_to_file): COMP_SPEED renamed. * lisp/emacs-lisp/comp.el (comp-speed): Doc update. (comp-func): New 'speed' slot. (comp-spill-speed): New function. (comp-spill-lap-function, comp-intern-func-in-ctxt): Fill 'speed' slot. (comp-spill-lap-function): Gate -1 speed functions for native compilation and emit bytecode instead. (comp-spill-lap): Close over `byte-to-native-plist-environment'. (comp-latch-make-fill): Update for per function speed. (comp-limplify-top-level): Fill speed. (comp-propagate1, comp-call-optim-form-call, comp-call-optim) (comp-dead-code, comp-tco, comp-remove-type-hints): Update for per function speed.
* Merge from origin/emacs-27Glenn Morris2020-05-091-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be0d1cac83 (origin/emacs-27) Small fix for type of 'display-fill-colu... c5e5839776 Fix customization of 'display-fill-column-indicator-charac... d5c184aa3e Refer to fill column indicator Info node in some places. e13300ae50 Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs i... 0bae57033f Fix GTK's Tool Bar menu radio buttons 4c98aa7ea5 Minor clarifications in NEWS a1cbd05f38 Improve documentation of 'with-suppressed-warnings'. 4a895c1b26 Fix a typo in a comment 2caf3e997e Improve documentation of Hi Lock mode 7081c1d66f Fix typos in the Emacs user manual 0385771e2f Fix references to Speedbar in VHDL mode a76cafea0d Fix handling of FROM = t and TO = t by 'window-text-pixel-... # Conflicts: # etc/NEWS # src/xdisp.c
| * Improve documentation of 'with-suppressed-warnings'.Philipp Stephani2020-05-081-5/+6
| | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Refer to 'byte-compile-warnings' instead of 'byte-compile-warning-types', as only the former variable documents the available warning types.
* | Use named functions in {defun,macro}-declarations-alist (Bug#40491)Philipp Stephani2020-04-121-58/+81
|/ | | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-advertised-calling-convention) (byte-run--set-obsolete, byte-run--set-interactive-only) (byte-run--set-pure, byte-run--set-side-effect-free) (byte-run--set-compiler-macro, byte-run--set-doc-string) (byte-run--set-indent, byte-run--set-debug) (byte-run--set-no-font-lock-keyword): New helper functions. (defun-declarations-alist, macro-declarations-alist): Use them.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fix documentation of define-obsolete-* functionsEli Zaretskii2019-12-281-6/+6
| | | | | | | | | | | * doc/lispref/functions.texi (Obsolete Functions): Make documentation of functions that obsolete symbols match the advertised calling conventions. * lisp/emacs-lisp/byte-run.el (define-obsolete-function-alias) (define-obsolete-variable-alias, define-obsolete-face-alias): State in the doc strings that WHEN is a mandatory argument, to be consistent with the advertised calling convention. (Bug#38675)
* (with-suppressed-warnings): Also suppress warnings when not byte-compilingStefan Monnier2019-06-221-5/+17
| | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Bind byte-compile--suppressed-warnings when possible.
* Report progress during custom-make-dependencies instead of file countLars Ingebrigtsen2019-06-181-1/+5
| | | | | | | | | * lisp/cus-dep.el (custom-make-dependencies): Rewrite to use reporter to report progress instead of how many files we've processed. * lisp/emacs-lisp/byte-run.el (byte-compile-info-string): New function. (byte-compile-info-message): Use it.
* Tweak implementation of byte-compile-info-messageLars Ingebrigtsen2019-06-181-1/+1
| | | | | * lisp/emacs-lisp/byte-run.el (byte-compile-info-message): Clean up implementation.
* Output progress messages when scraping autoloads during bootstrapLars Ingebrigtsen2019-06-181-0/+4
| | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-compile-info-message): New function to outout informational messages during byte compilation. * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Use it to report progress when scraping autoloads during bootstrap (which may take half a minute).
* Avoid compilation warning in byte-runLars Ingebrigtsen2019-06-141-1/+4
| | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Avoid compilation warning by not using `symbol-function'.
* Revert "Compilation warning fix for byte-run.el"Glenn Morris2019-06-121-4/+3
| | | | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Revert change that causes a bootstrap failure. ; Ref eg https://hydra.nixos.org/build/94678649
* Compilation warning fix for byte-run.elLars Ingebrigtsen2019-06-131-3/+4
| | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Suppress warning about obsolete function used by obsolete variable.
* Add the new macro with-suppressed-warningsLars Ingebrigtsen2019-06-121-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro. * doc/lispref/compile.texi (Compiler Errors): Document with-suppressed-warnings and deemphasise with-no-warnings slightly. * lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings): New internal variable. (byte-compile-warning-enabled-p): Heed byte-compile--suppressed-warnings, bound via with-suppressed-warnings. (byte-compile-initial-macro-environment): Provide a macro expansion of with-suppressed-warnings. (byte-compile-file-form-with-suppressed-warnings): New byte hunk handler for the suppressed symbol machinery. (byte-compile-suppressed-warnings): Ditto for the byteop. (byte-compile-file-form-defmumble): Ditto. (byte-compile-form, byte-compile-normal-call) (byte-compile-normal-call, byte-compile-variable-ref) (byte-compile-set-default, byte-compile-variable-set) (byte-compile-function-form, byte-compile-set-default) (byte-compile-warn-obsolete, byte-compile--declare-var): Pass the symbol being warned in to byte-compile-warning-enabled-p. * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New function. (bytecomp-test--with-suppressed-warnings): Tests.
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* * lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias): Tweak docStefan Monnier2019-04-191-1/+1
|
* Make warning about unescaped character literals more helpful.Philipp Stephani2019-04-191-0/+15
| | | | | | | | | | | | | | | | | See Bug#31676. * lisp/emacs-lisp/byte-run.el (byte-run--unescaped-character-literals-warning): New defun. * src/lread.c (load_warn_unescaped_character_literals): Use new defun. (syms_of_lread): Define symbol for new defun. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new defun. * test/src/lread-tests.el (lread-tests--unescaped-char-literals): test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): Adapt unit tests.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.