unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Thierry Volpiatto'" <thierry.volpiatto@gmail.com>,
	<emacs-devel@gnu.org>
Subject: RE: Why is `C-M-x' only for top-level defuns?
Date: Thu, 12 Jan 2012 07:29:19 -0800	[thread overview]
Message-ID: <5EE4D15C6F794FFD809CEC03AC1C14A1@us.oracle.com> (raw)
In-Reply-To: <87fwflsa3r.fsf@gmail.com>

> With anything, you can put point in any sexp of a block an eval it.
> If needed you can edit it in minibuffer to provide a result.
> Here cursor is on the let sexp and i hit `C-u C-:' and then edit it to
> have a value for 'a' and 'b'.
> 
> (defun foo (a b)
>   -!-(let ((c (+ a b))) (+ a b c)))

See my earlier message and my reply to Stephen T.

1. The question is not about whether there are handy ways to edit a
subexpression and evaluate it.  It's about hitting a key to redefine a face or
var, regardless of where the face or var definition is (column 0 or not). 

Mere evaluation does not _redefine_ a face or var - it does nothing to a
defface, defcustom, or defvar if the face or var has already been defined.

2. Wrt someone trying to eval (with or without redefinition) a sexp that is
incomplete because it depends on stuff outside it (e.g., `a', `b' in your
example), sure, you could edit to could complete it.

But typically for an incomplete defface, defcustom, or defvar form, the best
behavior is to let Emacs complain (error).  Typically, asking for its
eval/redefinition just represents user error.

Anyway, the question I raised is not how we might simplify editing for
evaluating a subform.  It's about having a key that redefines faces and
variables.




  reply	other threads:[~2012-01-12 15:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 17:06 Why is `C-M-x' only for top-level defuns? Drew Adams
2012-01-11 21:34 ` Thien-Thi Nguyen
2012-01-11 22:22   ` Drew Adams
2012-01-12  0:11 ` Juri Linkov
2012-01-12  0:36   ` Drew Adams
2012-01-12  1:27     ` Stefan Monnier
2012-01-12  2:40       ` Daniel Colascione
2012-01-12  3:42         ` Drew Adams
2012-01-12  4:05           ` Stefan Monnier
2012-01-12  4:15             ` Daniel Colascione
2012-01-12  6:34             ` Thierry Volpiatto
2012-01-12 15:29               ` Drew Adams [this message]
2012-01-12 10:30             ` Juri Linkov
2012-01-12 15:29               ` Drew Adams
2012-01-12 15:21             ` Drew Adams
2012-01-12 16:25               ` Drew Adams
2012-01-12 16:52                 ` Dave Abrahams
2012-01-12  5:23 ` Stephen J. Turnbull
2012-01-12 15:29   ` Drew Adams
2012-01-12 16:47     ` Stephen J. Turnbull
2012-01-12 16:56       ` Dave Abrahams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5EE4D15C6F794FFD809CEC03AC1C14A1@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).