Skip to content

Commit

Permalink
feat: `safe-local-variable' property for bib data variables
Browse files Browse the repository at this point in the history
Set the `safe-local-variable' property to a predicate which returns
non-nil only for a list only of strings (or an empty list) for
`citar-bibliography', `citar-library-paths' and `citar-notes-paths'.
  • Loading branch information
Hugo-Heagren committed Apr 28, 2024
1 parent 07d2a63 commit 3cc5e0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions citar.el
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ buffer.")
(defcustom citar-bibliography nil
"A list of bibliography files."
:group 'citar
:safe (lambda (val) (seq-every-p #'stringp val))
:type '(repeat file))

(defcustom citar-library-paths nil
"A list of files paths for related PDFs, etc."
:group 'citar
:safe (lambda (val) (seq-every-p #'stringp val))
:type '(repeat directory))

(defcustom citar-library-file-extensions nil
Expand All @@ -104,6 +106,7 @@ When nil, the function will not filter the list of files."
(defcustom citar-notes-paths nil
"A list of file paths for bibliographic notes."
:group 'citar
:safe (lambda (val) (seq-every-p #'stringp val))
:type '(repeat directory))

(defcustom citar-crossref-variable "crossref"
Expand Down

0 comments on commit 3cc5e0c

Please sign in to comment.