unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33233: 27.0.50; Replace gnus-correct-length with string-width
@ 2018-11-01 23:53 Eric Abrahamsen
  2018-11-02  3:05 ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2018-11-01 23:53 UTC (permalink / raw)
  To: 33233

[-- Attachment #1: Type: text/plain, Size: 87 bytes --]


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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Obsolete-gnus-correct-length-in-favor-of-string-widt.patch --]
[-- Type: text/x-patch, Size: 935 bytes --]

From 93e9566ee7335a148e34ecade9b716a636b5e70b Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-02 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-01 23:53 bug#33233: 27.0.50; Replace gnus-correct-length with string-width Eric Abrahamsen
2018-11-02  3:05 ` Eric Abrahamsen
2018-11-02  8:19   ` Eli Zaretskii
2018-11-02 16:34     ` Eric Abrahamsen
2018-11-02 17:11       ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).