add-hook should be optional and locally loaded like this wasnt doing anything anyway

This commit is contained in:
bth 2025-03-07 23:46:59 -08:00
commit 799f599dcb

View file

@ -79,7 +79,11 @@
;; combined with the hook into `file-name-at-point-functions', this means I can ;; combined with the hook into `file-name-at-point-functions', this means I can
;; run find-file at point, followed by M-n : ;; run find-file at point, followed by M-n :
;; Load like this:
;; (add-hook 'file-name-at-point-functions 'um-journal-find-file)
;;
;; TODO: reuse same fallback logic as the embark advice if I keep this. ;; TODO: reuse same fallback logic as the embark advice if I keep this.
;;;###autoload ;;;###autoload
(defun um-journal-find-file () (defun um-journal-find-file ()
(let ((default-directory (um-journal-path)) (let ((default-directory (um-journal-path))
@ -87,7 +91,6 @@
) )
(expand-file-name thing)) (expand-file-name thing))
) )
(add-hook 'file-name-at-point-functions 'um-journal-find-file nil t)
;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;
;; Embark solution ;; Embark solution