[Top][All Lists]

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

RE: Why is `C-M-x' only for top-level defuns?

From: Drew Adams
Subject: RE: Why is `C-M-x' only for top-level defuns?
Date: Thu, 12 Jan 2012 07:21:12 -0800

> > Off the top of my head, however, I'd guess that just going `uplist'
> > from point till finding `defface', `defcustom', or `defvar' 
> > as the car might be good enough.
> C-M-x differs from C-x C-e in two aspects:
> 1- it "guesses" which sexp is meant.
> 2- it handles defface/defvar/defcustom specially.
> IIUC you're only worried about the first partt o the extent that it
> prevents you from getting to the second.  I.e. what you're after is
> a way to get (2) of C-M-x for sexps where (1) currently fails.
> I'm not very much in fa vor of trying to make (1) smarter because it
> will make it less uniform.  So we could maybe provide a new command
> half-way between C-x C-e and C-M-x, or maybe change (1) so 
> that it uses the region if active.

Yes, on all accounts.  You understood correctly, and I agree that this could be
on a different key.

Needing to activate a region doesn't sound to me like a great way to distinguish
the behaviors.  But I'm probably OK with any way of providing the feature.

Another possibility could be to respect different prefix args in different ways
(edebug vs this feature).  But the simplest solution is likely having a separate

reply via email to

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