Clarify documentation of 'bufferpos-to-filepos' and 'filepos-to-bufferpos'

* doc/lispref/nonascii.texi (Text Representations): Clarify that
'exact' value of QUALITY argument to 'bufferpos-to-filepos' and
'filepos-to-bufferpos' can lead to expensive and slow processing.

* lisp/international/mule-util.el (filepos-to-bufferpos)
(bufferpos-to-filepos): Doc fix.  (Bug#25626)
This commit is contained in:
Eli Zaretskii 2017-02-05 21:50:49 +02:00
parent 5e92111268
commit a541c21e86
2 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ be one of the following:
@table @code @table @code
@item exact @item exact
The result must be accurate. The function may need to encode and The result must be accurate. The function may need to encode and
decode a large part of the buffer. decode a large part of the buffer, which is expensive and can be slow.
@item approximate @item approximate
The value can be an approximation. The function may avoid expensive The value can be an approximation. The function may avoid expensive
processing and return an inexact result. processing and return an inexact result.

View file

@ -352,7 +352,7 @@ QUALITY can be:
`approximate', in which case we may cut some corners to avoid `approximate', in which case we may cut some corners to avoid
excessive work. excessive work.
`exact', in which case we may end up re-(en/de)coding a large `exact', in which case we may end up re-(en/de)coding a large
part of the file/buffer. part of the file/buffer, this can be expensive and slow.
nil, in which case we may return nil rather than an approximation." nil, in which case we may return nil rather than an approximation."
(unless coding-system (setq coding-system buffer-file-coding-system)) (unless coding-system (setq coding-system buffer-file-coding-system))
(let ((eol (coding-system-eol-type coding-system)) (let ((eol (coding-system-eol-type coding-system))
@ -428,7 +428,7 @@ QUALITY can be:
`approximate', in which case we may cut some corners to avoid `approximate', in which case we may cut some corners to avoid
excessive work. excessive work.
`exact', in which case we may end up re-(en/de)coding a large `exact', in which case we may end up re-(en/de)coding a large
part of the file/buffer. part of the file/buffer, this can be expensive and slow.
nil, in which case we may return nil rather than an approximation." nil, in which case we may return nil rather than an approximation."
(unless coding-system (setq coding-system buffer-file-coding-system)) (unless coding-system (setq coding-system buffer-file-coding-system))
(let* ((eol (coding-system-eol-type coding-system)) (let* ((eol (coding-system-eol-type coding-system))