summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-05-11 09:12:09 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-05-11 09:12:09 +0000
commitd9858e4f1889a61b216ae1f99053846362067ccc (patch)
treed0f18015bf1ebe06f489de11b74b4e4b5e98fdc3 /lisp/net
parentab4b17bed77ba635b5654accdfde3fbdf125f3e6 (diff)
parenta57e8159253e6ddd74b0453de7c526a9895b9576 (diff)
downloademacs-d9858e4f1889a61b216ae1f99053846362067ccc.tar.gz
emacs-d9858e4f1889a61b216ae1f99053846362067ccc.tar.bz2
emacs-d9858e4f1889a61b216ae1f99053846362067ccc.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-291 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-292 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-293 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-294 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-298 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-162
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/quickurl.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index fd13b3a0f51..40a1e4bfad3 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -256,14 +256,16 @@ returned."
;; Main code:
-(defun* quickurl-read (&optional (buffer (current-buffer)))
+(defun* quickurl-read (&optional buffer)
"`read' the URL list from BUFFER into `quickurl-urls'.
+BUFFER, if nil, defaults to current buffer.
Note that this function moves point to `point-min' before doing the `read'
It also restores point after the `read'."
(save-excursion
(setf (point) (point-min))
- (setq quickurl-urls (funcall quickurl-sort-function (read buffer)))))
+ (setq quickurl-urls (funcall quickurl-sort-function
+ (read (or buffer (current-buffer)))))))
(defun quickurl-load-urls ()
"Load the contents of `quickurl-url-file' into `quickurl-urls'."
@@ -298,14 +300,15 @@ Also display a `message' saying what the URL was unless SILENT is non-nil."
(message "Found %s" (quickurl-url-url url))))
;;;###autoload
-(defun* quickurl (&optional (lookup (funcall quickurl-grab-lookup-function)))
+(defun* quickurl (&optional lookup)
"Insert an URL based on LOOKUP.
If not supplied LOOKUP is taken to be the word at point in the current
buffer, this default action can be modifed via
`quickurl-grab-lookup-function'."
(interactive)
- (when lookup
+ (when (or lookup
+ (setq lookup (funcall quickurl-grab-lookup-function)))
(quickurl-load-urls)
(let ((url (quickurl-find-url lookup)))
(if (null url)
@@ -392,14 +395,15 @@ is decided."
(message "Added %s" url))))))
;;;###autoload
-(defun* quickurl-browse-url (&optional (lookup (funcall quickurl-grab-lookup-function)))
+(defun quickurl-browse-url (&optional lookup)
"Browse the URL associated with LOOKUP.
If not supplied LOOKUP is taken to be the word at point in the
current buffer, this default action can be modifed via
`quickurl-grab-lookup-function'."
(interactive)
- (when lookup
+ (when (or lookup
+ (setq lookup (funcall quickurl-grab-lookup-function)))
(quickurl-load-urls)
(let ((url (quickurl-find-url lookup)))
(if url