Guest User

Untitled

a guest
Aug 5th, 2015
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.38 KB | None | 0 0
  1. (defun dane-birthday-p ()
  2.   "check if it's the day"
  3.   (string-equal (substring (current-time-string) 4 10) "Aug  5"))
  4.  
  5. (defun birthday-hook ()
  6.   "celebration hook"
  7.   (when (and (dane-birthday-p)
  8.          (not (boundp 'birthday-already-celebrated)))
  9.     (setq birthday-already-celebrated 't)
  10.     (animate-birthday-present "Daniel")))
  11.  
  12. (add-hook 'auto-save-hook 'birthday-hook)
Advertisement
Add Comment
Please, Sign In to add comment