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

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

Re: An interactive command definiftion


From: Rodolfo Medina
Subject: Re: An interactive command definiftion
Date: Wed, 11 Aug 2004 17:35:52 +0200

>This provides
>the freedom necessary to achieve what you want:
>
>(defun manage-my-weather (input-char)
>  (interactive
>   (let ((prompt (format "my-weather is now: %s.  Press `c' to change."
>                        my-weather)))
>     (list (read-char prompt))))
>  (when (eq input-char ?c)
>    (setq my-weather
>         (intern (read-from-minibuffer "New weather: ")))))
>
>
>
>   Oliver

I tried it, and it seems to work perfectly! Thanks indeed.
                                                                        Rodolfo





reply via email to

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