]> code.delx.au - gnu-emacs/blobdiff - lisp/net/webjump.el
Merge branch 'erc-async-reconnect' into emacs-25
[gnu-emacs] / lisp / net / webjump.el
index 2ae1b0492dcaddbbcc90c8b7a3927dfba77c6db9..7cb017f39a36ace4113478aa65355639b02107eb 100644 (file)
@@ -1,7 +1,6 @@
 ;;; webjump.el --- programmable Web hotlist
 
-;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author:    Neil W. Van Dyke <nwv@acm.org>
 ;; Created:   09-Aug-1996
@@ -39,7 +38,7 @@
 ;; example sites.  You'll probably want to override it with your own favorite
 ;; sites.  The documentation for the variable describes the syntax.
 
-;; You may wish to add something like the following to your `.emacs' file:
+;; You may wish to add something like the following to your init file:
 ;;
 ;;   (require 'webjump)
 ;;   (global-set-key "\C-cj" 'webjump)
                   "www.emacswiki.org/cgi-bin/wiki/" ""])
 
     ;; Internet search engines.
+    ("DuckDuckGo" .
+     [simple-query "duckduckgo.com"
+                  "duckduckgo.com/?q=" ""])
     ("Google" .
      [simple-query "www.google.com"
                   "www.google.com/search?q=" ""])
      "www.faqs.org/faqs/")
     ("RTFM Usenet FAQs by Group" .
      "ftp://rtfm.mit.edu/pub/usenet-by-group/")
-    ("RTFM Usenet FAQs by Hierachy" .
+    ("RTFM Usenet FAQs by Hierarchy" .
      "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/")
     ("X Consortium Archive" . "ftp.x.org")
 
@@ -277,7 +279,7 @@ function and the `webjump-sites' variable.")
 
 (defvar webjump-sites
   webjump-sample-sites
-  "*Hotlist for WebJump.
+  "Hotlist for WebJump.
 
 The hotlist is represented as an association list, with the CAR of each cell
 being the name of the Web site, and the CDR being the definition for the URL of
@@ -448,11 +450,11 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
   (or (null str) (string-match "^[ \t]*$" str)))
 
 (defun webjump-url-encode (str)
-  (mapconcat '(lambda (c)
-                (let ((s (char-to-string c)))
-                  (cond ((string= s " ") "+")
-                        ((string-match "[a-zA-Z_.-/]" s) s)
-                        (t (upcase (format "%%%02x" c))))))
+  (mapconcat (lambda (c)
+               (let ((s (char-to-string c)))
+                 (cond ((string= s " ") "+")
+                       ((string-match "[a-zA-Z_.-/]" s) s)
+                       (t (upcase (format "%%%02x" c))))))
              (encode-coding-string str 'utf-8)
              ""))
 
@@ -480,5 +482,4 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
 
 (provide 'webjump)
 
-;; arch-tag: f1d20156-0a6f-488b-bd91-f69ee8b6d5cc
 ;;; webjump.el ends here