Make the scratch buffer trusted
This commit is contained in:
parent
96c175e0bb
commit
14467fb9f8
@ -209,8 +209,13 @@ Each element in this list is:
|
||||
(with-current-buffer buffer
|
||||
(derived-mode-p 'eshell-mode)))
|
||||
|
||||
(defun trusted-files--scratch-buffer-p (buffer)
|
||||
"Return non-nil if BUFFER is a `scratch-buffer' buffer."
|
||||
(and (equal (buffer-name buffer) "*scratch*")
|
||||
(not (buffer-file-name buffer))))
|
||||
|
||||
(defcustom trusted-files-always-trusted-buffer-functions
|
||||
'(minibufferp trusted-files--eshell-buffer-p)
|
||||
'(minibufferp trusted-files--eshell-buffer-p trusted-files--scratch-buffer-p)
|
||||
"A list of functions that are called to test if the current buffer is safe.
|
||||
When a buffer is tested for safety (via `trusted-files-safe-p'), this hook is
|
||||
run. If any function returns non-nil, the current buffer is considered safe
|
||||
|
Loading…
Reference in New Issue
Block a user