fix(emacs): resolve bug when in dired window
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
dc4bcb4d5f
commit
a5632b9dc4
1 changed files with 3 additions and 1 deletions
|
@ -189,7 +189,9 @@
|
||||||
|
|
||||||
(defun grade-file-format (num)
|
(defun grade-file-format (num)
|
||||||
"Format NUM to a file in the grading directory."
|
"Format NUM to a file in the grading directory."
|
||||||
(let* ((dir (file-name-directory (buffer-file-name)))
|
(let* ((dir (if (eq 'dired-mode major-mode)
|
||||||
|
(dired-current-directory)
|
||||||
|
(file-name-directory (buffer-file-name))))
|
||||||
(dir-files (directory-files dir))
|
(dir-files (directory-files dir))
|
||||||
(extension ".rkt")
|
(extension ".rkt")
|
||||||
(all-rkt-files (-filter (lambda (f) (string= (file-name-extension f) "rkt"))
|
(all-rkt-files (-filter (lambda (f) (string= (file-name-extension f) "rkt"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue