; Fix doc string of 'string-fill'
* lisp/emacs-lisp/subr-x.el (string-fill): Rename LENGTH to WIDTH and update the doc string accordingly. (Bug#71856)
This commit is contained in:
parent
1b5cf29431
commit
a3e57a29be
1 changed files with 6 additions and 6 deletions
|
@ -159,16 +159,16 @@ removed."
|
||||||
blank blank)))
|
blank blank)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun string-fill (string length)
|
(defun string-fill (string width)
|
||||||
"Try to word-wrap STRING so that no lines are longer than LENGTH.
|
"Try to word-wrap STRING so that it displays with lines no wider than WIDTH.
|
||||||
Wrapping is done where there is whitespace. If there are
|
STRING is wrapped where there is whitespace in it. If there are
|
||||||
individual words in STRING that are longer than LENGTH, the
|
individual words in STRING that are wider than WIDTH, the result
|
||||||
result will have lines that are longer than LENGTH."
|
will have lines that are wider than WIDTH."
|
||||||
(declare (important-return-value t))
|
(declare (important-return-value t))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert string)
|
(insert string)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((fill-column length)
|
(let ((fill-column width)
|
||||||
(adaptive-fill-mode nil))
|
(adaptive-fill-mode nil))
|
||||||
(fill-region (point-min) (point-max)))
|
(fill-region (point-min) (point-max)))
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue