diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-05-06 05:59:52 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-05-06 05:59:52 +0200 |
commit | b808850fc04d6caa8791a4b6d939f214abc8ba57 (patch) | |
tree | bbce5329e3a71992817b08969ea8a4e13233fb66 /emacs-helm.sh | |
parent | 5169de7484ee861a3ba0edd5b8160cf1eec9710b (diff) |
* emacs-helm.sh: Check is temp file still exists before deleting (#504).
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-x | emacs-helm.sh | 2 |
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 $@ |