From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: List of major modes? // "switch-to-mode"?? Date: Fri, 11 Nov 2005 11:04:43 -0800 Message-ID: References: <2679671F-4743-47EF-95F5-6BB303B0D626@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131735976 20015 80.91.229.2 (11 Nov 2005 19:06:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2005 19:06:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 11 20:06:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EaeD2-0005jB-HF for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Nov 2005 20:05:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EaeD1-0001jT-Oi for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Nov 2005 14:05:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EaeCe-0001jN-5q for help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 14:04:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EaeCc-0001ie-MH for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 14:04:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EaeCc-0001iW-J8 for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 14:04:46 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EaeCc-00038u-C0 for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 14:04:46 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jABJGJ8v019523 for ; Fri, 11 Nov 2005 13:16:19 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jABJ4iR8011708 for ; Fri, 11 Nov 2005 12:04:44 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jABJ4iqS011701 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 11 Nov 2005 12:04:44 -0700 Original-To: "Emacs help" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal In-Reply-To: <2679671F-4743-47EF-95F5-6BB303B0D626@gmail.com> X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30997 Archived-At: thanks for your detailed explanations. Icicles is very useful indeed. Too bad the package installs stuff right upon loading (and actually activates the mode as well!), which it shouldn't do... It should do just what it does. It follows the conventions for a minor mode. Those conventions were discussed recently in emacs-devel (e.g. wrt a non-nil initial value for the mode), and I've confirmed that Icicles is doing things the right way in this regard. You can easily prevent activating the mode upon load. Simply put this in your .emacs, before loading icicles.el. (setq icicle-mode nil) The mode will then be inactive when you load the library, and remain so until you explicitly activate it. I'll look more into configuration things later. There's nothing to configure, unless you want to change some of the user-option values. For now, I'll try to find a predicate that reliably determines a list of major modes. That isn't trivial, as the ongoing discussion shows. In particular when only autoload information is available, it seems like it's pretty much impossible. This is sad, because a novice user would certainly be interested in a list of installed major modes. See my previous message - I doubt you will find a fool-proof test for major-modeness that correctly excludes minor modes. If you have control over the installation (e.g. Aquamacs), then why can't you test against an explicit list of the known, installed major modes? Another possibility (workaround) is to augment your predicate with a test against a known list of minor modes that aren't in `minor-mode-alist' etc. HTH - Drew