mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Prevent extra variable from being passed in macro.
In the PDF module, there is a macro that is used to prevent the file-too-big prompt for PDFs since they're always too big. However, this macro has an extra variable listed that then gets passed on to the wrapped function and causes an error if the function doesn't support the extra variable. This fix simply checks if the extra value is present or not and only calls the wrapped function with it if is actually present. After all, the variable will still be nil even if nil isn't passed.
This commit is contained in:
@ -126,7 +126,9 @@
|
||||
(defadvice! +pdf-suppress-large-file-prompts-a (orig-fn size op-type filename &optional offer-raw)
|
||||
:around #'abort-if-file-too-large
|
||||
(unless (string-match-p "\\.pdf\\'" filename)
|
||||
(funcall orig-fn size op-type filename offer-raw))))
|
||||
(if offer-raw
|
||||
(funcall orig-fn size op-type filename offer-raw)
|
||||
(funcall orig-fn size op-type filename)))))
|
||||
|
||||
|
||||
(use-package! saveplace-pdf-view
|
||||
|
Reference in New Issue
Block a user