view lib-src/digest-doc.c @ 4739:e248ce46bca8

- (hilit-rehighlight-region): added (save-restriction (widen)) to avoid hangups in dired. - Also slight improvements to fortran patterns and hilit-default-face-table doc string - added optional case-fold argument to hilit-set-mode-patterns - added hilit-rehighlight-buffer-quietly to dired-after-readin-hook - fixed bug in hilit-string-find that mishandled some strings: "\\" - work-around for bug in next-overlay-change - the pattern matcher now starts it's searches from the end of the most recently highlighted region (which is not necessarily the end of the most recently matched regex). - code moved from hilit-highlight-region to hilit-set-mode-patterns. This will affect you if you pass your patterns directly to hilit-highlight-region....use a pseudo-mode instead. - twiddled C/C++, latex, texinfo, fortran, nroff patterns. - added calendar-mode, icon-mode and pascal-mode patterns - diverged lisp-mode and emacs-lisp-mode...also added lisp keywords.
author Richard M. Stallman <rms@gnu.org>
date Sat, 18 Sep 1993 02:13:02 +0000
parents bba832d91c66
children dd3b83e4ceb0
line wrap: on
line source

/* Give this program DOCSTR.mm.nn as standard input
   and it outputs to standard output
   a file of nroff output containing the doc strings.

   See also sorted-doc.c, which produces similar output
   but in texinfo format and sorted by function/variable name.  */

#include <stdio.h>
main ()
{
  register int ch;
  register int notfirst = 0;

  printf (".TL\n");
  printf ("Command Summary for GNU Emacs\n");
  printf (".AU\nRichard M. Stallman\n");
  while ((ch = getchar ()) != EOF)
    {
      if (ch == '\037')
	{
	  if (notfirst)
	    printf ("\n.DE");
	  else
	    notfirst = 1;

	  printf ("\n.SH\n");

	  ch = getchar ();
	  printf (ch == 'F' ? "Function " : "Variable ");

	  while ((ch = getchar ()) != '\n')  /* Changed this line */
	    {
	      if (ch != EOF)
		  putchar (ch);
	      else
		{
		  ungetc (ch, stdin);
		  break;
		}
	    }
	  printf ("\n.DS L\n");
	}
      else
	putchar (ch);
    }
  return 0;
}