summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-run.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Consistently call alists "association list"Stefan Kangas2022-11-271-1/+1
| | | | | | | | | | * doc/lispref/compile.texi (Compiler Errors): * doc/misc/gnus.texi (Score File Format): * etc/NEWS.24: * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): * lisp/progmodes/gdb-mi.el (gdb-threads-list) (gdb-breakpoints-list, gdb-place-breakpoints): Prefer the term "association list" for alists.
* cl-generic: Fix `advertised-calling-convention` declarationsStefan Monnier2022-10-161-0/+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.
* Delete many items obsolete since 24.3Stefan Kangas2022-09-091-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-exposure-change-hook) (allout-structure-added-hook, allout-structure-deleted-hook) (allout-structure-shifted-hook): * lisp/arc-mode.el (archive-extract-hooks): * lisp/buff-menu.el (Buffer-menu-buffer+size-width): * lisp/calendar/timeclock.el (timeclock-modeline-display) (timeclock-modeline-display, timeclock-update-modeline): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist): * lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks): * lisp/cedet/semantic/edit.el (semantic-change-hooks) (semantic-edits-new-change-hooks) (semantic-edits-delete-change-hooks) (semantic-edits-reparse-change-hooks): * lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks): * lisp/comint.el (comint--unquote&expand-filename) (comint-unquote-filename): * lisp/custom.el (user-variable-p): * lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer) (dired-sort-set-modeline): * lisp/ebuff-menu.el (Electric-buffer-menu-mode): * lisp/emacs-lisp/byte-run.el (macro-declaration-function): * lisp/emacs-lisp/checkdoc.el (custom-print-functions) (checkdoc-comment-style-hooks): * lisp/emacs-lisp/cl-lib.el (custom-print-functions): * lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings): * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook): * lisp/eshell/esh-mode.el (eshell-status-in-modeline): * lisp/eshell/eshell.el (eshell-add-to-window-buffer-names) (eshell-remove-from-window-buffer-names): * lisp/faces.el (set-face-underline-p, font-list-limit): * lisp/files.el (automount-dir-prefix, toggle-read-only): * lisp/filesets.el (filesets-cache-fill-content-hooks): * lisp/frame.el (automatic-hscrolling): * lisp/generic-x.el (javascript-generic-mode) (javascript-generic-mode-hook): * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks): * lisp/gnus/nndiary.el (nndiary-request-create-group-hooks) (nndiary-request-update-info-hooks) (nndiary-request-accept-article-hooks): * lisp/htmlfontify.el (hfy-post-html-hooks): * lisp/international/mule-cmds.el (inactivate-current-input-method-function) (inactivate-input-method, input-method-inactivate-hook) (ucs-insert): * lisp/international/quail.el (quail-inactivate) (quail-inactivate-hook): * lisp/international/robin.el (robin-inactivate) (robin-inactivate-hook): * lisp/leim/quail/hangul.el (hangul-input-method-inactivate): * lisp/leim/quail/uni-input.el (ucs-input-inactivate): * lisp/mail/emacsbug.el (report-emacs-bug-info): * lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks): * lisp/mpc.el (mpc-string-prefix-p): * lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks) (rcirc-receive-message-hooks, rcirc-activity-hooks): * lisp/obsolete/crisp.el (crisp-mode-modeline-string): * lisp/pcomplete.el (pcomplete-arg-quote-list) (pcomplete-quote-argument): * lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks): * lisp/progmodes/python.el (python-info-ppss-context) (python-info-ppss-context-type) (python-info-ppss-comment-or-string-p, python-indent) (python-guess-indent, python-buffer, python-preoutput-result) (python-proc, python-send-receive, python-send-string) (python-use-skeletons): * lisp/progmodes/sh-script.el (sh-maybe-here-document): * lisp/replace.el (query-replace-interactive): * lisp/strokes.el (strokes-modeline-string): * lisp/subr.el (redraw-modeline): * lisp/term.el (term-default-fg-color, term-default-bg-color): * lisp/textmodes/tex-mode.el (latex-string-prefix-p) (tex-string-prefix-p): * lisp/url/url-parse.el (url-recreate-url-attributes): * lisp/vc/add-log.el (change-log-acknowledgement): * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically): * lisp/vc/pcvs-util.el (cvs-string-prefix-p): * lisp/vc/vc.el (vc-string-prefix-p): * lisp/window.el (display-buffer-function): * lisp/winner.el (winner-mode-leave-hook): Remove many functions and variables obsolete since 24.3. * lisp/buff-menu.el (list-buffers--refresh): * lisp/dired.el (dired-mode-map): * lisp/files.el (abbreviate-file-name): * lisp/generic-x.el (generic-default-modes): * lisp/mh-e/mh-funcs.el (mh-kill-folder): * lisp/progmodes/hideif.el (hide-ifdef-mode-submap): * lisp/replace.el (query-replace-read-from): * lisp/term.el (term): * lisp/window.el (display-buffer): Don't use above deleted functions and variables. * src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete since 24.3. (syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr. * lisp/subr.el (buffer-has-markers-at): Remove obsoletion of above deleted DEFUN. * etc/TODO: Doc fix; don't mention above deleted function. * admin/cus-test.el (cus-test-get-options): * lisp/pcomplete.el: Doc fixes; don't mention removed items. ; * etc/NEWS: List removed items.
* Make it possible to mark generalized variables as obsoleteLars Ingebrigtsen2022-08-211-1/+0
| | | | | | | | | | | | | | | * 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.
* Allow specifying how args are to be stored in `command-history'Lars Ingebrigtsen2022-08-081-1/+16
| | | | | | | | | | | | | | | * doc/lispref/functions.texi (Declare Form): Document `interactive-args' * lisp/replace.el (replace-string): Store the correct interactive arguments (bug#45607). * lisp/emacs-lisp/byte-run.el (byte-run--set-interactive-args): New function. (defun-declarations-alist): Use it. * src/callint.c (fix_command): Remove the old hack (which now longer works since interactive specs are byte-compiled) and instead rely on `interactive-args'.
* Fix `lsh` warning shortcomings (bug#56641)Mattias Engdegård2022-07-231-1/+1
| | | | | | | | | | | | | Reported by Basil Contovounesios. * etc/NEWS: Mention how to suppress the warning. * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string. * lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning until codegen time (which makes it suppressible) and to prevent repeated warnings. * test/lisp/international/ccl-tests.el (shift): * test/src/data-tests.el (data-tests-ash-lsh): Suppress warning in tests of `lsh` itself.
* Don't quote numbers in byte-run--set-*Lars Ingebrigtsen2022-06-171-2/+6
| | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-doc-string) (byte-run--set-indent): Don't quote numbers (bug#48145).
* Don't quote the `when' form in obsoletionsLars Ingebrigtsen2022-06-171-1/+1
| | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-obsolete): The `when' is a string (or nil), so don't quote it (bug#48145). * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form): Adjust folding.
* Warn about misplaced or duplicated function/macro declarationsMattias Engdegård2022-06-171-91/+117
| | | | | | | | | | | | | | Doc strings, `declare` and `interactive` forms must appear in that order and at most once each. Complain if they don't, instead of silently ignoring the problem (bug#55905). * lisp/emacs-lisp/byte-run.el (byte-run--parse-body) (byte-run--parse-declarations): New. (defmacro, defun): Check for declaration well-formedness as described above. Clarify doc strings. Refactor some common code. * test/lisp/emacs-lisp/bytecomp-resources/fun-attr-warn.el: * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-fun-attr-warn): New test.
* Audit symbol quoting in Lisp doc stringsLars Ingebrigtsen2022-05-241-1/+1
| | | | | | | | | | | | * lisp/vc/vc-svn.el (vc-svn-dir-status-files): * lisp/so-long.el (so-long-mode-maintain-preserved-variables): * lisp/help-fns.el (help-fns--most-relevant-active-keymap): * lisp/gnus/nnselect.el (nnselect-get-artlist): (nnselect-store-artlist): * lisp/forms.el (forms-enumerate): * lisp/ffap.el (ffap-string-at-point): * lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias): Audit symbol quoting in Lisp doc strings.
* Fix previous warning suppression changeLars Ingebrigtsen2022-05-221-1/+1
| | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn) (byte-compile-subr-wrong-args): * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): * lisp/cedet/semantic/fw.el (semantic-install-function-overrides): The `wrong-args' warning is really called `callargs'.
* Allow suppressing messages about the wrong number of argumentsLars Ingebrigtsen2022-05-221-1/+1
| | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Add `wrong-args'. * lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn) (byte-compile-subr-wrong-args): Allow suppressing wrong number of arguments.
* Byte compiler: correct output warning message positions (part 2)Alan Mackenzie2022-04-221-2/+1
| | | | | | | | | A supplementary commit to that on 2022-04-18: * lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos): Handle vectors and records correctly. * lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen): Correct the doc string.
* Restore call to byte-run-strip-symbol-positions in byte-compile-outAlan Mackenzie2022-03-061-1/+2
| | | | | | | | | | Also increment a loop counter. This should fix bug #54248. * lisp/emacs-lisp/byte-run.el (byte-run--strip-vector/record): increment the loop counter 'i' in the main loop. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): call byte-run-strip-symbol-positions on operands which are one-element lists.
* Amend byte-run-strip-symbol-positions so that an unexec build buildsAlan Mackenzie2022-02-241-42/+56
| | | | | | | | | | | | | | | This fixes bug #54098. * lisp/emacs-lisp/byte-run.el (byte-run--strip-list) (byte-run--strip-vector/record): New functions. These alter a list or vector/record structure only where a symbol with position gets replaced by a bare symbol. (byte-run-strip-symbol-positions): Reformulate to use the two new functions. (function-put): No longer strip positions from the second and third arguments. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): Remove the senseless "stripping" of putative symbol positions from OPERAND, which is nil or a number.
* (macroexp-warn-and-return): Fix bug#53618Stefan Monnier2022-02-191-4/+2
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Reorder arguments to preserve compatibility with that of Emacs-28. (macroexp--unfold-lambda, macroexp--expand-all): * lisp/emacs-lisp/pcase.el (pcase-compile-patterns, pcase--u1): * lisp/emacs-lisp/gv.el (gv-ref): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default) (eieio-oset-default): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet, cl-defstruct): * lisp/emacs-lisp/cl-generic.el (cl-defmethod): * lisp/emacs-lisp/byte-run.el (defmacro, defun): * lisp/emacs-lisp/bindat.el (bindat--type): Adjust accordingly.
* Fix symbols with position appearing in the output of `compile-defun'Alan Mackenzie2022-02-191-50/+27
| | | | | | | | | | | | | | | | | | | | | | | | | This happened with the tags of a condition-case. Also fix the detection of circular lists while stripping the positions from symbols with position. * lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove. (byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or vector/record encountered. (This is to prevent loops with circular structures.) This is now done for all arguments, not just those detected as circular lists. * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar) (byte-compile-form, byte-compile-dynamic-variable-op) (byte-compile-constant, byte-compile-push-constant): Remove redundant calls to `bare-symbol'. (byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist. (byte-compile-out): call `byte-run-strip-symbol-positions' on the operand. This is the main call to this function in bytecomp.el. * src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol with position. (hash_lookup): No longer strip a position from a symbol with position. (sxhash_obj): Add handling for symbols with position, substituting their bare symbols when symbols with position are enabled.
* Fix with-suppressed-warnings edebug specLars Ingebrigtsen2022-01-311-1/+1
| | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Fix edebug spec.
* Commit fixes and enhancements to the scratch/correct-warning-pos branchAlan Mackenzie2022-01-141-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer strip positions from symbols before each use of a form, instead relying on the low level C routines to do the right thing. Instead strip them from miscellaneous places where this is needed. Stip them alson in `function-put'. Push forms onto byte-compile-form-stack and pop them "by hand" rather than by binding the variable at each pushing, so that it will still have its data after an error has been thrown and caught by a condition case. This gives an source position to the ensuing error message. * lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen, byte-run--circular-list-p) (byte-run--strip-s-p-1, byte-run-strip-symbol-positions): New functions and variables, which together implement stripping of symbol positions. The latest (?final) version modifies the argument in place rather than making a copy. (function-put): Strip symbol positions from all of the arguments before doing the `put'. * lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): has been renamed to byte-compile-form-stack and moved to macroexp.el. (byte-compile-initial-macro-environment (eval-and-compile)): Replace macroexpand-all-toplevel with macroexpand--all-toplevel. (displaying-byte-compile-warnings): bind byte-compile-form-stack here. (byte-compile-toplevel-file-form, byte-compile-form): Push the top level form onto byte-compile-form-stack (whereas formally the variable was bound at each pushing). Manually pop this from of the variable at the end of the function. * lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Remove the symbol stripping. * lisp/emacs-lisp/comp.el (comp--native-compile): Set max-specpdl-size to at least 5000 (previously it was 2500). Bind print-symbols-bare to t. * lisp/emacs-lisp/macroexp.el (byte-compile-form-stack): Definition move here from bytecomp.el for easier compilation. (byte-compile-strip-symbol-positions and associated functions): Removed. (macro--expand-all): push argument FORM onto byte-compile-form-stack at the start of this function, and pop it off at the end. (internal-macroexpand-for-load): No longer strip symbol positions. Bind symbols-with-pos-enabled and print-symbols-bare to t. * lisp/help.el (help--make-usage): Strip any position from argument ARG. * src/fns.c (Fput): No longer strip symbol positions from any of the arguments.
* Merge branch 'master' into scratch/correct-warning-posAlan Mackenzie2022-01-111-1/+2
|\
| * Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| | * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| | |
| * | ; 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.
* | | Several amendments to scratch/correct-warning-pos.Alan Mackenzie2021-12-011-1/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The position return by read-positioning-symbols is now the position in the buffer, rather than the offset from the start of a form, enabling warning positions in other parts of the buffer to be output. * src/lisp.h (lisp_h_EQ): Add XLI casts so that it compiles cleanly. * src/data.c (Fremove_pos_from_symbol): New DEFUN. * src/lread.c (readchar_count): renamed to readchar_offset. (read_internal_start) Initialize readchar_offset to the buffer's point when STREAM is a buffer. * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Amend to use OFFSET as a buffer position, not an offset from the start of a form. (byte-compile-warn): Remove symbol positions from any shape of ARGS, not just a symbol with position. * lisp/emacs-lisp/cconv.c (cconv-convert): In the :unused case, position the new IGNORE symbol with the VAR it has replaced. * lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap, macroexp-warn-and-return): Add an extra position parameter to each. * lisp/emacs-lisp/bindat.el (bindat-type), lisp/emacs-lisp/byte-run.el (defmacro, defun), lisp/emacs-lisp/cconv.el (cconv--convert-func-body) (cconv-convert), lisp/emacs-lisp/cl-generic.el (cl-defmethod), lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet, cl-defstruct), lisp/emacs-lisp/easy-mmode.el (define-minor-mode), lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default) (eieio-oset-default), lisp/emacs-lisp/eieio.el (defclass), lisp/emacs-lisp/gv.el (gv-ref), lisp/emacs-lisp/macroexp.el (macroexp-macroexpand, macroexp--unfold-lambda, macroexp--expand-all), lisp/emacs-lisp/pcase.el (pcase-compile-patterns, pcase--u1): Add an extra position argument to each call of macroexp-warn-and-return.
* / 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
|\|