# PAbbrev with Ruby Electric

**URL:** <https://www.ruby-forum.com/t/pabbrev-with-ruby-electric/51463>\
**Category:** Ruby\
**Created:** [December 31, 2005, 7:35pm UTC](https://www.ruby-forum.com/t/pabbrev-with-ruby-electric/51463 "2005-12-31T19:35:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriscauser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/65b543/32.png) [@chriscauser](https://www.ruby-forum.com/u/chriscauser)\
**Post date:** [December 31, 2005, 7:35pm UTC](https://www.ruby-forum.com/t/pabbrev-with-ruby-electric/51463/1 "2005-12-31T19:35:30Z")

</div>

Hi,

Does anyone have problems with PAbbrev completion with Ruby Electric in  
Emacs? (Specifically Ubuntu) In other modes TAB completes a word if it  
has a suggestion, but it’s not doing that with Ruby Electric enabled.  
TAB still offers a suggestion, but a further TAB won’t insert. If Ruby  
Electric is off, it works fine with Ruby mode. To be sure it is ruby  
electric, everything but the following plus some non-related settings  
have been commented out of .emacs

;; pabbrev mode.  
;;  
(require 'pabbrev)  
(setq pabbrev-idle-timer-verbose nil)

;; ruby mode.  
;;  
(require 'ruby-mode)  
(require 'ruby-electric)

(defun ruby-eval-buffer () (interactive)  
“Evaluate the buffer with ruby.”  
(shell-command-on-region (point-min) (point-max) “ruby”))

(defun my-ruby-mode-hook ()  
(font-lock-mode t)  
(setq standard-indent 2)  
(pabbrev-mode t)  
(ruby-electric-mode t)  
(define-key ruby-mode-map “\C-c\C-a” 'ruby-eval-buffer))  
(add-hook 'ruby-mode-hook 'my-ruby-mode-hook)

(add-to-list 'interpreter-mode-alist '(“ruby” . ruby-mode))  
(add-to-list 'auto-mode-alist '("\.rb$" . ruby-mode))

Using the following on Kubuntu Breezy

GNU Emacs 21.4.1 (21.4a-1ubuntu1)  
PAbbrev 1.5  
ruby 1.8.2-9ubuntu1 (Ruby Electric comes with it - dated March 6th,  
2005)  
ruby-elisp 1.8.2-9ubuntu1

Regards,  
Chris Campbell
