[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 54bdab4c2d: Simplify the user option typ
From: |
ELPA Syncer |
Subject: |
[elpa] externals/shell-command+ 54bdab4c2d: Simplify the user option type of 'shell-command+-default-region' |
Date: |
Sun, 26 Feb 2023 06:58:35 -0500 (EST) |
branch: externals/shell-command+
commit 54bdab4c2d49219ecff27861a6cb19d6497c7458
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Simplify the user option type of 'shell-command+-default-region'
---
shell-command+.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/shell-command+.el b/shell-command+.el
index 410be70bea..c2143be801 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -1,6 +1,6 @@
;;; shell-command+.el --- An extended shell-command -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
;; Author: Philip Kaludercic <philipk@posteo.net>
;; Maintainer: Philip Kaludercic <~pkal/public-inbox@lists.sr.ht>
@@ -93,14 +93,12 @@
"Prompt to use when invoking `shell-command+'."
:type 'string)
-(defcustom shell-command+-default-region nil
+(defcustom shell-command+-default-region 'buffer
"Default thing to apply a command onto.
-The default value nil will apply a buffer to the entire buffer.
A symbol such as `line', `page', `defun', ... as defined by
`bounds-of-thing-at-point' will restrict the region to whatever
is specified."
- :type '(choice (const :tag "Entire buffer" nil)
- (symbol :tag "Thing")))
+ :type '(symbol :tag "Thing"))
;;; Modular feature support
@@ -486,9 +484,14 @@ respectively be assumed as a fallback.
The current configuration adds the following functionality, that
can be combined but will be processed in the following order:"
- (interactive (let ((bounds (and shell-command+-default-region
- (bounds-of-thing-at-point
- shell-command+-default-region))))
+ (interactive (let ((bounds (bounds-of-thing-at-point
+ (or shell-command+-default-region
+ ;; We default to buffer for
+ ;; compatibility reasons, back when
+ ;; `shell-command+-default-region'
+ ;; interpreted nil as the default
+ ;; option to use the entire buffer.
+ 'buffer))))
(list (read-shell-command
(if (bound-and-true-p shell-command-prompt-show-cwd)
(format shell-command+-prompt
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/shell-command+ 54bdab4c2d: Simplify the user option type of 'shell-command+-default-region',
ELPA Syncer <=