[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote a8c286577c: Make denote-file-has-identifier-p no
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote a8c286577c: Make denote-file-has-identifier-p not error out |
Date: |
Fri, 7 Oct 2022 13:57:30 -0400 (EDT) |
branch: externals/denote
commit a8c286577c3b084541d95cdfc5a44d30391e6a20
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-file-has-identifier-p not error out
This is because it might get a nil value from buffer-file-name and we
do not want an error in such a case.
---
denote.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/denote.el b/denote.el
index fb2d921ad5..2028c2e90d 100644
--- a/denote.el
+++ b/denote.el
@@ -516,8 +516,9 @@ and use one of the extensions implied by
`denote-file-type'."
(defun denote-file-has-identifier-p (file)
"Return non-nil if FILE has a Denote identifier."
- (let ((file-name (file-name-nondirectory file)))
- (string-match-p (concat "\\`" denote-id-regexp) file-name)))
+ (when file
+ (string-match-p (concat "\\`" denote-id-regexp)
+ (file-name-nondirectory file))))
(define-obsolete-function-alias
'denote--file-has-identifier-p
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/denote a8c286577c: Make denote-file-has-identifier-p not error out,
ELPA Syncer <=