[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6ebce84ff2b: Use t for non-nil default values in boolean defcusto
From: |
Mattias Engdegård |
Subject: |
master 6ebce84ff2b: Use t for non-nil default values in boolean defcustom declarations |
Date: |
Fri, 28 Apr 2023 09:08:15 -0400 (EDT) |
branch: master
commit 6ebce84ff2b4e488fbffaa0f7cc2b06580557bf7
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Use t for non-nil default values in boolean defcustom declarations
* lisp/emulation/viper-ex.el (ex-unix-type-shell):
* lisp/emulation/viper-init.el (viper-ms-style-os-p):
* lisp/eshell/em-glob.el (eshell-glob-case-insensitive):
* lisp/filecache.el (file-cache-ignore-case):
* lisp/lpr.el (lpr-add-switches):
* lisp/ls-lisp.el (ls-lisp-ignore-case):
* lisp/mail/binhex.el (binhex-use-external):
* lisp/progmodes/cperl-mode.el (cperl-electric-parens-mark):
Normalise default values to nil or t.
---
lisp/emulation/viper-ex.el | 3 ++-
lisp/emulation/viper-init.el | 3 ++-
lisp/eshell/em-glob.el | 2 +-
lisp/filecache.el | 2 +-
lisp/lpr.el | 3 ++-
lisp/ls-lisp.el | 2 +-
lisp/mail/binhex.el | 2 +-
lisp/progmodes/cperl-mode.el | 2 +-
8 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 783c01058e2..ecbcace2dd4 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -294,7 +294,8 @@
"\\|"
"bash$\\|bash.exe$"
"\\)")
- shell-file-name)))
+ shell-file-name)
+ t))
"Is the user using a unix-type shell under a non-OS?"
:type 'boolean)
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 986d1fe6bc6..c39e3cf5142 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -47,7 +47,8 @@
(defun viper-window-display-p ()
(and window-system (not (memq window-system '(tty stream pc)))))
-(defcustom viper-ms-style-os-p (memq system-type '(ms-dos windows-nt))
+(defcustom viper-ms-style-os-p
+ (not (not (memq system-type '(ms-dos windows-nt))))
"Non-nil if Emacs is running under an MS-style OS: MS-DOS, or MS-Windows."
:type 'boolean
:tag "Is it Microsoft-made OS?"
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index 9402df43065..d00f8c93cd1 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -79,7 +79,7 @@ by zsh for filename generation."
:type 'boolean
:group 'eshell-glob)
-(defcustom eshell-glob-case-insensitive (eshell-under-windows-p)
+(defcustom eshell-glob-case-insensitive (not (not (eshell-under-windows-p)))
"If non-nil, glob pattern matching will ignore case."
:type 'boolean
:group 'eshell-glob)
diff --git a/lisp/filecache.el b/lisp/filecache.el
index c211a02b2d2..42225509eca 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -213,7 +213,7 @@ Defaults to the value of `case-fold-search'."
:type 'boolean)
(defcustom file-cache-ignore-case
- (memq system-type '(ms-dos windows-nt cygwin))
+ (not (not (memq system-type '(ms-dos windows-nt cygwin))))
"Non-nil means ignore case when checking completions in the file cache.
Defaults to nil on DOS and Windows, and t on other systems."
:type 'boolean)
diff --git a/lisp/lpr.el b/lisp/lpr.el
index af59a953f38..6b8343b695d 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -73,7 +73,8 @@ switch on this list.
See `lpr-command'."
:type '(repeat (string :tag "Argument")))
-(defcustom lpr-add-switches (memq system-type '(berkeley-unix gnu/linux))
+(defcustom lpr-add-switches
+ (not (not (memq system-type '(berkeley-unix gnu/linux))))
"Non-nil means construct `-T' and `-J' options for the printer program.
These are made assuming that the program is `lpr';
if you are using some other incompatible printer program,
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 81ff14932c6..485ac4476ef 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -101,7 +101,7 @@ update the dependent variables."
:group 'ls-lisp)
(defcustom ls-lisp-ignore-case
- (memq ls-lisp-emulation '(MS-Windows MacOS))
+ (not (not (memq ls-lisp-emulation '(MS-Windows MacOS))))
"Non-nil causes ls-lisp alphabetic sorting to ignore case."
:set-after '(ls-lisp-emulation)
:type 'boolean
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el
index 4b903578a28..15f598fa224 100644
--- a/lisp/mail/binhex.el
+++ b/lisp/mail/binhex.el
@@ -49,7 +49,7 @@ input and write the converted data to its standard output."
:type '(repeat string))
(defcustom binhex-use-external
- (executable-find binhex-decoder-program)
+ (not (not (executable-find binhex-decoder-program)))
"Use external binhex program."
:version "22.1"
:type 'boolean)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index b6f0e9bca41..ed021a7ebc9 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -275,7 +275,7 @@ Can be overwritten by `cperl-hairy' if nil."
:type '(choice (const null) boolean)
:group 'cperl-affected-by-hairy)
-(defcustom cperl-electric-parens-mark window-system
+(defcustom cperl-electric-parens-mark (not (not window-system))
"Not-nil means that electric parens look for active mark.
Default is yes if there is visual feedback on mark."
:type 'boolean
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6ebce84ff2b: Use t for non-nil default values in boolean defcustom declarations,
Mattias Engdegård <=