>>>>> "Moiself" == Michael Sperber <sperber(a)Informatik.Uni-Tuebingen.De> writes:
>>>>> "Stephen" == Stephen J Turnbull <turnbull(a)sk.tsukuba.ac.jp> writes:
Stephen> However, according my understanding of something Steve Baur wrote, it
Stephen> should be possible to run XEmacs with _nothing_ except the binary
Stephen> itself, and at least manage the functionality of MS-Edit under DOS.
Stephen> If that is a goal, then crashing just because it can't find any
Stephen> packages, or even core Lisp, is not acceptable. Steve?
Moiself> Right. This has little to do with path searching, but I have a set of
Moiself> patches that make it go a lot further than it did. Still, it's very
Moiself> much hardwired into the system that it can get at the core Lisp
Moiself> auto-autoloads. Questions for Steve:
Moiself> - Is being able to run a naked executable a priority?
Moiself> - What's the rationale of auto-autoloads not being dumped?
Strike all that. Here's how to make it both a naked executable and
--no-autoloads work, along with some minor misc cleanups.
lisp/ChangeLog
1998-04-23 Michael Sperber [Mr. Preprocessor] <sperber(a)informatik.uni-tuebingen.de>
* x-menubar.el (default-menubar): font-menu-this-frame-only-p and
font-menu-ignore-scaled-fonts don't have to be bound now; this
gets us one step further towards making --no-autoloads work.
* startup.el (normal-top-level): Load auto-autoloads only if
lisp-directory is non-nil.
* setup-paths.el (paths-construct-load-path): Made it robust
against nil lisp-directory.
* startup.el (startup-setup-paths-warning): Added `lisp-directory'
to the list of variables that cause a warning when nil.
* toolbar.el (init-toolbar-location): Now works even when there's
no toolbar icon directory.
Index: lisp/setup-paths.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/setup-paths.el,v
retrieving revision 1.9
diff -u -r1.9 setup-paths.el
--- setup-paths.el 1998/04/23 02:07:55 1.9
+++ setup-paths.el 1998/04/23 17:37:44
@@ -72,8 +72,9 @@
(paths-find-recursive-load-path (list site-lisp-directory)
paths-load-path-depth)))
(lisp-load-path
- (paths-find-recursive-load-path (list lisp-directory)
- paths-load-path-depth)))
+ (and site-lisp-directory
+ (paths-find-recursive-load-path (list lisp-directory)
+ paths-load-path-depth))))
(append env-load-path
early-package-load-path
site-lisp-load-path
Index: lisp/startup.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/startup.el,v
retrieving revision 1.18
diff -u -r1.18 startup.el
--- startup.el 1998/04/17 07:17:03 1.18
+++ startup.el 1998/04/23 17:37:54
@@ -395,7 +395,8 @@
debug-paths))
(startup-setup-paths-warning))
- (if (not inhibit-autoloads)
+ (if (and (not inhibit-autoloads)
+ lisp-directory)
(load (expand-file-name (file-name-sans-extension autoload-file-name)
lisp-directory) nil t))
@@ -1132,45 +1133,40 @@
(erase-buffer)
(buffer-disable-undo (current-buffer))
- (insert "Couldn't find an obvious default for the root of the "
+ (insert "Couldn't find an obvious default for the root of the\n"
"XEmacs hierarchy.")
- (let ((fill-column 76))
- (fill-region (point-min) (point-max)))
-
(princ "\nWARNING:\n" 'external-debugging-output)
(princ (buffer-string) 'external-debugging-output)))
(defun startup-setup-paths-warning ()
(let ((lock (if (boundp 'lock-directory) lock-directory 't))
- warnings message)
+ (warnings '()))
(if (and (stringp lock) (null (file-directory-p lock)))
(setq lock nil))
(cond
- ((null (and exec-directory data-directory doc-directory load-path lock))
+ ((null (and lisp-directory exec-directory data-directory doc-directory
+ load-path
+ lock))
(save-excursion
(set-buffer (get-buffer-create " *warning-tmp*"))
(erase-buffer)
(buffer-disable-undo (current-buffer))
+ (if (null lisp-directory) (push "lisp-directory" warnings))
(if (null lock) (push "lock-directory" warnings))
(if (null exec-directory) (push "exec-directory" warnings))
(if (null data-directory) (push "data-directory" warnings))
(if (null doc-directory) (push "doc-directory" warnings))
(if (null load-path) (push "load-path" warnings))
- (cond ((cdr (cdr warnings))
- (setq message (apply 'format "%s, %s, and %s" warnings)))
- ((cdr warnings)
- (setq message (apply 'format "%s and %s" warnings)))
- (t (setq message (format "variable %s" (car warnings)))))
- (insert "couldn't find an obvious default for " message
- ", and there were no defaults specified in paths.h when "
- "XEmacs was built. Perhaps some directories don't exist, "
- "or the XEmacs executable, " (concat invocation-directory
- invocation-name)
- " is in a strange place?")
- (let ((fill-column 76))
- (fill-region (point-min) (point-max)))
+ (insert "Couldn't find obvious defaults for:\n")
+ (while warnings
+ (insert (car warnings) "\n")
+ (setq warnings (cdr warnings)))
+ (insert "Perhaps some directories don't exist, "
+ "or the XEmacs executable,\n" (concat invocation-directory
+ invocation-name)
+ "\nis in a strange place?")
(princ "\nWARNING:\n" 'external-debugging-output)
(princ (buffer-string) 'external-debugging-output)
Index: lisp/toolbar.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/toolbar.el,v
retrieving revision 1.7
diff -u -r1.7 toolbar.el
--- toolbar.el 1998/04/23 02:07:56 1.7
+++ toolbar.el 1998/04/23 17:37:55
@@ -94,9 +94,10 @@
(defun init-toolbar-location ()
(if (not toolbar-icon-directory)
- (setq toolbar-icon-directory
- (file-name-as-directory
- (locate-data-directory "toolbar")))))
+ (let ((name (locate-data-directory "toolbar")))
+ (if name
+ (setq toolbar-icon-directory
+ (file-name-as-directory name))))))
(defun init-toolbar-from-resources (locale)
(if (and (featurep 'x)
Index: lisp/update-elc.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/update-elc.el,v
retrieving revision 1.15
diff -u -r1.15 update-elc.el
--- update-elc.el 1998/04/14 07:47:03 1.15
+++ update-elc.el 1998/04/23 17:37:55
@@ -81,12 +81,6 @@
(cons src update-elc-files-to-compile))))
(setq autol (cdr autol))))
-;; We must have some lisp support at this point
-(let ((temp-path (expand-file-name "." (car load-path))))
- (setq load-path (nconc (directory-files temp-path t "^[^-.]"
- nil 'dirs-only)
- (cons temp-path load-path))))
-
;; (print (prin1-to-string update-elc-files-to-compile))
(let (preloaded-file-list site-load-packages)
Index: lisp/x-menubar.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/x-menubar.el,v
retrieving revision 1.18
diff -u -r1.18 x-menubar.el
--- x-menubar.el 1998/04/23 02:07:57 1.18
+++ x-menubar.el 1998/04/23 17:37:56
@@ -619,7 +619,8 @@
(customize-set-variable 'font-menu-this-frame-only-p
(not font-menu-this-frame-only-p))
:style toggle
- :selected font-menu-this-frame-only-p]
+ :selected (and (boundp 'font-menu-this-frame-only-p)
+ font-menu-this-frame-only-p)]
;; Why is this commented ?
;; ["Line Numbers" (line-number-mode nil)
;; :style toggle :selected line-number-mode]
@@ -674,7 +675,8 @@
(customize-set-variable 'font-menu-ignore-scaled-fonts
(not font-menu-ignore-scaled-fonts))
:style toggle
- :selected font-menu-ignore-scaled-fonts]
+ :selected (and (boundp 'font-menu-ignore-scaled-fonts)
+ font-menu-ignore-scaled-fonts)]
)
,@(if (featurep 'toolbar)
'(("Toolbar Appearance"
--
Cheers =8-} Chipsy
Friede, Völkerverständigung und überhaupt blabla