summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helm-bookmark.el4
-rw-r--r--helm-buffers.el35
-rw-r--r--helm-color.el4
-rw-r--r--helm-command.el1
-rw-r--r--helm-elisp-package.el10
-rw-r--r--helm-files.el45
-rw-r--r--helm-font.el4
-rw-r--r--helm-grep.el5
-rw-r--r--helm-mode.el1
-rw-r--r--helm-regexp.el4
-rw-r--r--helm-tags.el2
-rw-r--r--helm.el201
12 files changed, 216 insertions, 100 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el
index 8ca6fdcc..f74f5743 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -209,6 +209,7 @@
(helm-attrset 'toggle-filename
'(helm-bookmark-toggle-filename-1 . never-split))
(helm-execute-persistent-action 'toggle-filename)))
+(put 'helm-bookmark-toggle-filename 'helm-only t)
(defun helm-bookmark-jump (candidate)
"Jump to bookmark from keyboard."
@@ -699,6 +700,7 @@ words from the buffer into the new bookmark name."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-bookmark-edit-bookmark)))
+(put 'helm-bookmark-run-edit 'helm-only t)
(defun helm-bookmark-run-jump-other-window ()
@@ -706,6 +708,7 @@ words from the buffer into the new bookmark name."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'bookmark-jump-other-window)))
+(put 'helm-bookmark-run-jump-other-window 'helm-only t)
(defun helm-bookmark-run-delete ()
"Delete bookmark from keyboard."
@@ -713,6 +716,7 @@ words from the buffer into the new bookmark name."
(with-helm-alive-p
(when (y-or-n-p "Delete bookmark(s)?")
(helm-exit-and-execute-action 'helm-delete-marked-bookmarks))))
+(put 'helm-bookmark-run-delete 'helm-only t)
(defun helm-bookmark-get-bookmark-from-name (bmk)
"Return bookmark name even if it is a bookmark with annotation.
diff --git a/helm-buffers.el b/helm-buffers.el
index f1c1009d..c456b860 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -416,11 +416,12 @@ Should be called after others transformers i.e (boring buffers)."
(defun helm-toggle-buffers-details ()
(interactive)
- (let ((preselect (helm-buffer--get-preselection
- (helm-get-selection))))
- (when helm-alive-p
+ (with-helm-alive-p
+ (let ((preselect (helm-buffer--get-preselection
+ (helm-get-selection))))
(setq helm-buffer-details-flag (not helm-buffer-details-flag))
(helm-force-update preselect))))
+(put 'helm-toggle-buffers-details 'helm-only t)
(defun helm-buffers-sort-transformer (candidates _source)
(if (string= helm-pattern "")
@@ -458,11 +459,13 @@ Should be called after others transformers i.e (boring buffers)."
"Mark All buffers that have same property `type' than current.
i.e same color."
(interactive)
- (let ((marked (helm-marked-candidates)))
- (if (and (>= (length marked) 1)
- (with-helm-window helm-visible-mark-overlays))
- (helm-unmark-all)
- (helm-buffers-mark-similar-buffers-1))))
+ (with-helm-alive-p
+ (let ((marked (helm-marked-candidates)))
+ (if (and (>= (length marked) 1)
+ (with-helm-window helm-visible-mark-overlays))
+ (helm-unmark-all)
+ (helm-buffers-mark-similar-buffers-1)))))
+(put 'helm-buffers-mark-similar-buffers 'helm-only t)
;;; match functions
@@ -599,6 +602,7 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(with-helm-alive-p
(helm-attrset 'diff-action 'helm-buffer-toggle-diff)
(helm-execute-persistent-action 'diff-action)))
+(put 'helm-buffer-diff-persistent 'helm-only t)
(defun helm-revert-buffer (candidate)
(with-current-buffer candidate
@@ -622,6 +626,7 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(with-helm-alive-p
(helm-attrset 'revert-action '(helm-buffer-revert-and-update . never-split))
(helm-execute-persistent-action 'revert-action)))
+(put 'helm-buffer-revert-persistent 'helm-only t)
(defun helm-buffer-save-and-update (_candidate)
(let ((marked (helm-marked-candidates))
@@ -639,6 +644,7 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(with-helm-alive-p
(helm-attrset 'save-action '(helm-buffer-save-and-update . never-split))
(helm-execute-persistent-action 'save-action)))
+(put 'helm-buffer-save-persistent 'helm-only t)
(defun helm-buffer-run-kill-persistent ()
"Kill buffer without quitting helm."
@@ -646,6 +652,7 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(with-helm-alive-p
(helm-attrset 'kill-action '(helm-buffers-persistent-kill . never-split))
(helm-execute-persistent-action 'kill-action)))
+(put 'helm-buffer-run-kill-persistent 'helm-only t)
(defun helm-kill-marked-buffers (_ignore)
(let* ((bufs (helm-marked-candidates))
@@ -660,60 +667,70 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-kill-marked-buffers)))
+(put 'helm-buffer-run-kill-buffers 'helm-only t)
(defun helm-buffer-run-grep ()
"Run Grep action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-grep-buffers)))
+(put 'helm-buffer-run-grep 'helm-only t)
(defun helm-buffer-run-zgrep ()
"Run Grep action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-zgrep-buffers)))
+(put 'helm-buffer-run-zgrep 'helm-only t)
(defun helm-buffer-run-query-replace-regexp ()
"Run Query replace regexp action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-buffer-query-replace-regexp)))
+(put 'helm-buffer-run-query-replace-regexp 'helm-only t)
(defun helm-buffer-run-query-replace ()
"Run Query replace action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-buffer-query-replace)))
+(put 'helm-buffer-run-query-replace 'helm-only t)
(defun helm-buffer-switch-other-window ()
"Run switch to other window action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-switch-to-buffers-other-window)))
+(put 'helm-buffer-switch-other-window 'helm-only t)
(defun helm-buffer-switch-other-frame ()
"Run switch to other frame action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'switch-to-buffer-other-frame)))
+(put 'helm-buffer-switch-other-frame 'helm-only t)
(defun helm-buffer-switch-to-elscreen ()
"Run switch to elscreen action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-buffer-on-elscreen)))
+(put 'helm-buffer-switch-to-elscreen 'helm-only t)
(defun helm-buffer-run-ediff ()
"Run ediff action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ediff-marked-buffers)))
+(put 'helm-buffer-run-ediff 'helm-only t)
(defun helm-buffer-run-ediff-merge ()
"Run ediff action from `helm-source-buffers-list'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ediff-marked-buffers-merge)))
+(put 'helm-buffer-run-ediff-merge 'helm-only t)
(defun helm-buffers-persistent-kill-1 (buffer)
"Persistent action to kill buffer."
@@ -804,6 +821,7 @@ Can be used by any source that list buffers."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-multi-occur-as-action)))
+(put 'helm-buffers-run-multi-occur 'helm-only t)
(defun helm-buffers-toggle-show-hidden-buffers ()
(interactive)
@@ -822,6 +840,7 @@ Can be used by any source that list buffers."
filter-attrs))
helm-source-buffers-list t))
(helm-force-update))))
+(put 'helm-buffers-toggle-show-hidden-buffers 'helm-only t)
;;; Candidate Transformers
diff --git a/helm-color.el b/helm-color.el
index d87a55ce..4eadfa58 100644
--- a/helm-color.el
+++ b/helm-color.el
@@ -81,21 +81,25 @@
"Insert name of color from `helm-source-colors'"
(interactive)
(with-helm-alive-p (helm-exit-and-execute-action 'helm-color-insert-name)))
+(put 'helm-color-run-insert-name 'helm-only t)
(defun helm-color-run-kill-name ()
"Kill name of color from `helm-source-colors'"
(interactive)
(with-helm-alive-p (helm-exit-and-execute-action 'helm-color-kill-name)))
+(put 'helm-color-run-kill-name 'helm-only t)
(defun helm-color-run-insert-rgb ()
"Insert RGB of color from `helm-source-colors'"
(interactive)
(with-helm-alive-p (helm-exit-and-execute-action 'helm-color-insert-rgb)))
+(put 'helm-color-run-insert-rgb 'helm-only t)
(defun helm-color-run-kill-rgb ()
"Kill RGB of color from `helm-source-colors'"
(interactive)
(with-helm-alive-p (helm-exit-and-execute-action 'helm-color-kill-rgb)))
+(put 'helm-color-run-kill-rgb 'helm-only t)
(defvar helm-color-map
(let ((map (make-sparse-keymap)))
diff --git a/helm-command.el b/helm-command.el
index 8dacc4ae..9f794850 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -108,6 +108,7 @@ fuzzy matching is running its own sort function with a different algorithm."
for cand in candidates
for local-key = (car (rassq cand local-map))
for key = (substitute-command-keys (format "\\[%s]" cand))
+ unless (get (intern (if (consp cand) (car cand) cand)) 'helm-only)
collect
(cons (cond ((and (string-match "^M-x" key) local-key)
(format "%s (%s)"
diff --git a/helm-elisp-package.el b/helm-elisp-package.el
index 55d6b323..abbb5458 100644
--- a/helm-elisp-package.el
+++ b/helm-elisp-package.el
@@ -90,6 +90,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-visit-homepage)))
+(put 'helm-el-run-visit-homepage 'helm-only t)
(defun helm-el-package-install-1 (pkg-list)
(cl-loop with mkd = pkg-list
@@ -125,6 +126,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-install)))
+(put 'helm-el-run-package-install 'helm-only t)
(defun helm-el-package-uninstall-1 (pkg-list)
(cl-loop with mkd = pkg-list
@@ -173,6 +175,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-uninstall)))
+(put 'helm-el-run-package-uninstall 'helm-only t)
(defun helm-el-package-menu--find-upgrades ()
(cl-loop for entry in helm-el-package--tabulated-list
@@ -223,6 +226,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-upgrade)))
+(put 'helm-el-run-package-upgrade 'helm-only t)
(defun helm-el-package-upgrade-all ()
(if helm-el-package--upgrades
@@ -240,6 +244,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-upgrade-all-action)))
+(put 'helm-el-run-package-upgrade-all 'helm-only t)
(defun helm-el-package--transformer (candidates _source)
(cl-loop for c in candidates
@@ -272,24 +277,28 @@
(with-helm-alive-p
(setq helm-el-package--show-only 'upgrade)
(helm-update)))
+(put 'helm-el-package-show-upgrade 'helm-only t)
(defun helm-el-package-show-installed ()
(interactive)
(with-helm-alive-p
(setq helm-el-package--show-only 'installed)
(helm-update)))
+(put 'helm-el-package-show-installed 'helm-only t)
(defun helm-el-package-show-all ()
(interactive)
(with-helm-alive-p
(setq helm-el-package--show-only 'all)
(helm-update)))
+(put 'helm-el-package-show-all 'helm-only t)
(defun helm-el-package-show-uninstalled ()
(interactive)
(with-helm-alive-p
(setq helm-el-package--show-only 'uninstalled)
(helm-update)))
+(put 'helm-el-package-show-uninstalled 'helm-only t)
(defvar helm-el-package-map
(let ((map (make-sparse-keymap)))
@@ -355,6 +364,7 @@
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-el-package-reinstall)))
+(put 'helm-el-run-package-reinstall 'helm-only t)
;;;###autoload
(defun helm-list-elisp-packages (arg)
diff --git a/helm-files.el b/helm-files.el
index 3c1d3225..ff56dc08 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -990,6 +990,7 @@ This doesn't replace inside the files, only modify filenames."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-query-replace-on-marked)))
+(put 'helm-ff-run-query-replace-on-marked 'helm-only t)
(defun helm-ff-query-replace (_candidate)
(let ((bufs (cl-loop for f in (helm-marked-candidates)
@@ -1005,11 +1006,13 @@ This doesn't replace inside the files, only modify filenames."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-query-replace)))
+(put 'helm-ff-run-query-replace 'helm-only t)
(defun helm-ff-run-query-replace-regexp ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-query-replace-regexp)))
+(put 'helm-ff-run-query-replace-regexp 'helm-only t)
(defun helm-ff-toggle-auto-update (_candidate)
(setq helm-ff-auto-update-flag (not helm-ff-auto-update-flag))
@@ -1022,6 +1025,7 @@ This doesn't replace inside the files, only modify filenames."
(with-helm-alive-p
(helm-attrset 'toggle-auto-update '(helm-ff-toggle-auto-update . never-split))
(helm-execute-persistent-action 'toggle-auto-update)))
+(put 'helm-ff-run-toggle-auto-update 'helm-only t)
(defun helm-ff-delete-char-backward ()
"Disable helm find files auto update and delete char backward."
@@ -1042,59 +1046,69 @@ This doesn't replace inside the files, only modify filenames."
(with-helm-alive-p
(when (helm-file-completion-source-p)
(helm-exit-and-execute-action 'helm-find-files-switch-to-hist))))
+(put 'helm-ff-run-switch-to-history 'helm-only t)
(defun helm-ff-run-grep ()
"Run Grep action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-grep)))
+(put 'helm-ff-run-grep 'helm-only t)
(defun helm-ff-run-git-grep ()
"Run git-grep action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-git-grep)))
+(put 'helm-ff-run-git-grep 'helm-only t)
(defun helm-ff-run-grep-ag ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-ag)))
+(put 'helm-ff-run-grep-ag 'helm-only t)
(defun helm-ff-run-pdfgrep ()
"Run Pdfgrep action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-pdfgrep)))
+(put 'helm-ff-run-pdfgrep 'helm-only t)
(defun helm-ff-run-zgrep ()
"Run Grep action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-zgrep)))
+(put 'helm-ff-run-zgrep 'helm-only t)
(defun helm-ff-run-copy-file ()
"Run Copy file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-copy)))
+(put 'helm-ff-run-copy-file 'helm-only t)
(defun helm-ff-run-rename-file ()
"Run Rename file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-rename)))
+(put 'helm-ff-run-rename-file 'helm-only t)
(defun helm-ff-run-byte-compile-file ()
"Run Byte compile file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-byte-compile)))
+(put 'helm-ff-run-byte-compile-file 'helm-only t)
(defun helm-ff-run-load-file ()
"Run Load file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-load-files)))
+(put 'helm-ff-run-load-file 'helm-only t)
(defun helm-ff-run-eshell-command-on-file ()
"Run eshell command on file action from `helm-source-find-files'."
@@ -1102,12 +1116,14 @@ This doesn't replace inside the files, only modify filenames."
(with-helm-alive-p
(helm-exit-and-execute-action
'helm-find-files-eshell-command-on-file)))
+(put 'helm-ff-run-eshell-command-on-file 'helm-only t)
(defun helm-ff-run-ediff-file ()
"Run Ediff file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-ediff-files)))
+(put 'helm-ff-run-ediff-file 'helm-only t)
(defun helm-ff-run-ediff-merge-file ()
"Run Ediff merge file action from `helm-source-find-files'."
@@ -1115,24 +1131,28 @@ This doesn't replace inside the files, only modify filenames."
(with-helm-alive-p
(helm-exit-and-execute-action
'helm-find-files-ediff-merge-files)))
+(put 'helm-ff-run-ediff-merge-file 'helm-only t)
(defun helm-ff-run-symlink-file ()
"Run Symlink file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-symlink)))
+(put 'helm-ff-run-symlink-file 'helm-only t)
(defun helm-ff-run-hardlink-file ()
"Run Hardlink file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-hardlink)))
+(put 'helm-ff-run-hardlink-file 'helm-only t)
(defun helm-ff-run-delete-file ()
"Run Delete file action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-delete-marked-files)))
+(put 'helm-ff-run-delete-file 'helm-only t)
(defun helm-ff-run-complete-fn-at-point ()
"Run complete file name action from `helm-source-find-files'."
@@ -1140,36 +1160,42 @@ This doesn't replace inside the files, only modify filenames."
(with-helm-alive-p
(helm-exit-and-execute-action
'helm-insert-file-name-completion-at-point)))
+(put 'helm-ff-run-complete-fn-at-point 'helm-only t)
(defun helm-ff-run-switch-to-eshell ()
"Run switch to eshell action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-switch-to-eshell)))
+(put 'helm-ff-run-switch-to-eshell 'helm-only t)
(defun helm-ff-run-switch-other-window ()
"Run switch to other window action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-files-other-window)))
+(put 'helm-ff-run-switch-other-window 'helm-only t)
(defun helm-ff-run-switch-other-frame ()
"Run switch to other frame action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'find-file-other-frame)))
+(put 'helm-ff-run-switch-other-frame 'helm-only t)
(defun helm-ff-run-open-file-externally ()
"Run open file externally command action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-open-file-externally)))
+(put 'helm-ff-run-open-file-externally 'helm-only t)
(defun helm-ff-run-open-file-with-default-tool ()
"Run open file externally command action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-open-file-with-default-tool)))
+(put 'helm-ff-run-open-file-with-default-tool 'helm-only t)
(defun helm-ff-locate (candidate)
"Locate action function for `helm-find-files'."
@@ -1190,6 +1216,7 @@ This doesn't replace inside the files, only modify filenames."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-locate)))
+(put 'helm-ff-run-locate 'helm-only t)
(defun helm-files-insert-as-org-link (candidate)
(insert (format "[[%s][]]" candidate))
@@ -1199,28 +1226,33 @@ This doesn't replace inside the files, only modify filenames."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-files-insert-as-org-link)))
+(put 'helm-ff-run-insert-org-link 'helm-only t)
(defun helm-ff-run-find-file-as-root ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-find-file-as-root)))
+(put 'helm-ff-run-find-file-as-root 'helm-only t)
(defun helm-ff-run-find-alternate-file ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'find-alternate-file)))
+(put 'helm-ff-run-find-alternate-file 'helm-only t)
(defun helm-ff-run-gnus-attach-files ()
"Run gnus attach files command action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-gnus-attach-files)))
+(put 'helm-ff-run-gnus-attach-files 'helm-only t)
(defun helm-ff-run-etags ()
"Run Etags command action from `helm-source-find-files'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-etags-select)))
+(put 'helm-ff-run-etags 'helm-only t)
(defvar lpr-printer-switch)
(defun helm-ff-print (_candidate)
@@ -1278,6 +1310,7 @@ Same as `dired-do-print' but for helm."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-print)))
+(put 'helm-ff-run-print-file 'helm-only t)
(defun helm-ff-checksum (file)
"Calculate the checksum of FILE.
@@ -1304,6 +1337,7 @@ The checksum is copied to kill-ring."
(with-helm-alive-p
(unless (helm-empty-source-p)
(helm-ff-toggle-basename nil))))
+(put 'helm-ff-run-toggle-basename 'helm-only t)
(cl-defun helm-reduce-file-name (fname level &key unix-close expand)
"Reduce FNAME by LEVEL from end or beginning depending LEVEL value.
@@ -1367,6 +1401,7 @@ If prefix numeric arg is given go ARG level up."
(push new-pattern helm-find-files--level-tree)
(helm-set-pattern new-pattern helm-suspend-update-flag)
(with-helm-after-update-hook (helm-ff-retrieve-last-expanded))))))
+(put 'helm-find-files-up-one-level 'helm-only t)
(defun helm-find-files-down-last-level ()
"Retrieve previous paths reached by `C-l' in helm-find-files."
@@ -1381,6 +1416,7 @@ If prefix numeric arg is given go ARG level up."
(helm-aif (helm-iter-next helm-find-files--level-tree-iterator)
(helm-set-pattern it)
(setq helm-find-files--level-tree-iterator nil)))))
+(put 'helm-find-files-down-last-level 'helm-only t)
(defun helm-find-files--reset-level-tree ()
(setq helm-find-files--level-tree-iterator nil
@@ -1934,6 +1970,7 @@ Note that only existing directories are saved here."
(with-helm-alive-p
(helm-attrset 'properties-action '(helm-ff-properties . never-split))
(helm-execute-persistent-action 'properties-action)))
+(put 'helm-ff-properties-persistent 'helm-only t)
(defun helm-ff-persistent-delete ()
"Delete current candidate without quitting."
@@ -1941,6 +1978,7 @@ Note that only existing directories are saved here."
(with-helm-alive-p
(helm-attrset 'quick-delete '(helm-ff-quick-delete . never-split))
(helm-execute-persistent-action 'quick-delete)))
+(put 'helm-ff-persistent-delete 'helm-only t)
(defun helm-ff-dot-file-p (file)
"Check if FILE is `.' or `..'."
@@ -2008,6 +2046,7 @@ in `helm-find-files-persistent-action'."
(with-helm-alive-p
(helm-attrset 'kill-buffer-fname 'helm-ff-kill-buffer-fname)
(helm-execute-persistent-action 'kill-buffer-fname)))
+(put 'helm-ff-run-kill-buffer-persistent 'helm-only t)
(defun helm-ff-prefix-filename (fname &optional file-or-symlinkp new-file)
"Return filename FNAME maybe prefixed with [?] or [@].
@@ -2227,6 +2266,7 @@ This affect directly file CANDIDATE."
(with-helm-alive-p
(helm-attrset 'image-action1 'helm-ff-rotate-image-left)
(helm-execute-persistent-action 'image-action1)))
+(put 'helm-ff-rotate-left-persistent 'helm-only t)
(defun helm-ff-rotate-right-persistent ()
"Rotate image right without quitting helm."
@@ -2234,6 +2274,7 @@ This affect directly file CANDIDATE."
(with-helm-alive-p
(helm-attrset 'image-action2 'helm-ff-rotate-image-right)
(helm-execute-persistent-action 'image-action2)))
+(put 'helm-ff-rotate-right-persistent 'helm-only t)
(defun helm-ff-exif-data (candidate)
"Extract exif data from file CANDIDATE using `helm-ff-exif-data-program'."
@@ -2929,6 +2970,7 @@ Don't use it in your own code unless you know what you are doing.")
:buffer "*helm-file-name-history*"
:allow-nest t
:resume 'noresume)))
+(put 'helm-ff-file-name-history 'helm-only t)
;;; Recentf files
;;
@@ -3095,6 +3137,7 @@ See `helm-browse-project'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-browse-project)))
+(put 'helm-ff-run-browse-project 'helm-only t)
(defun helm-ff-gid (_candidate)
(with-helm-default-directory helm-ff-default-directory
@@ -3104,6 +3147,7 @@ See `helm-browse-project'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-gid)))
+(put 'helm-ff-run-gid 'helm-only t)
;;; session.el files
;;
@@ -3352,6 +3396,7 @@ separator."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-ff-find-sh-command)))
+(put 'helm-ff-run-find-sh-command 'helm-only t)
;;; Preconfigured commands
diff --git a/helm-font.el b/helm-font.el
index 732f6ff5..551cd7b8 100644
--- a/helm-font.el
+++ b/helm-font.el
@@ -120,24 +120,28 @@ Only math* symbols are collected."
(with-helm-alive-p
(helm-attrset 'action-insert 'helm-ucs-insert-char)
(helm-execute-persistent-action 'action-insert)))
+(put 'helm-ucs-persistent-insert 'helm-only t)
(defun helm-ucs-persistent-forward ()
(interactive)
(with-helm-alive-p
(helm-attrset 'action-forward 'helm-ucs-forward-char)
(helm-execute-persistent-action 'action-forward)))
+(put 'helm-ucs-persistent-forward 'helm-only t)
(defun helm-ucs-persistent-backward ()
(interactive)
(with-helm-alive-p
(helm-attrset 'action-back 'helm-ucs-backward-char)
(helm-execute-persistent-action 'action-back)))
+(put 'helm-ucs-persistent-backward 'helm-only t)
(defun helm-ucs-persistent-delete ()
(interactive)
(with-helm-alive-p
(helm-attrset 'action-delete 'helm-ucs-delete-backward)
(helm-execute-persistent-action 'action-delete)))
+(put 'helm-ucs-persistent-delete 'helm-only t)
(defvar helm-source-ucs
(helm-build-in-buffer-source "Ucs names"
diff --git a/helm-grep.el b/helm-grep.el
index a2134bd9..44a4f7f5 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -610,6 +610,7 @@ If N is positive go forward otherwise go backward."
(with-helm-alive-p
(with-helm-window
(helm-goto-next-or-prec-file -1))))
+(put 'helm-goto-precedent-file 'helm-only t)
;;;###autoload
(defun helm-goto-next-file ()
@@ -623,24 +624,28 @@ If N is positive go forward otherwise go backward."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-grep-action)))
+(put 'helm-grep-run-default-action 'helm-only t)
(defun helm-grep-run-other-window-action ()
"Run grep goto other window action from `helm-do-grep-1'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-grep-other-window)))
+(put 'helm-grep-run-other-window-action 'helm-only t)
(defun helm-grep-run-other-frame-action ()
"Run grep goto other frame action from `helm-do-grep-1'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-grep-other-frame)))
+(put 'helm-grep-run-other-frame-action 'helm-only t)
(defun helm-grep-run-save-buffer ()
"Run grep save results action from `helm-do-grep-1'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-grep-save-results)))
+(put 'helm-grep-run-save-buffer 'helm-only t)
;;; helm-grep-mode
diff --git a/helm-mode.el b/helm-mode.el
index d934bbe0..af994571 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -155,6 +155,7 @@ and all functions belonging in this list from `minibuffer-setup-hook'."
(helm-exit-and-execute-action
(lambda (_candidate)
(identity "")))))
+(put 'helm-cr-empty-string 'helm-only t)
(defun helm-mode--keyboard-quit ()
;; Use this instead of `keyboard-quit'
diff --git a/helm-regexp.el b/helm-regexp.el
index e8a7f2d9..793144d3 100644
--- a/helm-regexp.el
+++ b/helm-regexp.el
@@ -288,17 +288,20 @@ Same as `helm-moccur-goto-line' but go in new frame."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-moccur-goto-line-ow)))
+(put 'helm-moccur-run-goto-line-ow 'helm-only t)
(defun helm-moccur-run-goto-line-of ()
"Run goto line new frame action from `helm-source-moccur'."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-moccur-goto-line-of)))
+(put 'helm-moccur-run-goto-line-of 'helm-only t)
(defun helm-moccur-run-default-action ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-moccur-goto-line)))
+(put 'helm-moccur-run-default-action 'helm-only t)
(defvar helm-source-moccur nil)
(defclass helm-source-multi-occur (helm-source-in-buffer)
@@ -414,6 +417,7 @@ Same as `helm-moccur-goto-line' but go in new frame."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-moccur-save-results)))
+(put 'helm-moccur-run-save-buffer 'helm-only t)
;;; helm-moccur-mode
diff --git a/helm-tags.el b/helm-tags.el
index fb5c2adf..eb61aedd 100644
--- a/helm-tags.el
+++ b/helm-tags.el
@@ -82,6 +82,7 @@ one match."
(helm-exit-and-execute-action
(lambda (c)
(helm-etags-action-goto 'find-file-other-window c)))))
+(put 'helm-etags-run-switch-other-window 'helm-only t)
(defun helm-etags-run-switch-other-frame ()
"Run switch to other frame action from `helm-source-etags-select'."
@@ -90,6 +91,7 @@ one match."
(helm-exit-and-execute-action
(lambda (c)
(helm-etags-action-goto 'find-file-other-frame c)))))
+(put 'helm-etags-run-switch-other-frame 'helm-only t)
(defvar helm-etags-map
(let ((map (make-sparse-keymap)))
diff --git a/helm.el b/helm.el
index 149433a9..f4ddf4fa 100644
--- a/helm.el
+++ b/helm.el
@@ -101,6 +101,7 @@ Run each function of FUNCTIONS list in turn when called within DELAY seconds."
First call run `helm-toggle-resplit-window',
second call within 0.5s run `helm-swap-windows'."
'(helm-toggle-resplit-window helm-swap-windows) 1)
+(put 'helm-toggle-resplit-and-swap-windows 'helm-only t)
;;;###autoload
(defun helm-define-key-with-subkeys (map key subkey command
@@ -2007,16 +2008,18 @@ Called from lisp, you can specify a buffer-name as a string with ARG."
(defun helm-resume-previous-session-after-quit (arg)
"Resume previous helm session within running helm."
(interactive "p")
- (if (and helm-alive-p (> (length helm-buffers) arg))
- (helm-run-after-exit `(lambda () (helm-resume (nth ,arg helm-buffers))))
- (message "No previous helm sessions to resume yet!")))
+ (with-helm-alive-p
+ (if (> (length helm-buffers) arg)
+ (helm-run-after-exit `(lambda () (helm-resume (nth ,arg helm-buffers))))
+ (message "No previous helm sessions to resume yet!"))))
(defun helm-resume-list-buffers-after-quit ()
"List resumable helm buffers within running helm."
(interactive)
- (if (and helm-alive-p (> (length helm-buffers) 0))
- (helm-run-after-exit (lambda () (helm-resume t)))
- (message "No previous helm sessions to resume yet!")))
+ (with-helm-alive-p
+ (if (> (length helm-buffers) 0)
+ (helm-run-after-exit (lambda () (helm-resume t)))
+ (message "No previous helm sessions to resume yet!"))))
(defun helm-resume-p (any-resume)
"Whether current helm session is resumed or not."
@@ -2558,12 +2561,14 @@ This function is handling `helm-execute-action-at-once-if-one' and
"Enable or disable update of display in helm.
This can be useful for e.g writing quietly a complex regexp."
(interactive)
- (when (setq helm-suspend-update-flag (not helm-suspend-update-flag))
- (helm-kill-async-processes)
- (setq helm-pattern ""))
- (message (if helm-suspend-update-flag
- "Helm update suspended!"
- "Helm update reenabled!")))
+ (with-helm-alive-p
+ (when (setq helm-suspend-update-flag (not helm-suspend-update-flag))
+ (helm-kill-async-processes)
+ (setq helm-pattern ""))
+ (message (if helm-suspend-update-flag
+ "Helm update suspended!"
+ "Helm update reenabled!"))))
+(put 'helm-toggle-suspend-update 'helm-only t)
(defadvice tramp-read-passwd (around disable-helm-update)
;; Suspend update when prompting for a tramp password.
@@ -3457,6 +3462,7 @@ if specified."
(interactive)
(with-helm-alive-p
(helm-force-update)))
+(put 'helm-refresh 'helm-only t)
(defun helm-force-update--reinit (source)
"Reinit SOURCE by calling his update and/or init functions."
@@ -4320,9 +4326,11 @@ to a list of forms.\n\n")
(defun helm-debug-toggle ()
"Enable/disable helm debug from outside of helm session."
(interactive)
- (setq helm-debug (not helm-debug))
- (message "Helm Debug is now %s"
- (if helm-debug "Enabled" "Disabled")))
+ (with-helm-alive-p
+ (setq helm-debug (not helm-debug))
+ (message "Helm Debug is now %s"
+ (if helm-debug "Enabled" "Disabled"))))
+(put 'helm-debug-toggle 'helm-only t)
(defun helm-enable-or-switch-to-debug ()
"First hit enable helm debugging, second hit switch to debug buffer."
@@ -4333,6 +4341,7 @@ to a list of forms.\n\n")
#'helm-debug-open-last-log)
(setq helm-debug t)
(message "Debugging enabled"))))
+(put 'helm-enable-or-switch-to-debug 'helm-only t)
;; Core: misc
@@ -4855,37 +4864,39 @@ Returns the resulting buffer."
(defun helm-toggle-resplit-window ()
"Toggle resplit helm window, vertically or horizontally."
(interactive)
- (when helm-prevent-escaping-from-minibuffer
- (helm-prevent-switching-other-window :enabled nil))
- (unwind-protect
- (with-helm-window
- (if (or helm-full-frame (one-window-p t))
- (message "Error: Attempt to resplit a single window")
- (let ((before-height (window-height)))
- (delete-window)
- (set-window-buffer
- (select-window
- (if (= (window-height) before-height) ; initial split was horizontal.
- ;; Split window vertically with `helm-buffer' placed
- ;; on the good side according to actual value of
- ;; `helm-split-window-default-side'.
- (prog1
- (cond ((or (eq helm-split-window-default-side 'above)
- (eq helm-split-window-default-side 'left))
- (split-window
- (selected-window) nil 'above))
- (t (split-window-vertically)))
- (setq helm-split-window-state 'vertical))
- ;; Split window vertically, same comment as above.
- (setq helm-split-window-state 'horizontal)
- (cond ((or (eq helm-split-window-default-side 'left)
- (eq helm-split-window-default-side 'above))
- (split-window (selected-window) nil 'left))
- (t (split-window-horizontally)))))
- helm-buffer)))
- (setq helm--window-side-state (helm--get-window-side-state)))
+ (with-helm-alive-p
(when helm-prevent-escaping-from-minibuffer
- (helm-prevent-switching-other-window :enabled t))))
+ (helm-prevent-switching-other-window :enabled nil))
+ (unwind-protect
+ (with-helm-window
+ (if (or helm-full-frame (one-window-p t))
+ (message "Error: Attempt to resplit a single window")
+ (let ((before-height (window-height)))
+ (delete-window)
+ (set-window-buffer
+ (select-window
+ (if (= (window-height) before-height) ; initial split was horizontal.
+ ;; Split window vertically with `helm-buffer' placed
+ ;; on the good side according to actual value of
+ ;; `helm-split-window-default-side'.
+ (prog1
+ (cond ((or (eq helm-split-window-default-side 'above)
+ (eq helm-split-window-default-side 'left))
+ (split-window
+ (selected-window) nil 'above))
+ (t (split-window-vertically)))
+ (setq helm-split-window-state 'vertical))
+ ;; Split window vertically, same comment as above.
+ (setq helm-split-window-state 'horizontal)
+ (cond ((or (eq helm-split-window-default-side 'left)
+ (eq helm-split-window-default-side 'above))
+ (split-window (selected-window) nil 'left))
+ (t (split-window-horizontally)))))
+ helm-buffer)))
+ (setq helm--window-side-state (helm--get-window-side-state)))
+ (when helm-prevent-escaping-from-minibuffer
+ (helm-prevent-switching-other-window :enabled t)))))
+(put 'helm-toggle-resplit-window 'helm-only t)
;; Utility: Resize helm window.
(defun helm-enlarge-window-1 (n)
@@ -4909,43 +4920,45 @@ If N is positive enlarge, if negative narrow."
(defun helm-swap-windows ()
"Swap window holding `helm-buffer' with other window."
(interactive)
- (if (and helm-full-frame (one-window-p t))
- (error "Error: Can't swap windows in a single window")
- (let* ((w1 (helm-window))
- (split-state (eq helm-split-window-state 'horizontal))
- (w1size (window-total-size w1 split-state))
- (b1 (window-buffer w1)) ; helm-buffer
- (s1 (window-start w1))
- (cur-frame (window-frame w1))
- (w2 (with-selected-window (helm-window)
- ;; Don't try to display helm-buffer
- ;; in a dedicated window.
- (get-window-with-predicate
- (lambda (w) (not (window-dedicated-p w)))
- 1 cur-frame)))
- (w2size (window-total-size w2 split-state))
- (b2 (window-buffer w2)) ; probably helm-current-buffer
- (s2 (window-start w2))
- resize)
- (with-selected-frame (window-frame w1)
- (helm-replace-buffer-in-window w1 b1 b2)
- (helm-replace-buffer-in-window w2 b2 b1)
- (setq resize
- (cond ( ;; helm-window is smaller than other window.
- (< w1size w2size)
- (- (- (max w2size w1size)
- (min w2size w1size))))
- ( ;; helm-window is larger than other window.
- (> w1size w2size)
- (- (max w2size w1size)
- (min w2size w1size)))
- ( ;; windows have probably same size.
- t nil)))
- ;; Maybe resize the window holding helm-buffer.
- (and resize (window-resize w2 resize split-state))
- (set-window-start w1 s2 t)
- (set-window-start w2 s1 t))
- (setq helm--window-side-state (helm--get-window-side-state)))))
+ (with-helm-alive-p
+ (if (and helm-full-frame (one-window-p t))
+ (error "Error: Can't swap windows in a single window")
+ (let* ((w1 (helm-window))
+ (split-state (eq helm-split-window-state 'horizontal))
+ (w1size (window-total-size w1 split-state))
+ (b1 (window-buffer w1)) ; helm-buffer
+ (s1 (window-start w1))
+ (cur-frame (window-frame w1))
+ (w2 (with-selected-window (helm-window)
+ ;; Don't try to display helm-buffer
+ ;; in a dedicated window.
+ (get-window-with-predicate
+ (lambda (w) (not (window-dedicated-p w)))
+ 1 cur-frame)))
+ (w2size (window-total-size w2 split-state))
+ (b2 (window-buffer w2)) ; probably helm-current-buffer
+ (s2 (window-start w2))
+ resize)
+ (with-selected-frame (window-frame w1)
+ (helm-replace-buffer-in-window w1 b1 b2)
+ (helm-replace-buffer-in-window w2 b2 b1)
+ (setq resize
+ (cond ( ;; helm-window is smaller than other window.
+ (< w1size w2size)
+ (- (- (max w2size w1size)
+ (min w2size w1size))))
+ ( ;; helm-window is larger than other window.
+ (> w1size w2size)
+ (- (max w2size w1size)
+ (min w2size w1size)))
+ ( ;; windows have probably same size.
+ t nil)))
+ ;; Maybe resize the window holding helm-buffer.
+ (and resize (window-resize w2 resize split-state))
+ (set-window-start w1 s2 t)
+ (set-window-start w2 s1 t))
+ (setq helm--window-side-state (helm--get-window-side-state))))))
+(put 'helm-swap-windows 'helm-only t)
(defun helm--get-window-side-state ()
"Return the position of `helm-window' from `helm-current-buffer'.
@@ -5184,16 +5197,18 @@ Argument ACTION if present will be used as second argument of `display-buffer'."
(defun helm-toggle-visible-mark ()
"Toggle helm visible mark at point."
(interactive)
- (with-helm-window
- (let ((nomark (assq 'nomark (helm-get-current-source))))
- (if nomark
- (message "Marking not allowed in this source")
- (helm-aif (helm-this-visible-mark)
- (helm-delete-visible-mark it)
- (helm-make-visible-mark))
- (if (helm-end-of-source-p)
- (helm-display-mode-line (helm-get-current-source))
- (helm-next-line))))))
+ (with-helm-alive-p
+ (with-helm-window
+ (let ((nomark (assq 'nomark (helm-get-current-source))))
+ (if nomark
+ (message "Marking not allowed in this source")
+ (helm-aif (helm-this-visible-mark)
+ (helm-delete-visible-mark it)
+ (helm-make-visible-mark))
+ (if (helm-end-of-source-p)
+ (helm-display-mode-line (helm-get-current-source))
+ (helm-next-line)))))))
+(put 'helm-toggle-visible-mark 'helm-only t)
(defun helm-file-completion-source-p ()
"Return non--nil if current source is a file completion source."
@@ -5535,6 +5550,7 @@ It may appear after first results popup in helm buffer."))
(insert "\n\n"
(substitute-command-keys
(helm-interpret-value helm-help-message))))))))
+(put 'helm-help 'helm-only t)
(defun helm-toggle-truncate-line ()
"Toggle `truncate-lines' value in `helm-buffer'"
@@ -5543,6 +5559,7 @@ It may appear after first results popup in helm buffer."))
(with-helm-buffer
(setq truncate-lines (not truncate-lines))
(helm-update (regexp-quote (helm-get-selection nil t))))))
+(put 'helm-toggle-truncate-line 'helm-only t)
(provide 'helm)