diff lib-src/make-docfile.c @ 96675:d45acf0c8d23

merging Emacs.app (NeXTstep port)
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Tue, 15 Jul 2008 18:15:18 +0000
parents e52e5a0794e7
children 6ab80abea3ee
line wrap: on
line diff
--- a/lib-src/make-docfile.c	Tue Jul 15 15:45:05 2008 +0000
+++ b/lib-src/make-docfile.c	Tue Jul 15 18:15:18 2008 +0000
@@ -533,7 +533,7 @@
 }
 
 /* Read through a c file.  If a .o file is named,
-   the corresponding .c file is read instead.
+   the corresponding .c or .m file is read instead.
    Looks for DEFUN constructs such as are defined in ../src/lisp.h.
    Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED.  */
 
@@ -555,6 +555,15 @@
 
   infile = fopen (filename, mode);
 
+  if (infile == NULL && extension == 'o')
+    {
+      /* try .m */
+      filename[strlen (filename) - 1] = 'm';
+      infile = fopen (filename, mode);
+      if (infile == NULL)
+        filename[strlen (filename) - 1] = 'c'; /* don't confuse people */
+    }
+
   /* No error if non-ex input file */
   if (infile == NULL)
     {