feat(emacs): add concrete grade-prev
interactive function
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
405b26b256
commit
dc4bcb4d5f
1 changed files with 7 additions and 1 deletions
|
@ -222,11 +222,17 @@
|
|||
(find-file target-filepath)
|
||||
(message (format "next grading file doesn't exist!")))))))
|
||||
|
||||
(defun grade-prev (&optional dec)
|
||||
"Go to the previous homework by DEC to grade."
|
||||
(interactive)
|
||||
(let ((dec (or dec 1)))
|
||||
(grade-next (- dec))))
|
||||
|
||||
(defun grade-start (&optional start)
|
||||
"Start grading in the current directory with homework START."
|
||||
(interactive)
|
||||
(keymap-global-set "C-c f" #'grade-next)
|
||||
(keymap-global-set "C-c b" (lambda () (interactive) (grade-next -1)))
|
||||
(keymap-global-set "C-c b" #'grade-prev)
|
||||
|
||||
(let* ((start (or start 1))
|
||||
(dir (if (eq major-mode 'dired-mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue