[Top][All Lists]

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

pepsi-code.el (v1.3)

From: harley
Subject: pepsi-code.el (v1.3)
Date: 28 Feb 2005 21:14:23 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

;; ~/share/emacs/jhg/pepsi-code.el ---
;; $Id: pepsi-code.el,v 1.3 2005/03/01 05:05:29 harley Exp $

(defun pepsi-code-enter ()
  "Ease the process of entering pepsi codes for itunes.
I dont want to keep buckets of smelly caps around, so I keep
the codes in a file."
  (while t
    (let ((c (upcase (read-char (format "pepsi-code:")))))
       ((or (char-equal c 8) (char-equal c 127))
        (delete-backward-char 1))
       ((string-match "[2-9A-Z]" (char-to-string c))
        (insert c)
        (let ((cc (current-column)))
          (if (= cc 5) 
            (insert " ")
            (when (= cc 11)
              (insert "\n") 
       (t ;; opps!

reply via email to

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