Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added indent-according-to-mode to tm/pair-insert function

  • Loading branch information...
commit 569eed55996de407474ce94a6f8786ad9a1d3dcc 1 parent ceb2d6a
@ramblex authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 textmate.el
19 textmate.el
@@ -150,16 +150,17 @@ chars are not auto-inserted in major-mode"
(interactive "P")
(let ((ignore-list (car (last (assoc major-mode tm/non-insert-alist)))))
- ((member last-command-char ignore-list)
- (insert-char last-command-char 1))
- ((assq last-command-char skeleton-pair-alist)
+ ((member last-command-event ignore-list)
+ (insert-char last-command-event 1))
+ ((assq last-command-event skeleton-pair-alist)
(tm/pair-open arg))
- (tm/pair-close arg)))))
+ (tm/pair-close arg)))
+ (indent-according-to-mode)))
(defun tm/pair-open (arg)
(interactive "P")
- (let ((pair (assq last-command-char
+ (let ((pair (assq last-command-event
((and (not mark-active)
@@ -175,14 +176,14 @@ chars are not auto-inserted in major-mode"
(let (pair open)
(dolist (pair skeleton-pair-alist)
- (when (eq last-command-char (car (last pair)))
+ (when (eq last-command-event (car (last pair)))
(setq open (car pair))))
- (setq last-command-char open)
+ (setq last-command-event open)
(skeleton-pair-insert-maybe arg)))
(concat "[ \t\n]*"
- (regexp-quote (string last-command-char))))
- (replace-match (string last-command-char))
+ (regexp-quote (string last-command-event))))
+ (replace-match (string last-command-event))
(self-insert-command (prefix-numeric-value arg))
Please sign in to comment.
Something went wrong with that request. Please try again.