commit 70401884e9780e64dfd313d8af52d643d1798aee parent aad18aecef0c31081d5fe7b14cc135ab8904883f Author: Oleh Krehel <ohwoeowho@gmail.com> Date: Fri, 24 Jan 2020 19:46:41 +0100 org-download.el: Fix byte-compiler warnings Diffstat:
| M | org-download.el | | | 14 | +++++++------- |
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/org-download.el b/org-download.el @@ -385,6 +385,12 @@ It's inserted before the image link and is used to annotate it.") "Function that takes FILENAME and returns a org link." :type 'function) +(defcustom org-download-abbreviate-filename-function #'file-relative-name + "Function that takes FILENAME and returns an abbreviated file name." + :type '(choice + (const :tag "relative" file-relative-name) + (const :tag "absolute" expand-file-name))) + (defun org-download-link-format-function-default (filename) "The default function of `org-download-link-format-function'." (if (and (>= (string-to-number org-version) 9.3) @@ -474,12 +480,6 @@ It's inserted before the image link and is used to annotate it.") (while (re-search-forward oldpath nil t) (replace-match newpath)))) -(defcustom org-download-abbreviate-filename-function #'file-relative-name - "Function that takes FILENAME and returns an abbreviated file name." - :type '(choice - (const :tag "relative" file-relative-name) - (const :tag "absolute" expand-file-name))) - (defun org-download-insert-link (link filename) (let* ((beg (point)) (line-beg (line-beginning-position)) @@ -529,7 +529,7 @@ It's inserted before the image link and is used to annotate it.") (delete-region (region-beginning) (region-end))) - ((looking-at org-any-link-re) + ((looking-at org-link-any-re) (let ((fname (org-link-unescape (match-string-no-properties 2)))) (when (file-exists-p fname)