From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25357: 25.1; Doc for `cursor-sensor-mode' (and modes generally) Date: Thu, 05 Jan 2017 22:58:09 -0500 Message-ID: <87a8b44z72.fsf@users.sourceforge.net> References: <9ad8b225-73da-4533-a676-b0f8e84e54ca@default> <878tqq5fw2.fsf@users.sourceforge.net> <678f8299-e6e8-4b08-a412-bf367194f6d7@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1483675099 22961 195.159.176.226 (6 Jan 2017 03:58:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2017 03:58:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 25357@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 06 04:58:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLfQ-0004hN-Pc for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jan 2017 04:58:13 +0100 Original-Received: from localhost ([::1]:49967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPLfR-0005ng-7C for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jan 2017 22:58:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPLfJ-0005nQ-Gz for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 22:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPLfG-00073i-Dt for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 22:58:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPLfG-00073e-AW for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 22:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPLfF-00017I-Rp for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 22:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2017 03:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25357 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25357-submit@debbugs.gnu.org id=B25357.14836750434241 (code B ref 25357); Fri, 06 Jan 2017 03:58:01 +0000 Original-Received: (at 25357) by debbugs.gnu.org; 6 Jan 2017 03:57:23 +0000 Original-Received: from localhost ([127.0.0.1]:44226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLed-00016L-99 for submit@debbugs.gnu.org; Thu, 05 Jan 2017 22:57:23 -0500 Original-Received: from mail-io0-f170.google.com ([209.85.223.170]:33399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLeb-000167-18 for 25357@debbugs.gnu.org; Thu, 05 Jan 2017 22:57:21 -0500 Original-Received: by mail-io0-f170.google.com with SMTP id v96so24721883ioi.0 for <25357@debbugs.gnu.org>; Thu, 05 Jan 2017 19:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6GRgdTy8P9/v9CK2UBsySrSv+M5W0LAwdlc6EvoKqro=; b=JD/iQGiSnGMK7Lq4qg/vksrCnHrpXNdjn2t4AeKgyvWYDYWcRFTk7xEifT3VwP2aOI HVF+mcSp1jgqth53ZIA1Ethxj85rNISRBeQCFqXo48Vjs8cH2wTyKs7S8M3iO5FfvVzC 9e5l/5mTm9UKSOvQRgJq4sdUXafG5tSRK5cemm1dvMCyCB0IfSzdOY621WUfFE0imTG0 d5LOvRpxVEmBjnNPaGyVedbgD6A8xOIh6aCX1JX5/xV6IW5Rkr2UAqdTPw+fy4jdeLie XKVj5a8425CwT0katjmJbnSzP02F5hqc+36M+AYbZFFkHgc5pmZsBHjoynhV6lgqbL3q d8AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=6GRgdTy8P9/v9CK2UBsySrSv+M5W0LAwdlc6EvoKqro=; b=sctX0tB2TV07mWKundxivZj3iBQmGvtN9wOaR+NW9h8qW8onPfLmnCwNr3iIsHV/2u iq3iDe/bXz6nQJV48i7R6ATfF9XvcHeWqXaM0OyVU1gcClFawEC/Y9geurt0oqvpD/2/ tc2eFh/vDBTelpfYZfmiQTCAb1bfP4vRsk/QbheXVWqvEwjQVVp+EWqhriKD3eupuhcT 3RKiPsi62gA2NN+vbWDyR0Flywki9WTgOLUgDzISDzneMYEw6NJwbOnHVUVx4QpmgBbh fR7+pTLCZ2BIJd8aDv1UzJq1FDOv3IT040MeAhwuNe+2mM9FdOkyPsyEd5No6uP294nL Cjxg== X-Gm-Message-State: AIkVDXKHlpbbYKkZWNolmPWaKvNNlOdRnJhsRxx2sKTi3hAj1x5i4PWPVW1sutjjyigbiA== X-Received: by 10.107.18.162 with SMTP id 34mr50249797ios.14.1483675035417; Thu, 05 Jan 2017 19:57:15 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id o65sm38606963ioe.15.2017.01.05.19.57.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jan 2017 19:57:14 -0800 (PST) In-Reply-To: <678f8299-e6e8-4b08-a412-bf367194f6d7@default> (Drew Adams's message of "Wed, 4 Jan 2017 20:29:08 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:127810 Archived-At: --=-=-= Content-Type: text/plain Drew Adams writes: > > Thanks. Some minor comments. If they help, fine; if not, ignore. > One not-so-minor comment, flagged by ** (in two places). Thanks, that was helpful. > > ** How so, "again"? Here we are telling someone how to turn it > on interactively. I think we should also tell them how to do it > using Lisp. This is a subjective thing of course. I guess it seems obvious to me that a command can be called as a function, and it's explained in `(elisp) What Is a Function'. Adding cross references to that in every place we talk about invoking some command is just clutter. Eli Zaretskii writes: > I'd suggest not to start a sentence with "And". Instead, something > like this should be better: > > @dfn{major modes}, which ...; and @dfn {minor modes}, which ... Fixed this too. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v2-0001-Clarify-major-mode-switching.patch Content-Description: patch >From e2b2fa4cf18949f7ad4cbe17eb36b0abf7b0ad0c Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 4 Jan 2017 20:35:13 -0500 Subject: [PATCH v2] Clarify major mode switching * doc/emacs/modes.texi (Major Modes): * doc/lispref/modes.texi (Modes, Major Modes): Explictly say that each buffer has exactly one major mode and can't be "turned off", only switched away from (Bug#25357). --- doc/emacs/modes.texi | 5 ++++- doc/lispref/modes.texi | 26 +++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 0acb82d..be89340 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -66,7 +66,10 @@ Major Modes first visit a file or create a buffer (@pxref{Choosing Modes}). You can explicitly select a new major mode by using an @kbd{M-x} command. Take the name of the mode and add @code{-mode} to get the name of the -command to select that mode (e.g., @kbd{M-x lisp-mode} enters Lisp mode). +command to select that mode (e.g., @kbd{M-x lisp-mode} enters Lisp +mode). Since every buffer has exactly one major mode, there is no way +to ``turn off'' a major mode; instead you must switch to a different +one. @vindex major-mode The value of the buffer-local variable @code{major-mode} is a symbol diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index b24ab36..0015a9f 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -7,11 +7,12 @@ Modes @chapter Major and Minor Modes @cindex mode - A @dfn{mode} is a set of definitions that customize Emacs and can be -turned on and off while you edit. There are two varieties of modes: -@dfn{major modes}, which are mutually exclusive and used for editing -particular kinds of text, and @dfn{minor modes}, which provide features -that users can enable individually. + A @dfn{mode} is a set of definitions that customize Emacs behavior +in useful ways. There are two varieties of modes: @dfn{minor modes}, +which provide features that users can turn on and off while editing; +and @dfn{major modes}, which are used for editing or interacting with +a particular kind of text. Each buffer has exactly one @dfn{major +mode} at a time. This chapter describes how to write both major and minor modes, how to indicate them in the mode line, and how they run hooks supplied by the @@ -196,12 +197,15 @@ Major Modes @cindex major mode @cindex major mode command - Major modes specialize Emacs for editing particular kinds of text. -Each buffer has one major mode at a time. Every major mode is -associated with a @dfn{major mode command}, whose name should end in -@samp{-mode}. This command takes care of switching to that mode in the -current buffer, by setting various buffer-local variables such as a -local keymap. @xref{Major Mode Conventions}. + Major modes specialize Emacs for editing or interacting with +particular kinds of text. Each buffer has exactly one major mode at a +time. Every major mode is associated with a @dfn{major mode command}, +whose name should end in @samp{-mode}. This command takes care of +switching to that mode in the current buffer, by setting various +buffer-local variables such as a local keymap. @xref{Major Mode +Conventions}. Note that unlike minor modes there is no way to ``turn +off'' a major mode, instead the buffer must be switched to a different +one. The least specialized major mode is called @dfn{Fundamental mode}, which has no mode-specific definitions or variable settings. -- 2.9.3 --=-=-=--