From 43e88980a29618dc03f96ce38b67b2a7caadd9d9 Mon Sep 17 00:00:00 2001 From: rubikitch Date: Wed, 7 Dec 2016 19:38:54 +0900 Subject: [PATCH] anything.el: Bugfix: Restore overriding-local-map before executing action. --- anything.el | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/anything.el b/anything.el index 1971709..de72e16 100644 --- a/anything.el +++ b/anything.el @@ -1760,6 +1760,7 @@ ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `anything'." (when (and any-history (symbolp any-history)) any-history)) (anything-cleanup))) (prog1 (unless anything-quit + (setq overriding-local-map old-overridding-local-map) (anything-execute-selection-action-1)) (anything-log (concat "[End session] " (make-string 41 ?-))))) (quit @@ -2831,26 +2832,24 @@ Coerce source with coerce function." "Select an action for the currently selected candidate. If action buffer is selected, back to the anything buffer." (interactive) - (if (not anything-alive-p) - (anything-fall-back-to-minibuffer-complete) - (anything-log-run-hook 'anything-select-action-hook) - (cond ((get-buffer-window anything-action-buffer 'visible) - (set-window-buffer (get-buffer-window anything-action-buffer) - anything-buffer) - (kill-buffer anything-action-buffer) - (anything-set-pattern anything-input 'noupdate)) - (t - (setq anything-saved-selection (anything-get-selection)) - (unless anything-saved-selection - (error "Nothing is selected")) - (setq anything-saved-current-source (anything-get-current-source)) - (let ((actions (anything-get-action))) - (if (functionp actions) - (message "Sole action: %s" actions) - (anything-show-action-buffer actions) - (anything-delete-minibuffer-contents) - (setq anything-pattern 'dummy) ; so that it differs from the previous one - (anything-check-minibuffer-input))))))) + (anything-log-run-hook 'anything-select-action-hook) + (cond ((get-buffer-window anything-action-buffer 'visible) + (set-window-buffer (get-buffer-window anything-action-buffer) + anything-buffer) + (kill-buffer anything-action-buffer) + (anything-set-pattern anything-input 'noupdate)) + (t + (setq anything-saved-selection (anything-get-selection)) + (unless anything-saved-selection + (error "Nothing is selected")) + (setq anything-saved-current-source (anything-get-current-source)) + (let ((actions (anything-get-action))) + (if (functionp actions) + (message "Sole action: %s" actions) + (anything-show-action-buffer actions) + (anything-delete-minibuffer-contents) + (setq anything-pattern 'dummy) ; so that it differs from the previous one + (anything-check-minibuffer-input)))))) (defun anything-fall-back-to-minibuffer-complete () (call-interactively 'minibuffer-complete)) -- 2.11.4.GIT