From: bg66 Date: Mon, 19 Mar 2007 06:09:49 +0000 (+0000) Subject: * mixi-gnus.el: Use `require' instead of `autoload'. X-Git-Tag: mixi-el-1_0_0~48 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d21c2d1f6ce442b92466fb86b754151a987dd016;p=elisp%2Fmixi.git * mixi-gnus.el: Use `require' instead of `autoload'. * mixi-wl.el: Ditto. * riece-mixi.el: Ditto. * acinclude.m4 (AC_CHECK_GNUS): New function. (AC_CHECK_WL): Ditto. * configure.ac: Use them. (HAVE_GNUS): New condition. (HAVE_WL): Ditto. * Makefile.am (MODULES_GNUS): New variable. (MODULES_WL): Ditto. (MODULES_SHIMBUN): Follow the change above. (EXTRA_DIST): Ditto. (MODULES): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 36ed5d3..4914365 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2007-03-19 OHASHI Akira + + * mixi-gnus.el: Use `require' instead of `autoload'. + * mixi-wl.el: Ditto. + * riece-mixi.el: Ditto. + + * acinclude.m4 (AC_CHECK_GNUS): New function. + (AC_CHECK_WL): Ditto. + * configure.ac: Use them. + (HAVE_GNUS): New condition. + (HAVE_WL): Ditto. + * Makefile.am (MODULES_GNUS): New variable. + (MODULES_WL): Ditto. + (MODULES_SHIMBUN): Follow the change above. + (EXTRA_DIST): Ditto. + (MODULES): Ditto. + 2007-03-17 Hiroya Murata * mixi-utils.el (toplevel): Specify the file coding system. diff --git a/Makefile.am b/Makefile.am index f0ec6bd..719712c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,11 @@ MODULES_MIXI = mixi.el mixi-utils.el mixi-atom.el mixi-ticker.el -MODULES_SHIMBUN = sb-mixi.el mixi-gnus.el mixi-wl.el +MODULES_SHIMBUN = sb-mixi.el +MODULES_GNUS = mixi-gnus.el +MODULES_WL = mixi-wl.el MODULES_RIECE = riece-mixi.el CONTRIB = contrib/atom.cgi contrib/atom.sh EXTRA_DIST = COMPILE ChangeLog $(MODULES_MIXI) $(MODULES_SHIMBUN) \ - $(MODULES_RIECE) $(CONTRIB) + $(MODULES_GNUS) $(MODULES_WL) $(MODULES_RIECE) $(CONTRIB) CLEANFILES = auto-autoloads.el custom-load.el *.elc AUTOMAKE_OPTIONS = no-dependencies @@ -13,6 +15,15 @@ MODULES = $(MODULES_MIXI) if HAVE_SHIMBUN MODULES += $(MODULES_SHIMBUN) + +if HAVE_GNUS +MODULES += $(MODULES_GNUS) +endif + +if HAVE_WL +MODULES += $(MODULES_WL) +endif + endif if HAVE_RIECE diff --git a/acinclude.m4 b/acinclude.m4 index f1fa521..b31ccb8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -143,6 +143,70 @@ AC_DEFUN([AC_CHECK_SHIMBUN], [ ]) dnl +dnl Perform sanity checking and try to locate the Gnus package +dnl +AC_DEFUN([AC_CHECK_GNUS], [ + AC_MSG_CHECKING(have gnus) + + dnl Ignore cache. + unset EMACS_cv_SYS_gnus_dir; + + AC_ARG_WITH(gnus,[ --with-gnus[[=ARG]] Use gnus [[ARG=yes]]], + [if test "$withval" = yes -o -z "$withval"; then + HAVE_GNUS=yes + else + HAVE_GNUS=$withval + fi], HAVE_GNUS=yes) + AC_SUBST(HAVE_GNUS) + + if test "${HAVE_GNUS}" = yes; then + AC_EMACS_LISP(gnus_dir,(file-name-directory (locate-library \"gnus\")),"noecho") + GNUS_DIR=$EMACS_cv_SYS_gnus_dir + fi + + if test "${HAVE_GNUS}" != yes; then + AC_MSG_RESULT(no) + elif test -z "${GNUS_DIR}"; then + HAVE_GNUS=no + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT(${HAVE_GNUS}) + fi +]) + +dnl +dnl Perform sanity checking and try to locate the Wanderlust package +dnl +AC_DEFUN([AC_CHECK_WL], [ + AC_MSG_CHECKING(have wanderlust) + + dnl Ignore cache. + unset EMACS_cv_SYS_wl_dir; + + AC_ARG_WITH(wl,[ --with-wl[[=ARG]] Use wanderlust [[ARG=yes]]], + [if test "$withval" = yes -o -z "$withval"; then + HAVE_WL=yes + else + HAVE_WL=$withval + fi], HAVE_WL=yes) + AC_SUBST(HAVE_WL) + + if test "${HAVE_WL}" = yes; then + AC_EMACS_LISP(wl_dir,(file-name-directory (locate-library \"wl\")),"noecho") + WL_DIR=$EMACS_cv_SYS_wl_dir + fi + + if test "${HAVE_WL}" != yes; then + AC_MSG_RESULT(no) + elif test -z "${WL_DIR}"; then + HAVE_WL=no + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT(${HAVE_WL}) + fi +]) + +dnl dnl Perform sanity checking and try to locate the Riece package dnl AC_DEFUN([AC_CHECK_RIECE], [ diff --git a/configure.ac b/configure.ac index 49b4caa..814d408 100644 --- a/configure.ac +++ b/configure.ac @@ -8,9 +8,13 @@ AC_PATH_LISPDIR AC_PATH_PACKAGEDIR AC_CHECK_SHIMBUN +AC_CHECK_GNUS +AC_CHECK_WL AC_CHECK_RIECE AM_CONDITIONAL(HAVE_SHIMBUN, test "${HAVE_SHIMBUN}" = yes) +AM_CONDITIONAL(HAVE_GNUS, test "${HAVE_GNUS}" = yes) +AM_CONDITIONAL(HAVE_WL, test "${HAVE_WL}" = yes) AM_CONDITIONAL(HAVE_RIECE, test "${HAVE_RIECE}" = yes) AC_CONFIG_FILES([Makefile]) diff --git a/mixi-gnus.el b/mixi-gnus.el index 82fb1cc..77b7312 100644 --- a/mixi-gnus.el +++ b/mixi-gnus.el @@ -35,18 +35,7 @@ ;;; Code: (require 'sb-mixi) - -;; Functions and variables which should be defined in the other module -;; at run-time. -(eval-when-compile - (defvar message-this-is-news) - (defvar message-sent-message-via) - (defvar message-send-method-alist) - (autoload 'message-narrow-to-headers "message") - (autoload 'message-fetch-field "message") - (autoload 'message-generate-new-buffer-clone-locals "message") - (autoload 'message-goto-body "message") - (autoload 'mml-buffer-substring-no-properties-except-hard-newlines "mml")) +(require 'message) (defun message-mixi-p () "Say whether the current buffer contains a mixi message." diff --git a/mixi-wl.el b/mixi-wl.el index d4bf6e9..7ff0630 100644 --- a/mixi-wl.el +++ b/mixi-wl.el @@ -35,19 +35,7 @@ ;;; Code: (require 'sb-mixi) - -;; Functions and variables which should be defined in the other module -;; at run-time. -(eval-when-compile - (defvar mail-header-separator) - (defvar wl-mime-charset) - (defvar wl-draft-send-confirm-with-preview) - (defvar wl-draft-send-mail-function) - (autoload 'std11-field-body "std11") - (autoload 'eword-decode-string "eword-decode") - (autoload 'wl-draft-set-sent-message "wl-draft") - (autoload 'wl-draft-write-sendlog "wl-draft") - (autoload 'decode-mime-charset-string "mcharset")) +(require 'wl-draft) (defsubst mixi-wl-get-recipients-from-buffer () (or (std11-field-body "mixi-to") diff --git a/riece-mixi.el b/riece-mixi.el index c0a38c8..f16a62e 100644 --- a/riece-mixi.el +++ b/riece-mixi.el @@ -33,20 +33,7 @@ (require 'mixi) (require 'mixi-utils) (require 'timer) - -;; Functions and variables which should be defined in the other module -;; at run-time. -(eval-when-compile - (defvar riece-current-channels) - (autoload 'riece-send-string "riece-server") - (autoload 'riece-identity-prefix "riece-identity") - (autoload 'riece-display-message "riece-message") - (autoload 'riece-make-message "riece-message") - (autoload 'riece-current-nickname "riece-misc") - (autoload 'riece-message-own-p "riece-message") - (autoload 'riece-message-text "riece-message") - (autoload 'riece-message-target "riece-message") - (autoload 'riece-parse-identity "riece-identity")) +(require 'riece-message) (defgroup riece-mixi nil "Riece integration for mixi."