help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

auto-complete


From: dunnil
Subject: auto-complete
Date: 5 Feb 2006 15:14:20 -0800
User-agent: G2/0.2

I've enabled auto-complete in emacs for ruby language, but it
auto-complete everything, even files in the current directory, what may

be the problem.
yep, I'm a newbie to this golden but hard to reach land!


Here is my .emacs file content:
(autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
(setq auto-mode-alist  (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '("\\.rhtml$" . html-mode)
auto-mode-alist))


(modify-coding-system-alist 'file "\\.rb$" 'utf-8-dos)
(modify-coding-system-alist 'file "\\.rhtml$" 'utf-8-dos)


(require 'rails)


(add-hook 'ruby-mode-hook
          (lambda()
            (add-hook 'local-write-file-hooks
                      '(lambda()
                         (save-excursion
                           (untabify (point-min) (point-max))
                           (delete-trailing-whitespace)
                           )))
            (set (make-local-variable 'indent-tabs-mode) 'nil)
            (set (make-local-variable 'tab-width) 2)
            (imenu-add-to-menubar "IMENU")
            (require 'ruby-electric)
            (ruby-electric-mode t) 
            ))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]