[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 44ddb430de 04/14: Change: (h/handler-default) P
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 44ddb430de 04/14: Change: (h/handler-default) Prompt to mark safe when loading file |
Date: |
Sun, 18 Aug 2024 19:00:18 -0400 (EDT) |
branch: elpa/hyperdrive
commit 44ddb430deeed841f1e6a0523767f5a750c6a546
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Change: (h/handler-default) Prompt to mark safe when loading file
---
hyperdrive-lib.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 87d7cc88c7..615884b0d6 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1369,6 +1369,7 @@ Otherwise, return nil. SLOT may be one of
(declare-function h/org--link-goto "hyperdrive-org")
(declare-function h/blob-mode "hyperdrive")
+(declare-function h/mark-as-safe "hyperdrive")
(cl-defun h/handler-default (entry &key then)
"Load ENTRY's file into an Emacs buffer.
If then, then call THEN with no arguments. Default handler."
@@ -1393,11 +1394,12 @@ If then, then call THEN with no arguments. Default
handler."
(or (not (h/writablep hyperdrive)) version))
(set-buffer-modified-p nil)
(set-visited-file-modtime (current-time))))
- (if (map-elt (hyperdrive-etc hyperdrive) 'safep)
- (let ((buffer-file-name (he/name entry)))
- (set-auto-mode))
- (h/message "Mark hyperdrive `%s' as safe to auto-enable major mode."
- (h//format-hyperdrive hyperdrive)))
+ (when (eq 'unknown (h/safe-p hyperdrive))
+ (call-interactively #'h/mark-as-safe))
+ ;; Check safe-p again after potential call to `h/mark-as-safe'.
+ (when (eq t (h/safe-p hyperdrive))
+ (let ((buffer-file-name (he/name entry)))
+ (set-auto-mode)))
(when target
(pcase major-mode
('org-mode
- [nongnu] elpa/hyperdrive 6ef425d194 06/14: Change: (h/menu-bar-menu) Use h/safe-string, (continued)
- [nongnu] elpa/hyperdrive 6ef425d194 06/14: Change: (h/menu-bar-menu) Use h/safe-string, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive ff828ee988 07/14: Change: (h/mark-as-safe) Use h/safe-string, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 43b0704dcf 08/14: Change: (h/describe-hyperdrive) Use h/safe-string, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 65d6204dd0 09/14: Change: (h/menu-mark-as-safe) Prompt to mark as safe/unsafe/unknown, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive dd0a28b1f7 10/14: Change: (h/write-buffer) Prompt to mark as safe when writing, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 5aba07372b 11/14: Add: (h/safe, h/unsafe, h/safe-unknown) Faces; Use in h/safe-p, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive bcfc7adaf7 14/14: Merge: Mark hyperdrive as "safe", "unsafe", or "unknown", ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive e7cb936587 01/14: Tidy: (hyperdrive-mark-as-safe) Capitalization, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 188438e59d 02/14: Change: (h/mark-as-safe) Allow marking as 'unknown, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive f57c9086dd 05/14: Add: (h/safe-string) New function, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 44ddb430de 04/14: Change: (h/handler-default) Prompt to mark safe when loading file,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 9ee220d67e 12/14: Fix: (h/handler-default, h/write-buffer) Keep major mode if same, ELPA Syncer, 2024/08/18
- [nongnu] elpa/hyperdrive 708fa6096e 13/14: Docs: (hyperdrive-mark-as-safe) Document changes, ELPA Syncer, 2024/08/18