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 08:25:11 -0800

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




reply via email to

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