From 67ba52a6a59de9bc841191b7b1a453a63e1bfaa5 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 23 Mar 2000 13:53:14 +0000 Subject: [PATCH] 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. --- lisp/net/quickurl.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 5e230231bab..56b184af3b0 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -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 @@ 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 (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) -- 2.39.5