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

[xyzzy:00283] text-newline-midashi-and-create-spaces



亀井さん、みなさん、こんにちは。須田です。

次のコマンドは、いきなりGCを始めて、C-g
すると、とんでもないことをしてくれます。どこ
に欠陥があるのでしょう? 教えてください。

つもりでは、リターンすると、漢字と英語の間に
スペースを入れてくれるはずなんですけど。

(defun text-newline-midashi-and-create-spaces ()
  (interactive)
    (goto-bol)    
    (while (not (eq (following-char) #\LFD))
      (when (looking-for " ")
 (delete-char))
      (forward-char))
  (goto-bol)
    (let ((c (following-char)))
      (while (not (eq (following-char) #\LFD))
 (if (alpha-char-p c)
     (skip-syntax-spec-forward "w_")
   (skip-syntax-spec-forward "jk_"))
 (insert #\SPC)))
    (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))))

また、alpha-char-p と alphanumericp はどう異なるのかも
よろしくお願いします。

須田誠也
EZU11330@xxxxxxxxxxx

Index Home