From: Lars Hansen Date: Wed, 12 Oct 2005 09:16:55 +0000 (+0000) Subject: (desktop-load-file): Do nothing when FUNCTION is nil. X-Git-Tag: emacs-pretest-22.0.90~6649 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=97b3a2143e3a556ddd42e6d3c2945c32498242f7;p=emacs.git (desktop-load-file): Do nothing when FUNCTION is nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1de2034918d..82189b2d492 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-10-12 Lars Hansen + + * desktop.el (desktop-load-file): Do nothing when FUNCTION is nil. + Reported by Reiner Steib . + 2005-10-11 Sven Joachim * progmodes/sh-script.el (sh-tmp-file): diff --git a/lisp/desktop.el b/lisp/desktop.el index cf4d387c7b1..0d5d18da191 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -963,10 +963,11 @@ directory DIRNAME." (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, ...;