unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: List of major modes? // "switch-to-mode"??
@ 2005-11-11 12:27 David Reitter
  2005-11-11 17:00 ` Drew Adams
  2005-11-11 19:30 ` Kevin Rodgers
  0 siblings, 2 replies; 6+ messages in thread
From: David Reitter @ 2005-11-11 12:27 UTC (permalink / raw)
  Cc: Kevin Rodgers, Edward O'Connor

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...?)

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: List of major modes? // "switch-to-mode"??
@ 2005-11-12  2:09 David Reitter
  0 siblings, 0 replies; 6+ messages in thread
From: David Reitter @ 2005-11-12  2:09 UTC (permalink / raw)


>
> In what way is "used interactively" different from `M-x'?
>
> What does switch-to-buffer have to do with major modes?


thanks for those tips.
That was a typo. I meant "switch-to-mode" as in the subject line.  
That should make my question clearer.

D

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-11-12  2:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 12:27 List of major modes? // "switch-to-mode"?? David Reitter
2005-11-11 17:00 ` Drew Adams
2005-11-11 18:45   ` David Reitter
2005-11-11 19:04     ` Drew Adams
2005-11-11 19:30 ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2005-11-12  2:09 David Reitter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).