With this patch, the native XEmacs setup kit can be installed to a
directory of the user's choosing and the packages can be found without
setting the EMACSPACKAGEPATH environment variable.
The idea is that the setup kit will be built with
INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
PACKAGE_PREFIX=c:\Program Files\XEmacs
and the user can choose whatever installation path he/she likes and
the packages will still be found.
See the thread starting at
http://list-archive.xemacs.org/xemacs-beta/200512/msg00354.html
for more information.
I plan to commit this within a few days and generate a pre-21.4.19 kit
for testing. I will also be submitting a 21.5 version of this patch
when I can generate one - my plan is to generate a 21.5 Windows native
setup kit that will be compatible with the 21.4 kit.
lisp/ChangeLog addition:
2005-12-26 Vin Shelton <acs(a)xemacs.org>
* find-paths.el:
* find-paths.el (paths-emacs-root-p): Add search for package root.
* find-paths.el (paths-find-emacs-root): Replaced with
paths-find-invocation-roots, which returns a list of roots.
* find-paths.el (paths-find-invocation-roots): New.
* find-paths.el (paths-find-emacs-roots): Call paths-find-invocation-roots.
21.4 source patch:
Diff command: cvs -q diff -u
Files affected: lisp/find-paths.el
Index: lisp/find-paths.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/find-paths.el,v
retrieving revision 1.19.2.2
diff -a -u -u -r1.19.2.2 find-paths.el
--- lisp/find-paths.el 2002/08/20 11:34:41 1.19.2.2
+++ lisp/find-paths.el 2005/12/26 17:48:36
@@ -108,8 +108,11 @@
;; in-place or windows-nt
(and
(paths-file-readable-directory-p (paths-construct-path (list directory
"lisp")))
- (paths-file-readable-directory-p (paths-construct-path (list directory
"etc"))))))
+ (paths-file-readable-directory-p (paths-construct-path (list directory
"etc"))))
+ ;; searching for a package directory
+ (paths-file-readable-directory-p (paths-construct-path (list directory
"xemacs-packages")))))
+
(defun paths-root-in-place-p (root)
"Check if ROOT is an in-place installation root for XEmacs."
(paths-file-readable-directory-p (paths-construct-path (list root "lisp"))))
@@ -123,9 +126,10 @@
(paths-chase-symlink destination))
file-name)))
-(defun paths-find-emacs-root
- (invocation-directory invocation-name)
- "Find the run-time root of XEmacs."
+(defun paths-find-invocation-roots (invocation-directory invocation-name)
+ "Find the list of run-time roots of XEmacs.
+INVOCATION-DIRECTORY is a directory containing the XEmacs executable.
+INVOCATION-NAME is the name of the executable itself."
(let* ((executable-file-name (paths-chase-symlink
(concat invocation-directory
invocation-name)))
@@ -134,10 +138,9 @@
(paths-construct-path '("..") executable-directory)))
(maybe-root-2 (file-name-as-directory
(paths-construct-path '(".." "..") executable-directory))))
- (or (and (paths-emacs-root-p maybe-root-1)
- maybe-root-1)
- (and (paths-emacs-root-p maybe-root-2)
- maybe-root-2))))
+
+ (paths-filter #'paths-emacs-root-p
+ (list maybe-root-1 maybe-root-2))))
(defun paths-construct-path (components &optional expand-directory)
"Convert list of path components COMPONENTS into a path.
@@ -301,11 +304,8 @@
(defun paths-find-emacs-roots (invocation-directory
invocation-name)
"Find all plausible installation roots for XEmacs."
- (let* ((potential-invocation-root
- (paths-find-emacs-root invocation-directory invocation-name))
- (invocation-roots
- (and potential-invocation-root
- (list potential-invocation-root)))
+ (let* ((invocation-roots
+ (paths-find-invocation-roots invocation-directory invocation-name))
(potential-installation-roots
(paths-uniq-append
(and configure-exec-prefix-directory
Regards,
Vin