summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Don't make a header if the user hasn't specified columns in vtableLars Ingebrigtsen2022-04-231-30/+36
| | | | | | | * lisp/emacs-lisp/vtable.el (vtable): (make-vtable): Store whether the user has specified the columns. (vtable-insert): Don't insert a header line or a header if the user hasn't specified the columns (bug#55075).
* Byte compiler: Prevent special forms' symbols being replaced by bare symbolsAlan Mackenzie2022-04-224-171/+173
| | | | | | | | | | | | | | | | | | These are symbols with position from source code, which should not be replaced by bare symbols in, e.g., optimization functions. * lisp/Makefile.in: (BYTE_COMPILE_FLAGS, compile-first case): Set max-specpdl-size to 5000 for the benefit of lisp/emacs-lisp/comp.el. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker) (byte-optimize--rename-var, byte-optimize-if, byte-optimize-letX) * lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel) (byte-compile-lambda) * lisp/emacs-lisp/cconv.el (cconv-convert) * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Preserve, e.g., (car form) in the byte compiler, when this form's car is a symbol with position of a special form, rather than replacing the symbol with a bare symbol, e.g. 'cond.
* Byte compiler: correct output warning message positions (part 2)Alan Mackenzie2022-04-222-4/+3
| | | | | | | | | 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.
* Further doc string quoting fixesLars Ingebrigtsen2022-04-221-1/+1
| | | | | | | | | | | | | | | * test/lisp/progmodes/cperl-mode-tests.el (cperl--run-test-cases): * lisp/simple.el (undo-equiv-table): * lisp/shell.el (shell-mode): (shell-mode): * lisp/recentf.el (recentf-mode): * lisp/org/ob-table.el (org-sbe): * lisp/net/eudc.el (eudc-rfc5322-cctext-token): * lisp/mail/ietf-drums-date.el (ietf-drums-date--slot-ranges): * lisp/faces.el (color-luminance-dark-limit): * lisp/erc/erc.el (erc-tls): * lisp/emacs-lisp/pcase.el (pcase-setq): Further quoting fixes in doc strings.
* Audit quoting the quote character in doc stringsLars Ingebrigtsen2022-04-225-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/regex-emacs-tests.el (regex-tests-compare): (regex-tests-compare): (regex-tests-match): * test/lisp/xml-tests.el (xml-parse-tests--qnames): * test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from): * test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset): * test/lisp/calc/calc-tests.el (calc-tests-equal): * lisp/window.el (get-lru-window): (get-mru-window): (get-largest-window): (quit-restore-window): (display-buffer): * lisp/vc/vc-rcs.el (vc-rcs-consult-headers): * lisp/url/url-auth.el (url-digest-auth-build-response): * lisp/tutorial.el (tutorial--find-changed-keys): * lisp/transient.el (transient-suffix-object): * lisp/textmodes/rst.el (rst-insert-list-new-item): * lisp/textmodes/bibtex.el (bibtex-clean-entry): * lisp/tab-bar.el (tab-bar--key-to-number): (toggle-frame-tab-bar): * lisp/ses.el (ses-recalculate-cell): (ses-define-local-printer): (ses-prin1): * lisp/progmodes/xref.el (xref--find-ignores-arguments): * lisp/progmodes/verilog-mode.el (verilog-single-declaration-end): * lisp/progmodes/tcl.el (tcl-mode-hook): * lisp/progmodes/gdb-mi.el (gdb-get-buffer-create): * lisp/progmodes/elisp-mode.el (elisp--xref-make-xref): * lisp/play/dunnet.el (dun-room-objects): * lisp/outline.el (outline--cycle-state): * lisp/org/ox-publish.el (org-publish-find-property): * lisp/org/ox-html.el (org-html--unlabel-latex-environment): * lisp/org/org-table.el (org-table-collapse-header): * lisp/org/org-plot.el (org--plot/prime-factors): * lisp/org/org-agenda.el (org-agenda--mark-blocked-entry): (org-agenda-set-restriction-lock): * lisp/org/ob-lua.el (org-babel-lua-read-string): * lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process): (org-babel-julia-evaluate-session): * lisp/org/ob-core.el (org-babel-default-header-args): * lisp/obsolete/mouse-sel.el (mouse-select): (mouse-select-secondary): * lisp/net/tramp.el (tramp-methods): * lisp/net/eww.el (eww-accept-content-types): * lisp/net/dictionary-connection.el (dictionary-connection-status): * lisp/minibuffer.el (completion-flex--make-flex-pattern): * lisp/mh-e/mh-mime.el (mh-have-file-command): * lisp/mh-e/mh-limit.el (mh-subject-to-sequence): (mh-subject-to-sequence-threaded): (mh-subject-to-sequence-unthreaded): * lisp/mail/feedmail.el (feedmail-queue-buffer-file-name): (feedmail-vm-mail-mode): * lisp/ls-lisp.el (ls-lisp--sanitize-switches): * lisp/keymap.el (key-valid-p): * lisp/international/ccl.el (ccl-compile-branch-blocks): * lisp/image/image-converter.el (image-convert): * lisp/gnus/spam.el (spam-backend-check): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/nnmairix.el (nnmairix-widget-other): * lisp/gnus/message.el (message-mailto): * lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article): * lisp/gnus/gnus-search.el (gnus-search-prepare-query): * lisp/frame.el (frame-size-history): * lisp/eshell/esh-var.el (eshell-parse-variable-ref): * lisp/eshell/em-dirs.el (eshell-expand-multiple-dots): * lisp/erc/erc-backend.el (erc-bounds-of-word-at-point): * lisp/emulation/cua-rect.el (cua--rectangle-operation): * lisp/emacs-lisp/text-property-search.el (text-property-search-forward): * lisp/emacs-lisp/package.el (package-desc-suffix): * lisp/emacs-lisp/faceup.el (faceup-test-explain): * lisp/emacs-lisp/comp.el (comp-curr-allocation-class): (comp-alloc-class-to-container): (comp-add-cstrs): (comp-remove-type-hints-func): (batch-byte+native-compile): * lisp/emacs-lisp/cl-macs.el (cl--optimize): * lisp/elec-pair.el (electric-pair--syntax-ppss): * lisp/doc-view.el (doc-view-doc-type): * lisp/cedet/semantic/symref.el (semantic-symref-tool-alist): (semantic-symref-hit-to-tag-via-db): (semantic-symref-hit-to-tag-via-buffer): * lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay): * lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map): * lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function): * lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions): * lisp/cedet/semantic.el (semantic-working-type): * lisp/cedet/ede/files.el (ede-flush-directory-hash): * lisp/calc/calc.el (calc--header-line): * lisp/auth-source.el (auth-source-pick-first-password): (auth-source--decode-octal-string): * etc/themes/modus-themes.el (modus-themes--paren): (modus-themes--agenda-habit): * admin/cus-test.el (cus-test-vars-with-changed-state): Fix quoting in doc strings. In code examples, the ' character is quoted with \\=, and regularize 'foo to `foo', and quote strings like "foo" instead of 'foo'.
* Fix map-into doc string exampleLars Ingebrigtsen2022-04-221-1/+1
| | | | * lisp/emacs-lisp/map.el (map-into): Fix quote quoting in example.
* Clarify cl-incf/decf doc stringsLars Ingebrigtsen2022-04-211-2/+8
| | | | | * lisp/emacs-lisp/cl-lib.el (cl-incf): (cl-decf): Clarify that nil isn't a valid value for X (bug#31715).
* Byte compiler: correct output warning message positionsAlan Mackenzie2022-04-181-7/+7
| | | | | | | | | | Correct the algorithm for determining the warning position to get the first symbol-with-position in byte-compile--form-stack. * lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos): Function renamed and amended from byte-compile--first-symbol. (byte-compile--warning-source-offset): Call the new function above rather than the old one.
* Byte compiler: remove symbol positions from byte-switch tablesAlan Mackenzie2022-04-181-7/+16
| | | | | | | | This fixes bug #54990. * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Remove positions from symbols with positions in byte-switch tables, by temporarily removing the entries from the table, and reinserting them amended.
* Merge from origin/emacs-28Eli Zaretskii2022-04-161-2/+6
|\ | | | | | | | | | | | | b201823f63 Describe problems with invoking Python on MS-Windows 880f2734c9 A better fix for bug#54800 5ee959aa87 Add a comment about cl-concatenate ab2b822b9b Revert "Make cl-concatenate an alias of seq-concatenate"
| * Add a comment about cl-concatenateLars Ingebrigtsen2022-04-131-0/+3
| | | | | | | | * lisp/emacs-lisp/cl-extra.el (cl-concatenate): Add a comment.
| * Revert "Make cl-concatenate an alias of seq-concatenate"Lars Ingebrigtsen2022-04-131-2/+3
| | | | | | | | | | | | | | This reverts commit 78f76fe16e2737b40694f82af28d17a90a21ed7b. The commit made calls to cl-concatenate bug out, since autoloading defalises doesn't work very well (bug#54901).
| * cl-generic.el: Fix bug#46722Stefan Monnier2022-04-061-1/+3
| | | | | | | | | | | | | | | | | | Fix longstanding bug due to unexpected interference via side-effect. * lisp/emacs-lisp/cl-generic.el (cl--generic-get-dispatcher): Copy the `dispatch` arg before storing it into the hash-table. Backport from `master` (cherrypick from commit 61f8f7f68f).
* | Enable dragging resizing final column in vtableLars Ingebrigtsen2022-04-151-3/+2
| | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-line): Insert the divider after the final column, too, so that the size can be dragged.
* | Add some mouse-face bits to vtableLars Ingebrigtsen2022-04-151-0/+2
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (make-vtable) (vtable--insert-header-line): Put mouse-face on draggable bits.
* | Tweak sorting indicator placement in vtableLars Ingebrigtsen2022-04-151-1/+8
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Tweak sorting indicator position.
* | Make the sorting indicator prettier in vtableLars Ingebrigtsen2022-04-151-14/+37
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Place the sorting indicator flush right in the heading.
* | Allow using faces for colors in vtableLars Ingebrigtsen2022-04-151-14/+45
| | | | | | | | | | | | | | | | * doc/misc/vtable.texi (Making A Table): Adjust color documentation. * lisp/emacs-lisp/vtable.el (make-vtable): Mix more. (vtable--compute-colors): Mix both foreground and background colors. (vtable--make-color-face, vtable--face-blend): New functions. (vtable--insert-line): Adjust usage.
* | Allow dragging the divider in vtableLars Ingebrigtsen2022-04-151-16/+36
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable): Add a keymap cache. (make-vtable): Allow dragging the divider. (vtable-insert): Don't put the table keymap over the entire line -- avoid the divider, which has its own keymap. (vtable--drag-resize-column): Adjust to the in-buffer divider dragging.
* | Fix off-by-one error in text-property-search-backwardLars Ingebrigtsen2022-04-151-1/+0
| | | | | | | | | | | | | | * lisp/emacs-lisp/text-property-search.el (text-property-search-backward): Fix off-by-one error -- this would result in not finding the previous (non-)match when at the first character in a field.
* | Allow dragging dividers in vtableLars Ingebrigtsen2022-04-141-10/+19
| | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow dragging dividers. (vtable--drag-resize-column): Adjust function.
* | Allow resizing vtable columns by draggingLars Ingebrigtsen2022-04-141-16/+31
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow resizing by dragging headers. (vtable--drag-resize-column): New function. (vtable-narrow-current-column): Refactor out common bits. (vtable--alter-column-width): To here. (vtable-widen-current-column): Rewrite to use vtable-narrow-current-column.
* | Make vtable remember user-altered column widthsLars Ingebrigtsen2022-04-141-0/+6
| | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable-narrow-current-column) (vtable-widen-current-column): Store the size to that it's respected on `g'.
* | Ensure that commands like { work on all frames in vtableLars Ingebrigtsen2022-04-141-13/+16
| | | | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--recompute-cache) (vtable--ensure-cache): New functions. (vtable-insert): Use it. (vtable--widths): Ditto.
* | Make vtable narrow/widen functions take a prefixLars Ingebrigtsen2022-04-141-8/+16
| | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable-narrow-current-column) (vtable-widen-current-column): Allow using the prefix to say how much to narrow/widen the columns.
* | Copy edit make-vtable codeLars Ingebrigtsen2022-04-141-6/+4
| | | | | | | | * lisp/emacs-lisp/vtable.el (make-vtable): Clean up code slightly.
* | Edit some vtable doc stringsLars Ingebrigtsen2022-04-141-2/+4
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (make-vtable, vtable): Improve doc strings.
* | Further divider fixes for vtableLars Ingebrigtsen2022-04-141-3/+9
| | | | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Don't insert the divider at the end. (vtable-narrow-current-column, vtable-widen-current-column): Don't error out when being called on the divider.
* | Fix dividers in vtable header linesLars Ingebrigtsen2022-04-141-2/+2
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Put the divider in the correct place in the header line.
* | Allow having dividers between columns in vtableLars Ingebrigtsen2022-04-141-32/+57
| | | | | | | | | | | | | | | | * doc/misc/vtable.texi (Making A Table): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a divider slot. (make-vtable): Accept :divider and :divider-width arguments. (vtable--insert-line, vtable--insert-header-line): Display the divider.
* | Allow putting alternating colors on vtable rowsLars Ingebrigtsen2022-04-141-11/+50
| | | | | | | | | | | | | | | | | | * doc/misc/vtable.texi (Making A Table): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add :row-colors. (make-vtable): Ditto. (vtable--compute-colors, vtable--color-blend): New functions. (vtable--insert-line): Take a line number argument and adjust callers.
* | Add a new `vtable' faceLars Ingebrigtsen2022-04-131-1/+7
| | | | | | | | | | | | * doc/misc/vtable.texi (Introduction): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a new face.
* | Add support for column background colors in vtableLars Ingebrigtsen2022-04-131-3/+12
| | | | | | | | | | | | | | | | * doc/misc/vtable.texi (Making A Table): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a column color element. (make-vtable): Use it. (vtable--insert-line): Insert the colors here.
* | Make list-times not include zero elementsLars Ingebrigtsen2022-04-131-1/+1
| | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Time Parsing): Mention %x. * lisp/calendar/time-date.el (format-seconds): Accept a new %x spec that removes trailing zeros (bug#54904). * lisp/emacs-lisp/timer-list.el (list-timers): Don't display trailing zero bits.
* | Fix marking upgrades for packages from ELPA or NonGNU ELPAPo Lu2022-04-131-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-menu--find-upgrades): Look inside ``external'' packages as well when searching for upgrades. (bug#54117)
* | Tweak how `M-q' in emacs-lisp-mode worksLars Ingebrigtsen2022-04-131-21/+41
| | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Only fill as strings inside strings (bug#31656). (lisp--fill-line-simple): New function to do simple sexp-based filling.
* | Fix eager macroexpansion cycle in cl-once-onlySean Whitton2022-04-121-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop syntax, with no functional change, but such that the loop does not expand into cl-psetq.
* | Add two classic Common Lisp macro-writing macrosSean Whitton2022-04-111-0/+51
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-with-gensyms, cl-once-only): New macros.
* | * lisp/emacs-lisp/macroexp.el (macroexp-let2*): Allow common shorthandStefan Monnier2022-04-111-3/+11
| |
* | Update docstrings for shortdoc.el FUNC lisp form APIKaushal Modi2022-04-101-15/+55
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Updated docstrings.
* | Improve package.el error messages on too-old EmacsenLars Ingebrigtsen2022-04-081-2/+6
| | | | | | | | | | * lisp/emacs-lisp/package.el (package-compute-transaction): Give a better error message on too-old Emacs versions (bug#54747).
* | OClosure: New function `function-documentation`Stefan Monnier2022-04-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in the original OClosure commit, OClosures (ab)use the bytecode's docstring slot to hold the OClosure's type. This currently prevents OClosures from having their own docstring. Introduce a new generic function `function-documentation` to fetch the docstring of a function, which can then be implemented in various different ways depending on the OClosure's type. * lisp/simple.el (function-documentation): New generic function. (bad-package-check): Strength-reduce `eval` to `symbol-value`. * src/doc.c (Fdocumentation): Use it. * lisp/emacs-lisp/oclosure.el (oclosure--accessor-docstring): New function. * test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test): Add test for accessor's docstrings.
* | Clarify read-answer-short/use-short-answers actionLars Ingebrigtsen2022-04-071-2/+8
| | | | | | | | | | | | | | * lisp/emacs-lisp/map-ynp.el (read-answer-short): Clarify what this variable affects (bug#54754). * src/fns.c (Fyes_or_no_p): Mention `use-short-answers'.
* | Fix minor-mode doc string quotingLars Ingebrigtsen2022-04-061-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): Fix double quoting of things like (default-value 'electric-pair-mode) (bug#54746).
* | OClosure: add support for `slot-value`Stefan Monnier2022-04-042-47/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/oclosure.el (oclosure--slot-index) (oclosure--slot-value, oclosure--set-slot-value): New functions. * lisp/emacs-lisp/eieio-core.el (eieio-oset, eieio-oref): Consolidate the type test. Use `oclosure--(set-)slot-value`. (eieio--validate-slot-value, eieio--validate-class-slot-value): Don't presume `class` is an EIEIO class. (eieio--class): Fix bogus `:type` info. (eieio--object-class): Simplify. (eieio--known-slot-name-p): New function. (eieio-oref, eieio-oref-default, eieio-oset-default): Use it. * test/lisp/emacs-lisp/oclosure-tests.el: Require `eieio`. (oclosure-test): Make `name` field mutable. (oclosure-test-slot-value): New test.
* | Further fixes for cl--generic-describe and (function ...)Lars Ingebrigtsen2022-04-041-7/+6
| | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl--generic-describe): Fix the #' problem for defmethods, too (bug#54628).
* | Rewrite string-greaterp and string> using string-lesspMattias EngdegÄrd2022-04-041-0/+11
| | | | | | | | | | | | | | | | | | Since string-lessp has its own byte-op, using it is much faster than calling string-greaterp even with the need to bind a temporary variable. * lisp/emacs-lisp/byte-opt.el (byte-optimize-string-greaterp): New. (string-greaterp, string>): Set byte-optimizer.
* | ; * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-value): Fix typo.Philipp Stephani2022-04-031-1/+1
| |
* | Have global minor modes say so in the doc stringLars Ingebrigtsen2022-04-031-9/+11
| | | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Allow saying whether it's a global minor mode or not. (easy-mmode--mode-docstring): Use it. (define-minor-mode): Pass in the data.
* | Fix bootstrap errors after previous easy-mmode changeLars Ingebrigtsen2022-04-022-33/+1
| | | | | | | | | | | | | | | | * lisp/subr.el (ensure-empty-lines, string-lines): Moved from subr-x so that they can be used in early bootstrap files. * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): Don't use string-empty-p because of bootstrap issues.