[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 <swiesner@lunaryorn.com>
> Date: Sat, 19 Jul 2014 17:09:32 +0200
> Cc: help-gnu-emacs@gnu.org
>
> > (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")))
^^^^^^^^