Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I configure Emacs to recognise certain she-bang lines?

it recognises the shebang line:

#!/usr/bin/env ruby

but not the shebang line of

#!/usr/bin/env ruby1.9

I figure there must be an alist somewhere with the list of scripting languages called by /usr/bin/env and the mode, but I can't find it.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

This is controlled by interpreter-mode-alist. In my Emacs (23.2.1 on Debian), there's an entry for ruby1.9 out of the box. I guess you have an older version; you can add this to your .emacs:

(add-to-list 'interpreter-mode-alist
             '("ruby1.9" . ruby-mode))
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.