summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-10-29 20:48:53 +0300
committerAlex Kost <alezost@gmail.com>2015-11-02 15:52:52 +0300
commit0048552d0de1582f016535078274be3cd4c66057 (patch)
treeb3cb4e062e6f280a3a28dc0326f051dd5458e159 /emacs
parent6407ce8ea1b67024e50273b7d6a1773a16a42322 (diff)
emacs: Enable 'guix-build-log-mode' for build log files.
* emacs/guix-build-log.el (auto-mode-alist): Add 'guix-build-log-mode' to 'auto-mode-alist'.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/guix-build-log.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index c209100ffd..c64946846e 100644
--- a/emacs/guix-build-log.el
+++ b/emacs/guix-build-log.el
@@ -346,6 +346,13 @@ programmatically using hooks:
(when font-lock-mode
(font-lock-fontify-buffer)))
+;;;###autoload
+(add-to-list 'auto-mode-alist
+ ;; Regexp for log files (usually placed in /var/log/guix/...)
+ (cons (rx "/guix/drvs/" (= 2 alnum) "/" (= 30 alnum)
+ "-" (+ (any alnum "-+.")) ".drv" string-end)
+ 'guix-build-log-mode))
+
(provide 'guix-build-log)
;;; guix-build-log.el ends here