comparison lisp/w3/w3-hot.el @ 32:e04119814345 r19-15b99

Import from CVS: tag r19-15b99
author cvs
date Mon, 13 Aug 2007 08:52:56 +0200
parents 441bb1e64a06
children 131b0175ea99
comparison
equal deleted inserted replaced
31:b9328a10c56c 32:e04119814345
1 ;;; w3-hot.el --- Main functions for emacs-w3 on all platforms/versions 1 ;;; w3-hot.el --- Main functions for emacs-w3 on all platforms/versions
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/02/18 23:36:48 3 ;; Created: 1997/03/11 15:04:05
4 ;; Version: 1.12 4 ;; Version: 1.13
5 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia 5 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
314 (w3-fetch url)))) 314 (w3-fetch url))))
315 315
316 (defun w3-hotlist-add-document-at-point (pref-arg) 316 (defun w3-hotlist-add-document-at-point (pref-arg)
317 "Add the document pointed to by the hyperlink under point to the hotlist." 317 "Add the document pointed to by the hyperlink under point to the hotlist."
318 (interactive "P") 318 (interactive "P")
319 (let ((url (w3-view-this-url t)) title) 319 (let ((url (w3-view-this-url t))
320 (widget (widget-at (point)))
321 (title nil))
320 (or url (error "No link under point.")) 322 (or url (error "No link under point."))
321 (setq title (get-text-property (point) 'title)) 323 (if (and (widget-get widget :from)
322 (if (and title 324 (widget-get widget :to))
323 (marker-buffer (car title)) 325 (setq title (buffer-substring (widget-get widget :from)
324 (marker-buffer (cdr title))) 326 (widget-get widget :to))))
325 (setq title (buffer-substring-no-properties (car title) (cdr title))) 327 (w3-hotlist-add-document pref-arg (or title url) url)))
326 (setq title "None"))
327 (w3-hotlist-add-document pref-arg title url)))
328 328
329 (defun w3-hotlist-add-document (pref-arg &optional the-title the-url) 329 (defun w3-hotlist-add-document (pref-arg &optional the-title the-url)
330 "Add this documents url to the hotlist" 330 "Add this documents url to the hotlist"
331 (interactive "P") 331 (interactive "P")
332 (save-excursion 332 (save-excursion