From 0a80525f3452446a3ff9b7785b33150f98f0e864 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Thu, 1 Jul 2021 14:28:49 +0200 Subject: cvelist.el: new defun to add a bug reference --- conf/cvelist.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'conf') diff --git a/conf/cvelist.el b/conf/cvelist.el index 901d4e0fb6..d8155789eb 100644 --- a/conf/cvelist.el +++ b/conf/cvelist.el @@ -16,6 +16,7 @@ ;;; (cons '("list" . debian-cvelist-mode) auto-mode-alist)) (setq last-nfu "") +(setq bugnum "") ; TODO: Tab completion for existing NFUs (defun debian-cvelist-insert-not-for-us () @@ -31,6 +32,13 @@ (interactive) (insert "\tNOTE: ")) +(defun debian-cvelist-insert-bug () + "Add bugnumber to end of line." + (setq bugnum (read-string "Bug number (without #): " bugnum)) + (interactive) + (end-of-line) + (insert " (bug #" bugnum ")" )) + ; TODO: Read supported distros from central config and prompt for applicable suites (defun debian-cvelist-insert-nodsa () "Insert no-dsa comment based on the current source entry." @@ -74,6 +82,7 @@ (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) + (define-key map (kbd "C-c C-b") 'debian-cvelist-insert-bug) map) "Keymap for `debian-cvelist-mode'.") -- cgit v1.2.3