emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 99872bedf0: ; * lisp/emacs-lisp/subr-x.el (string-limit): Clarify


From: Eli Zaretskii
Subject: master 99872bedf0: ; * lisp/emacs-lisp/subr-x.el (string-limit): Clarify doc string.
Date: Tue, 5 Jul 2022 12:46:17 -0400 (EDT)

branch: master
commit 99872bedf07315f642d143feaed9075a7ea20cba
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; * lisp/emacs-lisp/subr-x.el (string-limit): Clarify doc string.
---
 lisp/emacs-lisp/subr-x.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 39697a8e72..5159e8784a 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -170,11 +170,10 @@ limit the string to.  The result will be a unibyte string 
that is
 shorter than LENGTH, but will not contain \"partial\"
 characters (or glyphs), even if CODING-SYSTEM encodes characters
 with several bytes per character.  If the coding system specifies
-things like byte order marks (aka \"BOM\") or language tags, they
-will normally be part of the calculation.  This is the case, for
-instance, with `utf-16'.  If this isn't desired, use a coding
-system that doesn't specify a BOM, like `utf-16le' or
-`utf-16be'.
+prefix like the byte order mark (aka \"BOM\") or a shift-in sequence,
+their bytes will be normally counted as part of LENGTH.  This is
+the case, for instance, with `utf-16'.  If this isn't desired, use a
+coding system that doesn't specify a BOM, like `utf-16le' or `utf-16be'.
 
 When shortening strings for display purposes,
 `truncate-string-to-width' is almost always a better alternative



reply via email to

[Prev in Thread] Current Thread [Next in Thread]