[Mew-dist 07468] b6 diff
Kazu Yamamoto ( 山本和彦 )
kazu at example.com
1999年 2月 16日 (火) 17:42:13 JST
とりあえず 500 系ののぞみの中で、text-mode-map とヘッダの折り返しにつ
いてハックしてみました。パッチを添付してますので、試して下さい。
mode-map を nconc や cons すると、XEmacs では怒られます。こうするのが
正しいか自信がありません。動けばよしとして下さい。
--かず@博多
-------------- next part --------------
? LOG
? LOGLESS
Index: 00changes
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/00changes,v
retrieving revision 1.211
retrieving revision 1.213
diff -c -r1.211 -r1.213
*** 00changes 1999/02/15 10:51:35 1.211
--- 00changes 1999/02/16 08:41:27 1.213
***************
*** 17,22 ****
--- 17,34 ----
* References: fixes.
*** todo ***
+ 1.94b7
+
+ * Set mew-highlight-url-max-size to 10000.
+ SAKAI Kiyotaka <ksakai at example.com>
+ * Even if the number of field lines is 1 and its length is over max,
+ no folding for 'unstruct field in ASCII only.
+ * Deleted "\t" from mew-draft-body-map.
+ Shun-ichi GOTO <gotoh at example.com>
+ * (setq mew-draft-body-map (cons 'keymap text-mode-map)).
+ SAKAI Kiyotaka <ksakai at example.com>
+ Kennichi Yamamoto <yamamoto at example.com>
+
1.94b6 (99/02/15) mew-dist release
* If an error occurs in PGP/MIME creation, Mew automatically does undo.
Index: mew-bq.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-bq.el,v
retrieving revision 1.48
retrieving revision 1.50
diff -c -r1.48 -r1.50
*** mew-bq.el 1999/02/15 10:51:35 1.48
--- mew-bq.el 1999/02/16 08:15:33 1.50
***************
*** 239,245 ****
;; RFC 2047 encoding
;;
! ;; DRUMS says that each line must be less than or equal to 78
;; excluding CRLF.
;; RFC2047 says that encoded-word must be less than or equal to 75.
;; RFC2047 says that each line which includes one or more encoded-words
--- 239,245 ----
;; RFC 2047 encoding
;;
! ;; DRUMS says that each line should be less than or equal to 78
;; excluding CRLF.
;; RFC2047 says that encoded-word must be less than or equal to 75.
;; RFC2047 says that each line which includes one or more encoded-words
***************
*** 303,321 ****
(defun mew-header-insert-ascii-text (str)
;; str can be folded
! (let* ((prefix (mew-column))
! (space (- mew-field-max-length prefix))
! (len (length str))
! (n 0) m)
! (if (<= len space)
! (insert str)
! (while (and n (< n space))
! (setq m n)
! (setq n (string-match "[ \t]" str (1+ m))))
! (insert (substring str 0 m))
! (insert "\n")
! (insert (substring str m (1+ m)))
! (mew-header-insert-ascii-text (substring str (1+ m) nil)))))
(defun mew-header-insert-ascii-addr (str)
;; str cannot be folded but can insert white-space
--- 303,329 ----
(defun mew-header-insert-ascii-text (str)
;; str can be folded
! (let ((str-list (mew-split str 32)) ;; give up \t
! str-car)
! (setq str-car (car str-list))
! (setq str-list (cdr str-list))
! (if (<= (+ (mew-column) (length str-car)) mew-field-max-length)
! (insert str-car)
! (backward-char)
! (if (looking-at " ")
! (progn
! (insert "\n")
! (forward-char)
! (insert str-car))
! (forward-char)
! (insert str-car)))
! (while str-list
! (setq str-car (car str-list))
! (setq str-list (cdr str-list))
! (if (< (+ (mew-column) (length str-car)) mew-field-max-length)
! ;; not include equal because of " ".
! (insert " " str-car)
! (insert "\n " str-car)))))
(defun mew-header-insert-ascii-addr (str)
;; str cannot be folded but can insert white-space
***************
*** 521,533 ****
(setq flen (- (1- (point)) start))
(setq lines (mew-header-goto-next))
(setq last (1- (point)))
(if (or (equal med last)
(and (or (/= lines 0) ;; already folded
! (<= flen mew-field-max-length)) ;; no need to fold
(equal (list mew-lc-ascii)
(mew-find-cs-region med last))))
() ;; let it be
- (setq type (mew-field-type-for-encoding key))
(setq str (buffer-substring med (1- (point)))) ;; excluding \n
(delete-region med (point))
(cond
--- 529,543 ----
(setq flen (- (1- (point)) start))
(setq lines (mew-header-goto-next))
(setq last (1- (point)))
+ (setq type (mew-field-type-for-encoding key))
(if (or (equal med last)
(and (or (/= lines 0) ;; already folded
! ;; # of lines is 1 hereafter
! (<= flen mew-field-max-length) ;; no need to fold
! (equal type 'unstruct))
(equal (list mew-lc-ascii)
(mew-find-cs-region med last))))
() ;; let it be
(setq str (buffer-substring med (1- (point)))) ;; excluding \n
(delete-region med (point))
(cond
***************
*** 538,543 ****
--- 548,555 ----
((equal type 'comma-text)
(mew-header-encode-comma-text str))
((equal type 'text)
+ (mew-header-encode-text str))
+ ((equal type 'unstruct)
(mew-header-encode-text str)))
(insert "\n") ;; previously deleted, so insert here
))))))
Index: mew-draft.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-draft.el,v
retrieving revision 1.62
retrieving revision 1.65
diff -c -r1.62 -r1.65
*** mew-draft.el 1999/02/15 10:51:35 1.62
--- mew-draft.el 1999/02/16 08:41:27 1.65
***************
*** 21,28 ****
(if mew-draft-mode-syntax-table
()
(setq mew-draft-mode-syntax-table (make-syntax-table text-mode-syntax-table))
! (modify-syntax-entry ?% "." mew-draft-mode-syntax-table)
! )
(defvar mew-draft-mode-toolbar-menu
'("Attachment Commands"
--- 21,27 ----
(if mew-draft-mode-syntax-table
()
(setq mew-draft-mode-syntax-table (make-syntax-table text-mode-syntax-table))
! (modify-syntax-entry ?% "." mew-draft-mode-syntax-table))
(defvar mew-draft-mode-toolbar-menu
'("Attachment Commands"
***************
*** 120,127 ****
(define-key mew-draft-header-map "\C-c\C-d" 'mew-refile-delete-alias)
(define-key mew-draft-header-map "\C-c\C-r" 'mew-refile-add-alias)
(if mew-use-bbdb
! (define-key mew-draft-header-map "\e\t" 'bbdb-complete-name))
! )
(cond
(mew-use-overlay-keymap
--- 119,125 ----
(define-key mew-draft-header-map "\C-c\C-d" 'mew-refile-delete-alias)
(define-key mew-draft-header-map "\C-c\C-r" 'mew-refile-add-alias)
(if mew-use-bbdb
! (define-key mew-draft-header-map "\e\t" 'bbdb-complete-name)))
(cond
(mew-use-overlay-keymap
***************
*** 137,147 ****
(define-key (symbol-value symmap) "\C-c\C-s" 'mew-pgp-sign-letter)
(define-key (symbol-value symmap) "\C-c\C-e" 'mew-pgp-encrypt-letter)
(define-key (symbol-value symmap) "\C-c\C-b" 'mew-pgp-sign-encrypt-letter)
! (define-key (symbol-value symmap) "\C-x\C-s" 'mew-save-buffer)
! )
(if mew-draft-body-map
()
! (setq mew-draft-body-map (make-sparse-keymap))
(define-key mew-draft-body-map "\C-c\t" 'mew-draft-insert-signature)
(define-key mew-draft-body-map "\C-c\C-y" 'mew-draft-cite)
(define-key mew-draft-body-map "\C-c\C-t" 'mew-draft-yank)
--- 135,148 ----
(define-key (symbol-value symmap) "\C-c\C-s" 'mew-pgp-sign-letter)
(define-key (symbol-value symmap) "\C-c\C-e" 'mew-pgp-encrypt-letter)
(define-key (symbol-value symmap) "\C-c\C-b" 'mew-pgp-sign-encrypt-letter)
! (define-key (symbol-value symmap) "\C-x\C-s" 'mew-save-buffer))
(if mew-draft-body-map
()
! (if (fboundp 'set-keymap-parents)
! (progn
! (setq mew-draft-body-map (make-sparse-keymap))
! (set-keymap-parents mew-draft-body-map 'text-mode-map))
! (setq mew-draft-body-map (cons 'keymap text-mode-map)))
(define-key mew-draft-body-map "\C-c\t" 'mew-draft-insert-signature)
(define-key mew-draft-body-map "\C-c\C-y" 'mew-draft-cite)
(define-key mew-draft-body-map "\C-c\C-t" 'mew-draft-yank)
***************
*** 150,163 ****
(define-key mew-draft-body-map "\C-c\C-n" 'mew-fib-next-item)
(define-key mew-draft-body-map "\C-c\C-p" 'mew-fib-previous-item)
(define-key mew-draft-body-map "\C-c\C-z" 'mew-fib-flush-input)
! (mew-draft-share-keymap 'mew-draft-body-map)
! )
(mew-draft-share-keymap 'mew-draft-header-map)
(if mew-draft-mode-map
()
(setq mew-draft-mode-map (make-sparse-keymap))
! (set-keymap-parent mew-draft-mode-map mew-draft-body-map))
! )
(t
(defun mew-draft-keyswitch ()
"A function to implement region key binding."
--- 151,162 ----
(define-key mew-draft-body-map "\C-c\C-n" 'mew-fib-next-item)
(define-key mew-draft-body-map "\C-c\C-p" 'mew-fib-previous-item)
(define-key mew-draft-body-map "\C-c\C-z" 'mew-fib-flush-input)
! (mew-draft-share-keymap 'mew-draft-body-map))
(mew-draft-share-keymap 'mew-draft-header-map)
(if mew-draft-mode-map
()
(setq mew-draft-mode-map (make-sparse-keymap))
! (set-keymap-parent mew-draft-mode-map mew-draft-body-map)))
(t
(defun mew-draft-keyswitch ()
"A function to implement region key binding."
***************
*** 185,202 ****
(if (eq 'mew-draft-keyswitch
(key-binding (char-to-string (aref key i))))
(throw 'keyswitch (setq key (mew-subsequence key i))))
! (setq i (1+ i))
! )
! ))
(cond
((mew-in-attach-p)
(setq func (lookup-key mew-draft-attach-map key)))
((mew-in-header-p)
(setq func (lookup-key mew-draft-header-map key)))
(t
! (setq func (lookup-key mew-draft-body-map key))
! )
! )
(if (not (integerp func))
()
(setq key (mew-subsequence key 0 func))
--- 184,197 ----
(if (eq 'mew-draft-keyswitch
(key-binding (char-to-string (aref key i))))
(throw 'keyswitch (setq key (mew-subsequence key i))))
! (setq i (1+ i)))))
(cond
((mew-in-attach-p)
(setq func (lookup-key mew-draft-attach-map key)))
((mew-in-header-p)
(setq func (lookup-key mew-draft-header-map key)))
(t
! (setq func (lookup-key mew-draft-body-map key))))
(if (not (integerp func))
()
(setq key (mew-subsequence key 0 func))
***************
*** 207,245 ****
((mew-in-header-p)
(setq func (lookup-key mew-draft-header-map key)))
(t
! (setq func (lookup-key mew-draft-body-map key))
! )
! )
! )
(if func
()
(setq func (lookup-key (current-global-map) key))
(if (not (integerp func))
()
(setq key (mew-subsequence key 0 func))
! (setq func (lookup-key (current-global-map) key))
! )
! )
(if func
(while (keymapp func)
(if (vectorp key)
(setq key (vconcat key (read-event)))
(setq key (concat key (char-to-string (read-event)))))
! (setq func (lookup-key (current-global-map) key))
! )
! )
(if (null func)
(insert key) ;; just in case
(setq this-command func)
(run-hooks 'pre-command-hook)
! (call-interactively this-command))
! ))
(if mew-draft-body-map
()
(setq mew-draft-body-map (make-sparse-keymap))
! (define-key mew-draft-body-map "\t" 'tab-to-tab-stop)
! (define-key mew-draft-body-map "\C-c\t" 'mew-draft-insert-signature)
! )
(if mew-draft-mode-map
()
(setq mew-draft-mode-map (make-sparse-keymap))
--- 202,231 ----
((mew-in-header-p)
(setq func (lookup-key mew-draft-header-map key)))
(t
! (setq func (lookup-key mew-draft-body-map key)))))
(if func
()
(setq func (lookup-key (current-global-map) key))
(if (not (integerp func))
()
(setq key (mew-subsequence key 0 func))
! (setq func (lookup-key (current-global-map) key))))
(if func
(while (keymapp func)
(if (vectorp key)
(setq key (vconcat key (read-event)))
(setq key (concat key (char-to-string (read-event)))))
! (setq func (lookup-key (current-global-map) key))))
(if (null func)
(insert key) ;; just in case
(setq this-command func)
(run-hooks 'pre-command-hook)
! (call-interactively this-command))))
(if mew-draft-body-map
()
(setq mew-draft-body-map (make-sparse-keymap))
! ;; (define-key mew-draft-body-map "\t" 'tab-to-tab-stop)
! (define-key mew-draft-body-map "\C-c\t" 'mew-draft-insert-signature))
(if mew-draft-mode-map
()
(setq mew-draft-mode-map (make-sparse-keymap))
***************
*** 284,292 ****
(define-key mew-draft-mode-map "\C-c\C-z" 'mew-fib-flush-input)
(define-key mew-draft-mode-map "\C-c\C-o" 'mew-draft-insert-config)
(define-key mew-draft-mode-map "\C-x\C-s" 'mew-save-buffer)
! )
! )
! )
(if mew-xemacs-p
()
--- 270,276 ----
(define-key mew-draft-mode-map "\C-c\C-z" 'mew-fib-flush-input)
(define-key mew-draft-mode-map "\C-c\C-o" 'mew-draft-insert-config)
(define-key mew-draft-mode-map "\C-x\C-s" 'mew-save-buffer)
! )))
(if mew-xemacs-p
()
Index: mew-vars.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-vars.el,v
retrieving revision 1.88
retrieving revision 1.90
diff -c -r1.88 -r1.90
*** mew-vars.el 1999/02/14 12:21:39 1.88
--- mew-vars.el 1999/02/16 08:41:27 1.90
***************
*** 121,127 ****
"(field enc dec)")
(defmacro mew-field-type-for-encoding (key)
! (` (or (nth 1 (assoc (capitalize (, key)) mew-field-database)) 'text)))
(defmacro mew-field-type-for-decoding (key)
(` (or (nth 2 (assoc (capitalize (, key)) mew-field-database)) 'text)))
--- 121,127 ----
"(field enc dec)")
(defmacro mew-field-type-for-encoding (key)
! (` (or (nth 1 (assoc (capitalize (, key)) mew-field-database)) 'unstruct)))
(defmacro mew-field-type-for-decoding (key)
(` (or (nth 2 (assoc (capitalize (, key)) mew-field-database)) 'text)))
***************
*** 930,936 ****
(defvar mew-highlight-body-max-line 200)
! (defvar mew-highlight-url-max-size 3000
"*Use bold font at url maximize size.
If nil, all contents are parsed.")
--- 930,936 ----
(defvar mew-highlight-body-max-line 200)
! (defvar mew-highlight-url-max-size 10000
"*Use bold font at url maximize size.
If nil, all contents are parsed.")
Mew-dist メーリングリストの案内