changeset 28285:c54d62415e91

Changed the type of parameter passed to the function defined by `quickurl-format-function'. Before only the text of the URL was passed. Now the whole URL structure is passed and the function is responsible for extracting the parts it requires. Changed the default of `quickurl-format-function' accordingly. (quickurl-insert): Changed the `funcall' of `quickurl-format-function' to match the above change. (quickurl-list-insert): Changed the `url' case so that it makes use of `quickurl-format-function', previous to this the format was hard wired.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 23 Mar 2000 13:53:14 +0000
parents 4719f42a44e2
children 02eba379a4e5
files lisp/net/quickurl.el
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/quickurl.el	Thu Mar 23 13:49:59 2000 +0000
+++ b/lisp/net/quickurl.el	Thu Mar 23 13:53:14 2000 +0000
@@ -1,9 +1,9 @@
 ;;; quickurl.el --- Insert an URL based on text at point in buffer.
 
-;; Copyright (C) 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1999,2000 Free Software Foundation, Inc.
 
-;; Author: Dave Pearson <davep@hagbard.demon.co.uk>
-;; Maintainer: Dave Pearson <davep@hagbard.demon.co.uk>
+;; Author: Dave Pearson <davep@davep.org>
+;; Maintainer: Dave Pearson <davep@davep.org>
 ;; Created: 1999-05-28
 ;; Keywords: hypermedia
 
@@ -111,7 +111,7 @@
   :type  'file
   :group 'quickurl)
 
-(defcustom quickurl-format-function (lambda (url) (format "<URL:%s>" url))
+(defcustom quickurl-format-function (lambda (url) (format "<URL:%s>" (quickurl-url-url url)))
   "*Function to format the URL before insertion into the current buffer."
   :type  'function
   :group 'quickurl)
@@ -294,7 +294,7 @@
   "Insert URL, formatted using `quickurl-format-function'.
 
 Also display a `message' saying what the URL was unless SILENT is non-nil."
-  (insert (funcall quickurl-format-function (quickurl-url-url url)))
+  (insert (funcall quickurl-format-function url))
   (unless silent
     (message "Found %s" (quickurl-url-url url))))
 
@@ -521,7 +521,7 @@
         (with-current-buffer quickurl-list-last-buffer
           (insert
            (case type
-             ('url         (format "<URL:%s>" (quickurl-url-url url)))
+             ('url         (funcall quickurl-format-function url))
              ('naked-url   (quickurl-url-url url))
              ('with-lookup (format "%s <URL:%s>"
                                    (quickurl-url-keyword url)