Fix trusted-content for remote directories
This commit is contained in:
parent
b723dc961c
commit
95fe0861c9
13
init.el
13
init.el
@ -104,6 +104,19 @@
|
||||
(propertize "[Untrusted]" 'face 'error)))))
|
||||
(add-to-list 'mode-line-misc-info
|
||||
'(:eval (my/-trusted-content-segment)))
|
||||
(defun my/-fix-trusted-content-p-for-remote (oldfun &rest args)
|
||||
(let ((source (or buffer-file-truename default-directory)))
|
||||
(if (not source)
|
||||
(apply oldfun args)
|
||||
(let* ((method (file-remote-p source 'method))
|
||||
(host (file-remote-p source 'host))
|
||||
(trusted-content (cl-remove-if-not
|
||||
(llama and (equal method (file-remote-p % 'method))
|
||||
(equal host (file-remote-p % 'host)))
|
||||
trusted-content)))
|
||||
(apply oldfun args)))))
|
||||
(advice-add 'trusted-content-p :around
|
||||
#'my/-fix-trusted-content-p-for-remote)
|
||||
|
||||
;; Increase responsiveness
|
||||
(setq gc-cons-threshold 80000000
|
||||
|
Loading…
x
Reference in New Issue
Block a user