Created
September 3, 2018 07:38
-
-
Save sharapeco/a253483c962a35e3d1af216b51a6a921 to your computer and use it in GitHub Desktop.
yank-select: xyzzy のキルリングをポップアップで選択する (from 須田さんち)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; いろいろ | |
;; https://web.archive.org/web/20040817084508/http://member.nifty.ne.jp:80/seiya-suda/utilities.html | |
(defvar *yank-select-popup-menu* nil) | |
(setq *yank-select-popup-menu* (create-popup-menu nil)) | |
(defun yank-select () | |
(interactive) | |
(while (get-menu-position *yank-select-popup-menu* 'yank-select) | |
(delete-menu *yank-select-popup-menu* 'yank-select)) | |
(continue-pre-selection) | |
(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) | |
string | |
(substring string 0 40)) | |
#'(lambda () | |
(interactive) | |
(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