all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Slash (?) matching in XML and HTML mode
@ 2014-01-20 15:43 Mark Tilford
  2014-01-20 17:31 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Tilford @ 2014-01-20 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

I'm not sure what the term for this is...
In C-mode, when the user types a close curly bracket, Emacs briefly
highlights the matching open curly bracket.

I'm having an annoyance with HTML / XML mode.

If I type out something like the following:
<!DOCTYPE html>
<html>
  <head>
    <title>My Web Page</title>
  </head>
  <body>
    <br />
    <h1>Heading</h1>
...

When I type the slash in /h1, Emacs briefly highlights the slash in br/.
 (Other close tags don't trigger any such   This is incorrect, and is
getting very annoying.  What's going on, and how can I stop it?

(Acceptable behaviors would be "Don't highlight anything" and "Highlight
the appropriate open tag".)


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

* Re: Slash (?) matching in XML and HTML mode
  2014-01-20 15:43 Slash (?) matching in XML and HTML mode Mark Tilford
@ 2014-01-20 17:31 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-01-20 17:31 UTC (permalink / raw)
  To: help-gnu-emacs

> When I type the slash in /h1, Emacs briefly highlights the slash in br/.
>  (Other close tags don't trigger any such   This is incorrect, and is
> getting very annoying.  What's going on, and how can I stop it?

It looks like a bug in sgml-slash-matching.  Please M-x report-emacs-bug.
You can disable it with

   (add-hook 'sgml-mode-hook (lambda () (local-set-key "/" nil)))

tho you may actually prefer to use `nxml-mode' for HTML files.
E.g. with

   (defalias 'html-mode 'nxml-mode)


-- Stefan




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

end of thread, other threads:[~2014-01-20 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 15:43 Slash (?) matching in XML and HTML mode Mark Tilford
2014-01-20 17:31 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.