Skip to content

Commit

Permalink
Added lisp-interaction-mode to exempt modes and added indent-accordin…
Browse files Browse the repository at this point in the history
…g-to-mode

when inserting a brace pair.
  • Loading branch information
ramblex committed Oct 5, 2009
1 parent 9770bda commit 500cc0a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions textmate.el
Expand Up @@ -60,7 +60,9 @@
:type 'boolean
:group 'textmate)

(defcustom tm/exempt-quote-modes '(emacs-lisp-mode lisp-mode)
(defcustom tm/exempt-quote-modes '(emacs-lisp-mode
lisp-mode
lisp-interaction-mode)
"Modes which in which to not auto-insert a quote"
:type '(repeat symbol)
:group 'textmate)
Expand Down Expand Up @@ -99,9 +101,9 @@
(")" . tm/move-over-bracket)
("]" . tm/move-over-square)
("}" . tm/move-over-curly)
("[" . skeleton-pair-insert-maybe)
("(" . skeleton-pair-insert-maybe)
("{" . skeleton-pair-insert-maybe)
("[" . tm/insert-brace)
("(" . tm/insert-brace)
("{" . tm/insert-brace)
;; Duplicate TextMate's auto-indent
([return] . tm/newline-and-indent)
;; Duplicate TextMate's command-return
Expand Down Expand Up @@ -165,7 +167,13 @@
one"
(if (eq (char-after) char)
(funcall (cdr (assoc char pushovers)))
(funcall (cdr (assoc char defaults)))))
(funcall (cdr (assoc char defaults))))
(indent-according-to-mode))

(defun tm/insert-brace ()
(interactive)
(skeleton-pair-insert-maybe nil)
(indent-according-to-mode))

(defun tm/move-over-bracket () (interactive)(tm/move-over ?\)))
(defun tm/move-over-curly () (interactive)(tm/move-over ?\}))
Expand Down

0 comments on commit 500cc0a

Please sign in to comment.