Variable: electric-pair-skip-self

electric-pair-skip-self is a customizable variable defined in elec-pair.el.gz.

Value

electric-pair-default-skip-self

Documentation

If non-nil, skip char instead of inserting a second closing paren.

When inserting a closing delimiter right before the same character, just skip that character instead, so that, for example, consecutively typing ( and ) results in "()" rather than "())".

This can be convenient for people who find it easier to type ) than C-f (forward-char).

Can also be a function of one argument (the closing delimiter just inserted), in which case that function's return value is considered instead.

This variable was added, or its default value changed, in Emacs 24.1.

Probably introduced at or before Emacs version 24.4.

Source Code

;; Defined in /usr/src/emacs/lisp/elec-pair.el.gz
(defcustom electric-pair-skip-self #'electric-pair-default-skip-self
  "If non-nil, skip char instead of inserting a second closing paren.

When inserting a closing delimiter right before the same character, just
skip that character instead, so that, for example, consecutively
typing `(' and `)' results in \"()\" rather than \"())\".

This can be convenient for people who find it easier to type `)' than
\\[forward-char].

Can also be a function of one argument (the closing delimiter just
inserted), in which case that function's return value is considered
instead."
  :version "24.1"
  :group 'electricity
  :type '(choice
          (const :tag "Never skip" nil)
          (const :tag "Help balance" electric-pair-default-skip-self)
          (const :tag "Always skip" t)
          function))