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

[xyzzy:00288] Re: text-newline-midashi-and-create-spaces



    Wed, 26 Aug 1998 16:30:41 +0900 の
   “[xyzzy:00285] Re: text-newline-midashi-and-create-spaces”
    への返事です.


| 思いっきりシンプルにしてみました。^^;

シンプルでベタな方法にしてみました。たぶん動くはず(^^;

(defun text-newline-midashi-and-create-spaces ()
  (interactive)
  (save-restriction
    (narrow-to-region (progn (goto-eol) (point))
		      (progn (goto-bol) (point)))
    (replace-buffer "\\([\X8200-\X9fff\Xe000-\Xfcff]\\) *\\([A-Za-z0-9_]\\)\\|\\([A-Za-z0-9_]\\) *\\([\X8200-\X9fff\Xe000-\Xfcff]\\)"
		    "\\1\\3 \\2\\4" :regexp t))
  (goto-bol)
  (let ((current-midashi
	 (and (looking-at *gyoto-mark*)
	      (following-char))))
    (goto-eol)
    (delete-trailing-spaces)
    (insert #\LFD)
    (when current-midashi
      (insert current-midashi))))

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

Index Home