(setf schrute-shortcuts-commands '((avy-goto-line ;便利なコマンド ;; 以下のコマンドを連発したときに発動させる next-line previous-line))) ;;; [2016-11-24 Thu]時点ではバグがあるので再定義しておく ;;; 修正され次第消す (require 'schrute) (defun schrute-mode-activate () "Do some setup when the global minor mode is activated." (if schrute-mode (add-hook 'post-command-hook #'schrute-check-last-command) (remove-hook 'post-command-hook 'schrute-check-last-command)) ;; regenerate the list of commands we are interested (let* ((elemen) (command-list)) (setf schrute--interesting-commands nil) (dolist (elemen schrute-shortcuts-commands) (setf command-list (cdr elemen)) (cond ((symbolp command-list) (push command-list schrute--interesting-commands)) ((listp command-list) (setf schrute--interesting-commands (append schrute--interesting-commands command-list))))))) (defun schrute--run-command () "Helper that will run an alternative-command." (let* ((alternative-command) (command-list)) (dolist (elem schrute-shortcuts-commands) (setf alternative-command (car elem)) (setf command-list (cdr elem)) (when (or (member this-command command-list) (eq this-command command-list)) (schrute--call-until-success alternative-command))))) (schrute-mode)