all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26922: 26.0.50; mhtml-mode fontification problem
@ 2017-05-14 12:42 Stephen Berman
  2017-05-21  4:04 ` bug#26922: fixed Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2017-05-14 12:42 UTC (permalink / raw)
  To: 26922

0. Create the file "test.html" with the following content:
--8<---------------cut here---------------start------------->8---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  </head>
  <body>
    <p>This is a test.</p>
  </body>
</html>
--8<---------------cut here---------------end--------------->8---

1. emacs -Q path/to/test.html
2. Notice that the first three lines are fontified with
   font-lock-string-face and the remaining lines with a mix of faces as
   appropriate for the mode (identified as XHTML+ in the mode line).
3. Put point on line 3 ("http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">)
   and press TAB, making the line indent to column 1.
=> Now the entire buffer is fontified with font-lock-string-face.

Undoing the reindentation triggered by TAB in step 3 does not restore
the fontification, nor does `M-x font-lock-fontify-buffer' or disabling
and then re-enabling font-lock-mode in the buffer.  However, altering
the first line (<?xml version="1.0" encoding="iso-8859-1"?>) does
restore the fontification.  A subsequent modification to line 3 again
renders the whole buffer in font-lock-string-face -- but changing line 2
does not have this effect, nor does typing `M-^' on line 3 to join it to
line 2.

The faulty refontification does not happen with the above recipe in
Emacs 25.2, nor does it happen in master if, prior to step 1 above, I
evaluate this line:

(add-to-list 'auto-mode-alist '("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode))

to make the file get visited in html-mode (with mode line lighter XTHML)
instead of mhtml-mode.


In GNU Emacs 26.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.20.10)
 of 2017-05-14 built on rosalinde
Repository revision: 4132bd74e9816ca913f862835cc062e092ab8b79
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	openSUSE Leap 42.2

Configured using:
 'configure --with-xwidgets 'CFLAGS=-Og -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XWIDGETS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix





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

* bug#26922: fixed
  2017-05-14 12:42 bug#26922: 26.0.50; mhtml-mode fontification problem Stephen Berman
@ 2017-05-21  4:04 ` Tom Tromey
  2017-05-21 14:02   ` Stephen Berman
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2017-05-21  4:04 UTC (permalink / raw)
  To: 26922-done

Thanks for the report.
I've checked in a fix for this.

Tom





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

* bug#26922: fixed
  2017-05-21  4:04 ` bug#26922: fixed Tom Tromey
@ 2017-05-21 14:02   ` Stephen Berman
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2017-05-21 14:02 UTC (permalink / raw)
  To: 26922; +Cc: tom

On Sat, 20 May 2017 22:04:27 -0600 Tom Tromey <tom@tromey.com> wrote:

> Thanks for the report.
> I've checked in a fix for this.

FTR, confirmed.  Thanks!

Steve Berman





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

end of thread, other threads:[~2017-05-21 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-14 12:42 bug#26922: 26.0.50; mhtml-mode fontification problem Stephen Berman
2017-05-21  4:04 ` bug#26922: fixed Tom Tromey
2017-05-21 14:02   ` Stephen Berman

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.