all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fontification Bug
@ 2007-05-12  8:50 Davin Pearson
  0 siblings, 0 replies; 3+ messages in thread
From: Davin Pearson @ 2007-05-12  8:50 UTC (permalink / raw)
  To: bug-gnu-emacs

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing
list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600)
 of 2004-03-11 on NYAUMO
configured using `configure --with-gcc (3.2)'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENZ
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I sent a message to gnu.emacs.help but received no answer.

For a reason to do with debugging my C++ code, I need to use the
following fontification code:

(add-hook 'font-lock-mode-hook 'my-special-font-lock-mode-hook)

(make-face 'my-face-cc-illegal-type)
(set-face-background 'my-face-cc-illegal-type "#0ff")
(set-face-foreground 'my-face-cc-illegal-type "#f00")

(defun my-special-font-lock-mode-hook ()
  (font-lock-add-keywords
   'c++-mode
   '(
     ("\\<[A-Z]+[a-z][a-zA-Z0-9_]*\\>" 0 'my-face-cc-illegal-type t)
     )
   nil
   ))

The trouble is that it also fontifies strings and comments in the face
my-face-cc-illegal-type, something that I don't want fontified.

Please help me to get the fontification correct!

Recent input:
C-f m y <tab> . <backspace> a . c <tab> <return> M-x
r e p o r t - 0 e <backspace> <backspace> e m a c s
- b <tab> <return>

Recent messages:
Loading cc-mode...
Loading image...done
Loading cc-mode...done
Loading font-lock...
Loading regexp-opt...done
Loading font-lock...done
Loading d:/home/mylisp/diagnose.el (source)...done
Loading d:/home/mylisp/experimental/for-a-reason.el (source)...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done

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

* Re: Fontification Bug
@ 2007-05-13  7:47 martin rudalics
  2007-05-13  8:00 ` Davin Pearson
  0 siblings, 1 reply; 3+ messages in thread
From: martin rudalics @ 2007-05-13  7:47 UTC (permalink / raw)
  To: davin.pearson; +Cc: bug-gnu-emacs

Does it work with

(defun my-special-font-lock-mode-hook ()
  (font-lock-add-keywords
   'c++-mode
   '(("\\<[A-Z]+[a-z][a-zA-Z0-9_]*\\>" 0 'my-face-cc-illegal-type keep))))

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

* Re: Fontification Bug
  2007-05-13  7:47 martin rudalics
@ 2007-05-13  8:00 ` Davin Pearson
  0 siblings, 0 replies; 3+ messages in thread
From: Davin Pearson @ 2007-05-13  8:00 UTC (permalink / raw)
  To: martin rudalics; +Cc: bug-gnu-emacs

On 13/05/07, martin rudalics <rudalics@gmx.at> wrote:
> Does it work with
>
> (defun my-special-font-lock-mode-hook ()
>   (font-lock-add-keywords
>    'c++-mode
>    '(("\\<[A-Z]+[a-z][a-zA-Z0-9_]*\\>" 0 'my-face-cc-illegal-type keep))))
>
>

Yes thank you very much... it does work


-- 
Davin Pearson    http://www.davinpearson.com

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

end of thread, other threads:[~2007-05-13  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-12  8:50 Fontification Bug Davin Pearson
  -- strict thread matches above, loose matches on Subject: below --
2007-05-13  7:47 martin rudalics
2007-05-13  8:00 ` Davin Pearson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.