[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
question about this-command and friends.
From: |
Thierry Volpiatto |
Subject: |
question about this-command and friends. |
Date: |
Fri, 27 Jul 2012 12:54:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Hi,
`this-command' return the value of the last function used inside a
command.
I would like to have the value of the real command from any place inside
the function.
this-command doesn't provide this as it is altered during the evaluation
of different forms:
--8<---------------cut here---------------start------------->8---
(defun foo ()
(interactive)
this-command => foo
(let ((a (read-string "test: "))
(b (read-string "test: ")))
this-command => exit-minibuffer))
--8<---------------cut here---------------end--------------->8---
What I expect is something that return 'foo' and not exit-minibuffer.
Of course when writing my own functions, I can let-bound this-command
to old--this-command like described in manual and access it at anytime,
but this doesn't help for function that already exists.
So did I miss something to get this value or this is something missing
to elisp.
If so, it would be really nice to have this feature, of course with another
name for compatibility with old code.
e.g
--8<---------------cut here---------------start------------->8---
(defun foo ()
(interactive)
this-command => foo
this-interactive-command => foo
(let ((a (read-string "test: "))
(b (read-string "test: ")))
this-command => exit-minibuffer
this-interactive-command ==> foo))
--8<---------------cut here---------------end--------------->8---
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- question about this-command and friends.,
Thierry Volpiatto <=