summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/shortdoc.el
Commit message (Collapse)AuthorAgeFilesLines
...
* | Change the call signature to keymap-substituteLars Ingebrigtsen2021-11-171-1/+1
| | | | | | | | | | | | | | * lisp/keymap.el (keymap-substitute): Make the keymap the first parameter for symmetry with the other functions. * lisp/emacs-lisp/shortdoc.el (keymaps): * lisp/emacs-lisp/bytecomp.el (lambda): Adjust.
* | Add new 'keymap-*' functionsLars Ingebrigtsen2021-11-161-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/keymap.el: New file with all the new keymap-* functions. * lisp/loadup.el ("keymap"): Load. * lisp/subr.el (kbd): Refactor out all the code to key-parse. (define-key-after, keyboard-translate, global-set-key) (local-set-key, global-unset-key, local-unset-key) (local-key-binding, global-key-binding) (substitute-key-definition): Note in doc strings that these are legacy functions. (define-keymap--define): Use keymap-set. * lisp/emacs-lisp/byte-opt.el: Remove the optimizations for defvar-keymap and define-keymap since the macros now only understand the kbd syntax. * lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap) (byte-compile-define-keymap--define): Warn about invalid key definitions in all keymap-* functions. * lisp/emacs-lisp/shortdoc.el (keymaps): Add shortdocs form keymap* functions. * src/keymap.c (possibly_translate_key_sequence): Adjust callers to key-valid-p and key-parse. (syms_of_keymap): Adjust defs.
* | Add new function 'file-name-split'Lars Ingebrigtsen2021-11-101-0/+3
| | | | | | | | | | | | | | * doc/lispref/files.texi (File Name Components): Document it. * lisp/files.el (file-name-split): New function (bug#50572). * lisp/emacs-lisp/shortdoc.el (file-name): Mention it.
* | Read mailcaps again only when necessaryGregory Heytings2021-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (File Attributes): Document it. * lisp/files.el (file-has-changed-p): New function. (file-has-changed-p--hash-table): Internal variable used by the new function (bug#51523). * lisp/emacs-lisp/shortdoc.el (file): Mention it. * lisp/net/mailcap.el (mailcap-parse-mailcaps): Read mailcaps again only when at least one of the mailcap files has changed. Fixes bug#51523.
* | Add new function string-glyph-splitLars Ingebrigtsen2021-10-301-0/+2
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-glyph-split): New function.
* | Add new function 'string-pixel-width'Lars Ingebrigtsen2021-10-271-1/+8
| | | | | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): Mention it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-pixel-width): New function.
* | Mark def* macros for indentationLars Ingebrigtsen2021-10-131-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
* Improve shortdoc for vectorStefan Kangas2021-10-131-5/+10
| | | | | | * lisp/emacs-lisp/shortdoc.el (vector): Improve shortdoc with titles. Add mapc. Fix typo where 'seq-reduce' is incorrectly written as 'reduce'.
* ; * lisp/emacs-lisp/shortdoc.el: Fix typo.Stefan Kangas2021-10-101-2/+2
|
* Add shortdoc for text propertiesStefan Kangas2021-09-281-0/+43
| | | | | | * lisp/emacs-lisp/shortdoc.el (text-properties): New shortdoc. e for your changes. Lines starting
* Add new function `ensure-list'Lars Ingebrigtsen2021-09-211-0/+3
| | | | | | | | * doc/lispref/lists.texi (Building Lists): Document it. * lisp/subr.el (ensure-list): New function. * lisp/emacs-lisp/shortdoc.el (list): Mention it.
* Add new sequence function 'seq-union'Stefan Kangas2021-09-171-0/+2
| | | | | | | | * 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.
* Mention get-byte in shortdocLars Ingebrigtsen2021-09-131-0/+3
| | | | * lisp/emacs-lisp/shortdoc.el (buffer): Mention `get-byte' here.
* Add new functions to replace strings/regexp in a regionLars Ingebrigtsen2021-08-161-0/+6
| | | | | | | | * doc/lispref/searching.texi (Search and Replace): Document them. * lisp/subr.el (replace-string-in-region) (replace-regexp-in-region): New functions. * lisp/emacs-lisp/shortdoc.el (regexp, buffer): Mention them.
* Mark up commands in shortdoc.el for modesMasahiro Nakamura2021-08-151-5/+6
| | | | | * lisp/emacs-lisp/shortdoc.el: Add command mode tagging (bug#50064).
* Rename directory-append to file-name-concatLars Ingebrigtsen2021-07-251-5/+5
| | | | | | | | * src/fileio.c (Ffile_name_concat): * lisp/files.el (move-file-to-trash): * lisp/emacs-lisp/shortdoc.el (file-name): * doc/lispref/files.texi (Directory Names): Rename `directory-append' to `file-name-concat'.
* Extend directory-append to take an arbitrary number of componentsLars Ingebrigtsen2021-07-241-0/+1
| | | | | | | | * doc/lispref/files.texi (Directory Names): Document it. * lisp/emacs-lisp/shortdoc.el (file-name): Add new example. * src/fileio.c (Fdirectory_append): Change the function to take an arbitrary number of components.
* Add new function `directory-append'Lars Ingebrigtsen2021-07-241-1/+8
| | | | | | | | | * doc/lispref/files.texi (Directory Names): Document it, and remove the concat-based file concatenation description. * lisp/emacs-lisp/shortdoc.el (file-name): Add. And add more expand-file-name examples. * src/fileio.c (Fdirectory_append): New function.
* Use make-separator-line in shortdocLars Ingebrigtsen2021-07-191-9/+1
| | | | | | | | * lisp/simple.el (separator-line): Tweak definition to not be so overwhelming. * lisp/emacs-lisp/shortdoc.el (shortdoc-separator): Removed. (shortdoc-display-group): Use make-separator-line.
* Make 'n'/'p' work again in shortdoc after previous changesLars Ingebrigtsen2021-07-171-10/+9
| | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Adjust to changes in how the text properties are inserted in 22a5482ab6 (bug#49605). Also make into a regular function.
* Add more car/cdr examples to shortdocLars Ingebrigtsen2021-07-151-2/+6
| | | | * lisp/emacs-lisp/shortdoc.el (list): Add more car/cdr examples.
* Improve the shortdoc link action in *Help* buffersLars Ingebrigtsen2021-07-151-5/+8
| | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow taking an optional parameter to place point on a specific function. (shortdoc--display-function): Go to the function in question in the shortdoc buffer.
* Mention more split-string-* functions in shortdocLars Ingebrigtsen2021-07-151-0/+4
| | | | | * lisp/emacs-lisp/shortdoc.el (string): Mention split-string-and-unquote and split-string-shell-command.
* Add new function file-name-with-extensionColin Woodbury2021-06-301-0/+3
| | | | | | | * doc/lispref/files.texi (File Name Components): Document it. * lisp/emacs-lisp/shortdoc.el (file-name): Ditto. * lisp/files.el (file-name-with-extension): New function.
* Fix shortdoc-add-function section creationBasil L. Contovounesios2021-06-211-3/+3
| | | | | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-add-function): Use nconc to actually append a new section to the list of groups while avoiding a previous OBOE. Push a new group to the front of shortdoc--groups without copying it, just like define-short-documentation-group does. (buffer): Fix copypasta in unlock-buffer example. * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-examples): Also check that :no-value forms demonstrate the right function. * doc/lispref/help.texi (Documentation Groups): Clarify that @dots in the define-short-documentation-group arglist refer to whole key-value pairs. Fix typo in :eg-result-string description.
* Add a new documentation group for overlaysDaniel Martín2021-05-301-0/+46
| | | | | * lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for buffer overlays(bug#48730).
* Improve the documentation of documentation groupsDaniel Martín2021-05-301-0/+2
| | | | | | | * doc/lispref/help.texi (Documentation Groups): Fix typos and add an example. * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Add :no-eval* and :result-string keywords to the docstring. (Bug#48730)
* Fix shortdoc examplesMattias Engdegård2021-05-291-4/+4
| | | | | | | | | | Make sure that each example in shortdoc actually contains the function it illustrates, and add a test for it. * lisp/emacs-lisp/shortdoc.el (string, list, buffer, number): Use the right functions in examples for string-version-lessp, lax-plist-put, point-min and ffloor. * test/lisp/emacs-lisp/shortdoc-tests.el: New test file.
* Fix looking-at-p example in shortdoc.elDaniel Martín2021-05-281-1/+1
| | | | | * lisp/emacs-lisp/shortdoc.el (regexp): Use `looking-at-p' instead of `looking-at' (bug#48709).
* Fix the length= shortdoc exampleAlexandr Vityazev2021-05-181-1/+1
| | | | | | | * lisp/emacs-lisp/shortdoc.el (list): Fix the length= example (bug#48495). Copyright-paperwork-exempt: yes
* * lisp/emacs-lisp/shortdoc.el: Doc fixes.Stefan Kangas2021-04-291-5/+9
|
* Move string-trim functions to subr.elLars Ingebrigtsen2021-03-241-3/+0
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document them. * lisp/faces.el: Don't require subr-x, because that leads to build errors. * lisp/subr.el (string-trim, string-trim-right) (string-trim-left): Move here from subr-x.el. * lisp/emacs-lisp/shortdoc.el (string): Adjust.
* Use named faces in shortdocProtesilaos Stavrou2021-02-241-2/+7
| | | | | | | * shortdoc.el (shortdoc-heading): Define new face for headings. (shortdoc-display-group): Apply new heading face. (shortdoc--display-function): Use existing face for section text. * etc/NEWS: Document new face (bug#46748).
* Minor shortdoc link improvementsDaniel Martín2021-01-101-2/+11
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use describe-function as a fallback link when a function is not documented in any Info manual. Also make the link respond to mouse-1, like the rest of *Help* links, and add a proper help-echo property. * lisp/help-fns.el (help-fns--mention-shortdoc-groups): Same link improvement as described before, this time for the shortdoc groups (bug#45750).
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* ; Fix recent shortdoc.el and fns.c additionsBasil L. Contovounesios2020-12-271-3/+3
| | | | | * lisp/emacs-lisp/shortdoc.el (list): Fix typos. * src/fns.c (Flength_equal): Fix docstring.
* Add new predicates for sequence lengthsLars Ingebrigtsen2020-12-271-0/+6
| | | | | | | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document them. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark them as side-effect-free. * lisp/emacs-lisp/shortdoc.el (list): Mention them. * src/fns.c (Flength): Mention them in the doc string. (length_internal): New function. (Flength_less, Flength_greater, Flength_equal): New defuns. (syms_of_fns): Sym them.
* Allow `string-limit' to work on encoded stringsLars Ingebrigtsen2020-12-251-1/+2
| | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/subr-x.el (string-limit): Allow limiting on encoded strings.
* Remove `string-slice' -- it's not very well definedLars Ingebrigtsen2020-12-251-3/+0
| | | | | | * doc/lispref/strings.texi (Creating Strings): Ditto. * lisp/emacs-lisp/subr-x.el (string-slice): Remove.
* Improve the string-limit doc stringLars Ingebrigtsen2020-12-231-0/+3
| | | | | * lisp/emacs-lisp/subr-x.el (string-limit): Mention truncate-string-to-width in the doc string.
* Make string-pad take an optional START parameterLars Ingebrigtsen2020-12-221-1/+1
| | | | | * lisp/emacs-lisp/subr-x.el (string-pad): Alter the calling convention.
* Change the string-limit parameter semanticsLars Ingebrigtsen2020-12-221-1/+1
| | | | | * lisp/emacs-lisp/subr-x.el (string-limit): Alter the calling convention.
* Add try-completion to the string shortdocLars Ingebrigtsen2020-12-211-0/+2
| | | | * lisp/emacs-lisp/shortdoc.el (string): Mention try-completion here.
* Add string-chop-newlineLars Ingebrigtsen2020-12-211-0/+2
| | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/subr-x.el (string-chop-newline): Add new function.
* Rename slice-string to string-sliceLars Ingebrigtsen2020-12-211-3/+3
| | | | | * lisp/emacs-lisp/subr-x.el (string-slice): Rename from slice-string. * doc/lispref/strings.texi (Creating Strings): Ditto.
* Add `string-pad'Lars Ingebrigtsen2020-12-211-0/+4
| | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/shortdoc.el (string): Add example. * lisp/emacs-lisp/subr-x.el (string-pad): New function.
* Beef up the Emacs string utility set a bitLars Ingebrigtsen2020-12-211-0/+15
| | | | | | | | | * doc/lispref/strings.texi (Modifying Strings): Document them. * lisp/emacs-lisp/shortdoc.el (string): Add examples. * lisp/emacs-lisp/subr-x.el (string-clean-whitespace) (string-fill, string-limit, string-lines, slice-string): New functions.
* shortdoc: prefer seq-contains-p over seq-containsBrian Leung2020-11-091-2/+2
| | | | | | | * lisp/emacs-lisp/shortdoc.el (sequence): use seq-contains-p instead of seq-contains, which is obsolete as of 27.1. (Bug#44536) Copyright-paperwork-exempt: yes
* ; Remove spurious FIXMEs in my last commitStefan Kangas2020-10-301-2/+0
|
* Add shortdoc navigation commandsStefan Kangas2020-10-301-3/+53
| | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (text-property-search): Require. (shortdoc-mode): New major mode. (shortdoc-mode-map): New variable. (shortdoc--goto-section): New macro. (shortdoc-next, shortdoc-previous, shortdoc-next-section) (shortdoc-previous-section): New commands. (shortdoc-display-group): Use new shortdoc-models. Propertize section header. (shortdoc--display-function): Propertize function header.