From: yamaoka Date: Wed, 23 Feb 2005 08:14:18 +0000 (+0000) Subject: * lisp/dgnushack.el: Load timer-funcs and advice for XEmacs; X-Git-Tag: t-gnus-6_17_4-quimby-~544 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3e7e4ebf8b40dc4f04a947f027d4edfe5aa6997a;p=elisp%2Fgnus.git- * lisp/dgnushack.el: Load timer-funcs and advice for XEmacs; simplify the way to check whether APEL is available. * texi/infohack.el: Load dgnuspath.el; load timer-funcs for XEmacs; load poe; don't load dgnushack.el, which is harmful to XEmacs since some required functions, e.g., make-overlay, are invalidated. --- diff --git a/ChangeLog b/ChangeLog index d0612bf..157a737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-02-23 Katsumi Yamaoka + + * lisp/dgnushack.el: Load timer-funcs and advice for XEmacs; + simplify the way to check whether APEL is available. + + * texi/infohack.el: Load dgnuspath.el; load timer-funcs for XEmacs; + load poe; don't load dgnushack.el, which is harmful to XEmacs since + some required functions, e.g., make-overlay, are invalidated. + 2005-02-21 Katsumi Yamaoka * Makefile.in (EXAMINE_PACKAGEDIR): Use configure-package-path. diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index fb47b53..fe135ea 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -186,50 +186,33 @@ fixed in Emacs after 21.3." (setq load-path (nconc (nreverse adds) load-path)))) (if (file-exists-p (expand-file-name "dgnuspath.el" srcdir)) - (load (expand-file-name "dgnuspath.el" srcdir) nil nil t) - (message " ** There's no dgnuspath.el file")) + (load (expand-file-name "dgnuspath.el" srcdir) nil nil t)) (condition-case err (load "~/.lpath.el" t nil t) (error (message "Error in \"~/.lpath.el\" file: %s" err))) +(when (featurep 'xemacs) + (condition-case nil + (require 'timer-funcs) + (error " +You should upgrade your XEmacs packages, especially xemacs-base.\n")) + + ;; The reason that to load `advice' is necessary is: + ;; 1. `path-util' loads poe.elc. + ;; 2. poe.elc requires the `ad-add-advice' function which is expanded + ;; from `defadvice'. + ;; 3. XEmacs is running with the -no-autoloads option. + (require 'advice)) + ;; Don't load path-util until `char-after' and `char-before' have been ;; optimized because it requires `poe' and then modify the functions. - -;; If the APEL modules are installed under the non-standard directory, -;; for example "/var/home/john/lisp/apel-VERSION/", you should add that -;; name using the configure option "--with-addpath=". -;; And also the directory where the EMU modules are installed, for -;; example "/usr/local/share/mule/19.34/site-lisp/", it should be -;; included in the standard `load-path' or added by the configure -;; option "--with-addpath=". -(let ((path (or (locate-library "path-util") - (locate-library "apel/path-util")));; backward compat. - parent lpath) - (if path - (progn - (when (string-match "/$" (setq path (file-name-directory path))) - (setq path (substring path 0 (match-beginning 0)))) - ;; path == "/var/home/john/lisp/apel-VERSION" - (when (string-match "/$" (setq parent (file-name-directory path))) - (setq parent (substring path 0 (match-beginning 0)))) - ;; parent == "/var/home/john/lisp" - (if (setq lpath (or (member path load-path) - (member (file-name-as-directory path) load-path))) - (unless (or (member parent load-path) - (member (file-name-as-directory parent) load-path)) - (push parent (cdr lpath))) - (push path load-path) - (unless (or (member parent load-path) - (member (file-name-as-directory parent) load-path)) - (push parent (cdr load-path)))) - (require 'advice) - (require 'path-util)) - (error " -APEL modules are not found in %s. -Try to re-configure with --with-addpath=APEL_PATH and run make again. -" - load-path))) +(condition-case nil + (require 'path-util) + (error "\nIn %s, +APEL was not found or an error occurred. You will need to run the +configure script again adding the --with-addpath=APEL_PATH option.\n" + load-path)) (unless (locate-library "mel") (add-path "flim")) @@ -239,10 +222,9 @@ Try to re-configure with --with-addpath=APEL_PATH and run make again. (file-name-directory (get-latest-path "^apel$" t))) load-path) (unless (module-installed-p 'mel) - (error " -FLIM modules does not found in %s. -Try to re-configure with --with-addpath=FLIM_PATH and run make again. -" + (error "In %s, +FLIM was not found. You will need to run the configure script again +adding the --with-addpath=FLIM_PATH option.\n" load-path))) (add-path "semi") diff --git a/texi/infohack.el b/texi/infohack.el index 39f3012..df90dfe 100644 --- a/texi/infohack.el +++ b/texi/infohack.el @@ -26,10 +26,26 @@ ;;; Code: (let ((default-directory (expand-file-name "../lisp/"))) - ;; Adjust `load-path' for APEL. - (load-file "dgnushack.el") + (if (file-exists-p (expand-file-name "dgnuspath.el")) + (load (expand-file-name "dgnuspath.el") nil nil t)) ;; Replace "./" with "../lisp/" in `load-path'. (setq load-path (mapcar 'expand-file-name load-path))) + +(when (featurep 'xemacs) + (condition-case nil + (require 'timer-funcs) + (error " +You should upgrade your XEmacs packages, especially xemacs-base.\n"))) + +;; XEmacs 21.4.17 doesn't provide `line-end-position' which is used +;; when formatting Info files. 2005-02-23 +(condition-case nil + (require 'poe) + (error "\nIn %s, +APEL was not found or an error occurred. You will need to run the +configure script again adding the --with-addpath=APEL_PATH option.\n" + load-path)) + (load-file (expand-file-name "ptexinfmt.el" "./")) (if (fboundp 'texinfo-copying)