diff options
| author | Thien-Thi Nguyen | 2002-06-03 01:42:52 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2002-06-03 01:42:52 +0000 |
| commit | 9ab4a725bb54fe5ed48562bd9787a6f240b389cf (patch) | |
| tree | 433ff864b6540d1f31820c65802cb331f22e4e68 /src | |
| parent | 744cd66b791b6562030d75049d2944fe3ce0bd3a (diff) | |
| download | emacs-9ab4a725bb54fe5ed48562bd9787a6f240b389cf.tar.gz emacs-9ab4a725bb54fe5ed48562bd9787a6f240b389cf.zip | |
(read_minibuf): Cast `current_column' return value to int.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 3c7a18d6170..1df7515bc7b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -65,7 +65,7 @@ Lisp_Object Qhistory_length, Vhistory_length; | |||
| 65 | 65 | ||
| 66 | Lisp_Object last_minibuf_string; | 66 | Lisp_Object last_minibuf_string; |
| 67 | 67 | ||
| 68 | /* Nonzero means let functions called when within a minibuffer | 68 | /* Nonzero means let functions called when within a minibuffer |
| 69 | invoke recursive minibuffers (to read arguments, or whatever) */ | 69 | invoke recursive minibuffers (to read arguments, or whatever) */ |
| 70 | 70 | ||
| 71 | int enable_recursive_minibuffers; | 71 | int enable_recursive_minibuffers; |
| @@ -103,7 +103,7 @@ Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook; | |||
| 103 | Lisp_Object Qminibuffer_exit_hook, Vminibuffer_exit_hook; | 103 | Lisp_Object Qminibuffer_exit_hook, Vminibuffer_exit_hook; |
| 104 | 104 | ||
| 105 | /* Function to call to read a buffer name. */ | 105 | /* Function to call to read a buffer name. */ |
| 106 | Lisp_Object Vread_buffer_function; | 106 | Lisp_Object Vread_buffer_function; |
| 107 | 107 | ||
| 108 | /* Nonzero means completion ignores case. */ | 108 | /* Nonzero means completion ignores case. */ |
| 109 | 109 | ||
| @@ -148,7 +148,7 @@ choose_minibuf_frame () | |||
| 148 | { | 148 | { |
| 149 | struct frame *sf = XFRAME (selected_frame); | 149 | struct frame *sf = XFRAME (selected_frame); |
| 150 | Lisp_Object buffer; | 150 | Lisp_Object buffer; |
| 151 | 151 | ||
| 152 | /* I don't think that any frames may validly have a null minibuffer | 152 | /* I don't think that any frames may validly have a null minibuffer |
| 153 | window anymore. */ | 153 | window anymore. */ |
| 154 | if (NILP (sf->minibuffer_window)) | 154 | if (NILP (sf->minibuffer_window)) |
| @@ -230,13 +230,13 @@ string_to_object (val, defalt) | |||
| 230 | struct gcpro gcpro1, gcpro2; | 230 | struct gcpro gcpro1, gcpro2; |
| 231 | Lisp_Object expr_and_pos; | 231 | Lisp_Object expr_and_pos; |
| 232 | int pos; | 232 | int pos; |
| 233 | 233 | ||
| 234 | GCPRO2 (val, defalt); | 234 | GCPRO2 (val, defalt); |
| 235 | 235 | ||
| 236 | if (STRINGP (val) && XSTRING (val)->size == 0 | 236 | if (STRINGP (val) && XSTRING (val)->size == 0 |
| 237 | && STRINGP (defalt)) | 237 | && STRINGP (defalt)) |
| 238 | val = defalt; | 238 | val = defalt; |
| 239 | 239 | ||
| 240 | expr_and_pos = Fread_from_string (val, Qnil, Qnil); | 240 | expr_and_pos = Fread_from_string (val, Qnil, Qnil); |
| 241 | pos = XINT (Fcdr (expr_and_pos)); | 241 | pos = XINT (Fcdr (expr_and_pos)); |
| 242 | if (pos != XSTRING (val)->size) | 242 | if (pos != XSTRING (val)->size) |
| @@ -252,7 +252,7 @@ string_to_object (val, defalt) | |||
| 252 | error ("Trailing garbage following expression"); | 252 | error ("Trailing garbage following expression"); |
| 253 | } | 253 | } |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | val = Fcar (expr_and_pos); | 256 | val = Fcar (expr_and_pos); |
| 257 | RETURN_UNGCPRO (val); | 257 | RETURN_UNGCPRO (val); |
| 258 | } | 258 | } |
| @@ -298,10 +298,10 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag, | |||
| 298 | if (s) | 298 | if (s) |
| 299 | { | 299 | { |
| 300 | len = strlen (line); | 300 | len = strlen (line); |
| 301 | 301 | ||
| 302 | if (len > 0 && line[len - 1] == '\n') | 302 | if (len > 0 && line[len - 1] == '\n') |
| 303 | line[--len] = '\0'; | 303 | line[--len] = '\0'; |
| 304 | 304 | ||
| 305 | val = build_string (line); | 305 | val = build_string (line); |
| 306 | xfree (line); | 306 | xfree (line); |
| 307 | } | 307 | } |
| @@ -310,11 +310,11 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag, | |||
| 310 | xfree (line); | 310 | xfree (line); |
| 311 | error ("Error reading from stdin"); | 311 | error ("Error reading from stdin"); |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | /* If Lisp form desired instead of string, parse it. */ | 314 | /* If Lisp form desired instead of string, parse it. */ |
| 315 | if (expflag) | 315 | if (expflag) |
| 316 | val = string_to_object (val, defalt); | 316 | val = string_to_object (val, defalt); |
| 317 | 317 | ||
| 318 | return val; | 318 | return val; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| @@ -328,7 +328,7 @@ Return (point-min) if current buffer is not a mini-buffer. */) | |||
| 328 | /* This function is written to be most efficient when there's a prompt. */ | 328 | /* This function is written to be most efficient when there's a prompt. */ |
| 329 | Lisp_Object beg = make_number (BEGV); | 329 | Lisp_Object beg = make_number (BEGV); |
| 330 | Lisp_Object end = Ffield_end (beg, Qnil, Qnil); | 330 | Lisp_Object end = Ffield_end (beg, Qnil, Qnil); |
| 331 | 331 | ||
| 332 | if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil))) | 332 | if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil))) |
| 333 | return beg; | 333 | return beg; |
| 334 | else | 334 | else |
| @@ -581,9 +581,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 581 | Fadd_text_properties (make_number (BEG), make_number (PT), | 581 | Fadd_text_properties (make_number (BEG), make_number (PT), |
| 582 | Vminibuffer_prompt_properties, Qnil); | 582 | Vminibuffer_prompt_properties, Qnil); |
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | minibuf_prompt_width = current_column (); | 585 | minibuf_prompt_width = (int) current_column (); /* iftc */ |
| 586 | 586 | ||
| 587 | /* If appropriate, copy enable-multibyte-characters into the minibuffer. */ | 587 | /* If appropriate, copy enable-multibyte-characters into the minibuffer. */ |
| 588 | if (inherit_input_method) | 588 | if (inherit_input_method) |
| 589 | current_buffer->enable_multibyte_characters = enable_multibyte; | 589 | current_buffer->enable_multibyte_characters = enable_multibyte; |
| @@ -978,7 +978,7 @@ Prompt with PROMPT. By default, return DEFAULT-VALUE. */) | |||
| 978 | default_string = SYMBOL_NAME (default_value); | 978 | default_string = SYMBOL_NAME (default_value); |
| 979 | else | 979 | else |
| 980 | default_string = default_value; | 980 | default_string = default_value; |
| 981 | 981 | ||
| 982 | name = Fcompleting_read (prompt, Vobarray, Qcommandp, Qt, | 982 | name = Fcompleting_read (prompt, Vobarray, Qcommandp, Qt, |
| 983 | Qnil, Qnil, default_string, Qnil); | 983 | Qnil, Qnil, default_string, Qnil); |
| 984 | if (NILP (name)) | 984 | if (NILP (name)) |
| @@ -1013,7 +1013,7 @@ A user variable is one whose documentation starts with a `*' character. */) | |||
| 1013 | default_string = SYMBOL_NAME (default_value); | 1013 | default_string = SYMBOL_NAME (default_value); |
| 1014 | else | 1014 | else |
| 1015 | default_string = default_value; | 1015 | default_string = default_value; |
| 1016 | 1016 | ||
| 1017 | name = Fcompleting_read (prompt, Vobarray, | 1017 | name = Fcompleting_read (prompt, Vobarray, |
| 1018 | Quser_variable_p, Qt, | 1018 | Quser_variable_p, Qt, |
| 1019 | Qnil, Qnil, default_string, Qnil); | 1019 | Qnil, Qnil, default_string, Qnil); |
| @@ -1032,7 +1032,7 @@ If optional third arg REQUIRE-MATCH is non-nil, | |||
| 1032 | Lisp_Object prompt, def, require_match; | 1032 | Lisp_Object prompt, def, require_match; |
| 1033 | { | 1033 | { |
| 1034 | Lisp_Object args[4]; | 1034 | Lisp_Object args[4]; |
| 1035 | 1035 | ||
| 1036 | if (BUFFERP (def)) | 1036 | if (BUFFERP (def)) |
| 1037 | def = XBUFFER (def)->name; | 1037 | def = XBUFFER (def)->name; |
| 1038 | 1038 | ||
| @@ -1463,7 +1463,7 @@ If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. | |||
| 1463 | This feature is deprecated--it is best to pass nil for INITIAL-INPUT | 1463 | This feature is deprecated--it is best to pass nil for INITIAL-INPUT |
| 1464 | and supply the default value DEF instead. The user can yank the | 1464 | and supply the default value DEF instead. The user can yank the |
| 1465 | default value into the minibuffer easily using \\[next-history-element]. | 1465 | default value into the minibuffer easily using \\[next-history-element]. |
| 1466 | 1466 | ||
| 1467 | HIST, if non-nil, specifies a history list | 1467 | HIST, if non-nil, specifies a history list |
| 1468 | and optionally the initial position in the list. | 1468 | and optionally the initial position in the list. |
| 1469 | It can be a symbol, which is the history list variable to use, | 1469 | It can be a symbol, which is the history list variable to use, |
| @@ -1969,7 +1969,7 @@ Return nil if there is no valid completion, else t. */) | |||
| 1969 | UNGCPRO; | 1969 | UNGCPRO; |
| 1970 | } | 1970 | } |
| 1971 | #endif /* Rewritten code */ | 1971 | #endif /* Rewritten code */ |
| 1972 | 1972 | ||
| 1973 | prompt_end_charpos = XINT (Fminibuffer_prompt_end ()); | 1973 | prompt_end_charpos = XINT (Fminibuffer_prompt_end ()); |
| 1974 | 1974 | ||
| 1975 | { | 1975 | { |
| @@ -2003,7 +2003,7 @@ Return nil if there is no valid completion, else t. */) | |||
| 2003 | if (STRINGP (tem)) | 2003 | if (STRINGP (tem)) |
| 2004 | completion = tem; | 2004 | completion = tem; |
| 2005 | } | 2005 | } |
| 2006 | } | 2006 | } |
| 2007 | 2007 | ||
| 2008 | /* Now find first word-break in the stuff found by completion. | 2008 | /* Now find first word-break in the stuff found by completion. |
| 2009 | i gets index in string of where to stop completing. */ | 2009 | i gets index in string of where to stop completing. */ |
| @@ -2126,7 +2126,7 @@ It can find the completion buffer in `standard-output'. */) | |||
| 2126 | if (BUFFERP (Vstandard_output)) | 2126 | if (BUFFERP (Vstandard_output)) |
| 2127 | { | 2127 | { |
| 2128 | tem = Findent_to (make_number (35), make_number (2)); | 2128 | tem = Findent_to (make_number (35), make_number (2)); |
| 2129 | 2129 | ||
| 2130 | column = XINT (tem); | 2130 | column = XINT (tem); |
| 2131 | } | 2131 | } |
| 2132 | else | 2132 | else |