# HG changeset patch # User Gerd Moellmann # Date 953819594 0 # Node ID c54d62415e9197a190ffaca308d682fb52531002 # Parent 4719f42a44e287988dd944f492131b0e8022c95d 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. diff -r 4719f42a44e2 -r c54d62415e91 lisp/net/quickurl.el --- 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 -;; Maintainer: Dave Pearson +;; Author: Dave Pearson +;; Maintainer: Dave Pearson ;; Created: 1999-05-28 ;; Keywords: hypermedia @@ -111,7 +111,7 @@ :type 'file :group 'quickurl) -(defcustom quickurl-format-function (lambda (url) (format "" url)) +(defcustom quickurl-format-function (lambda (url) (format "" (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 "" (quickurl-url-url url))) + ('url (funcall quickurl-format-function url)) ('naked-url (quickurl-url-url url)) ('with-lookup (format "%s " (quickurl-url-keyword url)