Takeshi UME Imai
takes****@tt*****
2005年 7月 21日 (木) 22:41:25 JST
今井です。 In Subject:[[Hiki-dev:00963] hiki-mode.el パッチを取り込みました] ">" == <sugi****@dream*****> sez: Yanagita> キーワード「----」が設定できなくなりますが…… あぁ、そうか。そうなっちゃいますね。 実はテキスト属性の扱いがわかっていなかったので、正規表現検索という安易 な手にでてしまいました。 テキスト属性について調べて修正してみました。0.8.2リリース後になってし まって申し訳ありませんが、よかったら使ってください。 --- hiki-mode.el.orig 2005-07-21 02:15:28.000000000 +0900 +++ hiki-mode.el 2005-07-21 20:00:18.000000000 +0900 @@ -680,8 +680,8 @@ (save-excursion (when keyword (insert (hiki-propertize "Keywords:" 'read-only t 'front-sticky t 'rear-nonsticky t 'hiki-special t)) - (insert (hiki-propertize "\n" 'hiki-special t)) - (insert (hiki-propertize (format "%s\n" keyword) 'hiki-special t)) + (insert (hiki-propertize "\n" 'front-sticky t 'hiki-keywords t 'hiki-special t)) + (insert (hiki-propertize (format "%s\n" keyword) 'front-sticky t 'hiki-keywords t 'hiki-special t)) (insert (hiki-propertize "----\n" 'read-only t 'front-sticky t 'rear-nonsticky t 'hiki-special t))) (setq point (point)) (insert body) @@ -795,13 +795,11 @@ (or hiki-pagetitle hiki-pagename) nil nil nil (or hiki-pagetitle hiki-pagename))) (goto-char (point-min)) (when (get-text-property (point) 'hiki-special) - (re-search-forward "^Keywords:$" nil t nil) - (let (start end) - (setq start (+ (match-end 0) 1)) - (re-search-forward "^----$" nil t nil) - (setq end (match-beginning 0)) - (setq keywords (buffer-substring-no-properties start end))) - (goto-char (next-single-property-change (point) 'hiki-special))) + (goto-char (next-property-change (point))) + (when (get-text-property (point) 'hiki-keywords) + (setq keywords + (buffer-substring-no-properties (+ (point) 1) (next-single-property-change (point) 'hiki-keywords))) + (goto-char (next-single-property-change (point) 'hiki-special)))) (setq contents (buffer-substring-no-properties (point) (point-max))) (add-to-list 'post-data (cons "c" "save")) (add-to-list 'post-data (cons "p" hiki-pagename))