* xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
[bpt/emacs.git] / src / ChangeLog
CommitLineData
4887c6e2
PE
12011-04-16 Paul Eggert <eggert@cs.ucla.edu>
2
3 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
4 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
5
4170f62f 62011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 7
71b41406
PE
8 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
9
9587a89d
PE
10 emacs_write: Accept and return EMACS_INT for sizes.
11 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
12 et seq.
13 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
14 Accept and return EMACS_INT.
15 (emacs_gnutls_write): Return the number of bytes written on
16 partial writes.
17 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
18 (emacs_read, emacs_write): Remove check for negative size, as the
19 Emacs source code has been audited now.
9587a89d
PE
20 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
21 (emacs_read, emacs_write): Use it.
273a5f82
PE
22 * process.c (send_process): Adjust to the new signatures of
23 emacs_write and emacs_gnutls_write. Do not attempt to store
24 a byte offset into an 'int'; it might overflow.
9587a89d 25 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 26
3e047f51
PE
27 * sound.c: Don't assume sizes fit in 'int'.
28 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 29 Return EMACS_INT, not int.
3e047f51 30 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
31 Accept EMACS_INT, not int.
32 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
33 record read return values.
34
cc39a9db
BK
352011-04-15 Ben Key <bkey76@gmail.com>
36
37 * keyboard.c (Qundefined): Don't declare static since it is
38 used in nsfns.m.
39 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't
40 declare static since they are used in nsfont.m.
41
6c60eb9f
SM
422011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
43
44 * process.c (Qprocessp): Don't declare static.
45 * lisp.h (Qprocessp): Declare again.
46
7990b61a
JB
472011-04-15 Juanma Barranquero <lekktu@gmail.com>
48
49 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
50
5d4cb038
PE
512011-04-14 Paul Eggert <eggert@cs.ucla.edu>
52
8bd7b830 53 Improve C-level modularity by making more things 'static'.
cd64ea1d 54
e3b27b31
PE
55 Don't publish debugger-only interfaces to other modules.
56 * lisp.h (safe_debug_print, debug_output_compilation_hack):
57 (verify_bytepos, count_markers): Move decls to the only modules
58 that need them.
59 * region-cache.h (pp_cache): Likewise.
60 * window.h (check_all_windows): Likewise.
61 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
62
5d4cb038
PE
63 * sysdep.c (croak): Now static, if
64 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
65 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
66
67 * alloc.c (refill_memory_reserve): Now static if
68 !defined REL_ALLOC || defined SYSTEM_MALLOC.
69 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 70
e87b6180
PE
71 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
72 Define only if USE_LUCID.
73
ac64929e
PE
74 * xrdb.c (x_customization_string, x_rm_string): Now static.
75
6f37259d
PE
76 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
77 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
78
1683e3ab
PE
79 * xdisp.c (draw_row_with_mouse_face): Now static.
80 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
81
de9c2632
PE
82 * window.h (check_all_windows): Mark externally visible.
83
2b96acb7
PE
84 * window.c (window_deletion_count): Now static.
85
86 * undo.c: Make symbols static if they're not exported.
87 (last_undo_buffer, last_boundary_position, pending_boundary):
88 Now static.
89
50436f33
PE
90 * textprop.c (interval_insert_behind_hooks): Now static.
91 (interval_insert_in_front_hooks): Likewise.
92
64520e5c
PE
93 * term.c: Make symbols static if they're not exported.
94 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
95 (max_frame_lines, tty_set_terminal_modes):
96 (tty_reset_terminal_modes, tty_turn_off_highlight):
97 (get_tty_terminal): Now static.
98 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
99 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 100 HAVE_WINDOW_SYSTEM.
64520e5c
PE
101 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
102 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
103
1fa53021
PE
104 * sysdep.c: Make symbols static if they're not exported.
105 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
106 Now static.
107 (sigprocmask_set, full_mask): Remove; unused.
108 (wait_debugging): Mark as visible.
109 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
110 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
111
d4b43b22
PE
112 * syntax.c (syntax_temp): Define only if !__GNUC__.
113
b7c513d0
PE
114 * sound.c (current_sound_device, current_sound): Now static.
115
989b29ad
PE
116 * search.c (searchbufs, searchbuf_head): Now static.
117
13a55a78
PE
118 * scroll.c (scroll_cost): Remove; unused.
119 * dispextern.h (scroll_cost): Remove decl.
120
de68a1fc
PE
121 * region-cache.h (pp_cache): Mark as externally visible.
122
40ccffa6
PE
123 * process.c: Make symbols static if they're not exported.
124 (process_tick, update_tick, create_process, chan_process):
125 (Vprocess_alist, proc_buffered_char, datagram_access):
126 (fd_callback_data, send_process_frame, process_sent_to): Now static.
127 (deactivate_process): Mark defn as static, as well as decl.
128 * lisp.h (create_process): Remove decl.
129 * process.h (chan_process, Vprocess_alist): Remove decls.
130
ad64fc97
PE
131 * print.c: Make symbols static if they're not exported.
132 (print_depth, new_backquote_output, being_printed, print_buffer):
133 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
134 (print_interval, print_number_index, initial_stderr_stream):
135 Now static.
136 * lisp.h (Fprinc): Remove decl.
137 (debug_output_compilation_hack): Mark as externally visible.
138
adddb265
PE
139 * sysdep.c (croak): Move decl from here to syssignal.h.
140 * syssignal.h (croak): Put it here, so the API can be checked when
141 'croak' is called from dissociate_if_controlling_tty.
142
1717ede2
PE
143 * minibuf.c: Make symbols static if they're not exported.
144 (minibuf_save_list, choose_minibuf_frame): Now static.
145 * lisp.h (choose_minibuf_frame): Remove decl.
146
fa5fb2bc
PE
147 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
148
1e3890d1
PE
149 * lread.c: Make symbols static if they're not exported.
150 (read_objects, initial_obarray, oblookup_last_bucket_number):
151 Now static.
152 (make_symbol): Remove; unused.
153 * lisp.h (initial_obarray, make_symbol): Remove decls.
154
8a1414fa
PE
155 * keyboard.c: Make symbols static if they're not exported.
156 (single_kboard, recent_keys_index, total_keys, recent_keys):
157 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
158 (this_single_command_key_start, echoing, last_auto_save):
159 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
160 (command_loop, echo_now, keyboard_init_hook, help_char_p):
161 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
162 (Vlispy_mouse_stem, double_click_count):
163 Now static.
164 (force_auto_save_soon): Define only if SIGDANGER.
165 (ignore_mouse_drag_p): Now static if
166 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
167 (print_help): Remove; unused.
168 (stop_character, last_timer_event): Mark as externally visible.
169 * keyboard.h (ignore_mouse_drag_p): Declare only if
170 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
171 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
172 * lisp.h (echoing): Remove decl.
173 (force_auto_save_soon): Declare only if SIGDANGER.
174 * xdisp.c (redisplay_window): Simplify code, to make it more
175 obvious that ignore_mouse_drag_p is not accessed if !defined
176 USE_GTK && !defined HAVE_NS.
177
93ea6e8f
PE
178 * intervals.c: Make symbols static if they're not exported.
179 (merge_properties_sticky, merge_interval_right, delete_interval):
180 Now static.
181 * intervals.h (merge_interval_right, delete_interval): Remove decls.
182
77382fcc
PE
183 * insdel.c: Make symbols static if they're not exported.
184 However, leave prepare_to_modify_buffer alone. It's never
185 called from outside this function, but that appears to be a bug.
186 (combine_after_change_list, combine_after_change_buffer):
4889fc82 187 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
188 (adjust_after_replace_noundo): Remove; unused.
189 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 190 (signal_before_change): Remove decls.
77382fcc 191
9306c32e
PE
192 * indent.c (val_compute_motion, val_vmotion): Now static.
193
cd44d2eb
PE
194 * image.c: Make symbols static if they're not exported.
195 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
196 if USE_GTK.
197 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
198 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
199
ad9a7a06
PE
200 * fringe.c (standard_bitmaps): Now static.
201 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
202
81626931
PE
203 * frame.c: Make symbols static if they're not exported.
204 (x_report_frame_params, make_terminal_frame): Now static.
205 (get_frame_param): Now static, unless HAVE_NS.
206 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
207 (x_get_resource_string): Remove; not used.
208 * frame.h (make_terminal_frame, x_report_frame_params):
209 (x_get_resource_string); Remove decls.
210 (x_fullscreen_adjust): Declare only if WINDOWSNT.
211 * lisp.h (get_frame_param): Declare only if HAVE_NS.
212
239f9db9
PE
213 * font.c, fontset.c: Make symbols static if they're not exported.
214 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
215 (FACE_SUITABLE_FOR_CHAR_P): Use it.
216 * font.c (font_close_object): Now static.
217 * font.h (font_close_object): Remove.
218 * fontset.c (FONTSET_OBJLIST): Remove.
219 (free_realized_fontset) #if-0 the body, which does nothing.
220 (face_suitable_for_char_p): #if-0, as it's never called.
221 * fontset.h (face_suitable_for_char_p): Remove decl.
222 * xfaces.c (face_at_string_position): Use
223 FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
224 since 0 is always ASCII.
225
dfcf3579
PE
226 * fns.c (weak_hash_tables): Now static.
227
5045092b
PE
228 * fileio.c: Make symbols static if they're not exported.
229 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
230 (Vwrite_region_annotation_buffers): Now static.
231
57a96f5c
PE
232 * eval.c: Make symbols static if they're not exported.
233 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
234 * lisp.h (backtrace_list): Remove decl.
235
35f08c38
PE
236 * emacs.c: Make symbols static if they're not exported.
237 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
238 (fatal_error_code, fatal_error_signal_hook, standard_args):
239 Now static.
240 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
241 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
242 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
243 * lisp.h (fatal_error_signal_hook): Remove decl.
244 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
245
f44bd759
PE
246 * editfns.c: Move a (normally-unused) function to its only use.
247 * editfns.c, lisp.h (get_operating_system_release): Remove.
248 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
249 worth the hassle of breaking this out.
250
b532497d
PE
251 * xterm.c: Make symbols static if they're not exported.
252 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
253 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
254 (x_destroy_window, x_delete_display):
255 Now static.
256 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
257 (x_mouse_leave): Remove; unused.
258 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
259 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
260 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
261 Remove decls.
262 (x_mouse_leave): Declare only if WINDOWSNT.
263 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
264 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
265 USE_X_TOOLKIT.
266
1675728f
PE
267 * ftxfont.c: Make symbols static if they're not exported.
268 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
269 HAVE_FREETYPE.
270 * font.h (ftxfont_driver): Likewise.
271
e4cebfca
PE
272 * xfns.c: Make symbols static if they're not exported.
273 (x_last_font_name, x_display_info_for_name):
274 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
275 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
276 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
277 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
278 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
279 (last_show_tip_args): Now static.
280 (xic_defaut_fontset, xic_create_fontsetname): Define only if
281 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
282 (x_screen_planes): Remove; unused.
283 * dispextern.h (x_screen_planes): Remove decl.
284
5bf46f05
PE
285 * dispnew.c: Make symbols static if they're not exported.
286 * dispextern.h (redraw_garbaged_frames, scrolling):
287 (increment_row_positions): Remove.
288 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
289 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
290 Now static.
291 (redraw_garbaged_frames): Remove; unused.
292
435f4c28
PE
293 * xfaces.c: Make symbols static if they're not exported.
294 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
295 Remove decls.
296 * xterm.h (defined_color): Remove decls.
297 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
298 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
299 (menu_face_changed_default, defined_color, free_realized_face):
300 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
301 (ascii_face_of_lisp_face): Remove; unused.
302
8524aef3
PE
303 * xdisp.c: Make symbols static if they're not exported.
304 * dispextern.h (scratch_glyph_row, window_box_edges):
305 (glyph_to_pixel_coords, set_cursor_from_row):
306 (get_next_display_element, set_iterator_to_next):
307 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
308 (show_mouse_face): Remove decls
309 * frame.h (message_buf_print): Likewise.
310 * lisp.h (pop_message, set_message, check_point_in_composition):
311 Likewise.
312 * xterm.h (set_vertical_scroll_bar): Likewise.
313 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
314 (message_buf_print, scratch_glyph_row, displayed_buffer):
315 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
316 (get_next_display_element, show_mouse_face, window_box_edges):
317 (frame_to_window_pixel_xy, check_point_in_composition):
318 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
319 (glyph_to_pixel_coords): Remove; unused.
320
16390cd2
PE
321 * dired.c (file_name_completion): Now static.
322
323 * dbusbind.c (xd_in_read_queued_messages): Now static.
324
a25f4dfa
PE
325 * lisp.h (circular_list_error, FOREACH): Remove; unused.
326 * data.c (circular_list_error): Remove.
327
14a9c8df
PE
328 * commands.h (last_point_position, last_point_position_buffer):
329 (last_point_position_window): Remove decls.
330 * keyboard.c: Make these variables static.
331
74ab6df5
PE
332 * coding.h (coding, code_convert_region, encode_coding_gap): Remove
333 decls.
334 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
335 (iso_code_class, detect_coding, code_convert_region): Now static.
336 (encode_coding_gap): Remove; unused.
337
38dfbee1
PE
338 * chartab.c (chartab_chars, chartab_bits): Now static.
339
a2cb4e63
PE
340 * charset.h (charset_iso_8859_1): Remove decl.
341 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
342 Now static.
343
127198fd
PE
344 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
345 * ccl.c (Vccl_program_table): Now static.
346 (check_ccl_update): Remove; unused.
347
d85b608f
PE
348 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
349 * category.h: ... from here.
350 * category.c (check_category_table, set_category_set): Now static.
351
31cd66f3
PE
352 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
353 * lisp.h: Remove these decls.
354
c358e587
PE
355 * buffer.c (buffer_count): Remove unused var.
356
e78aecca
PE
357 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
358 so that it's not optimized away.
359 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
360 * dispextern.h (bidi_dump_cached_states): Remove, since it's
361 exported only to the debugger.
362
e192d7d3
PE
363 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
364 * atimer.h (run_all_atimers): Removed; not exported.
365
92470028
PE
366 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
367 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
368 was inaccessible from Lisp.
369 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
370 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
371
244ed907
PE
372 alloc.c: Import and export fewer symbols, and remove unused items.
373 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
374 is defined.
375 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
376 it's not optimized away by whole-program optimization.
377 (message_enable_multibyte, free_misc): Remove.
378 (catchlist, handlerlist, mark_backtrace):
379 Declare only if BYTE_MARK_STACK.
380 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
381 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
382 (message_enable_multibyte): Remove decl.
383 (free_misc, interval_free_list, float_block, float_block_index):
384 (n_float_blocks, float_free_list, cons_block, cons_block_index):
385 (cons_free_list, last_marked_index):
386 Now static.
387 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
388 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
389 (mark_backtrace): Define only if BYTE_MARK_STACK.
390 * xdisp.c (message_enable_multibyte): Now static.
391
955cbe7b
PE
392 Declare Lisp_Object Q* variables to be 'static' if not exproted.
393 This makes it easier for human readers (and static analyzers)
394 to see whether these variables are used from other modules.
395 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
396 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
397 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
398 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
399 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
400 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
401 * xmenu.c, xselect.c:
402 Declare Q* vars static if they are not used in other modules.
403 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
404 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
405 Remove decls of unexported vars.
406 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
407
95c82688
PE
408 * lisp.h (DEFINE_FUNC): Make sname 'static'.
409
16a97296
PE
410 Make Emacs functions such as Fatom 'static' by default.
411 This makes it easier for human readers (and static analyzers)
412 to see whether these functions can be called from other modules.
413 DEFUN now defines a static function. To make the function external
414 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
415 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
416 (Finit_image_library):
16a97296
PE
417 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
418 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
419 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
420 Remove decls, since these functions are now static.
421 (Funintern, Fget_internal_run_time): New decls, since these functions
422 were already external.
95c82688 423
16a97296
PE
424 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
425 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
426 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
427 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
428 * keyboard.c, keymap.c, lread.c:
429 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
430 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
431 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
432 Mark functions with DEFUE instead of DEFUN,
433 if they are used in other modules.
434 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
435 decls for now-static functions.
436 * buffer.h (Fdelete_overlay): Remove decl.
437 * callproc.c (Fgetenv_internal): Mark as internal.
438 * composite.c (Fremove_list_of_text_properties): Remove decl.
439 (Fcomposition_get_gstring): New forward static decl.
440 * composite.h (Fcomposite_get_gstring): Remove decl.
441 * dired.c (Ffile_attributes): New forward static decl.
442 * doc.c (Fdocumntation_property): New forward static decl.
443 * eval.c (Ffetch_bytecode): New forward static decl.
444 (Funintern): Remove extern decl; now in .h file where it belongs.
445 * fileio.c (Fmake_symbolic_link): New forward static decl.
446 * image.c (Finit_image_library): New forward static decl.
447 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
448 * intervals.h (Fprevious_property_change):
449 (Fremove_list_of_text_properties): Remove decls.
450 * keyboard.c (Fthis_command_keys): Remove decl.
451 (Fcommand_execute): New forward static decl.
452 * keymap.c (Flookup_key): New forward static decl.
453 (Fcopy_keymap): Now static.
454 * keymap.h (Flookup_key): Remove decl.
455 * process.c (Fget_process): New forward static decl.
456 (Fprocess_datagram_address): Mark as internal.
457 * syntax.c (Fsyntax_table_p): New forward static decl.
458 (skip_chars): Remove duplicate decl.
459 * textprop.c (Fprevious_property_change): New forward static decl.
460 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
461 Now internal.
462 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
463 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
464
785bbd42
PE
465 * editfns.c (Fformat): Remove unreachable code.
466
8b913b57
AS
4672011-04-14 Andreas Schwab <schwab@linux-m68k.org>
468
469 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
470 change. (Bug#8496)
471
a6744a35
EZ
4722011-04-13 Eli Zaretskii <eliz@gnu.org>
473
474 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
475 when at ZV. (Bug#8487)
476
e7974947
AS
4772011-04-12 Andreas Schwab <schwab@linux-m68k.org>
478
baad03f0
AS
479 * charset.c (Fclear_charset_maps): Use xfree instead of free.
480 (Bug#8437)
481 * keyboard.c (parse_tool_bar_item): Likewise.
482 * sound.c (sound_cleanup, alsa_close): Likewise.
483 * termcap.c (tgetent): Likewise.
484 * xfns.c (x_default_font_parameter): Likewise.
485 * xsettings.c (read_and_apply_settings): Likewise.
486
e7974947
AS
487 * alloc.c (overrun_check_malloc, overrun_check_realloc)
488 (overrun_check_free): Protoize.
489
28272684
PE
4902011-04-12 Paul Eggert <eggert@cs.ucla.edu>
491
492 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
493 since callers should never pass a negative size.
494 Change the signature to match that of plain 'read' and 'write'; see
495 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
496 * lisp.h: Update prototypes of emacs_write and emacs_read.
497
11997c76
EZ
4982011-04-11 Eli Zaretskii <eliz@gnu.org>
499
500 * xdisp.c (redisplay_window): Don't try to determine the character
501 position of the scroll margin if the window start point w->startp
e896f03c 502 is outside the buffer's accessible region. (Bug#8468)
11997c76 503
8a2cbd72
EZ
5042011-04-10 Eli Zaretskii <eliz@gnu.org>
505
506 Fix write-region and its subroutines for buffers > 2GB.
507 * fileio.c (a_write, e_write): Modify declaration of arguments and
508 local variables to support buffers larger than 2GB.
509 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
510
511 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
512 argument, local variables, and return value.
513
514 * lisp.h: Update prototypes of emacs_write and emacs_read.
515
516 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
517
4073e537 5182011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 519
1ebfdcb6
PE
520 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
521
b2ded58d
PE
522 Fix more problems found by GCC 4.6.0's static checks.
523
7d66342c
PE
524 * xdisp.c (vmessage): Use a better test for character truncation.
525
bbf47d44
PE
526 * charset.c (load_charset_map): <, not <=, for optimization,
527 and to avoid potential problems with integer overflow.
9248994d 528 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 529 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 530 * editfns.c (Fformat): Likewise.
1e69125e 531 * syntax.c (skip_chars): Likewise.
3befa583 532
e3019616
PE
533 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
534 This also lets GCC 4.6.0 generate slightly better loop code.
535
becfa255
PE
536 * callint.c (Fcall_interactively): <, not <=, for optimization.
537 (Fcall_interactively): Count the number of arguments produced,
538 not the number of arguments given. This is simpler and lets GCC
539 4.6.0 generate slightly better code.
540
dae0cd48
PE
541 * ftfont.c: Distingish more carefully between FcChar8 and char.
542 The previous code passed unsigned char * to a functions like
543 strlen and xstrcasecmp that expect char *, which does not
544 conform to the C standard.
545 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
546 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
547 char * when the C standard requires it.
548
76032d70
PE
549 * keyboard.c (read_char): Remove unused var.
550
eb3f1cc8
PE
551 * eval.c: Port to Windows vsnprintf (Bug#8435).
552 Include <limits.h>.
553 (SIZE_MAX): Define if the headers do not.
554 (verror): Do not give up if vsnprintf returns a negative count.
555 Instead, grow the buffer. This ports to Windows vsnprintf, which
556 does not conform to C99. Problem reported by Eli Zaretskii.
557 Also, simplify the allocation scheme, by avoiding the need for
558 calling realloc, and removing the ALLOCATED variable.
559
70476b54
PE
560 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
561
12020a9e
PE
562 Remove invocations of doprnt, as Emacs now uses vsnprintf.
563 But keep the doprint source code for now, as we might revamp it
564 and use it again (Bug#8435).
ea6c7ae6
PE
565 * lisp.h (doprnt): Remove.
566 * Makefile.in (base_obj): Remove doprnt.o.
567 * deps.mk (doprnt.o): Remove.
568
5fdb398c
PE
569 error: Print 32- and 64-bit integers portably (Bug#8435).
570 Without this change, on typical 64-bit hosts error ("...%d...", N)
571 was used to print both 32- and 64-bit integers N, which relied on
572 undefined behavior.
573 * lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd):
574 New macro.
575 * lisp.h (error, verror): Mark as printf-like functions.
576 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
577 Report overflow in size calculations when allocating printf buffer.
578 Do not truncate output string at its first null byte.
579 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
580 Truncate the output at a character boundary, since vsnprintf does not
581 do that.
582 * charset.c (check_iso_charset_parameter): Convert internal
583 character to string before calling 'error', since %c now has the
584 printf meaning.
585 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
586 overflow when computing char to be passed to 'error'. Do not
587 pass Lisp_Object to 'error'; pass the integer instead.
588 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
589 formatted with plain %d.
590
b189fa66
PE
591 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
592
bff87ef0
PE
593 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
594
7e2cac20
PE
595 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
596
ce4d90b5
PE
597 * xterm.c (x_catch_errors): Remove duplicate declaration.
598
266c9547
PE
599 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
600
79c49ad2
PE
601 * xdisp.c, lisp.h (message_nolog): Remove; unused.
602
368f4090
JM
6032011-04-10 Jim Meyering <meyering@redhat.com>
604
605 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
606 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
607 return ssize_t not "int", and use size_t as the buffer length.
608 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
609 * gnutls.h: Update declarations.
610 * process.c (read_process_output): Use ssize_t, to match.
611 (send_process): Likewise.
612
a32d4040
CY
6132011-04-09 Chong Yidong <cyd@stupidchicken.com>
614
615 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
616
8546720e 6172011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 618
8546720e
GM
619 * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
620 unsigned char, to match FcChar8 type definition.
aac0c6e3 621
8546720e
GM
622 * xterm.c (handle_one_xevent):
623 * xmenu.c (create_and_show_popup_menu):
624 * xselect.c (x_decline_selection_request)
625 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 626
0a2f5c1a 6272011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
628
629 Fix some uses of `int' instead of EMACS_INT.
630 * search.c (string_match_1, fast_string_match)
631 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
632 (scan_buffer, find_next_newline_no_quit)
633 (find_before_next_newline, search_command, Freplace_match)
634 (Fmatch_data): Make some `int' variables be EMACS_INT.
635
636 * xdisp.c (display_count_lines): 3rd argument and return value now
637 EMACS_INT. All callers changed.
638 (pint2hrstr): Last argument is now EMACS_INT.
639
640 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
641 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
642 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
643 (decode_coding_utf_16, decode_coding_emacs_mule)
644 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
645 (decode_coding_ccl, decode_coding_charset)
646 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
647 (decode_coding_iso_2022, decode_coding_emacs_mule)
648 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
649 <char_offset, last_offset>: Declare EMACS_INT.
650 (encode_coding_utf_8, encode_coding_utf_16)
651 (encode_coding_emacs_mule, encode_invocation_designation)
652 (encode_designation_at_bol, encode_coding_iso_2022)
653 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
654 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
655 Declare EMACS_INT.
656 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
657 (encode_invocation_designation): Last argument P_NCHARS is now
658 EMACS_INT.
659 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
660 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
661
662 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
663 All users changed.
664
665 * ccl.c (Fccl_execute_on_string): Declare some variables
666 EMACS_INT.
667
8546720e 6682011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
669
670 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
671
4e19a977
CS
6722011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
673
674 * process.c (Fformat_network_address): Doc fix.
675
87302331
R
6762011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
677
678 * xml.c (parse_region): Avoid creating spurious whiespace nodes.
679
cbb59342
CY
6802011-04-08 Chong Yidong <cyd@stupidchicken.com>
681
682 * keyboard.c (read_char): Call Lisp function help-form-show,
683 instead of using internal_with_output_to_temp_buffer.
684 (Qhelp_form_show): New var.
e0d38eeb 685 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
686
687 * print.c (internal_with_output_to_temp_buffer): Function deleted.
688
689 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
690
e67a13ab
CY
6912011-04-06 Chong Yidong <cyd@stupidchicken.com>
692
693 * process.c (Flist_processes): Removed to Lisp.
694 (list_processes_1): Deleted.
695
973f782d
EZ
6962011-04-06 Eli Zaretskii <eliz@gnu.org>
697
7c106b1e
EZ
698 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
699
973f782d
EZ
700 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
701
41cf7d1a 7022011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 703
ca23cc88
PE
704 Fix more problems found by GCC 4.6.0's static checks.
705
f390e2d5
PE
706 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
707
42eea0d0
PE
708 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
709
b69769da 710 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 711
f9541e84
PE
712 * xdisp.c (vmessage): Mark as a printf-like function.
713
13841b55
PE
714 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
715
c136c10f
PE
716 * sound.c (sound_warning): Don't crash if arg contains a printf format.
717
5e2d4a30
PE
718 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
719 printf-like functions.
720 (tiff_load): Add casts to remove these marks before passing them
721 to system-supplied API.
722
583f48b9
PE
723 * eval.c (Fsignal): Remove excess argument to 'fatal'.
724
b25d760e
PE
725 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
726 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
727 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
728 directly, rather than having caller test rule sign. This avoids
729 some unnecessary tests.
730 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
731 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
732 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 733
bc7b6697 734 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 735 (xfont_open): Avoid unnecessary tests.
bc7b6697 736
27ccc379
PE
737 * composite.c (composition_gstring_put_cache): Use unsigned integer.
738
dcd5c89a
PE
739 * composite.h, composite.c (composition_gstring_put_cache):
740 Use EMACS_INT, not int, for length.
741
b13a45c6
PE
742 * composite.h (COMPOSITION_DECODE_REFS): New macro,
743 breaking out part of COMPOSITION_DECODE_RULE.
744 (COMPOSITION_DECODE_RULE): Use it.
745 * composite.c (get_composition_id): Remove unused local vars,
746 by using the new macro.
747
1e792e4d
PE
748 * textprop.c (set_text_properties_1): Change while to do-while,
749 since the condition is always true at first.
750
dc6c6455 751 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
752 (interval_deletion_adjustment): Return unsigned value.
753 All uses changed.
dc6c6455 754
aba7731a
PE
755 * process.c (list_processes_1, create_pty, read_process_output):
756 (exec_sentinel): Remove vars that were set but not used.
afd4052b 757 (create_pty): Remove unnecessary "volatile"s.
bc57d757 758 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 759 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 760 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 761
fdfc4bf3
PE
762 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
763
fca8fe46 764 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 765 (update_syntax_table): Use unsigned instead of int.
fca8fe46 766
06a0259a 767 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 768 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 769 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 770
e7b9e80f
PE
771 * print.c (print_error_message): Avoid int overflow.
772
56201685
PE
773 * font.c (font_list_entities): Redo for clarity,
774 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
775
78834453 776 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 777 (font_score): Avoid potential overflow in diff calculation.
78834453 778
0bc0b309 779 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 780 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 781
e610eaca
PE
782 * eval.c (funcall_lambda): Rename local to avoid shadowing.
783
b895abce
PE
784 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
785 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
786 can always succeed if overflow has undefined behavior.
787
1f1d9321 788 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 789 (wordify): Omit three unnecessary tests.
1f1d9321 790
c59478bc
PE
791 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
792 All callers changed. This avoids the need for an unused var.
793
79b73827
PE
794 * casefiddle.c (casify_region): Remove var that is set but not used.
795
a4db5dfe
PE
796 * dired.c (file_name_completion): Remove var that is set but not used.
797
43aae36e
PE
798 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
799
2a47c44d 800 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 801 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 802
a37c69bf
PE
803 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
804 Check for integer overflow on size calculations.
805
328ab8e7
PE
806 * buffer.c (Fprevious_overlay_change): Remove var that is set
807 but not used.
808
e5a2a5cb
PE
809 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
810 Remove vars that are set but not used.
8d84a6eb 811 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 812 (timer_check_2): Mark vars as initialized.
e5a2a5cb 813
a60e5f68
PE
814 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
815
f661cb61 816 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 817 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 818
f0397f5a
PE
819 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
820 that are set but not used.
821
8664db06 822 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 823 if XCreateBitmapFromData fails (Bug#8410).
8664db06 824
6abdaa4a
PE
825 * xselect.c (x_get_local_selection, x_handle_property_notify):
826 Remove vars that are set but not used.
827
0ce7538d 828 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 829 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 830
9ae848fc
PE
831 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
832 Remove var that is set but not used.
0b918413
PE
833 (scroll_bar_windows_size): Now size_t, not int.
834 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
835 Check for overflow.
9ae848fc 836
a5a62657
PE
837 * xfaces.c (realize_named_face): Remove vars that are set but not used.
838 (map_tty_color) [!defined MSDOS]: Likewise.
839
5c5cdd39
PE
840 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
841
66ebf983
PE
842 * coding.c: Remove vars that are set but not used.
843 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
844 All callers changed.
845 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
846 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
847 (decode_coding_charset): Remove vars that are set but not used.
848
1be4d761
PE
849 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
850 that is set but not used.
851
47553fa8
PE
852 * print.c (print_object): Remove var that is set but not used.
853
1f7196bf 854 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
855 The gnulib version avoids calling malloc in the usual case,
856 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
857 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
858 * filelock.c (current_lock_owner): Likewise.
859 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
860 * sysdep.c: Include allocator.h, careadlinkat.h.
861 (emacs_no_realloc_allocator): New static constant.
862 (emacs_readlink): New function.
fdb61804
PE
863 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
864 ../lib/careadlinkat.h.
d1fdcab7 865
f84c17c7
SM
8662011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
867
868 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
869 first non-nil return value).
870
ef3862ad
JD
8712011-04-03 Jan Djärv <jan.h.d@swipnet.se>
872
873 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
874 if not defined (Bug#8403).
875
376a7006
JB
8762011-04-02 Juanma Barranquero <lekktu@gmail.com>
877
878 * xdisp.c (display_count_lines): Remove parameter `start',
879 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
880 (get_char_face_and_encoding): Remove parameter `multibyte_p',
881 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
882 (fill_stretch_glyph_string): Remove parameters `row' and `area',
883 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
884 and thereabouts. All callers changed.
885 (get_per_char_metric): Remove parameter `f', unused since
886 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
887
6ca3801d
JM
8882011-04-02 Jim Meyering <meyering@redhat.com>
889
890 do not dereference NULL upon failed strdup
891 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
892 (ns_get_family): Likewise.
893
d8e2b5ba
JB
8942011-04-02 Juanma Barranquero <lekktu@gmail.com>
895
896 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
897
8c74fcbd
JD
8982011-04-02 Jan Djärv <jan.h.d@swipnet.se>
899
900 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
901 later (Bug#8403).
902
7200d79c
SM
9032011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
904
03408648 905 Add lexical binding.
7200d79c 906
03408648
SM
907 * window.c (Ftemp_output_buffer_show): New fun.
908 (Fsave_window_excursion):
909 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
910
911 * lread.c (lisp_file_lexically_bound_p): New function.
912 (Fload): Bind Qlexical_binding.
913 (readevalloop): Remove `evalfun' arg.
914 Bind Qinternal_interpreter_environment.
915 (Feval_buffer): Bind Qlexical_binding.
916 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
917 Mark as dynamic.
918 (syms_of_lread): Declare `lexical-binding'.
919
920 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
921
922 * keyboard.c (eval_dyn): New fun.
923 (menu_item_eval_property): Use it.
ca105506
SM
924
925 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 926
03408648
SM
927 * fns.c (concat, mapcar1): Accept byte-code-functions.
928
929 * eval.c (Fsetq): Handle lexical vars.
930 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
931 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
932 (FletX, Flet): Obey lexical binding.
933 (Fcommandp): Handle closures.
934 (Feval): New `lexical' arg.
935 (eval_sub): New function extracted from Feval. Use it almost
936 everywhere where Feval was used. Look up vars in lexical env.
937 Handle closures.
938 (Ffunctionp): Move from subr.el.
939 (Ffuncall): Handle closures.
940 (apply_lambda): Remove `eval_flags'.
941 (funcall_lambda): Handle closures and new byte-code-functions.
942 (Fspecial_variable_p): New function.
943 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
944 but without exporting it to Lisp.
23aba0ea 945
23aba0ea 946 * doc.c (Fdocumentation, store_function_docstring):
03408648 947 * data.c (Finteractive_form): Handle closures.
23aba0ea 948
03408648
SM
949 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
950 interactive spec.
ba83908c 951
03408648
SM
952 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN): New
953 byte-codes.
954 (exec_byte_code): New function extracted from Fbyte_code to handle new
955 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 956
03408648 957 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 958
03408648 959 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 960
e2abce01
JB
9612011-03-31 Juanma Barranquero <lekktu@gmail.com>
962
963 * xdisp.c (redisplay_internal): Fix prototype.
964
63696a73 9652011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 966
63696a73
EZ
967 * xdisp.c (SCROLL_LIMIT): New macro.
968 (try_scrolling): Use it when setting scroll_limit. Limit
969 scrolling to 100 screen lines.
970 (redisplay_window): Even when falling back on "recentering",
971 position point in the window according to scroll-conservatively,
972 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
973
974 (try_scrolling): When point is above the window, allow searching
975 as far as scroll_max, or one screenful, to compute vertical
976 distance from PT to the scroll margin position. This prevents
977 try_scrolling from unnecessarily failing when
978 scroll-conservatively is set to a value slightly larger than the
979 window height. Clean up the case of PT below the margin at bottom
980 of window: scroll_max can no longer be INT_MAX. When aggressive
981 scrolling is in use, don't let point enter the opposite scroll
982 margin as result of the scroll.
983 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
984 threshold of 100 lines for never-recentering scrolling.
985
e4cc2dfc
JB
9862011-03-31 Juanma Barranquero <lekktu@gmail.com>
987
988 * dispextern.h (move_it_by_lines):
989 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
990 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
991 (message_log_check_duplicate): Remove parameters `prev_bol' and
992 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
993 (redisplay_internal): Remove parameter `preserve_echo_area',
994 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
995
996 * indent.c (Fvertical_motion):
997 * window.c (window_scroll_pixel_based, Frecenter):
998 Don't pass `need_y_p' to `move_it_by_lines'.
999
1c470562
SM
10002011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
1001
44f230aa
SM
1002 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
1003 steal a few bits to be more compact.
1004 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
1005 Remove unneeded casts.
1006
1c470562
SM
1007 * bytecode.c (Fbyte_code): CAR and CDR can GC.
1008
888adce9
ZK
10092011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
1010
1011 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
1012 binding" message (bug#7967).
1013
f838ed7b
PE
10142011-03-30 Paul Eggert <eggert@cs.ucla.edu>
1015
77861b95
PE
1016 Fix more problems found by GCC 4.6.0's static checks.
1017
de6dbc14
PE
1018 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
1019 Remove unused local var.
1020
f838ed7b
PE
1021 * editfns.c (Fmessage_box): Remove unused local var.
1022
792c7b2b
PE
1023 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
1024 (note_mode_line_or_margin_highlight, note_mouse_highlight):
1025 Omit unused local vars.
c499e557 1026 * window.c (shrink_windows): Omit unused local var.
b01a1c29 1027 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
1028 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
1029 Omit unused local var.
1030
ba0165e1
PE
1031 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
1032 Don't assume string length fits in int.
32ad8845 1033 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 1034 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 1035
3c59b4c9
PE
1036 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
1037 instead of alloca (Bug#8344).
1038
a3eed478 1039 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 1040 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 1041
eb4d412d
PE
1042 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
1043
1658b401
PE
1044 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
1045 concerns.
1046
1047 * term.c (produce_glyphless_glyph): Remove unnecessary test.
1048
1049 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 1050
9a2c6e05
PE
1051 * keyboard.c (syms_of_keyboard): Use the same style as later
1052 in this function when indexing through an array. This also
1053 works around GCC bug 48267.
1054
03d0a109
PE
1055 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
1056
44f730c8
PE
1057 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
1058
fe75f926
PE
1059 * chartab.c (sub_char_table_ref_and_range): Redo for slight
1060 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
1061
ffa8c828
PE
1062 * keyboard.c, keyboard.h (num_input_events): Now size_t.
1063 This avoids undefined behavior on integer overflow, and is a bit
1064 more convenient anyway since it is compared to a size_t variable.
1065
c5101a77
PE
1066 Variadic C functions now count arguments with size_t, not int.
1067 This avoids an unnecessary limitation on 64-bit machines, which
1068 caused (substring ...) to crash on large vectors (Bug#8344).
1069 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
1070 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 1071 All variadic functions and their callers changed accordingly.
c5101a77
PE
1072 (struct gcpro.nvars): Now size_t, not int. All uses changed.
1073 * data.c (arith_driver, float_arith_driver): Likewise.
1074 * editfns.c (general_insert_function): Likewise.
1075 * eval.c (struct backtrace.nargs, interactive_p)
1076 (internal_condition_case_n, run_hook_with_args, apply_lambda)
1077 (funcall_lambda, mark_backtrace): Likewise.
1078 * fns.c (concat): Likewise.
1079 * frame.c (x_set_frame_parameters): Likewise.
1080 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
1081 0 if not found, not -1. All callers changed.
1082
dd3f25f7
PE
1083 * alloc.c (garbage_collect): Don't assume stack size fits in int.
1084 (stack_copy_size): Now size_t, not int.
1085 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
1086
461c2ab9
JB
10872011-03-28 Juanma Barranquero <lekktu@gmail.com>
1088
1089 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
1090 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
1091 All callers changed.
1092
1093 * lisp.h (multibyte_char_to_unibyte):
1094 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
1095 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
1096 * character.h (CHAR_TO_BYTE8):
1097 * cmds.c (internal_self_insert):
1098 * editfns.c (general_insert_function):
1099 * keymap.c (push_key_description):
1100 * search.c (Freplace_match):
1101 * xdisp.c (message_dolog, set_message_1): All callers changed.
1102
f6d62986
SM
11032011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
1104
1105 * keyboard.c (safe_run_hook_funcall): New function.
1106 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
1107 don't set the hook to nil, but remove the offending function instead.
1108 (Qcommand_hook_internal): Remove, unused.
1109 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
1110 Vcommand_hook_internal.
1111
1112 * eval.c (enum run_hooks_condition): Remove.
1113 (funcall_nil, funcall_not): New functions.
1114 (run_hook_with_args): Call each function through a `funcall' argument.
1115 Remove `cond' argument, now redundant.
1116 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
1117 (Frun_hook_with_args_until_failure): Adjust accordingly.
1118 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
1119
1db5b1ad
JB
11202011-03-28 Juanma Barranquero <lekktu@gmail.com>
1121
1122 * dispextern.h (string_buffer_position): Remove declaration.
1123
1124 * print.c (strout): Remove parameter `multibyte', unused since
1125 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
1126
1127 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
1128 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
1129 All callers changed.
1130
1131 * w32.c (_wsa_errlist): Use braces for struct initializers.
1132
1133 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
1134 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
1135 All callers changed.
1136 (string_buffer_position): Likewise. Also, make static (it's never
1137 used outside xdisp.c).
1138 (cursor_row_p): Remove parameter `w', unused since
1139 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
1140 (decode_mode_spec): Remove parameter `precision', introduced during
1141 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
1142 All callers changed.
1143
5ffb62aa
JD
11442011-03-27 Jan Djärv <jan.h.d@swipnet.se>
1145
1146 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
1147
461c2ab9 11482011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
1149
1150 * nsterm.m (ns_menu_bar_is_hidden): New variable.
1151 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
1152 (ns_update_auto_hide_menu_bar): New functions.
1153 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
1154 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
1155 ns_constrain_all_frames.
1156 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
1157 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
1158
5c380ffb
JD
11592011-03-27 Jan Djärv <jan.h.d@swipnet.se>
1160
1161 * nsmenu.m (runDialogAt): Remove argument to timer_check.
1162
9af30bdf
GM
11632011-03-27 Glenn Morris <rgm@gnu.org>
1164
1165 * syssignal.h: Replace RETSIGTYPE with void.
1166 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
1167 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
1168 Replace SIGTYPE with void everywhere.
1169 * s/usg5-4-common.h (SIGTYPE): Remove definition.
1170 * s/template.h (SIGTYPE): Remove commented out definition.
1171
e2abce01
JB
11722011-03-26 Eli Zaretskii <eliz@gnu.org>
1173
1174 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
1175 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
1176
f868cd8a
JB
11772011-03-26 Juanma Barranquero <lekktu@gmail.com>
1178
59eb0929
JB
1179 * w32.c (read_unc_volume): Use parameter `henum', instead of
1180 global variable `wget_enum_handle'.
1181
1182 * keymap.c (describe_vector): Remove parameters `indices' and
1183 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
1184 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
1185
f868cd8a
JB
1186 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
1187
1188 * keyboard.c (timer_check): Remove parameter `do_it_now',
1189 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
1190 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
1191 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
1192
1193 * keyboard.c (read_char):
1194 * w32menu.c (w32_menu_display_help):
1195 * xmenu.c (show_help_event, menu_help_callback):
1196 Adjust calls to `show_help_echo'.
1197
1198 * gtkutil.c (xg_maybe_add_timer):
1199 * keyboard.c (readable_events):
1200 * process.c (wait_reading_process_output):
1201 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
1202
1203 * insdel.c (adjust_markers_gap_motion):
1204 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
1205 (gap_left, gap_right): Don't call it.
1206
2ecf6fdb
CY
12072011-03-25 Chong Yidong <cyd@stupidchicken.com>
1208
1209 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
1210 incurred during fontification.
1211
6b1f9ba4
JB
12122011-03-25 Juanma Barranquero <lekktu@gmail.com>
1213
1214 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
1215 (DEFVAR_PER_BUFFER): Don't pass it.
1216
1217 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
1218 (scrolling_window): Don't pass it.
1219
0f4a96b5
JB
12202011-03-25 Juanma Barranquero <lekktu@gmail.com>
1221
1222 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
1223
1224 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
1225 and `suffix'.
1226 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
1227 of variables specific to SELinux and computation of `encoded_absname'.
1228
1229 * image.c (XPutPixel): Remove unused variable `height'.
1230
1231 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
1232
1233 * unexw32.c (get_section_info): Remove unused variable `section'.
1234
1235 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
1236 (system_process_attributes): Remove unused variable `sess'.
1237 (sys_read): Remove unused variable `err'.
1238
1239 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
1240 (w32_wnd_proc): Remove unused variable `isdead'.
1241 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
1242 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
1243 (x_create_tip_frame): Remove unused variable `tem'.
1244
1245 * w32inevt.c (w32_console_read_socket):
1246 Remove unused variable `no_events'.
1247
1248 * w32term.c (x_draw_composite_glyph_string_foreground):
1249 Remove unused variable `width'.
1250
1149507c
JB
12512011-03-24 Juanma Barranquero <lekktu@gmail.com>
1252
1253 * w32term.c (x_set_glyph_string_clipping):
1254 Don't pass uninitialized region to CombineRgn.
1255
9c88f339
JB
12562011-03-23 Juanma Barranquero <lekktu@gmail.com>
1257
1258 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
1259 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
1260 (Fx_close_connection): Remove unused variable `i'.
1261
1262 * w32font.c (w32font_draw): Return number of glyphs.
1263 (w32font_open_internal): Remove unused variable `i'.
1264 (w32font_driver): Add missing initializer.
1265
1266 * w32menu.c (utf8to16): Remove unused variable `utf16'.
1267 (fill_in_menu): Remove unused variable `items_added'.
1268
1269 * w32term.c (last_mouse_press_frame): Remove static global variable.
1270 (w32_clip_to_row): Remove unused variable `f'.
1271 (x_delete_terminal): Remove unused variable `i'.
1272
1273 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
1274 (NOTHING): Remove unused static global variable.
1275 (uniscribe_check_otf): Remove unused variable `table'.
1276 (uniscribe_font_driver): Add missing initializers.
1277
dee091a3
JD
12782011-03-23 Julien Danjou <julien@danjou.info>
1279
1280 * term.c (Fsuspend_tty, Fresume_tty):
1281 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
1282 * window.c (temp_output_buffer_show):
1283 * insdel.c (signal_before_change):
1284 * frame.c (Fhandle_switch_frame):
1285 * fileio.c (Fdo_auto_save):
1286 * emacs.c (Fkill_emacs):
1287 * editfns.c (save_excursion_restore):
1288 * cmds.c (internal_self_insert):
1289 * callint.c (Fcall_interactively):
1290 * buffer.c (Fkill_all_local_variables):
1291 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
1292 Use Frun_hooks.
0f4a96b5 1293 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
dee091a3
JD
1294 unconditionnaly since it does the check itself.
1295
2c520ab5 12962011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 1297
c9c49752
PE
1298 Fix more problems found by GCC 4.5.2's static checks.
1299
8abc3f12
PE
1300 * coding.c (encode_coding_raw_text): Avoid unnecessary test
1301 the first time through the loop, since we know p0 < p1 then.
1302 This also avoids a gcc -Wstrict-overflow warning.
1303
a2d26660
PE
1304 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
1305 leading to a memory leak, possible in functions like
1306 load_charset_map_from_file that can allocate an unbounded number
b12ef411 1307 of objects (Bug#8318).
a2d26660 1308
916c72e9
PE
1309 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
1310 that could (at least in theory) be that large.
1311
19ab8a18
PE
1312 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
1313 This is less likely to overflow, and avoids undefined behavior if
1314 overflow does occur. All callers changed. Use strtoul to scan
1315 for the unsigned long integer.
b7cbbd6f
PE
1316 (pint2hrstr): Simplify and tune code slightly.
1317 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 1318
f0641eff
PE
1319 * scroll.c (do_scrolling): Work around GCC bug 48228.
1320 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
1321
7f650bb9
PE
1322 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
1323 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
1324 (validate_x_resource_name): Simplify count usage.
1325 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 1326
37dd57d1
PE
1327 * fileio.c (Fcopy_file): Report error if fchown or fchmod
1328 fail (Bug#8306).
81e56e61 1329
699979fc 1330 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 1331
401bf9b4
PE
1332 * process.c (Fmake_network_process): Use socklen_t, not int,
1333 where POSIX says socklen_t is required in portable programs.
1334 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 1335 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
1336 (Fmake_network_process, server_accept_connection):
1337 (wait_reading_process_output, read_process_output):
1338 Likewise.
1339
b93aacde
PE
1340 * process.c: Rename or move locals to avoid shadowing.
1341 (list_processes_1, Fmake_network_process):
1342 (read_process_output_error_handler, exec_sentinel_error_handler):
1343 Rename or move locals.
4dc343ee 1344 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 1345 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 1346 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 1347 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 1348 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 1349
af8a867c 1350 Make tparam.h and terminfo.c consistent.
44f230aa
SM
1351 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
1352 Include tparam.h instead, since it declares them.
af8a867c
PE
1353 * cm.h (PC): Remove extern decl; tparam.h now does this.
1354 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
1355 * terminfo.c: Include tparam.h, to check interfaces.
1356 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
1357 (tparam): Adjust signature to match interface in tparam.h;
1358 this removes some undefined behavior. Check that outstring and len
1359 are zero, which they always are with Emacs.
1360 * tparam.h (PC, BC, UP): New extern decls.
1361
0248044d 1362 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 1363 (xftfont_open): Rename locals to avoid shadowing.
0248044d 1364
8ff096c1 1365 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
1366 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
1367 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 1368 (ftfont_list): Remove unused local.
49eaafba
PE
1369 (get_adstyle_property, ftfont_pattern_entity):
1370 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
1371 Rename locals to avoid shadowing.
8ff096c1 1372
e2be39f6
PE
1373 * xfont.c (xfont_list_family): Mark var as initialized.
1374
c9735e30
PE
1375 * xml.c (make_dom): Now static.
1376
8f5201ae
PE
1377 * composite.c (composition_compute_stop_pos): Rename local to
1378 avoid shadowing.
b246f932
PE
1379 (composition_reseat_it): Remove unused locals.
1380 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 1381 (composition_update_it): Mark var as initialized.
11b61122
PE
1382 (find_automatic_composition): Mark vars as initialized,
1383 with a FIXME (Bug#8290).
8f5201ae 1384
760fbc2c
PE
1385 character.h: Rename locals to avoid shadowing.
1386 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
1387 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
1388 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
1389 (BUF_DEC_POS): Be more systematic about renaming local temporaries
1390 to avoid shadowing.
1391
ff08eb85
PE
1392 * textprop.c (property_change_between_p): Remove; unused.
1393
fc7bf025
PE
1394 * intervals.c (interval_start_pos): Now static.
1395
235d7abc
PE
1396 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
1397
44f230aa
SM
1398 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
1399 Rename locals to avoid shadowing.
3e7d6594 1400
50060332
PE
1401 * sound.c (wav_play, au_play, Fplay_sound_internal):
1402 Fix pointer signedness.
d01f234b 1403 (alsa_choose_format): Remove unused local var.
c83b8872
PE
1404 (wav_play): Initialize a variable to 0, to prevent undefined
1405 behavior (Bug#8278).
50060332 1406
c4fc4e30
PE
1407 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
1408
918436ed
PE
1409 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
1410
c939f91b
PE
1411 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
1412 clobbering (Bug#8298).
b9c7f648
PE
1413 * sysdep.c (sys_subshell): Likewise.
1414 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 1415
6bd8c144
PE
1416 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
1417 This should get cleaned up, so that child_setup has the
1418 same signature on all platforms.
1419
7710357c 1420 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 1421 (relocate_fd): Rename locals to avoid shadowing.
7710357c 1422
c59da222
CY
14232011-03-22 Chong Yidong <cyd@stupidchicken.com>
1424
1425 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
1426 not to be necessary, and produces flickering.
1427
66b87493
GM
14282011-03-20 Glenn Morris <rgm@gnu.org>
1429
1430 * config.in: Remove file.
1431
45b6f6d5
JB
14322011-03-20 Juanma Barranquero <lekktu@gmail.com>
1433
1434 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
1435 are now in src/globals.h.
1436 (syms_of_minibuf): Remove spurious & from previous change.
1437
3ec03f7e
LL
14382011-03-20 Leo <sdl.web@gmail.com>
1439
1440 * minibuf.c (completing-read-function): New variable.
1441 (completing-read-default): Rename from completing-read.
1442 (completing-read): Call completing-read-function.
1443
b14e3e21
CY
14442011-03-19 Juanma Barranquero <lekktu@gmail.com>
1445
1446 * xfaces.c (Fx_load_color_file):
1447 Read color file from absolute filename (bug#8250).
1448
f2b726e6
JB
14492011-03-19 Juanma Barranquero <lekktu@gmail.com>
1450
1451 * makefile.w32-in: Update dependencies.
1452
09f6ff02
EZ
14532011-03-17 Eli Zaretskii <eliz@gnu.org>
1454
1455 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
1456
29a6015a
PE
14572011-03-17 Paul Eggert <eggert@cs.ucla.edu>
1458
a3a6c54e
PE
1459 Fix more problems found by GCC 4.5.2's static checks.
1460
b766f867
PE
1461 * process.c (make_serial_process_unwind, send_process_trap):
1462 (sigchld_handler): Now static.
1463
be02381c
PE
1464 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
1465 That way, the code declares only the vars that it needs.
1466 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
1467 * s/cygwin.h (PTY_ITERATION): Likewise.
1468 * s/darwin.h (PTY_ITERATION): Likewise.
1469 * s/gnu-linux.h (PTY_ITERATION): Likewise.
1470
57048744
PE
1471 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
1472 * process.c (allocate_pty): Don't declare stb unless it's needed.
1473
7914961c 1474 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
1475 (CONSTANTLIM): Remove; unused.
1476 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
1477 Define only if needed.
7914961c 1478
b3967b18
PE
1479 * unexelf.c (unexec): Name an expression,
1480 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
1481 Use a different way to cause a compilation error if anyone uses
1482 n rather than nn, a way that does not involve shadowing.
73366a00 1483 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 1484
29a6015a
PE
1485 * deps.mk (unexalpha.o): Remove; unused.
1486
43cfc33e 1487 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 1488 * unexec.h: New file.
ce701a33
PE
1489 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
1490 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
1491 Depend on unexec.h.
1492 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
1493 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
1494 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 1495 Change as necessary to match prototype in unexec.h.
ce701a33 1496
01f44d5a
PE
1497 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
1498 shadowing.
4f63c6bb 1499 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 1500
a6670b0b
PE
1501 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
1502 Rename locals to avoid shadowing.
1503
cef2010d 1504 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 1505 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 1506
d4d7173a
PE
1507 * print.c (Fredirect_debugging_output): Fix pointer signedess.
1508
f08b802a
PE
1509 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
1510 warning when compiling print.c.
1511
3ddb0639
PE
1512 * font.c (font_unparse_fcname): Abort in an "impossible" situation
1513 instead of using an uninitialized var.
5ad03b97 1514 (font_sort_entities): Mark var as initialized.
3ddb0639 1515
170a2692
PE
1516 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
1517
e663c700
PE
1518 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
1519 pointers to constants.
89bc529a 1520 (font_parse_fcname): Remove unused vars.
7b81e2d0 1521 (font_delete_unmatched): Now static.
ea838e10 1522 (font_get_spec): Remove; unused.
13a547c6
PE
1523 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
1524 (font_update_drivers, Ffont_get_glyphs, font_add_log):
1525 Rename or move locals to avoid shadowing.
e663c700 1526
2a80c887 1527 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 1528 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 1529
1384fa33 1530 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 1531 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 1532
8b2c52e9
PE
1533 * alloc.c (mark_backtrace): Move decl from here ...
1534 * lisp.h: ... to here, so that it can be checked.
1535
475545b5 1536 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 1537 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
1538 (lisp_indirect_variable): Name an expression,
1539 to avoid gcc -Wbad-function-cast warning.
1faed8ae 1540 (Fdefvar): Rename locals to avoid shadowing.
475545b5 1541
b1349114 1542 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 1543 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 1544 Use const pointer when appropriate.
b1349114 1545
a2928364
PE
1546 * lisp.h (get_system_name, get_operating_system_release):
1547 Move decls here, to check interfaces.
1548 * process.c (get_operating_system_release): Move decl to lisp.h.
1549 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
1550 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
1551 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
1552 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
1553 (Fformat_time_string, Fencode_time, Finsert_char):
1554 (Ftranslate_region_internal, Fformat):
1555 Rename or remove local vars to avoid shadowing.
9710023e 1556 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 1557
a415e694
PE
1558 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
1559 avoid shadowing.
1560
8ef4622d
PE
1561 * lisp.h (eassert): Check that the argument compiles, even if
1562 ENABLE_CHECKING is not defined.
1563
946f9a5b
PE
1564 * data.c (Findirect_variable): Name an expression, to avoid
1565 gcc -Wbad-function-cast warning.
112396d6 1566 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 1567 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
1568 (Fmake_variable_buffer_local, Fmake_local_variable):
1569 Mark variables as initialized.
52746918 1570 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 1571
e5aab7e7 1572 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
1573 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
1574 Rename locals to avoid shadowing.
dff45157
PE
1575 (mark_stack): Move local variables into the #ifdef region where
1576 they're used.
7bc26fdb
PE
1577 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
1578 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
1579 needed otherwise.
1580 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
1581 (GC_STRING_CHARS): Remove; not used.
d40d4be1 1582 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 1583
e5aab7e7
PE
1584 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
1585 avoids undefined behavior in theory.
1586
4da60324
PE
1587 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
1588
88043301
PE
1589 Use functions, not macros, for up- and down-casing (Bug#8254).
1590 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
1591 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
1592 to use the following functions instead of these macros.
1593 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
1594 EMACS_INT, since callers assume the returned value fits in int.
1595 (upcase1): Likewise, for UPCASE_TABLE.
1596 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 1597 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 1598 the race-condition problem in the old DOWNCASE.
88043301 1599
19ed5445
PE
1600 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
1601 Rename locals to avoid shadowing.
1602 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
1603 (regex_compile, re_search_2, re_match_2_internal):
1604 Remove unused local vars.
952db0d7
PE
1605 (FREE_VAR): Rewrite so as not to use empty "else",
1606 which gcc can warn about.
da053e48 1607 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
1608 (RETALLOC_IF): Define only if needed.
1609 (WORDCHAR_P): Likewise. This one is never needed, but is used
1610 only in a comment talking about a compiler bug, so put inside
1611 the #if 0 of that comment.
1612 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
1613 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
1614 Remove; unused.
19ed5445 1615
1f3561e4 1616 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
1617 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
1618 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 1619
ded6f8f7
PE
1620 * search.c (simple_search): Remove unused var.
1621
dbd37a95
PE
1622 * dired.c (compile_pattern): Move decl from here ...
1623 * lisp.h: ... to here, so that it can be checked.
1624 (struct re_registers): New forward decl.
1625
7e47afad
PE
1626 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
1627
85f24f61
PE
1628 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
1629 All uses changed.
1630 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
1631 Rename locals to avoid shadowing.
5671df8f 1632 (Fvertical_motion): Mark locals as initialized.
85f24f61 1633
181aa2be 1634 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 1635 (casify_region): Mark local as initialized.
181aa2be 1636
930d429c
PE
1637 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
1638
7082eac6
PE
1639 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
1640 New macros, so that the caller can use some names other than
1641 gcpro1, gcpro2, etc.
1642 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
1643 of the new macros.
1644 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
1645 argument, for consistency with GCPRO2_VAR, etc: it is now the
1646 prefix of the variable, not the variable itself. All uses
1647 changed.
38b2c076
PE
1648 * dired.c (directory_files_internal, file_name_completion):
1649 Rename locals to avoid shadowing.
1650
15206ed9
PE
1651 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
1652 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
1653 dired.c's scmp function, had undefined behavior.
1654 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
1655 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
1656 * buffer.h: ... to here, because these macros use current_buffer,
1657 and the new implementation with inline functions needs to have
1658 current_buffer in scope now, rather than later when the macros
1659 are used.
1660 (downcase, upcase1): New static inline functions.
1661 (DOWNCASE, UPCASE1): Reimplement using these functions.
1662 This avoids undefined behavior in expressions like
1663 DOWNCASE (x) == DOWNCASE (y), which previously suffered
1664 from race conditions in accessing the global variables
1665 case_temp1 and case_temp2.
1666 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
1667 * lisp.h (case_temp1, case_temp2): Remove their decls.
1668 * character.h (ASCII_CHAR_P): Move from here ...
1669 * lisp.h: ... to here, so that the inline functions mentioned
1670 above can use them.
1671
4a6bea26
PE
1672 * dired.c (directory_files_internal_unwind): Now static.
1673
f14b7e14
PE
1674 * fileio.c (file_name_as_directory, directory_file_name):
1675 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
1676 Now static.
2893f146
PE
1677 (file_name_as_directory): Use const pointers when appropriate.
1678 (Fexpand_file_name): Likewise. In particular, newdir might
1679 point at constant storage, so make it a const pointer.
fd4ead52 1680 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
1681 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
1682 signedness issues.
f839df0c
PE
1683 (Fset_file_times, Finsert_file_contents, auto_save_error):
1684 Rename locals to avoid shadowing.
f14b7e14 1685
5716756e 1686 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
1687 (Ftry_completion, Fall_completions): Rename or remove locals
1688 to avoid shadowing.
5716756e 1689
b4c3046a
PE
1690 * marker.c (bytepos_to_charpos): Remove; unused.
1691
b45db522
PE
1692 * lisp.h (verify_bytepos, count_markers): New decls,
1693 so that gcc does not warn that these functions aren't declared.
1694
85876d07
PE
1695 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
1696 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 1697 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 1698 (copy_text): Remove unused local var.
85876d07 1699
03d78a21 1700 * filelock.c (within_one_second): Now static.
b3dd38ab 1701 (lock_file_1): Rename local to avoid shadowing.
03d78a21 1702
5df8f01b
PE
1703 * buffer.c (fix_overlays_before): Mark locals as initialized.
1704 (fix_start_end_in_overlays): Likewise. This function should be
1705 simplified by using pointers-to-pointers, but that's a different
1706 matter.
b1d876f1 1707 (switch_to_buffer_1): Now static.
8f54f30a
PE
1708 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
1709 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 1710
a70072c9 1711 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 1712 Fix pointer signedness issue.
edced198
PE
1713 (sys_subshell): Mark local as volatile if checking for lint,
1714 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 1715 (MAXPATHLEN): Define only if needed.
a70072c9 1716
a0977c44
PE
1717 * process.c (serial_open, serial_configure): Move decls from here ...
1718 * systty.h: ... to here, so that they can be checked.
1719
a884fdcc
PE
1720 * fns.c (get_random, seed_random): Move extern decls from here ...
1721 * lisp.h: ... to here, so that they can be checked.
1722
604efe86 1723 * sysdep.c (reset_io): Now static.
b8950c94 1724 (wait_for_termination_signal): Remove; unused.
604efe86 1725
38fc62d9
PE
1726 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
1727 (copy_keymap_item, append_key, push_text_char_description):
1728 Now static.
1004a21a 1729 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 1730 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
1731 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
1732 (describe_map_tree):
1733 Rename locals to avoid shadowing.
38fc62d9 1734
2f2650da
PE
1735 * keyboard.c: Declare functions static if they are not used elsewhere.
1736 (echo_char, echo_dash, cmd_error, top_level_2):
1737 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
1738 (read_char, kbd_buffer_get_event, make_lispy_position):
1739 (make_lispy_event, make_lispy_movement, apply_modifiers):
1740 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
1741 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
1742 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 1743 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 1744 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 1745
a053e86c 1746 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
1747 (mark_kboards): Move decl here ...
1748 * alloc.c (mark_kboards): ... from here.
a053e86c 1749
4752793e
PE
1750 * lisp.h (force_auto_save_soon): New decl.
1751
74f10ca7 1752 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
1753 (DEFINE_DUMMY_FUNCTION): New macro.
1754 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
1755 Use it.
c03cd23f
PE
1756 (main): Add casts to avoid warnings
1757 if GCC considers string literals to be constants.
74f10ca7 1758
022e70d4
PE
1759 * lisp.h (fatal_error_signal): Add decl, since it's exported.
1760
59d6fe83
PE
1761 * dbusbind.c: Pointer signedness fixes.
1762 (xd_signature, xd_append_arg, xd_initialize):
1763 (Fdbus_call_method, Fdbus_call_method_asynchronously):
1764 (Fdbus_method_return_internal, Fdbus_method_error_internal):
1765 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
1766 (Fdbus_register_signal): Use SSDATA when the context wants char *.
1767
78320123
PE
1768 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
1769 if GCC considers string literals to be constants.
49cebcca 1770 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 1771
35ac2a97
SM
17722011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
1773
fb103ca9
SM
1774 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
1775 (print_preprocess, print_object): New macro to fix last change.
1776
35ac2a97
SM
1777 * print.c (print_preprocess): Don't forget font objects.
1778
62973b41
JB
17792011-03-16 Juanma Barranquero <lekktu@gmail.com>
1780
1781 * emacs.c (USAGE3): Doc fixes.
1782
0e48bb22
AS
17832011-03-15 Andreas Schwab <schwab@linux-m68k.org>
1784
1785 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
1786 structure.
1787
7684e57b
JB
17882011-03-14 Juanma Barranquero <lekktu@gmail.com>
1789
1790 * lisp.h (VWindow_system, Qfile_name_history):
1791 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
1792 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
1793 (w32_system_caret_x, w32_system_caret_y): Declare extern.
1794
1795 * w32select.c: Don't #include "keyboard.h".
c96bbc66 1796 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
1797
1798 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
1799 * w32console.c (detect_input_pending, read_input_pending)
1800 (encode_terminal_code):
1801 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
1802 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
1803 (w32_system_caret_y, Qfile_name_history):
1804 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
1805 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
1806 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
1807 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
1808 * w32proc.c (Qlocal, report_file_error):
1809 * w32term.c (Vwindow_system, updating_frame):
1810 * w32uniscribe.c (initialized, uniscribe_font_driver):
1811 Remove unneeded extern declarations.
1812
2aa46d6c
CY
18132011-03-14 Chong Yidong <cyd@stupidchicken.com>
1814
c96bbc66 1815 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 1816
cffc6f3b
CY
18172011-03-13 Chong Yidong <cyd@stupidchicken.com>
1818
1819 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
1820 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
1821 These macros can no longer be used for assignment.
1822
44f230aa
SM
1823 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
1824 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
1825 (record_buffer_markers, fetch_buffer_markers): New functions for
1826 recording and fetching special buffer markers.
1827 (set_buffer_internal_1, set_buffer_temp): Use them.
1828
1829 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
1830
1831 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
1832
1833 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
1834 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
1835
1836 * xdisp.c (hscroll_window_tree):
1837 (reconsider_clip_changes): Use PT instead of BUF_PT.
1838
d251f04b
EZ
18392011-03-13 Eli Zaretskii <eliz@gnu.org>
1840
1841 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
1842 $(EMACS_ROOT)/lib/intprops.h.
1843
f0c77cd1
PE
18442011-03-13 Paul Eggert <eggert@cs.ucla.edu>
1845
3eca4629
PE
1846 Fix more problems found by GCC 4.5.2's static checks.
1847
7c86ee98
PE
1848 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
1849 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
1850 (xg_free_frame_widgets): Make it clear that a local variable is
1851 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
1852 (gdk_window_get_screen): Make it clear that this macro is needed
1853 only if USE_GTK_TOOLTIP.
1e5524e7
PE
1854 (int_gtk_range_get_value): New function, which avoids a diagnostic
1855 from gcc -Wbad-function-cast.
1856 (xg_set_toolkit_scroll_bar_thumb): Use it.
1857 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
1858 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
1859 (get_utf8_string, xg_get_file_with_chooser):
1860 Rename locals to avoid shadowing.
1861 (create_dialog): Move locals to avoid shadowing.
7c86ee98 1862
41729b81
PE
1863 * xgselect.c (xg_select): Remove unused var.
1864
f0c77cd1
PE
1865 * image.c (four_corners_best): Mark locals as initialized.
1866 (gif_load): Initialize transparent_p to zero (Bug#8238).
1867 Mark another local as initialized.
ec6cf4c6 1868 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 1869
ce0ad53d 1870 * image.c (clear_image_cache): Now static.
d5d5a617 1871 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 1872 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
1873 (x_edge_detection): Remove unnecessary cast that
1874 gcc -Wbad-function-cast diagnoses.
2037898d 1875 (gif_load): Fix pointer signedness.
6ae141d6
PE
1876 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
1877 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 1878
33383987 18792011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 1880
d32df629
PE
1881 Improve quality of tests for time stamp overflow.
1882 For example, without this patch (encode-time 0 0 0 1 1
1883 1152921504606846976) returns the obviously-bogus value (-948597
1884 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
1885 reports time overflow. See
1886 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
1887 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
1888 * editfns.c: Include limits.h and intprops.h.
1889 (TIME_T_MIN, TIME_T_MAX): New macros.
1890 (time_overflow): Move earlier, to before first use.
1891 (hi_time, lo_time): New functions, for an accurate test for
1892 out-of-range times.
1893 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
1894 (Fget_internal_run_time): Don't assume time_t fits in int.
1895 (make_time): Use list2 instead of Fcons twice.
1896 (Fdecode_time): More accurate test for out-of-range times.
1897 (check_tm_member): New function.
1898 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
1899 (lisp_time_argument): Don't rely on undefined left-shift and
1900 right-shift behavior when checking for time stamp overflow.
8be6f318 1901
fe31d94c
PE
1902 * editfns.c (time_overflow): New function, refactoring common code.
1903 (Fformat_time_string, Fdecode_time, Fencode_time):
1904 (Fcurrent_time_string): Use it.
1905
8be6f318
PE
1906 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
1907 * dired.c (make_time): Move to ...
1908 * editfns.c (make_time): ... here.
1909 * systime.h: Note the move.
1910
09d9db2c 19112011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 1912
126bc0dc
YM
1913 * fringe.c (update_window_fringes): Remove unused variables.
1914
c47cbdfd
YM
1915 * unexmacosx.c (copy_data_segment): Also copy __got section.
1916 (Bug#8223)
1917
7ac80be9
EZ
19182011-03-12 Eli Zaretskii <eliz@gnu.org>
1919
c96bbc66 1920 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
1921 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
1922 Constify `char *' arguments and their references according to
1923 prototypes in tparam.h.
1924
ecb0f94d 1925 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 1926
7ac80be9
EZ
1927 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
1928 Adapt all references accordingly.
1929
1930 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
1931
ef1fd07e
TT
19322011-03-11 Tom Tromey <tromey@redhat.com>
1933
1934 * buffer.c (syms_of_buffer): Remove obsolete comment.
1935
7ef4b50c
EZ
19362011-03-11 Eli Zaretskii <eliz@gnu.org>
1937
1938 * termhooks.h (encode_terminal_code): Declare prototype.
1939
1940 * msdos.c (encode_terminal_code): Don't declare prototype.
1941
1942 * term.c (encode_terminal_code): Now external again, used by
1943 w32console.c and msdos.c.
1944
44f230aa
SM
1945 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
1946 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 1947
4b1ec863 19482011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 1949
1714f52b 1950 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 1951
4b1ec863
PE
1952 * fringe.c (update_window_fringes): Mark locals as initialized
1953 (Bug#8227).
1954 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 1955
524c7aa6
PE
1956 * alloc.c (mark_fringe_data): Move decl from here ...
1957 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
1958 to check its interface.
1959 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
1960
a5c0af81 1961 * fontset.c (free_realized_fontset): Now static.
7519b8cd 1962 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 1963 (fontset_font): Mark local as initialized.
a9a06e0b 1964 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 1965
b4716021
PE
1966 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
1967
811e9bac 1968 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 1969 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
1970 (x_own_selection, Fx_disown_selection_internal): Rename locals
1971 to avoid shadowing.
1972 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 1973
7e3ab302
PE
1974 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
1975 so that the caller can use some name other than gcpro1.
1976 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
1977 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
1978 (Fx_backspace_delete_keys_p):
1979 Use them to avoid shadowing, and rename vars to avoid shadowing.
1980 (x_decode_color, x_set_name, x_window): Now static.
6b437900 1981 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 1982 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
1983 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
1984 Remove unused locals.
7e3ab302
PE
1985 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
1986 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
1987 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
1988 macros.
f78faa98 1989
e2b13473
PE
1990 * xterm.h (x_mouse_leave): New decl.
1991
77f23912
PE
1992 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
1993 Remove unused functions.
cdf4ba58
PE
1994 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
1995 (x_calc_absolute_position): Now static.
7411c686 1996 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 1997 Don't declare local "event" unless it's used.
ed7bf3a5
PE
1998 (x_iconify_frame, x_free_frame_resources): Don't declare locals
1999 unless they are used.
38d0b34a
PE
2000 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
2001 (x_fatal_error_signal): Remove; not used.
a6067996
PE
2002 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
2003 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
2004 (x_error_catcher, x_connection_closed, x_error_handler):
2005 (x_error_quitter, xembed_send_message, x_iconify_frame):
2006 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 2007 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 2008 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 2009
44f230aa
SM
2010 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
2011 Rename or move locals to avoid shadowing.
6b463e58 2012 (tty_defined_color, merge_face_heights): Now static.
5967d051 2013 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
2014 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
2015 does not deduce is never used uninitialized.
73719eba
PE
2016 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
2017 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 2018
426994c3 2019 * terminal.c (store_terminal_param): Now static.
5489860b 2020
032f1620 2021 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 2022 (set_frame_menubar): Remove unused local.
d4323972 2023 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
2024 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
2025 since they might point to immutable storage.
281585b0
PE
2026 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
2027 since it's unused otherwise.
032f1620 2028
367c19e5 2029 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 2030 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
2031 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
2032 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 2033 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
2034 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
2035 does not deduce are never used uninitialized.
70739cbe 2036
07b48fa9
PE
2037 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
2038
8868a238 2039 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
2040 * window.c (window_loop, size_window):
2041 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 2042
7e5cf297 2043 * window.c (display_buffer): Now static.
d6550a9f
PE
2044 (size_window): Mark variables that gcc -Wuninitialized
2045 does not deduce are never used uninitialized.
a586633d
PE
2046 * window.h (check_all_windows): New decl, to forestall
2047 gcc -Wmissing-prototypes diagnostic.
5b555da1 2048 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 2049
f6095868
PE
2050 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
2051 shadowing.
2052 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
2053 Include <limits.h>.
2054 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
2055 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
2056 (load_charset_map): Mark variables that gcc -Wuninitialized
2057 does not deduce are never used uninitialized.
53df7c11 2058 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 2059
f38b440c
PE
2060 * coding.c (coding_set_source, coding_set_destination):
2061 Use "else { /* comment */ }" rather than "else /* comment */;"
2062 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
2063 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
2064 a block, when the outer 'i' will do.
2065 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
2066 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
2067 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
2068 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
2069 (Fdecode_sjis_char, Fdefine_coding_system_internal):
2070 Rename locals to avoid shadowing.
2071 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
2072 * coding.c (emacs_mule_char, encode_invocation_designation):
2073 Now static, since they're not used elsewhere.
413bb2db 2074 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 2075 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
2076 (decode_coding_emacs_mule): Mark variables that gcc
2077 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
2078 (detect_coding_iso_2022): Initialize a local variable that might
2079 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 2080 this initialization is needed. (Bug#8211)
5f58e762
PE
2081 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
2082 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
2083 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
2084 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
2085 Remove unused macros.
f38b440c 2086
232b38b9 2087 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 2088 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 2089 * character.c (string_count_byte8): Likewise.
232b38b9 2090
fb90da1b
PE
2091 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
2092 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
2093
fb93dbc2
PE
2094 * chartab.c (copy_sub_char_table): Now static, since it's not used
2095 elsewhere.
5c156ace
PE
2096 (sub_char_table_ref_and_range, char_table_ref_and_range):
2097 Rename locals to avoid shadowing.
bbcd0949 2098 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 2099
7d3b3862 2100 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 2101 (BIDI_BOB): Remove unused macro.
7d3b3862 2102
6be7d3da
PE
2103 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
2104 deduce are never used uninitialized.
c2ed9c8b 2105 * term.c (encode_terminal_code): Likewise.
6be7d3da 2106
75f8807f 2107 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 2108
50938595
PE
2109 * tparam.h: New file.
2110 * term.c, tparam.h: Include it.
2111 * deps.mk (term.o, tparam.o): Depend on tparam.h.
2112 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
2113 Move these decls to tparam.h, and make them agree with what
2114 is actually in tparam.c. The previous trick of using incompatible
2115 decls in different modules does not conform to the C standard.
2116 All callers of tparam changed to use tparam's actual API.
2117 * tparam.c (tparam1, tparam, tgoto):
2118 Use const pointers where appropriate.
2119
fbceeba2
PE
2120 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
2121 * cm.h (struct cm): Likewise.
2122 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
2123 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
2124 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
2125 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
2126 (turn_on_face, init_tty): Likewise.
2127 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 2128
7f3f1250
PE
2129 * term.c (term_mouse_position): Rename local to avoid shadowing.
2130
e6ca6543
PE
2131 * alloc.c (mark_ttys): Move decl from here ...
2132 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
2133
c40f8d15
AS
21342011-03-11 Andreas Schwab <schwab@linux-m68k.org>
2135
2136 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
2137
cfe0661d
JB
21382011-03-09 Juanma Barranquero <lekktu@gmail.com>
2139
2140 * search.c (compile_pattern_1): Remove argument regp, unused since
2141 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
2142 (compile_pattern): Don't pass it.
2143
0afb4571
J
21442011-03-08 Jan Djärv <jan.h.d@swipnet.se>
2145
2146 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
2147 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
2148 for ! HAVE_GTK3.
2149 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
2150
2151 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
2152
2153 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
2154 gdk_window_get_screen, gdk_window_get_geometry,
2155 gdk_x11_window_lookup_for_display and GDK_KEY_g.
2156 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
2157 (xg_get_pixbuf_from_pixmap): New function.
2158 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
2159 to Pixmap, take frame as parameter, remove GdkColormap parameter.
2160 Call xg_get_pixbuf_from_pixmap instead of
2161 gdk_pixbuf_get_from_drawable.
2162 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
2163 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
2164 (xg_check_special_colors): Use GtkStyleContext and its functions
2165 for HAVE_GTK3.
2166 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
2167 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
2168 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
2169 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
2170 Call gtk_widget_get_preferred_size.
0afb4571
J
2171 (xg_frame_resized): gdk_window_get_geometry only takes 5
2172 parameters.
44f230aa
SM
2173 (xg_win_to_widget, xg_event_is_for_menubar):
2174 Call gdk_x11_window_lookup_for_display.
0afb4571
J
2175 (xg_set_widget_bg): New function.
2176 (delete_cb): New function.
2177 (xg_create_frame_widgets): connect delete-event to delete_cb.
2178 Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3
2179 (xg_set_background_color): Call xg_set_widget_bg.
2180 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
2181 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
2182 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
2183 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
2184 if ! HAVE_GTK3.
2185 (update_frame_tool_bar): Call gtk_widget_hide.
2186 (xg_initialize): Use GDK_KEY_g.
2187
2188 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
2189 if ! HAVE_GTK3
2190 (x_session_initialize): Call gdk_x11_set_sm_client_id.
2191
2192 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
2193 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
2194 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
2195
1c2cc4ef
JB
21962011-03-08 Juanma Barranquero <lekktu@gmail.com>
2197
2198 * w32xfns.c (select_palette): Check success of RealizePalette against
2199 GDI_ERROR, not zero.
2200
33383987 2201See ChangeLog.11 for earlier changes.
aac0c6e3
MR
2202
2203;; Local Variables:
2204;; coding: utf-8
aac0c6e3
MR
2205;; End:
2206
33383987 2207 Copyright (C) 2011 Free Software Foundation, Inc.
aac0c6e3
MR
2208
2209 This file is part of GNU Emacs.
2210
2211 GNU Emacs is free software: you can redistribute it and/or modify
2212 it under the terms of the GNU General Public License as published by
2213 the Free Software Foundation, either version 3 of the License, or
2214 (at your option) any later version.
2215
2216 GNU Emacs is distributed in the hope that it will be useful,
2217 but WITHOUT ANY WARRANTY; without even the implied warranty of
2218 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2219 GNU General Public License for more details.
2220
2221 You should have received a copy of the GNU General Public License
2222 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.