Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
yank-select: xyzzy のキルリングをポップアップで選択する (from 須田さんち)
;; いろいろ
(defvar *yank-select-popup-menu* nil)
(setq *yank-select-popup-menu* (create-popup-menu nil))
(defun yank-select ()
(while (get-menu-position *yank-select-popup-menu* 'yank-select)
(delete-menu *yank-select-popup-menu* 'yank-select))
(dotimes (arg (length *kill-ring*))
(let ((string (car (ed::current-kill arg t))))
(add-menu-item *yank-select-popup-menu* 'yank-select
(if (< (length string) 40)
(substring string 0 40))
#'(lambda ()
(insert string)))))
(track-popup-menu *yank-select-popup-menu*))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.