[xyzzy:01277] popup-buffer
- Subject: [xyzzy:01277] popup-buffer
- From: Seiya Suda <EZU11330@xxxxxxxxxxxxxxxx>
- X-mailer: Denshin 8 Go V321.2b5
みなさん、こんにちは。
また、ちょっとおもしろいかも。
ひまだなー(^^;
----------------------------------------
;;; -*- Mode: Lisp; Package: EDITOR -*-
;;;
;;; This file is part of xyzzy.
;;;
(provide "buffer-menu")
(in-package "editor")
(export '(popup-buffer *popup-buffer-menu*))
(defvar *popup-buffer-menu* nil)
(setq *popup-buffer-menu* (create-popup-menu nil))
(defun popup-buffer ()
(interactive)
(while (get-menu-position *popup-buffer-menu* 'buffer)
(delete-menu *popup-buffer-menu* 'buffer))
(continue-pre-selection)
#| (set-window *last-mouse-window*) |#
(save-excursion
(dolist (buffer (buffer-list))
(let ((menu-item (buffer-name buffer)))
(add-menu-item *popup-buffer-menu* 'buffer
menu-item
#'(lambda ()
(interactive)
(pop-to-buffer menu-item))))))
(track-popup-menu *popup-buffer-menu*))
(global-set-key '(#\C-c #\C-b) 'popup-buffer)
--------
須田誠也
EZU11330@xxxxxxxxxxx