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
|
(add-hook 'after-save-hook
|
||||||
#'(lambda () (if (equal major-mode 'org-mode)
|
#'(lambda () (if (equal major-mode 'org-mode)
|
||||||
(org-babel-tangle))))
|
(org-babel-tangle))))
|
||||||
(defvar org-electric-pairs `(
|
(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 "="))))
|
(?= . ?=))
|
||||||
|
"Electric pairs for org-mode.
|
||||||
|
|
||||||
(dolist (pair org-electric-pairs)
|
See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode-specific-pairs-for-electric-pair-mode")
|
||||||
(add-to-list 'electric-pair-pairs
|
(defun org-add-electric-pairs ()
|
||||||
pair))
|
(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)
|
(require 'mitch-orgstuff)
|
||||||
:hook
|
:hook
|
||||||
(org-mode . turn-off-line-numbers)
|
(org-mode . turn-off-line-numbers)
|
||||||
|
Loading…
Reference in New Issue
Block a user