[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Patch for sgml-mode.el
From: |
Martin Pohlack |
Subject: |
Re: Fwd: Patch for sgml-mode.el |
Date: |
Fri, 23 Nov 2007 16:26:17 +0100 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071115) |
Stefan Monnier wrote:
>> sgml-mode.el currently contains such lines:
>
>> (define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")
>
>> and
>
>> (define-derived-mode html-mode sgml-mode '(sgml-xml-mode "XHTML" "HTML")
>> .
>
>> This violates that the third argument of define-derived-mode shall be a
>> string. Furthermore, it results in "mode-name" not being a string for
>> html buffers.
>
> I don't see a problem with that. It's obviously been done on purpose.
Well, this was not obvious to me ...
> Please describe where it causes a problem so we can fix that spot.
Most obviously: the documentation for "define-derived-mode" states:
(define-derived-mode child parent name &optional docstring &rest body)
...
name: a string which will appear in the status line (e.g. "Hypertext")
So name should be a string.
Second, I could not find the documentation for the varibale mode-name in
emacs, but in xemacs it is documented as:
Pretty name of current buffer's major mode (a string).
Third, I have a buffer-switching module here locally, which relies on
mode-name being a string.
http://os.inf.tu-dresden.de/~mp26/download/cycbuf.el
Could you advice another way to get the mode-name as a string for a
buffer apart from accessing mode-name? Maybe this could be documented?
Cheers,
Martin