Forum: Ruby PAbbrev with Ruby Electric

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
581aaf382f766f8058f790899e75ea68?d=identicon&s=25 Christopher Campbell (Guest)
on 2005-12-31 19:35
(Received via mailing list)
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
This topic is locked and can not be replied to.