From: yamaoka Date: Tue, 4 Oct 2005 09:39:48 +0000 (+0000) Subject: Synch to No Gnus 200510040938. X-Git-Tag: t-gnus-6_17_4-quimby-~325 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7ebd18bb838522658b183a1f3bc460c9dcdbddf4;p=elisp%2Fgnus.git- Synch to No Gnus 200510040938. --- diff --git a/ChangeLog b/ChangeLog index 04f7b3b..8c839b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-10-04 Katsumi Yamaoka + + * aclocal.m4 (AC_PATH_LISPDIR): Default to .../site-lisp/gnus for + Emacs. + (AC_PATH_ETCDIR): Don't change the default value for Emacs. + + * configure: Generated. + + * Makefile.in (list-installed-shadows): New entry. + (remove-installed-shadows): New entry. + + * GNUS-NEWS: Generated. + 2005-09-28 Reiner Steib * todo: Remove some items that are already done. Add some new diff --git a/GNUS-NEWS b/GNUS-NEWS index 3766aff..0560ed3 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -54,7 +54,7 @@ articles (`gnus-article-treat-ansi-sequences'). ** International host names (IDNA) can now be decoded inside article bodies using `W i' (`gnus-summary-idna-message'). This require that -GNU Libidn () has been installed. +GNU Libidn (`http://www.gnu.org/software/libidn/') has been installed. ** Gnus includes an Emacs Lisp SASL library. @@ -73,7 +73,7 @@ It is enabled by default (see `password-cache'), with a short timeout of 16 seconds (see `password-cache-expiry'). If PGG is used as the PGP back end, the PGP passphrase is managed by this mechanism. Passwords for ManageSieve connections are managed by this mechanism, -after quering the user about whether to do so. +after querying the user about whether to do so. ** IMAP identity (RFC 2971) is supported. @@ -123,6 +123,12 @@ To From Newsgroups::. `gnus-mime-replace-part' and `gnus-article-replace-part'. *Note MIME Commands::, *Note Using MIME::. +** Lisp files are now installed in .../site-lisp/gnus/ by default. It +defaulted to .../site-lisp/ formerly. In addition to this, the new +installer issues a warning if the other Gnus installations which will +shadow the latest one are detected. You can then remove those shadows +manually or remove them using `make remove-installed-shadows'. + * For older news, see Gnus info node "New Features". diff --git a/Makefile.in b/Makefile.in index fbc5432..24634d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -173,6 +173,12 @@ xinfo: xinfo-ja: cd texi && $(MAKE) EMACS="$(XEMACS)" ja-info +list-installed-shadows: + cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" list-installed-shadows + +remove-installed-shadows: + cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" remove-installed-shadows + uninstall: cd lisp && $(MAKE) lispdir="$(lispdir)" uninstall cd texi && $(MAKE) uninstall diff --git a/aclocal.m4 b/aclocal.m4 index c32d886..bdcf934 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -127,7 +127,7 @@ AC_DEFUN(AC_PATH_ETCDIR, [ if test "$EMACS_FLAVOR" = "xemacs"; then etcdir="\$(lispdir)/../../etc" else - etcdir="\$(lispdir)/../etc" + etcdir="\$(lispdir)/../../etc" fi fi AC_MSG_RESULT($etcdir) diff --git a/configure b/configure index 2cd60dc..abc18e0 100755 --- a/configure +++ b/configure @@ -1755,7 +1755,7 @@ echo $ECHO_N "checking where etc files should go... $ECHO_C" >&6 if test "$EMACS_FLAVOR" = "xemacs"; then etcdir="\$(lispdir)/../../etc" else - etcdir="\$(lispdir)/../etc" + etcdir="\$(lispdir)/../../etc" fi fi echo "$as_me:$LINENO: result: $etcdir" >&5 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 431c821..bf0746d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-10-04 Katsumi Yamaoka + + * Makefile.in (list-installed-shadows): New entry. + (install): Use it. + (remove-installed-shadows): New entry. + + * dgnushack.el (dgnushack-default-load-path): New variable. + (dgnushack-find-lisp-shadows): New function. + (dgnushack-remove-lisp-shadows): New function. + 2005-10-02 Katsumi Yamaoka * Makefile.in (install-el-elc): New entry. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index cd5408e..a4906ca 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -55,7 +55,7 @@ clever some l: gnus-load.el fi $(EMACS_COMP) -f dgnushack-compile -install: clever install-without-compiling +install: clever install-without-compiling list-installed-shadows install-without-compiling: $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir) @@ -86,6 +86,12 @@ install-el: $(INSTALL_DATA) $$p $(lispdir)/$$p; \ done +list-installed-shadows: + $(EMACS_COMP) -f dgnushack-find-lisp-shadows + +remove-installed-shadows: + $(EMACS_COMP) -f dgnushack-remove-lisp-shadows + tags: etags *.el diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 0fa1124..476b612 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -45,6 +45,8 @@ (copy-sequence coding-category-list)) '(coding-category-sjis)))))) +(defvar dgnushack-default-load-path (copy-sequence load-path)) + (defalias 'facep 'ignore) (require 'cl) @@ -695,4 +697,81 @@ dgnushack-compile." (while (setq file (pop files)) (insert "etc/images/smilies/" file "\n")))))) +(defun dgnushack-find-lisp-shadows (&optional lispdir) + "Return a list of directories in which other Gnus installations exist. +This function looks for the other Gnus installations which will shadow +the new Gnus Lisp modules which have been installed in LISPDIR, using +the default `load-path'. The return value will make sense only when +LISPDIR is existent and is listed in the default `load-path'. Assume +LISPDIR will be prepended to `load-path' by a user if the default +`load-path' does not contain it." + (unless lispdir + (setq lispdir (getenv "lispdir"))) + (when (and lispdir (file-directory-p lispdir)) + (setq lispdir (file-truename (directory-file-name lispdir))) + (let ((indices '("gnus.elc" "gnus.el" "gnus.el.bz2" "gnus.el.gz" + "message.elc" "message.el" "message.el.bz2" + "message.el.gz")) + (path (delq nil (mapcar + (lambda (p) + (condition-case nil + (when (and p (file-directory-p p)) + (file-truename (directory-file-name p))) + (error nil))) + dgnushack-default-load-path))) + rest elcs) + (while path + (setq rest (cons (car path) rest) + path (delete (car rest) (cdr path)))) + (setq path (nreverse (cdr (member lispdir rest))) + rest nil) + (while path + (setq elcs indices) + (while elcs + (when (file-exists-p (expand-file-name (pop elcs) (car path))) + (setq rest (cons (car path) rest) + elcs nil))) + (setq path (cdr path))) + (prog1 + (setq path (nreverse rest)) + (when path + (let (print-level print-length) + (princ (concat "\n\ +WARNING: The other gnus installation" (if (cdr path) "s have" " has") "\ + been detected in:\n\n " (mapconcat 'identity path "\n ") "\n\n\ +You will need to modify the run-time `load-path', remove them manually, +or remove them using `make remove-installed-shadows'.\n\n")))))))) + +(defun dgnushack-remove-lisp-shadows (&optional lispdir) + "Remove the other Gnus installations which shadow the recent one." + (let ((path (with-temp-buffer + (let ((standard-output (current-buffer))) + (dgnushack-find-lisp-shadows lispdir)))) + elcs files shadows file) + (when path + (unless (setq elcs (directory-files srcdir nil "\\.elc\\'")) + (error "You should build .elc files first.")) + (setq files + (apply + 'append + (mapcar + (lambda (el) + (list (concat el "c") el (concat el ".bz2") (concat el ".gz"))) + (append + (list (file-name-nondirectory dgnushack-gnus-load-file) + (file-name-nondirectory dgnushack-cus-load-file)) + (mapcar (lambda (elc) (substring elc 0 -1)) elcs))))) + (while path + (setq shadows files) + (while shadows + (setq file (expand-file-name (pop shadows) (car path))) + (when (file-exists-p file) + (princ (concat " Removing " file "...")) + (condition-case nil + (progn + (delete-file file) + (princ "done\n")) + (error (princ "failed\n"))))) + (setq path (cdr path)))))) + ;;; dgnushack.el ends here diff --git a/texi/ChangeLog b/texi/ChangeLog index e710eaf..3bff609 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2005-10-04 Katsumi Yamaoka + + * gnus-news.texi: Mention that the Lisp files are now installed in + .../site-lisp/gnus/ by default. + 2005-10-03 Simon Josefsson * gnus-news.texi: Fix typo. diff --git a/texi/gnus-news.texi b/texi/gnus-news.texi index 4371486..5c38902 100644 --- a/texi/gnus-news.texi +++ b/texi/gnus-news.texi @@ -143,5 +143,11 @@ customized with @code{gnus-summary-to-prefix} and See @code{gnus-mime-replace-part} and @code{gnus-article-replace-part}. @xref{MIME Commands}, @ref{Using MIME}. +@item Lisp files are now installed in .../site-lisp/gnus/ by default. +It defaulted to .../site-lisp/ formerly. In addition to this, the new +installer issues a warning if the other Gnus installations which will +shadow the latest one are detected. You can then remove those shadows +manually or remove them using @samp{make remove-installed-shadows}. + @end itemize @c gnus-news.texi ends here.