Mercurial > hg > xemacs-beta
comparison lisp/packages/webster-www.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
1 ;;; webster-www.el --- Look up a word in WWW Merriam-Webster dictionary | |
2 | |
3 ;; Copyright (c) 1997 by Tomasz J. Cholewo <t.cholewo@ieee.org> | |
4 | |
5 ;; Created: 1997/03/10 | |
6 ;; Version: 1.0 | |
7 ;; Keywords: comm, hypermedia | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
11 ;; XEmacs is free software; you can redistribute it and/or modify it | |
12 ;; under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; XEmacs is distributed in the hope that it will be useful, but | |
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 ;; General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
24 ;; 02111-1307, USA. | |
25 | |
26 ;;; Synched up with: not in FSF. | |
27 | |
28 ;;; Code: | |
29 | |
30 (defvar webster-url "http://www.m-w.com/cgi-bin/mweb?book=Dictionary&va=" | |
31 "URL to reference for Webster's dictionary.") | |
32 | |
33 ;;;###autoload | |
34 (defun webster-www (arg) | |
35 "Look up a word in the Webster's dictionary at http://www.m-w.com using WWW." | |
36 (interactive (list | |
37 (let ((prompt (concat "Look up word in webster (" | |
38 (current-word) "): "))) | |
39 (read-string prompt)))) | |
40 (require 'url) | |
41 (require 'w3-forms) | |
42 (if (equal "" arg) (setq arg (current-word))) | |
43 (funcall browse-url-browser-function | |
44 (concat | |
45 webster-url | |
46 (w3-form-encode-xwfu arg)))) | |
47 | |
48 (provide 'webster-www) | |
49 | |
50 ;;; webster-www.el ends here |