diff options
| author | Pavel Janík | 2001-11-02 22:38:57 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-11-02 22:38:57 +0000 |
| commit | 020f9b3851981c35cf255c7ea6ce532d3b6ef5ba (patch) | |
| tree | f0afe0f90f91951c3e1ba1c3fb2416622c6c269c /src | |
| parent | 58ab49e32cb05d3ef667e9f71c341faaf149bb1d (diff) | |
| download | emacs-020f9b3851981c35cf255c7ea6ce532d3b6ef5ba.tar.gz emacs-020f9b3851981c35cf255c7ea6ce532d3b6ef5ba.zip | |
(Fml_defun, Fml_while, Fml_substr): Remove commented and #ifdef'd-out code.
Fix and reindent comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/mocklisp.c | 67 |
2 files changed, 9 insertions, 65 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8a967ed713f..4462c61f47e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2001-11-02 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 1 | 2001-11-02 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 2 | ||
| 3 | * mocklisp.c (Fml_defun, Fml_while, Fml_substr): Remove commented | ||
| 4 | and #ifdef'd-out code. | ||
| 5 | Fix and reindent comments. | ||
| 6 | |||
| 7 | * mocklisp.h: Remove comment which is a copy of comment in | ||
| 8 | mocklisp.c. | ||
| 9 | |||
| 3 | * category.h (CHECK_CATEGORY, CHECK_CATEGORY_SET): Remove unused | 10 | * category.h (CHECK_CATEGORY, CHECK_CATEGORY_SET): Remove unused |
| 4 | argument `i' in macros. | 11 | argument `i' in macros. |
| 5 | 12 | ||
diff --git a/src/mocklisp.c b/src/mocklisp.c index 55ccce546c1..be98692c423 100644 --- a/src/mocklisp.c +++ b/src/mocklisp.c | |||
| @@ -25,24 +25,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "buffer.h" | 26 | #include "buffer.h" |
| 27 | 27 | ||
| 28 | /* Now in lisp code ("macrocode...") | ||
| 29 | * DEFUN ("ml-defun", Fml_defun, Sml_defun, 0, UNEVALLED, 0, | ||
| 30 | * "Define mocklisp functions") | ||
| 31 | * (args) | ||
| 32 | * Lisp_Object args; | ||
| 33 | * { | ||
| 34 | * Lisp_Object elt; | ||
| 35 | * | ||
| 36 | * while (!NILP (args)) | ||
| 37 | * { | ||
| 38 | * elt = Fcar (args); | ||
| 39 | * Ffset (Fcar (elt), Fcons (Qmocklisp, Fcdr (elt))); | ||
| 40 | * args = Fcdr (args); | ||
| 41 | * } | ||
| 42 | * return Qnil; | ||
| 43 | * } | ||
| 44 | */ | ||
| 45 | |||
| 46 | DEFUN ("ml-if", Fml_if, Sml_if, 0, UNEVALLED, 0, | 28 | DEFUN ("ml-if", Fml_if, Sml_if, 0, UNEVALLED, 0, |
| 47 | doc: /* Mocklisp version of `if'. | 29 | doc: /* Mocklisp version of `if'. |
| 48 | usage: (ml-if COND THEN ELSE...) */) | 30 | usage: (ml-if COND THEN ELSE...) */) |
| @@ -70,32 +52,10 @@ usage: (ml-if COND THEN ELSE...) */) | |||
| 70 | return val; | 52 | return val; |
| 71 | } | 53 | } |
| 72 | 54 | ||
| 73 | #if 0 /* Now converted to regular "while" by hairier conversion code. */ | ||
| 74 | /**/DEFUN ("ml-while", Fml_while, Sml_while, 1, UNEVALLED, 0, "while for mocklisp programs") | ||
| 75 | (args) | ||
| 76 | Lisp_Object args; | ||
| 77 | { | ||
| 78 | Lisp_Object test, body, tem; | ||
| 79 | struct gcpro gcpro1, gcpro2; | ||
| 80 | |||
| 81 | GCPRO2 (test, body); | ||
| 82 | |||
| 83 | test = Fcar (args); | ||
| 84 | body = Fcdr (args); | ||
| 85 | while (tem = Feval (test), XINT (tem)) | ||
| 86 | { | ||
| 87 | QUIT; | ||
| 88 | Fprogn (body); | ||
| 89 | } | ||
| 90 | |||
| 91 | UNGCPRO; | ||
| 92 | return Qnil; | ||
| 93 | } | ||
| 94 | #endif | ||
| 95 | 55 | ||
| 96 | /* This is the main entry point to mocklisp execution. | 56 | /* This is the main entry point to mocklisp execution. |
| 97 | When eval sees a mocklisp function being called, it calls here | 57 | When eval sees a mocklisp function being called, it calls here |
| 98 | with the unevaluated argument list */ | 58 | with the unevaluated argument list. */ |
| 99 | 59 | ||
| 100 | Lisp_Object | 60 | Lisp_Object |
| 101 | ml_apply (function, args) | 61 | ml_apply (function, args) |
| @@ -181,26 +141,6 @@ DEFUN ("ml-prefix-argument-loop", Fml_prefix_argument_loop, Sml_prefix_argument_ | |||
| 181 | return Qnil; | 141 | return Qnil; |
| 182 | } | 142 | } |
| 183 | 143 | ||
| 184 | #if 0 /* Now in mlsupport.el */ | ||
| 185 | |||
| 186 | DEFUN ("ml-substr", Fml_substr, Sml_substr, 3, 3, 0, | ||
| 187 | doc: /* Return a substring of STRING, starting at index FROM and of length LENGTH. | ||
| 188 | If either FROM or LENGTH is negative, the length of STRING is added to it. */) | ||
| 189 | (string, from, to) | ||
| 190 | Lisp_Object string, from, to; | ||
| 191 | { | ||
| 192 | CHECK_STRING (string); | ||
| 193 | CHECK_NUMBER (from); | ||
| 194 | CHECK_NUMBER (to); | ||
| 195 | |||
| 196 | if (XINT (from) < 0) | ||
| 197 | XSETINT (from, XINT (from) + XSTRING (string)->size); | ||
| 198 | if (XINT (to) < 0) | ||
| 199 | XSETINT (to, XINT (to) + XSTRING (string)->size); | ||
| 200 | XSETINT (to, XINT (to) + XINT (from)); | ||
| 201 | return Fsubstring (string, from, to); | ||
| 202 | } | ||
| 203 | #endif /* 0 */ | ||
| 204 | DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0, | 144 | DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0, |
| 205 | doc: /* Mocklisp-compatibility insert function. | 145 | doc: /* Mocklisp-compatibility insert function. |
| 206 | Like the function `insert' except that any argument that is a number | 146 | Like the function `insert' except that any argument that is a number |
| @@ -238,14 +178,11 @@ syms_of_mocklisp () | |||
| 238 | Qmocklisp = intern ("mocklisp"); | 178 | Qmocklisp = intern ("mocklisp"); |
| 239 | staticpro (&Qmocklisp); | 179 | staticpro (&Qmocklisp); |
| 240 | 180 | ||
| 241 | /*defsubr (&Sml_defun);*/ | ||
| 242 | defsubr (&Sml_if); | 181 | defsubr (&Sml_if); |
| 243 | /*defsubr (&Sml_while);*/ | ||
| 244 | defsubr (&Sml_arg); | 182 | defsubr (&Sml_arg); |
| 245 | defsubr (&Sml_nargs); | 183 | defsubr (&Sml_nargs); |
| 246 | defsubr (&Sml_interactive); | 184 | defsubr (&Sml_interactive); |
| 247 | defsubr (&Sml_provide_prefix_argument); | 185 | defsubr (&Sml_provide_prefix_argument); |
| 248 | defsubr (&Sml_prefix_argument_loop); | 186 | defsubr (&Sml_prefix_argument_loop); |
| 249 | /*defsubr (&Sml_substr);*/ | ||
| 250 | defsubr (&Sinsert_string); | 187 | defsubr (&Sinsert_string); |
| 251 | } | 188 | } |