emacs-devel
[Top][All Lists]
Advanced

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

Re: ielm working buffer on the modeline


From: Stefan Monnier
Subject: Re: ielm working buffer on the modeline
Date: Thu, 28 Feb 2002 20:15:36 -0500

> ELISP> (setq mode-name '("IELM on " (:eval (buffer-name 
> ielm-working-buffer))))
> *** Eval error ***  error: "Only strings should be stored in the buffer-local 
> variable mode-name"

This restriction should be removed, I think.
I bumped into it recently when I wanted to use

        (setq mode-name '(sgml-xml "XML" "SGML"))
and
        (setq mode-name '(sgml-xml "XHTML" "HTML"))

in sgml-mode.el.  The patch is trivial.  Any objection ?


        Stefan

PS: by the way I don't understand your problem: the suggestion was to
    put the ielm-working-buffer name into the buffer-name, not into the
    mode-name.


Index: buffer.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/buffer.c,v
retrieving revision 1.378
diff -u -r1.378 buffer.c
--- buffer.c    26 Jan 2002 23:04:27 -0000      1.378
+++ buffer.c    1 Mar 2002 01:11:19 -0000
@@ -5226,7 +5231,7 @@
                     doc: /* Symbol for current buffer's major mode.  */);
 
   DEFVAR_PER_BUFFER ("mode-name", &current_buffer->mode_name,
-                     make_number (Lisp_String),
+                     Qnil,
                     doc: /* Pretty name of current buffer's major mode (a 
string).  */);
 
   DEFVAR_PER_BUFFER ("abbrev-mode", &current_buffer->abbrev_mode, Qnil,




reply via email to

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