aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgcv <gepardcv@gmail.com>2025-11-04 06:08:03 -0800
committerGitHub <noreply@github.com>2025-11-04 06:08:03 -0800
commit7f47c9a7be7b7d03f6d8430c84eec80ae5896699 (patch)
tree66a0637ab58cbfd2e336830be69a7cade8dd63cf
parentbdd14b96faa54807a4f822d4ddea1680f1bfd6c7 (diff)
parenteaa710ac612ef55f3c052c264a1e078743521d8d (diff)
Merge pull request #220 from elken/master
Turn off flymake-mode in scratch buffers. Perspective makes its own scratch buffers, which are marked “untrusted” in Emacs 31. Flymake produces an annoying warning when run on an untrusted buffer. This patch turns off flymake where it’s almost certainly not needed.
-rw-r--r--perspective.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/perspective.el b/perspective.el
index 62ad179..a0f0427 100644
--- a/perspective.el
+++ b/perspective.el
@@ -312,7 +312,12 @@ Create it if the current perspective doesn't have one yet."
(when (and (zerop (buffer-size))
initial-scratch-message)
(insert (substitute-command-keys initial-scratch-message))
- (set-buffer-modified-p nil))))
+ (set-buffer-modified-p nil))
+ ;; Turn flymake off to prevent the annoying error in the
+ ;; minibuffer
+ (when (and (require 'flymake nil t)
+ (boundp flymake-mode))
+ (flymake-mode -1))))
scratch-buffer))
(defun persp-switch-to-scratch-buffer ()