From: Mattias EngdegÄrd Date: Fri, 23 Jun 2023 17:42:44 +0000 (+0200) Subject: * lisp/emacs-lisp/shortdoc.el: More and better `substring` examples. X-Git-Tag: emacs-29.1-rc1~113 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0147ff9e50;p=emacs.git * lisp/emacs-lisp/shortdoc.el: More and better `substring` examples. Suggested by Juri Linkov. --- diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index c49960c2ee6..871233097a7 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -187,8 +187,10 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), :eval (format "This number is %d" 4)) "Manipulating Strings" (substring - :eval (substring "foobar" 0 3) - :eval (substring "foobar" 3)) + :eval (substring "abcde" 1 3) + :eval (substring "abcde" 2) + :eval (substring "abcde" 1 -1) + :eval (substring "abcde" -4 4)) (string-limit :eval (string-limit "foobar" 3) :eval (string-limit "foobar" 3 t)