view lib-src/digest-doc.c @ 22758:dbd9ecc9dbac

Added next-buffer/previous-buffer keybindings (bound to M-n/M-p). (crisp-unbury-buffer): New function. Fixed bogus XEmacs/Lucid string-match checking. Made modeline entry mouse2-able. (crisp-mode-map): Make this a sparse keymap parented from current-global-map. (crisp-mode-original-keymap): Don't copy the keymap. (crisp-last-last-command): Renamed from last-last-command. defvar it. (crisp-mode): Honor ARG. (crisp-kill-line, crisp-copy-line): When a region isn't highlighted, use the region from point to eol. Honor prefix argument. (crisp-submit-bug-report): New command, taken from cc-mode. Shortened the version numbering, removed the release-version tracking (crisp-version): New function. New keybindings `C-home', `C-end', `M-home', `M-end', `C-f', `M-l', `M-m'. (crisp-copy-line): No need to save point. Removed S-right and S-left bindings. Abstract the marking and selection interfaces so that we can be compatible with both Emacs and XEmacs. And try and make the behavior as close as possible under both environments so that there are no surprises.
author Karl Heuer <kwzh@gnu.org>
date Tue, 14 Jul 1998 22:17:35 +0000
parents dd3b83e4ceb0
children c8fb06423da0
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>

int
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;
}