[xyzzy:02449] Re: popup-menu
- Subject: [xyzzy:02449] Re: popup-menu
- From: Tetsuya Kamei <kamei@xxxxxxxxxxxx>
- X-mailer: Denshin 8 Go V321.2b5
- X-yzzy-version: 0.0.0.82
須田さん、こんにちは。
Fri, 30 Apr 1999 20:04:05 +0900 の
[xyzzy:02444] popup-menu
への返事です.
こんな感じ? それと、bookmark-add-new-bookmark の (eq l x) は絶対
に一致しませんが、そういうもんでしょうか?
(defun bookmark-clear-this-bookmark (name)
(interactive "sしおり: ")
(let ((n (assoc name *bookmark-global-mark-list* :test #'equal)))
(when n
(setq *bookmark-global-mark-list* (delete n *bookmark-global-mark-list* :test #'eq))
(delete-marker (cdr n))
t)))
(defun bookmark-menu ()
(interactive)
(continue-pre-selection)
(let ((menu (create-popup-menu))
(l *bookmark-global-mark-list*))
(dotimes (i (floor (length l) 10))
(let ((popup (create-popup-menu)))
(add-popup-menu menu popup (format nil "Bookmark-~d" i))
(dotimes (i 10)
(let ((marker (cdar l)))
(add-menu-item popup nil (caar l)
#'(lambda ()
(interactive)
(bookmark-goto marker))))
(pop l))))
(dolist (b l)
(let ((marker (cdr b)))
(add-menu-item menu nil (car b)
#'(lambda ()
(interactive)
(bookmark-goto marker)))))
(track-popup-menu menu)))
--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx