Skip to content

Commit

Permalink
Inhibit autopair in org-mode (fixes redguardtoo#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Jul 4, 2012
1 parent 1eee2b7 commit c7461a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions init-editing-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
(setq autopair-autowrap t)
(autopair-global-mode t)

(defun inhibit-autopair ()
"Prevent autopair from enabling in the current buffer."
(setq autopair-dont-activate t)
(autopair-mode -1))

;;----------------------------------------------------------------------------
;; Fix per-window memory of buffer point positions
Expand Down
3 changes: 1 addition & 2 deletions init-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
;; Compatibility with other modes

(defadvice enable-paredit-mode (before disable-autopair activate)
(setq autopair-dont-activate t)
(autopair-mode -1))
(inhibit-autopair))

(suspend-mode-during-cua-rect-selection 'paredit-mode)

Expand Down
1 change: 1 addition & 0 deletions init-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,6 @@
;;(require 'org-checklist)
(require 'org-fstree)))

(add-hook 'org-mode-hook 'inhibit-autopair)

(provide 'init-org)
2 changes: 1 addition & 1 deletion init-slime.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)

(add-hook 'sldb-mode-hook #'(lambda () (setq autopair-dont-activate t)))
(add-hook 'sldb-mode-hook 'inhibit-autopair)

;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
(defun override-slime-repl-bindings-with-paredit ()
Expand Down

0 comments on commit c7461a1

Please sign in to comment.