Commit graph

32 commits

Author SHA1 Message Date
Daniel Martín
e62f71988f Minor shortdoc link improvements
* 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).
2021-01-10 13:45:44 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Basil L. Contovounesios
df882c9701 ; Fix recent shortdoc.el and fns.c additions
* lisp/emacs-lisp/shortdoc.el (list): Fix typos.
* src/fns.c (Flength_equal): Fix docstring.
2020-12-27 13:14:30 +00:00
Lars Ingebrigtsen
0f790464d5 Add new predicates for sequence lengths
* 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.
2020-12-27 09:00:23 +01:00
Lars Ingebrigtsen
af359de917 Allow `string-limit' to work on encoded strings
* doc/lispref/strings.texi (Creating Strings): Document it.

* lisp/emacs-lisp/subr-x.el (string-limit): Allow limiting on
encoded strings.
2020-12-25 05:58:09 +01:00
Lars Ingebrigtsen
269cec13a2 Remove `string-slice' -- it's not very well defined
* doc/lispref/strings.texi (Creating Strings): Ditto.

* lisp/emacs-lisp/subr-x.el (string-slice): Remove.
2020-12-25 05:16:46 +01:00
Lars Ingebrigtsen
5c86a53296 Improve the string-limit doc string
* lisp/emacs-lisp/subr-x.el (string-limit): Mention
truncate-string-to-width in the doc string.
2020-12-23 07:59:24 +01:00
Lars Ingebrigtsen
051d8f7535 Make string-pad take an optional START parameter
* lisp/emacs-lisp/subr-x.el (string-pad): Alter the calling
convention.
2020-12-22 06:59:25 +01:00
Lars Ingebrigtsen
9480169f1b Change the string-limit parameter semantics
* lisp/emacs-lisp/subr-x.el (string-limit): Alter the calling
convention.
2020-12-22 06:54:32 +01:00
Lars Ingebrigtsen
c9a95237a8 Add try-completion to the string shortdoc
* lisp/emacs-lisp/shortdoc.el (string): Mention try-completion here.
2020-12-21 22:08:56 +01:00
Lars Ingebrigtsen
f329a3180e Add string-chop-newline
* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/subr-x.el (string-chop-newline): Add new function.
2020-12-21 22:05:37 +01:00
Lars Ingebrigtsen
cf2e832185 Rename slice-string to string-slice
* lisp/emacs-lisp/subr-x.el (string-slice): Rename from slice-string.
* doc/lispref/strings.texi (Creating Strings): Ditto.
2020-12-21 20:18:57 +01:00
Lars Ingebrigtsen
b3dec31766 Add `string-pad'
* 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.
2020-12-21 20:01:28 +01:00
Lars Ingebrigtsen
87e422f104 Beef up the Emacs string utility set a bit
* 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.
2020-12-21 18:53:40 +01:00
Brian Leung
916eb895d1 shortdoc: prefer seq-contains-p over seq-contains
* 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
2020-11-09 21:19:10 +01:00
Stefan Kangas
ff3838ecc3 ; Remove spurious FIXMEs in my last commit 2020-10-30 11:41:47 +01:00
Stefan Kangas
122ace858b Add shortdoc navigation commands
* 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.
2020-10-30 11:40:43 +01:00
Mattias Engdegård
bb3d13ac35 ; * lisp/emacs-lisp/shortdoc.el (regexp): less contrived rx example 2020-10-28 15:05:35 +01:00
Stefan Kangas
bd3ecfef84 Run substitute-command-keys on shortdoc section headings
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Run
substitute-command-keys on section headings before displaying.
2020-10-28 14:46:43 +01:00
Stefan Kangas
6b3ed2375b Extend the regexp shortdoc group
* lisp/emacs-lisp/shortdoc.el (regexp): New section "Match Data"; add
save-match-data.  New section "The `rx' Structured Regexp Notation".
2020-10-28 14:46:28 +01:00
Lars Ingebrigtsen
d23e483cfb Tweak how shortdocs are displayed
* lisp/emacs-lisp/shortdoc.el (shortdoc-example): Removed.
(shortdoc-section): Remove colors.
(shortdoc-separator): New face.
(shortdoc-display-group, shortdoc--display-function): Don't use
background colours, because that makes things harder to read.
Separate with a horizontal line instead.
2020-10-26 19:15:36 +01:00
Stefan Kangas
a98bb620c4 Add section "Replacing Match" to the regexp shortdoc group
* lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match".
2020-10-25 19:18:27 +01:00
Stefan Kangas
10ea719abc Add shortdoc group for alist
* lisp/emacs-lisp/shortdoc.el (alist): New shortdoc group.
2020-10-25 01:40:52 +02:00
Stefan Kangas
b6a41c76a5 Add shortdoc group for hash-table
* lisp/emacs-lisp/shortdoc.el (hash-table): New shortdoc group.
2020-10-25 00:53:17 +02:00
Basil L. Contovounesios
ec4f2723c1 Simplify syntax of shortdoc face specs
* lisp/emacs-lisp/shortdoc.el: Remove unused dependency.
(shortdoc-section, shortdoc-example): Use newer (DISPLAY . PLIST)
face spec syntax.
2020-10-20 17:31:09 +01:00
Lars Ingebrigtsen
d5c811279b Fix error in file shortdoc group
* lisp/emacs-lisp/shortdoc.el (number): Add some more numeric
stuff (and clean up some arglists).
2020-10-11 23:51:26 +02:00
Eli Zaretskii
4b84095d23 Improve documentation of shortdoc features
* lisp/help-fns.el (help-fns-describe-function-functions): Doc
fix.
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group)
(shortdoc-display-group, shortdoc-add-function): Doc fixes.

* doc/lispref/help.texi (Documentation Groups): Improve the
recently-added documentation and the indexing.
2020-10-11 17:28:40 +03:00
Lars Ingebrigtsen
5f01f86e6b Add more numeric shortdocs
* lisp/emacs-lisp/shortdoc.el (shortdoc-section)
(shortdoc-example): Lighten up colours on light backgrounds.
2020-10-11 12:30:38 +02:00
Lars Ingebrigtsen
c66165b5c0 Tweak shortdoc colours on light backgrounds
* lisp/emacs-lisp/shortdoc.el (shortdoc-section)
(shortdoc-example): Lighten up colours on light backgrounds.
2020-10-11 12:12:47 +02:00
Lars Ingebrigtsen
e441a25daa Autoload shortdoc command and adjust NEWS
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Autoload.
2020-10-11 12:05:55 +02:00
Lars Ingebrigtsen
ed378c95b6 Use Unicode arrows in shortdoc results
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
Unicode arrows if possible.
2020-10-11 11:21:48 +02:00
Lars Ingebrigtsen
2a7488d42d Add support for displaying short documentation for function groups
* doc/lispref/help.texi (Documentation Groups): Document it.

* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Output
references to the shortdocs.

* lisp/emacs-lisp/shortdoc.el: New file.
2020-10-11 05:51:16 +02:00