[Mew-dist 2770] An offical patch to Mew 1.92.1

Kazu Yamamoto Kazu at example.com
1997年 10月 28日 (火) 18:17:42 JST


Hello all,

Since I was exhausted by patch works, I leaned CVS. As of today, I
maintain two branches of Mew. One is called main for beta release and
major release. The other is called "stable" to make a major release
more stable. Stable has three digital numbers separated by dot.

This is a patch for the major release of 1.92 to upgrade to stable
1.92.1. The following fixes are included:

* A bug fix for mew-encode-syntax-format.
        Harald Hanche-Olsen <hanche at example.com>
* highlight for mew-summary-exchange-mark.
        "Takashi P.KATOH" <p-katoh at example.com>
* Overlay instead of property.
        SAKAI Kiyotaka <ksakai at example.com>
* mew-opt-highlight-header check in mew-highlight-header-region.

--Kazu

Index: mew/00readme
diff -c mew/00readme:1.1.1.1 mew/00readme:1.1.1.1.2.1
*** mew/00readme:1.1.1.1	Tue Oct 28 13:08:43 1997
--- mew/00readme	Tue Oct 28 14:21:35 1997
***************
*** 1,9 ****
  			    <Installation>
  			    Kazu Yamamoto
! 			     Oct 20, 1997
  
  
! This is beta release of Mew to replace MH with IM Perl5 scripts.
  
  Emacs 19.28 or later (including 20.xx), Mule version 2.3 or later, and
  XEmacs 20.3 b91 or later (compiled with the --with-mule option) are
--- 1,9 ----
  			    <Installation>
  			    Kazu Yamamoto
! 			     Oct 28, 1997
  
  
! This is release of Mew to replace MH with IM Perl5 scripts.
  
  Emacs 19.28 or later (including 20.xx), Mule version 2.3 or later, and
  XEmacs 20.3 b91 or later (compiled with the --with-mule option) are
