fix(emacs): project relative path: return nil when not in project
All checks were successful
build / build (push) Successful in 2m52s
All checks were successful
build / build (push) Successful in 2m52s
This commit is contained in:
@@ -202,7 +202,8 @@ form."
|
|||||||
s))))
|
s))))
|
||||||
|
|
||||||
(defun syd-project-relative-file-name (file-name)
|
(defun syd-project-relative-file-name (file-name)
|
||||||
(file-relative-name file-name (project-root (project-current))))
|
(when-let* ((proj (project-current)))
|
||||||
|
(file-relative-name file-name (project-root proj))))
|
||||||
|
|
||||||
(defvar syd-insert-file-name-alist
|
(defvar syd-insert-file-name-alist
|
||||||
`((,#'syd-project-relative-file-name . "Project-relative")
|
`((,#'syd-project-relative-file-name . "Project-relative")
|
||||||
|
|||||||
Reference in New Issue
Block a user