unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: 33233@debbugs.gnu.org
Subject: bug#33233: 27.0.50; Replace gnus-correct-length with string-width
Date: Thu, 01 Nov 2018 16:53:44 -0700	[thread overview]
Message-ID: <878t2cjqwn.fsf@ericabrahamsen.net> (raw)

[-- 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


             reply	other threads:[~2018-11-01 23:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 23:53 Eric Abrahamsen [this message]
2018-11-02  3:05 ` bug#33233: 27.0.50; Replace gnus-correct-length with string-width Eric Abrahamsen
2018-11-02  8:19   ` Eli Zaretskii
2018-11-02 16:34     ` Eric Abrahamsen
2018-11-02 17:11       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878t2cjqwn.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=33233@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).