latest ruby-mode.el messing up c++ mode fontification 
Author Message
 latest ruby-mode.el messing up c++ mode fontification

I just grabbed the latest CVS version of ruby-mode.el last week, and it
seems to have some nice new fontification and indentation features.

However, once I have loaded a ruby file, if I then load a C++ file, any
single line comments (using //) now are not fontified right.

Is ruby-mode changing some global fontification resources?  If I never
invoke ruby-mode, then the C++ code looks fine...

Has anyone else seen this?

BTW, I am using emacs 21.1.1 on Linux.

--
The key of strategy... is not to choose a path that leads to victory, but
to choose so that all paths lead to a victory.
-- L.M. Bujold



Tue, 20 Jul 2004 02:27:07 GMT  
 latest ruby-mode.el messing up c++ mode fontification
Hi,

In message "latest ruby-mode.el messing up c++ mode fontification"

|Is ruby-mode changing some global fontification resources?  If I never
|invoke ruby-mode, then the C++ code looks fine...

Here's the patch.

--- ruby-mode.el        2002/01/25 08:22:11     1.45

               (make-local-variable 'font-lock-defaults)
+              (make-local-variable 'font-lock-keywords)
+              (make-local-variable 'font-lock-syntactic-keywords)
               (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))



Tue, 20 Jul 2004 12:07:35 GMT  
 latest ruby-mode.el messing up c++ mode fontification

Quote:

> Hi,

> In message "latest ruby-mode.el messing up c++ mode fontification"

> |Is ruby-mode changing some global fontification resources?  If I never
> |invoke ruby-mode, then the C++ code looks fine...

> Here's the patch.

> --- ruby-mode.el      2002/01/25 08:22:11     1.45
> +++ ruby-mode.el      2002/02/01 04:00:52

>  (make-local-variable 'font-lock-defaults)
> +            (make-local-variable 'font-lock-keywords)
> +            (make-local-variable 'font-lock-syntactic-keywords)
>  (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))

Thanks--works perfectly now.

One thing I have really missed is (show-paren-style (quote expression))
when using ruby.  I've written an equivalent (that highlights ruby ... end
blocks, but it is a fragile hack (my emacs lisp skills are not up to par)
which tends to break easily.

Does anyone else have something like this?



Wed, 21 Jul 2004 03:17:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. hideshow mode for ruby-mode.el

2. ruby-mode fontification and indent behavior

3. ruby-mode.el was: ruby indenter

4. ruby-mode.el was: ruby indenter

5. Latest Python-mode.el?

6. verilog-mode.el indent unlike c-mode ...

7. Emacs VHDL editing mode (vhdl-mode.el version 2.74)

8. Emacs VHDL editing mode (vhdl-mode.el version 2.71)

9. Emacs VHDL editing mode (vhdl-mode.el version 2.56.1.1)

10. Emacs VHDL editing mode (vhdl-mode.el version 2.56.1.1)

11. VHDL mode for Emacs (vhdl-mode.el version 2.50)

12. ruby-mode.el again; imenu this time

 

 
Powered by phpBB® Forum Software