[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive f71c199f4f 06/16: Fix: (hyperdrive--kill-buffer
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive f71c199f4f 06/16: Fix: (hyperdrive--kill-buffer-possibly-save) read-multiple-choice |
Date: |
Thu, 28 Sep 2023 19:00:45 -0400 (EDT) |
branch: elpa/hyperdrive
commit f71c199f4fe09394de034862b6224f9102a2a12e
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Fix: (hyperdrive--kill-buffer-possibly-save) read-multiple-choice
When called on Emacs <28.
---
hyperdrive.el | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/hyperdrive.el b/hyperdrive.el
index c8fd804077..d75cca88b4 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -728,17 +728,24 @@ The return value of this function is the retrieval
buffer."
(cl-assert (and hyperdrive-mode hyperdrive-current-entry))
(let ((response
(cadr
- (read-multiple-choice
- (format "Hyperdrive file %s modified; kill anyway?"
- (hyperdrive-entry-description hyperdrive-current-entry))
- '((?y "yes" "kill buffer without saving")
- (?n "no" "exit without doing anything")
- (?s "save and then kill" "save the buffer and then kill it"))
- nil nil (and (not (bound-and-true-p ;; Variable is new in Emacs 28.
- use-short-answers))
- (not (when (fboundp 'use-dialog-box-p)
- (with-no-warnings
- (use-dialog-box-p)))))))))
+ (if (< emacs-major-version 28)
+ (read-multiple-choice
+ (format "Hyperdrive file %s modified; kill anyway?"
+ (hyperdrive-entry-description hyperdrive-current-entry))
+ '((?y "yes" "kill buffer without saving")
+ (?n "no" "exit without doing anything")
+ (?s "save and then kill" "save the buffer and then kill it")))
+ (with-suppressed-warnings ((free-vars use-short-answers))
+ (compat-call read-multiple-choice
+ (format "Hyperdrive file %s modified; kill anyway?"
+ (hyperdrive-entry-description
hyperdrive-current-entry))
+ '((?y "yes" "kill buffer without saving")
+ (?n "no" "exit without doing anything")
+ (?s "save and then kill" "save the buffer and
then kill it"))
+ nil nil (and (not use-short-answers)
+ (not (when (fboundp 'use-dialog-box-p)
+ (with-no-warnings
+ (use-dialog-box-p)))))))))))
(if (equal response "no")
nil
(unless (equal response "yes")
- [nongnu] elpa/hyperdrive updated (38a4f74ab6 -> 074dc81702), ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive f71c199f4f 06/16: Fix: (hyperdrive--kill-buffer-possibly-save) read-multiple-choice,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 01594b0232 07/16: Tests: Fix on Emacs <28, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 638fb8b2ae 10/16: Docs: Link to NonGNU ELPA hyperdrive page, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive cccc75c250 11/16: Docs: Suggest package-refresh-contents before installation, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive b2f47f3f67 14/16: Comment: Remove TODO, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 5d710bedb7 02/16: Tidy: Compiler warning, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 677ccc02f1 08/16: Tests: Fix test on older Orgs, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 1951b1a356 12/16: Docs: Document MELPA installation instructions, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 8613211d69 03/16: Tidy: Compilation warning, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive 94f74764a6 05/16: Tidy: Imenu compiler warning, ELPA Syncer, 2023/09/28
- [nongnu] elpa/hyperdrive e54c8c9fec 09/16: Meta: Display all build manifest badges, ELPA Syncer, 2023/09/28