summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-08-12 18:12:05 +0200
committerGuido Günther <agx@sigxcpu.org>2015-08-12 18:17:08 +0200
commit200d437c93536d911da85e080188fc68a5221122 (patch)
tree330e5faaba0a297468a074f88eaa3b8ac62a6cf6
Initial commit
-rw-r--r--cvelist.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/cvelist.el b/cvelist.el
new file mode 100644
index 0000000..3eb4bac
--- /dev/null
+++ b/cvelist.el
@@ -0,0 +1,24 @@
+;; Major mode for Debian's CVE list
+;; currently only does some syntax highlighting
+;;
+;; Can be enabled via
+;;
+;; (autoload 'debian-cvelist-mode "cvelist.el"
+;; "Major mode for debian CVE lists" t)
+;; (setq auto-mode-alist
+;; (cons '("list" . debian-cvelist-mode) auto-mode-alist))
+
+
+(setq debian-cvelist-highlights
+ '(("^CVE-[0-9]\\{4\\}-[0-9X]\\{4\\}" . font-lock-function-name-face)
+ ("^\tNOTE:" . font-lock-comment-delimiter-face)
+ ("^\tTODO:" . font-lock-warning-face)
+ ("^\t\\(RESERVED\\|NOT-FOR-US\\|REJECTED\\)" . font-lock-keyword-face)
+ ("^CVE-[0-9]\\{4\\}-[0-9X]\\{4\\}" "\\[\\(.*\\)\\]$" nil nil (1 font-lock-variable-name-face))
+ ("\\<unfixed\\|undetermined\\>" . font-lock-warning-face)
+ ("\\<end-of-life\\|not-affected\\|no-dsa\\>" . font-lock-constant-face)
+ ))
+
+(define-derived-mode debian-cvelist-mode fundamental-mode
+ (setq font-lock-defaults '(debian-cvelist-highlights))
+ (setq mode-name "debian cvelist"))