help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: run-with-timer does not display message


From: Eli Zaretskii
Subject: Re: run-with-timer does not display message
Date: Sat, 19 Jul 2014 18:27:47 +0300

> From: Sebastian Wiesner <address@hidden>
> Date: Sat, 19 Jul 2014 17:09:32 +0200
> Cc: address@hidden
> 
> > (defun shortcut-to-file (key-prefix key file-prefix file)
> >  (global-set-key
> >   (format "%s%s" key-prefix key)
> >   `(lambda ()
> >      (interactive)
> >      (do-show-file (format "%s%s" ,file-prefix ,file)) )))
> 
> With lexical binding it works without any quoting:
> 
> (defun shortcut-to-file (key-prefix key file-prefix file)
>  (global-set-key
>   (format "%s%s" key-prefix key)
>   (lambda ()
>     (interactive)
>     (do-show-file (format "%s%s" file-prefix file)))))

I don't think Stefan meant backtick-type of quoting.  He meant this:

> M-: (run-with-timer 5 nil '(lambda () (message "hello")))
                            ^^^^^^^^



reply via email to

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