[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote e14fe436d3 1/3: Avoid needless 'buffer-file-name
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote e14fe436d3 1/3: Avoid needless 'buffer-file-name' function calls in 'denote-link' |
Date: |
Wed, 13 Mar 2024 06:58:04 -0400 (EDT) |
branch: externals/denote
commit e14fe436d3757f53d5c1361cc70c7c21c6d66ec2
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Avoid needless 'buffer-file-name' function calls in 'denote-link'
---
denote.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index f04be59651..a2f48c17a9 100644
--- a/denote.el
+++ b/denote.el
@@ -3659,12 +3659,12 @@ system path. FILE-TYPE is a symbol as described in
treats the active region specially, is up to it."
(interactive
(let* ((file (denote-file-prompt))
- (file-type (when (buffer-file-name)
- (denote-filetype-heuristics (buffer-file-name))))
+ (file-type (when buffer-file-name
+ (denote-filetype-heuristics buffer-file-name)))
(description (when (file-exists-p file)
(denote--link-get-description file))))
(list file file-type description current-prefix-arg)))
- (unless (and (buffer-file-name) (denote-file-has-supported-extension-p
(buffer-file-name)))
+ (unless (and buffer-file-name (denote-file-has-supported-extension-p
buffer-file-name))
(user-error "The current file type is not recognized by Denote"))
(unless (file-exists-p file)
(user-error "The linked file does not exist"))