all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Clever way to do this?
@ 2011-07-28 14:55 Deniz Dogan
  2011-07-28 15:51 ` PJ Weisberg
  0 siblings, 1 reply; 2+ messages in thread
From: Deniz Dogan @ 2011-07-28 14:55 UTC (permalink / raw)
  To: help-gnu-emacs

I have a command like this:

(defun ftip-rate-movie (rating)
   (interactive
    (list
     (if (not ftip-movie-id)
         (error "Not viewing movie")
       (completing-read "Rating: " '("1" "2" "3" "4" "5" "Remove 
rating") nil t))))
   (unless ftip-movie-id
     (error "Not viewing movie"))

   ;; ...code here
   )

Is there any more intelligent way to do this?  I'm not too keen on the 
code duplication.

Thanks,
Deniz



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-28 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 14:55 Clever way to do this? Deniz Dogan
2011-07-28 15:51 ` PJ Weisberg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.