Spruce up org-electric-pairs, see commit
This commit is contained in:
parent
cb914734b1
commit
9fdb22ab8a
@ -471,17 +471,20 @@ targets."
|
||||
(add-hook 'after-save-hook
|
||||
#'(lambda () (if (equal major-mode 'org-mode)
|
||||
(org-babel-tangle))))
|
||||
(defvar org-electric-pairs `(
|
||||
(,(string-to-char "_") . ,(string-to-char "_"))
|
||||
(,(string-to-char "/") . ,(string-to-char "/"))
|
||||
(,(string-to-char "*") . ,(string-to-char "*"))
|
||||
(,(string-to-char "+") . ,(string-to-char "+"))
|
||||
(,(string-to-char "+") . ,(string-to-char "+"))
|
||||
(,(string-to-char "=") . ,(string-to-char "="))))
|
||||
(defvar org-electric-pairs '(
|
||||
(?_ . ?_)
|
||||
(?/ . ?/)
|
||||
(?* . ?*)
|
||||
(?+ . ?+)
|
||||
(?+ . ?+)
|
||||
(?= . ?=))
|
||||
"Electric pairs for org-mode.
|
||||
|
||||
(dolist (pair org-electric-pairs)
|
||||
(add-to-list 'electric-pair-pairs
|
||||
pair))
|
||||
See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode-specific-pairs-for-electric-pair-mode")
|
||||
(defun org-add-electric-pairs ()
|
||||
(setq-local electric-pair-pairs (append electric-pair-pairs org-electric-pairs))
|
||||
(setq-local electric-pair-text-pairs electric-pair-pairs))
|
||||
(add-hook 'org-mode-hook 'org-add-electric-pairs)
|
||||
(require 'mitch-orgstuff)
|
||||
:hook
|
||||
(org-mode . turn-off-line-numbers)
|
||||
|
Loading…
Reference in New Issue
Block a user