From 9480169f1b8a27ed61db0913989c9a81339ccd9d Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 22 Dec 2020 06:54:32 +0100 Subject: Change the string-limit parameter semantics * lisp/emacs-lisp/subr-x.el (string-limit): Alter the calling convention. --- doc/lispref/strings.texi | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'doc/lispref/strings.texi') diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 17cc1a47124..80e936e9743 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -405,13 +405,12 @@ there are individual words that are longer than @var{length}, these will not be shortened. @end defun -@defun string-limit string length -Return a string that's shorter than @var{length}. If @var{string} is -shorter than @var{length}, @var{string} is returned as is. If -@var{length} is positive, return a substring of @var{string} -consisting of the first @var{length} characters. If @var{length} is -negative, return a string of the @var{-length} last characters -instead. +@defun string-limit string length &optional end +If @var{string} is shorter than @var{length}, @var{string} is returned +as is. Otherwise, return a substring of @var{string} consisting of +the first @var{length} characters. If the optional @var{end} +parameter is given, return a string of the @var{length} last +characters instead. @end defun @defun string-lines string &optional omit-nulls -- cgit v1.2.3