From: Daniel Phillips <phillips@arcor.de>
Date: Mon, 2 Sep 2002 12:16:45 +0200
Admit it, you never wrote a line of lisp ;-)
Oh contraire:
;; The most important function in this file. Use it wisely.
(defun grrr (object)
"Growl at OBJECT"
(interactive "sWhat are you mad at: ")
(if (equal object "")
(message "You growl at %s" (buffer-name))
(message "You growl at %s" object)))
(defun xyzzy () (interactive) (message "nothing happens"))
;; Defun needed for rmail growling hack below.
;;
(defun growl-at-from ()
"Search for from header in mail and growl at that person"
(save-excursion
(save-excursion
(goto-char 0)
(let ((case-fold-search t))
(setq from-location (search-forward "From:" nil))
(setq from-location (+ from-location 1))
(end-of-line)
(setq end-of-from-string (point))
(grrr (buffer-substring from-location end-of-from-string))))))
(add-hook 'rmail-show-message-hook 'growl-at-from)
;; Magic defun to grrr at people who send you mail.
(defun rmail-maybe-set-message-counters ()
"Same as normal defun in rmail.el except here
we growl at whoever the mail is from. Pretty crufty eh?"
(if (not (and rmail-deleted-vector
rmail-message-vector
rmail-current-message
rmail-total-messages))
(rmail-set-message-counters))
(growl-at-from))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:15 EST