Index: mew/mew-env.el
diff -c mew/mew-env.el:1.1.1.1 mew/mew-env.el:1.1.1.1.2.1
*** mew/mew-env.el:1.1.1.1	Tue Oct 28 13:08:42 1997
--- mew/mew-env.el	Tue Oct 28 14:21:36 1997
***************
*** 57,77 ****
    (or (find-face 'underline)
        (progn (make-face 'underline)
  	     (set-face-underline-p 'underline t)))
!   (fset 'mew-property-p (symbol-function 'extentp))
!   (fset 'mew-property-make (symbol-function 'make-extent))
!   (defun mew-property-move (overlay beg end &optional buffer)
      (set-extent-endpoints overlay beg end))
!   (defun mew-property-put (overlay prop value)
      (set-extent-property overlay prop value))
    (fset 'mew-buffer-substring (symbol-function 'buffer-substring))
    (defun mew-mark () (mark t))
    )
   (mew-temacs-p
    (require 'faces)
!   (fset 'mew-property-p (symbol-function 'overlayp))
!   (fset 'mew-property-make (symbol-function 'make-overlay))
!   (fset 'mew-property-move (symbol-function 'move-overlay))
!   (fset 'mew-property-put (symbol-function 'overlay-put))
    (require 'easymenu)
    (if (fboundp 'buffer-substring-no-properties)
        (fset 'mew-buffer-substring
--- 57,77 ----
    (or (find-face 'underline)
        (progn (make-face 'underline)
  	     (set-face-underline-p 'underline t)))
!   (fset 'mew-overlay-p (symbol-function 'extentp))
!   (fset 'mew-overlay-make (symbol-function 'make-extent))
!   (defun mew-overlay-move (overlay beg end &optional buffer)
      (set-extent-endpoints overlay beg end))
!   (defun mew-overlay-put (overlay prop value)
      (set-extent-property overlay prop value))
    (fset 'mew-buffer-substring (symbol-function 'buffer-substring))
    (defun mew-mark () (mark t))
    )
   (mew-temacs-p
    (require 'faces)
!   (fset 'mew-overlay-p (symbol-function 'overlayp))
!   (fset 'mew-overlay-make (symbol-function 'make-overlay))
!   (fset 'mew-overlay-move (symbol-function 'move-overlay))
!   (fset 'mew-overlay-put (symbol-function 'overlay-put))
    (require 'easymenu)
    (if (fboundp 'buffer-substring-no-properties)
        (fset 'mew-buffer-substring
Index: mew/mew-highlight.el
diff -c mew/mew-highlight.el:1.1.1.1 mew/mew-highlight.el:1.1.1.1.2.1
*** mew/mew-highlight.el:1.1.1.1	Tue Oct 28 13:08:43 1997
--- mew/mew-highlight.el	Tue Oct 28 14:21:36 1997
***************
*** 155,184 ****
    "A function to highlight the cursor line in Summary and Virtual mode."
    (if mew-opt-highlight-cursor-line
        (let ((buffer-read-only nil))
! 	(if (mew-property-p mew-property-cursor-line)
! 	    (mew-property-move mew-property-cursor-line
! 			       (save-excursion (beginning-of-line) (point))
! 			       (save-excursion (end-of-line) (point)))
! 	  (setq mew-property-cursor-line
! 		(mew-property-make 
  		 (save-excursion (beginning-of-line) (point))
  		 (save-excursion (end-of-line) (point))))
! 	  (mew-property-put mew-property-cursor-line 'face 
! 			    mew-highlight-cursor-line-face)
  	  ))))
  
  (defun mew-highlight-url ()
    "A function to highlight URL in Message mode."
    (if mew-opt-highlight-url
        (let ((url-regex mew-opt-highlight-url-regex)
! 	    (buffer-read-only nil))
  	(save-excursion
  	  (goto-char (point-min))
  	  (while (re-search-forward url-regex mew-bold-url-size t)
! 	    (put-text-property (match-beginning 0) (match-end 0)
! 			       'face mew-highlight-url-face)
! 	    (put-text-property (match-beginning 0) (match-end 0)
! 			       'mouse-face mew-highlight-url-mouse-face))))))
  
  (defun mew-highlight-mark-region (beg end)
    (interactive "r")
--- 155,185 ----
    "A function to highlight the cursor line in Summary and Virtual mode."
    (if mew-opt-highlight-cursor-line
        (let ((buffer-read-only nil))
! 	(if (mew-overlay-p mew-overlay-cursor-line)
! 	    (mew-overlay-move mew-overlay-cursor-line
! 			      (save-excursion (beginning-of-line) (point))
! 			      (save-excursion (end-of-line) (point)))
! 	  (setq mew-overlay-cursor-line
! 		(mew-overlay-make
  		 (save-excursion (beginning-of-line) (point))
  		 (save-excursion (end-of-line) (point))))
! 	  (mew-overlay-put mew-overlay-cursor-line 'face 
! 			   mew-highlight-cursor-line-face)
  	  ))))
  
  (defun mew-highlight-url ()
    "A function to highlight URL in Message mode."
    (if mew-opt-highlight-url
        (let ((url-regex mew-opt-highlight-url-regex)
! 	    (buffer-read-only nil)
! 	    overlay)
  	(save-excursion
  	  (goto-char (point-min))
  	  (while (re-search-forward url-regex mew-bold-url-size t)
! 	    (setq overlay (mew-overlay-make (match-beginning 0) (match-end 0)))
! 	    (mew-overlay-put overlay 'face mew-highlight-url-face)
! 	    (mew-overlay-put overlay 'mouse-face mew-highlight-url-mouse-face)
! 	    )))))
  
  (defun mew-highlight-mark-region (beg end)
    (interactive "r")
***************
*** 219,245 ****
  (defun mew-highlight-header-region (beg end)
    "A function to highligh header in Message and Draft mode."
    (interactive "r")
!   (save-excursion
!     (save-restriction
!       (narrow-to-region beg end)
!       (goto-char beg)
!       (let ((keywords mew-highlight-header-keywords)
! 	    (buffer-read-only nil)
! 	    key beg1 end1 beg2 end2 assoc)
! 	(while (not (eobp))
! 	  (looking-at "^\\([^:]+:\\)[ \t]*")
! 	  (setq beg1 (match-beginning 1))
! 	  (setq end1 (match-end 1))
! 	  (setq key (mew-match 1))
! 	  (setq beg2 (match-end 0))
! 	  (forward-line)
! 	  (if (setq assoc (mew-assoc-match2 key keywords 0))
! 	      (progn
! 		(put-text-property beg1 end1 'face (nth 1 assoc))
! 		(while (looking-at "[ \t]+") (forward-line))
! 		(setq end2 (1- (point)))
! 		(put-text-property beg2 end2 'face (nth 2 assoc)))
! 	    (while (looking-at "[ \t]") (forward-line))))))))
  
  ;;
  ;; X-Face:
--- 220,249 ----
  (defun mew-highlight-header-region (beg end)
    "A function to highligh header in Message and Draft mode."
    (interactive "r")
!   (if (and window-system mew-opt-highlight-header)
!       (save-excursion
! 	(save-restriction
! 	  (narrow-to-region beg end)
! 	  (goto-char beg)
! 	  (let ((keywords mew-highlight-header-keywords)
! 		(buffer-read-only nil)
! 		key beg1 end1 beg2 end2 assoc overlay)
! 	    (while (not (eobp))
! 	      (looking-at "^\\([^:]+:\\)[ \t]*")
! 	      (setq beg1 (match-beginning 1))
! 	      (setq end1 (match-end 1))
! 	      (setq key (mew-match 1))
! 	      (setq beg2 (match-end 0))
! 	      (forward-line)
! 	      (if (setq assoc (mew-assoc-match2 key keywords 0))
! 		  (progn
! 		    (setq overlay (mew-overlay-make beg1 end1))
! 		    (mew-overlay-put overlay 'face (nth 1 assoc))
! 		    (while (looking-at "[ \t]+") (forward-line))
! 		    (setq end2 (1- (point)))
! 		    (setq overlay (mew-overlay-make beg2 end2))
! 		    (mew-overlay-put overlay 'face (nth 2 assoc)))
! 		(while (looking-at "[ \t]") (forward-line)))))))))
  
  ;;
  ;; X-Face:
***************
*** 262,269 ****
  		      (let ((buffer-read-only nil) xface)
  			(while (re-search-forward 
  				"^X-Face: *\\(.*\\(\n[ \t].*\\)*\\)\n" end t)
! 			  (mew-property-put
! 			   (mew-property-make
  			    (match-beginning 0) (match-end 0))
  			   'invisible t)
  			  (setq xface (highlight-headers-x-face-to-pixmap
--- 266,273 ----
  		      (let ((buffer-read-only nil) xface)
  			(while (re-search-forward 
  				"^X-Face: *\\(.*\\(\n[ \t].*\\)*\\)\n" end t)
! 			  (mew-overlay-put
! 			   (mew-overlay-make
  			    (match-beginning 0) (match-end 0))
  			   'invisible t)
  			  (setq xface (highlight-headers-x-face-to-pixmap
***************
*** 273,280 ****
  			    (goto-char beg)
  			    (if (re-search-forward "^\\(From:\\).*" end t)
  				(set-extent-begin-glyph 
! 				 (mew-property-make (match-end 1)
! 						    (match-end 1))
  				 xface))))))))
  	      )))
   (t
--- 277,284 ----
  			    (goto-char beg)
  			    (if (re-search-forward "^\\(From:\\).*" end t)
  				(set-extent-begin-glyph 
! 				 (mew-overlay-make (match-end 1)
! 						   (match-end 1))
  				 xface))))))))
  	      )))
   (t
Index: mew/mew-mark.el
diff -c mew/mew-mark.el:1.1.1.1 mew/mew-mark.el:1.1.1.1.2.1
*** mew/mew-mark.el:1.1.1.1	Tue Oct 28 13:08:43 1997
--- mew/mew-mark.el	Tue Oct 28 14:21:37 1997
***************
*** 342,350 ****
  	  (while (re-search-forward regex nil t)
  	    (delete-backward-char 1)
  	    (insert (char-to-string new-mark))
! 	    ))
! 	))
!     ))
     
  (defun mew-summary-mark-delete ()	; * -> D
    "Put the delete mark onto all messages marked with '*'."
--- 342,348 ----
  	  (while (re-search-forward regex nil t)
  	    (delete-backward-char 1)
  	    (insert (char-to-string new-mark))
! 	    (mew-highlight-mark-line new-mark)))))))
     
  (defun mew-summary-mark-delete ()	; * -> D
    "Put the delete mark onto all messages marked with '*'."
Index: mew/mew-syntax.el
diff -c mew/mew-syntax.el:1.1.1.1 mew/mew-syntax.el:1.1.1.1.2.1
*** mew/mew-syntax.el:1.1.1.1	Tue Oct 28 13:08:44 1997
--- mew/mew-syntax.el	Tue Oct 28 14:21:37 1997
***************
*** 419,425 ****
  	 (space " ") (space-char 32)
  	 (quote "\"") 
  	 (cnt "..") (lcnt (length cnt))
! 	 (marks "") (lm 5)
  	 (lf 16) (lfc (- lf lcnt))
  	 (lt 27) (ltc (- lt lcnt))
  	 (ld 24) (ldc (- ld lcnt))
--- 419,425 ----
  	 (space " ") (space-char 32)
  	 (quote "\"") 
  	 (cnt "..") (lcnt (length cnt))
! 	 (marks "     ") (lm 5)
  	 (lf 16) (lfc (- lf lcnt))
  	 (lt 27) (ltc (- lt lcnt))
  	 (ld 24) (ldc (- ld lcnt))
Index: mew/mew.el
diff -c mew/mew.el:1.1.1.1 mew/mew.el:1.1.1.1.2.1
*** mew/mew.el:1.1.1.1	Tue Oct 28 13:08:43 1997
--- mew/mew.el	Tue Oct 28 14:21:38 1997
***************
*** 7,13 ****
  ;;;
  ;;; Author:  Kazu Yamamoto <Kazu at example.com>
  ;;; Created: Mar 22, 1994
! ;;; Revised: Oct 25, 1997
  ;;;
  ;;; The updated version is available from:
  ;;;	ftp://ftp.aist-nara.ac.jp/pub/elisp/Mew/mew-current.tar.gz
--- 7,13 ----
  ;;;
  ;;; Author:  Kazu Yamamoto <Kazu at example.com>
  ;;; Created: Mar 22, 1994
! ;;; Revised: Oct 28, 1997
  ;;;
  ;;; The updated version is available from:
  ;;;	ftp://ftp.aist-nara.ac.jp/pub/elisp/Mew/mew-current.tar.gz
***************
*** 24,30 ****
  ;;; Mew version
  ;;;
  
! (defconst mew-version "Mew version 1.92")
  (provide 'mew)
  (require 'mew-env)
  (require 'mew-func)
--- 24,30 ----
  ;;; Mew version
  ;;;
  
! (defconst mew-version "Mew version 1.92.1")
  (provide 'mew)
  (require 'mew-env)
  (require 'mew-func)
***************
*** 364,370 ****
  (defvar mew-decode-syntax nil)
  (defvar mew-decode-error nil)
  (defvar mew-encode-syntax nil)
! (defvar mew-property-cursor-line nil)
  
  (mapcar
   (function make-variable-buffer-local)
--- 364,370 ----
  (defvar mew-decode-syntax nil)
  (defvar mew-decode-error nil)
  (defvar mew-encode-syntax nil)
! (defvar mew-overlay-cursor-line nil)
  
  (mapcar
   (function make-variable-buffer-local)
***************
*** 383,389 ****
         'mew-encode-syntax
         'mew-decode-syntax
         'mew-decode-error
!        'mew-property-cursor-line
         ))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 383,389 ----
         'mew-encode-syntax
         'mew-decode-syntax
         'mew-decode-error
!        'mew-overlay-cursor-line
         ))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



Mew-dist メーリングリストの案内