[migemo] Fix error with isearch-backward

Hideyuki SHIRAI ( 白井秀行 ) shirai @ meadowy.org
2006年 9月 22日 (金) 17:48:01 JST


白井です。

# 一年ぶりの御無沙汰でございます。

Emacs CVS Head の 

2006-09-20  Kenichi Handa  <handa @ m17n.org>
	* isearch.el (isearch-process-search-char): Cancel the previous
	change.
	(isearch-search-string): New function.
	(isearch-search): Use isearch-search-string.
	(isearch-lazy-highlight-search): Likewise.

の変更で、migemo な isearch-backward() が動かなくなったので CVS
で直しておきました。

CVS co するのが面倒な人は該当部分を以下の関数に置き換えてくださ
い。

(defun migemo-backward (word &optional bound noerror count)
  (interactive "sSearch backward: \nP\nP")
  (if (delq 'ascii (find-charset-string word))
      (setq migemo-search-pattern word)
    (setq migemo-search-pattern (migemo-search-pattern-get word)))
  (if (null migemo-do-isearch)
      (search-backward-regexp migemo-search-pattern bound noerror count)
    (or (and (not (eq this-command 'isearch-repeat-backward))
	     (not (get-char-property (point) 'invisible (current-buffer)))
	     (or (and (looking-at migemo-search-pattern)
		      (match-beginning 0))
		 (and (not (eq (point) (point-min)))
		      (progn (forward-char -1)
			     (and (looking-at migemo-search-pattern)
				  (match-beginning 0))))))
	(search-backward-regexp migemo-search-pattern bound noerror count))))

# うーーん、何年潜んでいたバグかしら。

-- 
白井秀行 (mailto:shirai @ meadowy.org)


Migemo メーリングリストの案内