From fe12ec4b0d71f8adb572c68c6f662d7783382fb1 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 14 Jun 2019 14:37:29 +0200 Subject: [PATCH] Unobsolete string-to-multibyte * lisp/subr.el: Un-obsolete string-to-multibyte, because it's a useful function. string-to-unibyte has already been un-obsoleted. --- etc/NEWS | 10 +++++----- lisp/subr.el | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 043907755ab..3b459e587a2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2067,11 +2067,11 @@ The history of variable names read by 'read-variable' is recorded in the new variable 'custom-variable-history'. --- -** The function 'string-to-unibyte' is no longer declared obsolete. -We have found that there are legitimate use cases for this function, -where there's no better alternative. We believe that the incorrect -uses of this function all but disappeared by now, so we are -un-obsoleting it. +** The function 'string-to-unibyte' and `string-to-multibyte' are no +longer declared obsolete. We have found that there are legitimate use +cases for these functions, where there's no better alternative. We +believe that the incorrect uses of these functions all but disappeared +by now, so we are un-obsoleting it. +++ ** New function 'group-name' returns a group name corresponding to GID. diff --git a/lisp/subr.el b/lisp/subr.el index 93a98a4bdb1..d505eb3917f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1528,10 +1528,12 @@ be a list of the form returned by `event-start' and `event-end'." ;; representation. This can be useful when one needs to examine ;; individual bytes at known offsets from the string beginning. ;; (make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1") +;; string-to-multibyte is also sometimes useful (and there's no good +;; general replacement for it), so it's also been unobsoleted in Emacs 27.1. +;; (make-obsolete 'string-to-multibyte "use `decode-coding-string'." "26.1") ;; bug#23850 (make-obsolete 'string-as-unibyte "use `encode-coding-string'." "26.1") (make-obsolete 'string-make-unibyte "use `encode-coding-string'." "26.1") -(make-obsolete 'string-to-multibyte "use `decode-coding-string'." "26.1") (make-obsolete 'string-as-multibyte "use `decode-coding-string'." "26.1") (make-obsolete 'string-make-multibyte "use `decode-coding-string'." "26.1") -- 2.39.5