Emacs Lisp 3 ..
[2ch|▼Menu]
97:デフォルトの名無しさん
08/09/28 08:05:33
;; エレガントかどうか知らんけど、最終行でも動作が変わらないようにしてみました
(defun duplicate-line (n)
(interactive "p")
(save-excursion
(let ((str (concat (buffer-substring (line-beginning-position)
(line-end-position))
"\n")))
(forward-line)
(when (= (line-end-position)
(point-max))
(insert "\n"))
(dotimes (i n)
(insert str)))))


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

5404日前に更新/48 KB
担当:undef