From: Kristof Bastiaensen Date: 2004-10-05T20:30:01+09:00 Subject: Re: Coding assistance for Emacs On Tue, 05 Oct 2004 09:25:27 +0200, Tassilo Horn wrote: > Hi Brian, > > I think I'll adopt a lot of your stuff. Especially looking up a keyword at > point is very useful to me. Thanks! Download the latest version at http://rubyforge.org/frs/?group_id=317&release_id=927 Are you using MS-Windows? Unfortunately it doesn't work for some emacs versions under windows :( This is probably a bug in the windows-versions, but I hope they will solve it. Here is an extract of my init.el file (for XEmacs): (add-hook 'ruby-mode-hook (lambda () (setq ruby-indent-level 3) (local-set-key 'f1 'ri) (local-set-key '(return) 'ruby-reindent-then-newline-and-indent) (local-set-key '(meta control h) 'ruby-mark-defun))) ;change the colors used in the ri-help buffer (if (device-on-window-system-p) (setq ansi-color-names-vector ["black" "red3" "darkgreen" "yellow3" "blue1" "darkmagenta" "darkcyan" "white"])) (autoload 'ri "~/.xemacs/ri-ruby.el" "get information on ruby methods and classes" t) ;freeze and colorize the prompt in comint-modes (i.e.: Inferior Ruby) (let ((prompt-face (make-face 'comint-prompt-face "the face used for the prompt in comint-mode"))) (set-face-foreground 'comint-prompt-face (if (device-on-window-system-p) "brown4" "red"))) (defun comint-freeze-prompt (&optional string) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (if (re-search-backward comint-prompt-regexp (point-at-bol) t) (let ((extent (make-extent (match-beginning 0) (match-end 0)))) (set-extent-face extent (or (find-face 'comint-prompt-face) (find-face 'default))) (set-extent-property extent 'read-only t))))) (add-hook 'comint-load-hook (lambda () (setq comint-output-filter-functions (append '(comint-freeze-prompt comint-strip-ctrl-m) comint-output-filter-functions)))) Regards, KB