summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-12-24 03:24:44 +0100
committerStefan Kangas <stefan@marxist.se>2021-12-24 15:37:05 +0100
commit5b6c3a20a32273d094c72bb1b84fb3ada196eef4 (patch)
tree498526fd9af62a30de25a5262145256cd56458b7 /lisp/eshell
parent32fc42322487bc43b62fb964529c2321c2e0215c (diff)
downloademacs-5b6c3a20a32273d094c72bb1b84fb3ada196eef4.tar.gz
emacs-5b6c3a20a32273d094c72bb1b84fb3ada196eef4.tar.bz2
emacs-5b6c3a20a32273d094c72bb1b84fb3ada196eef4.zip
Prefer the defcustom :risky property in eshell
* lisp/eshell/em-banner.el (eshell-banner-message): * lisp/eshell/em-hist.el (eshell-input-filter): * lisp/eshell/em-pred.el (eshell-predicate-alist) (eshell-modifier-alist): * lisp/eshell/esh-cmd.el (eshell-subcommand-bindings): * lisp/eshell/esh-io.el (eshell-virtual-targets): * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Prefer defcustom :risky property to setting 'risky-local-variable manually.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-banner.el3
-rw-r--r--lisp/eshell/em-hist.el5
-rw-r--r--lisp/eshell/em-pred.el10
-rw-r--r--lisp/eshell/esh-cmd.el5
-rw-r--r--lisp/eshell/esh-io.el3
-rw-r--r--lisp/eshell/esh-var.el5
6 files changed, 12 insertions, 19 deletions
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el
index 034fa059b16..cebb030deda 100644
--- a/lisp/eshell/em-banner.el
+++ b/lisp/eshell/em-banner.el
@@ -61,10 +61,9 @@ modules may have a simple template to begin with."
"The banner message to be displayed when Eshell is loaded.
This can be any sexp, and should end with at least two newlines."
:type 'sexp
+ :risky t
:group 'eshell-banner)
-(put 'eshell-banner-message 'risky-local-variable t)
-
(defcustom eshell-banner-load-hook nil
"A list of functions to run when `eshell-banner' is loaded."
:version "24.1" ; removed eshell-banner-initialize
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index d01e763b3ea..ea9b820bcd0 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -125,9 +125,8 @@ the input history list. Default is to save anything that isn't all
whitespace."
:type '(radio (function-item eshell-input-filter-default)
(function-item eshell-input-filter-initial-space)
- (function :tag "Other function")))
-
-(put 'eshell-input-filter 'risky-local-variable t)
+ (function :tag "Other function"))
+ :risky t)
(defun eshell-hist--update-keymap (symbol value)
"Update `eshell-hist-mode-map' for `eshell-hist-match-partial'."
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el
index fc41bb82980..41afcc3dce4 100644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em-pred.el
@@ -107,9 +107,8 @@ ordinary strings."
The format of each entry is
(CHAR . PREDICATE-FUNC-SEXP)"
- :type '(repeat (cons character sexp)))
-
-(put 'eshell-predicate-alist 'risky-local-variable t)
+ :type '(repeat (cons character sexp))
+ :risky t)
(defcustom eshell-modifier-alist
'((?E . (lambda (lst)
@@ -144,9 +143,8 @@ The format of each entry is
The format of each entry is
(CHAR ENTRYWISE-P MODIFIER-FUNC-SEXP)"
- :type '(repeat (cons character sexp)))
-
-(put 'eshell-modifier-alist 'risky-local-variable t)
+ :type '(repeat (cons character sexp))
+ :risky t)
(defvar eshell-predicate-help-string
"Eshell predicate quick reference:
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 213b7ab2893..1ddcc50f6fd 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -258,9 +258,8 @@ the command."
(default-directory default-directory)
(process-environment (eshell-copy-environment)))
"A list of `let' bindings for subcommand environments."
- :type 'sexp)
-
-(put 'risky-local-variable 'eshell-subcommand-bindings t)
+ :type 'sexp
+ :risky t)
(defvar eshell-ensure-newline-p nil
"If non-nil, ensure that a newline is emitted after a Lisp form.
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index c2471912ab8..205275154b8 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -147,10 +147,9 @@ not be added to this variable."
function
(choice (const :tag "Func returns output-func" t)
(const :tag "Func is output-func" nil))))
+ :risky t
:group 'eshell-io)
-(put 'eshell-virtual-targets 'risky-local-variable t)
-
;;; Internal Variables:
(defvar eshell-current-handles nil)
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 9aa50f2bd0f..1c5a2f28cb7 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -205,9 +205,8 @@ Additionally, each member may specify if it should be copied to the
environment of created subprocesses."
:type '(repeat (list string sexp
(choice (const :tag "Copy to environment" t)
- (const :tag "Use only in Eshell" nil)))))
-
-(put 'eshell-variable-aliases-list 'risky-local-variable t)
+ (const :tag "Use only in Eshell" nil))))
+ :risky t)
(defvar-keymap eshell-var-mode-map
"C-c M-v" #'eshell-insert-envvar)