Mercurial > hg > xemacs-beta
annotate lib-src/digest-doc.c @ 5562:855b667dea13
Drop cl-macro-environment in favour of byte-compile-macro-environment.
lisp/ChangeLog addition:
2011-09-04 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp-runtime.el:
* bytecomp-runtime.el (byte-compile-macro-environment): Moved from
bytecomp.el.
* bytecomp.el:
* bytecomp.el (byte-compile-initial-macro-environment):
Add implementations for #'load-time-value, #'labels here, now
cl-macs respects byte-compile-macro-environment.
* bytecomp.el (byte-compile-function-environment):
* bytecomp.el (byte-compile-macro-environment): Removed.
* bytecomp.el (symbol-value):
* bytecomp.el (byte-compile-symbol-value): Removed.
* cl-extra.el (cl-macroexpand-all):
* cl-macs.el:
* cl-macs.el (bind-block):
* cl-macs.el (cl-macro-environment): Removed.
* cl-macs.el (cl-transform-lambda):
* cl-macs.el (load-time-value):
* cl-macs.el (block):
* cl-macs.el (flet):
* cl-macs.el (labels):
* cl-macs.el (macrolet):
* cl-macs.el (symbol-macrolet):
* cl-macs.el (lexical-let):
* cl-macs.el (apply):
* cl-macs.el (nthcdr):
* cl-macs.el (getf):
* cl-macs.el (substring):
* cl-macs.el (values):
* cl-macs.el (get-setf-method):
* cl-macs.el (cl-setf-do-modify):
* cl.el:
* cl.el (cl-macro-environment): Removed.
* cl.el (cl-macroexpand):
* obsolete.el (cl-macro-environment): Moved here.
Drop cl-macro-environment, in favour of
byte-compile-macro-environment; make the latter available in
bytecomp-runtime.el. This makes byte-compile-macro-environment far
less useless, since previously code that used cl-macs would ignore
it when calling #'cl-macroexpand-all.
Add byte-compiler-specific implementations for #'load-time-value,
#'labels. The latter is very nice indeed; it avoids the run-time
consing of the current implementation, is fully lexical and avoids
the run-time shadowing of symbol function slots that flet uses. It
would now be reasonable to move most core uses of flet to use
labels instead. Non-core code can't rely on print-circle for
mutually recursive functions, though, so it's less of an evident
win.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 04 Sep 2011 20:37:55 +0100 |
parents | 06dd936cde16 |
children |
rev | line source |
---|---|
5491 | 1 /* Give this program DOC-mm.nn.oo as standard input and it outputs to |
2 standard output a file of nroff output containing the doc strings. | |
3 | |
4 Copyright (C) 1987, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | |
5 2008, 2009, 2010 Free Software Foundation, Inc. | |
6 | |
7 This file is part of XEmacs. | |
8 | |
9 XEmacs is free software: you can redistribute it and/or modify | |
10 it under the terms of the GNU General Public License as published by | |
11 the Free Software Foundation, either version 3 of the License, or | |
12 (at your option) any later version. | |
428 | 13 |
5491 | 14 XEmacs is distributed in the hope that it will be useful, |
15 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 GNU General Public License for more details. | |
18 | |
19 You should have received a copy of the GNU General Public License | |
20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. | |
21 | |
22 | |
23 See also sorted-doc.c, which produces similar output | |
24 but in texinfo format and sorted by function/variable name. */ | |
25 | |
26 /* Synced up with: GNU 23.1.92. */ | |
27 /* Synced by: Ben Wing, 2-17-10. */ | |
428 | 28 |
29 #ifdef emacs | |
438 | 30 #include <config.h> |
428 | 31 #endif |
32 #include <stdio.h> | |
33 | |
5491 | 34 #ifdef WIN32_NATIVE |
35 #include <fcntl.h> /* for O_BINARY */ | |
36 #include <io.h> /* for setmode */ | |
37 #endif | |
38 | |
428 | 39 int |
2367 | 40 main (int argc, char **argv) |
428 | 41 { |
42 register int ch; | |
43 register int notfirst = 0; | |
44 | |
5491 | 45 #ifdef WIN32_NATIVE |
46 /* DOC is a binary file. */ | |
47 if (!isatty (fileno (stdin))) | |
48 setmode (fileno (stdin), O_BINARY); | |
49 #endif | |
50 | |
428 | 51 printf (".TL\n"); |
613 | 52 printf ("Command Summary for XEmacs\n"); |
53 printf (".AU\nThe XEmacs Advocacy Group\n"); | |
428 | 54 while ((ch = getchar ()) != EOF) |
55 { | |
56 if (ch == '\037') | |
57 { | |
58 if (notfirst) | |
59 printf ("\n.DE"); | |
60 else | |
61 notfirst = 1; | |
62 | |
63 printf ("\n.SH\n"); | |
64 | |
65 ch = getchar (); | |
66 printf (ch == 'F' ? "Function " : "Variable "); | |
67 | |
68 while ((ch = getchar ()) != '\n') /* Changed this line */ | |
69 { | |
70 if (ch != EOF) | |
71 putchar (ch); | |
72 else | |
73 { | |
74 ungetc (ch, stdin); | |
75 break; | |
76 } | |
77 } | |
78 printf ("\n.DS L\n"); | |
79 } | |
80 else | |
81 putchar (ch); | |
82 } | |
83 return 0; | |
84 } | |
5491 | 85 |
86 /* arch-tag: 2ba2c9b0-4157-4eba-bd9f-967e3677e35f | |
87 (do not change this comment) */ |