[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csv-mode 63f0298097: Add option to turn off the "Region
From: |
Stefan Monnier |
Subject: |
[elpa] externals/csv-mode 63f0298097: Add option to turn off the "Region OK?" prompt |
Date: |
Sun, 14 Jan 2024 20:37:43 -0500 (EST) |
branch: externals/csv-mode
commit 63f02980978f19786bda354457ac5259b8f969a2
Author: Simen Heggestøyl <simenheg@runbox.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Add option to turn off the "Region OK?" prompt
* csv-mode.el (csv-confirm-region): New option to turn off the
"Region OK?" prompt in interactive commands.
---
csv-mode.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/csv-mode.el b/csv-mode.el
index 574050aa94..f639dcf59a 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -4,7 +4,7 @@
;; Author: "Francis J. Wright" <F.J.Wright@qmul.ac.uk>
;; Maintainer: emacs-devel@gnu.org
-;; Version: 1.22
+;; Version: 1.23
;; Package-Requires: ((emacs "27.1") (cl-lib "0.5"))
;; Keywords: convenience
@@ -110,6 +110,7 @@
;; Since 1.21:
;; - New command `csv-insert-column'.
;; - New config var `csv-align-min-width' for `csv-align-mode'.
+;; - New option `csv-confirm-region'.
;; Since 1.9:
;; - `csv-align-mode' auto-aligns columns dynamically (on screen).
@@ -271,6 +272,10 @@ after separators."
"If non-nil, make separators in aligned records invisible."
:type 'boolean)
+(defcustom csv-confirm-region t
+ "If non-nil, confirm that region is OK in interactive commands."
+ :type 'boolean)
+
(defface csv-separator-face
'((t :inherit escape-glyph))
"CSV mode face used to highlight separators.")
@@ -557,9 +562,10 @@ The default field when read interactively is the current
field."
(exchange-point-and-mark)
(sit-for 1)
(exchange-point-and-mark))
- (or (y-or-n-p "Region OK? ")
- (error "Action aborted by user"))
- (message nil) ; clear y-or-n-p message
+ (when csv-confirm-region
+ (or (y-or-n-p "Region OK? ")
+ (error "Action aborted by user"))
+ (message nil)) ; clear y-or-n-p message
(list (region-beginning) (region-end))))
;; Use region set by user:
(list (region-beginning) (region-end)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/csv-mode 63f0298097: Add option to turn off the "Region OK?" prompt,
Stefan Monnier <=