From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#2470: 23.0.90; auto-fill-mode, :minor-mode-function Date: Sun, 10 Jul 2011 00:16:10 +0200 Message-ID: References: <003701c99772$d0fbab30$c2b22382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310249849 16085 80.91.229.12 (9 Jul 2011 22:17:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2011 22:17:29 +0000 (UTC) Cc: 2470@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 00:17:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qffq0-000534-SE for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2011 00:17:25 +0200 Original-Received: from localhost ([::1]:35754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qffpz-00024K-O6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2011 18:17:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qffpg-00023M-59 for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 18:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qffpe-00030O-KQ for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 18:17:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qffpe-00030I-Az for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 18:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qffpd-0008Eu-OX; Sat, 09 Jul 2011 18:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2011 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 2470-submit@debbugs.gnu.org id=B2470.131024981931660 (code B ref 2470); Sat, 09 Jul 2011 22:17:01 +0000 Original-Received: (at 2470) by debbugs.gnu.org; 9 Jul 2011 22:16:59 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qffpa-0008Eb-KW for submit@debbugs.gnu.org; Sat, 09 Jul 2011 18:16:58 -0400 Original-Received: from mail-pw0-f44.google.com ([209.85.160.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QffpY-0008EO-F7 for 2470@debbugs.gnu.org; Sat, 09 Jul 2011 18:16:57 -0400 Original-Received: by pwj5 with SMTP id 5so1976412pwj.3 for <2470@debbugs.gnu.org>; Sat, 09 Jul 2011 15:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=NlXbO7lk6DI3C5MgY5iKBwCAKJpZ+gK1W/ZaDpVvrVs=; b=YZTIzLo+hitnbiV3Jc0Fg/hmmsIx/Wjv+T2T3GRNHZOVVgZheSe4BdlZUo6ujb0W/6 FFg2ZIyO8itv5eIW04FRGjYrCkyPxBN6bAnfTeO6lo+c/jvt1kQNuBcIMm2G8LGOGSdU 4XoPncmfdywDb62gvlNnZYAAjNbDsqdLKPbKE= Original-Received: by 10.143.90.14 with SMTP id s14mr1180973wfl.138.1310249810180; Sat, 09 Jul 2011 15:16:50 -0700 (PDT) Original-Received: by 10.142.144.4 with HTTP; Sat, 9 Jul 2011 15:16:10 -0700 (PDT) In-Reply-To: <003701c99772$d0fbab30$c2b22382@us.oracle.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 09 Jul 2011 18:17:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:48366 Archived-At: On Wed, Feb 25, 2009 at 18:59, Drew Adams wrote: > I said to check the mode variable. =C2=A0The reply was that > auto-fill-mode has no mode variable. As you point out below, the "mode variable" for auto-fill-mode is auto-fill-function. Is what gets set in minor-mode-alist, and its a reliable way to know whether the mode is active or not. > ;; FIXME: turn into a proper minor mode. > ;; Add a global minor mode version of it. > (defun auto-fill-mode (&optional arg) > ... > > So it seems to be in need of a fix, but I see no bug filed against it. It now says: ;; FIXME: turn into a proper minor mode. ;; Add a global minor mode version of it. (define-minor-mode auto-fill-mode The comment (from 2002) is still there, but the mode was converted to define-minor-mode in 2010. > Is this mechanism still needed if `define-minor-mode' is used? Is it > just for compatibility with XEmacs code and legacy code? define-minor-mode has an equivalent :variable keyword, used, as in this case, when it is preferable to get/set the mode variable differently, or use another variable. It is not, AFAIK, because of XEmacs compatibility, but cases where the variable is not just a toggle; for example, overwrite-mode uses it too, and also the new emacs-lock-mode that I committed a few days ago. > How about documenting it - at least with a comment in the code > somewhere: what is for, how and when to use it. About :minor-mode-function, Stefan already answered you that should not be used in new code, so nothing to document. Is anything more to be done about this bug? =C2=A0 =C2=A0 Juanma