diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-02-21 07:55:06 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-02-21 07:55:06 +0100 |
commit | b21864aafb467d4f73a0aaeecc059b90a87bb4e0 (patch) | |
tree | 7971f31b1e3ccc1c1b41a97228c1b8da109d07a3 /helm.el | |
parent | 86cc76f0af254291af80a1d485e4d9ef79adb5fe (diff) |
Remove catch exit tag no more needed apparently.
* helm.el (helm-internal): Do it.
Diffstat (limited to 'helm.el')
-rw-r--r-- | helm.el | 133 |
1 files changed, 66 insertions, 67 deletions
@@ -1816,73 +1816,72 @@ ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `helm'." (progn (advice-add 'tramp-read-passwd :around #'helm--advice-tramp-read-passwd) (advice-add 'ange-ftp-get-passwd :around #'helm--advice-ange-ftp-get-passwd)) - (ad-activate 'tramp-read-passwd) - (ad-activate 'ange-ftp-get-passwd)) - (catch 'exit ; `exit-minibuffer' use this tag on exit. - (helm-log (concat "[Start session] " (make-string 41 ?+))) - (helm-log "any-prompt = %S" any-prompt) - (helm-log "any-preselect = %S" any-preselect) - (helm-log "any-buffer = %S" any-buffer) - (helm-log "any-keymap = %S" any-keymap) - (helm-log "any-default = %S" any-default) - (helm-log "any-history = %S" any-history) - (let ((non-essential t) - (input-method-verbose-flag helm-input-method-verbose-flag) - (old--cua cua-mode) - (helm-maybe-use-default-as-input - (or helm-maybe-use-default-as-input ; it is let-bounded so use it. - (cl-loop for s in (helm-normalize-sources any-sources) - thereis (memq s helm-sources-using-default-as-input))))) - ;; cua-mode overhide local helm bindings. - ;; disable this stupid thing if enabled. - (and cua-mode (cua-mode -1)) - (unwind-protect - (condition-case-unless-debug _v - (let ( ;; `helm-source-name' is non-nil - ;; when `helm' is invoked by action, reset it. - helm-source-name - helm-current-source - helm-in-persistent-action - helm-quit - (helm-buffer (or any-buffer helm-buffer))) - (with-helm-restore-variables - (helm-initialize - any-resume any-input any-default any-sources) - (helm-display-buffer helm-buffer) - (when helm-prevent-escaping-from-minibuffer - (helm--remap-mouse-mode 1)) ; Disable mouse bindings. - (add-hook 'post-command-hook 'helm--maybe-update-keymap) - (helm-log "show prompt") - (unwind-protect - (helm-read-pattern-maybe - any-prompt any-input any-preselect - any-resume any-keymap any-default any-history) - (helm-cleanup))) - (prog1 - (unless helm-quit (helm-execute-selection-action)) - (helm-log (concat "[End session] " (make-string 41 ?-))))) - (quit - (helm-restore-position-on-quit) - (helm-log (concat "[End session (quit)] " (make-string 34 ?-))) - nil)) - (remove-hook 'post-command-hook 'helm--maybe-update-keymap) - (if (fboundp 'advice-add) - (progn - (advice-remove 'tramp-read-passwd - #'helm--advice-tramp-read-passwd) - (advice-remove 'ange-ftp-get-passwd - #'helm--advice-ange-ftp-get-passwd)) - (ad-deactivate 'tramp-read-passwd) - (ad-deactivate 'ange-ftp-get-passwd)) - (helm-log "helm-alive-p = %S" (setq helm-alive-p nil)) - (helm--remap-mouse-mode -1) ; Reenable mouse bindings. - (setq helm-alive-p nil) - ;; Reset helm-pattern so that lambda's using it - ;; before running helm will not start with its old value. - (setq helm-pattern "") - (setq helm-in-file-completion-p nil) - (and old--cua (cua-mode 1)) - (helm-log-save-maybe))))) + (ad-activate 'tramp-read-passwd) + (ad-activate 'ange-ftp-get-passwd)) + (helm-log (concat "[Start session] " (make-string 41 ?+))) + (helm-log "any-prompt = %S" any-prompt) + (helm-log "any-preselect = %S" any-preselect) + (helm-log "any-buffer = %S" any-buffer) + (helm-log "any-keymap = %S" any-keymap) + (helm-log "any-default = %S" any-default) + (helm-log "any-history = %S" any-history) + (let ((non-essential t) + (input-method-verbose-flag helm-input-method-verbose-flag) + (old--cua cua-mode) + (helm-maybe-use-default-as-input + (or helm-maybe-use-default-as-input ; it is let-bounded so use it. + (cl-loop for s in (helm-normalize-sources any-sources) + thereis (memq s helm-sources-using-default-as-input))))) + ;; cua-mode overhide local helm bindings. + ;; disable this stupid thing if enabled. + (and cua-mode (cua-mode -1)) + (unwind-protect + (condition-case-unless-debug _v + (let ( ;; `helm-source-name' is non-nil + ;; when `helm' is invoked by action, reset it. + helm-source-name + helm-current-source + helm-in-persistent-action + helm-quit + (helm-buffer (or any-buffer helm-buffer))) + (with-helm-restore-variables + (helm-initialize + any-resume any-input any-default any-sources) + (helm-display-buffer helm-buffer) + (when helm-prevent-escaping-from-minibuffer + (helm--remap-mouse-mode 1)) ; Disable mouse bindings. + (add-hook 'post-command-hook 'helm--maybe-update-keymap) + (helm-log "show prompt") + (unwind-protect + (helm-read-pattern-maybe + any-prompt any-input any-preselect + any-resume any-keymap any-default any-history) + (helm-cleanup))) + (prog1 + (unless helm-quit (helm-execute-selection-action)) + (helm-log (concat "[End session] " (make-string 41 ?-))))) + (quit + (helm-restore-position-on-quit) + (helm-log (concat "[End session (quit)] " (make-string 34 ?-))) + nil)) + (remove-hook 'post-command-hook 'helm--maybe-update-keymap) + (if (fboundp 'advice-add) + (progn + (advice-remove 'tramp-read-passwd + #'helm--advice-tramp-read-passwd) + (advice-remove 'ange-ftp-get-passwd + #'helm--advice-ange-ftp-get-passwd)) + (ad-deactivate 'tramp-read-passwd) + (ad-deactivate 'ange-ftp-get-passwd)) + (helm-log "helm-alive-p = %S" (setq helm-alive-p nil)) + (helm--remap-mouse-mode -1) ; Reenable mouse bindings. + (setq helm-alive-p nil) + ;; Reset helm-pattern so that lambda's using it + ;; before running helm will not start with its old value. + (setq helm-pattern "") + (setq helm-in-file-completion-p nil) + (and old--cua (cua-mode 1)) + (helm-log-save-maybe)))) ;;; Helm resume |