[Mew-dist 12875] XEmacs package: Mew 1.94.2
Yoshiki Hayashi
t90553 at example.com
2000年 4月 17日 (月) 19:38:20 JST
すっかり忘れていたのですが、XEmacs の mew package を update
するために以下のような変更をしようと思います。Mew の様式では
ない、という点があればお願いします。たぶん Mew 1.95 でも同じ
ような問題があるのではないかと思いますので、反映していただけ
るとありがたいです。
XEmacs は toolbar や menubar なしで build できるので、大部分
はそれに対する guard です。後、package として install すると
etc の下の file は locate-data-file で見つかりますので、利用
できるときはそれを使う方が良いと思います。
mew-cs-database は、その file を byte-compile できるようにす
るためで、mew-set-process-cs は with MULE で byte compile さ
れたものを without MULE でも使えるようにするためです。
mew.el の変更は、XEmacs では package でも autoload が有効な
ので、書いてある方がうれしいという理由です。
最後に、XEmacs project は、package の author が XEmacs
package の CVS tree を直接 maintenance してもらうという方向
に動いています。ぜひ
http://cvs.xemacs.org/#committers
を覗いてみてください。
2000-04-17 Yoshiki Hayashi <yoshiki at example.com>
* mew/mew-summary.el (mew-summary-setup-menu): Guard against
no menubars and no toolbars.
* mew/mew-draft.el (mew-draft-mode): Guard against no menubars.
* mew-mule0.el (mew-find-cs-region): Fix typo.
-------------- next part --------------
diff -ur /home/penny/mew-1.94.2/mew-draft.el /src/xemacs-packages/comm/mew/mew/mew-draft.el
--- /home/penny/mew-1.94.2/mew-draft.el Mon Feb 21 12:01:17 2000
+++ /src/xemacs-packages/comm/mew/mew/mew-draft.el Mon Mar 13 12:06:58 2000
@@ -454,7 +454,7 @@
(progn
(make-local-variable 'require-final-newline)
(setq require-final-newline t)))
- (if mew-xemacs-p
+ (if (and mew-xemacs-p (featurep 'menubar))
(progn
(set-buffer-menubar current-menubar)
(add-submenu nil mew-draft-mode-menu-spec)))
--- /home/penny/mew-1.94.2/mew-mule.el Mon Aug 30 12:43:15 1999
+++ /src/xemacs-packages/comm/mew/mew/mew-mule.el Mon Mar 13 01:21:08 2000
@@ -8,6 +8,8 @@
(defconst mew-mule-version "mew-mule.el version 0.03")
+(defvar mew-cs-database nil)
+
;;
;; Charset
;;
diff -ur /home/penny/mew-1.94.2/mew-mule0.el /src/xemacs-packages/comm/mew/mew/mew-mule0.el
--- /home/penny/mew-1.94.2/mew-mule0.el Wed Dec 22 11:49:36 1999
+++ /src/xemacs-packages/comm/mew/mew/mew-mule0.el Sat Mar 25 22:42:31 2000
@@ -53,10 +53,10 @@
(defun mew-find-cs-region (start end)
(let (ret)
(save-excursion
- (goto-char beg)
+ (goto-char start)
(if (re-search-forward "[\000-\177]" end t)
(setq ret (cons 0 ret)))
- (goto-char beg)
+ (goto-char start)
(if (re-search-forward "[\200-\377]" end t)
(setq ret (cons 1 ret))))
ret))
@@ -81,8 +81,8 @@
;; Process environment
;;
-(defmacro mew-set-process-cs (pro from-pro to-pro)
- (` ()))
+(defun mew-set-process-cs (pro from-pro to-pro)
+ nil)
(defmacro mew-plet (&rest body)
(` (let ((call-process-hook nil))
diff -ur /home/penny/mew-1.94.2/mew-summary.el /src/xemacs-packages/comm/mew/mew/mew-summary.el
--- /home/penny/mew-1.94.2/mew-summary.el Thu Jan 13 15:23:23 2000
+++ /src/xemacs-packages/comm/mew/mew/mew-summary.el Mon Mar 13 12:08:59 2000
@@ -513,19 +513,21 @@
(defun mew-summary-setup-menu ()
(if mew-xemacs-p
(progn
- (mew-summary-toolbar-update)
+ (if (featurep 'toolbar)
+ (mew-summary-toolbar-update))
(if (featurep 'scrollbar)
(set-specifier scrollbar-height (cons (current-buffer) 0)))
- (set-buffer-menubar current-menubar)
- (if mew-summary-mode-popup-menu
- ()
- (easy-menu-define
- mew-summary-mode-popup-menu
- mew-summary-mode-map
- "Popup Menu used in Summary and Virtual mode."
- mew-summary-mode-menu-spec))
- (easy-menu-add mew-summary-mode-popup-menu)
- (add-submenu nil mew-summary-mode-menu-spec))))
+ (when (featurep 'menubar)
+ (set-buffer-menubar current-menubar)
+ (if mew-summary-mode-popup-menu
+ ()
+ (easy-menu-define
+ mew-summary-mode-popup-menu
+ mew-summary-mode-map
+ "Popup Menu used in Summary and Virtual mode."
+ mew-summary-mode-menu-spec))
+ (easy-menu-add mew-summary-mode-popup-menu)
+ (add-submenu nil mew-summary-mode-menu-spec)))))
(defun mew-summary-folder-name ()
(cond
diff -ur /home/penny/mew-1.94.2/mew-xemacs.el /src/xemacs-packages/comm/mew/mew/mew-xemacs.el
--- /home/penny/mew-1.94.2/mew-xemacs.el Wed Dec 22 12:08:55 1999
+++ /src/xemacs-packages/comm/mew/mew/mew-xemacs.el Tue Apr 4 09:03:32 2000
@@ -33,91 +33,151 @@
(defvar mew-icon-directory nil)
(defvar mew-icon-separate
- (toolbar-make-button-list
- (expand-file-name "mew-sep.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-sep.xpm")
+ (expand-file-name "mew-sep.xpm" mew-icon-directory)))))
(defvar mew-icon-separate-spec
(list [mew-icon-separate nil nil ""]))
(defvar mew-icon-blank
- (toolbar-make-button-list
- (expand-file-name "mew-Blank.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Blank.xpm")
+ (expand-file-name "mew-Blank.xpm" mew-icon-directory)))))
(defvar mew-icon-audio
- (toolbar-make-button-list
- (expand-file-name "mew-Audio.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Blank.xpm")
+ (expand-file-name "mew-Audio.xpm" mew-icon-directory)))))
(defvar mew-icon-image
- (toolbar-make-button-list
- (expand-file-name "mew-Image.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Image.xpm")
+ (expand-file-name "mew-Image.xpm" mew-icon-directory)))))
(defvar mew-icon-video
- (toolbar-make-button-list
- (expand-file-name "mew-Video.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Video.xpm")
+ (expand-file-name "mew-Video.xpm" mew-icon-directory)))))
(defvar mew-icon-application/postscript
- (toolbar-make-button-list
- (expand-file-name "mew-Postscript.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Postscript.xpm")
+ (expand-file-name "mew-Postscript.xpm" mew-icon-directory)))))
(defvar mew-icon-application/octet-stream
- (toolbar-make-button-list
- (expand-file-name "mew-Octet-Stream.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Octet-Stream.xpm")
+ (expand-file-name "mew-Octet-Stream.xpm" mew-icon-directory)))))
(defvar mew-icon-message/rfc822
- (toolbar-make-button-list
- (expand-file-name "mew-Rfc822.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Rfc822.xpm")
+ (expand-file-name "mew-Rfc822.xpm" mew-icon-directory)))))
(defvar mew-icon-message/external-body
- (toolbar-make-button-list
- (expand-file-name "mew-External.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-External.xpm")
+ (expand-file-name "mew-External.xpm" mew-icon-directory)))))
(defvar mew-icon-text
- (toolbar-make-button-list
- (expand-file-name "mew-Text.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Text.xpm")
+ (expand-file-name "mew-Text.xpm" mew-icon-directory)))))
(defvar mew-icon-multipart
- (toolbar-make-button-list
- (expand-file-name "mew-Folder.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Folder.xpm")
+ (expand-file-name "mew-Folder.xpm" mew-icon-directory)))))
(defvar mew-icon-unknown
- (toolbar-make-button-list
- (expand-file-name "mew-Unknown.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-Unknown.xpm")
+ (expand-file-name "mew-Unknown.xpm" mew-icon-directory)))))
;;
;; Summary mode
;;
(defvar mew-summary-toolbar-icon-show
- (toolbar-make-button-list
- (expand-file-name "mew-show.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-show.xpm")
+ (expand-file-name "mew-show.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-next
- (toolbar-make-button-list
- (expand-file-name "mew-next.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-next.xpm")
+ (expand-file-name "mew-next.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-prev
- (toolbar-make-button-list
- (expand-file-name "mew-prev.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-prev.xpm")
+ (expand-file-name "mew-prev.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-inc
- (toolbar-make-button-list
- (expand-file-name "mew-inc.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-inc.xpm")
+ (expand-file-name "mew-inc.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-write
- (toolbar-make-button-list
- (expand-file-name "mew-write.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-write.xpm")
+ (expand-file-name "mew-write.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-reply
- (toolbar-make-button-list
- (expand-file-name "mew-reply.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-reply.xpm")
+ (expand-file-name "mew-reply.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-forward
- (toolbar-make-button-list
- (expand-file-name "mew-forward.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-forward.xpm")
+ (expand-file-name "mew-forward.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar-icon-refile
- (toolbar-make-button-list
- (expand-file-name "mew-refile.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-refile.xpm")
+ (expand-file-name "mew-refile.xpm" mew-icon-directory)))))
(defvar mew-summary-toolbar
'(
@@ -160,36 +220,60 @@
;;
(defvar mew-draft-toolbar-icon-comp
- (toolbar-make-button-list
- (expand-file-name "mew-comp.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-comp.xpm")
+ (expand-file-name "mew-comp.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-send
- (toolbar-make-button-list
- (expand-file-name "mew-send.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-send.xpm")
+ (expand-file-name "mew-send.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-attach
- (toolbar-make-button-list
- (expand-file-name "mew-attach.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-attach.xpm")
+ (expand-file-name "mew-attach.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-cite
- (toolbar-make-button-list
- (expand-file-name "mew-cite.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-cite.xpm")
+ (expand-file-name "mew-cite.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-yank
- (toolbar-make-button-list
- (expand-file-name "mew-yank.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-yank.xpm")
+ (expand-file-name "mew-yank.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-pgp-sign
- (toolbar-make-button-list
- (expand-file-name "mew-pgp-sign.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-pgp-sign.xpm")
+ (expand-file-name "mew-pgp-sign.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-pgp-enc
- (toolbar-make-button-list
- (expand-file-name "mew-pgp-enc.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-pgp-enc.xpm")
+ (expand-file-name "mew-pgp-enc.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar-icon-pgp-sigenc
- (toolbar-make-button-list
- (expand-file-name "mew-pgp-sigenc.xpm" mew-icon-directory)))
+ (when (fboundp 'toolbar-make-button-list)
+ (toolbar-make-button-list
+ (if (fboundp 'locate-data-file)
+ (locate-data-file "mew-pgp-sigenc.xpm")
+ (expand-file-name "mew-pgp-sigenc.xpm" mew-icon-directory)))))
(defvar mew-draft-toolbar
'(
@@ -307,7 +391,7 @@
(program (mew-attr-get-prog attr))
(options (mew-attr-get-opt attr))
(async (mew-attr-get-async attr))
- (zmacs-regions nil) ;; for XEmacs
+ (zmacs-regions nil);; for XEmacs
(format (cond
((and (string-match "jpeg" ct)
(valid-image-instantiator-format-p 'jpeg))
@@ -365,7 +449,7 @@
(setq toolbar-active t)
(set-toolbar-button-down-flag button t)))))
- )) ;; end of cond
+ ));; end of cond
(defmacro mew-summary-toolbar-update ()
diff -ur /home/penny/mew-1.94.2/mew.el /src/xemacs-packages/comm/mew/mew/mew.el
--- /home/penny/mew-1.94.2/mew.el Mon Feb 28 12:52:41 2000
+++ /src/xemacs-packages/comm/mew/mew/mew.el Sat Mar 25 21:49:17 2000
@@ -62,6 +62,7 @@
;;; Bootstrap
;;;
+;;;###autoload
(defun mew (&optional arg)
"Execute Mew. If 'mew-auto-get' is 't', messages stored in your
spool are fetched to the +inbox folder and messages in the +inbox
@@ -76,6 +77,7 @@
(mew-summary-get)
(mew-summary-goto-folder t (mew-inbox-folder)))))
+;;;###autoload
(defun mew-send (&optional to cc subject)
"Execute Mew then prepare a draft. This may be used as library
function."
@@ -84,6 +86,7 @@
(if (null mew-mail-path) (mew-init))
(mew-summary-send to cc subject))
+;;;###autoload
(defun mew-user-agent-compose (&optional to subject other-headers continue
switch-function yank-action
send-actions)
-------------- next part --------------
--
Yoshiki Hayashi
Mew-dist メーリングリストの案内