[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: please use ?\u2014 instead of the unicode character inbuff-menu.el
From: |
Juanma Barranquero |
Subject: |
Re: please use ?\u2014 instead of the unicode character inbuff-menu.el |
Date: |
Tue, 20 Feb 2007 02:07:23 +0100 |
On 2/19/07, Drew Adams <address@hidden> wrote:
Please explain why 1) is more readable than 2):
1) ;; Use U+2014 (EM DASH) to underline if possible, else U+002D
(HYPHEN-MINUS)
(if (char-displayable-p ?-) ?- ?-)))
2) (if (char-displayable-p ?\u2014) ?\u2014 ?-)))
In 1), the code is straightforward (a fact obscured in the e-mail
because em dash got changed to hyphen-minus), and the comment clearly
says what's happening, and even identifies *both* characters involved.
In 2), \u2014 does not mean anything per se, so the user hasn't the
foggiest idea why some random unicode char would be used instead of -.
You'll need the same comment as before to clarify that (and, in fact,
Stefan didn't remove the comment when changing the code).
You can convince me that 2) will get less trouble than 1) for people
with broken tools; but not that 2) is more legible.
Juanma
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, (continued)
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/18
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/18
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Lennart Borgman (gmail), 2007/02/18
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Jason Rumney, 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Lennart Borgman (gmail), 2007/02/19
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Lennart Borgman (gmail), 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el,
Juanma Barranquero <=
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Stefan Monnier, 2007/02/19
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Eli Zaretskii, 2007/02/18
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/18
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Juanma Barranquero, 2007/02/18
- RE: please use ?\u2014 instead of the unicode character inbuff-menu.el, Drew Adams, 2007/02/18
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Juanma Barranquero, 2007/02/18
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Chris Moore, 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Richard Stallman, 2007/02/19
- Re: please use ?\u2014 instead of the unicode character inbuff-menu.el, Juanma Barranquero, 2007/02/19