summaryrefslogtreecommitdiff
path: root/emacs/guix-utils.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-11-10 15:29:04 +0300
committerAlex Kost <alezost@gmail.com>2014-11-10 16:13:41 +0300
commite718f6cc8fcfaddc730423b7fe4acbd4b85101f8 (patch)
tree81730d83ec935be27671a1b14cd11d5c6061551b /emacs/guix-utils.el
parent7be25d4af08226ab684e69d4f5b694910d81e452 (diff)
downloadpatches-e718f6cc8fcfaddc730423b7fe4acbd4b85101f8.tar
patches-e718f6cc8fcfaddc730423b7fe4acbd4b85101f8.tar.gz
emacs: Add 'guix-find-file'.
* emacs/guix-utils.el (guix-find-file): New procedure. * emacs/guix-info.el (guix-file): Use it.
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r--emacs/guix-utils.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index 77ccb67532..823c646610 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -154,6 +154,12 @@ accessed with KEYS."
(dolist (key keys val)
(setq val (cdr (assq key val))))))
+(defun guix-find-file (file)
+ "Find FILE if it exists."
+ (if (file-exists-p file)
+ (find-file file)
+ (message "File '%s' does not exist." file)))
+
;;; Diff