From: Le Wang <> Date: 2001-12-24T02:37:40+09:00 Subject: [ruby-talk:29370] Re: XEmacs problems with ruby-mode.el It seems I'm talking to myself here, but I founnd a patch for a previous version of ruby-mode.el by searching for "xemacs + ruby-mode.el" from google, and did something similar for version 1.39, and it seems to be working for me. ************************************************************* --- ruby-mode.el Sun Dec 23 10:28:58 2001 +++ ruby-mode.el.new Sun Dec 23 10:44:16 2001 @@ -671,10 +671,6 @@ (or (boundp 'font-lock-variable-name-face) (setq font-lock-variable-name-face font-lock-type-face)) - - (add-hook 'ruby-mode-hook - '(lambda () - (make-local-variable 'font-lock-syntactic-keywords) (setq font-lock-syntactic-keywords '( ;; #{ }, #$hoge, #@foo are not comments @@ -707,9 +703,14 @@ (4 (7 . nil))) ("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil)) ("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil)))) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil)) - (setq font-lock-keywords ruby-font-lock-keywords))) + (put major-mode 'font-lock-defaults + '((ruby-font-lock-keywords) + nil nil nil + beginning-of-line + (font-lock-syntactic-keywords + . ruby-font-lock-syntactic-keywords))) + + (defun ruby-font-lock-docs (limit) (if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t) ************************************************************* -lw On Sat, 22 Dec 2001 01:25:21 -0500, Le Wang <> wrote: >Hi, > >Anyone know what the story is with the XEmacs and ruby-mode.el? I >always get really weird errors, and when I have font-lock enabled and >scroll thru a ruby file. Here is a sample: > >------------------------------------- >Signaling: (beginning-of-buffer) > signal(beginning-of-buffer nil) > scroll-signal-boundary-error(1 -30) > scroll-window-in-place(# nil -1) > scroll-window(# nil -1) > scroll-down(nil) > scroll-down-command(nil) > call-interactively(scroll-down-command) >------------------------------------- > > > >or this baby when I have lazy-shot enabled: >------------------------------------- >Signaling: (invalid-function 1) > (1) > eval((1)) > font-lock-fontify-keywords-region(1 1056 nil) > font-lock-default-fontify-region(1 1056 nil) > font-lock-fontify-region(1 1056) > lazy-shot-fontify-internal(# 1 1038 t "") > lazy-shot-lock-extent(# nil) > lazy-shot-redisplay-function(#) >------------------------------------- > > >Matz keeps updating ruby-mode.el, (up to 1.39 now, I think). But this >problem is just not going away... > > >-lw