Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Paredit uses a different way of defining the keymap. Whereas most minor modes define the keymap in the variable definition, Paredit calls <code>paredit-define-keys</code> on <strong>top-level</strong>, and thus forcibly initializes the keymap.</p> <p>In other words, you cannot prevent Paredit from setting up its bindings. You need to remove all keybindings in the keymap with <code>(define-key paredit-mode-map … nil)</code> to get rid of these.</p> <p><strong>Edit:</strong> You cannot “reset” keymaps by assigning a new keymap to the variable. <code>(setq paredit-mode-map …)</code> will change the variable <code>paredit-mode-map</code>, it will <strong>not</strong> change the actual keymap being used by Paredit mode.</p> <p>The binding of this variable is only evaluated <strong>once</strong> at <strong>definition time</strong>, i.e. during the evaluation of <code>define-minor-mode</code>. This macro internally calls <code>add-minor-mode</code>, and passes to this function the <strong>current value</strong> of the keymap variable. All future use of the mode refers to this keymap only. The keymap variable is <strong>never again</strong> evaluated by the minor mode, thus changing its binding has no effect whatsoever.</p> <p>If you want to change the keymap, you have to re-bind the variable <strong>before</strong> <code>define-minor-mode</code> is evaluated, i.e. before the corresponding library is loaded. Changing it in an <code>eval-after-load</code> form is hence completely useless.</p> <p>Normally, changing the keymap variable before the library is loaded works well, because most modes define the keymap within the body of <code>defvar</code>. <code>defvar</code> however will not change the value of a variable if it already has a value. Thus, if the variable already has a keymap, it won't be touched.</p> <p>However, as I said, Paredit doesn't respect this pattern, and instead forcibly add its bindings to the keymap. Thus changing it is pointless, because Paredit will add its bindings anyway.</p> <p>As I said, you have to manually clear the existing keymap by un-defining every single of its keys.</p> <p>TL;DR: Use Smartparens, really! It covers all of Paredit, it's flexible, it's powerful, it's extensible, in short it's just good. And it lets you choose whatever keybindings you want.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload