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

[xyzzy:04676] Re: text-attribute の検索



金子さん、こんにちは。

	2000年6月26日(月)[11:51:22]の、
	[xyzzy:04675] Re: text-attribute の検索
	への返事です。

|  この find-text-attribute というのは文字列の属性を取得する(検
| 索する)関数だとは思うのですが、どのような属性が取得できるのでしょ
| うか?

開始・終了位置とタグです。タグというのは、属性の目印の
ようなもので、好きなものを指定することができます。ただ
し、set-text-color ではタグの指定はできないので、以下
のように set-text-attribute を使用してください。

    (set-text-attribute (progn (goto-bol) (point))
			(progn (goto-eol) (point))
			'cursor
			:foreground 1 :background 0)

ここで指定している cursor がタグです。ほんで、たとえば
このようにすると、

  (multiple-value-bind (start end tag)
      (find-text-attribute 'cursor :start (progn (goto-bol) (point)))

:start で指定した位置以降で、タグが cursor のものを見
つけることができます。


# あー、今気が付いたんですが、狙ったものだけ削除するっ
# てのができないですね(^^;
# builtin.l の find-text-attribute の引数も間違ってるし。

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

Index Home