I've had a good look through the mew package to see if I could get rid
of the PRELOADS in the Makefile. It also cleans up most of the
"function not defined" errors. This patch is the result.
Because I don't use mew, could somebody please look this over before I
run it past the mew guys.
No plan to commit until somebody with more mew savvy than I gives it
the thumbs up.
Index: comm/mew/ChangeLog
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/ChangeLog,v
retrieving revision 1.8
diff -u -w -U0 -r1.8 ChangeLog
--- comm/mew/ChangeLog 2000/11/14 05:29:39 1.8
+++ comm/mew/ChangeLog 2001/01/25 02:29:53
@@ -0,0 +1,27 @@
+2001-01-24 Steve Youngs <youngs(a)xemacs.org>
+
+ * ./mew/mew-scan.el (mew-summary-scan-filter): Get rid of obsolete
+ variable 'after-change-function'.
+
+ * ./mew/mew-refile.el (mew-summary-auto-refile): Get rid of obsolete
+ variable 'after-change-function'.
+ (mew-summary-mark-refile): Ditto.
+
+ * ./mew/mew-xemacs.el (mew-summary-show-part): Move function to toplevel.
+ (mew-draft-show-attach): Ditto.
+
+ * ./mew/mew-win32.el: Require mew-func.
+
+ * ./mew/mew-mule.el: Require mew-func, mew-lang-jp.
+
+ * ./mew/mew-env.el: Require overlay.
+
+ * ./mew/mew-draft.el: Require pcomplete.
+
+ * ./mew/mew-decode.el: Require poem-xm if featurep 'mule.
+
+ * Makefile (REQUIRES): Add w3, efs, apel, mail-lib, xemacs-base,
+ fsf-compat & pcomplete.
+ (ELCS): Add mew-xemacs.elc.
+ (PRELOADS): Remove.
+
Index: comm/mew/Makefile
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/Makefile,v
retrieving revision 1.15
diff -u -w -r1.15 Makefile
--- comm/mew/Makefile 2001/01/10 07:02:01 1.15
+++ comm/mew/Makefile 2001/01/25 02:29:58
@@ -22,7 +22,7 @@
MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
PACKAGE = mew
PKG_TYPE = regular
-REQUIRES = mew
+REQUIRES = mew w3 efs apel mail-lib xemacs-base fsf-compat pcomplete
CATEGORY = comm
ELCS = mew/mew.elc mew/mew-attach.elc mew/mew-bq.elc mew/mew-cache.elc \
@@ -35,7 +35,7 @@
mew/mew-scan.elc mew/mew-sort.elc mew/mew-summary.elc \
mew/mew-syntax.elc mew/mew-temacs.elc mew/mew-unix.elc \
mew/mew-vars.elc mew/mew-virtual.elc mew/mew-win32.elc \
- mew/mew-addrbook.elc mew/mew-mule.elc
+ mew/mew-addrbook.elc mew/mew-mule.elc mew/mew-xemacs.elc
EXTRA_SOURCES = mew/mew-mule0.el mew/mew-mule2.el mew/mew-mule3.el \
mew/mew-xemacs.el
@@ -64,10 +64,8 @@
ifeq ($(XEMACS_NATIVE_NT),t)
# APA: XEmacs native NT currently needs this quoting of
# command-line-rguments.
-PRELOADS = -eval "(push (expand-file-name \\\"mew\\\") load-path)" -l
./poe.el
INSERT_MEW_TEXI = (insert-file-contents \\\"mew/info/mew.texi\\\")
else
-PRELOADS = -eval "(push (expand-file-name \"mew\") load-path)" -l
./poe.el
INSERT_MEW_TEXI = (insert-file-contents \"mew/info/mew.texi\")
endif
Index: comm/mew/mew/mew-decode.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-decode.el,v
retrieving revision 1.2
diff -u -w -r1.2 mew-decode.el
--- comm/mew/mew/mew-decode.el 2000/05/23 08:30:57 1.2
+++ comm/mew/mew/mew-decode.el 2001/01/25 02:30:06
@@ -9,7 +9,8 @@
(defconst mew-decode-version "mew-decode.el version 0.26")
(require 'mew)
-
+(if (featurep 'mule)
+ (require 'poem-xm))
(defvar mew-prog-mime-decode-switch
(list (cons mew-b64 '("-b"))
(cons mew-qp '("-q"))
Index: comm/mew/mew/mew-draft.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-draft.el,v
retrieving revision 1.2
diff -u -w -r1.2 mew-draft.el
--- comm/mew/mew/mew-draft.el 2000/05/23 08:30:58 1.2
+++ comm/mew/mew/mew-draft.el 2001/01/25 02:30:11
@@ -7,7 +7,7 @@
;;; Code:
(defconst mew-draft-version "mew-draft.el version 0.36")
-
+(require 'pcomplete)
(require 'mew)
(if mew-xemacs-p (require 'easymenu))
Index: comm/mew/mew/mew-env.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-env.el,v
retrieving revision 1.2
diff -u -w -r1.2 mew-env.el
--- comm/mew/mew/mew-env.el 2000/05/23 08:30:59 1.2
+++ comm/mew/mew/mew-env.el 2001/01/25 02:30:11
@@ -9,6 +9,7 @@
(defconst mew-env-version "mew-env.el version 0.14")
(require 'mew)
+(require 'overlay)
(defvar mew-temacs-p nil)
(defvar mew-xemacs-p nil)
Index: comm/mew/mew/mew-mule.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-mule.el,v
retrieving revision 1.1
diff -u -w -r1.1 mew-mule.el
--- comm/mew/mew/mew-mule.el 2000/05/23 08:31:01 1.1
+++ comm/mew/mew/mew-mule.el 2001/01/25 02:30:12
@@ -7,7 +7,8 @@
;;; Code:
(defconst mew-mule-version "mew-mule.el version 0.03")
-
+(require 'mew-func)
+(require 'mew-lang-jp)
;;
;; Charset
;;
Index: comm/mew/mew/mew-refile.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-refile.el,v
retrieving revision 1.2
diff -u -w -r1.2 mew-refile.el
--- comm/mew/mew/mew-refile.el 2000/05/23 08:31:02 1.2
+++ comm/mew/mew/mew-refile.el 2001/01/25 02:30:14
@@ -614,8 +614,7 @@
'mew-mark-review' will be conserned."
(interactive "P")
(mew-summary-only
- (let ((after-change-function nil)
- (after-change-functions nil)
+ (let ((after-change-functions nil)
(mew-use-highlight-x-face nil)
(lines (count-lines (point-min) (point-max)))
(line 1) (mark nil) msg)
@@ -657,8 +656,7 @@
This is very convenient to refile all messages picked by
'\\[mew-summary-search-mark]'."
(interactive)
(mew-summary-only
- (let ((after-change-function nil)
- (after-change-functions nil)
+ (let ((after-change-functions nil)
(mew-use-highlight-x-face nil)
(last nil)
(regex (concat mew-summary-message-regex
Index: comm/mew/mew/mew-scan.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-scan.el,v
retrieving revision 1.2
diff -u -w -r1.2 mew-scan.el
--- comm/mew/mew/mew-scan.el 2000/05/23 08:31:03 1.2
+++ comm/mew/mew/mew-scan.el 2001/01/25 02:30:15
@@ -204,8 +204,7 @@
(substring mew-summary-buffer-string (match-end 0)))))
(defun mew-summary-scan-filter (process string)
- (let* ((after-change-function nil)
- (after-change-functions nil)
+ (let* ((after-change-functions nil)
(obuf (current-buffer))
(opos (point))
(omax (point-max))
Index: comm/mew/mew/mew-win32.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-win32.el,v
retrieving revision 1.3
diff -u -w -r1.3 mew-win32.el
--- comm/mew/mew/mew-win32.el 2000/07/27 09:22:39 1.3
+++ comm/mew/mew/mew-win32.el 2001/01/25 02:30:16
@@ -7,7 +7,7 @@
;;; Code:
(defconst mew-win32-version "mew-win32.el 0.33.1")
-
+(require 'mew-func)
;;; for NTEmacs User
;;
;; put mw32script.el(in Meadow's archive) into load-path.
Index: comm/mew/mew/mew-xemacs.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/comm/mew/mew/mew-xemacs.el,v
retrieving revision 1.3
diff -u -w -r1.3 mew-xemacs.el
--- comm/mew/mew/mew-xemacs.el 2000/05/23 08:31:05 1.3
+++ comm/mew/mew/mew-xemacs.el 2001/01/25 02:30:17
@@ -7,11 +7,86 @@
;;; Code:
(defconst mew-xemacs-version "mew-xemacs.el version 0.09")
-
+(require 'mew-func)
;;
;; Common
;;
+(defun mew-summary-show-part (msg nums)
+ "Show a part according to the clicked icon."
+ (interactive)
+ (let ((fld (mew-summary-folder-name))
+ (ofld-msg (mew-current-get 'message))
+ (buf (buffer-name)))
+ (if (null nums)
+ (message "No message")
+ (mew-summary-toggle-disp-msg 'on)
+ (unwind-protect
+ (progn
+ (mew-window-configure buf 'message)
+ ;; message buffer
+ (mew-summary-display-part
+ (mew-cache-decode-syntax (mew-cache-hit ofld-msg)) nums))
+ (mew-pop-to-buffer buf)))))
+
+;; This is a toy at present. Support only CT: Image/*.
+;; To make Summary and Draft symmetric, left button click on icon
+;; should display the attachment.
+(defun mew-draft-show-attach (nums)
+ "Show a part according to the clicked icon."
+ (interactive)
+ (let ((case-fold-search t)
+ (str (toolbar-button-help-string last-pressed-toolbar-button))
+ (image-extent (extent-at (point-max) nil nil nil 'at))
+ ct)
+ (if (and image-extent (glyphp image-extent))
+ (mew-overlay-delete image-extent))
+ (if (null (string-match "(\\(.*\\))" str))
+ ()
+ (setq ct (mew-match 1 str))
+ (if (string-match "^Image/" ct)
+ (let* ((subdir (mew-attach-expand-path mew-encode-syntax nums))
+ (syntax (mew-syntax-get-entry mew-encode-syntax nums))
+ (name (mew-syntax-get-file syntax))
+ (ename (if (equal subdir "") name (concat subdir name)))
+ (file (expand-file-name ename (mew-attachdir)))
+ (attr (mew-attr-by-ct ct))
+ (program (mew-attr-get-prog attr))
+ (options (mew-attr-get-opt attr))
+ (async (mew-attr-get-async attr))
+ (zmacs-regions nil) ;; for XEmacs
+ (format (cond
+ ((and (string-match "jpeg" ct)
+ (valid-image-instantiator-format-p 'jpeg))
+ 'jpeg)
+ ((and (string-match "gif" ct)
+ (valid-image-instantiator-format-p 'gif))
+ 'gif)
+ ((and (string-match "xbm" ct)
+ (valid-image-instantiator-format-p 'xbm))
+ 'xbm)
+ ((and (string-match "xpm" ct)
+ (valid-image-instantiator-format-p 'xpm))
+ 'xpm)
+ ((and (string-match "png" ct)
+ (valid-image-instantiator-format-p 'png))
+ 'png)
+ (t nil)))
+ glyph)
+ (if format
+ (progn
+ (message "Loading image...")
+ (setq glyph (make-glyph (vector format :file file)))
+ (if (eq format 'xbm)
+ (set-glyph-property glyph 'face 'x-face))
+ (set-extent-begin-glyph
+ (mew-overlay-make (point-max) (point-max)) glyph)
+ (message "Loading image...done."))
+ (if (and (stringp program) (mew-which program exec-path))
+ (if async
+ (mew-mime-start-process program options file)
+ (mew-mime-call-process program options file)))))))))
+
(cond
((not mew-icon-p)
(defvar mew-icon-directory nil)
@@ -251,23 +326,8 @@
((eq button 3)
(popup-menu mew-summary-mode-toolbar-menu)))))
- (defun mew-summary-show-part (msg nums)
- "Show a part according to the clicked icon."
- (interactive)
- (let ((fld (mew-summary-folder-name))
- (ofld-msg (mew-current-get 'message))
- (buf (buffer-name)))
- (if (null nums)
- (message "No message")
- (mew-summary-toggle-disp-msg 'on)
- (unwind-protect
- (progn
- (mew-window-configure buf 'message)
- ;; message buffer
- (mew-summary-display-part
- (mew-cache-decode-syntax (mew-cache-hit ofld-msg)) nums))
- (mew-pop-to-buffer buf)))))
+
(defun mew-draft-button ()
"Call back function for toolbar of Draft mode.
If event is button 1, show a part.
@@ -282,63 +342,6 @@
((eq button 3)
(popup-menu mew-draft-mode-toolbar-menu)))))
- ;; This is a toy at present. Support only CT: Image/*.
- ;; To make Summary and Draft symmetric, left button click on icon
- ;; should display the attachment.
- (defun mew-draft-show-attach (nums)
- "Show a part according to the clicked icon."
- (interactive)
- (let ((case-fold-search t)
- (str (toolbar-button-help-string last-pressed-toolbar-button))
- (image-extent (extent-at (point-max) nil nil nil 'at))
- ct)
- (if (and image-extent (glyphp image-extent))
- (mew-overlay-delete image-extent))
- (if (null (string-match "(\\(.*\\))" str))
- ()
- (setq ct (mew-match 1 str))
- (if (string-match "^Image/" ct)
- (let* ((subdir (mew-attach-expand-path mew-encode-syntax nums))
- (syntax (mew-syntax-get-entry mew-encode-syntax nums))
- (name (mew-syntax-get-file syntax))
- (ename (if (equal subdir "") name (concat subdir name)))
- (file (expand-file-name ename (mew-attachdir)))
- (attr (mew-attr-by-ct ct))
- (program (mew-attr-get-prog attr))
- (options (mew-attr-get-opt attr))
- (async (mew-attr-get-async attr))
- (zmacs-regions nil) ;; for XEmacs
- (format (cond
- ((and (string-match "jpeg" ct)
- (valid-image-instantiator-format-p 'jpeg))
- 'jpeg)
- ((and (string-match "gif" ct)
- (valid-image-instantiator-format-p 'gif))
- 'gif)
- ((and (string-match "xbm" ct)
- (valid-image-instantiator-format-p 'xbm))
- 'xbm)
- ((and (string-match "xpm" ct)
- (valid-image-instantiator-format-p 'xpm))
- 'xpm)
- ((and (string-match "png" ct)
- (valid-image-instantiator-format-p 'png))
- 'png)
- (t nil)))
- glyph)
- (if format
- (progn
- (message "Loading image...")
- (setq glyph (make-glyph (vector format :file file)))
- (if (eq format 'xbm)
- (set-glyph-property glyph 'face 'x-face))
- (set-extent-begin-glyph
- (mew-overlay-make (point-max) (point-max)) glyph)
- (message "Loading image...done."))
- (if (and (stringp program) (mew-which program exec-path))
- (if async
- (mew-mime-start-process program options file)
- (mew-mime-call-process program options file)))))))))
(defun pressed-and-activate-toolbar-button (event)
"A replacement function 'press-toolbar-button' so that
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|