From befcdf4422b6adce9a5c4aeaab83782ee37193f0 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Tue, 20 Apr 2021 09:22:11 +0200 Subject: cvelist.el: new defun to add --- conf/cvelist.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'conf') diff --git a/conf/cvelist.el b/conf/cvelist.el index f2d7e74710..901d4e0fb6 100644 --- a/conf/cvelist.el +++ b/conf/cvelist.el @@ -41,6 +41,16 @@ (beginning-of-line) (insert (concat "\t[buster] - " srcpkg " (" reason ")\n" ))) +; TODO: Read supported distros from central config and prompt for applicable suites +(defun debian-cvelist-insert-not-affected () + "Insert not-affected comment based on the current source entry." + (interactive) + (setq reason (read-string "Reason for not-affected: " "Vulnerable code not present")) + (setq srcpkg (thing-at-point 'filename)) + (next-line) + (beginning-of-line) + (insert (concat "\t[buster] - " srcpkg " (" reason ")\n" ))) + ; TODO: Parse existing source entries for buffer tab completion (defun debian-cvelist-insert-srcentry () "Insert new source package entry." @@ -63,6 +73,7 @@ (define-key map (kbd "C-c C-c") 'debian-cvelist-cvesearch) (define-key map (kbd "C-c C-l") 'debian-cvelist-insert-nodsa) (define-key map (kbd "C-c C-a") 'debian-cvelist-insert-srcentry) + (define-key map (kbd "C-c C-x") 'debian-cvelist-insert-not-affected) map) "Keymap for `debian-cvelist-mode'.") -- cgit v1.2.3