From: Eli Zaretskii Date: Sun, 29 Nov 2015 17:40:08 +0000 (+0200) Subject: Document truncate-string-ellipsis X-Git-Tag: emacs-25.0.90~599 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3bd8262a2f5ea104ca0394683098e3c2efe3024;p=emacs.git Document truncate-string-ellipsis * doc/lispref/display.texi (Size of Displayed Text): Document 'truncate-string-ellipsis'. * lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix. (truncate-string-to-width): Mention in the doc string that the default for ELLIPSIS comes from 'truncate-string-ellipsis'. * etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp Changes" section. --- diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ad248b116ed..3d520dbdd69 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -1889,12 +1889,13 @@ end of the result if it falls short of @var{width}. It is also used at the beginning of the result if one multi-column character in @var{string} extends across the column @var{start-column}. +@vindex truncate-string-ellipsis If @var{ellipsis} is non-@code{nil}, it should be a string which will replace the end of @var{string} (including any padding) if it extends beyond @var{width}, unless the display width of @var{string} is equal to or less than the display width of @var{ellipsis}. If @var{ellipsis} is non-@code{nil} and not a string, it stands for -@code{"..."}. +the value of the variable @code{truncate-string-ellipsis}. @example (truncate-string-to-width "\tab\t" 12 4) diff --git a/etc/NEWS b/etc/NEWS index 1265cb6a2e2..dc3758f8eb2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -166,8 +166,6 @@ have the equivalent of a primary selection. ** `insert-register' now leaves point after the inserted text when called interactively. A prefix argument toggles this behavior. -** New var `truncate-string-ellipsis' to choose how to indicate truncation. - +++ ** The new variable `term-file-aliases' replaces some files from lisp/term. The function `tty-run-terminal-initialization' consults this variable @@ -1302,6 +1300,9 @@ if the terminal cannot display curved quotes. ** Standard output and error streams now transliterate characters via standard-display-table, and encode output using locale-coding-system. ++++ +** New var `truncate-string-ellipsis' to choose how to indicate truncation. + ** Miscellaneous name change For consistency with the usual Emacs spelling, the Lisp variable diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index b575c2b7db3..c70a3eee0fb 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -55,7 +55,8 @@ string) (defvar truncate-string-ellipsis "..." ;"…" - "String to use to indicate truncation.") + "String to use to indicate truncation. +Serves as default value of ELLIPSIS argument to `truncate-string-to-width'.") ;;;###autoload (defun truncate-string-to-width (str end-column