Subject: bug#5119: closed (Re: ruby-mode binds TAB)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 27 Jun 2010 18:20:03 +0000

Your bug report

#5119: ruby-mode binds TAB

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
5119: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5119
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: ruby-mode binds TAB
From: Chong Yidong <[email-masked]>
To: Lennart Borgman <[email-masked]>
Cc: [email-masked]
Date: Sun, 27 Jun 2010 14:19:24 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> It binds TAB to ruby-indent-line. That is against the rules. ;-)
>
> It should instead leave this unbound and do
>
>   (set (make-local-variable 'indent-line-function)
>        'ruby-indent-line)

Checked in, thanks.

Subject: ruby-mode binds TAB
From: Lennart Borgman <[email-masked]>
To: Emacs Bugs <[email-masked]>
Date: Fri, 4 Dec 2009 04:36:13 +0100

It binds TAB to ruby-indent-line. That is against the rules. ;-)

It should instead leave this unbound and do

  (set (make-local-variable 'indent-line-function)
       'ruby-indent-line)

Index: ruby-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/ruby-mode.el,v
retrieving revision 1.11
diff -c -r1.11 ruby-mode.el
*** ruby-mode.el	26 Oct 2009 06:43:41 -0000	1.11
--- ruby-mode.el	4 Dec 2009 03:35:16 -0000
***************
*** 166,172 ****
      (define-key map (kbd "M-C-n") 'ruby-end-of-block)
      (define-key map (kbd "M-C-h") 'ruby-mark-defun)
      (define-key map (kbd "M-C-q") 'ruby-indent-exp)
-     (define-key map (kbd "TAB")   'ruby-indent-line)
      (define-key map (kbd "C-M-h") 'backward-kill-word)
      (define-key map (kbd "C-j")   'reindent-then-newline-and-indent)
      (define-key map (kbd "C-m")   'newline)
--- 166,171 ----
***************
*** 1390,1395 ****
--- 1389,1396 ----
    (setq major-mode 'ruby-mode)
    (ruby-mode-variables)

+   (set (make-local-variable 'indent-line-function)
+        'ruby-indent-line)
    (set (make-local-variable 'imenu-create-index-function)
         'ruby-imenu-create-index)
    (set (make-local-variable 'add-log-current-defun-function)