diff options
| author | Gerd Moellmann | 2000-03-23 13:53:14 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-03-23 13:53:14 +0000 |
| commit | 67ba52a6a59de9bc841191b7b1a453a63e1bfaa5 (patch) | |
| tree | 9b7b722def55ebca0f62e8cf6117f85886fd56f5 | |
| parent | 2447fc02df62374cb0473236e6f97a21dc2b9560 (diff) | |
| download | emacs-67ba52a6a59de9bc841191b7b1a453a63e1bfaa5.tar.gz emacs-67ba52a6a59de9bc841191b7b1a453a63e1bfaa5.zip | |
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.
| -rw-r--r-- | lisp/net/quickurl.el | 12 |
1 files 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 @@ | |||
| 1 | ;;; quickurl.el --- Insert an URL based on text at point in buffer. | 1 | ;;; quickurl.el --- Insert an URL based on text at point in buffer. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999,2000 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Pearson <davep@hagbard.demon.co.uk> | 5 | ;; Author: Dave Pearson <davep@davep.org> |
| 6 | ;; Maintainer: Dave Pearson <davep@hagbard.demon.co.uk> | 6 | ;; Maintainer: Dave Pearson <davep@davep.org> |
| 7 | ;; Created: 1999-05-28 | 7 | ;; Created: 1999-05-28 |
| 8 | ;; Keywords: hypermedia | 8 | ;; Keywords: hypermedia |
| 9 | 9 | ||
| @@ -111,7 +111,7 @@ | |||
| 111 | :type 'file | 111 | :type 'file |
| 112 | :group 'quickurl) | 112 | :group 'quickurl) |
| 113 | 113 | ||
| 114 | (defcustom quickurl-format-function (lambda (url) (format "<URL:%s>" url)) | 114 | (defcustom quickurl-format-function (lambda (url) (format "<URL:%s>" (quickurl-url-url url))) |
| 115 | "*Function to format the URL before insertion into the current buffer." | 115 | "*Function to format the URL before insertion into the current buffer." |
| 116 | :type 'function | 116 | :type 'function |
| 117 | :group 'quickurl) | 117 | :group 'quickurl) |
| @@ -294,7 +294,7 @@ depends on the setting of the variable `quickurl-assoc-function'." | |||
| 294 | "Insert URL, formatted using `quickurl-format-function'. | 294 | "Insert URL, formatted using `quickurl-format-function'. |
| 295 | 295 | ||
| 296 | Also display a `message' saying what the URL was unless SILENT is non-nil." | 296 | Also display a `message' saying what the URL was unless SILENT is non-nil." |
| 297 | (insert (funcall quickurl-format-function (quickurl-url-url url))) | 297 | (insert (funcall quickurl-format-function url)) |
| 298 | (unless silent | 298 | (unless silent |
| 299 | (message "Found %s" (quickurl-url-url url)))) | 299 | (message "Found %s" (quickurl-url-url url)))) |
| 300 | 300 | ||
| @@ -521,7 +521,7 @@ TYPE dictates what will be inserted, options are: | |||
| 521 | (with-current-buffer quickurl-list-last-buffer | 521 | (with-current-buffer quickurl-list-last-buffer |
| 522 | (insert | 522 | (insert |
| 523 | (case type | 523 | (case type |
| 524 | ('url (format "<URL:%s>" (quickurl-url-url url))) | 524 | ('url (funcall quickurl-format-function url)) |
| 525 | ('naked-url (quickurl-url-url url)) | 525 | ('naked-url (quickurl-url-url url)) |
| 526 | ('with-lookup (format "%s <URL:%s>" | 526 | ('with-lookup (format "%s <URL:%s>" |
| 527 | (quickurl-url-keyword url) | 527 | (quickurl-url-keyword url) |