summaryrefslogtreecommitdiff
path: root/emacs-helm.sh
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-05-06 05:59:52 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-05-06 05:59:52 +0200
commitb808850fc04d6caa8791a4b6d939f214abc8ba57 (patch)
treebbce5329e3a71992817b08969ea8a4e13233fb66 /emacs-helm.sh
parent5169de7484ee861a3ba0edd5b8160cf1eec9710b (diff)
* emacs-helm.sh: Check is temp file still exists before deleting (#504).
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-xemacs-helm.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/emacs-helm.sh b/emacs-helm.sh
index f9a7a971..3bfc6d66 100755
--- a/emacs-helm.sh
+++ b/emacs-helm.sh
@@ -72,7 +72,7 @@ cat > $TMP <<EOF
(unless (boundp 'completion-in-region-function)
(define-key lisp-interaction-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point)
(define-key emacs-lisp-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point))
-(add-hook 'kill-emacs-hook #'(lambda () (delete-file "$TMP")))
+(add-hook 'kill-emacs-hook #'(lambda () (and (file-exists-p "$TMP") (delete-file "$TMP"))))
EOF
$EMACS -Q -l $TMP $@