Emacs Part 39
■ このスレッドは過去ログ倉庫に格納されています
0001名無しさん@お腹いっぱい。
2011/11/29(火) 17:50:44.24Emacs Part 38
http://hibari.2ch.net/test/read.cgi/unix/1308635178/
0542名無しさん@お腹いっぱい。
2012/01/06(金) 14:29:08.57(interactive)
(let ((buf (save-excursion
(save-restriction
(widen)
(buffer-substring-no-properties (point-min) (point-max)))))
str)
(save-match-data
(while (and (setq str (read-string "input:"))
(string-match (regexp-quote str) buf))))
(insert (format "%s" (make-my-decoration str)))
))
0543名無しさん@お腹いっぱい。
2012/01/06(金) 14:38:52.45widen するかどうかは処理内容によるんじゃないのか?あとバッファ全コピはやりすぎだ
(defun somefunc ()
(interactive)
(let (str)
(save-match-data
(while (and (setq str (read-string "input:"))
(save-excursion
(goto-char (point-min))
(search-forward str nil t))))
(insert (format "%s" (なんか str)))
)))
■ このスレッドは過去ログ倉庫に格納されています