diff lisp/w3/w3-toolbar.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 8d2a9b52c682
children 1ce6082ce73f
line wrap: on
line diff
--- a/lisp/w3/w3-toolbar.el	Mon Aug 13 09:00:04 2007 +0200
+++ b/lisp/w3/w3-toolbar.el	Mon Aug 13 09:02:59 2007 +0200
@@ -1,12 +1,11 @@
 ;;; w3-toolbar.el --- Toolbar functions for emacs-w3
 ;; Author: wmperry
-;; Created: 1997/03/26 00:01:47
-;; Version: 1.9
+;; Created: 1996/06/30 18:12:43
+;; Version: 1.2
 ;; Keywords: mouse, toolbar
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu)
-;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
 ;;;
 ;;; This file is part of GNU Emacs.
 ;;;
@@ -21,19 +20,15 @@
 ;;; GNU General Public License for more details.
 ;;;
 ;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
+;;; along with GNU Emacs; see the file COPYING.  If not, write to
+;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Toolbar specific function for XEmacs 19.12+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(condition-case ()
-    (progn
-      (require 'xpm-button)
-      (require 'xbm-button))
-  (error nil))
+(require 'xpm-button)
+(require 'xbm-button)
 
 (defvar w3-toolbar-icon-directory nil "Where the toolbar icons for w3 are.")
 (defvar w3-toolbar-back-icon nil "Toolbar icon for back")
@@ -79,8 +74,8 @@
 not `none'.")
 
 (defvar w3-toolbar
-  '([w3-toolbar-back-icon w3-history-backward (car (w3-history-find-url-internal (url-view-url t))) "Back in history"]
-    [w3-toolbar-forw-icon w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t))) "Forward in history"]
+  '([w3-toolbar-back-icon w3-backward-in-history t "Back in history"]
+    [w3-toolbar-forw-icon w3-forward-in-history t "Forward in history"]
     [w3-toolbar-home-icon w3 t "Go home"]
     [:style 2d :size 5]
     [w3-toolbar-reld-icon w3-reload-document t "Reload document"]
@@ -163,8 +158,7 @@
 	     (expand-file-name "w3" data-directory))))
   (cond
    ((not (file-exists-p w3-toolbar-icon-directory))
-    (and w3-running-xemacs
-	 (w3-warn 'files "Toolbar directory does not exist.")))
+    (w3-warn 'files "Toolbar directory does not exist."))
    ((not (fboundp 'toolbar-make-button-list))
     nil)
    ((eq w3-toolbar-type 'text)
@@ -176,8 +170,9 @@
 
 (defun w3-link-is-defined (rel &optional rev)
   (or
-   (cdr-safe (assoc rel (cdr-safe (assq 'rel w3-current-links))))
-   (cdr-safe (assoc (or rev rel) (cdr-safe (assq 'rev w3-current-links))))))
+   (cdr-safe (assoc rel (cdr-safe (assoc "Parent of" w3-current-links))))
+   (cdr-safe (assoc (or rev rel) (cdr-safe (assoc "Child of"
+						  w3-current-links))))))
 
 ;; Need to create w3-toolbar-glos-icon
 ;;                w3-toolbar-toc-icon
@@ -293,7 +288,7 @@
     (if toolbar
 	(if (w3-toolbar-active)
 	    (set-specifier toolbar (cons (current-buffer) nil))
-	  (set-specifier toolbar w3-link-toolbar (current-buffer))))))
+	  (set-specifier toolbar (cons (current-buffer) w3-link-toolbar))))))
 
 (defun w3-toggle-toolbar ()
   (interactive)