Fix void macro errors after byte-compiling
This commit is contained in:
parent
1320d83834
commit
9a2c4f297c
2 changed files with 14 additions and 12 deletions
|
@ -206,15 +206,16 @@ unfold to point on startup."
|
|||
(unless (file-remote-p path)
|
||||
(if (file-exists-p path) 'org-link 'error))))
|
||||
|
||||
(defmacro def-org-file-link! (key dir)
|
||||
`(org-link-set-parameters
|
||||
,key
|
||||
:complete (lambda () (+org--relpath (+org-link-read-file ,key ,dir) ,dir))
|
||||
:follow (lambda (link) (find-file (expand-file-name link ,dir)))
|
||||
:face (lambda (link)
|
||||
(if (file-exists-p (expand-file-name link ,dir))
|
||||
'org-link
|
||||
'error))))
|
||||
(eval-when-compile
|
||||
(defmacro def-org-file-link! (key dir)
|
||||
`(org-link-set-parameters
|
||||
,key
|
||||
:complete (lambda () (+org--relpath (+org-link-read-file ,key ,dir) ,dir))
|
||||
:follow (lambda (link) (find-file (expand-file-name link ,dir)))
|
||||
:face (lambda (link)
|
||||
(if (file-exists-p (expand-file-name link ,dir))
|
||||
'org-link
|
||||
'error)))))
|
||||
|
||||
(def-org-file-link! "org" +org-dir)
|
||||
(def-org-file-link! "doom" doom-emacs-dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue