From d0147ff9e507cc4e99e0574eab106f95c8e9df1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 23 Jun 2023 19:42:44 +0200 Subject: [PATCH] * lisp/emacs-lisp/shortdoc.el: More and better `substring` examples. Suggested by Juri Linkov. --- lisp/emacs-lisp/shortdoc.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.2