Function: speedbar-item-load

speedbar-item-load is an interactive and byte-compiled function defined in speedbar.el.gz.

Signature

(speedbar-item-load)

Documentation

Load the item under the cursor or mouse if it is a Lisp file.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-item-load ()
  "Load the item under the cursor or mouse if it is a Lisp file."
  (interactive)
  (let ((f (speedbar-line-file)))
    (if (and (file-exists-p f) (string-match "\\.el\\'" f))
	(if (and (file-exists-p (concat f "c"))
		 (speedbar-y-or-n-p (format "Load %sc? " f)))
	    ;; If the compiled version exists, load that instead...
	    (load-file (concat f "c"))
	  (load-file f))
      (error "Not a loadable file"))))