From 97b3a2143e3a556ddd42e6d3c2945c32498242f7 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Wed, 12 Oct 2005 09:16:55 +0000 Subject: [PATCH] (desktop-load-file): Do nothing when FUNCTION is nil. --- lisp/ChangeLog | 5 +++++ lisp/desktop.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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, ...; -- 2.39.5