[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
cd-tool.el
And here is an update --complete with help and bug fixes.
;;;$Id: cd-tool.el,v 1.7 1999/08/30 03:50:28 raman Exp $
;;;Emacs front-end to CDTool
;;{{{ Copyright:
;;; Copyright (C) 1999 T. V. Raman <raman@xxxxxxxxxxx>
;;; All Rights Reserved.
;;;
;;; This file is not part of GNU Emacs, but the same permissions apply.
;;;
;;; GNU Emacs is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;;
;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING. If not, write to
;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;}}}
(require 'cl)
(defvar cd-tool-message
" +Next - Previous p play s stop = shuffle i info e eject"
"Short message to display if user hits invalid key.")
(defun cd-tool ()
"Front-end to CDTool.
Bind this function to a convenient key-
Emacspeak users have one suggested binding C-e del bound
by this module.
Key Action
--- ------
+ Next Track
- Previous Track
SPC Pause or Resume
e Eject
= Shuffle
i CD Info
p Play
s Stop
"
(interactive)
(let ((action nil)
(command nil))
(while (null command)
(setq command
(case (read-char "CD Action? ")
(?+ "cdstart +")
(?- "cdstart -")
(?p "cdplay")
(?s "cdstop")
(?= "cdshuffle")
(?\ "cdpause")
(?r "cdstart")
(?i "cdir ")
(?e "cdeject")
(otherwise (message cd-tool-message)
nil))))
(shell-command
(format "%s &"
command ))))
(define-key emacspeak-keymap "\177" 'cd-tool)
(provide 'cd-tool)
--
Best Regards,
--raman
Email: raman@xxxxxxxxxxx
WWW: http://cs.cornell.edu/home/raman/
PGP: http://cs.cornell.edu/home/raman/raman.asc
-----------------------------------------------------------------------------
To unsubscribe or change your address send mail to
"emacspeak-request@xxxxxxxxxxx" with a subject of "unsubscribe" or "help"
- References:
- cd-tool.el
- From: "T. V. Raman" <ramantv@xxxxxxxxxxx>
Emacspeak Files |
Subscribe |
Unsubscribe