Variable: ghostel-readonly-fast-exit

ghostel-readonly-fast-exit is a customizable variable defined in ghostel.el.

Value

t

Documentation

When non-nil, copy and Emacs modes exit on q, C-g, or any self-insert key.

The triggering character is forwarded to the terminal when exiting returns to a mode that accepts terminal input (semi-char or char).

When nil, exit only via an explicit input-mode switch
(ghostel-semi-char-mode, ghostel-char-mode, etc.). Standard
self-inserting keys still hit the read-only barrier and produce the usual "Buffer is read-only" signal.

Toggling this through customize-variable or setopt rebinds the local map in every buffer currently in copy or Emacs mode, so the change takes effect immediately. Plain setq bypasses the custom setter and affected buffers will pick up the new value on the next mode transition.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defcustom ghostel-readonly-fast-exit t
  "When non-nil, copy and Emacs modes exit on `q', `C-g', or any self-insert key.
The triggering character is forwarded to the terminal when exiting
returns to a mode that accepts terminal input (semi-char or char).

When nil, exit only via an explicit input-mode switch
\(`ghostel-semi-char-mode', `ghostel-char-mode', etc.).  Standard
self-inserting keys still hit the read-only barrier and produce
the usual \"Buffer is read-only\" signal.

Toggling this through `customize-variable' or `setopt' rebinds
the local map in every buffer currently in copy or Emacs mode, so
the change takes effect immediately.  Plain `setq' bypasses the custom setter
and affected buffers will pick up the new value on the next mode transition."
  :type 'boolean
  :initialize #'custom-initialize-default
  :set (lambda (sym newval)
         (set-default sym newval)
         (dolist (buf (buffer-list))
           (with-current-buffer buf
             (when (memq ghostel--input-mode '(copy emacs))
               (use-local-map (ghostel--readonly-keymap)))))))