about summary refs log tree commit diff
path: root/tools/emacs/config/functions.el
diff options
context:
space:
mode:
Diffstat (limited to 'tools/emacs/config/functions.el')
-rw-r--r--tools/emacs/config/functions.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/emacs/config/functions.el b/tools/emacs/config/functions.el
index e50950a8ef9e..6024ce34cb83 100644
--- a/tools/emacs/config/functions.el
+++ b/tools/emacs/config/functions.el
@@ -230,4 +230,16 @@ Including indent-buffer, which should not be called automatically on save."
                     (goto-char start)
                     (insert memed))))
 
+(defun insert-todo-comment (prefix todo)
+  "Insert a comment at point with something for me to do."
+
+  (interactive "P\nsWhat needs doing? ")
+  (save-excursion
+    (move-end-of-line nil)
+    (insert (format " %s TODO(%s): %s"
+                    comment-start
+                    (if prefix (read-string "Who needs to do this? ")
+                      (getenv "USER"))
+                    todo))))
+
 (provide 'functions)