diff options
author | Eli Zaretskii <[email protected]> | 2007-02-24 13:58:35 +0000 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2007-02-24 13:58:35 +0000 |
commit | 735895f1fa28f88c559e73910ea0ff0bda0f228c (patch) | |
tree | 59ec864fd6032112a5a78e225e5806088128ff63 /lisp | |
parent | b03ab6e8b7d608d2f51c4da9403d0a1f52623e6b (diff) |
(command-line): If simple.el cannot be found, proceed with a warning message.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/startup.el | 36 |
2 files changed, 25 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 164dc076da..008979f047 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-02-24 Eli Zaretskii <[email protected]> + + * startup.el (command-line): If simple.el cannot be found, proceed + with a warning message. + 2007-02-24 Kenichi Handa <[email protected]> * international/utf-8.el (utf-8-pre-write-conversion): Handle the diff --git a/lisp/startup.el b/lisp/startup.el index 5be0e98b4b..76bec87833 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -645,22 +645,26 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (set-locale-environment nil) - ;; Convert preloaded file names to absolute. - (let ((lisp-dir - (file-truename - (file-name-directory - (locate-file "simple" load-path - (get-load-suffixes)))))) - - (setq load-history - (mapcar (lambda (elt) - (if (and (stringp (car elt)) - (not (file-name-absolute-p (car elt)))) - (cons (concat lisp-dir - (car elt)) - (cdr elt)) - elt)) - load-history))) + ;; Convert preloaded file names in load-history to absolute. + (let ((simple-file-name + (locate-file "simple" load-path (get-load-suffixes))) + lisp-dir) + ;; Don't abort if simple.el cannot be found, but print a warning. + (if (null simple-file-name) + (progn + (princ "Warning: Could not find simple.el nor simple.elc" + 'external-debugging-output) + (terpri 'external-debugging-output)) + (setq lisp-dir (file-truename (file-name-directory simple-file-name))) + (setq load-history + (mapcar (lambda (elt) + (if (and (stringp (car elt)) + (not (file-name-absolute-p (car elt)))) + (cons (concat lisp-dir + (car elt)) + (cdr elt)) + elt)) + load-history)))) ;; Convert the arguments to Emacs internal representation. (let ((args (cdr command-line-args))) |