Source

speedbar / speedbspec.el

Diff from to

File speedbspec.el

 ;;; speedbspec --- Buffer specialized configurations for speedbar
 
-;; Copyright (C) 1997 Free Software Foundation
+;; Copyright (C) 1997, 1998 Free Software Foundation
 ;;
 ;; Author: Eric M. Ludlam <zappo@gnu.ai.mit.edu>
 ;; Version: 0.2
 ;; Keywords: file, tags, tools
 ;; X-RCS: $Id$
 ;;
+;; This file is part of GNU Emacs.
+;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;;          Made the functions to turn on/off speedbar support interactive.
 ;;             It is *not* a minor-mode, it mearly enables special speedbar
 ;;             behaviors.
+;;  0.2.1 - Fix for emacs 20 when checking for autoload functions.
 
 ;;; Code:
 (require 'speedbar)
 	      nil ;; do nothing to broken mode
 	    (setq ms (substring ms 0 (match-beginning 0)))
 	    (setq v (intern-soft (concat ms "-speedbar-buttons")))
-	    ;; If it is autoloaded, we need to load it now so that
-	    ;; we have access to the varialbe -speedbar-menu-items.
-	    ;; Is this XEmacs safe?
 	    (if (not v)
 		nil ;; do nothing if not defined
+	      ;; If it is autoloaded, we need to load it now so that
+	      ;; we have access to the varialbe -speedbar-menu-items.
+	      ;; Is this XEmacs safe?
 	      (let ((sf (symbol-function v)))
-		(if (eq (car sf) 'autoload)
+		(if (and (listp sf) (eq (car sf) 'autoload))
 		    (load-library (car (cdr sf)))))
 	      (set (make-local-variable 'speedbar-special-mode-expansion-list)
 		   (list v))