All pastes #730950 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-09 17:41 UTC
rendered paste body
(defmacro set-key-bind-for-insert-pair-symbol (key begin-symbol end-symbol)
    `(global-set-key ,key (lambda (arg)
                            (interactive "P")
                            (setq parens-require-spaces nil)
                            (insert-pair arg ,begin-symbol ,end-symbol)
                          )
     )
)

(set-key-bind-for-insert-pair-symbol (kbd "(") ?\( ?\))
(set-key-bind-for-insert-pair-symbol (kbd "[") ?\[ ?\])