[PATCH ocaml] Fix ocaml faces

Jerry James <[email protected]>
Newsgroups gmane.emacs.xemacs.patches
Message-ID <CAHCOHQkGnjCA8uTRwcHZxK9bM9qqO7=AYkrhjjR=UQqErY=SoA@mail.gmail.com>
PATCH ocaml

I just tried to load an ocaml (*.ml) file and got an endless series of
warnings in the minibuffer:

Fontifying region...(invalid-argument No such face font-lock-doccomment-face)

I wasn't sure if it was better to take the approach shown in the patch
below or use copy-face.  I chose this approach because no other code
refers to the symbols Doc or Stop.  I think they were just convenient
shorthands for the author.

diff -r c4cb09505870 ChangeLog
--- a/ChangeLog Thu May 15 21:05:57 2014 +0200
+++ b/ChangeLog Thu Jun 05 14:09:27 2014 -0600
@@ -1,3 +1,7 @@
+2014-06-05  Jerry James  <[email protected]>
+
+ * caml-font.el: Define faces the XEmacs way.
+
 2014-05-15  Norbert Koch  <[email protected]>

  * Makefile (VERSION): XEmacs package 0.08 released.
diff -r c4cb09505870 caml-font.el
--- a/caml-font.el Thu May 15 21:05:57 2014 +0200
+++ b/caml-font.el Thu Jun 05 14:09:27 2014 -0600
@@ -28,13 +28,11 @@
     (setq font-lock-type-face 'DarkOliveGreen)
     (setq font-lock-reference-face 'CadetBlue)))
   ; extra faces for documention
-  (make-face 'Stop)
-  (set-face-foreground 'Stop "White")
-  (set-face-background 'Stop "Red")
-  (make-face 'Doc)
-  (set-face-foreground 'Doc "Red")
-  (setq font-lock-stop-face 'Stop)
-  (setq font-lock-doccomment-face 'Doc)
+  (make-face 'font-lock-stop-face)
+  (set-face-foreground 'font-lock-stop-face "White")
+  (set-face-background 'font-lock-stop-face "Red")
+  (make-face 'font-lock-doccomment-face)
+  (set-face-foreground 'font-lock-doccomment-face "Red")
 ))

 ; The same definition is in caml.el:

If this patch is acceptable, I will also copy the existing
caml-font.el to caml-font.el.upstream to avoid losing this change
during future syncs.
-- 
Jerry James
http://www.jamezone.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.