unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* font-lock not working correctly
@ 2004-12-17 18:49 Rodney Gordon II
  2004-12-17 20:09 ` Peter Dyballa
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rodney Gordon II @ 2004-12-17 18:49 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 1015 bytes --]

I am using emacs21 on Debian sid, to start things off.
The only elisp I load is color-theme.el and cperl-mode.el, both latest
version.

Attached is a image, showing the problem, and my .emacs file.

With my setup, font-lock never seems to highlight things like it should.
It highlights, but maybe only 2 or 3 colors. I have tried c files and
perl files, which work perfectly fine on others' systems with emacs (I
don't know if their system is different or not).

What I get is shown on the attached image, which is hardly helpful :)
The odd thing is that if I run emacs -q and do the things in my .emacs
file *manually*, it highlights perfectly.

Have asked on #emacs on FreeNode, but nobody seems to have an idea :/
I am hoping I am doing something simple wrong..

Any help would be greatly appreciated. Please mail me directly.

Thanks,
-r
-- 
Rodney Gordon II (meff)             |         meff <at> pobox <dot> com
http://www.spherevision.org         |                      AIM: mefforz

[-- Attachment #1.1.2: messed.jpg --]
[-- Type: image/jpeg, Size: 44032 bytes --]

[-- Attachment #1.1.3: dotemacs --]
[-- Type: text/plain, Size: 753 bytes --]

;;; make load-path ~/elisp
(add-to-list 'load-path (expand-file-name "~/elisp"))


;;; general setup
;; enable font lock globally
(global-font-lock-mode 1)

;; setup syntax hilighting
(require 'color-theme)
(color-theme-charcoal-black)

;; show parens
(show-paren-mode 1)

;; make backing up smarter
(setq
	backup-by-copying t            ; don't clobber symlinks
	backup-directory-alist
	'(("." . "~/.emacsbackup"))    ; don't litter my fs tree
	delete-old-versions t
	kept-new-versions 6
	kept-old-versions 2
	version-control t)             ; use versioned backups


;;; edit mode setup
;; use cperl and set some defines
(defalias 'perl-mode 'cperl-mode)
(setq cperl-invalid-face (quote off))
(setq cperl-indent-level 4)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 18:49 font-lock not working correctly Rodney Gordon II
@ 2004-12-17 20:09 ` Peter Dyballa
  2004-12-17 20:36   ` Rodney Gordon II
  2004-12-17 20:43 ` Peter Dyballa
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2004-12-17 20:09 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 17.12.2004 um 19:49 schrieb Rodney Gordon II:

> With my setup, font-lock never seems to highlight things like it 
> should.
> It highlights, but maybe only 2 or 3 colors.

Have you tried M-x list-colors-display? Does it show more than eight 
ANSI colours? In xterm or Apple's Terminal.app I don't have more 
colours than these too ...

--
Greetings

   Pete

Ce qui été compris n'existe plus.    (Paul Eluard)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 20:09 ` Peter Dyballa
@ 2004-12-17 20:36   ` Rodney Gordon II
  0 siblings, 0 replies; 8+ messages in thread
From: Rodney Gordon II @ 2004-12-17 20:36 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 522 bytes --]

On Fri, 2004-12-17 at 21:09 +0100, Peter Dyballa wrote:
> Have you tried M-x list-colors-display? Does it show more than eight 
> ANSI colours? In xterm or Apple's Terminal.app I don't have more 
> colours than these too ...

Yeah, it shows all of the colors. I've tried running emacs on X also,
same problem, font-lock still isn't working right.

Thanks,
-r

-- 
Rodney Gordon II (meff)             |         meff <at> pobox <dot> com
http://www.spherevision.org         |                      AIM: mefforz

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 18:49 font-lock not working correctly Rodney Gordon II
  2004-12-17 20:09 ` Peter Dyballa
@ 2004-12-17 20:43 ` Peter Dyballa
  2004-12-17 20:58   ` Rodney Gordon II
  2004-12-17 21:14 ` Peter Dyballa
  2004-12-26 23:02 ` Kai Grossjohann
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2004-12-17 20:43 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 17.12.2004 um 19:49 schrieb Rodney Gordon II:

> With my setup, font-lock never seems to highlight things like it 
> should.
> It highlights, but maybe only 2 or 3 colors.

Would these lines from my .emacs help?

(cond ((fboundp 'global-font-lock-mode)
        ;; Turn on font-lock in all modes that support it
        (global-font-lock-mode t)
        (setq jit-lock-mode t)
        ;; Maximum colors
        (setq font-lock-maximum-decoration t)))

--
Greetings

   Pete                                           0
                                            %-/\_//
                                             (*)(*)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 20:43 ` Peter Dyballa
@ 2004-12-17 20:58   ` Rodney Gordon II
  0 siblings, 0 replies; 8+ messages in thread
From: Rodney Gordon II @ 2004-12-17 20:58 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 859 bytes --]

