[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading major-mode name via completion?

From: Stephen Leake
Subject: Re: Reading major-mode name via completion?
Date: Sun, 29 May 2016 13:51:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Stefan Monnier <address@hidden> writes:

>> Is there a completion table that already exists in emacs that one
>> could pass to completing-read for reading in a major-mode name?
> You might like to look at `customize-mode' which seems to provide
> that completion.

That essentially does:

(completing-read "prompt" obarray 'custom-group-of-mode ...)

`custom-group-of-mode' is used as the predicate in the completion; it
returns non-nil if the symbol has a custom group.

So this assumes all major modes have custom groups, which is only
approximately true.

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]