Browse files

Length of recent-keys is not always 300. Now using (length (recent-ke…


  • Loading branch information...
1 parent 1aa9ef3 commit 89ce99b4b5315c0fe817ce484ffec988c4fcf894 @ramblex committed Nov 7, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 textmate.el
7 textmate.el
@@ -144,17 +144,18 @@ chars are not auto-inserted in major-mode"
(move-end-of-line nil)
-;; The following set of functions are taken from
+;; The following set of functions are adapted from
(defun tm/pair-insert (arg)
(interactive "P")
- (let ((ignore-list (car (last (assoc major-mode tm/non-insert-alist)))))
+ (let ((ignore-list (car (last (assoc major-mode tm/non-insert-alist))))
+ (keys (recent-keys)))
((member last-command-event ignore-list)
(insert-char last-command-event 1))
((assq last-command-event skeleton-pair-alist)
(tm/pair-open arg))
- ((assq (elt (recent-keys) 298) skeleton-pair-alist)
+ ((assq (elt keys (- (length keys) 2)) skeleton-pair-alist)
(tm/pair-close arg)))

0 comments on commit 89ce99b

Please sign in to comment.