ぐは、 rd-search-latest-listitem は typo だ…。

-- 
shirai / p1jp.com

Shirai,Kaoru
  PlusOne Co.,Ltd

--- rd-mode.el~	Sat Feb  2 02:58:16 2002
+++ rd-mode.el	Mon May 27 20:35:08 2002
@@ -321,7 +321,7 @@
   ""
   (save-excursion
     (beginning-of-line)
-    (looking-at "--- +\\| *\\(\\* +\\)?")
+    (looking-at "--- +\\| *\\(\\* +\\|([0-9]+) +\\)?")
     (length (buffer-substring (match-beginning 0)(match-end 0)))))
   
 (defun rd-cite-region (beg end)
@@ -379,15 +379,32 @@
       (rd-insert-reftourl url)
     (rd-insert-ref (concat label "|URL:" url))))
 
+(defun rd-search-last-listitem ()
+  (beginning-of-line)
+  (if (looking-at "[ \t]*\\(\\*\\|([0-9])\\|:\\|---\\)[ \t]*")
+      (match-string 0)
+    (and (and (eq
+               (rd-current-indentation)
+               (progn (forward-line -1) (rd-current-indentation))
+               )
+              (not (eq (point) (point-min)) )
+              )
+         (rd-search-last-listitem)
+         )
+    )
+  )
+
 (defun rd-intelligent-newline ()
   (interactive)
-  (beginning-of-line)
-  (let ((item
-	 (and (looking-at "[ \t]*\\(\\*\\|([0-9])\\|:\\|---\\)[ \t]*")
-	      (match-string 0))))
+  (let (item)
+    (setq item
+          (save-excursion (rd-search-last-listitem) )
+          )
     (end-of-line)
     (newline)
-    (if item (insert-string item))))
+    (if item (insert-string item) )
+    )
+  )
 
 (provide 'rd-mode)
 ;;; rd-mode.el ends here