[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: emacs: Enable 'guix-build-log-mode' for build log files.
From: |
Alex Kost |
Subject: |
02/04: emacs: Enable 'guix-build-log-mode' for build log files. |
Date: |
Mon, 02 Nov 2015 13:00:57 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit 0048552d0de1582f016535078274be3cd4c66057
Author: Alex Kost <address@hidden>
Date: Thu Oct 29 20:48:53 2015 +0300
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'.
---
emacs/guix-build-log.el | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index c209100..c649468 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