Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:47:21+00:00 2026-05-23T14:47:21+00:00

In html major mode, Emacs is programmed to syntax highlight html character entity references

  • 0

In html major mode, Emacs is programmed to syntax highlight html character entity references (i.e., character references specified by name, e.g.,  ) but not, for some reason, numeric character references (e.g.,   or &#xa0). I guess this is a special case of the more general problem of customizing syntax highlight in a given mode. I imagine it involves some use of regexes. Can someone give me some guidance on how get started with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:47:22+00:00Added an answer on May 23, 2026 at 2:47 pm

    Following code snippet should help you:

    (add-to-list 'sgml-font-lock-keywords-2 
       '("\\&#x?[0-9a-fA-F][0-9a-fA-F]*;?" . font-lock-variable-name-face))
    

    but it should be put after loading of sgml-mode that provides html-mode. You can force loading with following command:

    (require 'sgml-mode)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the folowing html. It passes the w3 validator, but my javascript alert
I'm reading an HTML document that contains UTF-8 chars but when I access the
This is the HTML I have: p_tags = '''<p class=foo-body> <font class=test-proof>Full name</font> Foobar<br
Currently i am trying to look for the html entities for all the major
When can we expect to see HTML 5 support for all the major browsers?
HTML (or maybe just XHTML?) is relatively strict when it comes to non-standard attributes
Html.TextBox(ParentPassword, , new { @class = required }) what the gosh darned heck is
html Tidy gives this as output for some reason: <?xml version=1.0 encoding=utf-16?> <?xml version=1.0
---HTML <div id=story> <div id=individual> <img src='uploads/1231924837Picture.png'/> <h2>2009-01-14</h2> <h1>Headline</h1> <p>stroy story etc stroy story
Html.Encode seems to simply call HttpUtility.HtmlEncode to replace a few html specific characters with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.