summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve doc strings of a recent commitEli Zaretskii2021-09-184-6/+9
| | | | | | | | * lisp/emacs-lisp/generator.el (iter-defun): * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): * lisp/emacs-lisp/autoload.el (autoload-insert-section-header): Include description of arguments in the doc string's first line.
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-1820-37/+37
|
* * lisp/emacs-lisp/checkdoc.el: Doc fix; mention flymake.Stefan Kangas2021-09-181-3/+4
|
* Do interactive mode tagging for checkdoc.elStefan Kangas2021-09-181-9/+9
|
* checkdoc: Only look for commonly used modifier keysStefan Kangas2021-09-181-1/+3
| | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Search for the modifier key "s-", but not the modifier key "A-". The latter is very uncommon and leads to false positives.
* checkdoc: 'y-or-n-p' no longer needs spaceStefan Kangas2021-09-171-50/+32
| | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): Change 'y-or-n-p' check to accept prompt ending with both "? " or "?", that is, it no longer needs the space. (Bug#50621) (checkdoc--fix-y-or-n-p): New helper function. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-fix-y-or-n-p) (checkdoc-tests-fix-y-or-n-p/no-change) (checkdoc-tests-fix-y-or-n-p/with-space): New tests.
* Improve performance of seq-unionStefan Kangas2021-09-171-7/+7
| | | | | * lisp/emacs-lisp/seq.el (seq-union): Improve performance by using nreverse instead of seq-reverse.
* Make ediff-union into obsolete alias for seq-unionStefan Kangas2021-09-171-0/+1
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-union): Autoload. * lisp/vc/ediff-util.el (ediff-union): Make into obsolete function alias for 'seq-union'. * lisp/vc/ediff-mult.el (ediff-intersect-directories): Update single caller.
* Add new sequence function 'seq-union'Stefan Kangas2021-09-172-0/+13
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-union): New function. * doc/lispref/sequences.texi (Sequence Functions): * lisp/emacs-lisp/shortdoc.el (sequence): Document above new function. * test/lisp/emacs-lisp/seq-tests.el (test-seq-union): New test.
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-3/+3
|
* Support '...' quoting in Lisp filesEli Zaretskii2021-09-161-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Support quoting 'like this'.
* Prefer "website" to "homepage"Stefan Kangas2021-09-162-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These days, a "home page" is understood to be only "the main web page of a website" or "landing page", whereas a "website" is "a collection of web pages and related content" (Wikipedia). * doc/emacs/emacs.texi (Top): * doc/emacs/package.texi (Package Menu): * doc/lispintro/emacs-lisp-intro.texi (Top): * doc/lispref/elisp.texi (Top): * doc/lispref/tips.texi (Documentation Tips): * doc/misc/ede.texi (ede-project): * doc/misc/efaq-w32.texi (More information): * doc/misc/gnus-faq.texi (FAQ 5-7): * doc/misc/gnus.texi (About mairix): * doc/misc/mairix-el.texi (About): * doc/misc/reftex.texi (AUCTeX, Imprint): * lisp/cedet/ede/base.el (ede-project): * lisp/cedet/ede/system.el (ede-web-browse-home): * lisp/emacs-lisp/package.el (package-menu-mode-menu) (package-browse-url): * lisp/erc/erc-button.el (erc-emacswiki-url): * lisp/filesets.el (filesets-goto-homepage): * lisp/net/mairix.el: * lisp/net/webjump.el (webjump-sample-sites): * lisp/obsolete/vc-arch.el: * lisp/progmodes/idlw-shell.el (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave, idlwave-mode): * lisp/textmodes/reftex-vars.el (reftex): Prefer "website" to "home page". * doc/lispref/tips.texi (Documentation Tips): Sort the "URL" header comment before "Homepage". * lisp/emacs-lisp/lisp-mnt.el (lm-website): Rename from 'lm-homepage'. (lm-homepage): Make into alias for 'lm-website'.
* Various minor checkdoc tweaksStefan Kangas2021-09-161-5/+15
| | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add more "good" words that are used a lot in practice, and where using them doesn't really hurt the quality of the documentation. (checkdoc-proper-noun-list): Add "dired", remove "ispell"; the latter should not always be capitalized. (checkdoc-common-verbs-wrong-voice): Add some more common words. Don't check for "matches" as it leads to too many false positives and almost no fixes in practice. (checkdoc-this-string-valid-engine): Clarify comment. (checkdoc-in-abbreviation-p): Ignore some less common or non-standard abbreviations.
* checkdoc: Don't warn about command substitutions by defaultStefan Kangas2021-09-151-15/+20
| | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-max-keyref-before-warn): Add new valid value nil meaning to never warn about too many command substitutions, and use this value as the default. This is no longer a performance problem on modern machines. (Bug#50599) (checkdoc-this-string-valid-engine): Respect above new valid value nil.
* * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Fix type.Glenn Morris2021-09-141-1/+1
|
* Make `find-function-source-path' into obsolete aliasLars Ingebrigtsen2021-09-141-30/+20
| | | | | | | | | | | * lisp/finder.el (finder-commentary): Adjust usage. * lisp/emacs-lisp/find-func.el (find-function-source-path): Made into obsolete alias (bug#50508). (find-library-source-path): New name. (find-library-name, find-library, find-function-noselect) (find-variable-noselect, find-definition-noselect): Adjust usage and update doc strings.
* ; * lisp/emacs-lisp/checkdoc.el: Fix typo in previous commit.Stefan Kangas2021-09-141-1/+1
|
* ; More minor docfixes found by checkdocStefan Kangas2021-09-1424-117/+119
|
* Add user option to avoid checkdoc warning for unescaped left parenStefan Kangas2021-09-141-10/+19
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-column-zero-backslash-before-paren): New user option to avoid warning on unescaped left parenthesis in column zero. (checkdoc-this-string-valid-engine): Respect above new option.
* Minor improvements to checkdocStefan Kangas2021-09-141-7/+9
| | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add ignored values. (checkdoc-proper-noun-list): Remove XEmacs from list of words to capitalize; there is little need to insist on consistency here. (checkdoc-in-abbreviation-p): Add abbreviation "etc." and sort entries alphabetically.
* package-menu-execute doc string clarificationLars Ingebrigtsen2021-09-131-2/+4
| | | | | * lisp/emacs-lisp/package.el (package-menu-execute): Say what happens to upgrade-marked packages (bug#50551).
* Mention get-byte in shortdocLars Ingebrigtsen2021-09-131-0/+3
| | | | * lisp/emacs-lisp/shortdoc.el (buffer): Mention `get-byte' here.
* Improve checkdoc abbreviation handlingStefan Kangas2021-09-131-10/+26
| | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): New helper function. (checkdoc-sentencespace-region-engine): Fix handling abbreviations after escaped parenthesis. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-in-abbrevation-p) (checkdoc-tests-in-abbrevation-p/with-parens) (checkdoc-tests-in-abbrevation-p/with-escaped-parens): New tests.
* Fix quoting style in Lisp commentsEli Zaretskii2021-09-121-1/+1
| | | | | | | | | | | * lisp/textmodes/rst.el: * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): * lisp/org/org.el: * lisp/org/org-list.el (org-list-to-generic): * lisp/org/org-compat.el: * lisp/hexl.el (hexl-ascii-region): * lisp/emacs-lisp/lisp-mode.el: * lisp/calendar/calendar.el: In comments, quote 'like this'.
* ; Fix symbol quoting typosStefan Kangas2021-09-122-2/+2
|
* Remove obsolete variableMattias Engdegård2021-09-111-59/+32
| | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize--vars-outside-condition): Remove. (byte-optimize-form-code-walker): Remove bindings.
* Propagate aliased lexical variables in byte compilerMattias Engdegård2021-09-111-17/+140
| | | | | | | | | | | | | | | | | | | | | | Replace uses of a variable aliasing another variable with that aliased variable, to allow for variable removal when possible. This also enables opportunities for other optimisations. Example: (let ((y x)) (f y)) => (f x) The optimisation is only performed if both aliased and aliasing variables are lexically bound. Shadowing bindings are α-renamed when necessary for correctness. Example: (let* ((b a) (a EXPR)) (f a b)) => (let* ((a{new} EXPR)) (f a{new} a)) * lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars): New. (byte-optimize-form-code-walker): Cancel aliasing upon mutation. (byte-optimize--rename-var-body, byte-optimize--rename-var): New. (byte-optimize-let-form): Add the optimisation. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add relevant test cases.
* ; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.Eli Zaretskii2021-09-111-1/+1
|
* Add support for GCC compiler command-line optionsArthur Miller2021-09-102-0/+21
| | | | | | | | | * lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support for new 'native-comp-compiler-options'. * src/comp.c (Fcomp_native_compiler_options_effective_p): New function. (add_compiler_options): New function. (Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
* Normalise nested `progn` forms in byte-code optimiserMattias Engdegård2021-09-061-2/+6
| | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-body): Flatten body. This simplifies the source tree and reduces the number of different cases that other optimisations need to take into account.
* More robust optimisation of `ignore`Mattias Engdegård2021-09-062-8/+9
| | | | | | | | | | | | | | Treat `ignore` as any other function during source-level optimisation, to avoid having its warning-suppression effects cancelled by repeated passes. Instead, define a custom code generation function. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't treat `ignore' specially here. (side-effect-free-fns): Don't mark `ignore` as side-effect-free or error-free (although it is), since that would allow the optimiser to elide calls. * lisp/emacs-lisp/bytecomp.el (ignore, byte-compile-ignore): Define and register a code-gen function.
* Optimise `member` and `assoc` (etc) with constant empty listMattias Engdegård2021-09-061-25/+41
| | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-assq): New. (byte-optimize-member, byte-optimize-assoc, byte-optimize-memq): When the list argument is constant nil, the result is always nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* Restore the debugging window size more reliablymartin rudalics2021-09-061-10/+9
| | | | | * lisp/emacs-lisp/debug.el (debug): Restore the debugging window size more reliably (bug#12921).
* Autoload cl-struct-slot-infoLars Ingebrigtsen2021-09-051-0/+1
| | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-info): Autoload (bug#50301). * test/lisp/emacs-lisp/memory-report-tests.el: Don't require cl-macs.
* * lisp/emacs-lisp/timer.el (timer-create): Don't inline itStefan Monnier2021-09-041-1/+7
|
* Fix `describe-function' for autoloaded adviced functionsLars Ingebrigtsen2021-09-031-25/+34
| | | | | | | * lisp/emacs-lisp/nadvice.el (advice--make-single-doc): Factor out. (advice--make-docstring): From here (bug#23523). Also include advices for autoloads.
* ; Fix typosStefan Kangas2021-09-032-2/+2
|
* Make recent timer changes more backwards-compatibleLars Ingebrigtsen2021-09-031-2/+6
| | | | | | * lisp/emacs-lisp/timer.el (timerp, timer-event-handler): Make backwards-compatible with old .elc files that have their own versions of `timer-create'd structures.
* Reformat up-list and backward-up-list doc stringsLars Ingebrigtsen2021-09-021-12/+20
| | | | | | * lisp/emacs-lisp/lisp.el (backward-up-list): Reformat the doc string into several paragraphs (bug#31349). (up-list): Ditto and fix the "start" to be "end".
* memory-report: support calculating size for structuresYikai Zhao2021-09-021-1/+14
| | | | | * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Add support for cl-defstruct types (bug#50301).
* Fix (setf (map-elt map key) (my-func))Lars Ingebrigtsen2021-09-011-8/+10
| | | | | * lisp/emacs-lisp/map.el (map-elt): Ensure that the value isn't referenced more than once (bug#50290).
* Make run-at-time try harder to run at integral multiplesLars Ingebrigtsen2021-08-311-34/+47
| | | | | | | | | | | * lisp/emacs-lisp/timer.el (timer): Add new slot integral-multiple. (timerp): Adjust. (timer-event-handler): Recompute the delay if requested (bug#39099). (run-at-time): Mark the timer as recomputable if given a t parameter. * src/keyboard.c (decode_timer): Adjust.
* Don't overly truncate tabulated-list headersLars Ingebrigtsen2021-08-271-23/+35
| | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header): Don't overly truncate headers that are before a right-aligned column (bug#44594). (tabulated-list--available-space): Separated out into own function... (tabulated-list-print-col): ... from here.
* Put advice documentation at the end of the displayed doc stringLars Ingebrigtsen2021-08-271-2/+6
| | | | | | | | * lisp/emacs-lisp/nadvice.el (advice--make-docstring): Put the advice things at the end of the documentation (bug#50222). It's important to have the first line of the original documentation remain the first line, because it's used when doing one-line summaries of the function.
* * Forward `comp-file-preloaded-p' to async workersAndrea Corallo2021-08-271-1/+2
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Forward `comp-file-preloaded-p' to async workers.
* tabulated-list-print delete excess linesShitikanth Kashyap2021-08-251-0/+2
| | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Ensure that we delete remaining lines if the list has gotten shorter (bug#50194). Copyright-paperwork-exempt: yes
* Add example of advanced user-defined Rx form to manualMattias Engdegård2021-08-231-1/+2
| | | | | | | * doc/lispref/searching.texi (Extending Rx): Add example illustrating how to define a user-defined Rx form that performs computation, from a discussion with Michael Herdeegen (bug#50136). * lisp/emacs-lisp/rx.el (rx): Clarify evaluation time for `eval`.
* Improve byte-compile-warnings doc stringLars Ingebrigtsen2021-08-231-2/+3
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Mention 'byte-compile-docstring-max-column'.
* ; * lisp/emacs-lisp/comp.el (native-comp-async-cu-done-functions): Doc fix.Eli Zaretskii2021-08-221-3/+3
|
* Clarify cl-defstruct doc string and manual entry somewhatLars Ingebrigtsen2021-08-211-10/+15
| | | | | | | | | * doc/misc/cl.texi (Structures): Rename the slot "name" in the examples to "first-name", since we're talking about the names of slots a lot here, and having a slot with the name "name" makes the examples somewhat confusing. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Clarify certain things about slots (bug#14278).