summaryrefslogtreecommitdiff
path: root/lisp/desktop.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r--lisp/desktop.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 2c2106e18b7..a873a6b63bf 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1119,11 +1119,8 @@ directory DIRNAME."
(defun desktop-load-file (function)
"Load the file where auto loaded FUNCTION is defined."
- (when function
- (let ((fcell (and (fboundp function) (symbol-function function))))
- (when (and (listp fcell)
- (eq 'autoload (car fcell)))
- (load (cadr fcell))))))
+ (when (fboundp function)
+ (autoload-do-load (symbol-function function) function)))
;; ----------------------------------------------------------------------------
;; Create a buffer, load its file, set its mode, ...;