Commit 67ba52a6 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

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'
(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.
parent 2447fc02
;;; 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:%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 @@ depends on the setting of the variable `quickurl-assoc-function'."
"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 @@ TYPE dictates what will be inserted, options are:
(with-current-buffer quickurl-list-last-buffer
(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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment