From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#10650: view-mode inconsistencies wrt special mode-class Date: Tue, 31 Jan 2012 14:17:07 +0800 Message-ID: <87pqe08kgs.fsf@gnu.org> References: <9vehugoa9d.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327990677 4558 80.91.229.3 (31 Jan 2012 06:17:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2012 06:17:57 +0000 (UTC) Cc: 10650@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 31 07:17:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rs72O-0001yE-H5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Jan 2012 07:17:52 +0100 Original-Received: from localhost ([::1]:44499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs72O-00079s-0m for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Jan 2012 01:17:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs72L-00079l-IN for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 01:17:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rs72K-0002Mz-KY for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 01:17:49 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs72K-0002Mv-GK for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 01:17:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rs72Y-0002eQ-1N for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 01:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2012 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10650-submit@debbugs.gnu.org id=B10650.132799065210153 (code B ref 10650); Tue, 31 Jan 2012 06:18:02 +0000 Original-Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 06:17:32 +0000 Original-Received: from localhost ([127.0.0.1]:46172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs723-0002dh-NV for submit@debbugs.gnu.org; Tue, 31 Jan 2012 01:17:32 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:41172 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs721-0002da-4h for 10650@debbugs.gnu.org; Tue, 31 Jan 2012 01:17:29 -0500 Original-Received: from [155.69.16.255] (port=44508 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Rs71m-0000RB-BQ; Tue, 31 Jan 2012 01:17:14 -0500 In-Reply-To: <9vehugoa9d.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 30 Jan 2012 21:50:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56291 Archived-At: Glenn Morris 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.