bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10650: view-mode inconsistencies wrt special mode-class


From: Chong Yidong
Subject: bug#10650: view-mode inconsistencies wrt special mode-class
Date: Tue, 31 Jan 2012 14:17:07 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Glenn Morris <address@hidden> writes:

> AFAIK, the only documented meaning of special mode-class is:
>
> If the default-value of major-mode is nil, then creating a new buffer
> inherits the major-mode of the previously current buffer UNLESS that
> buffer has a special mode-class, in which case the new buffer gets
> fundamental mode. (Doesn't seem a very useful feature to me.)

The Lisp manual (node Basic Major Modes) says:

   Special mode is a basic major mode for buffers containing text
   that is produced specially by Emacs, rather than from a file.

That's the reason that special modes are never inherited when you make a
new buffer, even if major-mode has a nil default value.  The major mode
itself is not useful without other special "stuff" done by Emacs to
populate or process the buffer.

Unfortunately, this meaning tends to get obscured by the contents of
special-mode-map, where we've tried to "helpfully" set up keybindings
like "q" for quit-window.  But this is mostly tolerable.

I think view-file is right not to enable View mode for special mode, and
view-file-other-window/view-file-other-frame should be fixed up
similarly.  As for view-buffer, it is OK as is.





reply via email to

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