From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: cua: quiet warning messages Date: Mon, 23 Jun 2003 13:00:23 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200306231700.h5NH0NXr019258@rum.cs.yale.edu> References: <20030616170421.37652.qmail@web80512.mail.yahoo.com> <200306161847.h5GIlwn08741@eel.dms.auburn.edu> <200306161912.h5GJCwM1020131@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056388345 9034 80.91.224.249 (23 Jun 2003 17:12:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Jun 2003 17:12:25 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jun 23 19:12:22 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19UUqx-0002IY-00 for ; Mon, 23 Jun 2003 19:11:39 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19UUu6-0004VG-00 for ; Mon, 23 Jun 2003 19:14:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19UUoV-0004wx-2G for emacs-devel@quimby.gnus.org; Mon, 23 Jun 2003 13:09:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19UUo9-0004vl-Qq for emacs-devel@gnu.org; Mon, 23 Jun 2003 13:08:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19UUo8-0004uL-0u for emacs-devel@gnu.org; Mon, 23 Jun 2003 13:08:44 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19UUg7-0001xm-Dk; Mon, 23 Jun 2003 13:00:27 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h5NH0P0i019260; Mon, 23 Jun 2003 13:00:25 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h5NH0NXr019258; Mon, 23 Jun 2003 13:00:23 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Original-cc: mmaug@yahoo.com Original-cc: teirllm@dms.auburn.edu Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15194 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15194 > > Note that _any_ symbol other than `nil' or `-' should turn the mode > > _on_. `toggle' is a symbol, it is not `nil' and not `-'. > > That's also how define-minor-mode behaves. > > I don't think so. This code > > ;; Use `toggle' rather than (if ,mode 0 1) so that using > ;; repeat-command still does the toggling correctly. > (interactive (list (or current-prefix-arg 'toggle))) > (setq ,mode > (cond > ((eq arg 'toggle) (not ,mode)) > > seems to handling `toggle' by toggling the mode, > not by turning it off, which the spec says it should do. Indeed. Although I doubt anybody expects (minor-mode 'toggle) to turn the mode off unconditionally. > changes in such a general and basic spec should be thought about as > such, and I don't think they have been. > > Can I have your comments and proposals for what to do? As far as I know, minor modes are only ever called with the following arguments: - integers - nil - t - a one-element list containing an integer - toggle This last one is new and only happens when the minor mode is called interactively. I think the doc should only describe the behavior is the above cases and leave the others unspecified. It could even not specify the behavior in the `toggle' case since it's only used internally between the interactive spec and the minor mode's body. After all, why should (minor-mode (make-hash-table)) turn the mode off rather than on and why should the doc specify it at all ? Stefan