On Fri, 2004-12-17 at 21:43 +0100, Peter Dyballa wrote:
> Would these lines from my .emacs help?
> 
> (cond ((fboundp 'global-font-lock-mode)
>         ;; Turn on font-lock in all modes that support it
>         (global-font-lock-mode t)
>         (setq jit-lock-mode t)
>         ;; Maximum colors
>         (setq font-lock-maximum-decoration t)))

As much as I wished this would work (I've been trying everything) ..
still didn't help..

I don't understand why it works if I do everything in my .emacs
manually, and it isn't the global elisp stuff because I tried moving
that out of the way and trying also, still didn't help.

I'm at a loss of what to do at this point :/

Thanks!
-r
-- 
Rodney Gordon II (meff)             |         meff <at> pobox <dot> com
http://www.spherevision.org         |                      AIM: mefforz

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 18:49 font-lock not working correctly Rodney Gordon II
  2004-12-17 20:09 ` Peter Dyballa
  2004-12-17 20:43 ` Peter Dyballa
@ 2004-12-17 21:14 ` Peter Dyballa
  2004-12-17 21:45   ` Rodney Gordon II
  2004-12-26 23:02 ` Kai Grossjohann
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2004-12-17 21:14 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 17.12.2004 um 19:49 schrieb Rodney Gordon II:

> I load is color-theme.el and cperl-mode.el

Check whether your colour theme changes things to dull! This can be 
done by M-x list-faces-display (also Edit menu -> Text properties -> 
List Faces). How many colours are there?

Check what cperl-mode.el contains to colourize the syntax and put a 
copy of this at the end (after 1. loading color-theme and setting your 
theme, 2. customizing font-lock as maximum) of your .emacs. Since you 
have a screenshot you could try to change some colours ans see whether 
this work.

--
Greetings

   Pete                                           0
                                            %-/\_//
                                             (*)(*)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 21:14 ` Peter Dyballa
@ 2004-12-17 21:45   ` Rodney Gordon II
  0 siblings, 0 replies; 8+ messages in thread
From: Rodney Gordon II @ 2004-12-17 21:45 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1660 bytes --]

On Fri, 2004-12-17 at 22:14 +0100, Peter Dyballa wrote:
> Am 17.12.2004 um 19:49 schrieb Rodney Gordon II:
> 
> > I load is color-theme.el and cperl-mode.el
> 
> Check whether your colour theme changes things to dull! This can be 
> done by M-x list-faces-display (also Edit menu -> Text properties -> 
> List Faces). How many colours are there?

Lots and lots of colors .. definately not what I'd call dull :)


Tried just doing 'emacs -q' .. then load the file, then 'M-x
cperl-mode', then 'M-x font-lock-mode' and it's all highlighted
correctly. Yet, putting the same in my .emacs, it's messed up again.
Seems the only way to get it to work is manually.. :/

> Check what cperl-mode.el contains to colourize the syntax and put a 
> copy of this at the end (after 1. loading color-theme and setting your 
> theme, 2. customizing font-lock as maximum) of your .emacs. Since you 
> have a screenshot you could try to change some colours ans see whether 
> this work.

Things are correct when I do what I just said above, however I have a
hard time believing its the color-theme.el because if I comment it out
of my .emacs file, the highlighting is still broken.

I have tried turning font-lock off, and then on again while I have the
perl file loaded, no help. As fas as finding what cperl-mode uses to
font-lock, I have no idea, because I am very new to lisp and just the
sheer size of that file scares me :)

Thanks for all your help, and I hope we can figure this out!
-r
-- 
Rodney Gordon II (meff)             |         meff <at> pobox <dot> com
http://www.spherevision.org         |                      AIM: mefforz

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font-lock not working correctly
  2004-12-17 18:49 font-lock not working correctly Rodney Gordon II
                   ` (2 preceding siblings ...)
  2004-12-17 21:14 ` Peter Dyballa
@ 2004-12-26 23:02 ` Kai Grossjohann
  3 siblings, 0 replies; 8+ messages in thread
From: Kai Grossjohann @ 2004-12-26 23:02 UTC (permalink / raw)


Rodney Gordon II <meff@pobox.com> writes:

> With my setup, font-lock never seems to highlight things like it should.
> It highlights, but maybe only 2 or 3 colors. I have tried c files and
> perl files, which work perfectly fine on others' systems with emacs (I
> don't know if their system is different or not).

I think there's a bug in your .emacs file.  Start Emacs as follows:

    emacs -debug-init

This ought to show you pretty clearly if there is a syntax error, and
if so, where it is.

(Hint: I suspect the cperl face definition, as off is not a valid
face.  You could try to use default instead of off...)

Kai

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-12-26 23:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-17 18:49 font-lock not working correctly Rodney Gordon II
2004-12-17 20:09 ` Peter Dyballa
2004-12-17 20:36   ` Rodney Gordon II
2004-12-17 20:43 ` Peter Dyballa
2004-12-17 20:58   ` Rodney Gordon II
2004-12-17 21:14 ` Peter Dyballa
2004-12-17 21:45   ` Rodney Gordon II
2004-12-26 23:02 ` Kai Grossjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).