Index: src/commentscan.l
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/commentscan.l,v
retrieving revision 1.7
diff -u -r1.7 commentscan.l
--- src/commentscan.l	31 Dec 2012 14:13:29 -0000	1.7
+++ src/commentscan.l	6 Jan 2013 14:32:09 -0000
@@ -314,6 +314,7 @@
 
 DocCmdMapper *DocCmdMapper::s_instance=0;
   
+bool inInternalDocs = FALSE;
   
 #define YY_NEVER_INTERACTIVE 1
 
@@ -1018,9 +1019,11 @@
   					  BEGIN(HtmlComment);
 					}
 <Comment>{B}*{CMD}"endinternal"{B}*	{
-  					  warn(yyFileName,yyLineNr,
+                                          if (!inInternalDocs)
+  					    warn(yyFileName,yyLineNr,
                                                "warning: found \\endinternal without matching \\internal"
                                               );
+                                          inInternalDocs = FALSE;
   					}
 <Comment>{B}*{CMD}[a-z_A-Z]+{B}*	{ // potentially interesting command
                                           // the {B}* in the front was added for bug620924
@@ -2561,6 +2564,7 @@
   {
     // re-enabled for bug640828
     addOutput("\\internal "); 
+    inInternalDocs = TRUE;
   }
   return FALSE;
 }
