emacs-devel
[Top][All Lists]
Advanced

[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:29:12 -0800

> > I'm not very much in favor 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.
> 
> (if (use-region-p) (eval-region (region-beginning) (region-end)) ...)
> in `eval-defun' (`C-M-x') would be a nice addition since `eval-region'
> has no own keybinding.

Again, this is not about `eval-region', which _does not redefine_ a face or var
that is already defined.  It's about the special behavior provided by
`eval-defun' which does redefine.

And I'm interested in a redefining command/key, not making the user activate the
region around a sub-sexp before asking for redefinition.  A command/key can find
the innermost defface etc. surrounding point without any need for the user to
first select it as the region.




reply via email to

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