unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Scott Frazer <frazer.scott@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Per-mode obarray for M-x
Date: Sun, 6 Mar 2011 10:56:54 -0500	[thread overview]
Message-ID: <AANLkTi=t2KR7uGDKPZPEPgiJhdQVv-TCA4pSCY0h73sz@mail.gmail.com> (raw)
In-Reply-To: <E1PwE22-0004tT-CW@fencepost.gnu.org>

On Sun, Mar 6, 2011 at 8:29 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 6 Mar 2011 08:04:42 -0500
>> From: Scott Frazer <frazer.scott@gmail.com>
>>
>> Here's why I'd like this.  There are some commands I run somewhat
>> often, but they have long and/or difficult to remember names.  For
>> example auto-revert-tail-mode.  I am thinking as I type "Is it
>> auto-revert-tail-mode or auto-tail-revert-mode?"
>
> Does the problem still exist in the latest Emacs versions?  E.g., in
> Emacs 23.3, "M-x auto-tail TAB" completes to auto-revert-tail-mode
> without anything special you'd need to do.  The secret is that
> completion was lately extended, and is now much smarter.  In fact,
> there are a few non-default completion styles which will be even more
> aggressive than the above miracle.
>
> IOW, maybe your problem was already solved?
>

While the new completion modes are cool and would help in that
particular instance, in my other example of "html" there would be many
hits to sort through.  Those were just some illustrative examples
anyway, I'd still like the general mechanism.

It (naively) seems not too difficult.  There would be a buffer-local
obarray variable that gets populated during major-mode setup, a macro
that wraps creating a defun with a mode-specific prefix and interns
the defun (and the shortened version?  Should the prefixed one go in
the 'main' obarray?) in the buffer-local obarray, then when you M-x it
looks in the buffer-local obarray first.  Or something like that.

Scott



  reply	other threads:[~2011-03-06 15:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 13:04 Per-mode obarray for M-x Scott Frazer
2011-03-06 13:29 ` Eli Zaretskii
2011-03-06 15:56   ` Scott Frazer [this message]
2011-03-06 18:43     ` Thierry Volpiatto
2011-03-06 13:39 ` David Engster
2011-03-06 20:04 ` Stefan Monnier
2011-03-08  0:39 ` Richard Stallman
2011-03-08  3:08   ` Stefan Monnier
2011-03-09  0:40     ` Richard Stallman
2011-03-09  3:26       ` Stefan Monnier
2011-03-09 23:02         ` Richard Stallman
2011-03-09 14:33   ` Scott Frazer
2011-03-09 16:08     ` Davis Herring
2011-03-10 23:15     ` Richard Stallman
2011-03-11  2:18     ` Scott Frazer
2011-03-11 14:57       ` Ted Zlatanov
2011-03-11 18:21         ` Scott Frazer
2011-03-11 19:02           ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=t2KR7uGDKPZPEPgiJhdQVv-TCA4pSCY0h73sz@mail.gmail.com' \
    --to=frazer.scott@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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