1

I'm playing around with textmate.el: https://github.com/defunkt/textmate.el. A little confusing at first if you've never tried textmate, but pretty cool!

I'd like to override a binding in the minor mode.

Here is a snippet from the source that does the binding:

(defvar *textmate-mode-map*
  (let ((map (make-sparse-keymap)))
    (cond ((featurep 'aquamacs)
       ....
(t ;; Any other version
 (define-key map [(control tab)] 'textmate-shift-right)
 (define-key map [(control shift tab)] 'textmate-shift-left)

Rather than modifying the source I got from github, I'd like to override in my .emacs.

1 Answer 1

0

All it should take is

(eval-after-load 'textmate
  '(progn
     (define-key *textmate-mode-map* [(control tab)] 'my-cool-function)))

replacing of course my-cool-function with whatever you actually want it to do. If you want to use a lambda function, don't forget to make it interactive or you will get an error:

(eval-after-load 'textmate
  '(progn
     (define-key *textmate-mode-map* [(control tab)]
       (lambda () (interactive)
         ...))))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .