summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* * lisp/emacs-lisp/bytecomp.el (byte-compile-dynamic-variable-bind): TypoStefan Monnier2022-11-181-1/+1
|
* Fix the behaviour of 'byte-compile-ignore-files'Philip Kaludercic2022-11-171-4/+3
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Negate the 'string-match-p' check. (Bug#59139)
* bytecomp.el (byte-recompile-directory): Fix negated ignore logicNicholas Vollmer2022-11-091-3/+3
| | | | | Previous logic would only compile files which matched the byte-compile-ignore-files regular expression. (Bug#59115)
* Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-10-301-9/+2
|\
| * (Ffunction): Make interpreted closures safe for spaceStefan Monnier2022-10-251-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interpreted closures currently just grab a reference to the complete lexical environment, so (lambda (x) (+ x y)) can end up looking like (closure ((foo ...) (y 7) (bar ...) ...) (x) (+ x y)) where the foo/bar/... bindings are not only useless but can prevent the GC from collecting that memory (i.e. it's a representation that is not "safe for space") and it can also make that closure "unwritable" (or more specifically, it can cause the closure's print representation to be u`read`able). Compiled closures don't suffer from this problem because `cconv.el` actually looks at the code and only stores in the compiled closure those variables which are actually used. So, we fix this discrepancy by letting the existing code in `cconv.el` tell `Ffunction` which variables are actually used by the body of the function such that it can filter out the irrelevant elements and return a closure of the form: (closure ((y 7)) (x) (+ x y)) * lisp/loadup.el: Preload `cconv` and set `internal-filter-closure-env-function` once we have a usable `cconv-fv`. * lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Adjust to new calling convention of `cconv-closure-convert`. (byte-compile-not-lexical-var-p): Delete function, moved to `cconv.el`. (byte-compile-bind): Use `cconv--not-lexical-var-p`. * lisp/emacs-lisp/cconv.el (cconv--dynbound-variables): New var. (cconv-closure-convert): New arg `dynbound-vars` (cconv--warn-unused-msg): Remove special case for `ignored`, so we don't get confused when a function uses an argument called `ignored`, e.g. holding a list of things that it should ignore. (cconv--not-lexical-var-p): New function, moved from `bytecomp.el`. Don't special case keywords and `nil` and `t` since they are already `special-variable-p`. (cconv--analyze-function): Use `cconv--not-lexical-var-p`. (cconv--dynbindings): New dynbound var. (cconv-analyze-form): Use `cconv--not-lexical-var-p`. Remember in `cconv--dynbindings` the vars for which we used dynamic scoping. (cconv-analyze-form): Use `cconv--dynbound-variables` rather than `byte-compile-bound-variables`. (cconv-fv): New function. * src/eval.c (Fsetq, eval_sub): Remove optimization designed when `lexical-binding == nil` was the common case. (Ffunction): Use `internal-filter-closure-env-function` when available. (eval_sub, Ffuncall): Improve error info for `excessive_lisp_nesting`. (internal-filter-closure-env-function): New defvar.
* | Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-10-181-29/+31
|\|
| * (byte-compile--first-symbol-with-pos): Fix bug#58601Stefan Monnier2022-10-181-21/+17
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: Require `subr-x`. (byte-compile--first-symbol-with-pos): Avoid inf-loops on circular data.
| * Avoid having the async compile log saying it's compiling loaddefsLars Ingebrigtsen2022-10-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/loadup.el (featurep): Define the hash table in nativecomp builds (but not otherwise). A more natural place to define this would be in comp.el, but comp.el isn't loaded yet when we load the .elc file that updates comp--no-native-compile. We could change the load order and move the definition to comp.el, though. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Allow inhibiting nativecomp earlier (bug#57627). * lisp/emacs-lisp/comp.el (native-compile-async-skip-p): Use the data.
| * cl-generic: Fix `advertised-calling-convention` declarationsStefan Monnier2022-10-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Preserve the `advertised-calling-convention`, if any (bug#58563). * lisp/subr.el (declare): Warn when we hit this. * lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun. * lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string): * lisp/help-fns.el (help-fns--signature): * lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it. * test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun. (cl-generic-tests--advertised-calling-convention-bug58563): New test.
* | Merge branch 'master' into feature/package+vcPhilip Kaludercic2022-10-081-18/+28
|\|
| * Clearer byte-compiler arity warnings (bug#58319)Mattias Engdegård2022-10-071-1/+3
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature-string): Replace '3+' and '3-4' with '3 or more' and '3 or 4', respectively.
| * Merge from origin/emacs-28Stefan Kangas2022-09-211-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 478b786d5a ; * doc/lispref/windows.texi (Window Hooks): Fix a typo (b... 5085351645 * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regre... ee6f8598ca Add vc-annotate-switches to manual 616dcf27e5 ; Fix typos in Lisp symbols 5405852541 Remove mention of non-existent `annotate-switches' 191505b8a3 Mention that src/macuvs.h sometimes needs committing 10373c4b68 ; More comment fixes in font.h (bug#57935) c2595b8dcc ; * src/font.h (struct font_driver): Comment fix. 97b928ce09 MacOS ld warning from native compilation (bug#57849)
| | * ; Fix typos in Lisp symbolsStefan Kangas2022-09-201-1/+1
| | |
| * | Accept more wide function signatures in docstringsStefan Kangas2022-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-function-signature.el"): New test. * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Make regexp more allowing to silence warning. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el: New file.
| * | Fix typo in byte-compile-lambda warningLars Ingebrigtsen2022-09-091-2/+2
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix typo in message (bug#57690).
| * | Fix warning about obsoleted generalized variablesLars Ingebrigtsen2022-08-251-0/+1
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Autoload so that the call here from gv.el (about obsolete generalized variables) doesn't bug out (bug#57394).
| * | Make point-at-eol and point-at-bol obsoleteStefan Kangas2022-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat aliases obsolete in favor of `pos-bol'/'line-beginning-position' or 'pos-eol'/'line-end-position'. Update callers. Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
| * | Revert "Make the generalized buffer-local-variable obsolete"Lars Ingebrigtsen2022-08-221-1/+0
| | | | | | | | | | | | | | | | | | This reverts commit bfe222288e02472bff0e1ab5ba7ef26af6a2769a. This led to the local modes not working.
| * | Make the generalized buffer-local-variable obsoleteLars Ingebrigtsen2022-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/paren.el (show-paren-local-mode): * lisp/electric.el (electric-indent-local-mode) (electric-layout-local-mode, electric-quote-local-mode): * lisp/elec-pair.el (electric-pair-local-mode): Don't use it. * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Autoload. * lisp/emacs-lisp/gv.el (buffer-local-variable): Make obsolete (bug#26624). * lisp/emacs-lisp/gv.el (make-obsolete-generalized-variable): Move to allow usage.
| * | Make it possible to mark generalized variables as obsoleteLars Ingebrigtsen2022-08-211-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/variables.texi (Adding Generalized Variables): Document it. * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Alter the interface so that it can also be used by generalized variable warnings. (byte-compile-function-warn): Adjust caller. (byte-compile-check-variable): Adjust caller. * lisp/emacs-lisp/gv.el (gv-get): Warn about obsolete generalized variables (bug#49730). (make-obsolete-generalized-variable): New function.
* | | Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-08-181-13/+13
|\| |
| * | * lisp/emacs-lisp/bytecomp.el (byte-compile-log-1): Create buffer if necessaryAndrea Corallo2022-08-171-1/+1
| | |
| * | (compiled-function-p): New function (bug#56648)Stefan Monnier2022-08-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (compiled-function-p): New function. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1): * lisp/gnus/gnus.el (gnus): * lisp/mh-e/mh-e.el (mh-version): * lisp/emacs-lisp/macroexp.el (emacs-startup-hook): * lisp/emacs-lisp/cl-macs.el (compiled-function): * lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition) (byte-compile, display-call-tree): * lisp/emacs-lisp/byte-opt.el (<toplevel-end>): * lisp/emacs-lisp/advice.el (ad-compiled-p): * lisp/cedet/semantic/bovine.el (semantic-bovinate-stream): * lisp/loadup.el (macroexpand-all): * admin/unidata/unidata-gen.el (unidata--ensure-compiled): Use it. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add entries for it. (pcase--split-pred): Use it. * lisp/help-fns.el (help-fns-function-description-header): Use `functionp`. (help-fns--var-safe-local): Use `compiled-function-p`.
* | | Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-08-121-23/+11
|\| |
| * | ; * lisp/emacs-lisp/bytecomp.el: indentation fixMattias Engdegård2022-08-071-2/+2
| | |
| * | Cease emitting negative file offsets for user variablesMattias Engdegård2022-08-071-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'User variables' were made obsolete in Emacs 24 along with user-variable-p; the sign of the position in (#$ . POS) hasn't mattered since. * lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Don't emit negative position when doc string starts with `*`. * src/lread.c (get_lazy_string): Explain.
| * | bytecomp.el: Update comments referring to `make-docfile`Stefan Monnier2022-08-051-5/+5
| | |
| * | bytecomp.el: Further simplifications enabled by commit 59732a83c8875cStefan Monnier2022-08-051-3/+0
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Don't insert a \n before the #@ docstrings since make-docfile doesn't scan .elc files any more.
| * | Check for mis-quoted #' in doc strings during byte-compileLars Ingebrigtsen2022-08-031-1/+1
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn): Check for mis-quoted #' in doc strings, too.
| * | Fix the bytecode incompatibility due to the change to 'narrow-to-region'.Gregory Heytings2022-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (narrow_to_region_internal): New function, which contains the body previously in 'Fnarrow_to_region' but accepts a third argument. (Fnarrow_to_region): Use the new function. Update the docstring. (Fwiden): Update the docstring. * src/lisp.h: Prototype of the new function. * src/xdisp.c (handle_fontified_prop): Use the new function instead of 'Fnarrow_to_region'. * src/process.c (Finternal_default_process_filter): * src/lread.c (readevalloop): Remove the third argument to 'Fnarrow_to_region'. * src/bytecode.c (exec_byte_code): * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): * lisp/emacs-lisp/bytecomp.el: Restore the statu quo ante. * etc/NEWS: Remove the entry about the new optional argument. * doc/lispref/positions.texi (Narrowing): Update the documentation.
* | | Allow ignoring files during byte compilationPhilip Kaludercic2022-08-111-2/+14
|/ / | | | | | | | | * bytecomp.el (byte-compile-ignore-files): Add new variable. (byte-recompile-directory): Respect 'byte-compile-ignore-files'.
* | Handle the optional argument of 'narrow-to-region' in byte-compiled code.Gregory Heytings2022-07-301-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: Adapt the specifications. * src/bytecode.c (exec_byte_code): Get the optional argument.
* | ; * lisp/emacs-lisp/bytecomp.el: comment cleanupMattias Engdegård2022-07-231-8/+2
| |
* | ; Fix typos: prefer American spellingStefan Kangas2022-07-141-1/+1
| |
* | Remove many items obsolete since 24.1Stefan Kangas2022-07-081-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-abbreviate-flattened-numbering) (allout-mode-deactivate-hook): * lisp/ansi-color.el (ansi-color-unfontify-region): * lisp/auth-source.el (auth-source-hide-passwords) (auth-source-user-or-password) (auth-source-forget-user-or-password): * lisp/cedet/data-debug.el (data-debug-map): * lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table) (semantic-grammar-map): * lisp/chistory.el (command-history-map): * lisp/comint.el (comint-dynamic-complete) (comint-dynamic-complete-as-filename) (comint-dynamic-simple-complete): * lisp/dired-x.el (read-filename-at-point) (dired-x-submit-report): * lisp/dos-fns.el (register-name-alist, make-register) (register-value, set-register-value, intdos, mode25, mode4350): * lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle): * lisp/emacs-lisp/chart.el (chart-map): * lisp/emacs-lisp/package.el (package-menu-view-commentary): * lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting): * lisp/erc/erc.el (erc-complete-word): * lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): * lisp/eshell/esh-util.el (eshell-for): * lisp/files.el (inhibit-first-line-modes-regexps) (inhibit-first-line-modes-suffixes): * lisp/gnus/gnus-msg.el (gnus-outgoing-message-group) (gnus-debug-files, gnus-debug-exclude-variables): * lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M): * lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal): * lisp/gnus/nnimap.el (nnimap-split-rule): * lisp/iimage.el (turn-on-iimage-mode): * lisp/image.el (image-extension-data, image-library-alist): * lisp/mail/emacsbug.el (report-emacs-bug-pretest-address): * lisp/mail/mail-utils.el (rmail-dont-reply-to): * lisp/mail/mailalias.el (mail-complete-function) (mail-completion-at-point-function): * lisp/mail/rmail.el (rmail-dont-reply-to-names) (rmail-default-dont-reply-to-names): * lisp/mail/sendmail.el (mail-mailer-swallows-blank-line) (mail-sent-via): * lisp/menu-bar.el (menu-bar-kill-ring-save): * lisp/minibuffer.el (completion-annotate-function) (minibuffer-local-filename-must-match-map): * lisp/msb.el (msb-after-load-hooks): * lisp/obsolete/eieio-compat.el (eieio-defmethod) (eieio-defgeneric): * lisp/obsolete/info-edit.el (Info-edit-map): * lisp/obsolete/starttls.el (starttls-any-program-available): * lisp/progmodes/cfengine.el (cfengine-mode-abbrevs): * lisp/progmodes/cwarn.el (turn-on-cwarn-mode): * lisp/progmodes/make-mode.el (makefile-complete): * lisp/progmodes/meta-mode.el (meta-complete-symbol) (meta-mode-map): * lisp/progmodes/pascal.el (pascal-toggle-completions) (pascal-last-completions, pascal-show-completions): * lisp/progmodes/prolog.el (prolog-char-quote-workaround): * lisp/progmodes/which-func.el (which-func-mode): [FUNCTION] * lisp/simple.el (count-lines-region, minibuffer-completing-symbol): * lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map): * lisp/strokes.el (strokes-report-bug): * lisp/subr.el (condition-case-no-debug): * lisp/term/ns-win.el (ns-alternatives-map) (ns-store-cut-buffer-internal): * lisp/term/w32-win.el (w32-default-color-map): * lisp/term/x-win.el (x-cut-buffer-or-selection-value): * lisp/textmodes/bibtex.el (bibtex-complete) (bibtex-entry-field-alist): * lisp/textmodes/reftex-index.el (reftex-index-map) (reftex-index-phrases-map): * lisp/textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): * lisp/textmodes/reftex-toc.el (reftex-toc-map): * lisp/textmodes/rst.el (rst-block-face, rst-external-face) (rst-definition-face, rst-directive-face, rst-comment-face) (rst-emphasis1-face, rst-emphasis2-face, rst-literal-face) (rst-reference-face): * lisp/vc/vc-hooks.el (vc-toggle-read-only): * lisp/view.el (view-return-to-alist) (view-return-to-alist-update): Remove many functions and variables obsolete since 24.1. * lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above removed variable 'bibtex-entry-field-alist'. * lisp/cedet/data-debug.el (data-debug-edebug-expr) (data-debug-eval-expression): * lisp/emacs-lisp/trace.el (trace--read-args): * lisp/files-x.el (read-file-local-variable-value): * lisp/simple.el (read--expression): Don't use above removed variable 'minibuffer-completing-symbol'. * lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above removed variables. * src/w32fns.c (Fw32_default_color_map): Delete obsolete function. (syms_of_w32fns): Delete defsubr for above defun. * src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list> <Vdeferred_action_function>: Delete DEFVARs. <Qdeferred_action_function>: Delete DEFSYM. (syms_of_keyboard_for_pdumper): Adjust for above change. (command_loop_1): Don't run deferred-action-function hook. * lisp/subr.el (deferred-action-list, deferred-action-function): Delete obsoletion statements. * lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run 'deferred-action-list' hook. * doc/lispref/hooks.texi (Standard Hooks): Delete 'deferred-action-function'. * lisp/emacs-lisp/lisp.el (field-complete): * lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): * lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc): * lisp/gnus/nnmail.el (nnmail-fancy-expiry-target): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/sendmail.el (sendmail-send-it): * lisp/mail/smtpmail.el (smtpmail-send-it): * lisp/minibuffer.el (minibuffer-completion-help): * lisp/progmodes/python.el: Don't use above removed items. * lisp/emacs-lisp/eieio-core.el: * lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer to above removed items. ; * etc/NEWS: List removed items.
* | Make some defcustom types more restrictiveStefan Kangas2022-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/abbrev.el (abbrev-suggest-hint-threshold): * lisp/bookmark.el (bookmark-bmenu-file-column) (bookmark-menu-length): * lisp/buff-menu.el (Buffer-menu-size-width) (Buffer-menu-mode-width): * lisp/calendar/calendar.el (calendar-week-start-day) (calendar-intermonth-spacing, calendar-column-width) (calendar-day-digit-width): * lisp/calc/calc.el (calc-undo-length): * lisp/calendar/timeclock.el (timeclock-workday): * lisp/comint.el (comint-buffer-maximum-size) (comint-input-ring-size): * lisp/doc-view.el (doc-view-resolution, doc-view-image-width): * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-max-column): * lisp/emacs-lisp/comp.el (native-comp-debug) (native-comp-verbose, native-comp-async-jobs-number): * lisp/emacs-lisp/package.el (package-name-column-width) (package-version-column-width, package-status-column-width) (package-archive-column-width): * lisp/eshell/esh-mode.el (eshell-buffer-maximum-lines): * lisp/frame.el (blink-cursor-blinks): * lisp/info.el (Info-breadcrumbs-depth): * lisp/jit-lock.el (jit-lock-chunk-size): * lisp/kmacro.el (kmacro-ring-max): * lisp/menu-bar.el (yank-menu-length, yank-menu-max-items): * lisp/midnight.el (clean-buffer-list-delay-general) (clean-buffer-list-delay-special): * lisp/net/dictionary.el (dictionary-port) (dictionary-proxy-port): * lisp/net/ldap.el (ldap-default-port): * lisp/net/pop3.el (pop3-port, pop3-stream-length): * lisp/net/rcirc.el (rcirc-default-port): * lisp/net/sieve-manage.el (sieve-manage-default-port): * lisp/play/spook.el (spook-phrase-default-count): * lisp/play/tetris.el (tetris-buffer-width) (tetris-buffer-height, tetris-width, tetris-height) (tetris-top-left-x, tetris-top-left-y): * lisp/profiler.el (profiler-sampling-interval): * lisp/progmodes/sql.el (sql-port): * lisp/recentf.el (recentf-max-menu-items): * lisp/strokes.el (strokes-grid-resolution): * lisp/tab-bar.el (tab-bar-tab-name-truncated-max): * lisp/term/xterm.el (xterm-max-cut-length): * lisp/time.el (display-time-interval, world-clock-timer-second): * lisp/url/url-cache.el (url-cache-expire-time): * lisp/url/url-cookie.el (url-cookie-save-interval): * lisp/url/url-history.el (url-history-save-interval): * lisp/url/url-queue.el (url-queue-parallel-processes) (url-queue-timeout): * lisp/url/url-vars.el (url-max-password-attempts) (url-max-redirections): * lisp/vc/emerge.el (emerge-min-visible-lines): * lisp/vc/vc.el (vc-log-show-limit): * lisp/window.el (window-min-height, window-min-width): * lisp/winner.el (winner-ring-size): Use :type natnum. * lisp/savehist.el (savehist-file-modes): Fix setting to nil value and use :type natnum.
* | Prefer defvar-keymap in emacs-lisp/*.elStefan Kangas2022-07-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map): * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map): * lisp/emacs-lisp/crm.el (crm-local-completion-map) (crm-local-must-match-map): * lisp/emacs-lisp/debug.el (debugger-mode-map): * lisp/emacs-lisp/edebug.el (edebug-mode-map, edebug-global-map) (edebug-eval-mode-map): * lisp/emacs-lisp/eieio-custom.el (eieio-custom-mode-map): * lisp/emacs-lisp/elp.el (elp-results-symname-map): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map): * lisp/emacs-lisp/re-builder.el (reb-mode-map) (reb-lisp-mode-map, reb-subexp-mode-map): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map) (tabulated-list-sort-button-map): * lisp/emacs-lisp/timer-list.el (timer-list-mode-map):
* | Bytecode opcode comments updateMattias Engdegård2022-06-241-13/+14
| | | | | | | | | | | | | | | | | | | | | | This is a cosmetic change only; there is no change in behaviour. * lisp/emacs-lisp/bytecomp.el: * src/bytecode.c (BYTE_CODES, exec_byte_code): Update and/or remove incorrect, outdated or useless comments. Clarify. Reorder where appropriate. Rename Bsave_current_buffer to Bsave_current_buffer_OBSOLETE and Bsave_current_buffer_1 to Bsave_current_buffer, reflecting the state since 1996.
* | Remove unused function in bytecomp.elMattias Engdegård2022-06-231-12/+0
| | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-delete-first): Remove.
* | Document and test 'no-byte-compile' behavior.Philipp Stephani2022-06-211-0/+3
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Document behavior if 'no-byte-compile' is set. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-compile-file/no-byte-compile): New unit test. * test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el: New test file.
* | Check defface doc stringsLars Ingebrigtsen2022-06-211-6/+6
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-custom-declare-variable): We already warn about missing groups from byte-compile-normal-call, so this would be a double warning. (custom-declare-face) (byte-compile-file-form-custom-declare-face): Add doc string checking for defface.
* | Fix potential (goto-char nil) in byte-compile-warning-prefixAlan Mackenzie2022-06-201-2/+1
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Replace a wrong 'or' form involving OFFSET with simply OFFSET. This prevents OFFSET from possibly being nil in the first branch of the containing `if' form.
* | Add mechanism for gradually phasing in new byte compilation warningsLars Ingebrigtsen2022-06-191-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/Makefile.in (BYTE_COMPILE_FLAGS): Enable all byte compilation warnings. * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types): Add docstrings-non-ascii-quotes and document new semantics for `all' and t. (byte-compile--emacs-build-warning-types): New constant. (byte-compile-warning-enabled-p): Implement the new semantics. (byte-compile-docstring-style-warn): Reinstate the Unicode quote warning.
* | More aggressive bytecode split between top-level forms (bug#55972)Mattias Engdegård2022-06-181-5/+4
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-keep-pending): Allow bytecode split between all kinds of top-level forms, not just those with chunk handlers, to prevent individual chunks from growing too large. In particular this helps compilation of package-quickstart.el.
* | Simplify byte-compiler assuming cconv normalisationsMattias Engdegård2022-06-141-5/+2
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker) (byte-optimize-let-form, byte-optimize-letX): * lisp/emacs-lisp/bytecomp.el (byte-compile-unwind-protect): Simplify source optimisation and codegen code that can now rely on normalised let/let* and unwind-protect forms.
* | Run cconv for dynbound code as wellMattias Engdegård2022-06-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make cconv work for dynamically bound code and always run it. This allows later stages to benefit from transformations and normalisations in cconv. * lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Always run cconv. * lisp/emacs-lisp/cconv.el (cconv--analyze-function) (cconv-analyze-form): In dynbound code, treat all variable bindings as dynamic (lambda, let, let* and condition-case).
* | Normalise setq during macro-expansionMattias Engdegård2022-06-141-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Early normalisation of setq during macroexpand-all allows later stages, cconv, byte-opt and codegen, to be simplified and duplicated checks to be eliminated. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Normalise all setq forms to a sequence of (setq VAR EXPR). Emit warnings if necessary. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Simplify. * test/lisp/emacs-lisp/bytecomp-tests.el: Adapt and add tests. * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-nonvariable.el; * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el: New files.
* | Preserve doc string in `byte-compile` (bug#55830)Mattias Engdegård2022-06-081-0/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Don't transpose doc string and interactive spec, which must come in this order. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-function-attributes): New test.
* | Don't issue warnings for Unicode quotes for nowLars Ingebrigtsen2022-06-031-6/+0
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn): Remove warning for "Unicode quotes" for now (bug#55780).