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: Dave Abrahams
Subject: Re: Why is `C-M-x' only for top-level defuns?
Date: Thu, 12 Jan 2012 11:52:40 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (darwin)

on Thu Jan 12 2012, "Drew Adams" <drew.adams-AT-oracle.com> wrote:

>> 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 command/key.
>
> 1. It just occurred to me that edebug instrumentation is only for functions, 
> and
> the redefinition feature I'm talking about is only for faces and vars.
>
> So presumably there would be no need to distinguish different kinds of prefix
> args.  We could let a prefix arg mean to either redefine the innermost 
> face/var
> definition containing point, if any, or instrument the column-0 defun (what it
> does now).
>
> In the not-so-common context of a def(face|custom|var) that is inside a defun
> that you want to instrument for edebug, the behavior of a prefix arg would
> differ depending on the position of point.  Whether that case is common enough
> to warrant requiring different prefix-arg values to distinguish the two, I 
> don't
> know (I doubt it).
>
> 2. Another possibility: let `C-M-x' inside a def(face|custom|var) always
> redefine it (i.e., without a prefix arg).  That would mean that to make 
> `C-M-x'
> eval a sexp starting in column 0, point would need to be outside any sub-sexp
> that is a def(face|custom|var).
>
> (But I repeat that I'm OK with having a separate command/key for this, not
> `C-M-x'.)

I just wanna say: I've always wanted the behavior Drew is proposing (for
edebug-defun, eval-defun, and xxx-defun in general) and despite the fact
that I should know better by now, I am surprised every time these
functions go all the way to the outermost sexp.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




reply via email to

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