Mercurial > emacs
changeset 76119:99573326a46c
(command-line): If simple.el cannot be found, proceed with a warning message.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 24 Feb 2007 13:57:39 +0000 |
parents | b77840d6ef61 |
children | d47e40b30370 |
files | lisp/startup.el |
diffstat | 1 files changed, 20 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Sat Feb 24 09:51:31 2007 +0000 +++ b/lisp/startup.el Sat Feb 24 13:57:39 2007 +0000 @@ -645,22 +645,26 @@ (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)))