diff options
| author | Eli Zaretskii | 2018-06-02 13:04:15 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-06-02 13:04:15 +0300 |
| commit | 4a7e74fea687011ee81dcbb02294bccd99b3a05f (patch) | |
| tree | 05b3fb5d79c96abd6c5cc301288702e4deef139f | |
| parent | 9ac76456eb104f749aa9c60b99c68a649214efc6 (diff) | |
| download | emacs-4a7e74fea687011ee81dcbb02294bccd99b3a05f.tar.gz emacs-4a7e74fea687011ee81dcbb02294bccd99b3a05f.zip | |
Un-obsolete 'string-to-unibyte'
* lisp/subr.el (string-to-unibyte): No longer obsolete. See the
emacs-devel discussion around this message:
http://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00656.html.
* etc/NEWS: Announce the change.
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/subr.el | 7 |
2 files changed, 13 insertions, 1 deletions
| @@ -670,6 +670,13 @@ loading messages if requested, and protects against recursive loads. | |||
| 670 | The history of variable names read by 'read-variable' is recorded in | 670 | The history of variable names read by 'read-variable' is recorded in |
| 671 | the new variable 'custom-variable-history'. | 671 | the new variable 'custom-variable-history'. |
| 672 | 672 | ||
| 673 | --- | ||
| 674 | ** The function 'string-to-unibyte' is no longer declared obsolete. | ||
| 675 | We have found that there are legitimate use cases for this function, | ||
| 676 | where there's no better alternative. We believe that the incorrect | ||
| 677 | uses of this function all but disappeared by now, so we are | ||
| 678 | un-obsoleting it. | ||
| 679 | |||
| 673 | 680 | ||
| 674 | * Changes in Emacs 27.1 on Non-Free Operating Systems | 681 | * Changes in Emacs 27.1 on Non-Free Operating Systems |
| 675 | 682 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 35e220a10ee..914112ccef5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1438,8 +1438,13 @@ be a list of the form returned by `event-start' and `event-end'." | |||
| 1438 | "27.1") | 1438 | "27.1") |
| 1439 | (make-obsolete 'invocation-name "use the variable of the same name." "27.1") | 1439 | (make-obsolete 'invocation-name "use the variable of the same name." "27.1") |
| 1440 | 1440 | ||
| 1441 | ;; We used to declare string-to-unibyte obsolete, but it is a valid | ||
| 1442 | ;; way of getting a unibyte string that can be indexed by bytes, when | ||
| 1443 | ;; the original string has raw bytes in their internal multibyte | ||
| 1444 | ;; representation. This can be useful when one needs to examine | ||
| 1445 | ;; individual bytes at known offsets from the string beginning. | ||
| 1446 | ;; (make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1") | ||
| 1441 | ;; bug#23850 | 1447 | ;; bug#23850 |
| 1442 | (make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1") | ||
| 1443 | (make-obsolete 'string-as-unibyte "use `encode-coding-string'." "26.1") | 1448 | (make-obsolete 'string-as-unibyte "use `encode-coding-string'." "26.1") |
| 1444 | (make-obsolete 'string-make-unibyte "use `encode-coding-string'." "26.1") | 1449 | (make-obsolete 'string-make-unibyte "use `encode-coding-string'." "26.1") |
| 1445 | (make-obsolete 'string-to-multibyte "use `decode-coding-string'." "26.1") | 1450 | (make-obsolete 'string-to-multibyte "use `decode-coding-string'." "26.1") |