changeset 66037:89bec3b605ff

(desktop-load-file): Do nothing when FUNCTION is nil.
author Lars Hansen <larsh@soem.dk>
date Wed, 12 Oct 2005 09:16:35 +0000
parents 699f7f132908
children 82f31f593478
files lisp/desktop.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/desktop.el	Tue Oct 11 22:37:01 2005 +0000
+++ b/lisp/desktop.el	Wed Oct 12 09:16:35 2005 +0000
@@ -963,10 +963,11 @@
 
 (defun desktop-load-file (function)
   "Load the file where auto loaded FUNCTION is defined."
-  (let ((fcell (symbol-function function)))
-    (when (and (listp fcell)
-               (eq 'autoload (car fcell)))
-      (load (cadr fcell)))))
+  (when function
+    (let ((fcell (symbol-function function)))
+      (when (and (listp fcell)
+                 (eq 'autoload (car fcell)))
+        (load (cadr fcell))))))
 
 ;; ----------------------------------------------------------------------------
 ;; Create a buffer, load its file, set its mode, ...;