summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/shortdoc.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix 'shortdoc-copy-function-as-kill'Eli Zaretskii2024-03-161-1/+1
| | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-copy-function-as-kill): Fix handling of functions with no arguments. (Bug#69720)
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Fix 'add-face-text-property' shortdocEshel Yaron2023-11-141-1/+1
| | | | | * lisp/emacs-lisp/shortdoc.el (text-properties): Add missing ':no-eval' keyword. (Bug#67138)
* Improve natnump shortdocRobert Pluim2023-07-041-3/+4
| | | | | | * lisp/emacs-lisp/shortdoc.el (number): Make it clear that zero satisfies 'natnump'. Move 'natnump' next to 'cl-plusp' to highlight the difference between them.
* * lisp/emacs-lisp/shortdoc.el: More and better `substring` examples.Mattias Engdegård2023-06-241-2/+4
| | | | Suggested by Juri Linkov.
* Add 'process-status' to process shortdocRobert Pluim2023-02-211-0/+3
| | | | * lisp/emacs-lisp/shortdoc.el (process): Add 'process-status'.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix misspelled functions in shortdoc groupsStefan Kangas2022-12-311-4/+4
| | | | | | | * lisp/emacs-lisp/shortdoc.el (file, list): Fix misspelled function names: 'file-writable-p' and 'seq-reduce'. * test/lisp/emacs-lisp/shortdoc-tests.el (subr-x): Require. (shortdoc-all-functions-fboundp): New test.
* Add more functions to "string" shortdocXi Lu2022-12-241-0/+9
| | | | | * lisp/emacs-lisp/shortdoc.el: Add 'string-or-null-p', 'char-or-string-p', 'char-uppercase-p'. (Bug#60279)
* ; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous commitMattias Engdegård2022-12-141-4/+4
|
* Better shortdoc examplesMattias Engdegård2022-12-141-32/+106
| | | | | | | | * lisp/emacs-lisp/shortdoc.el (symbol, comparison): New. (string, list, number): Remove or change examples that do not have well-defined results, such as `eq` on strings or floats. Edit other examples for better illustrating each respective operation.
* Shortdoc: read and evaluate strings after :evalMattias Engdegård2022-12-141-7/+9
| | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): If the parameter of :eval is a string then read, evaluate and print the result. This was always the intention and is documented behaviour.
* * lisp/outline.el (outline-search-function): New variable (bug#53981).Juri Linkov2022-11-211-4/+14
| | | | | | | | | | | | | | | | | | | | | | (outline-font-lock-keywords, outline-font-lock-face) (outline-minor-mode-highlight-buffer, outline-next-preface) (outline-next-heading, outline-previous-heading) (outline-back-to-heading, outline-on-heading-p, outline-demote) (outline-map-region, outline-next-visible-heading) (outline-hide-sublevels, outline-up-heading): Use outline-search-function when it's non-nil as an alternative to searching outline-regexp. (outline-search-level, outline-search-text-property): New functions. * lisp/apropos.el (apropos-mode): Set outline-search-function instead of unreliable outline-regexp. (apropos-print): Add text property outline-level. * lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Add text property outline-level on text separate from final newlines. (shortdoc-display-group): Add a narrow newline to not show text properties of the final line when the outline is hidden. (shortdoc--display-function): Add text property outline-level. (shortdoc-mode): Set buffer-local outline-search-function and outline-level.
* * lisp/emacs-lisp/shortdoc.el (sequence): Don't use cl-lib (bug#59319)Juanma Barranquero2022-11-171-4/+4
|
* Mention seq-keep in shortdocLars Ingebrigtsen2022-10-081-0/+2
| | | | * lisp/emacs-lisp/shortdoc.el (sequence): Mention seq-keep.
* ; Clarify wording of some doc strings in shortdoc.elEli Zaretskii2022-09-251-4/+4
| | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-next, shortdoc-previous) (shortdoc-next-section, shortdoc-previous-section): Clarify wording.
* Improve shortdoc documentationStefan Kangas2022-09-251-8/+17
| | | | | | | | | * doc/emacs/help.texi (Name Help): * doc/lispref/help.texi (Documentation Groups): Refer to 'shortdoc' convenience alias instead of 'shortdoc-display-group'. * lisp/emacs-lisp/shortdoc.el: Add Commentary. (shortdoc-next, shortdoc-previous) (shortdoc-next-section, shortdoc-previous-section): Doc fixes.
* Fix shortdoc movement commandsStefan Kangas2022-09-251-1/+1
| | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Don't skip over current function or section when searching.
* Add new command 'shortdoc-copy-function-as-kill'Stefan Kangas2022-09-251-1/+16
| | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-copy-function-as-kill): New command. (shortdoc-mode-map): Bind above new command to "w".
* Bind "N"/"P" to next/prev section in shortdocStefan Kangas2022-09-251-0/+2
| | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Bind "N" and "P" to 'shortdoc-next-section' and 'shortdoc-previous-section'.
* Rename file-name-directoryLars Ingebrigtsen2022-09-241-5/+5
| | | | | | | * lisp/emacs-lisp/shortdoc.el (file-name): * doc/lispref/files.texi (Directory Names): Adjust. * lisp/files.el (file-name-parent-directory): Rename from `file-name-directory' (bug#58039).
* * lisp/emacs-lisp/shortdoc.el (file-name): Improve examples.Stefan Kangas2022-09-241-4/+2
|
* Add new function `seq-positions'Damien Cassou2022-09-041-0/+4
| | | | | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-positions): New function. * lisp/emacs-lisp/shortdoc.el (sequence): Mention it. * test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it (bug#57548).
* Add new function `seq-remove-at-position'Damien Cassou2022-09-041-0/+3
| | | | | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-remove-at-position): New function. * lisp/emacs-lisp/shortdoc.el (sequence): Mention it. * test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position): Test it.
* ; * lisp/emacs-lisp/shortdoc.el (buffer): Improve sorting.Stefan Kangas2022-08-221-2/+2
|
* Mention delete-line in shortdocLars Ingebrigtsen2022-08-211-0/+2
| | | | * lisp/emacs-lisp/shortdoc.el (buffer): Mention delete-line.
* * lisp/emacs-lisp/shortdoc.el (buffer): Add missing functionsMattias Engdegård2022-08-211-0/+5
| | | | | Add preceding-char and char-before because following-char and char-after were already there.
* Rename newly-added eol/bol functions to pos-eol/pos-bolLars Ingebrigtsen2022-08-211-4/+4
| | | | | | | * lisp/emacs-lisp/shortdoc.el (buffer): * doc/lispref/positions.texi (Text Lines): Adjust. * src/editfns.c (Fpos_bol): Rename from Fpos. (Fpos_eol): Rename from Feol.
* Add new functions eol and bolLars Ingebrigtsen2022-08-191-0/+12
| | | | | | | | | | | | | * doc/lispref/positions.texi (Text Lines): Document them * lisp/emacs-lisp/shortdoc.el: Mention them, and also the buffer/line predicates. * src/editfns.c (bol): New function. (Fbol): New defun. (Fline_beginning_position): Use `bol'. (eol): New function. (Feol): New defun. (Fline_end_position): Use `eol'.
* Omit some (current-time) callsPaul Eggert2022-08-011-1/+1
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-write-junit-test-summary-report): * lisp/emacs-lisp/shortdoc.el (file): * lisp/find-lisp.el (find-lisp-find-dired-insert-file): * lisp/progmodes/hideif.el (hide-ifdefs): * lisp/tar-mode.el (tar-subfile-save-buffer): Prefer nil or omitted arg to (current-time) where this is better or more-efficient.
* string-equal-ignore-case: new functionSam Steingold2022-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `string-equal-ignore-case'. * lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'. * lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise. * lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'. * lisp/files.el (file-truename): Use `string-equal-ignore-case'. (file-relative-name): Likewise. * lisp/gnus/gnus-art.el (article-hide-boring-headers): Use `string-equal-ignore-case' instead of `gnus-string-equal'. * lisp/gnus/gnus-util.el (gnus-string-equal): Remove, use `string-equal-ignore-case' instead. * lisp/international/mule-cmds.el (describe-language-environment): Use `string-equal-ignore-case'. (locale-charset-match-p): Likewise. * lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'. * lisp/minibuffer.el (completion--string-equal-p): Remove, use `string-equal-ignore-case' instead. (completion--twq-all): Use `string-equal-ignore-case'. (completion--do-completion): Likewise. * lisp/net/browse-url.el (browse-url-default-windows-browser): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/org/ob-core.el (org-babel-results-keyword): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (org-babel-insert-result): Likewise. * lisp/org/org-compat.el (string-equal-ignore-case): Define unless defined already. (org-mode-flyspell-verify): Use `string-equal-ignore-case'. * lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise. * lisp/org/ox.el (org-export-resolve-radio-link): Use `string-equal-ignore-case' and `string-clean-whitespace'. * lisp/progmodes/flymake-proc.el (flymake-proc--check-patch-master-file-buffer): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag): Use `string-equal-ignore-case' instead of explicit `compare-strings'. * lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'. (string-equal-ignore-case): Compare strings ignoring case. * lisp/textmodes/bibtex.el (bibtex-string=): Remove. (bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry) (bibtex-print-help-message, bibtex-validate, bibtex-validate-globally) (bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url): Use `string-equal-ignore-case' instead of `bibtex-string='. * lisp/textmodes/sgml-mode.el (sgml-get-context): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (sgml-calculate-indent): Likewise * test/lisp/subr-tests.el (string-comparison-test): Add tests for `string-equal-ignore-case'.
* Gently discourage use of `lsh` (bug#56641)Mattias Engdegård2022-07-201-3/+0
| | | | | | | | * lisp/subr.el (lsh): Note the general preference for `ash`. * lisp/emacs-lisp/shortdoc.el (number): Remove entry for `lsh`. It was identical to that for `ash` which is misleading. Shortdoc is very helpful for finding the right function to use, and `lsh` is just for compatibility at this point.
* Add `take` and `ntake` (bug#56521)Mattias Engdegård2022-07-171-0/+4
| | | | | | | | | | | | | | These are useful list primitives, complementary to `nthcdr`. * src/fns.c (Ftake, Fntake): New. (syms_of_fns): Defsubr them. * doc/lispref/lists.texi (List Elements): * lisp/emacs-lisp/shortdoc.el (list): Document. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns): Declare `take` pure and side-effect-free. * test/src/fns-tests.el (fns-tests--take-ref, fns--take-ntake): New test. * etc/NEWS: Announce.
* Remove some ineffectual calls to purecopyStefan Kangas2022-07-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired.el (dired-chown-program, dired-trivial-filenames): * lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): * lisp/help-fns.el (help-fns--mention-shortdoc-groups): * lisp/mail/mail-extr.el (mail-extr-full-name-prefixes) (mail-extr-all-letters-but-separators, mail-extr-all-letters) (mail-extr-first-letters, mail-extr-last-letters) (mail-extr-bad-dot-pattern, mail-extr-full-name-suffix-pattern) (mail-extr-alternative-address-pattern) (mail-extr-trailing-comment-start-pattern) (mail-extr-name-pattern, mail-extr-telephone-extension-pattern) (mail-extr-ham-call-sign-pattern, mail-extr-normal-name-pattern) (mail-extr-two-name-pattern) (mail-extr-listserv-list-name-pattern) (mail-extr-stupid-vms-date-stamp-pattern) (mail-extr-hz-embedded-gb-encoded-chinese-pattern) (mail-extr-x400-encoded-address-pattern) (mail-extr-x400-encoded-address-field-pattern-format) (mail-extr-x400-encoded-address-surname-pattern) (mail-extr-x400-encoded-address-given-name-pattern) (mail-extr-x400-encoded-address-full-name-pattern): Remove ineffectual calls to purecopy.
* Add file-parent-directory functionDaanturo2022-07-041-0/+7
| | | | | | | * doc/lispref/files.texi: Document the function. * etc/NEWS: Add its entry. * lisp/emacs-lisp/shortdoc.el: Add it to 'file-name' group. * lisp/files.el: implementation (bug#56355).
* Add new function `seq-split'Lars Ingebrigtsen2022-07-031-0/+2
| | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-split): New function. * lisp/emacs-lisp/shortdoc.el (sequence): Mention it.
* Allow using define-short-documentation-group without loading shortdocLars Ingebrigtsen2022-06-281-12/+12
| | | | | * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Allow using without loading shortdoc.el (bug#56260).
* Allow plist-get/plist-put/plist-member to take a comparison functionLars Ingebrigtsen2022-06-271-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/lists.texi (Plist Access): Document it. * lisp/filesets.el (filesets-reset-fileset) (filesets-ingroup-cache-get): (filesets-ingroup-cache-put): (filesets-build-menu-now): Don't use lax-plist functions. * lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from fns.c and make obsolete. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark plist functions as side-effect-free or pure. * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type. * lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated functions. * src/xdisp.c (build_desired_tool_bar_string): (display_mode_element): (store_mode_line_string): (display_string): (produce_stretch_glyph): (note_mode_line_or_margin_highlight): (note_mouse_highlight): * src/w32.c (serial_configure): * src/sysdep.c (serial_configure): * src/sound.c (parse_sound): * src/process.c (Fset_process_buffer): (Fset_process_sentinel): (Fprocess_contact): (Fmake_process): (Fmake_pipe_process): (Fset_network_process_option): (Fserial_process_configure): (Fmake_serial_process): (set_network_socket_coding_system): (finish_after_tls_connection): (connect_network_socket): (Fmake_network_process): (server_accept_connection): * src/lread.c (ADDPARAM): (hash_table_from_plist): * src/keyboard.c (make_lispy_position): * src/indent.c (check_display_width): * src/image.c (postprocess_image): * src/gnutls.c (gnutls_verify_boot): (Fgnutls_boot): (gnutls_symmetric): (Fgnutls_hash_mac): (Fgnutls_hash_digest): * src/dired.c (filter): * src/data.c (add_to_function_history): * src/coding.c (Fcoding_system_put): Adjust callers from Fplist_put (etc) to plist_put. * src/fns.c (plist_get): (plist_put): (plist_member): New functions (without optional third parameter) to be used in C code. * src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an optional predicate parameter (bug#47425). * src/lisp.h: Declare new plist_put, plist_get and plist_member functions. * test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get. * test/src/fns-tests.el (test-cycle-lax-plist-get): (test-cycle-lax-plist-put): (lax-plist-get/odd-number-of-elements): (test-plist): Remove lax-plist tests, since semantics have changed (they no longer error out on cycles).
* Extend file-expand-wildcards to allow regexpsLars Ingebrigtsen2022-06-051-1/+3
| | | | | | | | * doc/lispref/files.texi (Contents of Directories): Document it. * lisp/files.el (file-expand-wildcards): Extend to allow regexps. * lisp/emacs-lisp/shortdoc.el (file): Expand the file-expand-wildcards example.
* Fix failing shortdoc testLars Ingebrigtsen2022-06-041-5/+5
| | | | | | * lisp/emacs-lisp/shortdoc.el (string): Each example section is supposed to contain only examples of using the function in question (as policed by the FAILED shortdoc-examples test).
* * lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'.Michael Albinus2022-06-041-1/+6
|
* ; Fix typosStefan Kangas2022-05-151-1/+1
|
* Respect help-window-keep-selected in shortdoc buttonsLars Ingebrigtsen2022-05-061-3/+7
| | | | | | | | * lisp/help-fns.el (help-fns--mention-shortdoc-groups): Respect help-window-keep-selected. * lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow reusing the window.
* 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.
* Add a `shortdoc' convenience aliasLars Ingebrigtsen2022-01-141-0/+3
| | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc): Add a convenience alias (bug#52968).
* 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
| |
* | ; * lisp/emacs-lisp/shortdoc.el (keymaps): Fix typo.Stefan Kangas2021-12-121-1/+1
| |
* | Convert shortdoc-mode-map to defvar-keymapStefan Kangas2021-12-081-8/+6
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Convert to defvar-keymap.
* | Make UCS compose/decompose functions more understandableLars Ingebrigtsen2021-11-191-2/+7
| | | | | | | | | | | | | | | | | | * lisp/international/ucs-normalize.el () (ucs-normalize-NFD-region, ucs-normalize-NFD-string) (ucs-normalize-NFC-region, ucs-normalize-NFC-string) (ucs-normalize-NFKD-region, ucs-normalize-NFKD-string) (ucs-normalize-NFKC-region, ucs-normalize-NFKC-string): Make the doc strings say what they actually do.