Use truth values for spacemacs--ts-full-hint

Use nil and t instead of 0 and 1 for spacemacs--ts-full-hint values.

* layers/+spacemacs/spacemacs-layouts/config.el
(spacemacs--ts-full-hint-toggle): Define with an initial value of nil.
* layers/+spacemacs/spacemacs-defaults/keybindings.el
(spacemacs//window-manipulation-ts-toggle-hint)
(spacemacs//window-manipulation-ts-hint):
* layers/+spacemacs/spacemacs-layouts/funcs.el
(spacemacs//layouts-ts-toggle-hint, spacemacs//layouts-ts-hint)
(spacemacs//workspaces-ts-toggle-hint, spacemacs//workspaces-ts-hint):
Replace (logxor ... 1) and (equal 1 ...) with (not ...) and a simple truth
check.
This commit is contained in:
Miciah Masters 2019-10-12 22:32:44 -04:00 committed by duianto
parent 1fec4ec135
commit 7be37a2aed
3 changed files with 7 additions and 7 deletions

View file

@ -659,13 +659,13 @@ respond to this toggle."
"Toggle the full hint docstring for the window manipulation transient-state."
(interactive)
(setq spacemacs--ts-full-hint-toggle
(logxor spacemacs--ts-full-hint-toggle 1)))
(not spacemacs--ts-full-hint-toggle)))
(defun spacemacs//window-manipulation-ts-hint ()
"Return a condensed/full hint for the window manipulation transient state"
(concat
" "
(if (equal 1 spacemacs--ts-full-hint-toggle)
(if spacemacs--ts-full-hint-toggle
spacemacs--window-manipulation-ts-full-hint
(concat spacemacs--window-manipulation-ts-minified-hint
" ([" (propertize "?" 'face 'hydra-face-red) "] help)"))))

View file

@ -21,7 +21,7 @@
(defvar layouts-autosave-delay 900
"Delay in seconds between each layouts auto-save.")
(defvar spacemacs--ts-full-hint-toggle 0
(defvar spacemacs--ts-full-hint-toggle nil
"Toggle display of transient states documentations.")
(defvar spacemacs--last-selected-layout dotspacemacs-default-layout-name

View file

@ -105,7 +105,7 @@ Cancels autosave on exiting perspectives mode."
"Toggle the full hint docstring for the layouts transient-state."
(interactive)
(setq spacemacs--ts-full-hint-toggle
(logxor spacemacs--ts-full-hint-toggle 1)))
(not spacemacs--ts-full-hint-toggle)))
(defun spacemacs//layout-format-name (name pos)
"Format the layout name given by NAME for display in mode-line."
@ -132,7 +132,7 @@ Cancels autosave on exiting perspectives mode."
persp-list " | "))))
(concat
formatted-persp-list
(if (equal 1 spacemacs--ts-full-hint-toggle)
(if spacemacs--ts-full-hint-toggle
spacemacs--layouts-ts-full-hint
(concat " (["
(propertize "?" 'face 'hydra-face-red)
@ -656,7 +656,7 @@ STATE is a window-state object as returned by `window-state-get'."
"Toggle the full hint docstring for the workspaces transient-state."
(interactive)
(setq spacemacs--ts-full-hint-toggle
(logxor spacemacs--ts-full-hint-toggle 1)))
(not spacemacs--ts-full-hint-toggle)))
(defun spacemacs/workspaces-ts-rename ()
"Rename a workspace and get back to transient-state."
@ -682,7 +682,7 @@ STATE is a window-state object as returned by `window-state-get'."
" "
(mapconcat 'spacemacs//workspace-format-name
(eyebrowse--get 'window-configs) " | ")
(if (equal 1 spacemacs--ts-full-hint-toggle)
(if spacemacs--ts-full-hint-toggle
spacemacs--workspaces-ts-full-hint
(concat " (["
(propertize "?" 'face 'hydra-face-red)