aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/make-docfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r--lib-src/make-docfile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 81071047446..945a92076d2 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -533,7 +533,7 @@ write_c_args (out, func, buf, minargs, maxargs)
533} 533}
534 534
535/* Read through a c file. If a .o file is named, 535/* Read through a c file. If a .o file is named,
536 the corresponding .c file is read instead. 536 the corresponding .c or .m file is read instead.
537 Looks for DEFUN constructs such as are defined in ../src/lisp.h. 537 Looks for DEFUN constructs such as are defined in ../src/lisp.h.
538 Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */ 538 Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */
539 539
@@ -555,6 +555,15 @@ scan_c_file (filename, mode)
555 555
556 infile = fopen (filename, mode); 556 infile = fopen (filename, mode);
557 557
558 if (infile == NULL && extension == 'o')
559 {
560 /* try .m */
561 filename[strlen (filename) - 1] = 'm';
562 infile = fopen (filename, mode);
563 if (infile == NULL)
564 filename[strlen (filename) - 1] = 'c'; /* don't confuse people */
565 }
566
558 /* No error if non-ex input file */ 567 /* No error if non-ex input file */
559 if (infile == NULL) 568 if (infile == NULL)
560 { 569 {