一人お手軽 Wiki もどき howm part3at UNIX
一人お手軽 Wiki もどき howm part3 - 暇つぶし2ch205:197
06/12/08 19:24:35
>>204 むーぅ、その方がiimage-modeがトグルできて都合がいいですね!

とりあえず、howm-iimage 改め howm-extract-image

(defun howm-extract-image ()
(interactive)
(let (imagename encoding content)
(set (make-local-variable 'howm-image-del-list) nil)
(save-excursion
(beginning-of-buffer)
(while (re-search-forward
(concat "---image-" "\\(.+\\)"
"-encoding-" "\\(.+\\)" "-content-start---\n")
nil t)
(setq imagename (match-string 1))
(setq encoding (match-string 2))
(let ((start (point)))
(re-search-forward
(concat "---image-" imagename
"-encoding-" encoding "-content-end---\n")
nil t)
(unless (file-exists-p imagename)
(mime-write-decoded-region
start (match-beginning 0) imagename encoding)
(add-to-list 'howm-image-del-list imagename))))
(iimage-mode)
(make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(function (lambda () (mapcar 'delete-file howm-image-del-list)))
nil t))))


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch