null+****@clear*****
null+****@clear*****
Mon Jan 30 00:10:32 JST 2012
yuta yamada 2012-01-30 00:10:32 +0900 (Mon, 30 Jan 2012) New Revision: 05bd73aff263aa58df22cec46fdfb4d69a7cf5bc Log: apply from popup to buffer output Modified files: logalimacs.el Modified: logalimacs.el (+14 -1) =================================================================== --- logalimacs.el 2012-01-29 22:56:52 +0900 (a426fab) +++ logalimacs.el 2012-01-30 00:10:32 +0900 (f105576) @@ -57,6 +57,10 @@ ;(?f . :loga-fly-mode) )) +(defvar loga-popup-command-alist + '((?b . :buffer) + (?q . :quit))) + ;;;###autoload (defun loga-interactive-command () "interactive-command for logaling-command, types following mini-buffer." @@ -72,6 +76,14 @@ (:update (loga-update)) (t (loga-command)))))) +(defun loga-popup-command () + (let* (command) + (read-event) + (setq command (assoc-default last-input-event loga-popup-command-alist)) + (case command + (:buffer (loga-make-buffer (cdar loga-word-cache))) + (:quit (keyboard-quit))))) + ;; @todo apply ansi-color (defun loga-to-shell (cmd &optional arg help) (ansi-color-apply (shell-command-to-string (concat cmd " " arg " &")))) @@ -166,7 +178,8 @@ (defun loga-lookup-for-popup () "Display the output of loga-lookup at tooltip, note require popup.el" (interactive) - (loga-lookup :popup nil)) + (loga-lookup :popup nil) + (loga-popup-command)) (defun loga-return-word-on-cursor () "return word where point on cursor"