[Top][All Lists]

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

Re: C-comments in sgml-mode's html-mode

From: Lennart Borgman (gmail)
Subject: Re: C-comments in sgml-mode's html-mode
Date: Tue, 24 Jul 2007 16:51:10 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070716 Thunderbird/ Mnenhy/

Edward Welbourne wrote:
In your case someone has set up the syntax of / and * much as a
css-mode would do.  What does C-h f css-mode say on your system?

<quote src="C-h f css-mode RET">

css-mode is an interactive compiled Lisp function in `css-mode.el'.

Major mode for editing CSS style sheets.
key             binding
---             -------

C-c             Prefix Command
ESC             Prefix Command
"          cssm-insert-quotes
(               cssm-insert-parenthesises
[               cssm-insert-brackets
{               cssm-insert-curlies
}               cssm-insert-right-brace-and-indent

M-TAB           cssm-complete-property

C-c C-c         cssm-insert-comment
C-c C-u         cssm-insert-url


If you put point in the help buffer at `css-mode.el' and press RET it will open the file css-mode.el. Could you please look at the beginning of that file and show us what it says (version, author etc)? If you in this file do

  C-h v buffer-file-name RET

you can see where that file is located.

and I don't believe I've used it directly ('though I may have
looked at a .css file at some point, which would cause it to load
automagically).  However, when I open up comment.html in a fresh clean
emacs -Q, it doesn't believe in css-mode at all.  I just get a bell
(and [No match] in minibuffer) when I try C-h f css-mode RET.  No
script in my usual .emacs (a minimal .emacs which adds an entry to
load-path and loads a bunch of little fragments from a directory of
mine) mentions css-mode.

In an emacs -q session, it knows it would autoload css-mode if asked
for: loading a css file, I now find I am able to reproduce the bug in
a new session :-)

So, steps to reproduce: in an emacs -q session evaluate <quote>
(autoload 'html-mode "sgml-mode" "Edit HTML docs" t)
(setq auto-mode-alist (cons (cons "\\.x?html?$" 'html-mode) auto-mode-alist))
</quote>, visit a .css file (it need not exist / can be empty),
open a .html file containing: <quote>
<html lang="en"><head><title>Test page for HTML-mode /* comment issue 
</title><!-- */ sanity
--></head><body><h1>Test page for HTML-mode /* comment issue </h1><!-- */ sanity 

It would appear that css-mode is hacking html-mode !

This does not happen for me when starting with emacs -q. Nor does it happen for you with -Q. Using -q site-start.el is run, but it is not run when using -Q. Can you please do

  M-x find-library RET site-start RET

and show us the file?

reply via email to

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