bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32281: shr.el align support patch


From: Eli Zaretskii
Subject: bug#32281: shr.el align support patch
Date: Mon, 06 Aug 2018 18:13:18 +0300

> From: Noam Postavsky <npostavs@gmail.com>
> Date: Sun, 05 Aug 2018 22:52:35 -0400
> Cc: 32281@debbugs.gnu.org
> 
> Bad Blue Bull <ibmbull@yandex.ru> writes:
> 
> > Here's a patch for shr.el that makes it handle "align" attribute for
> > headers, paragraphs and lists, works only when monospace font is used
> > (becoz of lame implementation of fill-paragraph). Also default value
> > of shr-use-fonts set to nil so monospace fonts are used by default.
> 
> Seems reasonable overall, but I'm not sure if changing the default is
> justified.

And I'm sure it isn't.  Not only do we not change past defaults so
easily, I personally don't think I'd like such a change, or consider
it correct.

> > +  "Fill paragraph at or after point, breaking lines at positions matching 
> > regexp argument BRE-REGEXP.

The first line of the doc string should not be longer than 78
characters, and should be a complete sentence.

> > +BRE-REGEXP must be a regexp that determines positions where to break 
> > lines, default value is \\x2028."
> > +  (unless bre-regexp (setq bre-regexp "\x2028"))
> > +  (setq bre-regexp (concat bre-regexp "\\|\x2029"))
> > +  (save-excursion
> > +   (let ((line-begin) (paragraph-end))
> > +    (forward-paragraph)
> > +    (insert "\x2029") ; use \x2029 (unicode paragraph separator) to mark 
> > end of a paragraph

Why did you decide to use u+2028 and u+2029 for these purposes?  Emacs
doesn't yet support these characters as Unicode intended, so using
them might have unexpected effects, and might produce different effect
if we start supporting them in the future.

This needs a NEWS entry, I think.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]