[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wtf.el --- Look up conversational and computing acronyms
From: |
Ehud Karni |
Subject: |
Re: wtf.el --- Look up conversational and computing acronyms |
Date: |
Sat, 13 Aug 2005 17:57:36 +0300 |
On Fri, 12 Aug 2005 16:21:37 -0500, Michael Olson wrote:
>
> (defun wtf-is (term)
> "Provide the definition for TERM.
> When called interactively, print the message \"TERM is DEF\".
> Otherwise, return DEF.
>
> DEF refers to the definition associated with TERM in `wtf-alist'."
> (interactive
> (list (completing-read "Term: "
> (mapcar #'(lambda (term)
> (downcase (car term)))
The above line should be:
(cons (downcase (car term)) nil)
Or it won't work in 21.3 (fails in all-completion).
> wtf-alist)
> nil t (wtf-get-term-at-point))))
> (when (stringp term)
> (let ((def (cdr (assoc (upcase term) wtf-alist))))
> (when def
> (setq def (upcase-initials def))
> (if (and def (interactive-p))
> (message (concat term " is " def))
> def)))))
>
Ehud.
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry