Mercurial > emacs
comparison src/callint.c @ 109423:ae5ef13849d8
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 04 Jul 2010 22:11:22 +0000 |
parents | aec1143e8d85 |
children | 750db9f3e6d8 |
comparison
equal
deleted
inserted
replaced
109422:bcedeeedc5fb | 109423:ae5ef13849d8 |
---|---|
28 #include "keyboard.h" | 28 #include "keyboard.h" |
29 #include "window.h" | 29 #include "window.h" |
30 #include "keymap.h" | 30 #include "keymap.h" |
31 | 31 |
32 #ifdef HAVE_INDEX | 32 #ifdef HAVE_INDEX |
33 extern char *index P_ ((const char *, int)); | 33 extern char *index (const char *, int); |
34 #endif | 34 #endif |
35 | 35 |
36 extern Lisp_Object Qcursor_in_echo_area; | 36 extern Lisp_Object Qcursor_in_echo_area; |
37 extern Lisp_Object Qfile_directory_p; | 37 extern Lisp_Object Qfile_directory_p; |
38 extern Lisp_Object Qonly; | 38 extern Lisp_Object Qonly; |
138 } | 138 } |
139 | 139 |
140 /* Quotify EXP: if EXP is constant, return it. | 140 /* Quotify EXP: if EXP is constant, return it. |
141 If EXP is not constant, return (quote EXP). */ | 141 If EXP is not constant, return (quote EXP). */ |
142 Lisp_Object | 142 Lisp_Object |
143 quotify_arg (exp) | 143 quotify_arg (register Lisp_Object exp) |
144 register Lisp_Object exp; | |
145 { | 144 { |
146 if (!INTEGERP (exp) && !STRINGP (exp) | 145 if (!INTEGERP (exp) && !STRINGP (exp) |
147 && !NILP (exp) && !EQ (exp, Qt)) | 146 && !NILP (exp) && !EQ (exp, Qt)) |
148 return Fcons (Qquote, Fcons (exp, Qnil)); | 147 return Fcons (Qquote, Fcons (exp, Qnil)); |
149 | 148 |
150 return exp; | 149 return exp; |
151 } | 150 } |
152 | 151 |
153 /* Modify EXP by quotifying each element (except the first). */ | 152 /* Modify EXP by quotifying each element (except the first). */ |
154 Lisp_Object | 153 Lisp_Object |
155 quotify_args (exp) | 154 quotify_args (Lisp_Object exp) |
156 Lisp_Object exp; | |
157 { | 155 { |
158 register Lisp_Object tail; | 156 register Lisp_Object tail; |
159 Lisp_Object next; | 157 Lisp_Object next; |
160 for (tail = exp; CONSP (tail); tail = next) | 158 for (tail = exp; CONSP (tail); tail = next) |
161 { | 159 { |
167 | 165 |
168 char *callint_argfuns[] | 166 char *callint_argfuns[] |
169 = {"", "point", "mark", "region-beginning", "region-end"}; | 167 = {"", "point", "mark", "region-beginning", "region-end"}; |
170 | 168 |
171 static void | 169 static void |
172 check_mark (for_region) | 170 check_mark (int for_region) |
173 int for_region; | |
174 { | 171 { |
175 Lisp_Object tem; | 172 Lisp_Object tem; |
176 tem = Fmarker_buffer (current_buffer->mark); | 173 tem = Fmarker_buffer (current_buffer->mark); |
177 if (NILP (tem) || (XBUFFER (tem) != current_buffer)) | 174 if (NILP (tem) || (XBUFFER (tem) != current_buffer)) |
178 error (for_region ? "The mark is not set now, so there is no region" | 175 error (for_region ? "The mark is not set now, so there is no region" |
189 | 186 |
190 This function doesn't return a value because it modifies elements | 187 This function doesn't return a value because it modifies elements |
191 of VALUES to do its job. */ | 188 of VALUES to do its job. */ |
192 | 189 |
193 static void | 190 static void |
194 fix_command (input, values) | 191 fix_command (Lisp_Object input, Lisp_Object values) |
195 Lisp_Object input, values; | |
196 { | 192 { |
197 if (CONSP (input)) | 193 if (CONSP (input)) |
198 { | 194 { |
199 Lisp_Object car; | 195 Lisp_Object car; |
200 | 196 |
895 | 891 |
896 return val; | 892 return val; |
897 } | 893 } |
898 | 894 |
899 void | 895 void |
900 syms_of_callint () | 896 syms_of_callint (void) |
901 { | 897 { |
902 point_marker = Fmake_marker (); | 898 point_marker = Fmake_marker (); |
903 staticpro (&point_marker); | 899 staticpro (&point_marker); |
904 | 900 |
905 callint_message = Qnil; | 901 callint_message = Qnil; |