summaryrefslogtreecommitdiff
path: root/helm-external.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-04-18 16:24:21 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-04-18 16:24:21 +0200
commit1592c28fc45c305ecc36d94a2e6f9e7baeb93615 (patch)
tree116e4ff2a13652bd8c5fc79358cd7368641faa48 /helm-external.el
parent2840076ce71fc641726a4661e358e00b55ce77a1 (diff)
Reindent all files.
Diffstat (limited to 'helm-external.el')
-rw-r--r--helm-external.el72
1 files changed, 36 insertions, 36 deletions
diff --git a/helm-external.el b/helm-external.el
index 6d0eda36..69379a6c 100644
--- a/helm-external.el
+++ b/helm-external.el
@@ -66,17 +66,17 @@ and sets `helm-external-commands-list'."
it
(setq helm-external-commands-list
(cl-loop
- for dir in (split-string (getenv "PATH") path-separator)
- when (and (file-exists-p dir) (file-accessible-directory-p dir))
- for lsdir = (cl-loop for i in (directory-files dir t)
- for bn = (file-name-nondirectory i)
- when (and (not (member bn completions))
- (not (file-directory-p i))
- (file-executable-p i))
- collect bn)
- append lsdir into completions
- finally return
- (if sort (sort completions 'string-lessp) completions)))))
+ for dir in (split-string (getenv "PATH") path-separator)
+ when (and (file-exists-p dir) (file-accessible-directory-p dir))
+ for lsdir = (cl-loop for i in (directory-files dir t)
+ for bn = (file-name-nondirectory i)
+ when (and (not (member bn completions))
+ (not (file-directory-p i))
+ (file-executable-p i))
+ collect bn)
+ append lsdir into completions
+ finally return
+ (if sort (sort completions 'string-lessp) completions)))))
(defun helm-run-or-raise (exe &optional file)
"Generic command that run asynchronously EXE.
@@ -91,27 +91,27 @@ In this case EXE must be provided as \"EXE %s\"."
(if (get-process proc)
(if helm-raise-command
(shell-command (format helm-raise-command real-com))
- (error "Error: %s is already running" real-com))
- (when (cl-loop for i in helm-external-commands-list thereis (string= real-com i))
- (message "Starting %s..." real-com)
- (if file
- (start-process-shell-command
- proc nil (format exe (shell-quote-argument
- (if (eq system-type 'windows-nt)
- (helm-w32-prepare-filename file)
- file))))
- (start-process-shell-command proc nil real-com))
- (set-process-sentinel
- (get-process proc)
- #'(lambda (process event)
- (when (and (string= event "finished\n")
- helm-raise-command
- (not (helm-get-pid-from-process-name real-com)))
- (shell-command (format helm-raise-command "emacs")))
- (message "%s process...Finished." process))))
- (setq helm-external-commands-list
- (cons real-com
- (delete real-com helm-external-commands-list))))))
+ (error "Error: %s is already running" real-com))
+ (when (cl-loop for i in helm-external-commands-list thereis (string= real-com i))
+ (message "Starting %s..." real-com)
+ (if file
+ (start-process-shell-command
+ proc nil (format exe (shell-quote-argument
+ (if (eq system-type 'windows-nt)
+ (helm-w32-prepare-filename file)
+ file))))
+ (start-process-shell-command proc nil real-com))
+ (set-process-sentinel
+ (get-process proc)
+ #'(lambda (process event)
+ (when (and (string= event "finished\n")
+ helm-raise-command
+ (not (helm-get-pid-from-process-name real-com)))
+ (shell-command (format helm-raise-command "emacs")))
+ (message "%s process...Finished." process))))
+ (setq helm-external-commands-list
+ (cons real-com
+ (delete real-com helm-external-commands-list))))))
(defun helm-get-mailcap-for-file (filename)
"Get the command to use for FILENAME from mailcap files.
@@ -155,8 +155,8 @@ If not found or a prefix arg is given query the user which tool to use."
:history helm-external-command-history)
;; Always prompt to set this program as default.
(setq def-prog nil))
- ;; No prefix arg or default program exists.
- (replace-regexp-in-string " %s\\| '%s'" "" def-prog)))
+ ;; No prefix arg or default program exists.
+ (replace-regexp-in-string " %s\\| '%s'" "" def-prog)))
(program (concat real-prog-name " %s")))
(unless (or def-prog ; Association exists, no need to record it.
;; Don't try to record non--filenames associations (e.g urls).
@@ -181,7 +181,7 @@ If not found or a prefix arg is given query the user which tool to use."
(cons real-prog-name
(delete real-prog-name
(cl-loop for i in helm-external-command-history
- when (executable-find i) collect i))))))
+ when (executable-find i) collect i))))))
;;;###autoload
(defun helm-run-external-command (program)
@@ -201,7 +201,7 @@ You can set your own list of commands with
(setq helm-external-command-history
(cons program (delete program
(cl-loop for i in helm-external-command-history
- when (executable-find i) collect i)))))
+ when (executable-find i) collect i)))))
(provide 'helm-external)