unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6534: Suggestion for character references in html-mode
@ 2010-06-28 21:39 Esa Peuha
  2010-06-29  9:06 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Esa Peuha @ 2010-06-28 21:39 UTC (permalink / raw)
  To: 6534

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

In nxml-mode, numeric character references (such as  ) are
displayed with the referred-to character following the reference. It
would be nice if html-mode did the same. (The format of these
references is the same in xml and html, so sharing code for this
should be simple.)

[-- Attachment #2: Type: text/html, Size: 306 bytes --]

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

* bug#6534: Suggestion for character references in html-mode
  2010-06-28 21:39 bug#6534: Suggestion for character references in html-mode Esa Peuha
@ 2010-06-29  9:06 ` Juri Linkov
  2016-03-01  6:04   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2010-06-29  9:06 UTC (permalink / raw)
  To: Esa Peuha; +Cc: 6534

> In nxml-mode, numeric character references (such as  ) are
> displayed with the referred-to character following the reference. It
> would be nice if html-mode did the same. (The format of these
> references is the same in xml and html, so sharing code for this
> should be simple.)

I think this functionality should be separated into a new package
because it's useful for character notations of other modes as well,
e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.

-- 
Juri Linkov
http://www.jurta.org/emacs/





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

* bug#6534: Suggestion for character references in html-mode
  2010-06-29  9:06 ` Juri Linkov
@ 2016-03-01  6:04   ` Lars Ingebrigtsen
  2016-03-02  0:28     ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-03-01  6:04 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 6534, Esa Peuha

Juri Linkov <juri@jurta.org> writes:

>> In nxml-mode, numeric character references (such as &#160;) are
>> displayed with the referred-to character following the reference. It
>> would be nice if html-mode did the same. (The format of these
>> references is the same in xml and html, so sharing code for this
>> should be simple.)
>
> I think this functionality should be separated into a new package
> because it's useful for character notations of other modes as well,
> e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.

That does sound exceedingly useful...  Hm...  perhaps I should have a go
at it unless this already exists somewhere?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#6534: Suggestion for character references in html-mode
  2016-03-01  6:04   ` Lars Ingebrigtsen
@ 2016-03-02  0:28     ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2016-03-02  0:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 6534, Esa Peuha

> Juri Linkov <juri@jurta.org> writes:
>
>>> In nxml-mode, numeric character references (such as &#160;) are
>>> displayed with the referred-to character following the reference. It
>>> would be nice if html-mode did the same. (The format of these
>>> references is the same in xml and html, so sharing code for this
>>> should be simple.)
>>
>> I think this functionality should be separated into a new package
>> because it's useful for character notations of other modes as well,
>> e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.
>
> That does sound exceedingly useful...  Hm...  perhaps I should have a go
> at it unless this already exists somewhere?

When I looked at prior art the closest matches were the package rainbow-mode
from ELPA that displays colors by character codes, and prettify-symbols-mode
that transforms characters into alternative representation.  But doing this
using font-lock-keywords is so trivial, it was easier to just put a small
piece of code in ~/.emacs.





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

end of thread, other threads:[~2016-03-02  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-28 21:39 bug#6534: Suggestion for character references in html-mode Esa Peuha
2010-06-29  9:06 ` Juri Linkov
2016-03-01  6:04   ` Lars Ingebrigtsen
2016-03-02  0:28     ` Juri Linkov

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).