Variable: electric-quote-mode

electric-quote-mode is a customizable variable defined in electric.el.gz.

Value

nil

Documentation

Non-nil if Electric-Quote mode is enabled.

See the electric-quote-mode(var)/electric-quote-mode(fun) command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node (emacs)Easy Customization) or call the function electric-quote-mode(var)/electric-quote-mode(fun).

View in manual

Probably introduced at or before Emacs version 25.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/electric.el.gz
;;;###autoload
(define-minor-mode electric-quote-mode
  "Toggle on-the-fly requoting (Electric Quote mode).

When enabled, as you type this replaces \\=` with \\=‘, \\=' with \\=’,
\\=`\\=` with “, and \\='\\=' with ”.  This occurs only in comments, strings,
and text paragraphs, and these are selectively controlled with
`electric-quote-comment', `electric-quote-string', and
`electric-quote-paragraph'.

Customize `electric-quote-chars' to use characters other than the
ones listed here.  Also see `electric-quote-replace-consecutive'.

This is a global minor mode.  To toggle the mode in a single buffer,
use `electric-quote-local-mode'."
  :global t :group 'electricity
  :initialize 'custom-initialize-delay
  :init-value nil
  (if (not electric-quote-mode)
      (unless (catch 'found
                (dolist (buf (buffer-list))
                  (with-current-buffer buf
                    (if electric-quote-mode (throw 'found t)))))
        (remove-hook 'post-self-insert-hook
                     #'electric-quote-post-self-insert-function))
    (add-hook 'post-self-insert-hook
              #'electric-quote-post-self-insert-function
              10)))