[Mew-dist 15565] Re: thread separator patch again, final ?

NINOMIYA Hideyuki nin at example.com
2000年 12月 18日 (月) 23:06:10 JST


舌の根も乾かないうちに...

macro 使ってちょっと綺麗にしましたです。
# これで終わりにしよう

Index: mew-summary.el
===================================================================
RCS file: /tmp/am/da/cvs/mew/mew-summary.el,v
retrieving revision 1.1.1.13
diff -c -F(def -r1.1.1.13 mew-summary.el
*** mew-summary.el	2000/12/14 03:05:51	1.1.1.13
--- mew-summary.el	2000/12/18 11:52:17
*************** (defmacro mew-summary-msg (&rest body)
*** 36,42 ****
    (` (cond
        ((eobp) (message "No message"))
        ((not (mew-summary-message-number))
!        (message "Please use this command on a message, not a part"))
        (t
         (,@ body)))))
  
--- 36,44 ----
    (` (cond
        ((eobp) (message "No message"))
        ((not (mew-summary-message-number))
!        (let ((msg ""))
! 	 (if mew-use-thread-separator (setq msg " or thread separator"))
! 	 (message "Please use this command on a message, not a part%s" msg)))
        (t
         (,@ body)))))
  
*************** (defun mew-summary-mode-line ()
*** 548,553 ****
--- 550,559 ----
    (if mew-summary-buffer-process
        ()
      (let ((left (1- (mew-count-lines (point) (point-max)))))
+       (if (and (mew-thread-p) mew-use-thread-separator)
+ 	  (let ((spl (concat "\n" mew-thread-separator "\n")))
+ 	    (save-excursion
+ 	      (while (search-forward spl nil t) (setq left (1- left))))))
        (if (and (mew-decode-syntax-p)
  	       (equal (mew-decode-syntax-buffer) (current-buffer)))
  	  (setq left (- left (mew-count-lines (mew-decode-syntax-begin)
Index: mew-thread.el
===================================================================
RCS file: /tmp/am/da/cvs/mew/mew-thread.el,v
retrieving revision 1.1.1.11
diff -c -F(def -r1.1.1.11 mew-thread.el
*** mew-thread.el	2000/12/15 11:29:24	1.1.1.11
--- mew-thread.el	2000/12/18 13:55:26
*************** (defvar mew-thread-indent-length nil)
*** 79,84 ****
--- 79,92 ----
  (defvar mew-thread-indent-regex nil)
  (defvar mew-thread-indent-lregex nil)
  
+ (defvar mew-use-thread-separator nil)
+ (defvar mew-thread-separator "")
+ 
+ (defmacro mew-thread-insert-separator ()
+   '(if (and mew-use-thread-separator
+ 	    (not (= 1 (line-beginning-position))))
+        (insert (concat mew-thread-separator "\n"))))
+ 
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
  ;;; Thread info macro
*************** (defun mew-summary-thread-print (tree fo
*** 362,367 ****
--- 370,376 ----
        (let* ((me (car tree))
  	     (cld (mew-thread-get-child me)))
  	(mew-elet
+ 	 (if (= 0 level) (mew-thread-insert-separator))
  	 (insert (mew-thread-get-line me))
  	 (forward-line -1)
  	 (move-to-column column)
*************** (defun mew-summary-fancy-thread-print-to
*** 400,405 ****
--- 409,415 ----
      (let* ((me (car top))
  	   (cld (mew-thread-get-child me)))
        (mew-elet
+        (mew-thread-insert-separator)
         (insert (mew-thread-get-line me))
         (forward-line -1)
         (move-to-column column)
*************** (defun mew-summary-thread-up ()
*** 488,493 ****
--- 498,504 ----
         (mew-summary-goto-message)
         (mew-decode-syntax-delete)
         (forward-line -1)
+        (if (not (mew-summary-message-number)) (forward-line -1))
         (catch 'loop
  	 (while (not (bobp))
  	   (move-to-column column)
*************** (defun mew-summary-thread-down ()
*** 517,522 ****
--- 528,534 ----
  	   (move-to-column column)
  	   (if (looking-at mew-thread-indent-regex)
  	       (forward-line)
+ 	     (if (not (mew-summary-message-number)) (forward-line))
  	     (throw 'loop (setq here (point)))))))
       (if here
  	 (progn



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