From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: |PATCH| describe-minor-mode and describe-minor-mode-from-indicator Date: Tue, 01 Apr 2003 04:38:31 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030330.165124.126582929.jet@gyve.org> <200303311551.h2VFp1xQ016968@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1049191148 27161 80.91.224.249 (1 Apr 2003 09:59:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2003 09:59:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 01 11:58:59 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 190IWW-00070T-00 for ; Tue, 01 Apr 2003 11:57:44 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 190IX3-0008CN-00 for ; Tue, 01 Apr 2003 11:58:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 190IWc-00043x-05 for emacs-devel@quimby.gnus.org; Tue, 01 Apr 2003 04:57:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 190IWL-000431-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 04:57:33 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 190IU5-0003GD-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 04:55:14 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.10.13) id 190IRy-0002SX-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 04:53:02 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 190IDv-0000KK-00; Tue, 01 Apr 2003 04:38:31 -0500 Original-To: "Stefan Monnier" In-reply-to: <200303311551.h2VFp1xQ016968@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Original-cc: jet@gyve.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:12795 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12795 I generally believe that `eval' should be avoided. This is especially true here since you call `symbol-name' so you already assume that (car x) is a symbol, so you could just call `symbol-value' instead of `eval'. But note also that nothing guarantees you that (car x) is bound. Finally, I think it's perfectly OK (if not preferable) to list all the minor modes rather than just the currently active ones, so I'd just use (delq nil (mapcar (lambda (x) (symbol-name (car x))) minor-mode-alist)) minor-mode-alist can get quite long, so I think it should show only the enabled ones. Using boundp and symbol-value is a good approach. I've alredy asked Juanma to install the code that Masataki sent. How about if you install the improvements that you can see to make?