From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.help Subject: Re: List of major modes? // "switch-to-mode"?? Date: Fri, 11 Nov 2005 12:27:21 +0000 Message-ID: <87728210-D02C-4129-886F-C2D02891BC06@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131712157 8419 80.91.229.2 (11 Nov 2005 12:29:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2005 12:29:17 +0000 (UTC) Cc: Kevin Rodgers , Edward O'Connor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 11 13:29:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EaY0M-0001XL-9z for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Nov 2005 13:27:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EaY0L-00041y-NP for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Nov 2005 07:27:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EaY08-00041s-8C for help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 07:27:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EaY05-00041g-KJ for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 07:27:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EaY05-00041Z-Ga for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 07:27:25 -0500 Original-Received: from [64.233.184.201] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EaY05-0008D2-JI for Help-gnu-emacs@gnu.org; Fri, 11 Nov 2005 07:27:25 -0500 Original-Received: by wproxy.gmail.com with SMTP id i20so560339wra for ; Fri, 11 Nov 2005 04:27:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=ScCw2pfWefDOqm6oiEnyPVyoka0gH7imVaQ76btD+om9Wuaa9IpDlpp9+pLDkpW0Lz2Vm0E+kPQSxIoRu0dsbPXtShaou8mX+CImTxYhWQX5+NZ/g0hrOoC3IORo6YxAdAPA8T/2vuE/lE0tABlmNuS14s+J/Bl3OTfYxSExyz4= Original-Received: by 10.65.153.12 with SMTP id f12mr2257077qbo; Fri, 11 Nov 2005 04:27:24 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.gmail.com with ESMTP id f15sm1078514qba.2005.11.11.04.27.23; Fri, 11 Nov 2005 04:27:23 -0800 (PST) Original-To: Emacs help X-Mailer: Apple Mail (2.746.2) 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:30986 Archived-At: Thanks for your help with this. Here is my fusion of your code, not using the documentation strings, but using apropos-internal to speed things up: (apropos-internal "-mode\\'" (lambda (mode) (and (commandp mode) (not (string-match "\\`turn-\\(on\\|off\\)-" (symbol-name mode))) (not (assq mode minor-mode-alist))))) Here's why I wanted this: I'd like to come up with a function switch-to-buffer that could be used interactively instead of M-x, with the advantage that completion would only complete mode names, and it would be able to display a list of modes (together with the first lines of their documentation strings) . Has anyone already written something like this? (or is there an Emacs function that I don't know of...?)