Function: vc-dir-toggle-hints
vc-dir-toggle-hints is an interactive and byte-compiled function
defined in vc-dir.el.gz.
Signature
(vc-dir-toggle-hints &rest IGNORE)
Documentation
Toggle display of the key bindings hints in current VC-Dir buffer.
The toggle is preserved across refreshes of this VC-Dir buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir-toggle-hints (&rest _ignore)
"Toggle display of the key bindings hints in current VC-Dir buffer.
The toggle is preserved across refreshes of this VC-Dir buffer."
(interactive)
(if (and (local-variable-p 'vc-dir-show-key-binding-hints)
(not (eq vc-dir-show-key-binding-hints
(default-value 'vc-dir-show-key-binding-hints))))
(kill-local-variable 'vc-dir-show-key-binding-hints)
(setq-local vc-dir-show-key-binding-hints
(not vc-dir-show-key-binding-hints)))
;; Preserve point across the toggle. We don't currently try to
;; preserve point across the operation of customizing the value of
;; `vc-dir-show-key-binding-hints'.
(let ((opoint (point)))
(vc-dir--set-header default-directory)
(let ((hints-length (length vc-dir--key-binding-hints)))
(goto-char (if vc-dir-show-key-binding-hints
(+ opoint hints-length)
(- opoint hints-length))))))