From: Daniel Pittman <daniel@rimspace.net>
Subject: Re: Slight bug in the `gnus-use-correct-string-widths' implementation.
Date: Mon, 10 Sep 2001 11:13:01 +1000 [thread overview]
Message-ID: <87k7z7zw4i.fsf@inanna.rimspace.net> (raw)
In-Reply-To: <m2pu91rqdt.fsf@michaelt.umontreal.ca> (Michael Totschnig's message of "Sat, 08 Sep 2001 23:31:58 -0400")
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Sat, 08 Sep 2001, Michael Totschnig wrote:
> Simon Josefsson <jas@extundo.com> wrote:
>
>> Daniel Pittman <daniel@rimspace.net> writes:
>>
>>>> It's quite nagging to me because I usually send and receive Korean
>>>> mails.
>>>
>>> The attached patch fixes is, but it's probably quite ugly and
>>> offensive to the eyes of the Gnus experts[1] so I trust that one of
>>> them will rewrite it to be nicer...
>>
>> I committed it, trusting that someone will send a patch cleaning it
>> up if necessary.
>
> I have the impression that this patch could be responsible for a
> problem with specifications I observe since updating today:
Rats. You got me; I missed that glitch in my code. It now respects the
side that the padding should be on as well as the width of it, with the
attached patch.
Daniel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1186 bytes --]
Index: gnus-spec.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-spec.el,v
retrieving revision 6.13
diff -u -u -p -r6.13 gnus-spec.el
--- gnus-spec.el 2001/09/08 07:53:16 6.13
+++ gnus-spec.el 2001/09/10 01:12:00
@@ -376,16 +376,21 @@
"Return a form that pads EL to PAD-WIDTH accounting for multi-column
characters correctly. This is because `format' may pad to columns or to
characters when given a pad value."
- (let ((pad (abs pad-width)))
+ (let ((pad (abs pad-width))
+ (side (< 0 pad-width)))
(if (symbolp el)
`(let ((need (- ,pad (gnus-correct-length ,el))))
(if (> need 0)
- (concat ,el (make-string need ?\ ))
+ (concat ,(when side '(make-string need ?\ ))
+ ,el
+ ,(when (not side) '(make-string need ?\ )))
,el))
`(let* ((val (eval ,el))
(need (- ,pad (gnus-correct-length ,el))))
(if (> need 0)
- (concat ,el (make-string need ?\ ))
+ (concat ,(when side '(make-string need ?\ ))
+ ,el
+ ,(when (not side) '(make-string need ?\ )))
,el)))))
(defun gnus-parse-format (format spec-alist &optional insert)
[-- Attachment #3: Type: text/plain, Size: 94 bytes --]
--
When your hammer is C++, everything begins to look like a thumb.
-- Simon Brooke
prev parent reply other threads:[~2001-09-10 1:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-31 9:17 Daniel Pittman
2001-09-03 1:32 ` Jinhyok Heo
2001-09-07 12:07 ` Daniel Pittman
2001-09-07 12:12 ` Daniel Pittman
2001-09-08 1:12 ` Jinhyok Heo
2001-09-08 7:55 ` Simon Josefsson
2001-09-09 3:31 ` Michael Totschnig
2001-09-10 1:13 ` Daniel Pittman [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k7z7zw4i.fsf@inanna.rimspace.net \
--to=daniel@rimspace.net \
/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.
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 NNTP newsgroup(s).