[Mew-dist 10158] Re: mew-decode.el patch.

SAKAI Kiyotaka ksakai at example.com
1999年 8月 17日 (火) 17:46:48 JST


>> In article <19990804195110I.kazu at example.com>, Kazu Yamamoto (山本和彦) <kazu at example.com> writes:

>> ただ、sticky の関係から、point が 'read-only の属性を持っていても、実
>> 際には挿入可能なことがあるという訳です。

> (1- (point)) (point) の rear-nonsticky と
> (point) (1+ (point)) の front-sticky を調べるのではダメでしょうか?

やっぱり地道にチェックするしかないのですね。

結局、以下のようなコードを書きました。

(defun uninsertable-p (p)
  (if (or (= (point-min) p)
	  (eq (get-text-property (1- p) 'rear-nonsticky) t)
	  (memq 'read-only (get-text-property (1- p) 'rear-nonsticky)))
      (and (get-text-property p 'read-only)
	   (or (eq (get-text-property p 'front-sticky) t)
	       (memq 'read-only (get-text-property p 'front-sticky))))
    (get-text-property (1- p) 'read-only)))

-- 
酒井 清隆 (E-mail: ksakai at example.com)



Mew-dist メーリングリストの案内