# HG changeset patch # User Lars Hansen # Date 1129108595 0 # Node ID 89bec3b605ff9eb2e18f0fc1b3f207fc9ddce071 # Parent 699f7f1329088a599d116533a8ae97764f9d50c1 (desktop-load-file): Do nothing when FUNCTION is nil. diff -r 699f7f132908 -r 89bec3b605ff lisp/desktop.el --- 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, ...;