[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:01224] Re: my-app-menu II



亀井さん、こんにちは。

        Tue, 24 Nov 1998 21:23:12 +0900 の
        [xyzzy:01221] Re: my-app-menu II
        への返事です。

マウスでやるのはやめて、次のようにしました。
------------------------------------------------------
(defvar *your-app-popup-menu* nil)
(setq *your-app-popup-menu* (create-popup-menu nil))

(defun yank-select ()
  (interactive)
  (while (get-menu-position *your-app-popup-menu* 'yank-select)
    (delete-menu *your-app-popup-menu* 'yank-select))
  (set-window *last-mouse-window*)
  (continue-pre-selection)
  (dotimes (arg (length *kill-ring*))
    (let ((string (car (current-kill arg))))
      (add-menu-item *your-app-popup-menu* 'yank-select
	    (if (< (length string) 30)
			 string
		       (substring string 0 30))
		     #'(lambda ()
			 (interactive)
			 (insert string)))))
  (track-popup-menu *your-app-popup-menu*))

(global-set-key #\M-C-y 'yank-select)
-------------------------------------------------------

dotimes の引数が違っている気がします。正しく kill-ring
内の個数を得るには、どう書けばいいのでしょうか?m(__)m

--------
須田誠也
EZU11330@xxxxxxxxxxx

Index Home