2ちゃんねる ★スマホ版★ ■掲示板に戻る■ 全部 1- 最新50  

■ このスレッドは過去ログ倉庫に格納されています

navi2ch for emacs (part 4)

945 :名無しさん@Emacs:02/02/09 16:58
>>838
俺はこんな設定で満足している。
navi2chの中身を良く分かっていないので
だれか添削してくれるとうれしいな。

(defun navi2ch-bookmark-insert-subject (num item)
(navi2ch-bm-insert-subject
item num
(cdr (assq 'subject (navi2ch-bookmark-get-article item)))
(format "(%4d) [%s]"
(my-navi2ch-bookmark-get-article-last-number item)
(cdr (assq 'name (navi2ch-bookmark-get-board item))))))

(defun my-navi2ch-bookmark-get-article-last-number (item)
(let ((file (navi2ch-article-get-file-name
(navi2ch-bookmark-get-board item)
(navi2ch-bookmark-get-article item)))
num)
(save-excursion
(when (file-exists-p file)
(with-temp-buffer
(navi2ch-insert-file-contents file)
(setq num (count-lines (point-min) (point-max))))))
(or num 0)))

(defadvice navi2ch-bookmark-fetch-article
(after navi2ch-bookmark-fetch-article-redraw-line activate)
(let ((item (navi2ch-bookmark-get-property (point)))
(buffer-read-only nil) num)
(save-excursion
(beginning-of-line)
(looking-at " *\\([0-9]+\\)")
(setq num (string-to-number (match-string 1)))
(delete-region (point) (1+ (line-end-position)))
(navi2ch-bookmark-insert-subject num item))))


333 KB
★スマホ版★ 掲示板に戻る 全部 前100 次100 最新50

read.cgi ver 05.02.02 2014/06/23 Mango Mangüé ★
FOX ★ DSO(Dynamic Shared Object)