emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] C-x RET r utf-8 RET


From: Eric Abrahamsen
Subject: Re: [O] C-x RET r utf-8 RET
Date: Mon, 08 Dec 2014 17:39:43 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

> On 2014-12-08, at 08:35, Eric Abrahamsen wrote:
>
>> [...] You could do that in a lambda, but
>> it probably won't accept a non-interactive function, [...]
>
> Out of curiosity: can't a lambda (in e.g. global-set-key) be made
> interactive?  I did this right now:
>
> (global-set-key (kbd "C-z C-s") (lambda () (interactive) (message "It can be 
> done!")))
>
> and it seems to work.  Is it going to change e.g. in future Emacs
> versions, IOW, is it deprecated or something?

No, you're quite right, I was just answering off the cuff, without
thorough thought. It is indeed possible to stick (interactive) inside of
a lambda, though intuition tells me that that it's not generally good
practice -- Emacs' introspection functions will probably at some point
bark at you for not having a named function, and it will make it harder
to use the built-in help functions to figure out what's going on. But
yes, you're right, it's definitely possible.

E




reply via email to

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