Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions open-junk-file.el
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ Whether the file is a JUNK or not is infered by `open-junk-file-format'.")
;;;###autoload
(defun find-file-hook--open-junk-file ()
"Run `open-junk-file-hook' when the file is a JUNK file."
(when (string-prefix-p
(file-truename (replace-regexp-in-string "%.+$" "" open-junk-file-format))
(file-truename buffer-file-name))
(when (ignore-errors
(string-prefix-p
(file-truename (replace-regexp-in-string "%.+$" "" open-junk-file-format))
(file-truename buffer-file-name)))
(run-hooks 'open-junk-file-hook)))

;;;###autoload
Expand Down