From: Eli Zaretskii Date: Sun, 5 Feb 2017 19:50:49 +0000 (+0200) Subject: Clarify documentation of 'bufferpos-to-filepos' and 'filepos-to-bufferpos' X-Git-Tag: emacs-25.2-rc2~15 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a541c21e864112267126b1388d4d8553ec294b00;p=emacs.git 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) --- diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index e3cb5d0d369..2c3e6ef2c60 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -142,7 +142,7 @@ be one of the following: @table @code @item exact 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 The value can be an approximation. The function may avoid expensive processing and return an inexact result. diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 06b63eae370..7657e40eed8 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -352,7 +352,7 @@ QUALITY can be: `approximate', in which case we may cut some corners to avoid excessive work. `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." (unless coding-system (setq coding-system buffer-file-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 excessive work. `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." (unless coding-system (setq coding-system buffer-file-coding-system)) (let* ((eol (coding-system-eol-type coding-system))