[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:00654] Re: backward-sentence



須田さん、こんにちは。

    Fri, 23 Oct 1998 15:49:17 +0900 の
   “[xyzzy:00653] Re: backward-sentence”
    への返事です.

こんな感じ? 

(defun forward-sentence (&optional (arg 1))
  (interactive "p")
  (while (< arg 0)
    (let ((par-beg (save-excursion (start-of-paragraph-text) (point))))
      (let ((opoint (point)))
	(if (scan-buffer (concat sentence-end "[^ \t\n]")
			 :regexp t :reverse t :limit par-beg :case-fold t :no-dup t)
	    (if (< (1- (match-end 0)) opoint)
		(goto-char (1- (match-end 0)))
	      (decf arg))
	  (goto-char par-beg))))
    (setq arg (1+ arg)))
  (while (> arg 0)
    (let ((par-end (save-excursion (end-of-paragraph-text) (point))))
      (if (scan-buffer sentence-end :regexp t :limit par-end :tail t :case-fold t)
	  (skip-chars-backward " \t\n")
	(goto-char par-end)))
    (setq arg (1- arg))))


よく知らないんですけど、もしかしたら backward-search は Mule と
動きが違うかも。

--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx

Index Home