Subject: bug#33233: closed (Re: bug#33233: 27.0.50; Replace gnus-correct-length with string-width)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 02 Nov 2018 17:12:02 +0000

Your bug report

#33233: 27.0.50; Replace gnus-correct-length with string-width

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33233: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33233
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#33233: 27.0.50; Replace gnus-correct-length with string-width
From: Eric Abrahamsen <[email-masked]>
To: [email-masked]
Date: Fri, 02 Nov 2018 10:11:21 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Eric Abrahamsen <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>>>> From: Eric Abrahamsen <[email-masked]>
>>> Date: Thu, 01 Nov 2018 20:05:09 -0700
>>> 
>>> Eric Abrahamsen <[email-masked]> writes:
>>> 
>>> > The one is trivially replaceable by the other, this patch defines an
>>> > obsolete alias.
>>> 
>>> Oh, in this situation should I be replacing the `gnus-correct-length'
>>> calls with `string-width' directly, and just leaving the alias behind?
>>
>> Yes, I think so.
>
> Weirdly, it doesn't seem to be used anywhere anymore. I guess the alias
> should still go in for a while, though; I'll push this to master.

Pushed

Subject: 27.0.50; Replace gnus-correct-length with string-width
From: Eric Abrahamsen <[email-masked]>
To: [email-masked]
Date: Thu, 01 Nov 2018 16:53:44 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

The one is trivially replaceable by the other, this patch defines an
obsolete alias.

>From 93e9566ee7335a148e34ecade9b716a636b5e70b Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <[email-masked]>
Date: Thu, 1 Nov 2018 16:50:17 -0700
Subject: [PATCH] Obsolete gnus-correct-length in favor of string-width

* lisp/gnus/gnus-spec.el: Define an obsolete alias.
---
 lisp/gnus/gnus-spec.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index 379a7f2b5c..4b5f15fbc6 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -271,9 +271,7 @@ gnus-spec-tab
 	       (insert " ")))
 	 (insert-char ?  (max (- ,column (current-column)) 0))))))
 
-(defun gnus-correct-length (string)
-  "Return the correct width of STRING."
-  (apply #'+ (mapcar #'char-width string)))
+(define-obsolete-function-alias 'gnus-correct-length 'string-width "27.1")
 
 (defun gnus-correct-substring (string start &optional end)
   (let ((wstart 0)
-- 
2.19.1