[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 05/09 22:28 / Filesize : 293 KB / Number-of Response : 920
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

xyzzyの使い方が分からぬやし 励ましあえ その11



241 名前:名無しさん@お腹いっぱい。 mailto:sage [2008/01/22(火) 01:13:18 ID:EE4jzfJx0]
>>240
こんな感じ?
(defvar *insert-parenthesis-list* nil)
(setq *insert-parenthesis-list*
`(("foo(&F)" "<a>" "</a>")
("bar(&B)" "¥ruby{" "}{ }")
))

(defun insert-parenthesis-1 (from to head tail)
(goto-char from)
(insert head)
(goto-char (+ to (length head)))
(insert tail))

(defun insert-parenthesis ()
(interactive)
(and (pre-selection-p)
(consp *insert-parenthesis-list*)
(let ((from (selection-mark))
(to (selection-point))
(menu (create-popup-menu)))
(when (> from to)
(rotatef from to))
(dolist (x *insert-parenthesis-list*)
(let* ((head (second x))
(tail (third x))
(menu-item (concat head " : " tail "\t" (first x))))
(add-menu-item menu nil menu-item
#'(lambda ()
(interactive)
(insert-parenthesis-1 from to head tail)))))
(track-popup-menu menu))))






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<293KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef