[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: Wed, 11 Jan 2012 16:36:38 -0800

> > (when twillig-&-the-tithy-toves-do-tyre-&-timble-in-the-twabe
> >   (defface ...))
> >
> > Currently, in order to make `C-M-x' work for such a "defun" 
> > I temporarily move its first line to column 1 and then hit `C-M-x'.
> > Seems like a silly workaround, but I don't know of a better one.
> Without editing the buffer, you could narrow to the inner expression
> with e.g. `C-M-SPC C-x n n' and use `C-M-x'.

Sure, but that's about as long as the other workaround, especially considering
following it with `C-x n w'.

I don't mind using a workaround if there's a good reason why `C-M-x' does what
it does and it shouldn't be changed.

> But then you might ask why `C-x n d' (`narrow-to-defun') 
> narrows to the top-level expression, and not to the innermost defface, 
> defcustom etc. ;-)

No, but I suppose it too could be asked.

My question is whether we really want `C-M-x' to do what it does instead of just
pick up the innermost def* containing point.

And why it does the former.  If there's a good reason, I'd like to know it.

reply via email to

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