branch: externals/denote commit 9be3cfab9973c7a24f3d252bd17c6aeb76d04cfb Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Relocate defcustom where it belongs --- denote-dired.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/denote-dired.el b/denote-dired.el index 9619a49bce..e5246ef049 100644 --- a/denote-dired.el +++ b/denote-dired.el @@ -85,22 +85,6 @@ old name followed by the new one." :type 'boolean :group 'denote-dired) -;;;; Commands - -(defun denote-dired--file-attributes-time (file) - "Return `file-attribute-modification-time' of FILE as identifier." - (format-time-string - denote--id-format - (file-attribute-modification-time (file-attributes file)))) - -(defun denote-dired--file-name-id (file) - "Return FILE identifier, else generate one." - (cond - ((string-match denote--id-regexp file) - (substring file (match-beginning 0) (match-end 0))) - ((denote-dired--file-attributes-time file)) - (t (format-time-string denote--id-format)))) - (defcustom denote-dired-post-rename-functions (list #'denote-dired-rewrite-front-matter) "List of functions called after `denote-dired-rename-file'. @@ -121,6 +105,22 @@ everything works as intended." :type 'hook :group 'denote-dired) +;;;; Commands + +(defun denote-dired--file-attributes-time (file) + "Return `file-attribute-modification-time' of FILE as identifier." + (format-time-string + denote--id-format + (file-attribute-modification-time (file-attributes file)))) + +(defun denote-dired--file-name-id (file) + "Return FILE identifier, else generate one." + (cond + ((string-match denote--id-regexp file) + (substring file (match-beginning 0) (match-end 0))) + ((denote-dired--file-attributes-time file)) + (t (format-time-string denote--id-format)))) + ;;;###autoload (defun denote-dired-rename-file (file title keywords) "Rename FILE to include TITLE and KEYWORDS.