From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Pohlack Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Patch for sgml-mode.el Date: Fri, 23 Nov 2007 16:26:17 +0100 Message-ID: <4746F119.2090504@os.inf.tu-dresden.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195832992 17709 80.91.229.12 (23 Nov 2007 15:49:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2007 15:49:52 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 23 16:49:57 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ivamw-0005KF-46 for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2007 16:49:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ivamh-00071B-Pk for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2007 10:49:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvaQ3-0000eg-KU for emacs-devel@gnu.org; Fri, 23 Nov 2007 10:26:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvaQ1-0000eJ-4B for emacs-devel@gnu.org; Fri, 23 Nov 2007 10:26:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvaQ0-0000eF-W2 for emacs-devel@gnu.org; Fri, 23 Nov 2007 10:26:13 -0500 Original-Received: from os.inf.tu-dresden.de ([141.76.48.99]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IvaPx-0003fK-Fm; Fri, 23 Nov 2007 10:26:09 -0500 Original-Received: from monat.inf.tu-dresden.de ([141.76.48.62]) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) id 1IvaPv-0001iw-Hp; Fri, 23 Nov 2007 16:26:07 +0100 User-Agent: Thunderbird 2.0.0.9 (X11/20071115) In-Reply-To: X-Enigmail-Version: 0.95.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 23 Nov 2007 10:49:34 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83975 Archived-At: 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