* keyboard.c (record_asynch_buffer_change): Initialize an event
[bpt/emacs.git] / src / ChangeLog
1 2012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * keyboard.c (record_asynch_buffer_change): Initialize an event
4 only if it's really needed.
5 * frame.h (enum output_method): Remove output_mac member since
6 it's a leftover from the deleted code.
7 * frame.c (Fframep): Adjust user here ...
8 * terminal.c (Fterminal_live_p): ... and here.
9 * coding.c (Qmac): Now here because it's only used to denote
10 end-of-line encoding type.
11 (syms_of_coding): DEFSYM it.
12 * frame.h (Qmac): Remove duplicated declaration.
13
14 2012-12-26 Paul Eggert <eggert@cs.ucla.edu>
15
16 * window.c (select_window_1): Now static, since it's used only here.
17
18 2012-12-25 Eli Zaretskii <eliz@gnu.org>
19
20 * window.c (window_body_cols): Subtract display margins from the
21 window body width on TTYs as well. See
22 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
23 for the original report.
24
25 2012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
26
27 * xdisp.c (redisplay_window): Remove inner local variable
28 because the outer shadowed one has the same meaning.
29 * xterm.h (struct x_output): Remove toolbar_detached member since it's
30 set but never used.
31 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
32 (xg_create_tool_bar): Adjust users.
33
34 2012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
35
36 * buffer.h (BUF_COMPACT): New macro to follow the common style.
37 * buffer.c (Fget_buffer_create): Use it to set compact field of
38 struct buffer_text to avoid accessing an uninitialized value
39 when compact_buffer is called for the first time.
40 (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
41 (Fset_buffer_modified_p): Use buffer_window_count to check
42 whether the buffer is displayed in some window.
43 * xdisp.c (message_dolog): Likewise.
44
45 2012-12-23 Eli Zaretskii <eliz@gnu.org>
46
47 * w32.c (acl_set_file): If setting the file security descriptor
48 fails, and the new DACL is identical to the existing one, silently
49 return success. This fixes problems for users backing up their
50 own files without having the necessary privileges for setting
51 security descriptors.
52
53 * w32proc.c (reader_thread): Do not index fd_info[] with negative
54 values.
55 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
56 after WaitForSingleObject returns normally. This expedites reader
57 thread shutdown when delete_child triggers it.
58 (reap_subprocess): More accurate commentary for why we call
59 delete_child only when cp->fd is negative.
60
61 * w32.c (sys_close): Do not call delete_child on a subprocess
62 whose handle is not yet closed. Instead, set its file descriptor
63 to a negative value, so that reap_subprocess will call
64 delete_child on that subprocess when its SIGCHLD arrives. This
65 avoids closing handles used for communications between sys_select
66 and reader_thread, which doesn't give sys_select a chance to
67 notice that the process exited and invoke the SIGCHLD handler for
68 it.
69
70 2012-12-23 Jan Djärv <jan.h.d@swipnet.se>
71
72 * nsfns.m (Fns_do_applescript): Run event loop until script has
73 been executed (Bug#12969).
74 (ns_run_ascript): Chech as_script for nil, set to nil after
75 executing script.
76
77 2012-12-22 Martin Rudalics <rudalics@gmx.at>
78
79 * window.c (Fselect_window): Reword doc-string (Bug#13248).
80
81 2012-12-22 Eli Zaretskii <eliz@gnu.org>
82
83 * w32term.c (w32fullscreen_hook): New function.
84 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
85
86 2012-12-21 Eli Zaretskii <eliz@gnu.org>
87
88 * fileio.c (Finsert_file_contents): Doc fix.
89
90 * w32proc.c (new_child, delete_child, find_child_pid): For a
91 subprocess, consider its slot being in use as long as its process
92 handle (procinfo.hProcess) is not NULL. This avoids reusing the
93 slot when a new process is started immediately after killing
94 another one, without waiting enough time for the first process to
95 be reaped and resources allocated for it be orderly freed.
96 (Bug#13086)
97 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
98
99 2012-12-21 Chong Yidong <cyd@gnu.org>
100
101 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
102
103 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
104
105 2012-12-21 Eli Zaretskii <eliz@gnu.org>
106
107 * w32.c (get_name_and_id): Always pass NULL as the first argument
108 of lookup_account_sid. Avoids crashes with UNC file names that
109 refer to DFS domains, not to specific machine names. (Bug#12621)
110 Remove now unused argument FNAME; all callers changed.
111 (get_file_owner_and_group): Remove now unused argument FNAME; all
112 callers changed.
113
114 2012-12-21 Chong Yidong <cyd@gnu.org>
115
116 * editfns.c (Finsert_char): Since read-char-by-name now signals an
117 error for invalid chars, don't check for a nil return value.
118
119 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
120
121 Avoid calls to CHAR_TO_BYTE if byte position is known.
122 * editfns.c (make_buffer_string_both): Use move_gap_both.
123 (Fbuffer_string): Use make_buffer_string_both.
124 * marker.c (buf_charpos_to_bytepos): Convert to eassert.
125 Adjust comment.
126 (buf_bytepos_to_charpos): Likewise.
127 (charpos_to_bytepos): Remove.
128 * fileio.c (Finsert_file_contents): Use move_gap_both.
129 * search.c (Freplace_match): Likewise.
130 * process.c (process_send_region): Likewise. Use convenient
131 names for byte positions.
132 * lisp.h (charpos_to_bytepos): Remove prototype.
133 * indent.c (scan_for_column): Use CHAR_TO_BYTE.
134 * insdel.c (move_gap): Likewise.
135
136 2012-12-20 Paul Eggert <eggert@cs.ucla.edu>
137
138 * xdisp.c (redisplay_internal): Remove now-unused local.
139
140 2012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
141
142 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
143 (redisplay_internal): Don't bother selecting the frame to get the
144 proper value of frame-local variables.
145
146 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
147
148 * textprop.c (set_text_properties_1): Do not allow NULL interval.
149 Rename 4th argument since it may be buffer or string. Adjust comment.
150 * intervals.c (graft_intervals_info_buffer): Find an interval here.
151
152 2012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
153
154 * coding.c (Fdetect_coding_region): Do not check start and end with
155 CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
156 (code_convert_region): Likewise.
157
158 2012-12-18 Eli Zaretskii <eliz@gnu.org>
159
160 * w32.c (acl_get_file, acl_set_file): Run the file name through
161 map_w32_filename, and resolve any symlinks in the file name, like
162 Posix platforms do.
163 (acl_set_file): Call revert_to_self, if any privileges were
164 enabled.
165
166 2012-12-17 Juanma Barranquero <lekktu@gmail.com>
167
168 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
169 ($(BLD)/w32.$(O)): Update dependencies.
170
171 2012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
172
173 * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
174 propagate redisplay's scrolling (if any) to the right window.
175 (redisplay_internal): Use ensure_selected_frame.
176 (display_mode_lines): Complete last fix.
177 * window.c (select_window_1): New func, extracted from select_window.
178 (select_window): Use it.
179 * window.h (select_window_1): Declare.
180
181 2012-12-17 Eli Zaretskii <eliz@gnu.org>
182
183 Emulate Posix ACL APIs on MS-Windows.
184 * w32.c: Include sddl.h and sys/acl.h.
185 (SDDL_REVISION_1): Define if not already defined.
186 (g_b_init_get_security_descriptor_dacl)
187 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
188 (g_b_init_is_valid_security_descriptor)
189 (g_b_init_set_file_security): New static flags.
190 (globals_of_w32): Initialize them to zero.
191 (SetFileSecurity_Name): New string constant.
192 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
193 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
194 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
195 (IsValidSecurityDescriptor_Proc): New typedefs.
196 (get_file_security, get_security_descriptor_owner)
197 (get_security_descriptor_group): Set errno to ENOTSUP.
198 (set_file_security, get_security_descriptor_dacl)
199 (is_valid_security_descriptor, convert_sd_to_sddl)
200 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
201 (acl_free, acl_get_file, acl_set_file): New functions.
202
203 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
204
205 2012-12-17 Paul Eggert <eggert@cs.ucla.edu>
206
207 Don't reraise SIGCHLD, as that can now lose (Bug#13192).
208 With the 2012-12-03 fix for Bug#12980 in place, an old workaround
209 for some of that bug's symptoms can now cause Emacs to abort.
210 Remove the workaround.
211 * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
212 The bug that caused SIGCHLD to get lost has been fixed, and the
213 workaround for it can now cause Emacs to abort.
214
215 2012-12-16 Paul Eggert <eggert@cs.ucla.edu>
216
217 * sysdep.c (emacs_abort): Bump backtrace size to 40.
218 Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
219 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
220
221 2012-12-16 Romain Francoise <romain@orebokech.com>
222
223 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
224 (Fcopy_file): Change last arg to `preserve_extended_attributes'
225 and copy ACL entries of file in addition to SELinux context if set.
226 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
227
228 * Makefile.in (LIBACL_LIBS): New macro.
229 (LIBES): Use it.
230
231 2012-12-15 Paul Eggert <eggert@cs.ucla.edu>
232
233 * fileio.c (internal_delete_file): Use bool for boolean.
234
235 2012-12-15 Eli Zaretskii <eliz@gnu.org>
236
237 Fix bug #13079 on MS-Windows with temp files not being deleted.
238 * w32.h (_child_process): New members input_file and
239 pending_deletion.
240 (register_child): First argument is now pid_t.
241 (record_infile, record_pending_deletion): New prototypes.
242
243 * w32proc.c (new_child): Initialize input_file and
244 pending_deletion members of the child.
245 (delete_child): Delete the child's temporary input file, if any,
246 that is pending deletion.
247 (register_child): First argument is now pid_t.
248 (record_infile, record_pending_deletion): New functions.
249 (reap_subprocess): Fix a typo in DebPrint string.
250 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
251
252 * fileio.c (internal_delete_file): Return an int again: non-zero
253 if delete-file succeeds, zero otherwise.
254
255 * lisp.h (internal_delete_file): Adjust prototype.
256
257 * callproc.c (Fcall_process): Don't overwrite infile with result
258 of DECODE_FILE.
259 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
260 asynchronous subprocess, record the name of the input file name,
261 if any.
262 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
263 delete the file, record it as pending deletion when the subprocess
264 exits.
265
266 2012-12-14 Eli Zaretskii <eliz@gnu.org>
267
268 * editfns.c [HAVE_PWD_H]: Include grp.h.
269
270 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
271
272 2012-12-14 Paul Eggert <eggert@cs.ucla.edu>
273
274 Fix permissions bugs with setgid directories etc. (Bug#13125)
275 * dired.c (Ffile_attributes): Return t as the 9th attribute,
276 to mark it as a placeholder. The old value was often wrong.
277 The only user of this attribute has been changed to use
278 file-ownership-preserved-p instead, with its new group arg.
279 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
280
281 2012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
282
283 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
284 Keep selected_window and selected_frame in sync.
285
286 2012-12-14 Eli Zaretskii <eliz@gnu.org>
287
288 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
289 try to get accurate owner and group information from NT file
290 security APIs. This is to make most callers of 'stat' and
291 'lstat', which don't need that information, much faster.
292
293 * dired.c (Ffile_attributes) [WINDOWSNT]:
294 Set w32_stat_get_owner_group to a non-zero value, to request accurate
295 owner and group information from 'lstat'.
296
297 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
298
299 * fileio.c (Finsert_file_contents): Don't put tail into head area,
300 as that confuses set-auto-coding, so insist on the head-read
301 returning the full 1024 bytes. Let lseek compute the tail offset;
302 less work for us. Do not ignore I/O errors when reading the tail.
303
304 * xdisp.c: Minor style fixes.
305 (init_iterator): Hoist assignment out of if-expression.
306 (markpos_of_region): Callers now test for sign, not for -1.
307
308 2012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
309
310 Minor redisplay optimization when the region length is zero.
311 * xdisp.c (markpos_of_region): New function.
312 (init_iterator): Do not highlight the region of zero length.
313 (redisplay_window): Check whether the region is of non-zero length.
314 (try_cursor_movement): Allow if the region length is zero.
315 (try_window_reusing_current_matrix, try_window_id): Likewise.
316
317 2012-12-13 Eli Zaretskii <eliz@gnu.org>
318
319 * search.c (search_buffer): Check the inverse translations of each
320 character in pattern when the buffer being searched is unibyte.
321 (Bug#13084)
322
323 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
324
325 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
326 files, fixing a regression from 24.2.
327 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
328
329 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
330
331 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
332 fstat shouldn't fail, and if it does fail copy-file should not proceed.
333 Remove unnecessary S_ISLNK test, as (contra the comments) this
334 function can't copy symlinks. Improve quality of error message
335 when attempting to copy files that are neither regular files nor
336 directories.
337
338 2012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
339
340 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
341 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
342 * window.c (Frecenter):
343 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
344 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
345
346 2012-12-12 Daniel Colascione <dancol@dancol.org>
347
348 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
349 the dumped Emacs is not a sparse file, greatly improving Cygwin
350 "make bootstrap" performance.
351
352 2012-12-11 Michael Albinus <michael.albinus@gmx.de>
353
354 * inotify.c (inotify_callback): Generate an Emacs event for every
355 incoming inotify event.
356
357 2012-12-11 Eli Zaretskii <eliz@gnu.org>
358
359 * xdisp.c (handle_face_prop): Fix logic of computing
360 it->start_of_box_run_p.
361 (append_space_for_newline): If the glyph row is R2L, reset the
362 iterator's end_of_box_run_p flag before prepending the space glyph.
363 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
364 iterator's start_of_box_run_p flag before prepending the stretch.
365 (append_glyph, produce_image_glyph, append_composite_glyph)
366 (append_stretch_glyph, append_glyphless_glyph): Reverse the
367 left_box_line_p and right_box_line_p flags of the glyph for R2L
368 glyph rows. (Bug#13011)
369
370 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
371
372 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
373 if changed buffer is not shown in a window.
374 * insdel.c (prepare_to_modify_buffer): Likewise.
375 * window.c (replace_buffer_in_windows_safely): Do nothing
376 if buffer is not shown in a window.
377 (Fforce_window_update): Likewise if string or buffer argument
378 is passed.
379
380 2012-12-11 Eli Zaretskii <eliz@gnu.org>
381
382 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
383 encoded_file_name, which is what it is.
384
385 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
386
387 Consistently use marker_position and marker_byte_position.
388 * fringe.c (Ffringe_bitmaps_at_pos):
389 * indent.c (Fvertical_motion):
390 * insdel.c (prepare_to_modify_buffer):
391 * keyboard.c (make_lispy_position):
392 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
393 (window_scroll_pixel_based, displayed_window_lines)
394 (Fset_window_configuration):
395 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
396 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
397 Replace direct access to marker fields with calls
398 to marker_position and/or marker_byte_position.
399
400 2012-12-11 Juanma Barranquero <lekktu@gmail.com>
401
402 * makefile.w32-in (SIG2STR_H): New macro.
403 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
404 ($(BLD)/w32notify.$(O)): Update dependencies.
405
406 2012-12-10 Daniel Colascione <dancol@dancol.org>
407
408 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
409 Windows file notification functionality unless WINDOWSNT.
410
411 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
412 declarations.
413
414 * w32fns.c (cache_system_info): Initialize the global hinst
415 variable here so various initialization calls DTRT.
416
417 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
418 (hinst): Remove unneeded extern declaration.
419 (_start): Remove initialization of above variables; remove
420 initialization of hinst, as cache_system_info now does that.
421
422 * emacs.c (main): Call cache_system_info early in startup; we
423 previously weren't calling it in Cygwin builds.
424
425 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
426 Teach the autoconf build system how to compile a Windows resource file
427 and link it to Emacs.
428
429 2012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
430
431 Per-buffer window counters.
432 * buffer.h (struct buffer): New member window_count.
433 (buffer_window_count): New function.
434 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
435 Initialize window_count.
436 (Fkill_buffer): Verify window_count for the buffer being killed.
437 (modify_overlay): Do not force redisplay if buffer is not shown
438 in any window.
439 (init_buffer_once): Initialize window_count for buffer_defaults
440 and buffer_local_symbols.
441 * window.h (buffer_shared): Remove declaration.
442 (wset_buffer): Convert from inline ...
443 * window.c (wset_buffer): ... to an ordinary function.
444 (adjust_window_count): New function.
445 (make_parent_window): Use it.
446 * xdisp.c (buffer_shared): Remove.
447 (redisplay_internal, redisplay_window): Adjust users.
448 (buffer_shared_and_changed): Use per-buffer window counter.
449
450 2012-12-10 Eli Zaretskii <eliz@gnu.org>
451
452 Support for filesystem notifications on MS-Windows.
453 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
454 and this is a TTY frame, signal the caller that keyboard input is
455 available.
456
457 * w32xfns.c (drain_message_queue): Now returns an int: an
458 indication whether any WM_EMACS_FILENOTIFY messages were found in
459 the queue.
460
461 * w32inevt.c (handle_file_notifications): New function.
462 (w32_console_read_socket): Call it to process file notifications.
463
464 * w32console.c (initialize_w32_display): Record the main thread ID
465 in dwMainThreadId.
466
467 * deps.mk (inotify.o): New dependency list.
468
469 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
470
471 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
472 (WM_EMACS_END): Bump value by 1.
473 (notification_buffer_in_use, file_notifications)
474 (notifications_size, notifications_desc): Declare.
475 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
476 Add prototypes.
477
478 * w32term.c (lispy_file_action, queue_notifications): New functions.
479 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
480 <Qrenamed_to>: New symbols.
481 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
482
483 * w32notify.c: New file, implements file event notifications for
484 MS-Windows.
485
486 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
487 by posting it to the w32_read_socket queue.
488
489 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
490
491 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
492 (GLOBAL_SOURCES): Add w32notify.c
493 ($(BLD)/w32notify.$(O)): New set of dependencies.
494
495 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
496
497 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
498 Handle FILE_NOTIFY_EVENT.
499 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
500 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
501 w32notify-handle-event by default.
502
503 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
504 syms_of_w32notify.
505
506 2012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
507
508 Support for filesystem notifications on GNU/Linux via inotify.
509 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
510
511 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
512
513 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
514 (syms_of_keyboard): DEFSYM it.
515 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
516 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
517 Qfile_inotify events.
518 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
519 special-event-map to inotify-handle-event.
520
521 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
522
523 * Makefile.in (base_obj): Add inotify.o.
524
525 * inotify.c: New file.
526
527 2012-12-10 Jan Djärv <jan.h.d@swipnet.se>
528
529 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
530
531 2012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
532
533 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
534 DWORD_PTR, for compatibility with 64-bit builds.
535
536 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
537 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
538 (system_process_attributes): Use SIZE_T rather than DWORD, for
539 compatibility with 64-bit builds.
540
541 2012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
542
543 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
544
545 2012-12-10 Eli Zaretskii <eliz@gnu.org>
546
547 * indent.c (Fvertical_motion): If a display string will be
548 displayed on the left or the right margin, don't consider it as a
549 factor in cursor positioning. (Bug#13108)
550
551 2012-12-10 Martin Rudalics <rudalics@gmx.at>
552
553 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
554
555 2012-12-10 Paul Eggert <eggert@cs.ucla.edu>
556
557 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
558 for string length.
559
560 2012-12-08 Eli Zaretskii <eliz@gnu.org>
561
562 * w32.c (unsetenv): Return 0 if the input string is too long.
563
564 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
565
566 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
567 * alloc.c (xputenv): New function.
568 * dbusbind.c (Fdbus_init_bus):
569 * emacs.c (main):
570 * xterm.c (x_term_init):
571 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
572 * editfns.c (initial_tz): Move static var decl up.
573 (tzvalbuf_in_environ): New static var.
574 (init_editfns): Initialize these two static vars.
575 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
576 Save old TZ value on stack, if it's small.
577 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
578 instead, use xputenv+unsetenv to set and restore TZ.
579 (environbuf): Remove static var. All uses removed.
580 (Fset_time_zone_rule): Do not save TZ and environ;
581 no longer needed here.
582 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
583 Move to inside set_time_zone_rule; they don't need file scope any more.
584 (set_time_zone_rule): Maintain the TZ=value string separately.
585 (syms_of_editfns): Don't initialize initial_tz;
586 init_editfns now does it.
587 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
588 * lisp.h (xputenv): New decl.
589
590 2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
591
592 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
593
594 2012-12-08 Eli Zaretskii <eliz@gnu.org>
595
596 * w32.c (unsetenv, sys_putenv): New functions.
597
598 2012-12-08 Chong Yidong <cyd@gnu.org>
599
600 * editfns.c (Finsert_char): Make the error message more
601 informative (Bug#12992).
602
603 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
604
605 Simplify get_lim_data.
606 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
607 Remove USG and vlimit methods; no longer used these days.
608 Add #error catchall just in case.
609
610 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
611 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
612 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
613 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
614 (deleted_pid_list, Fdelete_process, create_process)
615 (record_child_status_change, handle_child_signal, deliver_child_signal)
616 (init_process_emacs, syms_of_process):
617 Assume SIGCHLD is defined.
618 (parse_signal): Remove. All uses removed.
619 (abbr_to_signal): New static function.
620 (Fsignal_process): Use it to convert signal names to ints.
621 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
622 kill (getpgrp (), ...).
623 (emacs_sigaction_init): Assume SIGCHLD is defined.
624 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
625 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
626 * syssignal.h (EMACS_KILLPG): Remove.
627 All uses replaced by 'kill' with a negative pid.
628 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
629 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
630
631 2012-12-07 Paul Eggert <eggert@cs.ucla.edu>
632
633 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
634 This will cause a production Emacs to dump core instead of
635 infinite-looping.
636
637 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
638
639 * frame.c (make_frame): Do not set window's buffer to t.
640 * window.c (Fsplit_window_internal): Likewise. Previously it was
641 used to indicate that the window is being set up. Now we use
642 set_window_buffer for all new windows, so the condition in ...
643 (Fset_window_buffer): ... is always true and can be removed.
644
645 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
646
647 Convenient macro to check whether the buffer is hidden.
648 * buffer.h (BUFFER_HIDDEN_P): New macro.
649 * frame.c (make_frame): Use it. Adjust comment.
650 * buffer.c (candidate_buffer): New function.
651 (Fother_buffer, other_buffer_safely): Use it.
652
653 2012-12-06 Eli Zaretskii <eliz@gnu.org>
654
655 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
656 if the child process is still running. Instead, exit the wait
657 loop and return zero. (Bug#13086)
658
659 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
660
661 * frame.h (x_char_width, x_char_height): Remove prototypes.
662 * w32term.h (x_char_width, x_char_height): Likewise.
663 * xfns.c (x_char_width, x_char_height): Remove.
664 * w32fns.c (x_char_width, x_char_height): Likewise.
665 * nsfns.c (x_char_width, x_char_height): Likewise.
666 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
667 all window frames.
668 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
669 * keyboard.c (command_loop_1): Remove prototype.
670 (command_loop_2, top_level_1): Add static to match prototype.
671
672 2012-12-06 Paul Eggert <eggert@cs.ucla.edu>
673
674 Fix a recently-introduced delete-process race condition.
675 * callproc.c, process.h (record_kill_process):
676 New function, containing part of the old call_process_kill.
677 (call_process_kill): Use it.
678 This does not change call_process_kill's behavior.
679 * process.c (Fdelete_process): Use record_kill_process to fix a
680 race condition that could cause Emacs to lose track of a child.
681
682 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
683
684 Avoid code duplication between prev_frame and next_frame.
685 * frame.c (candidate_frame): New function. Add comment.
686 (prev_frame, next_frame): Use it. Adjust comment.
687
688 2012-12-06 Eli Zaretskii <eliz@gnu.org>
689
690 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
691 fails, signal an error instead of continuing with an empty
692 string. (Bug#13079)
693 Encode expanded temp file pattern before passing it to mkstemp or
694 mktemp.
695
696 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
697 Encode the file name before passing it to dostounix_filename, in
698 case it will downcase it (under w32-downcase-file-names).
699 (Bug#12933)
700
701 2012-12-05 Paul Eggert <eggert@cs.ucla.edu>
702
703 Minor call-process cleanups.
704 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
705 at the same time as other platforms, to simplify analysis.
706 No need for fd0_volatile since we have synch_process_fd.
707 Avoid needless emacs_close; arg is always negative.
708
709 2012-12-04 Andreas Schwab <schwab@linux-m68k.org>
710
711 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
712 processes.
713
714 2012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
715
716 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
717 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
718 and mouse_face_hidden members to a bitfields.
719 * frame.h (struct frame): Remove set-but-not-used space_width member.
720 (FRAME_SPACE_WIDTH): Remove.
721 * nsterm.m, w32term.c, xterm.c: Adjust users.
722 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
723 member. Adjust users. Convert term_initted, delete_in_insert_mode,
724 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
725 members to a bitfields.
726
727 2012-12-03 Paul Eggert <eggert@cs.ucla.edu>
728
729 Don't let call-process be a zombie factory (Bug#12980).
730 Fixing this bug required some cleanup of the signal-handling code.
731 As a side effect, this change also fixes a longstanding rare race
732 condition whereby Emacs could mistakenly kill unrelated processes,
733 and it fixes a bug where a second C-g does not kill a recalcitrant
734 synchronous process in GNU/Linux and similar platforms.
735 The patch should also fix the last vestiges of Bug#9488,
736 a bug which has mostly been fixed on the trunk by other changes.
737 * callproc.c, process.h (synch_process_alive, synch_process_death)
738 (synch_process_termsig, sync_process_retcode):
739 Remove. All uses removed, to simplify analysis and so that
740 less consing is done inside critical sections.
741 * callproc.c (call_process_exited): Remove. All uses replaced
742 with !synch_process_pid.
743 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
744 These take the role of what used to be in unwind-protect arg.
745 All uses changed.
746 (block_child_signal, unblock_child_signal):
747 New functions, to avoid races that could kill innocent-victim processes.
748 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
749 (call_process_kill): Record killed processes as deleted, so that
750 zombies do not clutter up the system. Do this inside a critical
751 section, to avoid a race that would allow the clutter.
752 (call_process_cleanup): Fix code so that the second C-g works again
753 on common platforms such as GNU/Linux.
754 (Fcall_process): Create the child process in a critical section,
755 to fix a race condition. If creating an asynchronous process,
756 record it as deleted so that zombies do not clutter up the system.
757 Do unwind-protect for WINDOWSNT too, as that's simpler in the
758 light of these changes. Omit unnecessary call to emacs_close
759 before failure, as the unwind-protect code does that.
760 * callproc.c (call_process_cleanup):
761 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
762 * process.c (record_deleted_pid): New function, containing
763 code refactored out of Fdelete_process.
764 (Fdelete_process): Use it.
765 (process_status_retrieved): Remove. All callers changed to use
766 child_status_change.
767 (record_child_status_change): Remove, folding its contents into ...
768 (handle_child_signal): ... this signal handler. Now, this
769 function is purely a handler for SIGCHLD, and is not called after
770 a synchronous waitpid returns; the synchronous code is moved to
771 wait_for_termination. There is no need to worry about reaping
772 more than one child now.
773 * sysdep.c (get_child_status, child_status_changed): New functions.
774 (wait_for_termination): Now takes int * status and bool
775 interruptible arguments, too. Do not record child status change;
776 that's now the caller's responsibility. All callers changed.
777 Reimplement in terms of get_child_status.
778 (wait_for_termination_1, interruptible_wait_for_termination):
779 Remove. All callers changed to use wait_for_termination.
780 * syswait.h: Include <stdbool.h>, for bool.
781 (record_child_status_change, interruptible_wait_for_termination):
782 Remove decls.
783 (record_deleted_pid, child_status_changed): New decls.
784 (wait_for_termination): Adjust to API changes noted above.
785
786 * bytecode.c, lisp.h (Qbytecode): Remove.
787 No longer needed after 2012-11-20 interactive-p changes.
788
789 2012-12-03 Eli Zaretskii <eliz@gnu.org>
790
791 * xdisp.c (redisplay_window): If the cursor is visible, but inside
792 the scroll margin, move point outside the margin. (Bug#13055)
793
794 2012-12-03 Jan Djärv <jan.h.d@swipnet.se>
795
796 * gtkutil.c (my_log_handler): New function.
797 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
798
799 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
800
801 * lisp.h (modify_region): Rename to...
802 (modify_region_1): ...new prototype.
803 * textprop.c (modify_region): Now static. Adjust users.
804 * insdel.c (modify_region): Rename to...
805 (modify_region_1): ...new function to work with current buffer.
806 Adjust comment and users. Use true and false for booleans.
807
808 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
809
810 * alloc.c (free_save_value): New function.
811 (safe_alloca_unwind): Use it.
812 * lisp.h (free_save_value): New prototype.
813 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
814 Add comment.
815 (save_excursion_restore): Adjust to match saved data structure.
816 Use free_save_value to offload some work from GC. Drop obsolete
817 #if 0 code.
818
819 2012-12-03 Chong Yidong <cyd@gnu.org>
820
821 * fileio.c (Vauto_save_list_file_name): Doc fix.
822
823 2012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
824
825 * w32fns.c: Remove prototype of atof.
826 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
827 builds.
828 (file_dialog_callback): Make it UINT_PTR.
829
830 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
831 with 64-bit builds.
832
833 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
834 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
835 defined.
836
837 2012-12-03 Glenn Morris <rgm@gnu.org>
838
839 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
840
841 2012-12-02 Paul Eggert <eggert@cs.ucla.edu>
842
843 Fix xpalloc confusion after memory is exhausted.
844 * alloc.c (xpalloc): Comment fix.
845 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
846 and signals an error, do not clear charset_table_size, as
847 charset_table is still valid.
848 * doprnt.c (evxprintf): Clear *BUF after freeing it.
849
850 Use execve to avoid need to munge environ (Bug#13054).
851 * callproc.c (Fcall_process):
852 * process.c (create_process):
853 Don't save and restore environ; no longer needed.
854 * callproc.c (child_setup):
855 Use execve, not execvp, to preserve environ.
856
857 2012-12-01 Paul Eggert <eggert@cs.ucla.edu>
858
859 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
860
861 2012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
862
863 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
864 display for sliced images (Bug#10500).
865
866 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
867
868 2012-11-30 Juanma Barranquero <lekktu@gmail.com>
869
870 * doc.c (Fdocumentation): Re-add handling of function-documentation,
871 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
872
873 2012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
874
875 * xdisp.c (window_outdated): Remove eassert since it hits
876 some suspicious corner cases (see Bug#13007 and Bug#13012).
877 (mode_line_update_needed): New function.
878 (redisplay_internal, redisplay_window): Use it.
879 (ensure_selected_frame): New function.
880 (redisplay_internal, unwind_redisplay): Use it.
881 (redisplay_internal): Move comment about buffer_shared...
882 (buffer_shared_and_changed): ...near to its real use.
883
884 2012-11-29 Paul Eggert <eggert@cs.ucla.edu>
885
886 * callproc.c (Fcall_process): Don't misreport vfork failure.
887
888 2012-11-28 Paul Eggert <eggert@cs.ucla.edu>
889
890 * callproc.c (Fcall_process): Fix vfork portability problems.
891 Do not assume that fd[0], count, filefd, and save_environ survive
892 vfork. Fix bug whereby wrong errno value could be reported for
893 pipe failure. Some minor cleanups, too, as follows. Move buf and
894 bufsize to the context where they're needed. Change new_argv to
895 be of type char **, as this is more convenient and avoids casts.
896 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
897 Now local constants, not macros.
898
899 2012-11-18 Kenichi Handa <handa@gnu.org>
900
901 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
902 for the variable "f".
903
904 2012-11-13 Kenichi Handa <handa@gnu.org>
905
906 * font.c (font_unparse_xlfd): Exclude special characters from the
907 generating XLFD name.
908
909 2012-11-27 Paul Eggert <eggert@cs.ucla.edu>
910
911 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
912 * dired.c (stat_uname, stat_gname):
913 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
914
915 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
916 * dired.c (directory_files_internal, file_name_completion):
917 Assume EAGAIN and EINTR are defined.
918
919 * fileio.c (Fcopy_file): Assume EISDIR is defined.
920 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
921 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
922 * lread.c (readbyte_from_file): Assume EINTR is defined.
923 * process.c (wait_reading_process_output, send_process) [subprocesses]:
924 Assume EIO and EAGAIN are defined.
925 * unexcoff.c (write_segment): Assume EFAULT is defined.
926
927 2012-11-27 Eli Zaretskii <eliz@gnu.org>
928
929 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
930 (Bug#11964)
931
932 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
933 highlighting on the frame was cleared. Prevents assertion
934 violations when repeatedly clicking on the "Top" link of the
935 "bread-crumbs" in Info buffers.
936
937 2012-11-25 Paul Eggert <eggert@cs.ucla.edu>
938
939 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
940
941 2012-11-24 Ken Brown <kbrown@cornell.edu>
942
943 * keyboard.c (HAVE_MOUSE):
944 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
945 were always defined.
946
947 2012-11-24 Eli Zaretskii <eliz@gnu.org>
948
949 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
950 between bpos_covered and bpos_max. This fixes cursor display when
951 several display strings follow each other.
952
953 * .gdbinit (pgx): If the glyph's object is a string, display the
954 pointer to string data, rather than the value of the string object
955 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
956
957 * indent.c (Fvertical_motion): If the starting position is covered
958 by a display string, return to one position before that, to avoid
959 overshooting it inside move_it_to. (Bug#12930)
960
961 2012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
962
963 * frame.h (struct frame): Remove display_preempted member
964 since all users are dead long ago.
965 * nsterm.h (struct x_output): Use the only dummy member.
966 * w32menu.c (pending_menu_activation): Remove since not
967 really used.
968 (set_frame_menubar): Adjust user.
969 * w32term.h (struct x_output): Drop outdated #if 0 code.
970 (struct w32_output): Use bitfields for explicit_parent,
971 asked_for_visible and menubar_active members.
972 Drop unused pending_menu_activation member.
973 * xterm.h (struct x_output): Drop outdated #if 0 code.
974 Use bitfields for explicit_parent, asked_for_visible,
975 has_been_visible and net_wm_state_hidden_seen members.
976
977 2012-11-23 Eli Zaretskii <eliz@gnu.org>
978
979 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
980 of a literal "/". (Bug#12955)
981 (gl-stamp): Invoke fc.exe directly, not through cmd.
982
983 2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
984
985 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
986 * dired.c: Assume HAVE_DIRENT_H.
987 (NAMLEN): Remove, replacing with ...
988 (dirent_namelen): New function. All uses changed. Use the GNU macro
989 _D_EXACT_NAMELEN if available, as it's faster than strlen.
990 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
991 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
992 * makefile.w32-in (DIR_H): Remove. All uses replaced with
993 $(NT_INC)/dirent.h.
994 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
995 * ndir.h: Rename to ../nt/inc/dirent.h.
996 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
997 Do not include <dirent.h>; no longer needed.
998 * w32.c: Include <dirent.h> rather than "ndir.h".
999
1000 2012-11-23 Chong Yidong <cyd@gnu.org>
1001
1002 * xftfont.c (xftfont_open): Remove duplicate assignment.
1003
1004 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
1005
1006 * alloc.c (Fgarbage_collect): Unblock input after clearing
1007 gc_in_progress to avoid note_mouse_highlight glitch with GC.
1008 * frame.h (FRAME_MOUSE_UPDATE): New macro.
1009 * msdos.c (IT_frame_up_to_date): Use it here...
1010 * w32term.c (w32_frame_up_to_date): ...here...
1011 * xterm.c (XTframe_up_to_date): ...and here...
1012 * nsterm.m (ns_frame_up_to_date): ...but not here.
1013 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
1014 Adjust users.
1015 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
1016 Do not check whether GC is in progress.
1017
1018 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
1019
1020 * xdisp.c (window_buffer_changed): New function.
1021 (update_menu_bar, update_tool_bar): Use it to
1022 simplify large 'if' statements.
1023 (redisplay_internal): Generalize commonly used
1024 'tail' and 'frame' local variables.
1025
1026 2012-11-22 Eli Zaretskii <eliz@gnu.org>
1027
1028 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
1029 with Windows system header.
1030
1031 2012-11-21 Paul Eggert <eggert@cs.ucla.edu>
1032
1033 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
1034 * alloc.c: Assume unistd.h exists.
1035 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
1036 * sysdep.c (get_current_dir_name): Assume getcwd exists.
1037 (getwd) [USG]: Remove; no longer needed.
1038 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
1039 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
1040 * w32.h (getcwd): Remove decl.
1041
1042 2012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
1043
1044 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
1045 Make it set selected_window as well.
1046 (update_tool_bar): Use it.
1047
1048 2012-11-21 Ken Brown <kbrown@cornell.edu>
1049
1050 * emacs.c (main): Set the G_SLICE environment variable for all
1051 Cygwin builds, not just GTK builds. See
1052 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
1053
1054 2012-11-21 Eli Zaretskii <eliz@gnu.org>
1055
1056 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
1057 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
1058 Define for the MSVC compiler.
1059
1060 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
1061
1062 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
1063 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
1064 dostounix_filename. Prevents crashes down the road, because
1065 dostounix_filename assumes it gets a unibyte string.
1066 Reported by Michel de Ruiter <michel@sentient.nl>, see
1067 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
1068
1069 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
1070
1071 Conflate Qnil and Qunbound for `symbol-function'.
1072 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
1073 * lread.c (init_obarray): Set `function' fields to Qnil.
1074 * eval.c (Fcommandp): Ignore Qunbound.
1075 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
1076 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
1077 Test NILP rather than Qunbound.
1078 (Ffmakunbound): Set to Qnil.
1079 (Fsymbol_function): Never signal an error.
1080 (Finteractive_form): Ignore Qunbound.
1081
1082 2012-11-20 Paul Eggert <eggert@cs.ucla.edu>
1083
1084 * eval.c (interactive_p): Remove no-longer-used decl.
1085
1086 2012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
1087
1088 * xdisp.c (buffer_shared): Adjust comment.
1089 (buffer_shared_and_changed): New function.
1090 (prepare_menu_bars, redisplay_internal): Use it to
1091 decide whether all windows or frames should be updated.
1092 (window_outdated): New function.
1093 (text_outside_line_unchanged_p, redisplay_window): Use it.
1094 (redisplay_internal): Likewise. Fix indentation.
1095
1096 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
1097
1098 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
1099 (syms_of_eval): Remove corresponding defsubr.
1100 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
1101
1102 2012-11-19 Daniel Colascione <dancol@dancol.org>
1103
1104 * w32fns.c (Fx_file_dialog):
1105 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
1106 cygwin_convert_file_name*.
1107
1108 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
1109 Rename cygwin_convert_path* to cygwin_convert_file_name*.
1110
1111 2012-11-18 Paul Eggert <eggert@cs.ucla.edu>
1112
1113 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
1114
1115 2012-11-18 Eli Zaretskii <eliz@gnu.org>
1116
1117 * w32select.c: Include w32common.h before w32term.h, so that
1118 windows.h gets included before w32term.h uses some of its
1119 features, see below.
1120
1121 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
1122 New typedefs.
1123 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
1124 New prototypes.
1125 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
1126
1127 2012-11-18 Jan Djärv <jan.h.d@swipnet.se>
1128
1129 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
1130 (ns_select): Return at once if events are held (Bug#12834).
1131
1132 2012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
1133
1134 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
1135 Needed following 2012-10-20 change. (Bug#12902)
1136
1137 2012-11-18 Juanma Barranquero <lekktu@gmail.com>
1138
1139 * w32proc.c (waitpid): Remove unused label get_result.
1140
1141 2012-11-17 Juanma Barranquero <lekktu@gmail.com>
1142
1143 * makefile.w32-in (SYSWAIT_H): New macro.
1144 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
1145 ($(BLD)/sysdep.$(O)): Update dependencies.
1146
1147 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
1148
1149 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
1150 * callproc.c (relocate_fd): Assume F_DUPFD.
1151 * emacs.c, term.c (O_RDWR): Remove.
1152 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
1153 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
1154 * nsterm.m: Assume <fcntl.h> exists.
1155 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
1156 (create_pty, Fmake_network_process, server_accept_connection)
1157 (wait_reading_process_output, init_process_emacs):
1158 Assume O_NONBLOCK.
1159 (wait_reading_process_output): Put in a special case for WINDOWSNT
1160 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
1161 It's not clear this is needed, but it's a more-conservative change.
1162 (create_process): Assume FD_CLOEXEC.
1163 (create_process, create_pty): Assume O_NOCTTY.
1164 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
1165 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
1166 Omit if not DOS_NT, since F_GETFL is not defined there.
1167 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
1168 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
1169 (O_NOCTTY): Remove.
1170 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
1171 lack it, since gnulib guarantees this.
1172 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
1173
1174 2012-11-17 Eli Zaretskii <eliz@gnu.org>
1175
1176 * w32.c (faccessat): Pretend that directories have the execute bit
1177 set. Emacs expects that, e.g., in files.el:cd-absolute.
1178
1179 * w32proc.c (create_child): Don't clip the PID of the child
1180 process to fit into an Emacs integer, as this is no longer a
1181 restriction.
1182 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
1183 reaping only the process specified by PID argument, if that is
1184 positive. Use PID instead of dead_child to know which process to
1185 reap. Wait for the child to die only if WNOHANG is not in
1186 OPTIONS.
1187 (sys_select): Don't set dead_child.
1188
1189 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
1190 as it is no longer needed.
1191
1192 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
1193 no longer needed.
1194 (record_child_status_change): Remove the setting of
1195 record_at_most_one_child for the !WNOHANG case.
1196
1197 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
1198
1199 Fix problems in ns port found by static checking.
1200 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
1201 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
1202 not to process group.
1203 (ns_select): Use emacs_write, not write, as that's more robust
1204 in the presence of signals.
1205 (fd_handler:): Check for read errors.
1206
1207 2012-11-16 Glenn Morris <rgm@gnu.org>
1208
1209 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
1210
1211 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
1212
1213 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
1214
1215 2012-11-16 Eli Zaretskii <eliz@gnu.org>
1216
1217 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
1218 use the same value of thread handle.
1219 (start_timer_thread): If the timer thread exited (due to error),
1220 clean up by closing the two handles it used. Duplicate the caller
1221 thread's handle here, so it gets duplicated only once, when
1222 launching the timer thread. Set priority of the timer thread, not
1223 the caller thread.
1224 (getitimer): Don't duplicate the caller thread's handle here.
1225 (Bug#12832)
1226
1227 2012-11-16 Jan Djärv <jan.h.d@swipnet.se>
1228
1229 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
1230 called (Bug#12834).
1231
1232 2012-11-16 Paul Eggert <eggert@cs.ucla.edu>
1233
1234 Remove no-longer-used pty_max_bytes variable.
1235 * process.c (pty_max_bytes): Remove; unused.
1236 (send_process): Do not set it.
1237
1238 2012-11-15 Juanma Barranquero <lekktu@gmail.com>
1239
1240 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
1241 Update dependencies.
1242
1243 2012-11-15 Paul Eggert <eggert@cs.ucla.edu>
1244
1245 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
1246 This follows up on the 2012-09-29 patch that removed indirection
1247 for the 'function' field. Reported by Sergey Vinokurov in
1248 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
1249
1250 2012-11-14 Eli Zaretskii <eliz@gnu.org>
1251
1252 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
1253 different name, as the MS runtime does not have such a function,
1254 and probably never will.) All callers changed. Ignore DIRFD
1255 value if PATH is an absolute file name, to match Posix spec
1256 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
1257 symlinks.
1258
1259 2012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1260
1261 * xdisp.c (echo_area_display, redisplay_internal):
1262 Omit redundant check whether frame_garbaged is set.
1263
1264 2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
1265
1266 Use faccessat, not access, when checking file permissions (Bug#12632).
1267 This fixes a bug that has been present in Emacs since its creation.
1268 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
1269 which must set some sort of record. (Torek's bug report was against
1270 a predecessor of GNU Emacs, but GNU Emacs happened to have the
1271 same common flaw.) See Torek's Usenet posting
1272 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
1273 Posted: Fri Apr 8 14:18:56 1983.
1274 * Makefile.in (LIB_EACCESS): New macro.
1275 (LIBES): Use it.
1276 * callproc.c (init_callproc):
1277 * charset.c (init_charset):
1278 * fileio.c (check_existing, check_executable, check_writable)
1279 (Ffile_readable_p):
1280 * lread.c (openp, load_path_check):
1281 * process.c (allocate_pty):
1282 * xrdb.c (file_p):
1283 Use effective UID when checking permissions, not real UID.
1284 * callproc.c (init_callproc):
1285 * charset.c (init_charset):
1286 * lread.c (load_path_check, init_lread):
1287 Test whether directories are accessible, not merely whether they exist.
1288 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
1289 * fileio.c (check_existing, check_executable, check_writable)
1290 (Ffile_readable_p):
1291 Use symbolic names instead of integers for the flags, as they're
1292 portable now.
1293 (check_writable): New arg AMODE. All uses changed.
1294 Set errno on failure.
1295 (Ffile_readable_p): Use faccessat, not stat + open + close.
1296 (Ffile_writable_p): No need to call check_existing + check_writable.
1297 Just call check_writable and then look at errno. This saves a syscall.
1298 dir should never be nil; replace an unnecessary runtime check
1299 with an eassert. When checking the parent directory of a nonexistent
1300 file, check that the directory is searchable as well as writable, as
1301 we can't create files in unsearchable directories.
1302 (file_directory_p): New function, which uses 'stat' on most platforms
1303 but faccessat with D_OK (for efficiency) if WINDOWSNT.
1304 (Ffile_directory_p, Fset_file_times): Use it.
1305 (file_accessible_directory_p): New function, which uses a single
1306 syscall for efficiency.
1307 (Ffile_accessible_directory_p): Use it.
1308 * xrdb.c (file_p): Use file_directory_p.
1309 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
1310 * lread.c (openp): When opening a file, use fstat rather than
1311 stat, as that avoids a permissions race. When not opening a file,
1312 use file_directory_p rather than stat.
1313 (dir_warning): First arg is now a usage string, not a format.
1314 Use errno. All uses changed.
1315 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
1316 that merely introduced a race.
1317 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
1318 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
1319 and similarly for the other O_* flags.
1320 * w32.c (sys_faccessat): Rename from sys_access and switch to
1321 faccessat's API. All uses changed.
1322 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
1323 (magic_db): Rename from magic_file_p.
1324 (magic_db, search_magic_path): Return an XrmDatabase rather than a
1325 char *, so that we don't have to test for file existence
1326 separately from opening the file for reading. This removes a race
1327 fixes a permission-checking problem, and simplifies the code.
1328 All uses changed.
1329 (file_p): Remove; no longer needed.
1330
1331 2012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
1332
1333 Omit glyphs initialization at startup.
1334 * dispnew.c (glyphs_initialized_initially_p): Remove.
1335 (adjust_frame_glyphs_initially): Likewise. Adjust users.
1336 (Fredraw_frame): Move actual code from here...
1337 (redraw_frame): ...to here. Add eassert. Adjust comment.
1338 (Fredraw_display): Use redraw_frame.
1339 * xdisp.c (clear_garbaged_frames): Likewise.
1340
1341 2012-11-13 Eli Zaretskii <eliz@gnu.org>
1342
1343 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
1344 passed to pint2str and pint2hrstr to be at most the size of the
1345 frame's decode_mode_spec_buffer. This avoids crashes with very
1346 large values of FIELD_WIDTH argument to decode_mode_spec.
1347 (Bug#12867)
1348
1349 2012-11-13 Paul Eggert <eggert@cs.ucla.edu>
1350
1351 Fix a race with verify-visited-file-modtime (Bug#12863).
1352 Since at least 1991 Emacs has ignored an mtime difference of no
1353 more than one second, but my guess is that this was to work around
1354 file system bugs that were fixed long ago. Since the race is
1355 causing problems now, let's remove that code.
1356 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
1357 whose time stamp is off by no more than a second. Insist that the
1358 file time stamps match exactly.
1359
1360 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
1361
1362 * frame.h (struct frame): Convert external_tool_bar member to
1363 1-bit unsigned bitfield.
1364 * termhooks.h (struct terminal): Remove mouse_moved member since
1365 all users are long dead. Adjust comment on mouse_position_hook.
1366
1367 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
1368
1369 Simplify by using FOR_EACH_FRAME here and there.
1370 * frame.c (next_frame, prev_frame, other_visible_frames)
1371 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
1372 * w32term.c (x_window_to_scroll_bar): Likewise.
1373 * window.c (window_list): Likewise.
1374 * xdisp.c (x_consider_frame_title): Likewise.
1375 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
1376 * xfns.c (x_window_to_frame, x_any_window_to_frame)
1377 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
1378 * xmenu.c (menubar_id_to_frame): Likewise.
1379 * xselect.c (frame_for_x_selection): Likewise.
1380 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
1381 (x_window_to_menu_bar): Likewise.
1382 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
1383
1384 2012-11-12 Paul Eggert <eggert@cs.ucla.edu>
1385
1386 * data.c (Qdefalias_fset_function): Now static.
1387
1388 Another tweak to vectorlike_header change.
1389 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
1390 Remove, and replace all uses with ...
1391 (next_in_free_list, set_next_in_free_list):
1392 New functions, which respect C's aliasing rules better.
1393
1394 2012-11-11 Paul Eggert <eggert@cs.ucla.edu>
1395
1396 * window.c (list4i): Rename from 'quad'. All uses changed.
1397 Needed because <sys/types.h> defines 'quad' on Solaris 10.
1398
1399 2012-11-11 Juanma Barranquero <lekktu@gmail.com>
1400
1401 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
1402 warning about mixing declarations and code in ISO C90.
1403
1404 2012-11-10 Martin Rudalics <rudalics@gmx.at>
1405
1406 * window.c (Fsplit_window_internal): Set combination limit of
1407 new parent window to t iff Vwindow_combination_limit is t;
1408 fixing a regression introduced with the change from 2012-09-22.
1409 (Fset_window_combination_limit): Fix doc-string.
1410
1411 2012-11-10 Eli Zaretskii <eliz@gnu.org>
1412
1413 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
1414 amount when the scroll margins are too large. When scrolling
1415 backwards in the buffer, give up if cannot reach point or the
1416 scroll margin within a reasonable number of screen lines.
1417 Fixes point position in window under scroll-up/down-aggressively when
1418 point is positioned many lines beyond the window top/bottom.
1419 (Bug#12811)
1420
1421 * ralloc.c (relinquish): If real_morecore fails to return memory
1422 to the system, don't crash; instead, leave the last heap
1423 unchanged and return. (Bug#12774)
1424
1425 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1426
1427 * lisp.h (AUTOLOADP): New macro.
1428 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
1429 * data.c (Ffset): Remove special ad-advice-info handling.
1430 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
1431 (Fsubr_arity): CSE.
1432 (Finteractive_form): Simplify.
1433 (Fquo): Don't insist on having at least 2 arguments.
1434 (Qdefalias_fset_function): New var.
1435
1436 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1437
1438 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
1439
1440 * nsfont.m (Qcondensed, Qexpanded): New variables.
1441 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
1442 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
1443
1444 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1445
1446 Fix recently introduced crash on MS-Windows (Bug#12839).
1447 * w32term.h (struct scroll_bar): Use convenient header.
1448 (SCROLL_BAR_VEC_SIZE): Remove.
1449 * w32term.c (x_scroll_bar_create): Use VECSIZE.
1450
1451 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1452
1453 Tweak last vectorlike_header change.
1454 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
1455 vectorlike object on the free list. This is introduced to avoid
1456 some (but not all) pointer casting and aliasing problems, see
1457 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
1458 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
1459 objects.
1460 (xvectype, xvecsize): Use them to examine Lisp_Object values.
1461
1462 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1463
1464 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
1465 been removed, so remove them here also.
1466
1467 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1468
1469 * doc.c (Fdocumentation): Handle new property
1470 dynamic-docstring-function to replace the old ad-advice-info.
1471
1472 2012-11-09 Paul Eggert <eggert@cs.ucla.edu>
1473
1474 * fns.c (Qeql, hashtest_eq): Now static.
1475
1476 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1477
1478 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
1479 * fns.c (hashfn_eq, hashfn_eql, sxhash):
1480 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
1481 * buffer.c (compare_overlays): Use XLI rather than XHASH.
1482
1483 2012-11-08 Paul Eggert <eggert@cs.ucla.edu>
1484
1485 Use same hash function for hashfn_profiler as for hash_string etc.
1486 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
1487 * lisp.h (sxhash_combine): New inline function, with the contents
1488 of the old SXHASH_COMBINE.
1489 * profiler.c (hashfn_profiler): Use it, instead of having a
1490 special hash function containing a comparison that always yields 1.
1491
1492 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1493
1494 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
1495 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
1496 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
1497 Remove unused vars.
1498
1499 2012-11-08 Jan Djärv <jan.h.d@swipnet.se>
1500
1501 * image.c (xpm_make_color_table_h): Fix compiler error because
1502 make_hash_table changed.
1503
1504 2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
1505
1506 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
1507
1508 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1509
1510 Use ad-hoc comparison function for the profiler's hash-tables.
1511 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
1512 (make_log): Use them.
1513 (handle_profiler_signal): Don't inhibit quit any longer since we don't
1514 call Fequal any more.
1515 (Ffunction_equal): New function.
1516 (cmpfn_profiler, hashfn_profiler): New functions.
1517 (syms_of_profiler): Initialize them.
1518 * lisp.h (struct hash_table_test): New struct.
1519 (struct Lisp_Hash_Table): Use it.
1520 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
1521 * fns.c (make_hash_table): Take a struct to describe the test.
1522 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
1523 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
1524 (hash_lookup, hash_remove_from_table): Move assertion checking of
1525 hashfn result here. Check hash-equality before calling cmpfn.
1526 (Fmake_hash_table): Adjust call to make_hash_table.
1527 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
1528 (syms_of_fns): Initialize them.
1529 * emacs.c (main): Move syms_of_fns earlier.
1530 * xterm.c (syms_of_xterm):
1531 * category.c (hash_get_category_set): Adjust call to make_hash_table.
1532 * print.c (print_object): Adjust to new hash-table struct.
1533 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
1534
1535 2012-11-08 Eli Zaretskii <eliz@gnu.org>
1536
1537 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
1538 value of w32-scroll-lock-modifier is neither nil nor one of the
1539 known key modifiers. (Bug#12806)
1540
1541 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1542
1543 Shrink struct vectorlike_header to the only size field.
1544 * lisp.h (enum pvec_type): Avoid explicit enum member values.
1545 Adjust comment.
1546 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
1547 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
1548 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
1549 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
1550 information from the vector header. Adjust comment.
1551 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
1552 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
1553 layout.
1554 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
1555 (struct vectorlike_header): Remove next member. Adjust comment.
1556 (struct Lisp_Subr): Add convenient header. Adjust comment.
1557 (allocate_pseudovector): Adjust prototype.
1558 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
1559 (sweep_string, lisp_malloc): Remove useless prototypes.
1560 (enum mem_type): Adjust comment.
1561 (NEXT_IN_FREE_LIST): New macro.
1562 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
1563 (Fmake_bool_vector): Likewise.
1564 (struct large_vector): New type to represent allocation unit for
1565 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
1566 (large_vectors): Change type to struct large_vector.
1567 (allocate_vector_from_block): Simplify.
1568 (PSEUDOVECTOR_NBYTES): Replace with...
1569 (vector_nbytes): ...new function. Adjust users.
1570 (sweep_vectors): Adjust processing of large vectors.
1571 (allocate_vectorlike): Likewise.
1572 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
1573 Add easserts. Adjust XSETPVECTYPESIZE usage.
1574 (allocate_buffer): Use BUFFER_PVEC_INIT.
1575 (live_vector_p): Adjust to match large vector.
1576 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
1577 * buffer.h (struct buffer): Add next member.
1578 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
1579 New macros.
1580 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
1581 * fns.c (internal_equal): Adjust to match enum pvec_type change.
1582 (copy_hash_table): Adjust to match vector header change.
1583 * lread.c (defsubr): Use XSETPVECTYPE.
1584 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
1585 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
1586 (xvecsize): New command.
1587
1588 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1589
1590 * keyboard.c (event_to_kboard): Do not dereference
1591 frame_or_window field of SELECTION_REQUEST_EVENT
1592 and SELECTION_CLEAR_EVENT events (Bug#12814).
1593 * xterm.h (struct selection_input_event): Adjust comment.
1594
1595 2012-11-07 Eli Zaretskii <eliz@gnu.org>
1596
1597 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
1598 such as Scroll Lock, if the respective keys are treated as
1599 function keys, not as modifiers. This avoids destroying non-ASCII
1600 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
1601
1602 2012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
1603
1604 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
1605
1606 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 Restore some duplicate definitions (Bug#12814).
1609 This undoes part of the 2012-11-03 changes. Some people build
1610 with plain -g rather than with -g3, and they need the duplicate
1611 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
1612 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
1613 Define as macros, as well as as enums or as constants.
1614
1615 2012-11-06 Jan Djärv <jan.h.d@swipnet.se>
1616
1617 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
1618 to keypad keys (Bug#12816).
1619
1620 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1621
1622 Minor adjustments of recently-changed frame functions.
1623 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
1624 known to be a frame (we're in the FRAMEP branch).
1625 * lisp.h (Qframep): Remove decl. frame.h declares this.
1626 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
1627 since they're meant for Lisp fixnum values.
1628
1629 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1630
1631 * window.c (Fwindow_combination_limit): Revert to the only
1632 required argument and adjust docstring as suggested in
1633 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
1634 by Martin Rudalics <rudalics@gmx.at>.
1635
1636 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1637
1638 Widely used frame validity and checking functions.
1639 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
1640 * frame.c (decode_live_frame, decode_any_frame): New functions.
1641 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
1642 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
1643 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
1644 (Fframe_pointer_visible_p): Use decode_any_frame.
1645 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
1646 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
1647 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
1648 (Fframe_focus): Likewise. Allow zero number of arguments.
1649 Adjust docstring.
1650 (frame_buffer_list, frame_buffer_predicate): Remove.
1651 * lisp.h (frame_buffer_predicate): Remove prototype.
1652 * buffer.c (Fother_buffer): Use decode_any_frame.
1653 * xdisp.c (Ftool_bar_lines_needed): Likewise.
1654 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
1655 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
1656 (Fclose_font, Ffont_info): Use decode_live_frame.
1657 * fontset.c (check_fontset_name): Likewise.
1658 * terminal.c (Fframe_terminal): Likewise.
1659 * w32fns.c (check_x_frame): Likewise.
1660 * window.c (Fminibuffer_window, Fwindow_at)
1661 (Fcurrent_window_configuration): Likewise.
1662 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
1663 Likewise. Allow zero number of arguments. Adjust docstring.
1664 * dispnew.c (Fredraw_frame): Likewise.
1665 * xfaces.c (frame_or_selected_frame): Remove.
1666 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
1667 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
1668 (Fframe_face_alist): Use decode_live_frame.
1669 * xfns.c (check_x_frame): Likewise.
1670
1671 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1672
1673 * window.c (quad): New function.
1674 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
1675 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
1676 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
1677 (Fwindow_line_height): Use it.
1678 (Fwindow_fringes): Use list3.
1679 (Fwindow_scroll_bars): Use list4.
1680 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
1681 (Fwindow_combination_limit): Allow zero number of arguments.
1682
1683 2012-11-05 Eli Zaretskii <eliz@gnu.org>
1684
1685 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
1686
1687 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
1688 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
1689 file descriptor 2 for standard error. (Bug#12805)
1690
1691 2012-11-05 Chong Yidong <cyd@gnu.org>
1692
1693 * process.c (wait_reading_process_output): Revert previous change.
1694
1695 2012-11-05 Paul Eggert <eggert@cs.ucla.edu>
1696
1697 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
1698 This removes code that has been obsolete since around 1990.
1699 * callproc.c (Fcall_process):
1700 * emacs.c (main):
1701 * process.c (create_process):
1702 * term.c (dissociate_if_controlling_tty):
1703 Assume setsid exists.
1704 * callproc.c (child_setup): Assume setpgid exists and behaves as
1705 per POSIX.1-1988 or later.
1706 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
1707 * emacs.c (shut_down_emacs):
1708 * sysdep.c (sys_suspend, init_foreground_group):
1709 Assume getpgrp behaves as per POSIX.1-1998 or later.
1710 * msdos.c (setpgrp): Remove.
1711 (tcgetpgrp, setpgid, setsid): New functions.
1712 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
1713 * term.c (no_controlling_tty): Remove; unused.
1714 * w32proc.c (setpgrp): Remove.
1715 (setsid, tcgetpgrp): New functions.
1716
1717 Simplify by assuming __fpending.
1718 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
1719 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
1720 Do not assume that __fpending's result fits in int.
1721
1722 2012-11-04 Paul Eggert <eggert@cs.ucla.edu>
1723
1724 Remove EMACS_OUTQSIZE+sleep hack.
1725 * dispnew.c (update_frame_1): Remove hack for terminals slower
1726 than 2400 bps, which throttled Emacs by having it sleep.
1727 This code hasn't worked since at least 2007, when the multi-tty stuff
1728 was added, and anyway those old terminals are long dead.
1729 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
1730 without the dispnew.c change, as dispnew.c doesn't include systty.h.
1731
1732 Fix data-loss with --version (Bug#9574).
1733 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
1734 as we can't assume that emacs_strerror is initialized, and strerror
1735 is good enough here.
1736 (main): Invoke atexit earlier, to catch earlier instances of
1737 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
1738
1739 2012-11-04 Michael Marchionna <tralfaz@pacbell.net>
1740
1741 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
1742 (keyDown): Remap keypad keys to X11 virtual key codes.
1743
1744 2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
1745
1746 Fix data-loss with --batch (Bug#9574).
1747 * emacs.c: Include <close-stream.h>.
1748 (close_output_streams): New function.
1749 (main): Pass it to atexit, so that Emacs closes stdout and stderr
1750 and handles errors appropriately.
1751 (Fkill_emacs): Don't worry about flushing, as close_output_stream
1752 does that now.
1753
1754 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
1755 The symptom is a diagnostic "GLib-WARNING **: In call to
1756 g_spawn_sync(), exit status of a child process was requested but
1757 SIGCHLD action was set to SIG_IGN and ECHILD was received by
1758 waitpid(), so exit status can't be returned." The diagnostic
1759 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
1760 The real bug is a race condition between Emacs and glib: Emacs
1761 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
1762 so that glib can't find it. Work around the bug by invoking
1763 waitpid only on subprocesses that Emacs itself creates.
1764 * process.c (create_process, record_child_status_change):
1765 Don't use special value -1 in pid field, as the caller now must
1766 know the pid rather than having the callee infer it.
1767 The inference was sometimes incorrect anyway, due to another race.
1768 (create_process): Set new 'alive' member if child is created.
1769 (process_status_retrieved): New function.
1770 (record_child_status_change): Use it.
1771 Accept negative 1st argument, which means to wait for the
1772 processes that Emacs already knows about. Move special-case code
1773 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
1774 processes that have already been waited for, by testing and
1775 clearing new 'alive' member.
1776 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
1777 now does this internally.
1778 (handle_child_signal): Let record_child_status_change do all
1779 the work, since we do not want to reap all exited child processes,
1780 only the child processes that Emacs itself created.
1781 * process.h (Lisp_Process): New boolean member 'alive'.
1782
1783 Omit duplicate definitions no longer needed with gcc -g3.
1784 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
1785 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
1786 Define only as macros. There's no longer any need to also define
1787 these symbols as enums or as constants, since we now assume
1788 gcc -g3 when debugging.
1789
1790 2012-11-03 Eli Zaretskii <eliz@gnu.org>
1791
1792 * lisp.mk: Adjust comments to the fact that term/internal is now
1793 loaded from loadup.el.
1794
1795 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
1796 (msdos_fatal_signal): New function.
1797 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
1798 its argument list.
1799
1800 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
1801 for GCC versions before 4.
1802 (emacs_raise): Define to call msdos_fatal_signal.
1803
1804 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
1805 iterator when starting in the middle of a display or overlay
1806 string. (Bug#12745)
1807
1808 2012-11-03 Chong Yidong <cyd@gnu.org>
1809
1810 * process.c (wait_reading_process_output): Clean up the last
1811 change.
1812
1813 2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
1814
1815 * process.c (wait_reading_process_output): Avoid a race condition
1816 with SIGIO delivery (Bug#11536).
1817
1818 2012-11-03 Chong Yidong <cyd@gnu.org>
1819
1820 * buffer.c (cursor_type): Untabify docstring.
1821
1822 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1823
1824 * frame.h (struct frame): Drop can_have_scroll_bars member
1825 which is meaningless for a long time. Adjust comments.
1826 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
1827 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
1828
1829 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1830
1831 * window.c (decode_next_window_args): Update window arg after
1832 calling decode_live_window and so fix crash reported at
1833 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
1834 by Juanma Barranquero <lekktu@gmail.com>.
1835 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
1836 * font.c (Ffont_at): Likewise.
1837
1838 2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
1839
1840 * widget.c (resize_cb): New function.
1841 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
1842 (EmacsFrameResize): Check if all is up to date before changing frame
1843 size.
1844
1845 2012-11-02 Eli Zaretskii <eliz@gnu.org>
1846
1847 Implement backtrace output for fatal errors on MS-Windows.
1848 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
1849 (BACKTRACE_LIMIT_MAX): New macro.
1850 (w32_backtrace): New function.
1851 (emacs_abort): Use w32_backtrace when the user chooses not to
1852 attach a debugger. Update the text of the abort dialog.
1853
1854 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1855
1856 Window-related stuff cleanup here and there.
1857 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
1858 Use decode_any_window.
1859 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
1860 * xdisp.c (Fformat_mode_line): Likewise.
1861 * font.c (Ffont_at): Use decode_live_window.
1862 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
1863 * window.c (decode_next_window_args): Likewise.
1864 (decode_any_window): Remove static.
1865 * window.h (decode_any_window): Add prototype.
1866 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
1867 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
1868 respectively.
1869
1870 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1871
1872 Remove pad from struct input_event.
1873 * termhooks.h (struct input_event): Remove padding field.
1874 Adjust comment.
1875 * keyboard.c (event_to_kboard): Simplify because frame_or_window
1876 member is never cons for a long time. Adjust comment.
1877 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
1878 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
1879 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
1880 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
1881
1882 2012-11-01 Eli Zaretskii <eliz@gnu.org>
1883
1884 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
1885
1886 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
1887
1888 Fix crash when using Emacs as commit editor for git (Bug#12697).
1889 * callproc.c (setpgrp): Remove macro, as we now use setpgid
1890 and it is configured in conf_post.h.
1891 (Fcall_process): Don't invoke both setsid and setpgid; the former
1892 is enough, if it exists.
1893 * callproc.c (Fcall_process, child_setup):
1894 * process.c (create_process): Use setpgid.
1895 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
1896 for the real thing.
1897 * dispnew.c (init_display): Initialize the foreground group
1898 if we are running a tty display.
1899 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
1900 * lisp.h (init_foreground_group): New decl.
1901 * sysdep.c (inherited_pgroup): New static var.
1902 (init_foreground_group, tcsetpgrp_without_stopping)
1903 (narrow_foreground_group, widen_foreground_group): New functions.
1904 (init_sys_modes): Narrow foreground group.
1905 (reset_sys_modes): Widen foreground group.
1906
1907 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
1908
1909 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
1910
1911 2012-10-31 Martin Rudalics <rudalics@gmx.at>
1912
1913 * minibuf.c (read_minibuf): Restore current buffer since
1914 choose_minibuf_frame calling Fset_frame_selected_window may
1915 change it (Bug#12766).
1916
1917 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
1918
1919 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
1920
1921 2012-10-30 Kenichi Handa <handa@gnu.org>
1922
1923 * font.c (Ffont_at): If WINDOW is specified and it is not
1924 displaying the current buffer, signal an error.
1925
1926 2012-10-29 Daniel Colascione <dancol@dancol.org>
1927
1928 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
1929 In preparation for fixing bug#12739, move these functions from
1930 here...
1931
1932 * coding.h, coding.c: ... to here, and compile them only when
1933 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
1934 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
1935
1936 2012-10-28 Eli Zaretskii <eliz@gnu.org>
1937
1938 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
1939 (timer_loop, getitimer, setitimer): Use it instead of
1940 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
1941 'clock'.
1942 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
1943 literal 10000.
1944
1945 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
1946
1947 * nsterm.m (NO_APPDEFINED_DATA): New define.
1948 (last_appdefined_event_data): New variable
1949 (last_appdefined_event): Remove.
1950 (ns_select): Initialize t from last_appdefined_event_data instead
1951 of [last_appdefined_event data1].
1952 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
1953 remove last_appdefined_event (Bug#12698).
1954
1955 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
1956
1957 * frame.c (x_set_font): Catch internal error.
1958
1959 2012-10-27 Eli Zaretskii <eliz@gnu.org>
1960
1961 Avoid overflow in w32 implementation of interval timers.
1962 When possible, for ITIMER_PROF count only times the main thread
1963 actually executes.
1964 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
1965 'volatile ULONGLONG' types. All the other data which was
1966 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
1967 (GetThreadTimes_Proc): New typedef.
1968 (w32_get_timer_time): New function, returns a suitable time value
1969 for the timer.
1970 (timer_loop): Enter critical section when accessing ULONGLONG
1971 values of the itimer_data struct, as these accesses are no longer
1972 atomic. Call 'w32_get_timer_time' instead of 'clock'.
1973 Remove unused variable.
1974 (init_timers): Initialize s_pfn_Get_Thread_Times.
1975 (start_timer_thread): Don't assign itimer->caller_thread here.
1976 (getitimer): Assign itimer->caller_thread here.
1977 (setitimer): Always call getitimer to get the value of ticks_now.
1978 (sys_spawnve): Avoid compiler warning about format mismatch.
1979
1980 2012-10-26 Eli Zaretskii <eliz@gnu.org>
1981
1982 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
1983 mouse movement events if the menu bar is active. This avoids
1984 producing a busy "hour-glass" cursor by Windows if the mouse
1985 pointer is positioned over a tooltip shown for some menu item.
1986
1987 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
1988
1989 Don't assume process IDs fit in int.
1990 * emacs.c (shut_down_emacs) [!DOS_NT]:
1991 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
1992 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
1993 Use pid_t, not int, to store process IDs, as 'int'
1994 is not wide enough on a few platforms (e.g., AIX and IRIX).
1995
1996 2012-10-23 Kenichi Handa <handa@gnu.org>
1997
1998 The following change is to make face-font-rescale-alist work
1999 correctly for non-ASCII fonts.
2000
2001 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
2002 (font_open_for_lface): Handle Vface_font_rescale_alist.
2003
2004 2012-10-23 Chong Yidong <cyd@gnu.org>
2005
2006 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
2007
2008 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
2009
2010 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
2011 for screen font.
2012 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
2013
2014 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
2015 event (Bug#12681).
2016
2017 2012-10-21 Glenn Morris <rgm@gnu.org>
2018
2019 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
2020
2021 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
2022
2023 Port to OpenBSD 5.1.
2024 * frame.c (Fmouse_position, Fmouse_pixel_position):
2025 * xdisp.c (produce_stretch_glyph):
2026 Declare local vars only when they're needed.
2027 This is clearer and avoids a warning on OpenBSD about unused vars.
2028 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
2029 This is safer, and avoids OpenBSD warnings about unused vars.
2030 * keyboard.c (record_menu_key): Remove unnecessary decl.
2031 (poll_timer): Define only if POLL_FOR_INPUT is defined.
2032 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
2033 as our definition clashes with OpenBSD's.
2034 * xfaces.c (load_face_colors, check_lface_attrs)
2035 (get_lface_attributes_no_remap, get_lface_attributes)
2036 (lface_fully_specified_p, x_supports_face_attributes_p)
2037 (tty_supports_face_attributes_p, face_fontset, realize_face)
2038 (realize_x_face, realize_tty_face):
2039 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
2040 merely Lisp_Object *. This is more informative and avoids
2041 a warning on OpenBSD about accessing beyond an object's size.
2042
2043 2012-10-20 Chong Yidong <cyd@gnu.org>
2044
2045 * lread.c (Fload): Doc fix (Bug#12592).
2046
2047 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
2048
2049 * font.c (Ffont_at): Fix previous change.
2050
2051 2012-10-19 Eli Zaretskii <eliz@gnu.org>
2052
2053 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
2054 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
2055 for the reasons.
2056
2057 * alloc.c (NSTATICS): Decrease to 0x800.
2058
2059 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
2060
2061 * fns.c (Fnreverse): Include the problem element when signaling an
2062 error (bug#12677).
2063
2064 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
2065
2066 * nsterm.m (ns_select): Check writefds before call to
2067 FD_ISSET (Bug#12668).
2068
2069 2012-10-18 Daniel Colascione <dancol@dancol.org>
2070
2071 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
2072 (staticpro): If we run out of staticpro slots, die with an
2073 informative error instead of just calling emacs_abort.
2074
2075 2012-10-18 Martin Rudalics <rudalics@gmx.at>
2076
2077 Fix two flaws reported by Dmitry Antipov.
2078 * window.c (Ftemp_output_buffer_show): Remove.
2079 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
2080 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
2081
2082 2012-10-17 Eli Zaretskii <eliz@gnu.org>
2083
2084 * makefile.w32-in ($(BLD)/w32.$(O)):
2085 ($(BLD)/vm-limit.$(O)):
2086 ($(BLD)/term.$(O)):
2087 ($(BLD)/unexw32.$(O)):
2088 ($(BLD)/fileio.$(O)):
2089 ($(BLD)/dispnew.$(O)): Update dependencies.
2090
2091 * w32term.h (w32_initialize_display_info, initialize_w32_display):
2092 Add prototypes.
2093
2094 * w32proc.c: Include ctype.h.
2095
2096 * w32.h (init_environment, check_windows_init_file)
2097 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
2098 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
2099 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
2100 (sys_link): Add prototypes.
2101
2102 * w32.c: Include w32select.h.
2103 (sys_access, e_malloc, sys_select): Add prototypes.
2104 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
2105
2106 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
2107
2108 * unexw32.c: Include lisp.h and w32.h.
2109
2110 * term.c [WINDOWSNT]: Include w32term.h.
2111
2112 * process.c [WINDOWSNT]: Add prototype of sys_select.
2113
2114 * fileio.c [WINDOWSNT]: Include w32.h.
2115
2116 * dispnew.c [WINDOWSNT]: Include w32.h.
2117
2118 * cygw32.c (Fcygwin_convert_path_to_windows)
2119 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
2120 Lisp_Object values. (Bug#12661)
2121
2122 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
2123 to Lisp_Object. (Bug#12661)
2124
2125 2012-10-17 Kenichi Handa <handa@gnu.org>
2126
2127 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
2128 invalidate.
2129
2130 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
2131
2132 * buffer.c (Fkill_buffer): When unchaining the marker,
2133 reset its buffer pointer to NULL (Bug#12652).
2134
2135 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
2136
2137 Do not verify indirection counters of killed buffers (Bug#12579).
2138 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
2139 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
2140
2141 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
2142
2143 * alloc.c (Fmake_byte_code): Fix typo in comment.
2144 * print.c (print_interval): Define as static to match prototype.
2145 * indent.c (disptab_matches_widthtab, recompute_width_table):
2146 Convert to eassert.
2147
2148 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
2149
2150 * editfns.c (get_system_name): Remove.
2151 * lisp.h (get_system_name): Remove prototype.
2152 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
2153 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
2154
2155 2012-10-15 Daniel Colascione <dancol@dancol.org>
2156
2157 * dbusbind.c: Add comment explaining reason for previous change.
2158
2159 2012-10-15 Martin Rudalics <rudalics@gmx.at>
2160
2161 * window.c (Fwindow_end): Rewrite check whether cached position
2162 can be used (Bug#12600).
2163 (resize_frame_windows, grow_mini_window, shrink_mini_window):
2164 Set windows_or_buffers_changed.
2165
2166 2012-10-15 Daniel Colascione <dancol@dancol.org>
2167
2168 * dbusbind.c: Fix cygw32 build break when compiling with dbus
2169 enabled by undefining the symbol "interface", which the platform
2170 headers define to something incompatible.
2171
2172 2012-10-14 Daniel Colascione <dancol@dancol.org>
2173
2174 * image.c (init_tiff_functions, init_imagemagick_functions)
2175 (init_svg_functions): Fix cygw32 build break by using these
2176 functions only when WINDOWSNT _and_ HAVE_NTGUI.
2177
2178 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
2179
2180 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
2181
2182 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
2183
2184 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
2185
2186 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
2187
2188 * coding.c (detect_coding): Set coding->id before calling
2189 this->detector.
2190
2191 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
2192
2193 * fileio.c: Formatting fixes.
2194
2195 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
2196
2197 Fix some stat-related races.
2198 * fileio.c (Fwrite_region): Avoid race condition if a file is
2199 removed or renamed by some other process immediately after Emacs
2200 writes it but before Emacs stats it. Do not assume that stat (or
2201 fstat) succeeds.
2202 * image.c (slurp_file): Resolve the file name with fopen + fstat
2203 rather than stat + fopen.
2204 (pbm_read_file) [0]: Remove unused code with stat race.
2205 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
2206 Remove ineffective code with stat race.
2207
2208 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2209
2210 * doc.c (get_doc_string): Don't signal an error if the file is missing.
2211
2212 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
2213
2214 * nsterm.m (hold_event_q): New static variable.
2215 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
2216 ! q_event_ptr.
2217 (hold_event): New function.
2218 (ns_read_socket): If hold_event_q have events, store them and
2219 return (Bug#12384).
2220 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
2221 is zero (Bug#12384).
2222
2223 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
2224
2225 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
2226
2227 2012-10-12 Eli Zaretskii <eliz@gnu.org>
2228
2229 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
2230
2231 * fileio.c (check_existing): New function.
2232 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
2233 instead of calling 'stat', when what's needed is to check whether
2234 a file exists. This avoids expensive system calls on MS-Windows.
2235 (Bug#12587)
2236
2237 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
2238
2239 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
2240 determine whether a file exists and is not a directory.
2241
2242 * lisp.h (check_existing): Add prototype.
2243
2244 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
2245
2246 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
2247
2248 2012-10-12 Glenn Morris <rgm@gnu.org>
2249
2250 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
2251
2252 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
2253
2254 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
2255
2256 * eval.c (Fautoload): Remember previous autoload status in load-history.
2257
2258 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
2259
2260 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
2261 * lread.c (load_each_byte, new_backquote_flag, readchar)
2262 (read_filtered_event, lisp_file_lexically_bound_p)
2263 (safe_to_load_version, Fload, complete_filename_p, openp)
2264 (build_load_history, readevalloop, read_escape, read1)
2265 (string_to_number, read_vector, read_list):
2266 * macros.c (Fstart_kbd_macro):
2267 * marker.c (CONSIDER):
2268 * menu.c (parse_single_submenu, digest_single_submenu)
2269 (find_and_return_menu_selection, Fx_popup_menu):
2270 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
2271 (Ftry_completion):
2272 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
2273 (ns_menu_show):
2274 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
2275 (xmenu_show, xdialog_show):
2276 Use bool for booleans.
2277 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
2278 as it's not a predicate. All uses changed. Omit unnecessary
2279 buffer termination.
2280
2281 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
2282
2283 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
2284 (save_excursion_restore): Do not restore mark if it was not saved.
2285
2286 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
2287
2288 * marker.c (cached_modiff): EMACS_INT, not int.
2289
2290 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
2291 instead of having a wrong decl.
2292 * nsmenu.m (waiting_for_input): Remove wrong decl.
2293
2294 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2295
2296 keyboard.c, keymap.c: Use bool for booleans.
2297 * dispnew.c (sit_for): Distinguish between 3-way display_option
2298 and boolean do_display.
2299 * keyboard.c (single_kboard, this_command_key_count_reset)
2300 (waiting_for_input, echoing, immediate_quit, input_pending)
2301 (interrupt_input, interrupts_deferred, pop_kboard)
2302 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
2303 (command_loop_1, adjust_point_for_property)
2304 (safe_run_hooks_error, input_polling_used, read_char):
2305 (help_char_p, readable_events, kbd_buffer_events_waiting)
2306 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
2307 (lucid_event_type_list_p, get_input_pending):
2308 (gobble_input, menu_separator_name_p, menu_bar_item)
2309 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
2310 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
2311 (keyremap_step, test_undefined, read_key_sequence)
2312 (detect_input_pending, detect_input_pending_ignore_squeezables)
2313 (detect_input_pending_run_timers, requeued_events_pending_p)
2314 (quit_throw_to_read_char, Fset_input_interrupt_mode):
2315 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
2316 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
2317 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
2318 (accessible_keymaps_1, Fkey_description, push_key_description):
2319 (shadow_lookup, struct where_is_internal_data)
2320 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
2321 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
2322 (describe_map, describe_vector):
2323 * menu.c (single_menu_item):
2324 * nsmenu.m (ns_update_menubar):
2325 * process.c (wait_reading_process_output):
2326 * search.c (scan_buffer, scan_newline):
2327 Use bool for boolean.
2328 * keyboard.c (timers_run, swallow_events)
2329 (detect_input_pending_run_timers):
2330 * process.c (wait_reading_process_output):
2331 Use unsigned for counter where wraparound-on-overflow is desired,
2332 since unsigned is guaranteed to have that behavior and signed is not.
2333 (read_char): Use ptrdiff_t for string length.
2334 (get_input_pending): Remove first argument, since it was always
2335 the same pointer-to-int (now pointer-to-boolean) &input_pending,
2336 and behave as if it had that value. Return new value of
2337 input_pending. All callers changed.
2338 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
2339 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
2340 a string length.
2341 * keymap.c (push_key_description): Omit last arg, which was always 1.
2342 All callers changed.
2343
2344 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
2345
2346 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
2347
2348 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
2349 ($(BLD)/term.$(O)): Update dependencies.
2350
2351 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
2352
2353 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
2354 * lisp.h (enum pvec_type): Adjust comments and omit explicit
2355 initializer for PVEC_NORMAL_VECTOR.
2356
2357 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2358
2359 Clean out old termopts cruft.
2360 * termopts.h (flow_control, meta_key): Remove unused decls.
2361 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
2362 Don't include termopts.h.
2363
2364 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
2365
2366 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
2367
2368 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2369
2370 * commands.h (immediate_quit): Remove duplicate decl.
2371
2372 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
2373
2374 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
2375 caching.
2376 (nsfont_open): Remove setting of Vfonts_in_cache.
2377 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
2378
2379 2012-10-09 Eli Zaretskii <eliz@gnu.org>
2380
2381 * w32fns.c (w32_last_error): Change the return value to DWORD, to
2382 match what GetLastError returns. Explain why the function is
2383 needed.
2384
2385 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
2386 'is_tooltip_frame', to avoid confusion with its global namesake.
2387
2388 2012-10-08 Daniel Colascione <dancol@dancol.org>
2389
2390 * xdisp.c (start_hourglass): Call w32_note_current_window when
2391 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
2392 build that caused Emacs to display the hourglass cursor forever.
2393
2394 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
2395 which is broken under remote desktop, calculate the number of
2396 colors available for a display based on the display's number of
2397 planes and number of bits per pixel per plane. (bug#10397).
2398
2399 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
2400
2401 * nsfont.m (Vfonts_in_cache): New variable.
2402 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
2403 are used. Add cached fonts to Vfonts_in_cache.
2404 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
2405
2406 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
2407
2408 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
2409 in nt/config.nt.
2410 (FONT_H): Define after FRAME_H.
2411 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
2412 Update dependencies.
2413
2414 * w32term.c: Remove leftover declaration of keyboard_codepage.
2415
2416 2012-10-08 Eli Zaretskii <eliz@gnu.org>
2417
2418 * makefile.w32-in (FONT_H): Add $(FRAME_H).
2419 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
2420 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
2421 (GLOBAL_SOURCES): Add cygw32.c.
2422 ($(BLD)/unexw32.$(O)):
2423 ($(BLD)/w32.$(O)):
2424 ($(BLD)/w32console.$(O)):
2425 ($(BLD)/w32fns.$(O)):
2426 ($(BLD)/w32heap.$(O)):
2427 ($(BLD)/w32menu.$(O)):
2428 ($(BLD)/w32proc.$(O)): Add w32common.h.
2429
2430 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
2431 'const char *'.
2432 (x_to_w32_color): Don't modify the argument, modify a copy instead.
2433
2434 2012-10-08 Daniel Colascione <dancol@dancol.org>
2435
2436 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
2437 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
2438 accidental message numbering hole. Change other messages to
2439 match.
2440
2441 * w32select.h (HAVE_W32SELECT): Remove.
2442
2443 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
2444 w32common.h instead of w32heap.h.
2445
2446 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
2447 (get_allocation_unit, get_processor_type, get_w32_major_version)
2448 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2449 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2450 (OS_NT, os_subtype, cache_system_info): Move declarations to
2451 w32common.
2452
2453 * w32heap.c: Include w32common.h.
2454 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
2455 (w32_minor_version, w32_build_number, w32_subtype):
2456 Remove duplicate definitions.
2457
2458 * w32fns.c: Include w32common.h; include w32heap.h only in
2459 WINDOWSNT.
2460
2461 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
2462 Use `report_file_error' instead of `error' in order to better
2463 inform users of what went wrong. Increase NTGUI_UNICODE file
2464 dialog box file name length to 32k, the maximum allowed by the NT
2465 kernel.
2466
2467 * w32common.h: New file.
2468 (ROUND_UP, ROUND_DOWN, get_page_size)
2469 (get_allocation_unit, get_processor_type, get_w32_major_version)
2470 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2471 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2472 (OS_NT, os_subtype, cache_system_info): Move here.
2473
2474 * unexw32.c, unexcw.c: Include w32common.h.
2475
2476 * emacs.c (main): Use (defined (WINDOWSNT) || defined
2477 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
2478 to call syms_of_w32select.
2479
2480 * cygw32.h: Remove obsolete EXFUN declarations.
2481
2482 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
2483
2484 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
2485 of w32inevt.o from SOME_MACHINE_OBJECTS.
2486
2487 2012-10-08 Daniel Colascione <dancol@dancol.org>
2488
2489 * image.c: Permanent fix for JPEG compilation issue --- limit
2490 jpeglib `boolean' redefinition to Cygwin builds.
2491
2492 2012-10-08 Eli Zaretskii <eliz@gnu.org>
2493
2494 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
2495
2496 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
2497 Cygwin.
2498
2499 2012-10-08 Daniel Colascione <dancol@dancol.org>
2500
2501 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
2502 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
2503 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
2504 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
2505 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
2506 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
2507 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
2508 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
2509 now a supported configuration.
2510
2511 * Makefile.in: consolidate image variables into LIBIMAGE; add
2512 W32_OBJ and W32_LIBS. Compile new files.
2513
2514 * conf_post.h:
2515 (_DebPrint) declare tracing facility for W32 debugging. We need
2516 to unify tracing later.
2517
2518 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
2519 unconditional use of W32 Unicode functions. Cygwin runs only on
2520 100% Unicode operating systems.
2521
2522 * cygw32.c: New file. Define Cygwin-specific facilities.
2523 (Fcygwin_convert_path_to_windows)
2524 (Fcygwin_convert_path_from_windows): New user functions for
2525 accessing Cygwin path-munging routines.
2526
2527 * cygw32.h: New file.
2528 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
2529 UTF-16LE strings temporarily inside non-Lisp-visible string
2530 objects.
2531
2532 (w32_strerror): Just what it says on the tin.
2533
2534 * emacs.c: Make the NS fork-then-exec code for daemon-launching
2535 also run for Cygwin; both systems have the same problem with using
2536 GUI facilities in a forked child. Also call syms_of_cygw32,
2537 syms_of_w32select in correct places.
2538
2539 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
2540 needs fork-then-exec for daemon launching.
2541
2542 * font.h: Include frame.h.
2543
2544 * image.c: Use the image library cache machinery only when we're
2545 compiling for native WINDOWSNT; Cygwin can use shared libraries
2546 like any other Unixlike system.
2547
2548 * keyboard.c: Clarify a comment regarding the input loop.
2549
2550 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
2551 functions directly instead of trying to detect at runtime that our
2552 host operating system supports them. We make this change for two
2553 reasons: Cygwin lacks support for the multibyte character
2554 conversion functions used by the legacy menu code, and Cygwin
2555 never needs to rely on non-Unicode APIs.
2556
2557 * unexw32.c (hinst): Declare extern.
2558
2559 * w32.c: Change header order;
2560 (w32_strerror): Move to w32fns.c because we need it for
2561 non-WINDOWSNT builds.
2562
2563 * w32.h: Add #error macro to make sure we don't include w32.h for
2564 Cygwin builds. Remove w32select declarations.
2565
2566 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
2567 w32fns.c. w32console.c is WINDOWSNT-only.
2568
2569 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
2570 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
2571 POSIXy alternative.
2572 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
2573 (w32_major_version, w32_minor_version, w32_build_number)
2574 (os_subtype, sound_type): Define here
2575 (w32_defined_color): Make color parameter const for consistency
2576 with other _defined_color functions.
2577 (w32_createwindow): Unconditionally call w32_init_class instead of
2578 doing so only when hprevinst is non-NULL. Plumbing hprevinst
2579 through the code is complex and unnecessary because class
2580 registration is practically free.
2581 (w32_name_of_message): New EMACSDEBUG-only function.
2582 (Fset_message_beep): Move here
2583 (Fx_open_connection): Require that the display name for Windows be
2584 "w32" for consistency, emacsclient disambiguation, and maybe, one
2585 day, multi-window-system support.
2586 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
2587 Cygwin files for W32 GUI facilities, since these clearly don't
2588 expect Cygwin names.
2589 (_DebPrint): Define.
2590 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
2591 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
2592 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
2593 (w32_last_error): Remove.
2594
2595 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
2596
2597 * w32heap.c (syspage_mask): Declare here.
2598 (cache_system_info): Remove.
2599
2600 * w32inevt.c (faked_key): Define globally, not statically.
2601 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
2602 (w32_console_toggle_lock_key): Move to w32fns.c.
2603
2604 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
2605
2606 * w32proc.c (_DebPrint): Move to w32fns.c.
2607 * w32select.c: Include string.h, stdio.h for Cygwin.
2608 * w32select.h: New File.
2609
2610 * w32term.c: Include io.h for non-CYGWIN builds; needed for
2611 get_osfhandle.
2612 (w32_message_fd): New variable. Under Cygwin, holds the file
2613 descriptor the system used to tell us about pending thread
2614 messages.
2615
2616 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
2617 that prevented compilation under non-WINDOWSNT systems.
2618
2619 (w32_initialize): Open /dev/windows and assign it to
2620 w32_message_fd. Provide w32 feature.
2621
2622 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
2623 (WM_EMACS_INPUT_READY): add.
2624 (prepend_msg, w32_message_fd): Declare globally.
2625
2626 * w32xfns.c:
2627 (keyboard_handle): Use only when WINDOWSNT.
2628 (notify_msg_ready): New function. Posts a message to the main
2629 thread's message queue under CYGWIN, which wakes up the main
2630 thread from select(2) by making the /dev/windows file descriptor
2631 ready. Under WINDOWSNT, it sets an event the same way the old
2632 code did.
2633
2634 (post, prepend_msg): Actually call notify_msg_ready instead of
2635 setting the input event directly.
2636
2637 2012-10-07 Eli Zaretskii <eliz@gnu.org>
2638
2639 * ralloc.c (relinquish): If a heap is ready to be relinquished,
2640 but it still has blocs in it, don't return it to the system,
2641 instead of aborting. (Bug#12402)
2642
2643 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
2644
2645 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
2646
2647 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
2648 MAC_OS_X_VERSION_10_6.
2649 (syms_of_nsterm): Remove comment about Panther and above for
2650 ns-antialias-text.
2651 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
2652 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
2653 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
2654
2655 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
2656 MAC_OS_X_VERSION_10_4.
2657
2658 * nsmenu.m (fillWithWidgetValue:): Remove code for <
2659 MAC_OS_X_VERSION_10_2.
2660
2661 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
2662
2663 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
2664 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
2665
2666 * nsterm.m (ns_in_resize): Remove (Bug#12479).
2667 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
2668 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
2669 Remove ns_in_resize check.
2670 (ns_clear_frame_area): Remove resize handle code.
2671
2672 * nsfns.m (ns_in_resize): Remove.
2673 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
2674 Remove ns_in_resize check.
2675
2676 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
2677
2678 Improve sys_siglist detection.
2679 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
2680 defined as a macro, as is done in Solaris.
2681 (sys_siglist_entries): New macro.
2682 (save_strsignal): Use it.
2683 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
2684 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
2685
2686 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
2687
2688 * nsfns.m (Fx_create_frame): Call x_default_parameter with
2689 fullscreen/Fullscreen.
2690
2691 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
2692 tobar_height is new.
2693
2694 * nsterm.m (x_make_frame_visible): Check for fullscreen.
2695 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
2696 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
2697 (windowDidResize:): Check for correct window if old style fullscreen.
2698 Capitalize word in comment. Remove incorrect comment.
2699 (initFrameFromEmacs:): tbar_height renamed tibar_height.
2700 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
2701 error in drawing background.
2702 (toggleFullScreen:): Remove comment. Rearrange calls.
2703 Set toolbar values to zero, save old height in tobar_height.
2704 Restore tool bar height when leaving fullscreen.
2705 (canBecomeMainWindow): New function.
2706
2707 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
2708
2709 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
2710
2711 2012-10-05 Eli Zaretskii <eliz@gnu.org>
2712
2713 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
2714
2715 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
2716 that time stamps of directories could also be changed.
2717 Don't request the too broad GENERIC_WRITE, only the more restrictive
2718 FILE_WRITE_ATTRIBUTES access rights.
2719
2720 * fileio.c (Fset_file_times): Special-case ignoring errors for
2721 directories only on MSDOS, not on MS-Windows.
2722
2723 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
2724
2725 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
2726
2727 2012-10-04 Eli Zaretskii <eliz@gnu.org>
2728
2729 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
2730 see whether CreateFile failed.
2731
2732 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
2733
2734 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
2735 to avoid similar races.
2736 * keyboard.c (pending_signals): Now bool, not int.
2737
2738 Port timers to OpenBSD, plus check for timer failures.
2739 OpenBSD problem reported by Han Boetes.
2740 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
2741 and/or setitimer.
2742 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
2743 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
2744 like OpenBSD, which has timer_settime but does not declare it.
2745 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
2746 whether to use itimerspec-related primitives. All uses of
2747 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
2748
2749 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2750
2751 * profiler.c (handle_profiler_signal): Fix a malloc race
2752 that caused Emacs to hang on Fedora 17 when profiling Lisp.
2753
2754 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
2755
2756 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
2757
2758 2012-10-02 Eli Zaretskii <eliz@gnu.org>
2759
2760 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
2761 consistent with the change in return value of 'safe_strsignal'.
2762
2763 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2764
2765 Prefer plain 'static' to 'static inline' (Bug#12541).
2766 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
2767 (bidi_set_sor_type, bidi_push_embedding_level)
2768 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
2769 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
2770 (bidi_cache_search, bidi_cache_ensure_space)
2771 (bidi_cache_iterator_state, bidi_cache_find)
2772 (bidi_peek_at_next_level, bidi_set_paragraph_end)
2773 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
2774 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
2775 Now 'static', not 'static inline'.
2776
2777 Count overruns when profiling; change units to ns.
2778 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
2779 Give extra weight to samples after overruns, to attempt to count
2780 the time more accurately.
2781 (setup_cpu_timer): Change sampling interval units from ms to ns, since
2782 the underlying primitives nominally do ns.
2783 (Fprofiler_cpu_start): Document the change. Mention that
2784 the sampling intervals are only approximate.
2785
2786 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2787
2788 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
2789
2790 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
2791 case for the special 0 coding-system.
2792
2793 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
2794 (Fmake_overlay): Remove redundant tests.
2795 (fix_start_end_in_overlays): Remove redundant recentering.
2796
2797 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
2798
2799 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
2800 Update dependencies.
2801
2802 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2803
2804 Fix a malloc race condition involving strsignal.
2805 A signal can arrive in the middle of a malloc, and Emacs's signal
2806 handler can invoke strsignal, which can invoke malloc, which is
2807 not portable. This race condition bug makes Emacs hang on GNU/Linux.
2808 Fix it by altering the signal handler so that it does not invoke
2809 strsignal.
2810 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
2811 * process.c (status_message): Use const pointer, in case strsignal
2812 is #defined to safe_strsignal.
2813 * sysdep.c (sys_siglist, init_signals): Always define and
2814 initialize a substitute sys_siglist if the system does not define
2815 one, even if HAVE_STRSIGNAL.
2816 (safe_strsignal): Rename from strsignal. Always define,
2817 using sys_siglist. Return a const pointer.
2818 * syssignal.h (safe_strsignal): New decl.
2819 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
2820
2821 2012-10-01 Eli Zaretskii <eliz@gnu.org>
2822
2823 * w32proc.c (timer_loop): Fix code that waits for timer
2824 expiration, to avoid high CPU usage.
2825
2826 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2827
2828 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
2829 (sweep_weak_table): Remove redundant prototypes.
2830
2831 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
2832
2833 * emacs.c: Move the inclusion of TERM_HEADER after including
2834 windows.h on WINDOWSNT. This avoids compilation problems with
2835 MSVC.
2836
2837 2012-10-01 Eli Zaretskii <eliz@gnu.org>
2838
2839 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
2840 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
2841 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
2842 as the previous version used 'void *'.
2843
2844 * ralloc.c (ROUNDUP): Fix last change.
2845 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
2846 'size_t'.
2847
2848 * w32proc.c <disable_itimers>: New static flag.
2849 (init_timers): Initialize it to zero, after creating the critical
2850 sections used by the timer threads.
2851 (term_timers): Set to 1 before deleting the critical sections.
2852 (getitimer, setitimer): If disable_itimers is non-zero, return an
2853 error indication without doing anything. Reported by Fabrice
2854 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
2855 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
2856 return results.
2857 [!HAVE_SETITIMER]: Behave as the previous version that didn't
2858 support timers.
2859
2860 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
2861 term_ntproc after all the other bookkeeping, to get timers working
2862 as long as possible.
2863
2864 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2865
2866 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
2867 Suggested by Juri Linkov in
2868 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
2869
2870 Prefer plain 'static' to 'static inline' (Bug#12541).
2871 With static functions, modern compilers inline pretty well by
2872 themselves; advice from programmers often hurts as much as it helps.
2873 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
2874 this change shrinks the text size of the Emacs executable by 1.1%
2875 without affecting CPU significantly in my benchmark.
2876 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
2877 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
2878 (mark_maybe_object, mark_maybe_pointer, bounded_number):
2879 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2880 (bset_auto_fill_function, bset_auto_save_file_format)
2881 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2882 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2883 (bset_cache_long_line_scans, bset_case_fold_search)
2884 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2885 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2886 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2887 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2888 (bset_header_line_format, bset_indicate_buffer_boundaries)
2889 (bset_indicate_empty_lines, bset_invisibility_spec)
2890 (bset_left_fringe_width, bset_major_mode, bset_mark)
2891 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2892 (bset_name, bset_overwrite_mode, bset_pt_marker)
2893 (bset_right_fringe_width, bset_save_length)
2894 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2895 (bset_scroll_up_aggressively, bset_selective_display)
2896 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2897 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
2898 (set_buffer_overlays_after):
2899 * category.c (bset_category_table):
2900 * charset.c (read_hex):
2901 * coding.c (produce_composition, produce_charset)
2902 (handle_composition_annotation, handle_charset_annotation)
2903 (char_encodable_p):
2904 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
2905 (assign_row, set_frame_matrix_frame, make_current)
2906 (add_row_entry):
2907 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
2908 * fns.c (maybe_resize_hash_table):
2909 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
2910 * gmalloc.c (register_heapinfo):
2911 * image.c (lookup_image_type):
2912 * intervals.c (set_interval_object, set_interval_left)
2913 (set_interval_right, copy_interval_parent, rotate_right)
2914 (rotate_left, balance_possible_root_interval):
2915 * keyboard.c (kset_echo_string, kset_kbd_queue)
2916 (kset_keyboard_translate_table, kset_last_prefix_arg)
2917 (kset_last_repeatable_command, kset_local_function_key_map)
2918 (kset_overriding_terminal_local_map, kset_real_last_command)
2919 (kset_system_key_syms, clear_event, set_prop):
2920 * lread.c (digit_to_number):
2921 * marker.c (attach_marker, live_buffer, set_marker_internal):
2922 * nsterm.m (ns_compute_glyph_string_overhangs):
2923 * process.c (pset_buffer, pset_command)
2924 (pset_decode_coding_system, pset_decoding_buf)
2925 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
2926 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
2927 (pset_status, pset_tty_name, pset_type, pset_write_queue):
2928 * syntax.c (bset_syntax_table, dec_bytepos):
2929 * terminal.c (tset_param_alist):
2930 * textprop.c (interval_has_some_properties)
2931 (interval_has_some_properties_list):
2932 * window.c (wset_combination_limit, wset_dedicated)
2933 (wset_display_table, wset_hchild, wset_left_fringe_width)
2934 (wset_left_margin_cols, wset_new_normal, wset_new_total)
2935 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2936 (wset_right_fringe_width, wset_right_margin_cols)
2937 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
2938 (wset_vertical_scroll_bar_type, wset_window_parameters):
2939 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2940 (wset_column_number_displayed, wset_region_showing)
2941 (window_box_edges, run_window_scroll_functions)
2942 (append_glyph_string_lists, prepend_glyph_string_lists)
2943 (append_glyph_string, set_glyph_string_background_width)
2944 (append_glyph, append_composite_glyph)
2945 (take_vertical_position_into_account):
2946 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
2947 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
2948 (lface_hash, lface_same_font_attributes_p, lookup_face):
2949 * xml.c (libxml2_loaded_p):
2950 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
2951 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
2952 Now 'static', not 'static inline'.
2953
2954 * bidi.c: Tune.
2955 (bidi_copy_it): Do the whole copy with a single memcpy.
2956 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
2957
2958 Revert the FOLLOW-SYMLINKS change for file-attributes.
2959 Doing it right would require several changes to Tramp, and there's
2960 not enough time to get that tested before the freeze today.
2961 * dired.c (directory_files_internal, Ffile_attributes):
2962 Undo last change.
2963
2964 * frame.c (x_report_frame_params): Port better to wider ints.
2965 Do not assume that EMACS_UINT is the same width as uprintmax_t,
2966 or that pointers can be printed in 15 decimal digits.
2967 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
2968
2969 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
2970
2971 Support x64 build on MS-Windows.
2972 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
2973 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
2974 compatibility with x64.
2975 (x_get_focus_frame): Add prototype.
2976
2977 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
2978 defining an XRectangle structure.
2979
2980 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
2981 arithmetics for compatibility with x64.
2982
2983 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
2984 compatibility with x64.
2985
2986 * w32heap.h: Adjust prototypes and declarations.
2987
2988 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
2989 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
2990 DWORD, long, and unsigned long, for compatibility with x64.
2991 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
2992 (sbrk): Argument is now of type ptrdiff_t.
2993
2994 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
2995 less than 0x0500.
2996 (w32_msg_pump): Use WPARAM type for 'result'.
2997
2998 * w32.c (init_environment, get_emacs_configuration): Support AMD64
2999 architecture.
3000 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
3001 compatibility with x64.
3002
3003 * vm-limit.c (lim_data): Now size_t.
3004 (check_memory_limits): Adjust prototypes of real_morecore and
3005 __morecore to receive argument of type ptrdiff_t. Use size_t for
3006 five_percent and data_size.
3007
3008 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
3009 variables, for compatibility with x64.
3010 (rva_to_section, offset_to_section, relocate_offset)
3011 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
3012 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
3013 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
3014 for compatibility with x64.
3015
3016 * sysdep.c (STDERR_FILENO): Define if not already defined.
3017
3018 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
3019 (__morecore): Argument type is now ptrdiff_t.
3020 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
3021 (relinquish): Use ptrdiff_t type for 'excess'.
3022 (r_alloc_sbrk): Argument type is now ptrdiff_t.
3023
3024 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
3025 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
3026 instead of a literal number.
3027
3028 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
3029 (min): Define only if not already defined.
3030
3031 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
3032 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
3033 hosts.
3034
3035 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
3036 'bitmaps' is a pointer.
3037
3038 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
3039
3040 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
3041
3042 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
3043
3044 file-attributes has a new optional arg FOLLOW-SYMLINKS.
3045 * dired.c (directory_files_internal, Ffile_attributes):
3046 New arg follow_symlinks. All uses changed.
3047
3048 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
3049
3050 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
3051
3052 2012-09-30 Eli Zaretskii <eliz@gnu.org>
3053
3054 Support atimers and CPU profiler via profile.c on MS-Windows.
3055 * w32proc.c (sig_mask, crit_sig): New static variables.
3056 (sys_signal): Support SIGALRM and SIGPROF.
3057 (sigemptyset, sigaddset, sigfillset, sigprocmask)
3058 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
3059 sigfillset, and sigprocmask are no longer no-ops.
3060 (sigismember): New function.
3061 (struct itimer_data): New definition.
3062 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
3063 (crit_prof): New static variables.
3064 (MAX_SINGLE_SLEEP): New definition.
3065 (timer_loop, stop_timer_thread, term_timers, init_timers)
3066 (start_timer_thread, getitimer, setitimer): New functions.
3067 (alarm): No longer a no-op, calls setitimer.
3068
3069 * w32.c (term_ntproc): Call term_timers.
3070 (init_ntproc): Make sure all signals are unblocked at startup, to
3071 erase any traces of dumping. Call init_timers.
3072
3073 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
3074 Windows-specific code to display the hourglass mouse pointer is no
3075 longer used.
3076 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
3077 to hourglass timer expiration.
3078 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
3079 Remove, no longer used.
3080 (w32_note_current_window, show_hourglass, hide_hourglass):
3081 New functions, in support of hourglass cursor display similar to other
3082 window systems.
3083 (syms_of_w32fns): Don't initialize hourglass_timer.
3084
3085 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
3086 WINDOWSNT as well.
3087 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
3088
3089 * w32.h (init_timers, term_timers): Add prototypes.
3090
3091 2012-09-30 Kenichi Handa <handa@gnu.org>
3092
3093 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
3094 to the buffer relocation which may be caused by ccl_driver.
3095
3096 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
3097
3098 * xfns.c (Fx_file_dialog): Update comment.
3099
3100 * w32fns.c (Fx_file_dialog): Update comment.
3101
3102 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
3103 Initialize panel name field if OSX >= 10.6.
3104
3105 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
3106
3107 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
3108
3109 * nsterm.m (NEW_STYLE_FS): New define.
3110 (ns_fullscreen_hook, windowWillEnterFullScreen)
3111 (windowDidEnterFullScreen, windowWillExitFullScreen)
3112 (windowDidExitFullScreen, toggleFullScreen, handleFS)
3113 (setFSValue): New functions.
3114 (EmacsFSWindow): New implementation.
3115 (canBecomeKeyWindow): New function for EmacsFSWindow.
3116 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
3117 (dealloc): Release nonfs_window if in fullscreen.
3118 (updateFrameSize:): Call windowDidMove to update top/left.
3119 (windowWillResize:toSize:): Check if frame is still maximized.
3120 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
3121 next_maximized, maximized_width, maximized_height and nonfs_window.
3122 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
3123 tbar_height.
3124 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
3125 fullscreen. Set maximized_width/height. Act on next_maximized.
3126
3127 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
3128 (EmacsView): Add variables for fullscreen.
3129 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
3130 (EmacsFSWindow): New interface for fullscreen.
3131
3132 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
3133
3134 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
3135
3136 2012-09-30 Chong Yidong <cyd@gnu.org>
3137
3138 * fns.c (Frandom): Doc fix.
3139
3140 2012-09-30 Martin Rudalics <rudalics@gmx.at>
3141
3142 * window.c (Vwindow_combination_limit): New default value.
3143 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
3144
3145 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
3146
3147 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
3148 Suggested by Eli Zaretskii in
3149 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
3150
3151 2012-09-30 Eli Zaretskii <eliz@gnu.org>
3152
3153 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
3154 HAVE_TIMER_SETTIME is defined.
3155
3156 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
3157
3158 Profiler improvements: more-accurate timers, overflow checks.
3159 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
3160 signal.h, setjmp.h. Include systime.h instead.
3161 (saturated_add): New function.
3162 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
3163 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
3164 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
3165 New static vars.
3166 (enum profiler_cpu_running): New enum.
3167 (profiler_cpu_running): Now of that enum type, not bool.
3168 All uses changed to store the new value.
3169 (handle_profiler_signal): Rename from sigprof_handler_1,
3170 for consistency with other handlers. Do not check whether
3171 cpu_log is a hash-table if garbage collecting, since it
3172 doesn't matter in that case.
3173 (deliver_profiler_signal): Rename from sigprof_handler,
3174 for consistency with other handlers.
3175 (setup_cpu_timer): New function, with much of what used to be in
3176 Fprofiler_cpu_start. Check for out-of-range argument.
3177 Prefer timer_settime if available, and prefer
3178 thread cputime clocks, then process cputime clocks, then
3179 monotonic clocks, to the old realtime clock. Use make_timeval
3180 to round more-correctly when falling back to setitimer.
3181 (Fprofiler_cpu_start): Use it.
3182 (Fprofiler_cpu_stop): Prefer timer_settime if available.
3183 Don't assume that passing NULL as the 2nd argument of setitimer
3184 is the same as passing a pointer to all-zero storage.
3185 Ignore SIGPROF afterwards.
3186 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
3187 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
3188 non-fatal signal handlers. Ignore SIGPROF on startup.
3189 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
3190 in profiler.c, since sysdep.c now uses it.
3191
3192 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
3193 Suggested by Eli Zaretskii in
3194 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
3195
3196 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
3197
3198 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
3199
3200 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
3201
3202 * lisp.h (struct backtrace): Remove indirection for `function' field.
3203 * xdisp.c (redisplay_internal):
3204 * profiler.c (record_backtrace, sigprof_handler_1):
3205 * alloc.c (Fgarbage_collect):
3206 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
3207 (Fbacktrace_frame): Adjust accordingly.
3208
3209 2012-09-28 Glenn Morris <rgm@gnu.org>
3210
3211 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
3212 (Frun_hook_with_args_until_failure): Doc fixes.
3213
3214 2012-09-28 Eli Zaretskii <eliz@gnu.org>
3215
3216 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
3217 Qautomatic_redisplay and change the symbol name. All users changed.
3218
3219 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
3220
3221 * profiler.c (sigprof_handler): Fix race condition.
3222
3223 2012-09-28 Glenn Morris <rgm@gnu.org>
3224
3225 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
3226
3227 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
3228
3229 Check more robustly for timer_settime.
3230 * Makefile.in (LIB_TIMER_TIME): New macro.
3231 (LIBES): Add it.
3232 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
3233 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
3234 call timer_settime.
3235
3236 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
3237
3238 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
3239
3240 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
3241
3242 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
3243
3244 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
3245
3246 * character.h (MAYBE_UNIFY_CHAR): Remove.
3247 * charset.c, charset.h (maybe_unify_char): Now static.
3248 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
3249 Since this stuff is now private to charset.c, there's no need for
3250 a public macro and no need to inline by hand.
3251
3252 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
3253 Stefan Monnier <monnier@iro.umontreal.ca>
3254 Juanma Barranquero <lekktu@gmail.com>
3255
3256 * profiler.c: New file.
3257 * Makefile.in (base_obj): Add profiler.o.
3258 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
3259 ($(BLD)/profiler.$(O)): New target.
3260 * emacs.c (main): Call syms_of_profiler.
3261 * alloc.c (Qautomatic_gc): New constant.
3262 (MALLOC_PROBE): New macro.
3263 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
3264 (total_bytes_of_live_objects): New function.
3265 (Fgarbage_collect): Use it. Record itself in backtrace_list.
3266 Call malloc_probe for the memory profiler.
3267 (syms_of_alloc): Define Qautomatic_gc.
3268 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
3269 race condition.
3270 (struct backtrace): Move definition...
3271 * lisp.h (struct backtrace): ..here.
3272 (Qautomatic_gc, profiler_memory_running): Declare vars.
3273 (malloc_probe, syms_of_profiler): Declare functions.
3274 * xdisp.c (Qautomatic_redisplay): New constant.
3275 (redisplay_internal): Record itself in backtrace_list.
3276 (syms_of_xdisp): Define Qautomatic_redisplay.
3277
3278 2012-09-25 Eli Zaretskii <eliz@gnu.org>
3279 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
3280
3281 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
3282
3283 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
3284
3285 Prefer POSIX timers if available.
3286 They avoid a race if the timer is too close to the current time.
3287 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
3288 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
3289 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
3290
3291 2012-09-25 Eli Zaretskii <eliz@gnu.org>
3292
3293 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
3294 CHAR_STRING_ADVANCE.
3295 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
3296 STRING_CHAR_ADVANCE.
3297
3298 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
3299
3300 Move Vlibrary_cache to emacs.c and reset before dumping.
3301
3302 * lisp.h (reset_image_types): Declare.
3303 [WINDOWSNT] (Vlibrary_cache): Declare.
3304
3305 * image.c (reset_image_types): New function.
3306
3307 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
3308 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
3309 (Fdump_emacs): Reset Vlibrary_cache and image_types.
3310
3311 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
3312 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
3313
3314 * w32.h (Vlibrary_cache): Do not declare.
3315
3316 2012-09-25 Eli Zaretskii <eliz@gnu.org>
3317
3318 * w32proc.c (sys_signal): Handle all signals defined by the
3319 MS-Windows runtime, not just SIGCHLD. Actually install the signal
3320 handlers for signals supported by Windows. Don't override
3321 term_ntproc as the handler for SIGABRT.
3322 (sigaction): Rewrite to call sys_signal instead of duplicating its
3323 code.
3324 (sys_kill): Improve commentary.
3325
3326 * w32.c (term_ntproc): Accept (and ignore) one argument, for
3327 consistency with a signature of a signal handler. All callers
3328 changed.
3329 (init_ntproc): Accept an argument DUMPING. If dumping, don't
3330 install term_ntproc as a signal handler for SIGABRT, as that
3331 should be done by the dumped Emacs.
3332
3333 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
3334
3335 * w32select.c (term_w32select): Protect against repeated
3336 invocation by setting clipboard_owner to NULL after calling
3337 DestroyWindow.
3338
3339 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
3340 and term_ntproc to their modified signatures.
3341
3342 * character.c (char_string, string_char): Remove calls to
3343 MAYBE_UNIFY_CHAR. See the discussion starting at
3344 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
3345 for the details.
3346
3347 2012-09-25 Chong Yidong <cyd@gnu.org>
3348
3349 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
3350
3351 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
3352
3353 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
3354 when encountering an unknown bytecode.
3355
3356 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
3357
3358 image.c, indent.c: Use bool for booleans.
3359 * dispextern.h (struct image_type): Members valid_p, load, init
3360 now return bool, not int. All uses changed.
3361 * image.c: Omit unnecessary static decls.
3362 (x_create_bitmap_mask, x_build_heuristic_mask):
3363 Return void, not int, since callers don't care about the return value.
3364 (x_create_bitmap_mask, define_image_type, valid_image_p)
3365 (struct image_keyword, parse_image_spec, image_spec_value)
3366 (check_image_size, image_background)
3367 (image_background_transparent, x_clear_image_1)
3368 (postprocess_image, lookup_image, x_check_image_size)
3369 (x_create_x_image_and_pixmap, xbm_image_p)
3370 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
3371 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
3372 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
3373 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
3374 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
3375 (png_image_p, init_png_functions, png_load_body, png_load)
3376 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
3377 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
3378 (init_gif_functions, gif_load, imagemagick_image_p)
3379 (imagemagick_load_image, imagemagick_load, svg_image_p)
3380 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
3381 (gs_load):
3382 * nsimage.m (ns_load_image):
3383 * nsterm.m (ns_defined_color):
3384 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
3385 * xfns.c (x_defined_color):
3386 * xterm.c (x_alloc_lighter_color_for_widget)
3387 (x_alloc_nearest_color_1, x_alloc_nearest_color)
3388 (x_alloc_lighter_color):
3389 * indent.c (disptab_matches_widthtab, current_column)
3390 (scan_for_column, string_display_width, indented_beyond_p)
3391 (compute_motion, vmotion, Fvertical_motion):
3392 Use bool for booleans.
3393
3394 2012-09-24 Chong Yidong <cyd@gnu.org>
3395
3396 * chartab.c (Fset_char_table_default): Obsolete function removed.
3397
3398 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3399
3400 Move pid_t related decls out of lisp.h.
3401 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
3402 (interruptible_wait_for_termination):
3403 Move these decls from lisp.h to syswait.h, since they use pid_t.
3404 Needed on FreeBSD; see Herbert J. Skuhra in
3405 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
3406 * callproc.c: Include syswait.h.
3407
3408 gnutls.c, gtkutil.c: Use bool for boolean.
3409 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
3410 (emacs_gnutls_handle_error):
3411 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
3412 (xg_hide_tooltip, xg_create_frame_widgets)
3413 (create_dialog, xg_uses_old_file_dialog)
3414 (xg_get_file_with_chooser, xg_get_file_with_selection)
3415 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
3416 (xg_item_label_same_p, xg_update_menubar)
3417 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
3418 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
3419 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
3420 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
3421 (update_frame_tool_bar, free_frame_tool_bar):
3422 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
3423 * nsmenu.m (ns_update_menubar):
3424 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
3425 * xfns.c (Fx_show_tip) [USE_GTK]:
3426 Use bool for boolean.
3427 * gtkutil.c (xg_update_frame_menubar):
3428 * xmenu.c (update_frame_menubar):
3429 Return void, not int, since caller ignores return value.
3430 * gtkutil.c (xg_change_toolbar_position):
3431 Return void, not 1.
3432
3433 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
3434
3435 * makefile.w32-in (BLOCKINPUT_H): Remove.
3436 (SYSSIGNAL_H): New macro.
3437 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
3438 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
3439 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
3440 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
3441 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
3442 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
3443 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
3444 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
3445 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
3446 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
3447 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
3448 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
3449 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
3450 ($(BLD)/w32xfns.$(O)): Update dependencies.
3451
3452 2012-09-23 Eli Zaretskii <eliz@gnu.org>
3453
3454 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
3455 fatal_error_backtrace.
3456
3457 * w32proc.c (sys_kill): Undo last change: don't do anything when
3458 invoked to deliver SIGABRT to our own process. This is now
3459 handled by emacs_raise.
3460
3461 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
3462
3463 * w32term.c (w32_read_socket): Remove leftover reference to
3464 interrupt_input_pending.
3465
3466 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3467
3468 Do not use SA_NODEFER.
3469 Problem reported by Dani Moncayo in
3470 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
3471 * alloc.c (die):
3472 * sysdep.c (emacs_abort): Do not reset signal handler.
3473 * emacs.c (terminate_due_to_signal): Reset signal handler here.
3474 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
3475 wanted even on POSIXish hosts, and it doesn't work on Windows.
3476
3477 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3478
3479 * xterm.c (x_term_init): Call fixup_locale before and after calling
3480 gtk_init (Bug#12392).
3481
3482 2012-09-23 Chong Yidong <cyd@gnu.org>
3483
3484 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
3485 Vdynamic_library_alist.
3486
3487 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
3488 (Fgnutls_available_p): Caller changed.
3489
3490 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
3491 (Flibxml_parse_xml_region): Likewise.
3492
3493 * dispextern.h (struct image_type): Remove arg from init function.
3494
3495 * image.c (Finit_image_library, lookup_image_type)
3496 (define_image_type): Remove now-unneeded second arg.
3497 (init_xpm_functions, init_png_functions, init_jpeg_functions)
3498 (init_tiff_functions, init_gif_functions, init_svg_functions):
3499 Arglist and w32_delayed_load calling convention changed.
3500 (gs_type): Remove init_gs_functions; there is no such function.
3501 (valid_image_p, make_image): Fix caller to lookup_image_type.
3502
3503 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3504
3505 Simplify and avoid signal-handling races (Bug#12471).
3506 * alloc.c (die):
3507 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
3508 Avoid recursive loop if there's a fatal error in the function itself.
3509 * atimer.c (pending_atimers):
3510 * blockinput.h: Don't include "atimer.h"; no longer needed.
3511 (interrupt_input_pending): Remove. All uses removed.
3512 pending_signals now counts both atimers and ordinary interrupts.
3513 This is less racy than having three separate pending-signal flags.
3514 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
3515 (input_blocked_p):
3516 Rename from their upper-case counterparts BLOCK_INPUT,
3517 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
3518 INPUT_BLOCKED_P, and turn into functions. All uses changed.
3519 This makes it easier to access volatile variables more accurately.
3520 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
3521 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
3522 that's more reliable if the code is buggy and sets
3523 interrupt_input_blocked to a negative value. All uses changed.
3524 * atimer.c (deliver_alarm_signal):
3525 Remove. No need to deliver this to the parent; any thread can
3526 handle this signal now. All uses replaced by underlying handler.
3527 * atimer.c (turn_on_atimers):
3528 * dispnew.c (handle_window_change_signal):
3529 * emacs.c (handle_danger_signal):
3530 * keyboard.c (kbd_buffer_get_event):
3531 Don't reestablish signal handler; not needed with sigaction.
3532 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
3533 (UNBLOCK_INPUT_TO):
3534 Rework to avoid unnecessary accesses to volatile variables.
3535 (UNBLOCK_INPUT_TO): Now a function.
3536 (totally_unblock_input, unblock_input): New decls.
3537 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
3538 (init_data): Remove. Necessary stuff now done in init_signal.
3539 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
3540 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
3541 (fatal_error_code): Remove; no longer needed.
3542 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
3543 it doesn't always backtrace. All uses changed. No need to reset
3544 signal to default, since sigaction and/or die does that for us now.
3545 Use emacs_raise (FOO), not kill (getpid (), FOO).
3546 (main): Check more-accurately whether we're dumping.
3547 Move fatal-error setup to sysdep.c
3548 * floatfns.c: Do not include "syssignal.h"; no longer needed.
3549 * gtkutil.c (xg_get_file_name, xg_get_font):
3550 Remove no-longer-needed signal-mask manipulation.
3551 * keyboard.c, process.c (POLL_FOR_INPUT):
3552 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
3553 * keyboard.c (read_avail_input): Remove.
3554 All uses replaced by gobble_input.
3555 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
3556 (kbd_buffer_store_event_hold, gobble_input):
3557 (record_asynch_buffer_change) [USABLE_SIGIO]:
3558 (store_user_signal_events):
3559 No need to mess with signal mask.
3560 (gobble_input): If blocking input and there are terminals, simply
3561 set pending_signals to 1 and return. All hooks changed to not
3562 worry about whether input is blocked.
3563 (process_pending_signals): Clear pending_signals before processing
3564 them, in case a signal comes in while we're processing.
3565 By convention callers now test pending_signals before calling us.
3566 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
3567 New functions, to support changes to blockinput.h.
3568 (handle_input_available_signal): Now extern.
3569 (reinvoke_input_signal): Remove. All uses replaced by
3570 handle_async_input.
3571 (quit_count): Now volatile, since a signal handler uses it.
3572 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
3573 All callers changed. Block SIGINT only if not already blocked.
3574 Clear sigmask reliably, even if Fsignal returns, which it can.
3575 Omit unnecessary accesses to volatile var.
3576 (quit_throw_to_read_char): No need to restore sigmask.
3577 * keyboard.c (gobble_input, handle_user_signal):
3578 * process.c (wait_reading_process_output):
3579 Call signal-handling code rather than killing ourselves.
3580 * lisp.h: Include <float.h>, for...
3581 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
3582 (pending_signals): Now volatile.
3583 (syms_of_data): Now const if IEEE floating point.
3584 (handle_input_available_signal) [USABLE_SIGIO]:
3585 (terminate_due_to_signal, record_child_status_change): New decls.
3586 * process.c (create_process): Avoid disaster if memory is exhausted
3587 while we're processing a vfork, by tightening the critical section
3588 around the vfork.
3589 (send_process_frame, process_sent_to, handle_pipe_signal)
3590 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
3591 ignores SIGPIPE.
3592 (send_process): No need for setjmp/longjmp any more, since the
3593 SIGPIPE stuff is now gone. Instead, report an error if errno
3594 is EPIPE.
3595 (record_child_status_change): Now extern. PID and W are now args.
3596 Return void, not bool. All callers changed.
3597 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
3598 Remove. All uses removed. This bug should be fixed now in a
3599 different way.
3600 (wait_for_termination_1): Use waitpid rather than sigsuspend,
3601 and record the child status change directly. This avoids the
3602 need to futz with the signal mask.
3603 (process_fatal_action): Move here from emacs.c.
3604 (emacs_sigaction_flags): New function, containing
3605 much of what used to be in emacs_sigaction_init.
3606 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
3607 caught by emacs, to make races less likely.
3608 (deliver_process_signal): Rename from handle_on_main_thread.
3609 All uses changed.
3610 (BACKTRACE_LIMIT_MAX): Now at top level.
3611 (thread_backtrace_buffer, threadback_backtrace_pointers):
3612 New static vars.
3613 (deliver_thread_signal, deliver_fatal_thread_signal):
3614 New functions, for more-accurate delivery of thread-specific signals.
3615 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
3616 (deliver_arith_signal): Handle in this thread, not
3617 in the main thread, since it's triggered by this thread.
3618 (maybe_fatal_sig): New function.
3619 (init_signals): New arg DUMPING so that we can be more accurate
3620 about whether we're dumping. Caller changed.
3621 Treat thread-specific signals differently from process-general signals.
3622 Block all signals while handling fatal error; that's safer.
3623 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
3624 on IEEE hosts.
3625 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
3626 Ignore SIGPIPE unless batch.
3627 (emacs_backtrace): Output backtrace for the appropriate thread,
3628 which is not necessarily the main thread.
3629 * syssignal.h: Include <stdbool.h>.
3630 (emacs_raise): New macro.
3631 * xterm.c (x_connection_signal): Remove; no longer needed
3632 now that we use sigaction.
3633 (x_connection_closed): No need to mess with sigmask now.
3634 (x_initialize): No need to reset SIGPIPE handler here, since
3635 init_signals does this for us now.
3636
3637 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3638
3639 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
3640 background rect may be larger (Bug#12245).
3641
3642 2012-09-23 Chong Yidong <cyd@gnu.org>
3643
3644 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
3645
3646 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3647
3648 * .gdbinit: Just stop at fatal_error_backtrace.
3649 See Stefan Monnier's request in
3650 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
3651 Remove no-longer-used query of system type.
3652
3653 2012-09-22 Chong Yidong <cyd@gnu.org>
3654
3655 * search.c (Freplace_match): Doc fix (Bug#12325).
3656
3657 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
3658
3659 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
3660 (Fline_end_position): Doc fix.
3661
3662 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
3663
3664 2012-09-22 Chong Yidong <cyd@gnu.org>
3665
3666 * dispextern.h (struct image_type): Add new slot, storing a type
3667 initialization function.
3668
3669 * image.c (define_image_type): Call the image initializer function
3670 if it is defined. Arguments and return value changed.
3671 (valid_image_p, make_image): Callers changed.
3672 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3673 (gif_type, imagemagick_type, svg_type, gs_type):
3674 Add initialization functions.
3675 (Finit_image_library): Call lookup_image_type.
3676 (CHECK_LIB_AVAILABLE): Macro deleted.
3677 (lookup_image_type): Call define_image_type here, rather than via
3678 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
3679 (syms_of_image): Move define_image_type calls for xbm_type and
3680 pbm_type to lookup_image_type.
3681
3682 2012-09-22 Eli Zaretskii <eliz@gnu.org>
3683
3684 * keyboard.c (timer_check_2): Move calculation of 'timers' and
3685 'idle_timers' from here ...
3686 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
3687 lists, to avoid infloops when the timer does something stupid,
3688 like reinvoke itself with the same or smaller time-out.
3689 (Bug#12447)
3690
3691 2012-09-22 Martin Rudalics <rudalics@gmx.at>
3692
3693 * window.c (Fsplit_window_internal): Handle only Qt value of
3694 Vwindow_combination_limit separately.
3695 (Qtemp_buffer_resize): New symbol.
3696 (Vwindow_combination_limit): New default value.
3697 Rewrite doc-string.
3698
3699 2012-09-22 Eli Zaretskii <eliz@gnu.org>
3700
3701 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
3702 the new overlay string. (Bug#10159)
3703
3704 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3705
3706 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
3707 or that fprintf is async-signal-safe. POSIX doesn't require
3708 either assumption.
3709
3710 2012-09-22 Chong Yidong <cyd@gnu.org>
3711
3712 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
3713 (Bug#8207).
3714
3715 2012-09-22 Kenichi Handa <handa@gnu.org>
3716
3717 * composite.c (composition_reseat_it): Handle the case that a
3718 grapheme cluster is not covered by a single font (Bug#12352).
3719
3720 2012-09-21 Chong Yidong <cyd@gnu.org>
3721
3722 * image.c (define_image_type): Avoid adding duplicate types to
3723 image_types (Bug#12463). Suggested by Jörg Walter.
3724
3725 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3726
3727 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
3728 (print_load_command_name): Add case LC_DATA_IN_CODE.
3729 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
3730
3731 2012-09-21 Glenn Morris <rgm@gnu.org>
3732
3733 * eval.c (Frun_hook_with_args_until_success)
3734 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
3735
3736 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
3737
3738 * fileio.c (Ffile_selinux_context): Only call freecon when
3739 lgetfilecon succeeded.
3740 (Fset_file_selinux_context): Likewise. (Bug#12444)
3741
3742 2012-09-21 Eli Zaretskii <eliz@gnu.org>
3743
3744 * xdisp.c (try_window_reusing_current_matrix): Under bidi
3745 reordering, locate the cursor by calling set_cursor_from_row; if
3746 that fails, clear the desired glyph matrix before returning a
3747 failure indication to the caller. Fixes leaving garbled display
3748 when fast scrolling with a down-key. (Bug#12403)
3749 (compute_stop_pos_backwards): Fix a typo that caused crashes while
3750 scrolling through multibyte text.
3751
3752 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
3753
3754 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
3755 calling mark_vectorlike since that's the one that marks the window.
3756 (mark_discard_killed_buffers): Mark the final cdr.
3757 * window.h (struct window): Move prev/next_buffers to the
3758 non-standard fields.
3759 * window.c (make_window): Initialize prev/next_buffers manually.
3760
3761 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 Omit unused arg EXPECTED from socket hooks.
3764 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
3765 * nsterm.m (ns_term_init):
3766 * termhooks.h (struct terminal.read_socket_hook):
3767 * w32inevt.c (w32_console_read_socket):
3768 * w32term.c (w32_read_socket):
3769 * xterm.c (XTread_socket):
3770 Omit unused arg EXPECTED. All callers changed.
3771 (store_user_signal_events): Return void, not int, since callers no
3772 longer care about the return value. All uses changed.
3773
3774 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
3775
3776 * w32gui.h (XParseGeometry): Do not declare.
3777
3778 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
3779
3780 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
3781 Ignore 'expected'. See Eli Zaretskii in
3782 <http://bugs.gnu.org/12471#8> (last line).
3783
3784 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
3785 (XParseGeometry): Now static. Substitute extremal values for
3786 values that are out of range.
3787
3788 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
3789
3790 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
3791
3792 * nsfns.m (XParseGeometry): Remove.
3793 (Fx_create_frame): Call x_set_offset to correctly interpret
3794 top_pos in geometry.
3795
3796 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
3797 (Fx_parse_geometry): If there is a space in string, call
3798 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
3799
3800 2012-09-17 Eli Zaretskii <eliz@gnu.org>
3801
3802 * search.c (scan_buffer): Use character positions in calls to
3803 region_cache_forward and region_cache_backward, not byte
3804 positions. (Bug#12196)
3805
3806 * w32term.c (w32_read_socket): Set pending_signals to 1, like
3807 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
3808
3809 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
3810 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
3811 emacs_blocked_malloc, now deleted.
3812
3813 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
3814
3815 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
3816 The workaround was for improving performance on Solaris 2.4, but
3817 is getting in the way now. Emacs will still work if someone is
3818 still running Solaris 2.4 in a museum somewhere; Sun dropped
3819 support for Solaris 2.4 in 2003.
3820 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
3821 * process.c (create_process) [HAVE_WORKING_VFORK]:
3822 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
3823 since Emacs no longer uses vfork on that platform.
3824
3825 2012-09-17 Glenn Morris <rgm@gnu.org>
3826
3827 * emacs.c: Use COPYRIGHT.
3828
3829 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
3830
3831 Remove configure's --without-sync-input option (Bug#12450).
3832 When auditing signal-handling in preparation for cleaning it up,
3833 I found that SYNC_INPUT has race conditions and would be a real
3834 pain to fix. Since it's an undocumented and deprecated
3835 configure-time option, now seems like a good time to remove it.
3836 Also see <http://bugs.gnu.org/11080#16>.
3837 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
3838 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
3839 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3840 (malloc_hysteresis):
3841 (check_depth) [XMALLOC_OVERRUN_CHECK]:
3842 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
3843 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
3844 (dont_register_blocks, bytes_used_when_reconsidered)
3845 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
3846 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
3847 [!SYSTEM_MALLOC && !SYNC_INPUT]:
3848 Remove. All uses removed.
3849 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
3850 implementation, one that depends on whether the new macro
3851 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
3852 is defined.
3853 * atimer.c (run_timers, handle_alarm_signal):
3854 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
3855 (handle_async_input, process_pending_signals)
3856 (handle_input_available_signal, init_keyboard):
3857 * nsterm.m (ns_read_socket):
3858 * process.c (wait_reading_process_output):
3859 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
3860 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
3861 (emacs_write):
3862 * xterm.c (XTread_socket):
3863 Assume SYNC_INPUT.
3864 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
3865 * eval.c (handling_signal): Remove. All uses removed.
3866 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
3867 All uses replaced with the SYNC_INPUT version.
3868 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
3869 Remove decls.
3870 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3871 Now static.
3872
3873 * font.c (Ffont_shape_gstring): Remove unused local.
3874
3875 2012-09-16 Glenn Morris <rgm@gnu.org>
3876
3877 * Makefile.in (clean): No longer run nextstep's clean.
3878
3879 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
3880 (ns_frag): Remove.
3881 (ns-app): Move here from ns.mk, and simplify.
3882 (clean): Simplify nextstep entry.
3883 * ns.mk: Remove file.
3884
3885 2012-09-17 Kenichi Handa <handa@gnu.org>
3886
3887 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
3888 not covert the last few charactes.
3889
3890 2012-09-16 Kenichi Handa <handa@gnu.org>
3891
3892 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
3893 here, but just check the validity of glyphs in the glyph-string.
3894
3895 2012-09-16 Martin Rudalics <rudalics@gmx.at>
3896
3897 * window.c (Fwindow_parameter, Fset_window_parameter):
3898 Accept any window as argument (Bug#12452).
3899
3900 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
3901
3902 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
3903 to ns_term_init to avoid memory leak.
3904
3905 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
3906 explicit retain/release.
3907 (ns_term_init): Only allow one display. Initialize outerpool and
3908 ns_*_types.
3909
3910 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3911
3912 Port _setjmp fix to POSIXish hosts as well as Microsoft.
3913 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
3914 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
3915 the Microsoft problem in a different way, by altering ../nt/config.nt.
3916
3917 2012-09-15 Eli Zaretskii <eliz@gnu.org>
3918
3919 * w32xfns.c:
3920 * w32uniscribe.c:
3921 * w32term.c:
3922 * w32select.c:
3923 * w32reg.c:
3924 * w32proc.c:
3925 * w32menu.c:
3926 * w32inevt.c:
3927 * w32heap.c:
3928 * w32font.c:
3929 * w32fns.c:
3930 * w32console.c:
3931 * w32.c:
3932 * w16select.c: Remove inclusion of setjmp.h, as it is now included
3933 by lisp.h. This completes removal of setjmp.h inclusion
3934 erroneously announced in the previous commit. (Bug#12446)
3935
3936 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
3937 more accurate.
3938
3939 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
3940 not defined as a macro. The latter happens on MS-Windows.
3941 (Bug#12446)
3942
3943 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3944
3945 Port better to POSIX hosts lacking _setjmp (Bug#12446).
3946 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
3947 Some instances of '#include <setjmp.h>' removed, if the
3948 only reason for the instance was because "lisp.h" was included.
3949 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
3950 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
3951 and _longjmp with the new symbols. Emacs already uses _setjmp if
3952 available, so this change affects only POSIXish hosts that have
3953 sigsetjmp but not _setjmp, such as some versions of Solaris and
3954 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
3955 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
3956 (png_load_body) [HAVE_PNG]:
3957 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
3958 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
3959 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
3960 since PNG requires jmp_buf. This is the only exception to the
3961 general rule that we now use sys_setjmp and sys_longjmp.
3962 This exception is OK since this code does not change the signal
3963 mask or longjmp out of a signal handler.
3964
3965 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
3966
3967 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3968 Include "syssignal.h", for 'main_thread'.
3969
3970 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
3971
3972 Avoid out-of-range marker position (Bug#12426).
3973 * insdel.c (replace_range, replace_range_2):
3974 Adjust markers before overlays, as suggested by comments.
3975 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
3976 Remove redundant check before calling offset_intervals.
3977
3978 2012-09-14 Martin Rudalics <rudalics@gmx.at>
3979
3980 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
3981 current buffer (Bug#12387).
3982
3983 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
3984
3985 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
3986
3987 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3988
3989 Use a more backwards-compatible timer format (Bug#12430).
3990 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
3991 vector element, not from the 4th, since PSECS is now at the end.
3992 (Fcurrent_idle_time): Doc fix.
3993
3994 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3995
3996 Function to mark objects and remove killed buffers at once.
3997 * alloc.c (discard_killed_buffers): Rename to ...
3998 (mark_discard_killed buffers) ... new name. Add marking
3999 of remaining objects. Fix comment. Adjust users.
4000 (mark_object): Do not touch frame buffer lists here.
4001 * frame.c (delete_frame): Reset frame buffer lists here.
4002
4003 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
4004
4005 Better workaround for GNOME bug when --enable-gcc-warnings.
4006 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
4007 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
4008 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
4009
4010 Simplify SIGIO usage (Bug#12408).
4011 The code that dealt with SIGIO was crufty and confusing, e.g., it
4012 played tricks like "#undef SIGIO" but these tricks were not used
4013 consistently. Simplify mostly by not #undeffing standard symbols,
4014 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
4015 or not as we please) rather than "defined SIGIO" (standard symbol
4016 that we probably shouldn't #undef).
4017 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
4018 Modules that need it can include it.
4019 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
4020 * dispextern.h (ignore_sigio): New decl.
4021 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
4022 unconditionally, since it's now a no-op if !USABLE_SIGIO.
4023 * emacs.c (shut_down_emacs):
4024 * keyboard.c (kbd_buffer_store_event_hold):
4025 Use ignore_sigio rather than invoking 'signal' directly.
4026 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
4027 for FIONREAD.
4028 (FIONREAD, SIGIO): Do not #undef.
4029 (tty_read_avail_input): Use #error rather than a syntax error.
4030 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
4031 for I_PIPE, used by SETUP_SLAVE_PTY.
4032 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
4033 * sysdep.c (croak): Remove; no longer needed. This bit of
4034 temporary code, with Fred N. Fish's comment that it's temporary,
4035 has been in Emacs since at least 1992!
4036 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
4037 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
4038 * syssignal.h (croak): Remove decl.
4039 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
4040 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
4041 now that we're termios-only.
4042 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
4043 * term.c (dissociate_if_controlling_tty): Use #error rather than
4044 a run-time error.
4045
4046 Work around GCC and GNOME bugs when --enable-gcc-warnings.
4047 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
4048 to work around GNOME bug 683906.
4049 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
4050 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
4051 This works around GCC bug 54561.
4052
4053 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
4054
4055 More fixes for 'volatile' and setjmp/longjmp.
4056 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
4057 * image.c (struct png_load_context) [HAVE_PNG]: New type.
4058 (png_load_body) [HAVE_PNG]:
4059 (jpeg_load_body) [HAVE_JPEG]:
4060 New function, with most of the old parent function's body.
4061 (png_load) [HAVE_PNG]:
4062 (jpeg_load) [HAVE_JPEG]:
4063 Invoke the new function, to avoid longjmp munging our locals.
4064 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
4065 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
4066 longjmp is passed 2, as the C standard doesn't guarantee this.
4067 Instead, store the failure code into mgr->failure_code.
4068
4069 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
4070
4071 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
4072 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
4073 (syms_of_keyboard): Remove support for unread-command-char.
4074
4075 2012-09-12 Eli Zaretskii <eliz@gnu.org>
4076
4077 * w32proc.c (sys_kill): If PID is our process ID and the signal is
4078 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
4079 violation. (Bug#12426)
4080
4081 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
4082
4083 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
4084
4085 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
4086
4087 * eval.c: Add `inhibit-debugger'.
4088 (Qinhibit_debugger): New symbol.
4089 (call_debugger): Bind it instead of Qdebug_on_error.
4090 (maybe_call_debugger): Test Vinhibit_debugger.
4091 (syms_of_eval): Define inhibit-debugger.
4092 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
4093 (syms_of_xdisp): Remove inhibit-debug-on-message.
4094
4095 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
4096
4097 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
4098 If a nonvolatile local variable is written before a _longjmp to
4099 the frame containing the variable, and is read after the _longjmp,
4100 the value read is indeterminate. Some local variables of type
4101 'struct handler' and 'struct catchtag' are used in this way, so
4102 mark each of their slots as volatile if the slot can be set before
4103 _longjmp and read afterwards.
4104 * lisp.h (struct handler): var and chosen_clause are now volatile.
4105 (struct catchtag): val, next, and pdlcount are now volatile.
4106
4107 * bidi.c (bidi_push_it, bidi_pop_it):
4108 * fns.c (copy_hash_table):
4109 * image.c (define_image_type):
4110 * keyboard.c (kbd_buffer_store_event_hold):
4111 * process.c (Fprocess_send_eof):
4112 * xfaces.c (x_create_gc) [HAVE_NS]:
4113 * xgselect.c (xg_select):
4114 Prefer assignment to memcpy when either will do.
4115
4116 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
4117 Use pointer-to-a-pointer to simplify and avoid a NILP check each
4118 time an item is removed. No need to mark this function 'inline';
4119 the compiler knows better than we do.
4120
4121 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
4122
4123 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
4124 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
4125 to change_frame_size (Bug#12388).
4126 (windowDidResize:): Pass YES to updateFrameSize.
4127
4128 * nsterm.h: Add delay parameter to updateFrameSize.
4129
4130 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4131
4132 Discard killed buffers from deleted window and frame objects.
4133 This reduces an amount of references to killed buffers and
4134 helps GC to reclaim them faster.
4135 * alloc.c (discard_killed_buffers): New function.
4136 (mark_object): Use it for deleted windows and frames.
4137 (mark_object): If symbol's value is set up for a killed buffer
4138 or deleted frame, restore its global binding.
4139 * data.c (swap_in_global_binding): Add GC notice.
4140 (swap_in_symval_forwarding): Use convenient set_blv_where.
4141 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
4142 * window.h: ... to here.
4143
4144 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4145
4146 Convenient macro to check whether the buffer is live.
4147 * buffer.h (BUFFER_LIVE_P): New macro.
4148 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
4149 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
4150
4151 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4152
4153 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
4154 composition cases (Bug#12364).
4155
4156 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
4157 overhang of succeeding glyphs overlapping box cursor.
4158
4159 * w32term.c (x_draw_glyph_string): Likewise.
4160
4161 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
4162
4163 Simplify, document, and port floating-point (Bug#12381).
4164 The porting part of this patch fixes bugs on non-IEEE platforms
4165 with frexp, ldexp, logb.
4166 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
4167 Now static.
4168 * floatfns.c: Simplify discussion of functions that Emacs doesn't
4169 support, by removing commented-out code and briefly listing the
4170 C89 functions excluded. The commented-out stuff was confusing
4171 maintenance, e.g., we thought we needed cbrt but it was commented out.
4172 (logb): Remove decl; no longer needed.
4173 (isfinite): New macro, if not already supplied.
4174 (isnan): Don't replace any existing macro.
4175 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
4176 are present on all C89 platforms.
4177 (Ffrexp): Do not special-case zero, as frexp does the right thing
4178 for that case.
4179 (Flogb): Do not use logb, as it doesn't have the desired meaning
4180 on hosts that use non-base-2 floating point. Instead, stick with
4181 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
4182 frexp, to avoid getting an unspecified result.
4183
4184 * xdisp.c (Qinhibit_debug_on_message): Now static.
4185
4186 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
4187
4188 * nsterm.m (ns_update_begin): Set clip path to whole view by using
4189 NSBezierPath (Bug#12131).
4190
4191 2012-09-10 Chong Yidong <cyd@gnu.org>
4192
4193 * fns.c (Fdelq, Fdelete): Doc fix.
4194
4195 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
4196
4197 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
4198 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
4199
4200 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
4201
4202 * lisp.h (make_lisp_ptr): New macro to replace XSET.
4203 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
4204 Use it.
4205
4206 2012-09-09 Eli Zaretskii <eliz@gnu.org>
4207
4208 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
4209 left fringe if the window has a left margin. This avoids leaving
4210 traces of the cursor because its leftmost pixel is not drawn over.
4211
4212 * dispnew.c (update_window_line): When the left margin area of a
4213 screen line is updated, set the redraw_fringe_bitmaps_p flag of
4214 that screen line. (Bug#12277)
4215
4216 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
4217
4218 Assume C89 or later for math functions (Bug#12381).
4219 This simplifies the code, and makes it a bit smaller and faster,
4220 and (most important) makes it easier to clean up signal handling
4221 since we can stop worring about floating-point exceptions in
4222 library code. That was a problem before C89, but the problem
4223 went away many years ago on all practical Emacs targets.
4224 * data.c, image.c, lread.c, print.c:
4225 Don't include <math.h>; no longer needed.
4226 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
4227 might be autoconfigured, as that never happens.
4228 * data.c (fmod):
4229 * doprnt.c (DBL_MAX_10_EXP):
4230 * print.c (DBL_DIG):
4231 Remove. C89 or later always defines these.
4232 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
4233 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
4234 (arith_error, domain_error, domain_error2):
4235 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
4236 no longer needed -- we simply return what C returns. All uses removed.
4237 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
4238 the wrapped code.
4239 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
4240 Remove. All uses expanded, as these macros are no longer used
4241 more than once and are now more trouble than they're worth.
4242 (Ftan): Use tan, not sin / cos.
4243 (Flogb): Assume C89 frexp.
4244 (fmod_float): Assume C89 fmod.
4245 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
4246 (init_floatfns): Remove. All uses removed.
4247
4248 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4249
4250 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
4251 compositeToPoint for OSX < 10.6 (Bug#12390).
4252
4253 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
4254
4255 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
4256 This produces more-accurate results.
4257
4258 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4259
4260 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
4261 changes (Bug#12088).
4262
4263 2012-09-08 Chong Yidong <cyd@gnu.org>
4264
4265 * syntax.c (Fstring_to_syntax): Doc fix.
4266
4267 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4268
4269 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
4270 in the internal border.
4271 (x_set_window_size): Remove static variables and their usage.
4272 (ns_redraw_scroll_bars): Fix NSTRACE arg.
4273 (ns_after_update_window_line, ns_draw_fringe_bitmap):
4274 Remove fringe/internal border adjustment (Bug#11052).
4275 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
4276 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
4277 (ns_fix_rect_ibw): Remove.
4278 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
4279 (ns_dumpglyphs_box_or_relief): Ditto.
4280 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
4281 adjustment.
4282 (ns_dumpglyphs_image): Ditto.
4283 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
4284 border adjustment.
4285 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
4286 their usage. Add fringe_extended_p and its use as in other terms.
4287 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
4288 scroll bar was removed.
4289 (updateFrameSize): New function.
4290 (windowDidResize): Move code to updateFrameSize and call it.
4291
4292 * nsterm.h (EmacsView): Add updateFrameSize.
4293
4294 2012-09-07 Chong Yidong <cyd@gnu.org>
4295
4296 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
4297
4298 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
4299
4300 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
4301
4302 More signal-handler cleanup (Bug#12327).
4303 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
4304 Problem introduced when merging patches. Noted by Eli Zaretskii in
4305 <http://bugs.gnu.org/12327#67>.
4306 * floatfns.c: Comment fix.
4307 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
4308 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
4309 and anyway the declaration is harmless even if SIGDANGER is not defined.
4310 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
4311 defined BROKEN_FIONREAD). systty.h formerly did this, but other
4312 source files not surprisingly expected syssignal.h to define, or
4313 not define, SIGIO, and it's cleaner to do it that way, for consistency.
4314 Include <sys/ioctl.h>, for FIONREAD.
4315 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
4316 This eliminates a problem whereby other files mysteriously had
4317 to include "syssignal.h" before including "systty.h" if they
4318 wanted to use "#ifdef SIGIO".
4319
4320 2012-09-07 Eli Zaretskii <eliz@gnu.org>
4321
4322 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
4323
4324 * w32.c (sigemptyset): Empty the set.
4325 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
4326
4327 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
4328
4329 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
4330
4331 * alloc.c (mark_buffer): Revert unsafe marking optimization.
4332 (mark_object): Likewise for frame objects.
4333
4334 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
4335
4336 * syssignal.h (handle_on_main_thread): Always declare,
4337 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
4338 This ports to platforms without HAVE_PTHREAD.
4339
4340 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
4341
4342 Signal-handler cleanup (Bug#12327).
4343 Emacs's signal handlers were written in the old 4.2BSD style with
4344 sigblock and sigmask and so forth, and this led to some
4345 inefficiencies and confusion. Rewrite these to use
4346 pthread_sigmask etc. without copying signal sets around. Also,
4347 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
4348 'signal', and instead use functions that do not attempt to take
4349 over the system name space. This patch causes Emacs's text
4350 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
4351 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
4352 Do not include <signal.h> or "syssignal.h", as these
4353 modules do not use signals.
4354 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
4355 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
4356 Do not include <signal.h>, as "syssignal.h" does that for us now.
4357 * atimer.c (sigmask_atimers): New function.
4358 (block_atimers, unblock_atimers): New functions,
4359 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
4360 All uses replaced.
4361 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
4362 no longer needed here.
4363 * emacs.c (main): Inspect existing signal handler with sigaction,
4364 so that there's no need to block and unblock SIGHUP.
4365 * sysdep.c (struct save_signal): New member 'action', replacing
4366 old member 'handler'.
4367 (save_signal_handlers, restore_signal_handlers):
4368 Use sigaction instead of 'signal' to save and restore.
4369 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
4370 New function. All users of 'signal' modified to use set_sighandler
4371 if they're writeonly, and to use sys_signal if they're read+write.
4372 (emacs_sigaction_init, forwarded_signal): New functions.
4373 (sys_signal): Remove. All uses replaced by calls to sigaction
4374 and emacs_sigaction_init, or by direct calls to 'signal'.
4375 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
4376 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
4377 all uses replaced by pthread_sigmask etc. calls.
4378 * syssignal.h: Include <signal.h>.
4379 (emacs_sigaction_init, forwarded_signal): New decls.
4380 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
4381 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
4382 (sigmask, sys_sigmask): Remove; no longer needed.
4383 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
4384 (sigblock, sigunblock, sigfree):
4385 (sigsetmask) [!defined sigsetmask]:
4386 Remove. All uses replaced by pthread_sigmask.
4387 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
4388 no longer need to be replaced, and its typical old uses
4389 are now done via emacs_sigaction_init and sigaction.
4390 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
4391 (sys_sigdel): Remove; unused.
4392 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
4393
4394 2012-09-06 Eli Zaretskii <eliz@gnu.org>
4395
4396 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
4397 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
4398
4399 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4400
4401 Explicitly mark buffer_defaults and buffer_local_symbols.
4402 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
4403 mark_local_symbols here.
4404 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
4405 since special buffers aren't marked here any more.
4406 (allocate_buffer): Chain new buffer with all_buffers here...
4407 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
4408 not here.
4409 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
4410 (syms_of_buffer): Remove staticpro of the above.
4411 (init_buffer_once): Set names for buffer_defaults and
4412 buffer_local_symbols.
4413
4414 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
4415
4416 Use bool for booleans in font-related modules.
4417 * font.c (font_intern_prop, font_style_to_value)
4418 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
4419 (generate_otf_features, font_check_otf_features, font_check_otf)
4420 (font_match_p, font_list_entities, font_at):
4421 * fontset.c (fontset_id_valid_p, reorder_font_vector
4422 (fontset_find_font, Fset_fontset_font)
4423 (face_suitable_for_char_p) [0]:
4424 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
4425 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
4426 (m17n_flt_initialized, ftfont_shape_by_flt):
4427 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
4428 * nsfont.m (nsfont_draw):
4429 * w32font.c (w32font_draw):
4430 * w32term.c (x_draw_glyphless_glyph_string_foreground):
4431 Use bool for booleans.
4432 * font.h: Adjust to above API changes.
4433 (struct font, struct font_driver, struct font_driver_list):
4434 Use bool for booleans.
4435 (struct font): Remove useless member encoding_type.
4436 All users removed.
4437 * fontset.c, xftfont.c: Omit unnecessary static decls.
4438
4439 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4440
4441 * alloc.c (mark_object): Revert window marking code
4442 since it's unsafe for the Fset_window_configuration.
4443
4444 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4445
4446 Fix race conditions with signal handlers and errno (Bug#12327).
4447 Be more systematic about preserving errno whenever a signal
4448 handler returns, even if it's not in the main thread. Do this by
4449 renaming signal handlers to distinguish between signal delivery
4450 and signal handling. All uses changed.
4451 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
4452 * data.c (deliver_arith_signal): Rename from arith_error.
4453 * dispnew.c (deliver_window_change_signal): Rename from
4454 window_change_signal.
4455 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
4456 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
4457 * keyboard.c (deliver_input_available_signal): Rename from
4458 input_available_signal.
4459 (deliver_user_signal): Rename from handle_user_signal.
4460 (deliver_interrupt_signal): Rename from interrupt_signal.
4461 * process.c (deliver_pipe_signal): Rename from send_process_trap.
4462 (deliver_child_signal): Rename from sigchld_handler.
4463 * atimer.c (handle_alarm_signal):
4464 * data.c (handle_arith_signal):
4465 * dispnew.c (handle_window_change_signal):
4466 * emacs.c (handle_fatal_signal, handle_danger_signal):
4467 * keyboard.c (handle_input_available_signal):
4468 * keyboard.c (handle_user_signal, handle_interrupt_signal):
4469 * process.c (handle_pipe_signal, handle_child_signal):
4470 New functions, with the actual signal-handling code taken from the
4471 original respective signal handlers, sans the sporadic attempts to
4472 preserve errno, since that's now done by handle_on_main_thread.
4473 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
4474 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
4475 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4476 Move to sysdep.c.
4477 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4478 Move initialization of main_thread to sysdep.c's init_signals.
4479 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
4480 our usage, and simplifies the mainline code.
4481 (record_child_status_change): New static function, as a helper
4482 for handle_child_signal, and with most of the old child handler's
4483 contents.
4484 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
4485 (handle_child_signal): Use the above.
4486 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4487 Moved here from emacs.c.
4488 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
4489 code moved here from emacs.c's main function.
4490 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
4491 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
4492 This lets callers save and restore errno properly.
4493
4494 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4495
4496 Remove redundant or unused things here and there.
4497 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
4498 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
4499 * editfns.c (Fcompare_buffer_substrings): Likewise.
4500 * frame.h (struct terminal, struct font_driver_list):
4501 Remove redundant declarations.
4502 * window.h (Qleft, Qright): Likewise.
4503
4504 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4505
4506 Do not mark objects from deleted buffers, windows and frames.
4507 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
4508 (mark_object): Likewise for windows and frames.
4509
4510 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4511
4512 * alloc.c (valid_lisp_object_p): Treat killed buffers,
4513 buffer_defaults and buffer_local_symbols as valid objects.
4514 Return special value to denote them.
4515
4516 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4517
4518 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
4519 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
4520 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
4521 (file_name_absolute_p, Fsubstitute_in_file_name):
4522 (check_executable, check_writable, Ffile_accessible_directory_p)
4523 (Fset_file_selinux_context, Fdefault_file_modes)
4524 (Finsert_file_contents, choose_write_coding_system)
4525 (Fwrite_region, build_annotations, a_write, e_write)
4526 (Fdo_auto_save):
4527 * filelock.c (boot_time_initialized, get_boot_time)
4528 (get_boot_time_1, lock_file_1, within_one_second):
4529 * floatfns.c (in_float):
4530 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
4531 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
4532 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
4533 * lisp.h (struct Lisp_Hash_Table.cmpfn):
4534 * window.c (compare_window_configurations):
4535 Use bool for booleans.
4536 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
4537 (Fdefault_file_modes): Now mode_t, not int, for modes.
4538 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
4539 (internal_delete_file): Now returns void, not a (boolean) int,
4540 since nobody was looking at the return value.
4541 * lisp.h, window.h: Adjust to above API changes.
4542
4543 * xdisp.c (set_message): Simplify and reindent last change.
4544
4545 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
4546
4547 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
4548
4549 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
4550
4551 * eval.c (call_debugger): Make the function non-static so that we
4552 can call it from set_message.
4553
4554 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
4555 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
4556
4557 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4558
4559 Give more-useful info on a fatal error (Bug#12328).
4560 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
4561 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
4562 of doing the work ourselves.
4563 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
4564 do most of the work.
4565 (fatal_error_backtrace): New function, taken from the guts
4566 of the old fatal_error_signal, but with a new option to output
4567 a backtrace.
4568 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
4569 info about the signal than just its number.
4570 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
4571 * sysdep.c: Include <execinfo.h>
4572 (emacs_backtrace): New function, taken partly from the previous
4573 code of the 'die' function.
4574 (emacs_abort): Call fatal_error_backtrace rather than abort.
4575
4576 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
4577
4578 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
4579 eager (load-time) macro-expansion.
4580 * lisp.mk (lisp): Add macroexp.
4581
4582 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4583
4584 Simplify redefinition of 'abort' (Bug#12316).
4585 Do not try to redefine the 'abort' function. Instead, redo
4586 the code so that it calls 'emacs_abort' rather than 'abort'.
4587 This removes the need for the NO_ABORT configure-time macro
4588 and makes it easier to change the abort code to do a backtrace.
4589 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
4590 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
4591 Remove; sysdep.c's emacs_abort now takes its place.
4592 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
4593 'abort' changed to use 'emacs_abort'.
4594 * msdos.c (dos_abort) [defined abort]: Remove; not used.
4595 (abort) [!defined abort]: Rename to ...
4596 (emacs_abort): ... new name.
4597 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
4598 the place of the old 'abort' in emacs.c.
4599 * w32.c, w32fns.c (abort): Do not #undef.
4600 * w32.c (emacs_abort): Rename from w32_abort.
4601
4602 2012-09-04 Eli Zaretskii <eliz@gnu.org>
4603
4604 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
4605 offsets[j].dv, since the y axis of the screen coordinates points
4606 down, while the y axis of the font definition coordinates points
4607 up. This fixes display of Arabic diacritics such as KASRA and
4608 KASRATAN. (Bug#11860)
4609
4610 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4611
4612 Be more systematic about _setjmp vs setjmp.
4613 * alloc.c (test_setjmp, mark_stack):
4614 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
4615 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
4616 (png_load, my_error_exit, jpeg_load):
4617 * process.c (send_process_trap, send_process):
4618 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
4619 The underscored versions are up to 30x faster on some hosts.
4620 Formerly, the code used setjmp+longjmp sometimes and
4621 _setjmp+_longjmp at other times, with no particular reason to
4622 prefer setjmp+longjmp.
4623
4624 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 Fix minor problem found by static checking.
4627 * buffer.c (Fdelete_all_overlays): Return nil.
4628
4629 2012-09-03 Martin Rudalics <rudalics@gmx.at>
4630
4631 * buffer.c (Fdelete_all_overlays): New function.
4632
4633 2012-09-03 Chong Yidong <cyd@gnu.org>
4634
4635 * gtkutil.c: Add extern decl for Qxft.
4636
4637 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4638
4639 * emacs.c, eval.c: Use bool for boolean.
4640 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
4641 (malloc_using_checking) [DOUG_LEA_MALLOC]:
4642 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
4643 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
4644 (main, decode_env_path, Fdaemon_initialized):
4645 * eval.c (call_debugger, Finteractive_p, interactive_p):
4646 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
4647 (maybe_call_debugger, Fbacktrace):
4648 * process.c (read_process_output, exec_sentinel):
4649 Use bool for booleans.
4650 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
4651 All callers changed.
4652 * eval.c (interactive_p): Omit always-true boolean argument
4653 EXCLUDE_SUBRS_P. All callers changed.
4654 * dispextern.h, lisp.h: Reflect above API changes.
4655 * firstfile.c (dummy): Use the address of 'main', whose signature
4656 won't change, instead of the address of 'initialize', whose
4657 signature just changed from int to bool.
4658 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
4659 * msdos.c (fatal_error_in_progress): ... from here.
4660 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
4661 of incrementing it.
4662 (redisplay_internal, unwind_redisplay): Simply clear
4663 REDISPLAYING_P when unwinding, instead of saving its previous,
4664 always-false value and then restoring it.
4665
4666 Clean up some extern decls.
4667 Mostly, this hoists extern decls out of .c files and into .h files.
4668 That way, we're more likely to catch errors if the interfaces change.
4669 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
4670 declare xg_mark_data.
4671 * dispextern.h (x_frame_parm_handlers):
4672 * font.h (Qxft):
4673 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
4674 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
4675 (Qultra_bold, Qoblique, Qitalic):
4676 Move extern decl here from .c file.
4677 * alloc.c (xg_mark_data) [USE_GTK]:
4678 * doc.c (Qclosure):
4679 * eval.c (Qlexical_binding):
4680 * fns.c (time) [!HAVE_UNISTD_H]:
4681 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
4682 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
4683 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
4684 * lread.c (Qinternal_interpreter_environment):
4685 * minibuf.c (Qbuffer):
4686 * process.c (QCfamily, QCfilter):
4687 * widget.c (free_frame_faces):
4688 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
4689 * xfont.c (x_clear_errors):
4690 * xterm.c (x_frame_parm_handlers):
4691 Remove now-redundant extern decls.
4692 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
4693 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
4694 Now static.
4695 * xfaces.c: Remove unnecessary static decls.
4696 * xterm.c (updating_frame): Remove decl of nonexistent object.
4697
4698 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
4699 when building globals.h, as the objects that are not built on
4700 this host are not needed to compile C files on this host.
4701
4702 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
4703
4704 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
4705
4706 * frame.h: Add missing prototype for x_wm_set_size_hint.
4707
4708 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4709
4710 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
4711 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
4712 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
4713 (Fsubstitute_command_keys):
4714 * editfns.c (region_limit, find_field, Fconstrain_to_field)
4715 (save_excursion_save, save_excursion_restore)
4716 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
4717 (format_time_string, general_insert_function)
4718 (make_buffer_string, make_buffer_string_both)
4719 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
4720 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
4721 (copy_text, insert_1, insert_1_both, insert_from_string)
4722 (insert_from_string_before_markers, insert_from_string_1)
4723 (insert_from_buffer, insert_from_buffer_1, replace_range)
4724 (replace_range_2, del_range_1, del_range_byte, del_range_both)
4725 (del_range_2, modify_region):
4726 * intervals.c (intervals_equal, balance_possible_root_interval)
4727 (adjust_intervals_for_insertion, merge_properties_sticky)
4728 (graft_intervals_into_buffer, lookup_char_property)
4729 (adjust_for_invis_intang, set_point_both)
4730 (get_property_and_range, compare_string_intervals)
4731 (set_intervals_multibyte_1, set_intervals_multibyte):
4732 * keyboard.c (decode_timer):
4733 Use bool for boolean.
4734 * intervals.h, lisp.h, systime.h: Reflect above API changes.
4735 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
4736
4737 2012-09-02 Chong Yidong <cyd@gnu.org>
4738
4739 * keymap.c (push_key_description): Print M-TAB as C-M-i
4740 (Bug#11758).
4741
4742 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
4743
4744 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
4745 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
4746 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
4747 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
4748 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
4749 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
4750 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
4751
4752 2012-09-01 Eli Zaretskii <eliz@gnu.org>
4753
4754 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
4755 more than one grapheme cluster passed to the shaper: compute the
4756 offset adjustment values separately for each cluster. (Bug#11860)
4757
4758 * image.c: Restore mistakenly removed inclusion of w32.h. Without
4759 it, GCC doesn't see prototypes of w32_delayed_load, and complains
4760 about implicit conversions from integer to pointer.
4761
4762 2012-09-01 Daniel Colascione <dancol@dancol.org>
4763
4764 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
4765 system used too early.
4766
4767 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
4768
4769 Better seed support for (random).
4770 * emacs.c (main): Call init_random.
4771 * fns.c (Frandom): Set the seed from a string argument, if given.
4772 Remove long-obsolete Gentzel cruft.
4773 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
4774 (init_random): New function.
4775
4776 2012-09-01 Daniel Colascione <dancol@dancol.org>
4777
4778 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
4779 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
4780 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
4781 x_wm_set_size_hint, x_query_colors, x_real_positions,
4782 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
4783 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
4784 all of which have been moved to common code.
4785
4786 * xfaces.c: Include TERM_HEADER instead of listing all possible
4787 window-system headers.
4788
4789 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
4790 to match header.
4791
4792 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
4793 directly accessing frame internals.
4794
4795 * w32font.h: Include font.h. Define syms_of_w32font and
4796 globals_of_w32font.
4797
4798 * process.c: Include TERM_HEADER instead of listing all possible
4799 window-system headers.
4800
4801 * nsterm.h: Remove declarations now in frame.h.
4802 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
4803
4804 * menu.c: Include TERM_HEADER instead of listing all possible
4805 window-system headers.
4806
4807 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
4808 window system.
4809
4810 * keyboard.c: Include TERM_HEADER instead of listing all possible
4811 window-system headers.
4812
4813 * image.c: Include TERM_HEADER instead of listing all possible
4814 window-system headers. Declare Vlibrary_cache when compiling for
4815 Windows.
4816
4817 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
4818 window system declarations.
4819
4820 * frame.h: Move common functions here: set_frame_menubar,
4821 x_set_window_size, x_sync, x_get_focus_frame,
4822 x_set_mouse_position, x_set_mouse_pixel_position,
4823 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
4824 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
4825 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
4826 x_activate_menubar, x_real_positions, x_bitmap_icon,
4827 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
4828 and x_query_colors.
4829
4830 * frame.c: Include TERM_HEADER instead of listing all possible
4831 window-system headers.
4832
4833 * font.c: Include TERM_HEADER instead of listing all possible
4834 window-system headers.
4835
4836 * emacs.c: Include TERM_HEADER.
4837
4838 * dispnew.c: Include TERM_HEADER instead of listing all possible
4839 window-system headers.
4840
4841 * ccl.h: Include character.h.
4842
4843 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
4844 the current window system; include in list of objects to link into
4845 Emacs.
4846
4847 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4848
4849 Remove mark_ttys function and fix tty_display_info initialization.
4850 * lisp.h (mark_ttys): Remove prototype.
4851 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
4852 to mark_ttys because all possible values of 'top_frame' slot are
4853 the frames which are reachable from Vframe_list.
4854 * term.c (mark_ttys): Remove.
4855 (init_tty): Safely initialize 'top_frame' slot with Qnil.
4856
4857 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4858
4859 Change struct frame bitfields from unsigned char to unsigned.
4860 * frame.h (struct frame): Change type of 'display_preempted',
4861 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
4862 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
4863 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
4864 bitfields from unsigned char to unsigned.
4865
4866 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4867
4868 Remove unused member of struct x_output and struct w32_output.
4869 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
4870 * w32term.h (struct w32_output): Likewise.
4871
4872 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
4873
4874 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
4875 does not become zero (Bug#12234).
4876
4877 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
4878
4879 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
4880 for GCC 4.7.1 x86-64.
4881
4882 2012-08-30 Glenn Morris <rgm@gnu.org>
4883
4884 * lread.c (init_lread): For out-of-tree builds, only add the
4885 source directory's site-lisp dir to the load-path if it exists,
4886 consistent with in-tree builds. (Bug#12302)
4887
4888 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
4889
4890 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
4891 button_values to NULL. Call setStykeMask so dialogs get a close button.
4892 (windowShouldClose:): Set window_closed.
4893 (dealloc): New member, free button_values.
4894 (process_dialog:): Make member function. Remove window argument,
4895 replace window with self. Count buttons and allocate and store values
4896 in button_values.
4897 (addButton:value:row:): value is int with the name tag. Call setTag
4898 with tag. Remove return self, declare return value as void.
4899 (addString:row:): Remove return self, declare return value as void.
4900 (addSplit): Remove return self, declare return value as void.
4901 (clicked:): Remove return self, declare return value as void.
4902 Set dialog_return to button_values[seltag]. Code formatting change.
4903 (initFromContents:isQuestion:): Adjust call to process_dialog.
4904 Code formatting change.
4905 (timeout_handler:): Set timer_fired to YES.
4906 (runDialogAt:): Set timer_fired to NO.
4907 Handle click on close button as quit.
4908
4909 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
4910 Add window_closed and button_values. Add void as return value for
4911 add(Button|String|Split). addButton takes int instead of Lisp_Object.
4912 Add process_dialog as new member.
4913
4914 2012-08-28 Eli Zaretskii <eliz@gnu.org>
4915
4916 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
4917 is not one of the heaps we manage. (Bug#12242)
4918
4919 2012-08-28 Glenn Morris <rgm@gnu.org>
4920
4921 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
4922
4923 2012-08-28 Martin Rudalics <rudalics@gmx.at>
4924
4925 * window.c (Fset_window_configuration): Remove handling of
4926 auto-buffer-name window parameter. Install revision of reverted
4927 fix.
4928
4929 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4930
4931 Do not allow to set major mode for a dead buffer.
4932 * buffer.c (Fset_buffer_major_mode): Signal an error
4933 if the buffer is dead.
4934 (Fother_buffer, other_buffer_safely): Remove redundant
4935 nested declaration.
4936
4937 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4938
4939 Always use set_buffer_if_live to restore original buffer at unwind.
4940 * buffer.h (record_unwind_current_buffer): New function.
4941 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
4942 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
4943 * undo.c, window.c: Adjust users.
4944 * buffer.c (set_buffer_if_live): Fix comment.
4945
4946 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4947
4948 Fix usage of set_buffer_internal.
4949 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
4950 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
4951 * coding.c (decode_coding): Omit redundant test.
4952 * fileio.c (decide_coding_unwind): Likewise.
4953 * fns.c (secure_hash): Likewise.
4954 * insdel.c (modify_region): Likewise.
4955 * keyboard.c (command_loop_1): Likewise.
4956 * print.c (PRINTFINISH): Likewise.
4957 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
4958
4959 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
4960
4961 * dispnew.c: Use bool for boolean.
4962 (frame_garbaged, display_completed, delayed_size_change)
4963 (fonts_changed_p, add_window_display_history)
4964 (add_frame_display_history, verify_row_hash)
4965 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
4966 (row_equal_p, realloc_glyph_pool)
4967 (allocate_matrices_for_frame_redisplay)
4968 (showing_window_margins_p)
4969 (adjust_frame_glyphs_for_frame_redisplay)
4970 (build_frame_matrix_from_leaf_window, make_current)
4971 (mirrored_line_dance, mirror_line_dance, update_frame)
4972 (update_window_tree, update_single_window)
4973 (check_current_matrix_flags, update_window, update_text_area)
4974 (update_window_line, set_window_update_flags, scrolling_window)
4975 (update_frame_1, scrolling, buffer_posn_from_coords)
4976 (do_pending_window_change, change_frame_size)
4977 (change_frame_size_1, sit_for):
4978 Use bool for boolean.
4979 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
4980 and remove last int (actually boolean) argument, which was always 0.
4981 All callers changed.
4982 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
4983 * dispextern.h (struct composition_it): Use bool for boolean.
4984 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
4985 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
4986 * dired.c (file_name_completion):
4987 Use bool for boolean. (This was missed in an earlier change.)
4988
4989 2012-08-27 Martin Rudalics <rudalics@gmx.at>
4990
4991 * window.c (Fset_window_configuration): Revert first part of
4992 last change.
4993
4994 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
4995
4996 * nsterm.h (NSPanel): New class variable dialog_return.
4997
4998 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
4999 Initialize dialog_return.
5000 (windowShouldClose:): Use stop instead of stopModalWithCode.
5001 (clicked:): Ditto, and also set dialog_return (Bug#12258).
5002 (timeout_handler:): Use stop instead of abortModal. Send a dummy
5003 event.
5004 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
5005 modal loop returns.
5006
5007 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
5008
5009 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
5010 * composite.c (find_composition, composition_gstring_p)
5011 (composition_reseat_it, find_automatic_composition):
5012 * data.c (let_shadows_buffer_binding_p)
5013 (let_shadows_global_binding_p, set_internal, make_blv)
5014 (Fmake_variable_buffer_local, Fmake_local_variable)
5015 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
5016 (cons_to_signed, arith_driver):
5017 * dbusbind.c (xd_in_read_queued_messages):
5018 * dired.c (directory_files_internal, file_name_completion):
5019 Use bool for booleans.
5020 * dired.c (file_name_completion):
5021 * process.h (fd_callback):
5022 Omit int (actually boolean) argument. It wasn't being used.
5023 All uses changed.
5024 * composite.h, lisp.h: Reflect above API changes.
5025
5026 * cmds.c, coding.c: Use bool for booleans.
5027 * cmds.c (move_point, Fself_insert_command):
5028 * coding.h (struct composition status, struct coding_system):
5029 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
5030 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
5031 (emacs_mule_char, decode_coding_emacs_mule)
5032 (encode_coding_emacs_mule, detect_coding_iso_2022)
5033 (decode_coding_iso_2022, encode_invocation_designation)
5034 (encode_designation_at_bol, encode_coding_iso_2022)
5035 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
5036 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
5037 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
5038 (encode_coding_raw_text, detect_coding_charset)
5039 (decode_coding_charset, encode_coding_charset, detect_eol)
5040 (detect_coding, get_translation_table, produce_chars)
5041 (consume_chars, reused_workbuf_in_use)
5042 (make_conversion_work_buffer, code_conversion_save)
5043 (decode_coding_object, encode_coding_object)
5044 (detect_coding_system, char_encodable_p)
5045 (Funencodable_char_position, code_convert_region)
5046 (code_convert_string, code_convert_string_norecord)
5047 (Fset_coding_system_priority):
5048 * fileio.c (Finsert_file_contents):
5049 Use bool for booleans.
5050 * coding.h, lisp.h: Reflect above API changes.
5051 * coding.c: Remove unnecessary static function decls.
5052 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
5053 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
5054 not a boolean 'int', since callers never look at the return value.
5055 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
5056 * coding.h (decoding_buffer_size, encoding_buffer_size)
5057 (emacs_mule_string_char): Remove unused extern decls.
5058 (struct iso_2022_spec, struct coding_system):
5059 Use 'unsigned int : 1' for boolean fields, since there's more than one.
5060 (struct emacs_mule_spec): Remove unused field 'full_support'.
5061 All initializations removed.
5062 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
5063
5064 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5065
5066 Fix spare memory change (Bug#12286).
5067 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
5068 (valid_lisp_object_p): Likewise.
5069
5070 2012-08-27 Martin Rudalics <rudalics@gmx.at>
5071
5072 * window.c (Fset_window_configuration): Record any window's old
5073 buffer if it's replaced (see Bug#8789). If the new current
5074 buffer doesn't appear in the selected window, go to its old
5075 point (Bug#12208).
5076
5077 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5078
5079 Special MEM_TYPE_SPARE to denote reserved memory.
5080 * alloc.c (enum mem_type): New memory type.
5081 (refill_memory_reserve): Use new type for spare memory.
5082 This prevents live_cons_p and live_string_p from incorrect
5083 detection of uninitialized objects from spare memory as live.
5084
5085 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
5086
5087 Spelling fixes.
5088 * Makefile.in (.PHONY): versioclean -> versionclean.
5089
5090 Remove unused external symbols.
5091 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
5092 * window.c (Qwindow_valid_p, decode_valid_window):
5093 Now static, not extern.
5094 * data.c (Qinterval): Remove; unused.
5095 (syms_of_data): Do not define 'interval'.
5096 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
5097 * window.h (decode_valid_window):
5098 Remove decls.
5099
5100 * character.c, charset.c, chartab.c: Use bool for booleans.
5101 * character.c (lisp_string_width, string_count_byte8)
5102 (string_escape_byte8):
5103 * charset.c (charset_map_loaded, load_charset_map, read_hex):
5104 (load_charset_map_from_file, map_charset_chars)
5105 (Fdefine_charset_internal, define_charset_internal)
5106 (Fdeclare_equiv_charset, find_charsets_in_text)
5107 (Ffind_charset_region, char_charset, Fiso_charset):
5108 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
5109 (sub_char_table_set, sub_char_table_set_range)
5110 (char_table_set_range, optimize_sub_char_table)
5111 (map_sub_char_table):
5112 Use bool for boolean.
5113 * character.c (str_to_unibyte): Omit last boolean argument; it was
5114 always 0. All callers changed.
5115 * character.h, charset.h: Adjust to match previous changes.
5116 * character.h (char_printable_p): Remove decl of nonexistent function.
5117 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
5118 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
5119 are all boolean, so make them single-bit bitfields.
5120
5121 * lisp.h (ASET): Remove attempt to detect side effects.
5122 It was meant to be temporary and it often doesn't work,
5123 because when IDX has side effects the behavior of IDX==IDX
5124 is undefined. See Stefan Monnier in
5125 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
5126
5127 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
5128
5129 * lisp.h (functionp): New function (extracted from Ffunctionp).
5130 (FUNCTIONP): Use it.
5131 * eval.c (Ffunctionp): Use it.
5132
5133 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
5134
5135 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
5136 as that's faster and simpler than static storage. Don't bother
5137 with the g_main_context_query overhead if g_main_context_pending
5138 says no events are pending.
5139 (gfds, gfds_size): Remove these static vars.
5140 (xgselect_initialize): Remove; no longer needed.
5141 All uses and decls removed.
5142
5143 * emacs.c (fatal_error_signal_hook): Remove.
5144 All uses removed. This leftover from old code was always 0.
5145
5146 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
5147 * casefiddle.c (casify_object, casify_region):
5148 * casetab.c (set_case_table):
5149 * category.c, category.h (word_boundary_p):
5150 * category.h (CHAR_HAS_CATEGORY):
5151 Use bool for booleans, instead of int.
5152
5153 2012-08-25 Eli Zaretskii <eliz@gnu.org>
5154
5155 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
5156
5157 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
5158
5159 On assertion failure, print backtrace if available.
5160 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
5161 (die) [ENABLE_CHECKING]: Print a backtrace if available.
5162 * Makefile.in (LIB_EXECINFO): New macro.
5163 (LIBES): Use it.
5164
5165 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
5166 * bytecode.c (exec_byte_code):
5167 * callint.c (check_mark, Fcall_interactively):
5168 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
5169 (getenv_internal, sync_process_alive, call_process_exited):
5170 * lisp.h (USE_SAFE_ALLOCA):
5171 Use bool for booleans, instead of int.
5172 * lisp.h, process.h: Adjust prototypes to match above changes.
5173 * callint.c (Fcall_interactively): Don't assume the mark's
5174 offset fits in 'int'.
5175
5176 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
5177
5178 * buffer.c, buffer.h: Use bool for boolean.
5179 * buffer.c (reset_buffer_local_variables)
5180 (buffer_lisp_local_variables, Fset_buffer_modified_p)
5181 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
5182 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
5183 (overlay_touches_p, overlay_strings, Foverlay_put)
5184 (report_overlay_modification, call_overlay_mod_hooks):
5185 (mmap_enlarge, mmap_set_vars):
5186 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
5187 Use bool for booleans, instead of int.
5188 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
5189 since the 1-or-0 return value is always ignored anyway.
5190 (mmap_initialized_p):
5191 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
5192 * buffer.h, lisp.h: Adjust prototypes to match above changes.
5193
5194 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
5195
5196 * bidi.c: Use bool for boolean.
5197 This is a bit more readable, and makes the text segment of bidi.o
5198 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
5199 Presumably it's faster too.
5200 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
5201 Now bool.
5202 (bidi_cache_find_level_change, bidi_cache_iterator_state)
5203 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
5204 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
5205 (bidi_explicit_dir_char, bidi_level_of_next_char)
5206 (bidi_find_other_level_edge, bidi_move_to_visually_next):
5207 Use bool for booleans, instead of int.
5208 * dispextern.h (bidi_init_it, bidi_paragraph_init)
5209 (bidi_unshelve_cache): Adjust decls to match code.
5210
5211 2012-08-23 Martin Rudalics <rudalics@gmx.at>
5212
5213 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
5214 argument.
5215
5216 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
5217
5218 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
5219 * atimer.h: Include <stdbool.h>.
5220
5221 2012-08-22 Dan Nicolaescu <dann@gnu.org>
5222
5223 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
5224 compile time tests instead of run time tests on systems that do
5225 not use them.
5226 (FRAME_MAC_P): Remove leftover from deleted code.
5227 * frame.c (syms_of_frame): Remove leftover from deleted code.
5228
5229 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
5230
5231 * nsterm.m (insertText:): Don't clear modifiers if code is space.
5232
5233 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
5234
5235 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
5236 Otherwise, the compiler complains about (A?B:C) where B is void
5237 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
5238 (fontset_add): Return void, for FONTSET_ADD.
5239
5240 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
5241
5242 * alloc.c: Use bool for booleans.
5243 (gc_in_progress, abort_on_gc)
5244 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
5245 (dont_register_blocks) [GC_MALLOC_CHECK]:
5246 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
5247 (check_string_bytes, make_specified_string, memory_full)
5248 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
5249 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
5250 (mark_stack, valid_pointer_p, make_pure_string)
5251 (Fgarbage_collect, survives_gc_p, gc_sweep):
5252 Use bool for booleans, instead of int.
5253 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
5254 Remove unused local.
5255 * alloc.c (PURE_POINTER_P):
5256 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
5257 * editfns.c (Fformat):
5258 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
5259 (Fdo_auto_save):
5260 * fns.c (sweep_weak_table):
5261 * lisp.h (suppress_checking, push_message, survives_gc_p)
5262 (make_pure_string, gc_in_progress, abort_on_gc):
5263 * lread.c (readchar, read1):
5264 * print.c (Fprin1_to_string):
5265 * xdisp.c (push_message):
5266 Use bool for booleans affected directly or indirectly by
5267 alloc.c's changes.
5268
5269 Make recently-introduced setters macros.
5270 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
5271 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
5272 (set_fontset_default, set_fontset_fallback): Rename from their
5273 upper-case counterparts, and make them functions rather than macros.
5274 This is more consistent with the other recently-introduced setters.
5275 These don't need to be inline, since they're local.
5276
5277 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
5278
5279 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
5280 the loop (Bug#12247).
5281
5282 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
5283
5284 * lisp.h (vcopy): Use memcpy rather than our own loop.
5285 This fixes a performance regression introduced by the recent
5286 addition of vcopy. This means 'vcopy' will need to be modified
5287 for a copying collector, but that's OK. Also, tighten the
5288 checking in the assertion.
5289
5290 2012-08-21 Eli Zaretskii <eliz@gnu.org>
5291
5292 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
5293 components for RTL text (Bug#11860). Adjust X-OFFSET of each
5294 non-base glyph for the width of the base character, according to
5295 what x_draw_composite_glyph_string_foreground expects.
5296 Generate WADJUST value according to composition_gstring_width's
5297 expectations, to produce correct width of the composed character.
5298 Reverse the sign of the DU offset produced by ScriptPlace.
5299
5300 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
5301
5302 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
5303
5304 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
5305
5306 Avoid direct writes to contents member of struct Lisp_Vector.
5307 * lisp.h (vcopy): New function to copy data into vector.
5308 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
5309 * fns.c (Ffillarray): Use ASET.
5310 * keyboard.c (timer_check_2): Use AREF and ASET.
5311 (append_tool_bar_item, Frecent_keys): Use vcopy.
5312 * lread.c (read_vector): Use ASET.
5313 * msdos.c (Frecent_doskeys): Use vcopy.
5314 * xface.c (Finternal_copy_lisp_face): Use vcopy.
5315 (Finternal_merge_in_global_face): Use ASET and vcopy.
5316 * xfont.c (xfont_list_pattern): Likewise.
5317
5318 2012-08-21 Martin Rudalics <rudalics@gmx.at>
5319
5320 * window.c (Fwindow_point): For the selected window always return
5321 the position of its buffer's point.
5322 (Fset_window_point): For the selected window always go in its
5323 buffer to the specified position.
5324
5325 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
5326
5327 Setter macros for fontsets.
5328 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
5329 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
5330 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
5331 Adjust users.
5332
5333 2012-08-20 Glenn Morris <rgm@gnu.org>
5334
5335 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
5336 Don't assume that `ln -f' works.
5337
5338 2012-08-20 Eli Zaretskii <eliz@gnu.org>
5339
5340 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
5341 and later about non-assignments with no effect. See discussion at
5342 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
5343 details.
5344
5345 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
5346
5347 Inline setter functions for Lisp_Objects slots of struct specbinding.
5348 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
5349 Adjust users.
5350
5351 2012-08-20 Martin Rudalics <rudalics@gmx.at>
5352
5353 * window.c (select_window): Always make selected window's buffer
5354 current.
5355
5356 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
5357
5358 Use AREF and ASET for docstrings of category tables.
5359 * category.h (CATEGORY_DOCSTRING): Use AREF.
5360 (SET_CATEGORY_DOCSTRING): Use ASET.
5361 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
5362
5363 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
5364
5365 Inline setter functions for hash table members.
5366 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
5367 (set_hash_hash, set_hash_index): Rename with _slot suffix.
5368 (set_hash_key_and_value, set_hash_index, set_hash_next)
5369 (set_hash_hash): New functions.
5370 * charset.c, fns.c: Adjust users.
5371
5372 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
5373
5374 Inline getter and setter functions for per-buffer values.
5375 * buffer.h (per_buffer_default, set_per_buffer_default)
5376 (per_buffer_value, set_per_buffer_value): New functions.
5377 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
5378 * buffer.c, data.c: Adjust users.
5379
5380 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
5381
5382 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
5383
5384 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
5385
5386 Rely on <config.h> + <unistd.h> to declare 'environ',
5387 as gnulib does this if the system doesn't.
5388 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
5389 Remove declaration. MS-Windows declares it on stdlib.h which is
5390 included by conf_post.h.
5391 * emacs.c (environ) [DOUG_LEA_MALLOC]:
5392 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
5393 * vm-limit.c: Include <unistd.h>, for 'environ'.
5394
5395 * unexaix.c, unexcoff.c: Include "mem-limits.h".
5396 (start_of_data): Remove decl; mem-limits.h provides it.
5397
5398 * xdisp.c (handle_invisible_prop): Make it a bit faster
5399 and avoid a gcc -Wmaybe-uninitialized diagnostic.
5400
5401 2012-08-19 Chong Yidong <cyd@gnu.org>
5402
5403 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
5404 ends (Bug#3874).
5405
5406 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
5407
5408 * .gdbinit: Use call instead of set when calling a function in the
5409 inferior.
5410
5411 * data.c (set_internal): Don't use set_blv_found.
5412 (Fkill_local_variable): Likewise.
5413
5414 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
5415
5416 * nsfont.m (ns_ascii_average_width): Ensure the string
5417 ascii_printable is initialized with a null-terminated character
5418 array. Otherwise, it can contain undesired extra characters.
5419
5420 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
5421
5422 port new setting code to Sun C 5.8 2005/10/13
5423 * chartab.c, lisp.h (char_table_set, char_table_set_range):
5424 Return void, not Lisp_Object. Otherwise, the compiler
5425 complains about (A?B:C) where B is void and C is Lisp_Object
5426 when compiling CHAR_TABLE_SET, due to the recent change to
5427 the API of sub_char_table_set_contents.
5428
5429 2012-08-18 Chong Yidong <cyd@gnu.org>
5430
5431 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
5432 for the string case (Bug#3874).
5433
5434 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
5435
5436 * buffer.h (BSET): Remove (Bug#12215).
5437 Replace all uses with calls to new setter functions.
5438 (bset_bidi_paragraph_direction, bset_case_canon_table)
5439 (bset_case_eqv_table, bset_directory, bset_display_count)
5440 (bset_display_time, bset_downcase_table)
5441 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
5442 (bset_last_selected_window, bset_local_var_alist)
5443 (bset_mark_active, bset_point_before_scroll, bset_read_only)
5444 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
5445 (bset_width_table):
5446 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
5447 (bset_auto_fill_function, bset_auto_save_file_format)
5448 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
5449 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
5450 (bset_cache_long_line_scans, bset_case_fold_search)
5451 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
5452 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
5453 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
5454 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
5455 (bset_header_line_format, bset_indicate_buffer_boundaries)
5456 (bset_indicate_empty_lines, bset_invisibility_spec)
5457 (bset_left_fringe_width, bset_major_mode, bset_mark)
5458 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
5459 (bset_name, bset_overwrite_mode, bset_pt_marker)
5460 (bset_right_fringe_width, bset_save_length)
5461 (bset_scroll_bar_width, bset_scroll_down_aggressively)
5462 (bset_scroll_up_aggressively, bset_selective_display)
5463 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
5464 (bset_word_wrap, bset_zv_marker):
5465 * category.c (bset_category_table):
5466 * syntax.c (bset_syntax_table):
5467 New setter functions.
5468
5469 * process.h (PSET): Remove (Bug#12215).
5470 Replace all uses with calls to new setter functions.
5471 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5472 (PROCESS_INLINE): New macro.
5473 (pset_childp): New setter function.
5474 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
5475 * process.c (PROCESS_INLINE):
5476 Define to EXTERN_INLINE, so that the corresponding functions
5477 are compiled into code.
5478 (pset_buffer, pset_command, pset_decode_coding_system)
5479 (pset_decoding_buf, pset_encode_coding_system)
5480 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
5481 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
5482 (pset_type, pset_write_queue): New setter functions.
5483
5484 * window.h (WSET): Remove (Bug#12215).
5485 Replace all uses with calls to new setter functions.
5486 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5487 (WINDOW_INLINE): New macro.
5488 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
5489 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
5490 (wset_total_lines, wset_vertical_scroll_bar)
5491 (wset_window_end_pos, wset_window_end_valid)
5492 (wset_window_end_vpos): New setter functions.
5493 * window.c (WINDOW_INLINE):
5494 Define to EXTERN_INLINE, so that the corresponding functions
5495 are compiled into code.
5496 (wset_combination_limit, wset_dedicated, wset_display_table)
5497 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
5498 (wset_new_normal, wset_new_total, wset_next_buffers)
5499 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
5500 (wset_prev_buffers, wset_right_fringe_width)
5501 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
5502 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
5503 (wset_window_parameters):
5504 * xdisp.c (wset_base_line_number, wset_base_line_pos)
5505 (wset_column_number_displayed, wset_region_showing):
5506 New setter functions.
5507
5508 * termhooks.h (TSET): Remove (Bug#12215).
5509 Replace all uses with calls to new setter functions.
5510 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5511 (TERMHOOKS_INLINE): New macro.
5512 (tset_charset_list, tset_selection_alist): New setter functions.
5513 * terminal.c (TERMHOOKS_INLINE):
5514 Define to EXTERN_INLINE, so that the corresponding functions
5515 are compiled into code.
5516 (tset_param_alist): New setter function.
5517
5518 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
5519
5520 * keyboard.h (KSET): Remove (Bug#12215).
5521 Replace all uses with calls to new setter functions.
5522 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5523 (KEYBOARD_INLINE): New macro.
5524 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
5525 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
5526 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
5527 New setter functions.
5528 * keyboard.c (KEYBOARD_INLINE):
5529 Define to EXTERN_INLINE, so that the corresponding functions
5530 are compiled into code.
5531 (kset_echo_string, kset_kbd_queue)
5532 (kset_keyboard_translate_table, kset_last_prefix_arg)
5533 (kset_last_repeatable_command, kset_local_function_key_map)
5534 (kset_overriding_terminal_local_map, kset_real_last_command)
5535 (kset_system_key_syms): New setter functions.
5536
5537 * frame.h (FSET): Remove (Bug#12215).
5538 Replace all uses with calls to new setter functions.
5539 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5540 (FRAME_INLINE): New macro.
5541 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
5542 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
5543 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
5544 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
5545 (fset_param_alist, fset_root_window, fset_scroll_bars)
5546 (fset_selected_window, fset_title, fset_tool_bar_items)
5547 (fset_tool_bar_position, fset_tool_bar_window): New functions.
5548 * frame.c (FRAME_INLINE):
5549 Define to EXTERN_INLINE, so that the corresponding functions
5550 are compiled into code.
5551 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
5552
5553 A few more naming-convention fixes for getters and setters.
5554 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
5555 and rename from buffer_overlays_set_before.
5556 (set_buffer_overlays_after): Move here from buffer.h, and rename
5557 from buffer_overlays_set_after.
5558 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
5559 All uses changed.
5560 (set_buffer_intervals): Rename from buffer_set_intervals.
5561 * intervals.c (set_interval_object): Move here from intervals.h,
5562 and rename from interval_set_object.
5563 (set_interval_left): Move here from intervals.h, and rename from
5564 interval_set_left.
5565 (set_interval_right): Move here from intervals.h, and rename from
5566 interval_set_right.
5567 (copy_interval_parent): Move here from intervals.h, and rename from
5568 interval_copy_parent.
5569 * intervals.h (set_interval_parent): Rename from interval_set_parent.
5570 (set_interval_plist): Rename from interval_set_plist.
5571 Return void, not Lisp_Object, since no caller uses the result.
5572 * lisp.h (string_intervals): Rename from string_get_intervals.
5573 (set_string_intervals): Rename from string_set_intervals.
5574
5575 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
5576 (set_char_table_contents): Rename from char_table_set_contents.
5577 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
5578 All uses changed. See the end of
5579 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
5580
5581 * lisp.h (CSET): Remove (Bug#12215).
5582 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
5583 (set_char_table_purpose): New functions,
5584 replacing CSET. All uses changed. For example, replace
5585 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
5586 "set_char_table_parent (char_table, parent);".
5587 The old version was confusing because it used the same name
5588 'parent' for two different things.
5589
5590 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5591
5592 Functions to get and set Lisp_Object fields of buffer-local variables.
5593 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
5594 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
5595 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
5596 * data.c, eval.c, frame.c: Adjust users.
5597
5598 2012-08-17 Chong Yidong <cyd@gnu.org>
5599
5600 * xfaces.c (merge_face_vectors): If the target font specfies a
5601 font spec, make the font's attributes take precedence over
5602 directly-specified attributes.
5603 (merge_face_ref): Recognize :font.
5604
5605 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5606
5607 Do not use memcpy for copying intervals.
5608 * intervals.c (reproduce_interval): New function.
5609 (reproduce_tree, reproduce_tree_obj): Use it.
5610 (reproduce_tree_obj): Remove prototype.
5611
5612 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 * lisp.h (duration_to_sec_usec): Remove unused decl.
5615
5616 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
5617
5618 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
5619 to an allocated instance of NSString, not to the class itself.
5620
5621 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
5622
5623 * makefile.w32-in (C_CTYPE_H): New macro.
5624 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
5625 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
5626 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
5627
5628 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
5629
5630 Use ASCII tests for character types.
5631 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
5632 * xfns.c, xterm.c:
5633 Don't include <ctype.h>; was not needed.
5634 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
5635 * sysdep.c, xfaces.c:
5636 Include <c-ctype.h> instead of <ctype.h>.
5637 * nsterm.m: Include <c-ctype.h>.
5638 * charset.c (read_hex):
5639 * doc.c (Fsnarf_documentation):
5640 * fileio.c (IS_DRIVE) [WINDOWSNT]:
5641 (DRIVE_LETTER) [DOS_NT]:
5642 (Ffile_name_directory, Fexpand_file_name)
5643 (Fsubstitute_in_file_name):
5644 * font.c (font_parse_xlfd, font_parse_fcname):
5645 * frame.c (x_set_font_backend):
5646 * gtkutil.c (xg_get_font):
5647 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
5648 * nsimage.m (hexchar):
5649 * nsterm.m (ns_xlfd_to_fontname):
5650 * sysdep.c (system_process_attributes):
5651 * xfaces.c (hash_string_case_insensitive):
5652 Use C-locale tests instead of locale-specific tests for character
5653 types, since we want the ASCII interpretation here, not the
5654 interpretation suitable for whatever happens to be the current locale.
5655
5656 2012-08-16 Martin Rudalics <rudalics@gmx.at>
5657
5658 Consistently check windows for validity/liveness
5659 (Bug#11984, Bug#12025, Bug#12026).
5660 * lisp.h (CHECK_VALID_WINDOW): New macro.
5661 * window.c (decode_window): Rename to decode_live_window.
5662 (decode_valid_window, Fwindow_valid_p): New functions.
5663 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
5664 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
5665 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
5666 (Fwindow_prev_sibling, Fwindow_combination_limit)
5667 (Fset_window_combination_limit, Fwindow_use_time)
5668 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
5669 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
5670 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
5671 (Fwindow_hscroll, Fset_window_hscroll)
5672 (Fwindow_redisplay_end_trigger)
5673 (Fset_window_redisplay_end_trigger, Fwindow_edges)
5674 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
5675 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
5676 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
5677 (Fwindow_end, Fset_window_point, Fset_window_start)
5678 (Fpos_visible_in_window_p, Fwindow_line_height)
5679 (Fwindow_dedicated_p, Fset_window_dedicated_p)
5680 (Fwindow_prev_buffers, Fset_window_prev_buffers)
5681 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
5682 (Fset_window_parameter, Fwindow_display_table)
5683 (Fset_window_display_table, Fdelete_other_windows_internal)
5684 (Fset_window_buffer, Fset_window_new_total)
5685 (Fset_window_new_normal, Fdelete_window_internal)
5686 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
5687 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
5688 (Fwindow_scroll_bars): Check whether argument window is a valid or
5689 live window. Update doc-strings.
5690 (syms_of_window): New symbol Qwindow_valid_p.
5691 * keyboard.c (Fposn_at_x_y): Check whether argument
5692 frame_or_window denotes a valid window.
5693
5694 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5695
5696 Fix previous char table change.
5697 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
5698 * chartab.c (optimize_sub_char_table): Likewise.
5699
5700 2012-08-16 Chong Yidong <cyd@gnu.org>
5701
5702 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
5703
5704 * xfont.c (xfont_open):
5705 * xftfont.c (xftfont_open): Set the font's max_width field.
5706
5707 * nsfont.m (nsfont_open): Similar to the Xft backend, set
5708 min_width to space_width and average_width to the average over
5709 printable ASCII characters.
5710 (ns_char_width): Code cleanup.
5711 (ns_ascii_average_width): New utility function.
5712
5713 * font.h (struct font): Update comments.
5714
5715 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5716
5717 Simple interface to set Lisp_Object fields of character tables.
5718 * lisp.h (CSET): New macro.
5719 (char_table_set_extras, char_table_set_contents)
5720 (sub_char_table_set_contents): New function.
5721 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
5722 * syntax.c: Adjust users.
5723
5724 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
5725
5726 * eval.c (eval_sub): Bind lexical-binding.
5727 * lread.c (Qlexical_binding): Make non-static.
5728
5729 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
5730
5731 * nsmenu.m (popupSession): Remove.
5732 (pop_down_menu): Remove endModalSession.
5733 (timeout_handler:): New method.
5734 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
5735 Call runModalForWindow. Check timer_fired when it returns.
5736 If not set, cancel timer and break out of loop.
5737 Otherwise loop again, with a new timeout.
5738
5739 * nsterm.m: Include fcntl.h if present.
5740 (fd_entry, t_readfds, inNsSelect): Remove.
5741 (select_writefds, select_valid, select_timeout, selfds)
5742 (select_mutex, apploopnr): Add.
5743 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
5744 Otherwise call kbd_buffer_store_event.
5745 (ns_send_appdefined): Remove release of fd_entry.
5746 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
5747 Increment and decrement apploopnr.
5748 (ns_select): If no file descriptors, just do a NSTimer.
5749 Otherwise copy read/write masks and start select thread (fd_handler).
5750 Start main loop and wait for application defined event.
5751 Inform select thread to stop selecting after main loop is exited.
5752 (ns_term_init): Create selfds pipe and set non-blocking.
5753 Initialize select_mutex. Start the select thread (fd_handler).
5754 (fd_handler:): Loop forever, wait for info from the main thread
5755 to either start or stop selecting. When select returns, send
5756 and appdefined event.
5757 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
5758 If not call kbd_buffer_store_event.
5759
5760 * nsterm.h (EmacsApp): fd_handler takes id argument.
5761 (EmacsDialogPanel): Add timer_fired and timeout_handler.
5762
5763 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
5764
5765 2012-08-15 Eli Zaretskii <eliz@gnu.org>
5766
5767 * region-cache.c (move_cache_gap): Update gap_len using the actual
5768 growth of the boundaries array. Do not change cache_len.
5769 (Bug#12196)
5770
5771 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5772
5773 Generalize and cleanup font subsystem checks.
5774 * font.h (FONT_DEBUG, font_assert): Remove.
5775 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
5776 Change font_assert to eassert. Use eassert where appropriate.
5777
5778 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5779
5780 * gtkutil.c (xg_get_font): Use pango_units_to_double.
5781
5782 2012-08-15 Chong Yidong <cyd@gnu.org>
5783
5784 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
5785 When using the new font chooser, use gtk_font_chooser_get_font_desc to
5786 extract the font descriptor instead of just the font name.
5787 In that case, return a font spec instead of a string.
5788 (x_last_font_name): Move to this file from xfns.c.
5789
5790 * xfns.c (Fx_select_font): The return value can also be a font
5791 spec. Move x_last_font_name management to gtkutil.c.
5792
5793 * xfaces.c: Make font weight and style symbols non-static.
5794
5795 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
5796
5797 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
5798 (bug#12117).
5799
5800 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
5801
5802 * alloc.c (Fgarbage_collect): Use plural form consistently.
5803
5804 2012-08-14 Eli Zaretskii <eliz@gnu.org>
5805
5806 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
5807 iteration through the command loop. Fixes a problem whereby mouse
5808 movements are ignored until the first mouse click.
5809
5810 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5811
5812 Use bool, not int, for Lisp booleans.
5813 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
5814 makes Emacs a bit smaller and presumably a bit faster.
5815 * lisp.h: Include <stdbool.h>.
5816 (struct Lisp_Boolfwd, defvar_bool):
5817 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
5818 * regex.c [!emacs]: Include <stdbool.h>.
5819 (false, true): Remove; <stdbool.h> does this for us now.
5820
5821 2012-08-14 Chong Yidong <cyd@gnu.org>
5822
5823 * character.c (Fcharacterp): Doc fix (Bug#12076).
5824
5825 * data.c (Findirect_variable): Doc fix (Bug#11040).
5826
5827 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
5828
5829 * editfns.c (Fformat): Doc fix (Bug#12059).
5830 (Fsave_current_buffer): Doc fix (Bug#11542).
5831
5832 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
5833
5834 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
5835 (bug#12022).
5836
5837 2012-08-14 Martin Rudalics <rudalics@gmx.at>
5838
5839 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
5840 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5841 * minibuf.c (choose_minibuf_frame, read_minibuf):
5842 * w32fns.c (x_create_tip_frame):
5843 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
5844 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
5845
5846 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5847
5848 * intervals.c (offset_intervals): Remove obsolete comment.
5849
5850 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
5851
5852 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
5853
5854 2012-08-14 Gergely Risko <gergely@risko.hu>
5855
5856 * coding.c (decode_coding): Record buffer modification before
5857 disabling undo_list (Bug#11773).
5858
5859 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5860
5861 Revert and cleanup some recent overlay changes.
5862 * buffer.h (enum overlay_type): Remove.
5863 (buffer_get_overlays, buffer_set_overlays): Likewise.
5864 (buffer_set_overlays_before, buffer_set_overlays_after):
5865 New function. Adjust users.
5866 (unchain_both): Add eassert.
5867
5868 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5869
5870 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
5871
5872 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5873
5874 * gtkutil.c (xg_mark_data): Don't assume C99.
5875
5876 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
5877
5878 * gtkutil.c (xg_frame_tb_info): New struct.
5879 (TB_INFO_KEY): New define.
5880 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
5881 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
5882 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
5883 if not present.
5884 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
5885 is up to date. Otherwise store new data.
5886 (free_frame_tool_bar): Free xg_frame_tb_info if present.
5887
5888 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5889
5890 Use KSET for write access to Lisp_Object members of struct kboard.
5891 * keyboard.h (KSET): New macro.
5892 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
5893 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
5894 * xterm.c: Adjust users.
5895
5896 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5897
5898 Use BSET for write access to Lisp_Object members of struct buffer.
5899 * buffer.h (BSET): New macro.
5900 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
5901 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
5902 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
5903 * window.c, xdisp.c, xfns.c: Adjust users.
5904
5905 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
5906
5907 * lread.c (syms_of_lread): Initialize Vlexical_binding.
5908
5909 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
5910
5911 * nsterm.m (not_in_argv): New function.
5912 (application:openFile, application:openTempFile:):
5913 (application:openFileWithoutUI:, application:openFiles:): Open file
5914 if not_in_argv returns non-zero (bug#12171).
5915
5916 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
5917 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
5918 Define for Gtk+ versions less than 3.2.
5919 (xg_get_font_name): Use those functions/macros here.
5920 Reported by Frans Oilinki <moilinki@gmail.com>.
5921
5922 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5923
5924 * unexmacosx.c (copy_data_segment): Copy initialized data in
5925 statically linked libraries from input file rather than memory.
5926
5927 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
5928 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
5929 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
5930
5931 2012-08-10 Glenn Morris <rgm@gnu.org>
5932
5933 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
5934 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
5935
5936 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5937
5938 Fix last change to allow compilation with low optimization levels.
5939 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
5940 Reported by Jan Djärv <jan.h.d@swipnet.se>.
5941
5942 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5943
5944 Use common inline syntax in intervals.h.
5945 * intervals.h (INTERVALS_INLINE): New macro.
5946 Change all users from LISP_INLINE.
5947
5948 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5949
5950 Define Qnone once for all platforms.
5951 * frame.c (Qnone): Define here.
5952 (syms_of_frame): DEFSYM it.
5953 * lisp.h (Qnone): New declaration.
5954 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
5955 * xfns.c: Remove duplication. Adjust users.
5956
5957 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5958
5959 Remove unused macros from intervals.h.
5960 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
5961 * intervals.c: Adjust comment.
5962
5963 2012-08-10 Eli Zaretskii <eliz@gnu.org>
5964
5965 * w32fns.c <w32_unicode_gui>: New static variable.
5966 (globals_of_w32fns): Initialize it according to os_subtype.
5967 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
5968 testing os_subtype.
5969
5970 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
5971 Eli Zaretskii <eliz@gnu.org>
5972
5973 Fix bug #10299 with Unicode characters sent by customized
5974 keyboards created by MSKLC.
5975 * w32fns.c (INIT_WINDOW_CLASS): New macro.
5976 (w32_init_class): Use it to initialize the Emacs class with either
5977 ANSI or Unicode API calls.
5978 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
5979 later.
5980 (w32_wnd_proc): If the character code sent by WM_CHAR or
5981 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
5982 original message. Call DefWindowProcW on NT and later.
5983
5984 2012-08-10 Glenn Morris <rgm@gnu.org>
5985
5986 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
5987
5988 * lisp.h (DIRECTORY_SEP): Let configure set it.
5989
5990 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
5991
5992 Use TSET for write access to Lisp_Object slots of struct terminal.
5993 * termhooks.h (TSET): New macro.
5994 * coding.c, terminal.c, xselect.c: Adjust users.
5995
5996 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
5997
5998 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
5999 the failing expression, include them in the error message.
6000 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
6001 * lisp.h (internal_condition_case_n): Update declaration.
6002
6003 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6004
6005 Inline functions to examine and change buffer overlays.
6006 * buffer.c (unchain_both): New function.
6007 * buffer.h (buffer_get_overlays, buffer_set_overlays):
6008 (buffer_has_overlays): New function.
6009 (enum overlay_type): New enum.
6010 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
6011 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
6012
6013 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6014
6015 Inline functions to examine and change buffer intervals.
6016 * alloc.c (mark_interval_tree): Remove.
6017 (MARK_INTERVAL_TREE): Simplify.
6018 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
6019 * intervals.c (buffer_balance_intervals): New function.
6020 (graft_intervals_into_buffer): Adjust indentation.
6021 (set_intervals_multibyte): Simplify.
6022 * buffer.h (BUF_INTERVALS): Remove.
6023 (buffer_get_intervals, buffer_set_intervals): New function.
6024 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
6025 * intervals.c, textprop.c: Adjust users.
6026
6027 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6028
6029 Inline functions to examine and change string intervals.
6030 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
6031 (string_get_intervals, string_set_intervals): New function.
6032 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
6033 * lread.c, print.c, textprop.c: Adjust users.
6034
6035 2012-08-08 Glenn Morris <rgm@gnu.org>
6036
6037 * lisp.mk (lisp): Remove language/persian.elc.
6038
6039 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6040
6041 Cleanup intervals.
6042 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
6043 (NULL_INTERVAL_P): Likewise. Adjust users.
6044 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
6045 Adjust comment. Move under #if 0.
6046 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
6047 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
6048
6049 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6050
6051 Check total length of intervals with eassert.
6052 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
6053 * intervals.c: Change all users to eassert.
6054
6055 2012-08-07 Eli Zaretskii <eliz@gnu.org>
6056
6057 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
6058 Rename fields to match removal of FGET and WGET and disuse of
6059 INTERNAL_FIELD in Lisp_Cons.
6060
6061 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6062
6063 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
6064 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
6065 name since all xname users are fixed long time ago. Do not
6066 use INTERNAL_FIELD.
6067 (set_symbol_name, set_symbol_function, set_symbol_plist):
6068 (set_symbol_next, set_overlay_plist): New function.
6069 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
6070 (struct Lisp_Overlay): Likewise.
6071 (CVAR, MVAR, SVAR): Remove.
6072 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
6073 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
6074 * xterm.c: Adjust users.
6075 * .gdbinit: Change to use name field of struct Lisp_Symbol
6076 where appropriate.
6077
6078 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6079
6080 Basic functions to set Lisp_Object and pointer slots of intervals.
6081 * intervals.h (interval_set_parent, interval_set_object):
6082 (interval_set_left, interval_set_right, interval_set_plist):
6083 (interval_copy_parent): New function.
6084 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
6085 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
6086 Adjust indentation.
6087 (INTERVAL_SIZE): Remove. Adjust users.
6088 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
6089
6090 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6091
6092 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
6093 * process.h (PGET): Remove.
6094 (struct Lisp_Process): Do not use INTERNAL_FIELD.
6095 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
6096
6097 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6098
6099 Drop WGET and revert read access to Lisp_Objects slots of struct window.
6100 * window.h (WGET): Remove.
6101 (struct window): Do not use INTERNAL_FIELD.
6102 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
6103 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
6104 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
6105 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
6106 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
6107 Adjust users.
6108
6109 2012-08-07 Chong Yidong <cyd@gnu.org>
6110
6111 * window.c (Fwindow_edges, Fwindow_pixel_edges)
6112 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
6113 (Fdelete_window_internal): Signal an error if the window is not on
6114 a live frame (Bug#12025).
6115
6116 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6117
6118 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
6119 * frame.h (FGET): Remove.
6120 (struct frame): Do not use INTERNAL_FIELD.
6121 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
6122 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
6123 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
6124 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
6125
6126 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
6127
6128 * w32.c: Silence compiler warnings.
6129 (map_w32_filename): Remove unused variable `is_fat'.
6130 (chase_symlinks): Add parentheses around expression.
6131
6132 2012-08-06 Glenn Morris <rgm@gnu.org>
6133
6134 * sysdep.c: Respect BROKEN_GETWD.
6135
6136 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
6137 Let configure handle it.
6138 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
6139
6140 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6141
6142 Use GCALIGNMENT where appropriate.
6143 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
6144 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
6145 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
6146
6147 2012-08-06 Eli Zaretskii <eliz@gnu.org>
6148
6149 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
6150 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
6151
6152 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
6153
6154 * buffer.h (struct buffer): Revert `indirections' to a simple int;
6155 that should be sufficient for everyone.
6156
6157 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
6158
6159 * keyboard.c (timer_check_2): Add break so timer_check returns next
6160 timeout.
6161
6162 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6163
6164 Fix Windows build errors introduced after converting to WGET and WSET.
6165 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
6166 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
6167
6168 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
6169
6170 * nsterm.m (ns_frame_rehighlight): Use FSET.
6171
6172 * nsmenu.m (ns_update_menubar): Use FSET.
6173
6174 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6175
6176 Separate read and write access to Lisp_Object slots of Lisp_Process.
6177 * process.h (PGET, PSET): New macros similar to AREF and ASET.
6178 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
6179
6180 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6181
6182 Separate read and write access to Lisp_Object slots of struct window.
6183 * window.h (WGET, WSET): New macros similar to AREF and ASET.
6184 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
6185 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
6186 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
6187 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
6188 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
6189 Adjust users.
6190
6191 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6192
6193 Fix Windows build errors introduced after converting to FGET and FSET.
6194 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
6195 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
6196 (w32_judge_scroll_bars): Change to use FSET.
6197 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
6198
6199 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6200
6201 Fix replacement typo.
6202 * window.c (replace_window): Set root_window instead of
6203 selected_window. This fixes a total window subsystem
6204 malfunction reported by Bastien Guerry <bzg@gnu.org>.
6205
6206 2012-08-06 Glenn Morris <rgm@gnu.org>
6207
6208 * lisp.mk (lisp): Add language/persian.elc.
6209
6210 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6211
6212 Separate read and write access to Lisp_Object slots of struct frame.
6213 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
6214 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
6215 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
6216 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
6217 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
6218
6219 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
6220
6221 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
6222
6223 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
6224
6225 Generalize common compile-time constants.
6226 * lisp.h (header_size, bool_header_size, word_size): Now here.
6227 (struct Lisp_Vector): Add comment.
6228 (struct Lisp_Bool_Vector): Move up to define handy constants.
6229 (VECSIZE, PSEUDOVECSIZE): Simplify.
6230 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
6231 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
6232 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
6233 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
6234 * xfont.c, xmenu.c: Use word_size where appropriate.
6235
6236 2012-08-05 Lawrence Mitchell <wence@gmx.li>
6237
6238 * search.c (Freplace_match): Treat \? in the replacement text
6239 literally (Bug#8161).
6240
6241 2012-08-05 Chong Yidong <cyd@gnu.org>
6242
6243 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
6244 * frame.c (Vdelete_frame_functions):
6245 * emacs.c (Vkill_emacs_hook): Doc fix.
6246
6247 2012-08-04 Eli Zaretskii <eliz@gnu.org>
6248
6249 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
6250 --with-x-toolkit=no builds.
6251 Reported by Carsten Mattner <carstenmattner@gmail.com>.
6252
6253 2012-08-04 Chong Yidong <cyd@gnu.org>
6254
6255 * syntax.c (Fmodify_syntax_entry): Doc fix.
6256
6257 2012-08-04 Eli Zaretskii <eliz@gnu.org>
6258
6259 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
6260 * w32.c (init_environment): Change the default values of many
6261 environment variables in dflt_envvars[] to NULL, to avoid pushing
6262 them into environment when they were not already defined.
6263 Remove the code that deletes site-lisp subdirectories from the default
6264 value of EMACSLOADPATH, as it is no longer needed.
6265 (check_windows_init_file): Now external, not static.
6266 Use Vload_path as is, without adding anything, as this function is now
6267 called when Vload_path is already set up.
6268
6269 * w32.h (check_windows_init_file): Add prototype.
6270
6271 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
6272 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
6273 compatibility with Posix platforms.
6274 (main): Move the call to check_windows_init_file to here from
6275 w32.c.
6276 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
6277 any, in the DEFALT argument into the root of the Emacs build or
6278 installation tree, as appropriate.
6279
6280 * callproc.c (init_callproc_1): Call decode_env_path instead of
6281 doing its equivalent by hand.
6282 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
6283 the code that sets Vexec_path run on MS-Windows.
6284
6285 * lread.c (init_lread): Add comments to #ifdef's.
6286
6287 * msdos.c (dos_set_window_size, IT_update_begin)
6288 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
6289 instead of direct references.
6290
6291 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
6292
6293 Export DEFAULT_REHASH_* to GDB.
6294 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
6295 Now constants, not macros.
6296
6297 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
6298
6299 Remove unnecessary casts involving pointers.
6300 These casts are no longer needed now that we assume C89 or later,
6301 since they involve casting to or from void *.
6302 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
6303 (make_pure_float, make_pure_vector):
6304 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
6305 * macros.c (Fstart_kbd_macro):
6306 * menu.c (find_and_return_menu_selection):
6307 * minibuf.c (read_minibuf_noninteractive):
6308 * sysdep.c (closedir):
6309 * xdisp.c (x_produce_glyphs):
6310 * xfaces.c (compare_fonts_by_sort_order):
6311 * xfns.c (x_real_positions, select_visual):
6312 * xselect.c (x_stop_queuing_selection_requests)
6313 (x_get_window_property, x_get_window_property_as_lisp_data):
6314 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
6315 Remove unnecessary pointer casts.
6316 * alloc.c (record_xmalloc): New function.
6317 * lisp.h (record_xmalloc): New decl.
6318 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
6319 more like a function. This is because the pointer cast is not
6320 needed. All uses changed.
6321 * print.c (print_string, print_error_message): Avoid length recalc.
6322
6323 Improve fix for macroexp crash with debugging (Bug#12118).
6324 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
6325 ARRAY_MARK_FLAG when checking subscripts, because ASET is
6326 not supposed to be invoked from the garbage collector.
6327 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
6328 (gc_aset): New function, which is like ASET but can be
6329 used in the garbage collector.
6330 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
6331 (set_hash_index): Use it instead of ASET.
6332
6333 2012-08-03 Eli Zaretskii <eliz@gnu.org>
6334
6335 Support symlinks on latest versions of MS-Windows.
6336 * w32.c: Include winioctl.h and aclapi.h.
6337 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
6338 (revert_to_self): Forward declarations of static functions.
6339 <static BOOL g_b_init_get_security_info>:
6340 <g_b_init_create_symbolic_link>: New static flags.
6341 (globals_of_w32): Initialize them to zero.
6342 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
6343 (map_w32_filename): Improve commentary. Simplify switch.
6344 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
6345 headers (most versions of MinGW w32api don't).
6346 (get_security_info, create_symbolic_link)
6347 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
6348 New functions.
6349 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
6350 in the argument file name.
6351 (sys_access): Call unc_volume_file_attributes only if
6352 GetFileAttributes fails with network-related error codes.
6353 (sys_rename): Diagnose renaming of a symlink when the user doesn't
6354 have the required privileges.
6355 (get_file_security_desc_by_name): Rename from
6356 get_file_security_desc.
6357 (stat_worker): New function, with most of the guts of 'stat', and
6358 with addition of handling of symlinks and support for 'lstat'.
6359 If possible, get file's attributes and security information by
6360 handle, not by name. Produce S_IFLNK bit for symlinks, when
6361 called from 'lstat'.
6362 (stat, lstat): New functions, call 'stat_worker'.
6363 (symlink, readlink, careadlinkat): Rewritten to create and resolve
6364 symlinks when the underlying filesystem supports them.
6365
6366 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
6367
6368 Fix macroexp crash on Windows with debugging (Bug#12118).
6369 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
6370 checking subscripts; problem introduced with the recent
6371 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
6372 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
6373 since it's used in non-static inline functions now.
6374
6375 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
6376 Don't assume buffer size fits in 'int'. Remove unused local.
6377
6378 Use C99-style 'extern inline' if available.
6379 * buffer.h (BUFFER_INLINE):
6380 * category.h (CATEGORY_INLINE):
6381 * character.h (CHARACTER_INLINE):
6382 * charset.h (CHARSET_INLINE):
6383 * composite.h (COMPOSITE_INLINE):
6384 * dispextern.h (DISPEXTERN_INLINE):
6385 * lisp.h (LISP_INLINE):
6386 * systime.h (SYSTIME_INLINE):
6387 New macro, replacing 'static inline' in this header.
6388 * buffer.h, category.h, character.h, charset.h, composite.h:
6389 * dispextern.h, lisp.h, systime.h:
6390 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
6391 * alloc.c (LISP_INLINE):
6392 * buffer.c (BUFFER_INLINE):
6393 * category.c (CATEGORY_INLINE):
6394 * character.c (CHARACTER_INLINE):
6395 * charset.c (CHARSET_INLINE):
6396 * composite.c (COMPOSITE_INLINE):
6397 * dispnew.c (DISPEXTERN_INLINE):
6398 * sysdep.c (SYSTIME_INLINE):
6399 Define to EXTERN_INLINE, so that the corresponding functions
6400 are compiled into code.
6401 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
6402 (INLINE_HEADER_END): New macros.
6403 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
6404 since it's used in non-static inline functions now.
6405 (VALMASK) [!USE_LSB_TAG]: Likewise.
6406
6407 2012-08-02 Glenn Morris <rgm@gnu.org>
6408
6409 * s/: Remove empty directory.
6410
6411 * s/ms-w32.h: Move to ../nt/inc.
6412 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
6413 Update for new ms-w32.h location.
6414
6415 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
6416
6417 Port to Solaris 8.
6418 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
6419
6420 2012-08-02 Glenn Morris <rgm@gnu.org>
6421
6422 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
6423 hard-coding the path separator.
6424
6425 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
6426
6427 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
6428 This how ASET and AREF are supposed to work, and makes
6429 it easier to think about future improvements. See
6430 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
6431 * charset.h (set_charset_attr): New function.
6432 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
6433 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
6434 (aref_addr): New function. All uses of &AREF(...) changed.
6435 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
6436 (set_hash_index): New functions. All lvalue-style uses of
6437 HASH_KEY etc. changed.
6438 * keyboard.c (set_prop): New function. All lvalue-style uses
6439 of PROP changed.
6440
6441 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
6442
6443 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
6444 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
6445 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
6446 * nsfns.m (ns_set_name_as_filename): Likewise.
6447 * nsmenu.m (ns_update_menubar): Likewise.
6448 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
6449
6450 2012-08-01 Eli Zaretskii <eliz@gnu.org>
6451
6452 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
6453 Adapt to latest changes in field names of the corresponding Lisp
6454 objects.
6455
6456 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
6457
6458 2012-08-01 Glenn Morris <rgm@gnu.org>
6459
6460 * s/msdos.h: Remove file.
6461 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
6462 * Makefile.in (S_FILE): Remove.
6463 (config_h): Remove S_FILE.
6464
6465 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
6466
6467 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
6468 Remove; moved to nt/config.nt.
6469
6470 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6471
6472 Use INTERNAL_FIELD for conses and overlays.
6473 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
6474 Remove obsolete comment.
6475 (MVAR): New macro.
6476 (struct Lisp_Overlay): Use INTERNAL_FIELD.
6477 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
6478
6479 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6480
6481 Use INTERNAL_FIELD for symbols.
6482 * lisp.h (SVAR): New macro. Adjust users.
6483 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
6484 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
6485
6486 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6487
6488 Use INTERNAL_FIELD for processes.
6489 * process.h (PVAR): New macro. Adjust style.
6490 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
6491 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
6492
6493 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6494
6495 Use INTERNAL_FIELD for windows.
6496 * window.h (WVAR): New macro.
6497 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
6498 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
6499 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
6500 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
6501 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
6502 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
6503
6504 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
6505
6506 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
6507
6508 2012-08-01 Glenn Morris <rgm@gnu.org>
6509
6510 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
6511 Move to configure.ac.
6512
6513 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
6514
6515 * makefile.w32-in (CONFIG_H): Update dependencies.
6516 (CONF_POST_H): New macro.
6517
6518 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
6519
6520 2012-07-31 Glenn Morris <rgm@gnu.org>
6521
6522 * Makefile.in (S_FILE): No longer set by configure.
6523
6524 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
6525 is available.
6526 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
6527
6528 * process.h (NULL_DEVICE):
6529 * emacs.c (SEPCHAR):
6530 * editfns.c (USER_FULL_NAME): Let configure set them.
6531
6532 * s/README, s/template.h: Remove files.
6533
6534 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
6535
6536 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
6537 Move to configure.ac.
6538
6539 2012-07-31 Eli Zaretskii <eliz@gnu.org>
6540
6541 * .gdbinit (xframe): Adapt to introduction of FVAR and the
6542 resulting renaming of 'struct frame' members.
6543
6544 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
6545
6546 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
6547 after introduction of FVAR.
6548
6549 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
6550
6551 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
6552
6553 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
6554 instead of compositeToPoint.
6555 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
6556
6557 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
6558
6559 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6560
6561 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
6562 * lisp.h (INTERNAL_FIELD): New macro.
6563 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
6564 (BVAR): Change to use INTERNAL_FIELD.
6565 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
6566 (KVAR): Change to use INTERNAL_FIELD.
6567 * frame.h (FVAR): New macro.
6568 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
6569 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
6570 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
6571 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
6572 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
6573
6574 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6575
6576 Miscellaneous fixes for non-default X toolkits.
6577 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
6578 * xterm.c (x_frame_of_widget): Remove redundant prototype.
6579 Move under #ifdef USE_LUCID.
6580 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
6581 definition and usage to avoid warnings.
6582
6583 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
6584
6585 * nsterm.m (openFiles): Fix previous checkin.
6586
6587 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
6588
6589 * indent.c (compute_motion): Remove unused local.
6590
6591 2012-07-31 Glenn Morris <rgm@gnu.org>
6592
6593 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
6594
6595 * conf_post.h [USG5_4]:
6596 Move remaining contents of s/usg5-4-common.h here.
6597 * s/usg5-4-common.h: Remove file.
6598
6599 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
6600 * s/irix6-5.h: Remove file.
6601
6602 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
6603 * s/darwin.h: Remove file.
6604
6605 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
6606 * s/hpux10-20.h: Remove file, which is now empty.
6607
6608 2012-07-30 Glenn Morris <rgm@gnu.org>
6609
6610 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
6611 * Makefile.in (config_h): Add conf_post.h.
6612 * makefile.w32-in (CONFIG_H): Add conf_post.h.
6613
6614 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
6615
6616 * nsterm.m (ns_do_open_file): New variable.
6617 (ns_term_init): Set ns_do_open_file to YES after run returns.
6618 (openFile, openTempFile, openFileWithoutUI, openFiles):
6619 Open files only if ns_do_open_file.
6620
6621 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6622
6623 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
6624 This no-op macro hasn't been needed for many years.
6625 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
6626
6627 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
6628 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
6629 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
6630 gdb_make_enums_visible.
6631 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
6632 (DIRECTORY_SEP): Now a constant, not a macro.
6633
6634 2012-07-30 Eli Zaretskii <eliz@gnu.org>
6635
6636 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
6637 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
6638
6639 * w32term.c <w32_keyboard_codepage>: Renamed from
6640 keyboard_codepage and now external. All users changed.
6641
6642 * w32term.h: Add declaration of w32_keyboard_codepage.
6643
6644 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
6645 the codepage to translate keys to Unicode. If this argument is
6646 -1, use the value returned by GetConsoleCP. All callers changed.
6647
6648 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6649
6650 Update .PHONY listings in makefiles.
6651 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
6652 bootstrap-clean, distclean, maintainer-clean, versioclean,
6653 extraclean, frc.
6654
6655 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
6656 This is a bit clearer. Fix some commentary typos.
6657
6658 2012-07-30 Glenn Morris <rgm@gnu.org>
6659
6660 * s/netbsd.h: Let configure include signal.h if needed.
6661 Remove file, which is now empty.
6662
6663 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
6664 Let configure set them.
6665 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
6666 No more need to undefine.
6667
6668 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
6669
6670 * keymap.c (Fkey_description): Don't remove 0x80 bit from
6671 non-single-byte char when adding meta modifier. (Bug#12090)
6672
6673 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6674
6675 Convert safe_call to use variable number of arguments.
6676 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
6677 (safe_call2): Fix comment.
6678 * lisp.h (safe_call): Adjust prototype.
6679 * coding.c (encode_coding_object): Change to use safe_call2.
6680 * xfaces.c (merge_face_heights): Change to use safe_call1.
6681
6682 2012-07-30 Glenn Morris <rgm@gnu.org>
6683
6684 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
6685 does that unconditionally. Remove file, which is now empty.
6686
6687 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
6688 Remove empty files.
6689
6690 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6691
6692 Export to GDB most of lisp.h's remaining object-like macros.
6693 * lisp.h (min, max): Move earlier, because they're used earlier now.
6694 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
6695 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
6696 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
6697 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
6698 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
6699 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
6700 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
6701 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
6702 Now constants, for GDB. They need not be macros.
6703 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
6704 Now constants, for GDB, as well as macros, for static initializers.
6705 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
6706 Move to after the definition of struct Lisp_Char_Table,
6707 since the former now needs that type defined.
6708 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
6709 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
6710 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
6711 New enums, for gdb_make_enums_visible.
6712 (GLYPH_MODE_LINE_FACE): Remove; unused.
6713 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
6714 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
6715 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
6716 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
6717 enum maxargs, enum MAX_ALLOCA.
6718 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
6719 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
6720 no longer needed, now that they are done in lisp.h.
6721
6722 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6723
6724 Cleanup string bytes checking.
6725 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
6726 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
6727 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
6728 (check_sblock, compact_small_strings): Simplify.
6729
6730 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
6733 These macros are confusing and no longer need to be defined, as
6734 the enum values now suffice. All uses replaced with definiens.
6735 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
6736
6737 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
6738
6739 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
6740 ($(BLD)/w32console.$(O)): Update dependencies.
6741
6742 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6743
6744 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
6745 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
6746 time. Adjust users.
6747 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
6748
6749 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
6750
6751 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
6752 setting sitelisp (Bug#12010).
6753
6754 2012-07-29 Eli Zaretskii <eliz@gnu.org>
6755
6756 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
6757
6758 * w32heap.c (cache_system_info):
6759 * w32.c (sys_rename):
6760 * w32proc.c (find_child_console, sys_kill): All users changed.
6761
6762 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6763
6764 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
6765
6766 2012-07-29 Eli Zaretskii <eliz@gnu.org>
6767
6768 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
6769
6770 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6771
6772 Cleanup statistics calculation in Fgarbage_collect.
6773 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
6774 Fix zombies percentage calculation. Simplify elapsed time calculation.
6775
6776 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6777
6778 Generalize marker debugging code under MARKER_DEBUG and use eassert.
6779 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
6780 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
6781 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
6782 (replace_range, replace_range_2, del_range_2): Change to eassert.
6783 * marker.c (byte_char_debug_check): Adjust style.
6784
6785 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6786
6787 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
6788 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
6789 long-ago-commented-out code that talks about "WIN32".
6790 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
6791 All uses changed.
6792
6793 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
6794
6795 Use Gnulib stdalign module (Bug#9772, Bug#9960).
6796 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
6797 Simplify by using alignof.
6798 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
6799 * lisp.h: Include <stdalign.h>.
6800 (GCALIGNMENT): New macro and constant.
6801 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
6802 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
6803 (stdalign): New macro, if not already defined.
6804
6805 2012-07-28 Eli Zaretskii <eliz@gnu.org>
6806
6807 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
6808 * w32inevt.c: Include w32inevt.h.
6809 (w32_read_console_input): New inline function, calls either
6810 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
6811 w32_console_unicode_input.
6812 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
6813 (w32_kbd_patch_key, key_event): Use the codepage returned by
6814 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
6815 (key_event): use uChar.UnicodeChar only if
6816 w32_console_unicode_input is non-zero.
6817
6818 * w32console.c: Include w32heap.h.
6819 <w32_console_unicode_input>: New global variable.
6820 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
6821 family of Windows, zero otherwise.
6822
6823 * w32inevt.h: Declare w32_console_unicode_input.
6824
6825 * xdisp.c (init_iterator): Don't reference tip_frame in a build
6826 --without-x. (Bug#11742)
6827
6828 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6829
6830 Adjust GDB to reflect pvec_type changes (Bug#12036).
6831 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
6832 2012-07-04 changes to pseudovector representation.
6833 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
6834
6835 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
6836
6837 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
6838 bus address.
6839 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
6840
6841 2012-07-27 Eli Zaretskii <eliz@gnu.org>
6842
6843 * alloc.c (listn): Fix the order the arguments are consed onto the
6844 list.
6845
6846 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
6847 enumeration constants, as PURE and HEAP are too general, and clash
6848 with other headers and sources, such as gmalloc.c and the
6849 MS-Windows system headers. All users changed.
6850
6851 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6852
6853 Revert last save_excursion_save and save_excursion_restore changes.
6854 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
6855 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
6856
6857 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6858
6859 Fix recently-introduced typos in Windows port.
6860 Reported by Martin Rudalics <rudalics@gmx.at>.
6861 * w32.c (init_environment): Replace comma with semicolon.
6862 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
6863
6864 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6865
6866 Improve GDB symbol export (Bug#12036).
6867 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
6868 arms of an 'if', not using conditional expressions; otherwise GDB
6869 complains about the types in the unevaluated arm when the argument
6870 is an integer literal.
6871 (xgetint): Simplify expression.
6872 * alloc.c (gdb_make_enums_visible): New constant. This ports to
6873 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
6874 Zaretskii in <http://bugs.gnu.org/12036#13>.
6875 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
6876 needed now that we have gdb_make_enums_visible.
6877 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
6878 (enum enum_USE_LSB_TAG):
6879 New enum types, packaging up enums that need to be exported to GDB.
6880
6881 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6882
6883 Utility function to make a list from specified amount of objects.
6884 * lisp.h (enum constype): New datatype.
6885 (listn): New prototype.
6886 * alloc.c (listn): New function.
6887 (Fmemory_use_count, syms_of_alloc): Use it.
6888 * buffer.c (syms_of_buffer): Likewise.
6889 * callint.c (syms_of_callint): Likewise.
6890 * charset.c (define_charset_internal): Likewise.
6891 * coding.c (syms_of_coding): Likewise.
6892 * keymap.c (syms_of_keymap): Likewise.
6893 * search.c (syms_of_search): Likewise.
6894 * syntax.c (syms_of_syntax): Likewise.
6895 * w32.c (init_environment): Likewise.
6896 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
6897 * xdisp.c (syms_of_xdisp): Likewise.
6898 * xfns.c (syms_of_xfns): Likewise.
6899
6900 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6901
6902 Fast save_excursion_save and save_excursion_restore.
6903 * lisp.h (struct Lisp_Excursion): New data type.
6904 (PVEC_EXCURSION): New pseudovector type.
6905 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
6906 to deal with it. Adjust comments.
6907 (init_marker, attach_marker): New prototype.
6908 (unchain_marker): Adjust prototype.
6909 * marker.c (attach_marker): Change to global.
6910 (init_marker): New function.
6911 * alloc.c (Fmake_marker, build_marker): Use it.
6912 (build_marker): More easserts.
6913 (mark_object): Handle struct Lisp_Excursion.
6914 * editfns.c (save_excursion_save, save_excursion_restore):
6915 Reimplement to use struct Lisp_Excursion. Add comments.
6916
6917 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6918
6919 Fix export of symbols to GDB (Bug#12036).
6920 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
6921 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
6922 emacs.c, as this is a more-suitable home. Had this been done earlier
6923 the fix for 12036 would have avoided some of the problems noted in
6924 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
6925 would have been more obvious.
6926 * emacs.c: Do not include <verify.h>; no longer needed.
6927 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
6928 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
6929 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6930 Remove; now done in lisp.h.
6931 * lisp.h (PUBLISH_TO_GDB): New macro.
6932 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
6933 (DATA_SEG_BITS): Use it.
6934 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
6935 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
6936 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
6937 not be usable in #if. This simplifies things.
6938
6939 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
6940
6941 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
6942
6943 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6944
6945 Simplify export of symbols to GDB (Bug#12036).
6946 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
6947 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
6948 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
6949 Adjust to changes in lisp.h and emacs.c, by using
6950 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
6951 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
6952 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
6953 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
6954 instead of gdb_valbits.
6955 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
6956 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
6957 instead of gdb_array_mark_flag.
6958 (xboolvector): Get size from $->size, not $->header.size.
6959 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
6960 (xreload, hook-run, hookpost-run): Remove.
6961 * emacs.c: Include <verify.h>.
6962 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
6963 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
6964 Remove.
6965 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
6966 (gdb_USE_LSB_TAG): New enum constants.
6967 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6968 Also define these as enum constants, so they're visible to GDB.
6969 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
6970 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
6971 as constants, so they're visible to GDB.
6972 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
6973 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
6974 Now enum constants, not macros, so they're visible to GDB.
6975 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
6976 more convenient now. All uses changed.
6977 (VALMASK) [USE_LSB_TAG]: Also define in this case.
6978 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
6979
6980 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
6981
6982 Explicitly free restriction data that are not needed anymore.
6983 * editfns.c (save_restriction_restore): Free restriction data.
6984
6985 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
6986
6987 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
6988 add argument, tune behavior, and adjust all callers.
6989
6990 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 Use typedef for EMACS_INT, EMACS_UINT.
6993 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
6994 than macros. This simplifies debugging in the usual case, since
6995 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
6996 and it allows expressions involving EMACS_INT casts.
6997 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
6998
6999 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
7000
7001 * nsterm.m (ns_read_socket): Return early if there is a modal
7002 window (Bug#12043).
7003
7004 2012-07-25 Martin Rudalics <rudalics@gmx.at>
7005
7006 * frame.c (Fredirect_frame_focus): In doc-string don't mention
7007 that FOCUS-FRAME can be omitted.
7008
7009 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
7010
7011 Adjust buffer text indirection counters at the end of Fkill_buffer.
7012 * buffer.c (Fkill_buffer): Adjust indirection counters when the
7013 buffer is definitely dead. This should really fix an issue reported
7014 by Christoph Scholtes again. (Bug#12007).
7015 (init_buffer_once): Initialize indirection counters of
7016 buffer_defaults and buffer_local_symbols (for sanity and safety).
7017
7018 2012-07-24 Eli Zaretskii <eliz@gnu.org>
7019
7020 * xdisp.c (init_iterator): Don't compute dimensions of truncation
7021 and continuation glyphs on tooltip frames, leave them at zero.
7022 Avoids continued lines in tooltips. (Bug#11832)
7023
7024 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
7025
7026 Simplify copy_overlay.
7027 * buffer.c (copy_overlay): Simplify. Use build_marker.
7028 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
7029
7030 2012-07-23 Eli Zaretskii <eliz@gnu.org>
7031
7032 * print.c (print_object): Don't crash when a frame's name is nil
7033 or invalid. (Bug#12025)
7034
7035 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
7036 it signals an error when a tooltip frame is being created.
7037
7038 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
7039
7040 Cleanup miscellaneous objects allocation and initialization.
7041 * alloc.c (allocate_misc): Change to static. Add argument to
7042 specify the subtype. Adjust comment and users.
7043 (build_overlay): New function.
7044 * buffer.c (copy_overlays, Fmake_overlay): Use it.
7045 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
7046 (allocate_misc): Remove prototype.
7047 (build_overlay): Add prototype.
7048
7049 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
7050
7051 Swap buffer text indirection counters in Fbuffer_swap_text.
7052 * buffer.c (Fbuffer_swap_text): Swap indirections too.
7053 This avoids crash reported by Christoph Scholtes at
7054 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
7055
7056 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
7057
7058 * nsmenu.m (Popdown_data): New struct.
7059 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
7060 free Popdown_data.
7061 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
7062 (initWithContentRect): Make imgView and contentView non-static
7063 and autorelease them. Also autorelease img and matrix (Bug#12005).
7064 (dealloc): Remove (Bug#12005).
7065
7066 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
7067
7068 Adjust consing_since_gc when objects are explicitly freed.
7069 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
7070 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
7071 (free_cons, free_misc): Subtract object size from consing_since_gc.
7072
7073 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
7074
7075 Simplify and cleanup markers positioning code.
7076 * marker.c (attach_marker): More useful eassert.
7077 (live_buffer, set_marker_internal): New function.
7078 (Fset_marker, set_marker_restricted): Use set_marker_internal.
7079 (set_marker_both, set_marker_restricted_both): Use live_buffer.
7080
7081 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
7082
7083 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
7084 as it's limited by the amount of memory, not by INT_MAX.
7085
7086 2012-07-21 Eli Zaretskii <eliz@gnu.org>
7087
7088 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
7089 in special-event-map. See the discussion at
7090 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
7091 for the reasons.
7092
7093 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
7094 info.dwItemData. Fixes crashes on 64-bit Windows.
7095 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
7096
7097 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
7098
7099 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
7100 (conversationIdentifier): Return value is NSInteger.
7101 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
7102
7103 2012-07-21 Chong Yidong <cyd@gnu.org>
7104
7105 * window.c (decode_any_window): Signal an error if the window is
7106 on a dead frame (Bug#11984).
7107
7108 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
7109
7110 Add indirection counting to speed up Fkill_buffer.
7111 * buffer.h (struct buffer): New member.
7112 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
7113 (Fmake_indirect_buffer): Set indirection counter to -1, increment
7114 base buffer indirection counter.
7115 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
7116 (Fkill_buffer): Adjust indirection counters as needed, don't walk
7117 through buffer list if indirection counter is 0.
7118
7119 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
7120
7121 Extend the value returned by Fgarbage_collect with heap statistics.
7122 * alloc.c (Qheap): New symbol.
7123 (syms_of_alloc): DEFSYM it.
7124 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
7125 (Fmemory_free): Remove.
7126 (syms_of_alloc): Don't defsubr it.
7127 * buffer.c (Fcompact_buffer): Remove.
7128 (syms_of_buffer): Don't defsubr it.
7129
7130 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
7131
7132 Make maybe_gc inline.
7133 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
7134 * lisp.h (consing_since_gc, gc_relative_threshold)
7135 (memory_full_cons_threshold): Revert declaration.
7136 (maybe_gc): Remove prototype, define as inline.
7137 * alloc.c: Remove old commented-out code.
7138 (consing_since_gc, gc_relative_threshold)
7139 (memory_full_cons_threshold): Revert to global.
7140 (maybe_gc): Remove.
7141
7142 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
7143
7144 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
7145 * lisp.h (build_unibyte_string): New function.
7146 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
7147 * sysdep.c, w32fns.c, xfns.c: Use it.
7148 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
7149 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
7150 Adjust users accordingly.
7151 * font.h (font_open_by_name): Adjust prototype.
7152
7153 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
7154
7155 Cleanup calls to Fgarbage_collect.
7156 * lisp.h (maybe_gc): New prototype.
7157 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
7158 Remove declarations.
7159 * alloc.c (maybe_gc): New function.
7160 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
7161 Make them static.
7162 * bytecode.c (MAYBE_GC): Use maybe_gc.
7163 * eval.c (eval_sub, Ffuncall): Likewise.
7164 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
7165 to avoid dependency from auto-save feature.
7166
7167 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
7168
7169 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
7170 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
7171 'for_each_per_buffer_object_at'.
7172 All uses changed. It's better to use upper-case for macros that
7173 cannot be implemented as functions, to give the reader a clue
7174 that they're special.
7175
7176 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
7177
7178 * alloc.c (Fgarbage_collect): Tweak docstring.
7179
7180 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
7181
7182 Tweak the value returned from Fgarbage_collect again.
7183 * alloc.c (Fgarbage_collect): New return value, as confirmed in
7184 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
7185 Adjust documentation.
7186 (total_vector_bytes): Rename to total_vector_slots, adjust
7187 accounting.
7188 (total_free_vector_bytes): Rename to total_free_vector_slots,
7189 adjust accounting.
7190 (Qstring_bytes, Qvector_slots): New symbols.
7191 (syms_of_alloc): DEFSYM them.
7192
7193 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
7194
7195 Buffer compaction primitive which may be used from Lisp.
7196 * buffer.c (compact_buffer, Fcompact_buffer): New function.
7197 (syms_of_buffer): Register Fcompact_buffer.
7198 * alloc.c (Fgarbage_collect): Use compact_buffer.
7199 * buffer.h (compact_buffer): New prototype.
7200 (struct buffer_text): New member.
7201
7202 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
7203
7204 New macro to iterate over all buffers, miscellaneous cleanups.
7205 * lisp.h (all_buffers): Remove declaration.
7206 * buffer.h (all_buffers): Add declaration, with comment.
7207 (for_each_buffer): New macro.
7208 * alloc.c (Fgarbage_collect, mark_object): Use it.
7209 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
7210 (init_buffer): Likewise.
7211 * data.c (Fset_default): Likewise.
7212 * coding.c (code_conversion_restore): Remove redundant check
7213 for dead buffer.
7214 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
7215
7216 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
7217
7218 Fix bug that created negative-length intervals.
7219 * intervals.c (merge_interval_right, merge_interval_left):
7220 Do not zero out this interval if it is absorbed by its children,
7221 as this interval's total length doesn't change in that case. See
7222 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
7223
7224 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
7225
7226 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
7227 when invoking (make-bool-vector N t) and N is a positive
7228 multiple of 8 -- the last 8 bits were mistakenly cleared.
7229
7230 Remove some struct layout assumptions in bool vectors.
7231 * alloc.c (bool_header_size): New constant.
7232 (header_size, word_size): Move earlier, as they're now used earlier.
7233 Use 'word_size' in a few more places, where it's appropriate.
7234 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
7235 padding before the data member of a bool vector.
7236 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
7237 than doing the check by hand with an abort ().
7238
7239 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
7240
7241 * eval.c (Fdefvar): Don't check constants since we only set the var if
7242 it's not yet defined anyway (bug#11904).
7243
7244 * lisp.h (last_undo_boundary): Declare new var.
7245 * keyboard.c (command_loop_1): Set it.
7246 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
7247 were auto-added by the command loop (bug#11774).
7248
7249 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
7250
7251 * w32font.c (Qsymbol): Remove local definition.
7252 (syms_of_w32font): Don't DEFSYM it.
7253
7254 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
7255
7256 Fix sweep_vectors to handle large bool vectors correctly.
7257 * alloc.c (sweep_vectors): Account total_vector_bytes for
7258 bool vectors larger than VBLOCK_BYTES_MAX.
7259
7260 2012-07-18 Chong Yidong <cyd@gnu.org>
7261
7262 * frame.c (x_set_frame_parameters): Revert bogus change introduced
7263 in 2012-05-25 commit by Paul Eggert (Bug#11738).
7264
7265 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
7266
7267 Return more descriptive data from Fgarbage_collect.
7268 Suggested by Stefan Monnier in
7269 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
7270 * alloc.c (bounded_number): New function.
7271 (total_buffers, total_vectors): New variable.
7272 (total_string_size): Rename to total_string_bytes, adjust users.
7273 (total_vector_size): Rename to total_vector_bytes, adjust users.
7274 (sweep_vectors): Account total_vectors and total_vector_bytes.
7275 (Fgarbage_collect): New return value. Adjust documentation.
7276 (gc_sweep): Account total_buffers.
7277 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
7278 (VECTOR_SIZE): Remove.
7279 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
7280 (Qinterval, Qmisc): New symbols.
7281 (syms_of_data): Initialize them.
7282 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
7283 (Qcons, Qbuffer): New declarations.
7284
7285 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * alloc.c (Fmemory_free): Account for memory-free's own storage.
7288 Round up, not down. Improve doc.
7289
7290 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
7291
7292 Restore old code in allocate_string_data to avoid Faset breakage.
7293 Reported by Julien Danjou <julien@danjou.info> in
7294 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
7295 * alloc.c (allocate_string_data): Restore old code with minor
7296 adjustments, fix comment to explain this subtle issue.
7297
7298 2012-07-17 Eli Zaretskii <eliz@gnu.org>
7299
7300 Remove FILE_SYSTEM_CASE.
7301 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
7302
7303 * fileio.c (FILE_SYSTEM_CASE): Don't define.
7304 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
7305 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
7306 call-process-region passes it through expand-file-name.
7307
7308 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
7309
7310 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
7311
7312 Fix crash when creating indirect buffer (Bug#11917)
7313 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
7314 Don't handle unbound variables specially if non-zero.
7315 (Fbuffer_local_variables): Pass zero.
7316 (clone_per_buffer_values): Pass non-zero.
7317
7318 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
7319
7320 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
7321 to make the loop interruptible.
7322
7323 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
7324
7325 * gnutls.c (emacs_gnutls_handshake): Only retry if
7326 GNUTLS_E_INTERRUPTED.
7327
7328 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
7329
7330 Cleanup and convert miscellaneous checks to eassert.
7331 * alloc.c (mark_interval): Fix comment, partially rephrase
7332 old comment from intervals.h (see below).
7333 * intervals.c (find_interval, adjust_intervals_for_insertion)
7334 (delete_interval, adjust_intervals_for_deletion)
7335 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
7336 Convert to eassert.
7337 (adjust_intervals_for_insertion, make_new_interval):
7338 Remove obsolete and unused code.
7339 * intervals.h (struct interval): Remove obsolete comment.
7340 * textprotp.c (erase_properties): Remove unused code.
7341 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
7342 (Fremove_list_of_text_properties): Convert to eassert.
7343
7344 2012-07-17 Chong Yidong <cyd@gnu.org>
7345
7346 * editfns.c (Finsert_char): Doc fix.
7347
7348 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
7349
7350 Fix previous change to make Fmemory_free always accurate.
7351 * alloc.c (make_interval): Update total_free_intervals.
7352 (make_float): Likewise for total_free_floats.
7353 (free_cons, Fcons): Likewise for total_free_conses.
7354 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
7355 Likewise for total_free_vector_bytes.
7356 (Fmake_symbol): Likewise for total_free_symbols.
7357 (bytes_free): Remove.
7358
7359 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
7360
7361 Simple free memory accounting feature.
7362 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
7363 (sweep_vectors): Accumulate size of free vectors.
7364 (Fgarbage_collect): Setup bytes_free.
7365 (Fmemory_free): New function.
7366 (syms_of_alloc): Register it.
7367
7368 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
7369
7370 Cleanup overlays checking.
7371 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
7372 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
7373 eassert and OVERLAYP.
7374 (sort_overlays): Change to use OVERLAYP.
7375
7376 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
7377
7378 * editfns.c (Finsert_char): Make it interactive, and make the
7379 second arg optional. Copy interactive spec and docstring from
7380 ucs-insert.
7381
7382 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
7383
7384 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
7385 Unlike the other wrapped functions, fabs has an unspecified
7386 effect on errno.
7387
7388 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
7389
7390 * nsterm.m (keyDown): Interpret flags without left/right bits
7391 as the left key (Bug#11670).
7392
7393 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
7394
7395 Remove empty and useless init functions.
7396 * lisp.h (init_character_once, init_fns, init_image)
7397 (init_filelock, init_sound): Remove prototype.
7398 * character.c (init_character_once): Remove.
7399 * filelock.c (init_filelock): Likewise.
7400 * fns.c (init_fns): Likewise.
7401 * image.c (init_image): Likewise.
7402 * sound.c (init_sound): Likewise.
7403 * emacs.c (main): Adjust accordingly.
7404
7405 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
7406
7407 * gtkutil.h: Tiny cleanups.
7408 (use_old_gtk_file_dialog): Remove useless declaration.
7409 (xg_uses_old_file_dialog): Add suggested const attribute.
7410
7411 2012-07-15 Eli Zaretskii <eliz@gnu.org>
7412
7413 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
7414 (bidi_paragraph_init): Use it to limit search forward for a strong
7415 directional character in abnormally large paragraphs full of
7416 neutral or weak characters. (Bug#11943)
7417
7418 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
7419
7420 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
7421 the toolbar (Bug#9451).
7422 (xg_make_tool_item): Give the widget event box a transparent
7423 background.
7424
7425 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
7426
7427 Cleanup basic allocation variables and functions.
7428 * alloc.c (ignore_warnings, init_intervals, init_float)
7429 (init_cons, init_symbol, init_marker): Remove.
7430 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
7431 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
7432 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
7433 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
7434 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
7435 (staticidx, init_alloc_once, init_strings, free_ablock):
7436 Remove redundant initialization.
7437 * fns.c (init_weak_hash_tables): Remove.
7438 * lisp.h (init_weak_hash_tables): Remove prototype.
7439
7440 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
7441
7442 Use zero_vector where appropriate.
7443 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
7444 accordingly.
7445 * lisp.h (zero_vector): New declaration.
7446 * font.c (null_vector): Remove.
7447 (syms_of_font): Remove initialization and staticpro.
7448 (font_list_entities, font_find_for_lface): Change to use zero_vector.
7449 * keymap.c (Faccessible_keymaps): Likewise.
7450
7451 2012-07-15 Leo Liu <sdl.web@gmail.com>
7452
7453 * fringe.c: Fix typo in comments.
7454
7455 2012-07-14 Leo Liu <sdl.web@gmail.com>
7456
7457 * fringe.c: Add a new bitmap exclamation-mark.
7458
7459 2012-07-14 Eli Zaretskii <eliz@gnu.org>
7460
7461 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
7462
7463 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
7464 (HAVE_MENUS): Don't define, defined by editing config.in with
7465 msdos/sed2v2.inp.
7466 (GMALLOC_INHIBIT_VALLOC): Don't define.
7467 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
7468
7469 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
7470
7471 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
7472
7473 2012-07-14 Glenn Morris <rgm@gnu.org>
7474
7475 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
7476 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
7477 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
7478
7479 2012-07-13 Glenn Morris <rgm@gnu.org>
7480
7481 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
7482
7483 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
7484 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
7485
7486 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
7487
7488 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
7489 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
7490 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
7491 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
7492 where appropriate.
7493 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
7494 as boolean expression.
7495 (x_set_window_size): Remove unused variable toolbar.
7496 (ns_get_color_default, ns_mod_to_lisp): Remove.
7497 (ns_mouse_position): Remove unused variables xchar and ychar.
7498 (ns_compute_glyph_string_overhangs): Remove unused variable face.
7499 (ns_set_vertical_scroll_bar): Remove unused variable count.
7500 (ns_delete_terminal): Remove unused variable i.
7501 (ns_term_init): Remove unused variables r, g and b.
7502 (mouseDown): Remove unused variable window.
7503 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
7504 (initFrameFromEmacs): Remove unused variable vbextra.
7505 (mouseEntered): Remove unused variables p and dpyinfo.
7506 (mouseExited): Remove unused variables p and r.
7507 (ns_define_frame_cursor, ns_clear_frame_area)
7508 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
7509 (menuDown): Assign [sender tag] to variable and cast the variable.
7510
7511 * nsterm.h (menuDown): Add id as type to argument sender.
7512 (ns_display_info_for_name): Add Lisp_Object argument.
7513 (ns_term_init): Add Lisp_Object argument.
7514 (ns_map_event_to_object): Add void argument.
7515 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
7516 prototype with arguments and only declare if __OBJC__.
7517 (nxatoms_of_nsselect): Add void argument.
7518 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
7519 (ns_alloc_autorelease_pool): Add void argument.
7520 (ns_release_autorelease_pool): Add void* argument.
7521 (ns_get_defaults_value): Add const char* argument.
7522
7523 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
7524 (initFromContents): Use SSDATA where appropriate.
7525 (ns_update_menubar): Add braces to ambigous if-else.
7526 (initWithTitle): Put () around assignment in if statement.
7527 (ns_menu_show): Remove unused variables window and keymap.
7528 (update_frame_tool_bar): Remove unused variable selected_p.
7529 (initWithContentRect): Remove unused variable this_cmd_name.
7530
7531 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
7532 appropriate.
7533 (setXBMColor): Remove unused variable len.
7534 (setPixmapData): Put () around assignment in loop statement.
7535
7536 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
7537 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
7538 where appropriate.
7539 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
7540 around assignment in loop statement.
7541 (nsfont_open): Remove unused variable i.
7542 (nsfont_open): Remove unused variable len.
7543 (nsfont_draw): Remove unused variable cs.
7544
7545 * nsfns.m (x_set_icon_name, ns_set_name_internal)
7546 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
7547 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
7548 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
7549 (Fns_font_name, Fns_perform_service)
7550 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
7551 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
7552 (ns_set_name): Remove unused variable view.
7553 (x_set_menu_bar_lines): Remove unused variable olines.
7554 (x_set_tool_bar_lines): Remove unused variable root_window.
7555 (Fns_list_colors): Put () around assignment in while statement.
7556 (Fns_perform_service): Remove unused variable len.
7557 (Fns_display_usable_bounds): Remove unused variable top.
7558 (syms_of_nsfns): Remove unused variable i.
7559
7560 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
7561 memcpy (Bug#11907).
7562
7563 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
7564
7565 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
7566 and free it with DestroyExceptionInfo (Bug#11558).
7567
7568 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
7569
7570 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
7571 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
7572 Set here, not in nt/config.nt.
7573
7574 2012-07-13 Eli Zaretskii <eliz@gnu.org>
7575
7576 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
7577 cursor overflow into the last glyph on display line when the right
7578 fringe is off. (Bug#11832)
7579
7580 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
7581
7582 * xdisp.c (produce_special_glyphs): Now static.
7583 * dispextern.h (produce_special_glyphs): Remove decl.
7584
7585 2012-07-13 Glenn Morris <rgm@gnu.org>
7586
7587 * s/bsd-common.h, s/cygwin.h: Remove empty files.
7588 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
7589
7590 * s/usg5-4-common.h (USG, USG5):
7591 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
7592 * s/sol2-6.h (SOLARIS2):
7593 * s/irix6-5.h (IRIX6_5):
7594 * s/hpux10-20.h (USG, USG5, HPUX):
7595 * s/gnu-linux.h (USG, GNU_LINUX):
7596 * s/freebsd.h (BSD_SYSTEM):
7597 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
7598 * s/cygwin.h (CYGWIN):
7599 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
7600 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
7601
7602 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
7603
7604 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
7605
7606 2012-07-13 Glenn Morris <rgm@gnu.org>
7607
7608 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
7609
7610 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
7611
7612 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
7613 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
7614
7615 2012-07-12 Glenn Morris <rgm@gnu.org>
7616
7617 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
7618
7619 * process.c (init_process_emacs): Rename from init_process.
7620 The old name is also the name of a Mach system call.
7621 * lisp.h, emacs.c: Update for this name change.
7622 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
7623 longer needed.
7624
7625 2012-07-12 Eli Zaretskii <eliz@gnu.org>
7626
7627 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
7628 memmove call that removes glyphs covered by the left truncation
7629 glyph. Improve commentary.
7630 (display_line): Fix display of continuation glyphs on GUI frames
7631 when the right fringe is turned off and variable-size fonts are
7632 used in the window. Move the code that appends a stretch glyph to
7633 produce_special_glyphs, so that it could be used for truncation
7634 and continuation glyphs alike.
7635 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
7636 glyph of a suitably computed width, to align the special glyphs at
7637 the window margin. Code moved from display_line. (Bug#11832)
7638
7639 2012-07-12 Glenn Morris <rgm@gnu.org>
7640
7641 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
7642
7643 * s/gnu-linux.h, s/hpux10-20.h:
7644 Do not unconditionally define HAVE_XRMSETDATABASE.
7645
7646 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
7647
7648 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
7649
7650 Fix typos that broke OS X build.
7651 Reported by Randal L. Schwartz in
7652 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
7653 * nsterm.m (ns_timeout): Add missing local decl.
7654 (ns_get_color): snprintf -> sprintf, to fix typo.
7655
7656 2012-07-12 Glenn Morris <rgm@gnu.org>
7657
7658 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
7659 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
7660 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
7661 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
7662
7663 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
7664 Move PTY_OPEN to configure.
7665
7666 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7667 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
7668 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
7669
7670 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
7671
7672 Use empty_unibyte_string where applicable.
7673 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
7674 * lread.c (read1): Likewise.
7675 * xsettings.c (syms_of_xsettings): Likewise.
7676
7677 2012-07-12 Glenn Morris <rgm@gnu.org>
7678
7679 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
7680 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7681 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
7682 * s/hpux10-20.h (RUN_TIME_REMAP):
7683 * s/bsd-common.h (TABDLY): Move to configure.
7684
7685 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
7686
7687 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
7688
7689 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
7690 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
7691
7692 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
7693
7694 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
7695 * s/template.h: Move NARROWPROTO to configure.
7696
7697 2012-07-11 Glenn Morris <rgm@gnu.org>
7698
7699 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
7700 unused since 2011-01-17 change to systty.h.
7701
7702 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
7703 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7704 Move HAVE_PTYS and HAVE_SOCKETS to configure.
7705
7706 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7707
7708 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
7709
7710 2012-07-11 Glenn Morris <rgm@gnu.org>
7711
7712 * s/darwin.h, s/gnu-linux.h, s/template.h:
7713 Move INTERRUPT_INPUT to configure.
7714
7715 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7716
7717 Minor adjustments to interning code.
7718 * lisp.h (intern, intern_c_string): Redefine as static inline
7719 wrappers for intern_1 and intern_c_string_1, respectively.
7720 (intern_1, intern_c_string_1): Rename prototypes.
7721 * lread.c (intern_1, intern_c_string_1, oblookup):
7722 Simplify Vobarray checking.
7723 * font.c (font_intern_prop): Likewise. Adjust comment.
7724 * w32font.c (intern_font_name): Likewise.
7725
7726 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
7727
7728 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
7729
7730 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
7731 of Fcar/Fcdr if possible.
7732 * font.c (check_otf_features): Likewise.
7733 * fontset.c (Fnew_fontset): Likewise.
7734 * gnutls.c (Fgnutls_boot): Likewise.
7735 * minibuf.c (read_minibuf): Likewise.
7736 * msdos.c (IT_set_frame_parameters): Likewise.
7737 * xmenu.c (Fx_popup_dialog): Likewise.
7738 * w32menu.c (Fx_popup_dialog): Likewise.
7739
7740 2012-07-11 Glenn Morris <rgm@gnu.org>
7741
7742 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
7743 since nothing has defined it on these platforms.
7744
7745 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
7746 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
7747
7748 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7749 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7750 Move CLASH_DETECTION to configure.
7751
7752 * s/gnu.h: Remove file, which is now empty.
7753
7754 * s/gnu.h, s/gnu-linux.h:
7755 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
7756
7757 2012-07-11 John Wiegley <johnw@newartisans.com>
7758
7759 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
7760 function attribute, so we only use it if it exists in the
7761 compiler.
7762
7763 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7764
7765 Avoid call to strlen in fast_c_string_match_ignore_case.
7766 * search.c (fast_c_string_match_ignore_case): Change to use
7767 length argument. Adjust users accordingly.
7768 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
7769
7770 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7771
7772 Assume mkdir, rmdir.
7773 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
7774 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
7775
7776 Assume rename.
7777 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
7778
7779 Assume perror.
7780 * s/hpux10-20.h (HAVE_PERROR): Remove.
7781 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
7782 Remove dummy definition, as this problem was obsolete long ago.
7783
7784 Assume strerror.
7785 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
7786
7787 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7788
7789 Avoid calls to strlen in font processing functions.
7790 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
7791 (font_open_by_name): Change to use length argument.
7792 Adjust users accordingly.
7793 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
7794 Adjust prototypes.
7795 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
7796 Change to return ptrdiff_t.
7797 (xfont_list_pattern, xfont_match): Use length returned by
7798 xfont_decode_coding_xlfd.
7799 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
7800
7801 2012-07-11 Glenn Morris <rgm@gnu.org>
7802
7803 * s/darwin.h, s/freebsd.h, s/netbsd.h:
7804 Move DONT_REOPEN_PTY to configure.
7805
7806 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
7807 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
7808
7809 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
7810
7811 Remove "#define unix" that is no longer needed (Bug#11905).
7812 * s/aix4-2.h (unix): Remove; no longer needed.
7813
7814 EMACS_TIME simplification (Bug#11875).
7815 This replaces macros (which typically do not work in GDB)
7816 with functions, typedefs and enums, making the code easier to debug.
7817 The functional style also makes code easier to read and maintain.
7818 * systime.h: Include <sys/time.h> on all hosts, not just if
7819 WINDOWSNT, since 'struct timeval' is needed in general.
7820 (EMACS_TIME): Now a typedef, not a macro.
7821 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
7822 not macros.
7823 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
7824 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
7825 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
7826 (EMACS_TIME_LE): Now functions, not macros.
7827 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
7828 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
7829 which are not functions. All uses rewritten to use:
7830 (make_emacs_time): New function.
7831 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
7832 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
7833 not functions. All uses rewritten to use the following, respectively:
7834 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
7835 (add_emacs_time, sub_emacs_time): New functions.
7836 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
7837 * fileio.c (Fcopy_file):
7838 * xterm.c (XTflash): Get the current time closer to when it's used.
7839 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
7840
7841 * bytecode.c (targets): Suppress -Woverride-init warnings.
7842
7843 Simplify by avoiding confusing use of strncpy etc.
7844 * doc.c (Fsnarf_documentation):
7845 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
7846 * frame.c (Fmake_terminal_frame):
7847 * gtkutil.c (get_utf8_string):
7848 * lread.c (openp):
7849 * nsmenu.m (ns_update_menubar):
7850 * regex.c (regerror):
7851 Prefer memcpy to strncpy and strncat when either will do.
7852 * fileio.c (Fsubstitute_in_file_name):
7853 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
7854 (menu_separator_name_p):
7855 * nsmenu.m (ns_update_menubar):
7856 Prefer memcmp to strncmp when either will do.
7857 * nsterm.m: Include <ftoastr.h>.
7858 (ns_get_color):
7859 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
7860 Prefer snprintf to strncpy.
7861 * nsterm.m (ns_term_init):
7862 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
7863 * nsterm.m (ns_term_init):
7864 Avoid the need for strncpy, by using build_string or
7865 make_unibyte_string directly. Use dtoastr, not snprintf.
7866 * process.c (Fmake_network_process): Diagnose service names that
7867 are too long, rather than silently truncating them or creating
7868 non-null-terminated names.
7869 (Fnetwork_interface_info): Likewise, for interface names.
7870 * sysdep.c (system_process_attributes) [GNU_LINUX]:
7871 Prefer sprintf to strncat.
7872 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
7873 Prefer vsnprintf to vsprintf + strncpy.
7874
7875 2012-07-10 Glenn Morris <rgm@gnu.org>
7876
7877 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
7878 Clarify fallback case.
7879
7880 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7881
7882 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
7883 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
7884 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
7885 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7886 where argument type is known to be a Lisp_Cons.
7887
7888 2012-07-10 Tom Tromey <tromey@redhat.com>
7889
7890 * bytecode.c (BYTE_CODE_THREADED): New macro.
7891 (BYTE_CODES): New macro. Replaces all old byte-code defines.
7892 (enum byte_code_op): New type.
7893 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
7894 (exec_byte_code): Use them. Use token threading when applicable.
7895
7896 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7897
7898 Optimize pure C strings initialization.
7899 * lisp.h (make_pure_string): Fix prototype.
7900 (build_pure_c_string): New function, defined as static inline. This
7901 provides a better opportunity to optimize away calls to strlen when
7902 the function is called with compile-time constant argument.
7903 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
7904 argument, adjust users accordingly. Use build_pure_c_string where
7905 appropriate.
7906 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
7907 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
7908 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
7909
7910 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7911
7912 Avoid calls to strlen in miscellaneous functions.
7913 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
7914 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
7915 * lread.c (openp): Likewise.
7916
7917 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7918
7919 Avoid calls to strlen in path processing functions.
7920 * fileio.c (file_name_as_directory): Add comment. Change to add
7921 srclen argument and return the length of result. Adjust users
7922 accordingly.
7923 (directory_file_name): Fix comment. Change to add srclen argument,
7924 swap 1st and 2nd arguments to obey the common convention.
7925 Adjust users accordingly.
7926 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
7927
7928 2012-07-10 Glenn Morris <rgm@gnu.org>
7929
7930 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
7931 Move PENDING_OUTPUT_COUNT definition to configure.
7932
7933 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
7934 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
7935 * s/gnu.h (DATA_START): Move definitions to configure.
7936
7937 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
7938 We include usg5-4-common.h, which defines them both.
7939
7940 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
7941 O_RDONLY already includes it).
7942
7943 Stop ns builds setting the EMACSLOADPATH environment variable.
7944 * nsterm.m (ns_load_path): Rename from ns_init_paths.
7945 Now it does not set EMACSLOADPATH, just returns the load-path string.
7946 * nsterm.h: Update accordingly.
7947 * lread.c [HAVE_NS]: Include nsterm.h.
7948 (init_lread) [HAVE_NS]: Use ns_load_path.
7949 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
7950
7951 2012-07-09 Glenn Morris <rgm@gnu.org>
7952
7953 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
7954 since the included bsd-common.h does so.
7955
7956 Stop ns builds setting the EMACSPATH environment variable.
7957 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
7958 (ns_init_paths): Do not set EMACSPATH.
7959 * nsterm.h (ns_exec_path): Add it.
7960 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
7961 Use ns_exec_path.
7962
7963 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
7964
7965 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
7966
7967 * process.c (wait_reading_process_output): 'waitchannels' was unset
7968 when read_kbd || !NILP (wait_for_cell); fix this.
7969
7970 Add GCC-style 'const' attribute to functions that can use it.
7971 * character.h (char_resolve_modifier_mask):
7972 * keyboard.h (make_ctrl_char):
7973 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
7974 (init_character_once, next_almost_prime, init_fns, init_image)
7975 (flush_pending_output, init_sound):
7976 * mem-limits.h (start_of_data):
7977 * menu.h (finish_menu_items):
7978 Add ATTRIBUTE_CONST.
7979 * emacs.c (DEFINE_DUMMY_FUNCTION):
7980 Declare the dummy function with ATTRIBUTE_CONST.
7981 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
7982 Add decls with ATTRIBUTE_CONST.
7983
7984 Minor improvements to make_formatted_string.
7985 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
7986 where int is good enough, as vsprintf returns an int.
7987 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
7988
7989 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
7990
7991 Use make_formatted_string to avoid double length calculation.
7992 * lisp.h (make_formatted_string): New prototype.
7993 * alloc.c (make_formatted_string): New function.
7994 * buffer.c (Fgenerate_new_buffer_name): Use it.
7995 * dbusbind.c (syms_of_dbusbind): Likewise.
7996 * editfns.c (Fcurrent_time_zone): Likewise.
7997 * filelock.c (get_boot_time): Likewise.
7998 * frame.c (make_terminal_frame, set_term_frame_name)
7999 (x_report_frame_params): Likewise.
8000 * image.c (gs_load): Likewise.
8001 * minibuf.c (get_minibuffer): Likewise.
8002 * msdos.c (dos_set_window_size): Likewise.
8003 * process.c (make_process): Likewise.
8004 * xdisp.c (ensure_echo_area_buffers): Likewise.
8005 * xsettings.c (apply_xft_settings): Likewise.
8006
8007 2012-07-09 Glenn Morris <rgm@gnu.org>
8008
8009 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
8010 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
8011 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
8012 * nsterm.h (ns_etc_directory): Add it.
8013 * callproc.c [HAVE_NS]: Include nsterm.h.
8014 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
8015
8016 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
8017
8018 Move marker debugging code under MARKER_DEBUG.
8019 * marker.c (MARKER_DEBUG): Move marker debugging code under
8020 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
8021 for bootstrap with --enable-checking (~3x slowdown reported
8022 by Juanma Barranquero <lekktu@gmail.com>).
8023 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
8024
8025 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
8026
8027 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
8028 See <http://bugs.gnu.org/11825#29>.
8029
8030 2012-07-08 Eli Zaretskii <eliz@gnu.org>
8031
8032 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
8033 has no font, use the frame's font. (Bug#11813)
8034 (display_line): Add commentary about displaying truncation glyphs
8035 on GUI frames.
8036 (produce_special_glyphs): Move here from term.c.
8037
8038 * term.c (produce_special_glyphs): Move to xdisp.c.
8039
8040 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
8041 section.
8042
8043 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
8044
8045 * xdisp.c (display_line): Avoid warning about implicit declaration
8046 of FRAME_FONT.
8047
8048 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
8049
8050 * lisp.h: Remove empty conditional.
8051
8052 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
8053
8054 * lread.c (load_path_check): Now static.
8055
8056 Fix some minor --with-ns problems found by static checking.
8057 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
8058 (x_set_font) [!HAVE_X_WINDOWS]:
8059 * image.c (xpm_load_image) [HAVE_NS]:
8060 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
8061 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
8062 Remove unused local.
8063 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
8064 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
8065 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
8066 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
8067 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
8068 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
8069 Fix pointer signedness problem.
8070 * xfaces.c (FRAME_X_FONT_TABLE):
8071 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
8072
8073 2012-07-07 Glenn Morris <rgm@gnu.org>
8074
8075 * lread.c (load_path_check): New function, split from init_lread.
8076 (init_lread): Reorganize. Motivation:
8077 If EMACSLOADPATH is set, check/warn about that rather than the
8078 defaults, which we are not going to use. Hence we can remove
8079 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
8080 Don't warn if site-lisp directories are missing.
8081 If not installed, start from a blank load-path, since
8082 PATH_LOADSEARCH refers to the eventual installation directories.
8083
8084 2012-07-07 Eli Zaretskii <eliz@gnu.org>
8085
8086 Support truncation and continuation glyphs on GUI frames, when
8087 fringes are disabled. (Bug#11832)
8088 * xdisp.c (init_iterator): Get dimensions of truncation and
8089 continuation glyphs even if on GUI frames.
8090 Adjust it->last_visible_x on GUI frames when the left or right fringes,
8091 or both, are absent.
8092 (start_display, move_it_in_display_line_to): Handle the case of a
8093 GUI frame without a fringe to display continuation or truncation
8094 glyphs.
8095 (insert_left_trunc_glyphs): Support GUI frames: make sure
8096 truncation glyphs overwrite enough glyphs from the current line to
8097 have sufficient space in pixels.
8098 (display_line): Support truncation and continuation glyphs on GUI
8099 frames. If some spare pixels are left on the line after inserting
8100 the truncation glyphs, fill that space with a stretch glyph of a
8101 suitably computed width.
8102
8103 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
8104 produce_glyphs, to support GUI sessions.
8105
8106 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
8107
8108 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
8109
8110 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
8111
8112 Do not require float-time's arg to fit in time_t (Bug#11825).
8113 This works better on hosts where time_t is unsigned, and where
8114 float-time is applied to the (negative) difference between two times.
8115 * editfns.c (decode_time_components): Last arg is now double *,
8116 not int *, and means to store all the result as a double, without
8117 worrying about whether the seconds part fits in time_t.
8118 All callers changed.
8119 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
8120 All callers changed.
8121 (Ffloat_time): Do not fail merely because the specified time falls
8122 outside of time_t range.
8123
8124 2012-07-07 Glenn Morris <rgm@gnu.org>
8125
8126 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
8127 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
8128 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
8129
8130 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
8131
8132 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
8133 Update dependencies.
8134
8135 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
8136
8137 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
8138
8139 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
8140 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
8141 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
8142 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
8143 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
8144 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
8145
8146 * xfont.c (compare_font_names): Redo to omit the need for casts.
8147
8148 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
8149
8150 * xfns.c (Fx_change_window_property): Doc fix.
8151 * w32fns.c (Fx_change_window_property): Doc fix.
8152
8153 * w32fns.c (Fx_window_property): Accept the same arguments as the
8154 X Windows version. Doc fix.
8155 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
8156
8157 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
8158 Eli Zaretskii <eliz@gnu.org>
8159
8160 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
8161 Windows-specific code from nt/config.nt moved here.
8162 Obsolete settings removed.
8163
8164 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
8165
8166 * process.c: Avoid unnecessary calls to gettime.
8167 (wait_reading_process_output): Don't get the time of day
8168 when gobbling data immediately and not waiting, as there's no need
8169 for it in that case. This removes a FIXME.
8170
8171 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
8172
8173 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
8174 is defined (Bug#11768).
8175
8176 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8177
8178 Fix marker debugging code.
8179 * marker.c (byte_char_debug_check): Do not perform the check
8180 if buffer is not multibyte.
8181 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
8182 Call byte_char_debug_check with correct arguments.
8183
8184 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8185
8186 Compile marker debugging code only if ENABLE_CHECKING is defined.
8187 * marker.c (byte_char_debug_check, count_markers):
8188 Use only if ENABLE_CHECKING is defined.
8189 (byte_debug_flag): Remove.
8190 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
8191 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
8192
8193 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8194
8195 Avoid code repetition in marker-related functions.
8196 * marker.c (attach_marker): New function.
8197 (Fset_marker, set_marker_restricted, set_marker_both)
8198 (set_marker_restricted_both): Use it.
8199 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
8200 Consistently rename charno to charpos.
8201 (marker_position): Add eassert.
8202 (marker_byte_position): Convert to eassert.
8203
8204 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8205
8206 Simplify list operations in unchain_overlay and unchain_marker.
8207 * buffer.c (unchain_overlay): Simplify. Add comment.
8208 * marker.c (unchain_marker): Simplify. Fix comments.
8209
8210 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8211
8212 Introduce fast path for the widely used marker operation.
8213 * alloc.c (build_marker): New function.
8214 * lisp.h (build_marker): New prototype.
8215 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
8216 * composite.c (autocmp_chars): Likewise.
8217 * editfns.c (buildmark): Remove.
8218 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
8219 (save_restriction_save): Use build_marker.
8220 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
8221 * window.c (save_window_save): Likewise.
8222
8223 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
8224
8225 Do not use Fdelete_overlay in delete_all_overlays
8226 to avoid redundant calls to unchain_overlay.
8227 * buffer.c (drop_overlay): New function.
8228 (delete_all_overlays, Fdelete_overlay): Use it.
8229 * minibuf.c (get_minibuffer): Fix comment.
8230
8231 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
8232
8233 Port to OpenBSD 5.1 amd64.
8234 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
8235 This is needed for OpenBSD, and should be harmless on all BSD systems.
8236 Also, include <sys/sysctl.h>, as it should be available on all
8237 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
8238 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
8239 use p_pid member, not kp_proc.pid.
8240
8241 2012-07-06 Glenn Morris <rgm@gnu.org>
8242
8243 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
8244
8245 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
8246
8247 More xmalloc and related cleanup.
8248 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
8249 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
8250 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
8251 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
8252 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
8253 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
8254 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
8255 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
8256 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
8257 * xterm.c:
8258 Omit needless casts involving void * pointers and allocation.
8259 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
8260 as the former is more robust if P's type is changed.
8261 Prefer xzalloc to xmalloc + memset 0.
8262 Simplify malloc-or-realloc to realloc.
8263 Don't worry about xmalloc returning a null pointer.
8264 Prefer xstrdup to xmalloc + strcpy.
8265 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
8266 growing it.
8267 * keyboard.c (apply_modifiers_uncached): Prefer local array to
8268 alloca of a constant.
8269
8270 2012-07-05 Eli Zaretskii <eliz@gnu.org>
8271
8272 * xdisp.c (display_line): Fix horizontal pixel coordinates when
8273 hscroll is larger than the line width. Fixes long and futile
8274 looping inside extend_face_to_end_of_line (on a TTY) producing
8275 glyphs that are not needed and thrown away.
8276
8277 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
8278
8279 * marker.c (set_marker_restricted_both): Simplify by using
8280 clip_to_bounds.
8281
8282 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
8283
8284 * editfns.c (region_limit): Simplify by using clip_to_bounds.
8285
8286 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
8287
8288 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
8289 not defined (Bug#11768).
8290 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
8291 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
8292 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
8293 followed by gtk_box_set_homogeneous (Bug#11768).
8294 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
8295 (update_theme_scrollbar_width, xg_create_scroll_bar):
8296 Use gtk_scrollbar_new (Bug#11768).
8297 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
8298 (is_box_type): New function (Bug#11768).
8299 (xg_tool_item_stale_p): Call is_box_type.
8300 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
8301 with default display (Bug#11768).
8302
8303 2012-07-05 Eli Zaretskii <eliz@gnu.org>
8304
8305 * xdisp.c (window_hscroll_limited): New function.
8306 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
8307 coordinates when window's hscroll is set to insanely large
8308 values. (Bug#11857)
8309
8310 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
8311
8312 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
8313 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
8314
8315 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
8316
8317 Cleanup xmalloc.
8318 * lisp.h (xzalloc): New prototype. Omit needless casts.
8319 * alloc.c (xzalloc): New function. Omit needless casts.
8320 * charset.c: Omit needless casts. Convert all calls to
8321 xmalloc with following memset to xzalloc.
8322 * dispnew.c: Likewise.
8323 * fringe.c: Likewise.
8324 * image.c: Likewise.
8325 * sound.c: Likewise.
8326 * term.c: Likewise.
8327 * w32fns.c: Likewise.
8328 * w32font.c: Likewise.
8329 * w32term.c: Likewise.
8330 * xfaces.c: Likewise.
8331 * xfns.c: Likewise.
8332 * xterm.c: Likewise.
8333 * atimer.c: Omit needless casts.
8334 * buffer.c: Likewise.
8335 * callproc.c: Likewise.
8336 * ccl.c: Likewise.
8337 * coding.c: Likewise.
8338 * composite.c: Likewise.
8339 * doc.c: Likewise.
8340 * doprnt.c: Likewise.
8341 * editfns.c: Likewise.
8342 * emacs.c: Likewise.
8343 * eval.c: Likewise.
8344 * filelock.c: Likewise.
8345 * fns.c: Likewise.
8346 * gtkutil.c: Likewise.
8347 * keyboard.c: Likewise.
8348 * lisp.h: Likewise.
8349 * lread.c: Likewise.
8350 * minibuf.c: Likewise.
8351 * msdos.c: Likewise.
8352 * print.c: Likewise.
8353 * process.c: Likewise.
8354 * region-cache.c: Likewise.
8355 * search.c: Likewise.
8356 * sysdep.c: Likewise.
8357 * termcap.c: Likewise.
8358 * terminal.c: Likewise.
8359 * tparam.c: Likewise.
8360 * w16select.c: Likewise.
8361 * w32.c: Likewise.
8362 * w32reg.c: Likewise.
8363 * w32select.c: Likewise.
8364 * w32uniscribe.c: Likewise.
8365 * widget.c: Likewise.
8366 * xdisp.c: Likewise.
8367 * xmenu.c: Likewise.
8368 * xrdb.c: Likewise.
8369 * xselect.c: Likewise.
8370
8371 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
8372
8373 * fileio.c (time_error_value): Check the right error number.
8374 Problem reported by Troels Nielsen in
8375 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
8376
8377 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8378
8379 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
8380 This should be fixed in a better way; see Eli Zaretskii in
8381 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
8382 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
8383
8384 * fileio.c (time_error_value): Rename from special_mtime.
8385 The old name's problems were noted by Eli Zaretskii in
8386 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
8387
8388 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
8389 This variable's comment says Emacs needs at least one GDB-visible
8390 symbol of type enum pvec_type, to work around GDB problems.
8391 The symbol's value doesn't matter.
8392
8393 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
8394 that causes compilation to fail on pre-C99 compilers.
8395
8396 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
8397
8398 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
8399 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
8400
8401 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8402
8403 * buffer.c (init_buffer_once): Fix initialization of
8404 headers for buffer_defaults and buffer_local_symbols.
8405 Reported by Juanma Barranquero <lekktu@gmail.com>.
8406
8407 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
8408
8409 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
8410 * lisp.h (enum pvec_type): Use fewer bits.
8411 (PSEUDOVECTOR_SIZE_BITS): New constant.
8412 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
8413 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
8414 change in pvec_type.
8415 (PSEUDOVECTOR_TYPEP): New macro.
8416 (TYPED_PSEUDOVECTORP): Use it.
8417 * fns.c (internal_equal): Adapt code to extract pvectype.
8418 * emacs.c (gdb_pvec_type): Update type.
8419 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
8420 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
8421 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
8422 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
8423 (sweep_vectors): Use it. Use local var `total_bytes' instead of
8424 abusing vector->header.next.nbytes.
8425 (live_vector_p): Use PVEC_TYPE.
8426 (mark_object): Adapt code to extract pvectype. Use switch.
8427
8428 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8429
8430 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
8431 Tighten new eassert a bit.
8432
8433 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8434
8435 Fix compilation with --enable-gcc-warnings and -O1
8436 optimization level.
8437 * doprnt.c (doprnt): Change type of tem to int, initialize
8438 to avoid compiler warning. Add eassert.
8439 * search.c (simple_search): Initialize match_byte to avoid
8440 compiler warning. Add eassert.
8441
8442 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 Avoid weird behavior with large horizontal scrolls.
8445 Without this change, for example, large hscroll values would
8446 mess up Emacs's display on Fedora 15 x86, presumably due to
8447 overflows in int calculations in the display code.
8448 Also, if buffers had long lines, Emacs would freeze.
8449 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
8450 (set_window_hscroll): New function, containing the old guts of
8451 Fset_window_hscroll. Return the clipped value.
8452 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
8453 This avoids the need to check against PTRDIFF_MAX.
8454
8455 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
8456
8457 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8458
8459 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
8460
8461 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8462
8463 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
8464 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
8465 since GCC 4.4.6 issues a bogus warning for them.
8466
8467 Fix bugs in file timestamp newness comparisons.
8468 * fileio.c (Ffile_newer_than_file_p):
8469 * lread.c (Fload): Use full timestamp resolution of files,
8470 not just the 1-second resolution, so that files that are only
8471 slightly newer still count as newer.
8472 * fileio.c (Ffile_newer_than_file_p): Don't assume file
8473 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
8474
8475 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
8476
8477 * fileio.c: Improve handling of file time marker. (Bug#11852)
8478 (special_mtime): New function.
8479 (Finsert_file_contents, Fverify_visited_file_modtime):
8480 Use it to set special mtime values consistently.
8481
8482 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
8483
8484 * fileio.c (Finsert_file_contents): Properly handle st_mtime
8485 marker for non-existing file. (Bug#11852)
8486
8487 2012-07-03 Glenn Morris <rgm@gnu.org>
8488
8489 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
8490 and did not make it into globals.h).
8491
8492 2012-07-03 Tom Tromey <tromey@redhat.com>
8493
8494 * window.c (Fset_window_margins, Fset_window_fringes)
8495 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
8496 * textprop.c (Fprevious_property_change): No longer static.
8497 * syntax.c (Fsyntax_table_p): No longer static.
8498 * process.c (Fget_process, Fprocess_datagram_address): No longer
8499 static.
8500 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
8501 * keyboard.c (Fcommand_execute): No longer static.
8502 Remove EXFUN.
8503 * insdel.c (Fcombine_after_change_execute): No longer static.
8504 * image.c (Finit_image_library): No longer static.
8505 * fileio.c (Fmake_symbolic_link): No longer static.
8506 * eval.c (Ffetch_bytecode): No longer static.
8507 * editfns.c (Fuser_full_name): No longer static.
8508 * doc.c (Fdocumentation_property, Fsnarf_documentation):
8509 No longer static.
8510 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
8511 static.
8512 * dired.c (Ffile_attributes): No longer static.
8513 * composite.c (Fcomposition_get_gstring): No longer static.
8514 * callproc.c (Fgetenv_internal): No longer static.
8515
8516 * ccl.h: Remove EXFUNs.
8517 * buffer.h: Remove EXFUNs.
8518 * dispextern.h: Remove EXFUNs.
8519 * intervals.h: Remove EXFUNs.
8520 * fontset.h: Remove EXFUN.
8521 * font.h: Remove EXFUNs.
8522 * dosfns.c (system_process_attributes): Remove EXFUN.
8523 * keymap.h: Remove EXFUNs.
8524 * lisp.h: Remove EXFUNs.
8525 * w32term.h: Remove EXFUNs.
8526 * window.h: Remove EXFUNs.
8527 * xsettings.h: Remove EXFUN.
8528 * xterm.h: Remove EXFUN.
8529
8530 2012-07-03 Glenn Morris <rgm@gnu.org>
8531
8532 * lisp.h (Frandom): Make it visible to C.
8533 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
8534 buffer for invisible buffers. (Bug#1229)
8535
8536 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8537
8538 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
8539 values which aren't power of 2.
8540 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
8541 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
8542 accordingly.
8543
8544 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
8545
8546 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
8547
8548 * alloc.c (mark_object): Revert part of last patch to use `switch'.
8549
8550 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8551
8552 * alloc.c (allocate_vector_block): Remove redundant
8553 calls to mallopt if DOUG_LEA_MALLOC is defined.
8554 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
8555 avoid calls to mallopt if zero_vector is returned.
8556
8557 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8558
8559 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
8560 is enabled, avoid dereferencing NULL current_sblock if
8561 running undumped.
8562
8563 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8564
8565 Cleanup basic buffer management.
8566 * buffer.h (struct buffer): Change layout to use generic vector
8567 marking code. Fix some comments. Change type of 'clip_changed'
8568 to bitfield. Remove unused #ifndef old.
8569 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
8570 (GET_OVERLAYS_AT): Fix indentation.
8571 (for_each_per_buffer_object_at): New macro.
8572 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
8573 (Fbuffer_local_variables): Use it.
8574 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
8575 * alloc.c (allocate_buffer): Adjust to match new layout of
8576 struct buffer. Fix comment.
8577 (mark_overlay): New function.
8578 (mark_buffer): Use it. Use mark_vectorlike to mark normal
8579 Lisp area of struct buffer.
8580 (mark_object): Use it. Adjust marking of misc objects
8581 and related comments.
8582
8583 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
8584
8585 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
8586 wrapper that is not needed because the wrapped code is a no-op (zero
8587 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
8588 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
8589
8590 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
8591
8592 * alloc.c (mark_buffer): Simplify. Remove prototype.
8593 (mark_object): Add comment. Reorganize marking of vector-like
8594 objects. Use CHECK_LIVE for all vector-like objects except buffers
8595 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
8596 Avoid redundant calls to mark_vectorlike for bool vectors.
8597
8598 2012-06-30 Glenn Morris <rgm@gnu.org>
8599
8600 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
8601
8602 * epaths.in (PATH_SITELOADSEARCH): New.
8603 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
8604 This is rather than relying on --enable-locallisppath elements
8605 having "site-lisp" in their names. (Bug#10208#25, 11658)
8606
8607 2012-06-30 Eli Zaretskii <eliz@gnu.org>
8608
8609 * w32proc.c (sys_select): Accept and ignore one more argument.
8610
8611 * w32.c (emacs_gnutls_pull): Call select with one more argument.
8612
8613 * sysselect.h [DOS_NT]: Don't include sys/select.h.
8614 (pselect) [!MS_DOS]: Redirect to sys_select.
8615
8616 * sysdep.c: Don't include dos.h and dosfns.h.
8617
8618 * process.c (sys_select):
8619 * msdos.c (sys_select): Accept one more argument and ignore it.
8620
8621 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
8622 adapt data types and code to that.
8623
8624 * dosfns.c:
8625 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
8626 which clashes with the gnulib function of the same name.
8627
8628 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
8629
8630 * font.c (font_style_to_value, font_style_symbolic)
8631 (font_prop_validate_style): Add type checks for values in
8632 font_style_table.
8633
8634 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
8635 argument.
8636 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
8637 uses.
8638
8639 2012-06-29 Eli Zaretskii <eliz@gnu.org>
8640
8641 * xdisp.c (try_window_id): Undo last change.
8642
8643 * w32.c (getwd): Adjust commentary about startup_dir.
8644 (init_environment): Always call sys_access, even in non-MSVC
8645 builds. Don't chdir to the directory of the Emacs executable.
8646 This undoes code from 1997 which was justified by the need to
8647 "avoid conflicts when removing and renaming directories". But its
8648 downside was that every relative file name was being interpreted
8649 relative to the directory of the Emacs executable, which can never
8650 be TRT. In particular, it broke sys_access when called with
8651 relative file names.
8652 (sys_access): Map GetLastError to errno.
8653
8654 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8655
8656 * window.h (struct window): Change type of 'fringes_outside_margins'
8657 to bitfield. Fix comment. Adjust users accordingly.
8658 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
8659 Adjust comment.
8660 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
8661 to ptrdiff_t.
8662
8663 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
8664
8665 * gnutls.c (emacs_gnutls_handshake):
8666 Add QUIT to make the loop interruptible.
8667
8668 2012-06-29 Glenn Morris <rgm@gnu.org>
8669
8670 * charset.c (init_charset): Make lack of etc/charsets fatal.
8671
8672 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8673
8674 * editfns.c (region_limit): Fix type mismatch.
8675
8676 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8677
8678 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
8679 undefined. Convert from xassert to eassert.
8680 * nsmenu.m: Convert from xassert to eassert.
8681 * nsterm.m: Likewise.
8682
8683 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
8684
8685 * editfns.c (region_limit): Clip to narrowing (bug#11770).
8686
8687 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
8688
8689 Avoid integer overflow on scroll-left and scroll-right.
8690 * window.c (HSCROLL_MAX): New macro.
8691 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
8692 overflow when requested scroll falls outside ptrdiff_t range.
8693
8694 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8695
8696 * window.h (struct window): Change type of 'hscroll',
8697 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
8698 'last_modified' and 'last_overlay_modified' to EMACS_INT.
8699 Adjust users accordingly.
8700 * xdisp.c (try_cursor_movement): Replace type check with eassert.
8701 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
8702 from EMACS_INT to ptrdiff_t.
8703 (make_window): Omit redundant initialization.
8704
8705 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
8706
8707 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
8708
8709 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8710
8711 * window.h (struct window): Change type of 'use_time' and
8712 'sequence_number' from Lisp_Object to int.
8713 * frame.c (make_frame): Adjust users accordingly.
8714 * print.c (print_object): Likewise.
8715 * window.c (select_window, Fwindow_use_time, make_parent_window)
8716 (make_window): Likewise.
8717
8718 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8719
8720 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
8721 enabled with --enable-checking=[all,glyphs] configure option.
8722 Fix GLYPH_DEBUG usage assuming that it may be undefined,
8723 adjust comments accordingly.
8724 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
8725 undefined, adjust comments accordingly.
8726 * image.c: Likewise.
8727 * scroll.c: Likewise.
8728 * w32fns.c: Likewise.
8729 * w32term.c: Likewise.
8730 * xdisp.c: Likewise.
8731 * xfaces.c: Likewise.
8732 * xfns.c: Likewise.
8733 * xterm.c: Likewise.
8734
8735 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8736
8737 Generalize run-time debugging checks.
8738 * dispextern.h (XASSERTS): Remove.
8739 * fontset.c (xassert): Remove.
8740 Convert from xassert to eassert.
8741 * alloc.c: Convert from xassert to eassert.
8742 * bidi.c: Likewise.
8743 * dispnew.c: Likewise.
8744 * fns.c: Likewise.
8745 * fringe.c: Likewise.
8746 * ftfont.c: Likewise.
8747 * gtkutil.c: Likewise.
8748 * image.c: Likewise.
8749 * keyboard.c: Likewise.
8750 * menu.c: Likewise.
8751 * process.c: Likewise.
8752 * scroll.c: Likewise.
8753 * sound.c: Likewise.
8754 * term.c: Likewise.
8755 * w32console.c: Likewise.
8756 * w32fns.c: Likewise.
8757 * w32term.c: Likewise.
8758 * window.c: Likewise.
8759 * xdisp.c: Likewise.
8760 * xfaces.c: Likewise.
8761 * xfns.c: Likewise.
8762 * xselect.c: Likewise.
8763 * xterm.c: Likewise.
8764
8765 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
8766
8767 * fns.c (maybe_resize_hash_table): Output message when growing the
8768 purify-hashtable.
8769
8770 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8771
8772 * alloc.c (allocate_string_data): Remove dead code.
8773 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
8774 avoid GCC warning about unused macro.
8775
8776 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8777
8778 * alloc.c (allocate_string): Omit intervals initialization.
8779 * alloc.c (make_uninit_multibyte_string): Initialize intervals
8780 as in make_pure_string and make_pure_c_string.
8781
8782 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8783
8784 * alloc.c (allocate_string): Fix last change.
8785
8786 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8787
8788 * alloc.c (allocate_string): Remove two redundant calls
8789 to memset, add explicit initialization where appropriate.
8790
8791 2012-06-27 Glenn Morris <rgm@gnu.org>
8792
8793 * lisp.mk (lisp): Remove paths.elc.
8794
8795 2012-06-27 Chong Yidong <cyd@gnu.org>
8796
8797 * doc.c (Fsubstitute_command_keys): Fix punctuation.
8798
8799 2012-06-26 John Wiegley <johnw@newartisans.com>
8800
8801 * unexmacosx.c (copy_data_segment): Add two section names used
8802 on Mac OS X Lion: __mod_init_func and __mod_term_func.
8803
8804 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
8805 when building with Clang.
8806
8807 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
8808
8809 * eval.c (Fapply): Allow calling it with a single argument.
8810
8811 2012-06-26 Eli Zaretskii <eliz@gnu.org>
8812
8813 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
8814 _stricmp and _strnicmp.
8815 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
8816
8817 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8818
8819 * alloc.c (allocate_window): Zero out non-Lisp part of newly
8820 allocated window.
8821 (allocate_process): Likewise for new process.
8822 (allocate_terminal): Change to use offsetof.
8823 (allocate_frame): Likewise.
8824 * frame.c (make_frame): Omit redundant initialization.
8825 * window.c (make_parent_window): Use memset.
8826 (make_window): Omit redundant initialization.
8827 * process.c (make_process): Omit redundant initialization.
8828 * terminal.c (create_terminal): Likewise.
8829
8830 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8831
8832 * term.c (delete_tty): Remove redundant call to memset.
8833
8834 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8835
8836 * alloc.c: Remove build_string.
8837 * lisp.h: Define build_string as static inline. This provides
8838 a better opportunity to optimize away calls to strlen when the
8839 function is called with compile-time constant argument.
8840 * image.c (imagemagick_error): Convert to build_string.
8841 * w32proc.c (sys_spawnve): Likewise.
8842 * xterm.c (x_term_init): Likewise.
8843
8844 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
8845
8846 Use sprintf return value instead of invoking strlen on result.
8847 In the old days this wasn't portable, since some sprintf
8848 implementations returned char *. But they died out years ago and
8849 Emacs already assumes sprintf returns int.
8850 Similarly for float_to_string.
8851 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
8852 * ccl.c (ccl_driver):
8853 * character.c (string_escape_byte8):
8854 * data.c (Fnumber_to_string):
8855 * doprnt.c (doprnt):
8856 * print.c (print_object):
8857 * xdisp.c (message_dolog):
8858 * xfns.c (syms_of_xfns):
8859 Use sprintf or float_to_string result to avoid need to call strlen.
8860 * data.c (Fnumber_to_string):
8861 Use make_unibyte_string, since the string must be ASCII.
8862 * lisp.h, print.c (float_to_string): Now returns int length.
8863 * term.c (produce_glyphless_glyph):
8864 Use sprintf result rather than recomputing it.
8865
8866 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
8867 * Makefile.in (ALL_CFLAGS):
8868 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
8869 * gmalloc.c, regex.c: Include <config.h> unconditionally.
8870
8871 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8872
8873 * dispextern.h (xstrcasecmp): Define to library function
8874 strcasecmp if available.
8875 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
8876
8877 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
8878
8879 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
8880 Avoid comma operator.
8881 * menu.c (push_submenu_start, push_submenu_end)
8882 (push_left_right_boundary, push_menu_pane): Likewise.
8883 * msdos.c (dos_rawgetc): Likewise.
8884
8885 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8886
8887 * xfns.c (xic_create_fontsetname): Remove redundant calls
8888 to memset.
8889
8890 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
8891
8892 * gtkutil.c (get_utf8_string): Remove redundant assignment.
8893 sprintf already null-terminates its output.
8894
8895 * xfns.c (x_window): Remove redundant cast.
8896
8897 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8898
8899 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
8900 `const char *' to `char *' to avoid compiler warning.
8901
8902 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8903
8904 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
8905 instead of truncating it to 63 (admittedly a generous limit).
8906
8907 * process.c: Fix spelling and caps in comments.
8908
8909 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
8910
8911 * emacs.c (setpgrp): Remove definition, unused.
8912 * sysdep.c (setpgrp): Remove definition, not used in this file.
8913
8914 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
8915
8916 * makefile.w32-in: Update dependencies.
8917
8918 2012-06-24 Eli Zaretskii <eliz@gnu.org>
8919
8920 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
8921 (SYSTIME_H): Add nt/inc/sys/time.h.
8922
8923 * systime.h [WINDOWSNT]: Include sys/time.h.
8924
8925 * s/ms-w32.h (struct timespec): Definition moved from
8926 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
8927
8928 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8929
8930 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
8931 * buffer.h (buffer_slot_type_mismatch):
8932 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8933 * eval.c (unwind_to_catch):
8934 * image.c (my_png_error, my_error_exit):
8935 * keyboard.c (quit_throw_to_read_char, user_error)
8936 (Fexit_recursive_edit, Fabort_recursive_edit):
8937 * lisp.h (die, args_out_of_range, args_out_of_range_3)
8938 (wrong_type_argument, buffer_overflow, __executable_start)
8939 (memory_full, buffer_memory_full, string_overflow, Fthrow)
8940 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
8941 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
8942 (fatal):
8943 (child_setup) [!DOS_NT]:
8944 * lread.c (end_of_file_error, invalid_syntax):
8945 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8946 * puresize.h (pure_write_error):
8947 * search.c (matcher_overflow):
8948 * sound.c (sound_perror, alsa_sound_perror):
8949 * sysdep.c, syssignal.h (croak):
8950 * term.c (maybe_fatal, vfatal):
8951 * textprop.c (text_read_only):
8952 * undo.c (user_error):
8953 * unexmacosx.c (unexec_error):
8954 * xterm.c (x_ins_del_lines, x_delete_glyphs):
8955 Use _Noreturn rather than NO_RETURN.
8956 No need for separate decl merely because of _Noreturn.
8957 * sound.c (sound_warning, parse_sound):
8958 Remove unnecessary forward decls.
8959
8960 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8961
8962 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
8963 * lisp.h (WAIT_READING_MAX): New macro.
8964 * dispnew.c (Fsleep_for, sit_for):
8965 * keyboard.c (kbd_buffer_get_event):
8966 * process.c (Faccept_process_output):
8967 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
8968 This improves on the previous patch, which introduced a bug
8969 when time_t is unsigned and as wide as intmax_t.
8970 See <http://bugs.gnu.org/9000#51>.
8971
8972 2012-06-23 Eli Zaretskii <eliz@gnu.org>
8973
8974 * dispnew.c (sit_for, Fsleep_for):
8975 * keyboard.c (kbd_buffer_get_event):
8976 * process.c (Faccept_process_output): Avoid compiler warnings when
8977 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
8978
8979 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
8980
8981 * makefile.w32-in: Update dependencies.
8982
8983 * w32.c (ltime): Add return type and declare static.
8984 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
8985
8986 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
8987
8988 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
8989 Privately reported by Herbert J. Skuhra.
8990 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
8991 All uses changed.
8992 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
8993 not make_lisp_timeval, when the argument is of type EMACS_TIME.
8994
8995 2012-06-23 Eli Zaretskii <eliz@gnu.org>
8996
8997 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
8998 last argument of make_unibyte_string.
8999
9000 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
9001 language ID in the event parameters.
9002
9003 * w32term.c (w32_read_socket): Put the new keyboard codepage into
9004 event.code, not the obscure "character set ID".
9005
9006 2012-06-23 Chong Yidong <cyd@gnu.org>
9007
9008 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
9009
9010 2012-06-23 Eli Zaretskii <eliz@gnu.org>
9011
9012 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
9013 * w32.c (fdutimens): New function.
9014
9015 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
9016
9017 * s/ms-w32.h (pselect): Redirect to sys_select.
9018
9019 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
9020
9021 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
9022 in the logic of incrementing and decrementing the value of
9023 use_relocatable_buffers.
9024
9025 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
9026
9027 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
9028 Privately reported by Herbert J. Skuhra.
9029 [__FreeBSD__]: Remove "*/" typo after "#include".
9030 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
9031 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
9032 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
9033 Don't assume EMACS_TIME and struct timeval are the same type.
9034
9035 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
9036
9037 Support higher-resolution time stamps (Bug#9000).
9038 The time stamps are only nanosecond-resolution at the C level,
9039 since that's the best that any real-world system supports now.
9040 But they are picosecond-resolution at the Lisp level, as that's
9041 easy, and leaves room for future OS improvements.
9042
9043 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
9044 (LIBES): Use it.
9045
9046 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
9047 Don't get current time unless it's needed.
9048
9049 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
9050 now provides it if it's absent.
9051 (start_atimer): Port to higher-res time stamps.
9052 Check for time stamp overflow. Don't get current time more
9053 often than is needed.
9054
9055 * buffer.h (struct buffer): Buffer modtime now has high resolution.
9056 Include systime.h, not time.h.
9057 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
9058
9059 * dired.c: Include stat-time.h.
9060 (Ffile-attributes): File times now have higher resolution.
9061
9062 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
9063 (struct image): Timestamp now has higher resolution.
9064
9065 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
9066 has at least microseconds now. All uses removed.
9067 (update_frame, update_single_window, update_window, update_frame_1)
9068 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
9069 (duration_to_sec_usec): Remove; no longer needed.
9070
9071 * editfns.c (time_overflow): Now extern.
9072 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
9073 (float-time, Fformat_time_string, Fcurrent_time_string)
9074 (Fcurrent_time_zone): Accept and generate higher-resolution
9075 time stamps.
9076 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
9077 (decode_time_components, lisp_seconds_argument): New functions.
9078 (make_time): Now static.
9079 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
9080 Report an error if the time is invalid, rather than having the caller
9081 do that.
9082
9083 * fileio.c: Include <stat-time.h>
9084 (Fcopy_file): Copy higher-resolution time stamps.
9085 Prefer to set the time stamp via a file descriptor if that works.
9086 (Fset_file_times, Finsert_file_contents, Fwrite_region)
9087 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
9088 (Fvisited_file_modtime, Fset_visited_file_modtime):
9089 Support higher-resolution time stamps.
9090
9091 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
9092
9093 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
9094
9095 * image.c (prepare_image_for_display, clear_image_cache)
9096 (lookup_image): Port to higer-resolution time stamps.
9097
9098 * keyboard.c (start_polling, bind_polling_period):
9099 Check for time stamp overflow.
9100 (read_char, kbd_buffer_get_event, timer_start_idle)
9101 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
9102 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
9103 Port to higher-resolution time stamps. Do not assume time_t is signed.
9104 (decode_timer): New function. Timers are now vectors of length 9,
9105 not 8, to accommodate the picosecond component.
9106 (timer_check_2): Use it.
9107
9108 * nsterm.m (select_timeout, timeval_subtract): Remove.
9109 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
9110 as they're a bit more accurate and handle overflow better.
9111 (ns_select): Change prototype to be compatible with pselect.
9112 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
9113 * nsterm.h (ns_select): Adjust prototype.
9114
9115 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
9116 us-resolution time stamps.
9117 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
9118
9119 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
9120
9121 * lisp.h (time_overflow): New decl.
9122 (wait_reading_process_output): First arg is now intmax_t, not int,
9123 to accommodate larger waits.
9124
9125 * process.h (struct Lisp_Process.read_output_delay):
9126 Now counts nanoseconds, not microseconds.
9127 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
9128 EMACS_HAS_USECS.
9129 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
9130 (wait_reading_process_output):
9131 Port to ns-resolution time stamps.
9132 (Faccept_process_output, wait_reading_process_output):
9133 Check for time stamp overflow. Do not assume time_t is signed.
9134 (select_wrapper): Remove; we now use pselect.
9135 (Fprocess_attributes): Now generates ns-resolution time stamps.
9136
9137 * sysdep.c: Include utimens.h. Don't include utime.h
9138 or worry about struct utimbuf; gnulib does that for us now.
9139 (gettimeofday): Remove; gnulib provides a substitute.
9140 (make_timeval): New function.
9141 (set_file_times): Now sets ns-resolution time stamps.
9142 New arg FD; all uses changed.
9143 (time_from_jiffies, ltime_from_jiffies, get_up_time)
9144 (system_process_attributes):
9145 Now returns ns-resolution time stamp. All uses changed.
9146 Check for time stamp overflow.
9147
9148 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
9149 provides a substitute now.
9150
9151 * systime.h: Include timespec.h rather than sys/time.h and time.h,
9152 since it guarantees struct timespec.
9153 (EMACS_TIME): Now struct timespec, so that we can support
9154 ns-resolution time stamps.
9155 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
9156 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
9157 (EMACS_USECS): Remove.
9158 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
9159 so multiply the arg by 1000 before storing it.
9160 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
9161 New macros.
9162 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
9163 Port to ns-resolution time stamps.
9164 (EMACS_TIME_NEG_P): Remove; replaced by....
9165 (EMACS_TIME_SIGN): New macro.
9166 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
9167 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
9168 (set_file_times, make_time, lisp_time_argument): Adjust signature.
9169 (make_timeval, make_lisp_time, decode_time_components): New decls.
9170 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
9171 that it mishandled time_t overflow. You can't compare by subtracting!
9172 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
9173 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
9174
9175 * term.c: Include <sys/time.h>.
9176 (timeval_to_Time): New function, for proper overflow wraparound.
9177 (term_mouse_position, term_mouse_click): Use it.
9178
9179 * undo.c (record_first_change): Support higher-resolution time stamps
9180 in the undo buffer.
9181 (Fprimitive_undo): Use them when restoring time stamps.
9182
9183 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
9184 (w32_get_internal_run_time):
9185 Port to higher-resolution Emacs time stamps.
9186 (ltime): Now accepts single 64-bit integer, as that's more convenient
9187 for callers.
9188
9189 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
9190
9191 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
9192 for compatibility with pselect. Support ns-resolution time stamps.
9193
9194 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
9195
9196 * xselect.c (wait_for_property_change, x_get_foreign_selection):
9197 Check for time stamp overflow, and support ns-resolution time stamps.
9198
9199 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
9200 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
9201 (timeval_subtract): Remove; no longer needed.
9202 (XTflash, XTring_bell, x_wait_for_event):
9203 Port to ns-resolution time stamps. Don't assume time_t is signed.
9204
9205 2012-06-22 Chong Yidong <cyd@gnu.org>
9206
9207 * xdisp.c (x_consider_frame_title): Revert last change.
9208
9209 2012-06-22 Eli Zaretskii <eliz@gnu.org>
9210
9211 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
9212 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
9213 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
9214 staticidx goes up to 1597 out of 1600 = 0x640.)
9215
9216 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
9217
9218 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
9219 Otherwise, the umask might be mistakenly 0 while handling input signals.
9220
9221 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
9222
9223 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
9224
9225 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
9226
9227 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
9228 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
9229 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
9230 access to `contents' member of Lisp_Vector objects with AREF and ASET
9231 where appropriate.
9232
9233 2012-06-19 Chong Yidong <cyd@gnu.org>
9234
9235 * frame.c (delete_frame): When selecting a frame on a different
9236 text terminal, do not alter the terminal's top-frame.
9237
9238 * xdisp.c (format_mode_line_unwind_data): Record the target
9239 frame's selected window and its terminal's top-frame.
9240 (unwind_format_mode_line): Restore them.
9241 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
9242 Callers changed.
9243 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
9244 since tty frames can be explicitly named.
9245 (prepare_menu_bars): Likewise.
9246
9247 * term.c (Ftty_top_frame): New function.
9248
9249 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
9250
9251 Port byte-code-meter to modern targets.
9252 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
9253 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
9254 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
9255 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
9256 (METER_1, METER_2): Simplify.
9257
9258 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
9259
9260 * data.c (Fdefalias): Return `symbol' (bug#11686).
9261
9262 2012-06-18 Martin Rudalics <rudalics@gmx.at>
9263
9264 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
9265 gets killed during executing of this function (Bug#11665).
9266 Try to always return Qt when the buffer has been actually killed.
9267 (Vkill_buffer_query_functions): In doc-string say that functions
9268 run by this hook should not change the current buffer.
9269
9270 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
9271
9272 Fix recently-introduced process.c problems found by static checking.
9273 * process.c (write_queue_push, write_queue_pop, send_process):
9274 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
9275 (write_queue_pop): Fix pointer signedness problem.
9276 (send_process): Remove unused local.
9277
9278 2012-06-17 Chong Yidong <cyd@gnu.org>
9279
9280 * xdisp.c (redisplay_internal): No need to redisplay terminal
9281 frames that are not on top.
9282
9283 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
9284
9285 * process.c (make_process): Initialize write_queue.
9286 (write_queue_push, write_queue_pop): New functions.
9287 (send_process): Use them to maintain correct ordering of process
9288 writes (Bug#10815).
9289
9290 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
9291
9292 * lisp.h (eassert): Assume C89 or later.
9293 This removes the need for CHECK.
9294 (CHECK): Remove. Its comments about always evaluating its
9295 argument were confusing, as 'eassert' typically does not evaluate
9296 its argument.
9297
9298 * coding.c (produce_chars): Use ptrdiff_t, not int.
9299
9300 * xterm.c (x_draw_underwave): Check for integer overflow.
9301 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
9302
9303 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
9304
9305 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
9306 referenced (Bug#11583).
9307
9308 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
9309
9310 Implement wave-style variant of underlining.
9311 * dispextern.h (face_underline_type): New enum.
9312 (face): Add field for underline type.
9313 * nsterm.m (ns_draw_underwave): New function.
9314 (ns_draw_text_decoration): Use it.
9315 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
9316 New functions.
9317 (x_draw_glyph_string): Use them.
9318 * xfaces.c (Qline, Qwave): New Lisp objects.
9319 (check_lface_attrs, merge_face_ref)
9320 (Finternal_set_lisp_face_attribute, realize_x_face):
9321 Handle wave-style underline face attributes.
9322 * xterm.c (x_draw_underwave): New function.
9323 (x_draw_glyph_string): Use it.
9324
9325 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
9326
9327 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
9328 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
9329 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
9330 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
9331 ($(BLD)/w32select.$(O)): Update dependencies.
9332
9333 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
9334
9335 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
9336 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
9337 * character.c (_fetch_multibyte_char_p): Remove.
9338 * alloc.c: Include "character.h" before "buffer.h".
9339 * bidi.c: Likewise.
9340 * buffer.c: Likewise.
9341 * bytecode.c: Likewise.
9342 * callint.c: Likewise.
9343 * callproc.c: Likewise.
9344 * casefiddle.c: Likewise.
9345 * casetab.c: Likewise.
9346 * category.c: Likewise.
9347 * cmds.c: Likewise.
9348 * coding.c: Likewise.
9349 * composite.c: Likewise.
9350 * dired.c: Likewise.
9351 * dispnew.c: Likewise.
9352 * doc.c: Likewise.
9353 * dosfns.c: Likewise.
9354 * editfns.c: Likewise.
9355 * emacs.c: Likewise.
9356 * fileio.c: Likewise.
9357 * filelock.c: Likewise.
9358 * font.c: Likewise.
9359 * fontset.c: Likewise.
9360 * fringe.c: Likewise.
9361 * indent.c: Likewise.
9362 * insdel.c: Likewise.
9363 * intervals.c: Likewise.
9364 * keyboard.c: Likewise.
9365 * keymap.c: Likewise.
9366 * lread.c: Likewise.
9367 * macros.c: Likewise.
9368 * marker.c: Likewise.
9369 * minibuf.c: Likewise.
9370 * nsfns.m: Likewise.
9371 * nsmenu.m: Likewise.
9372 * print.c: Likewise.
9373 * process.c: Likewise.
9374 * regex.c: Likewise.
9375 * region-cache.c: Likewise.
9376 * search.c: Likewise.
9377 * syntax.c: Likewise.
9378 * term.c: Likewise.
9379 * textprop.c: Likewise.
9380 * undo.c: Likewise.
9381 * unexsol.c: Likewise.
9382 * w16select.c: Likewise.
9383 * w32fns.c: Likewise.
9384 * w32menu.c: Likewise.
9385 * window.c: Likewise.
9386 * xdisp.c: Likewise.
9387 * xfns.c: Likewise.
9388 * xmenu.c: Likewise.
9389 * xml.c: Likewise.
9390 * xselect.c: Likewise.
9391
9392 2012-06-16 Eli Zaretskii <eliz@gnu.org>
9393
9394 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
9395 If all the glyphs of the glyph row came from strings, and we have no
9396 cursor positioning clues, put the cursor on the first glyph of the
9397 row.
9398 (handle_face_prop): Use chunk-relative overlay string index when
9399 indexing into it->string_overlays array. (Bug#11653)
9400 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
9401 the rightmost. (Bug#11720)
9402
9403 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
9404
9405 * category.h (CHAR_HAS_CATEGORY): Define as inline.
9406 (CATEGORY_MEMBER): Enforce 1/0 value.
9407 * category.c (_temp_category_set): Remove.
9408
9409 2012-06-16 Eli Zaretskii <eliz@gnu.org>
9410
9411 * window.c (Fdelete_other_windows_internal)
9412 (Fdelete_window_internal): Don't access frame's mouse highlight
9413 info of the initial frame. (Bug#11677)
9414
9415 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
9416
9417 * .gdbinit (xgetint): Fix recently-introduced paren typo.
9418 Assume USE_2_TAGS_FOR_INTS.
9419 (xreload): Adjust $tagmask width to match recent lisp.h change.
9420
9421 Simplify lisp.h in minor ways that should not affect code.
9422 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
9423 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
9424 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
9425 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
9426 (INTTYPEBITS): New macro, for clarity.
9427 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
9428 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
9429 Simplify now that USE_LSB_TAG is always defined.
9430 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
9431 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
9432
9433 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
9434
9435 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
9436
9437 2012-06-13 Glenn Morris <rgm@gnu.org>
9438
9439 * s/bsd-common.h (BSD4_3):
9440 * s/usg5-4-common.h (USG5_4): No longer define; unused.
9441
9442 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
9443
9444 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
9445 instead of union.
9446 (XLI, XIL): Define.
9447 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
9448 Use them.
9449 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
9450 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
9451 * alloc.c (widen_to_Lisp_Object): Remove.
9452 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
9453 * frame.c (delete_frame): Remove outdated comment.
9454 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
9455 USE_LISP_UNION_TYPE.
9456 (Fw32_unregister_hot_key): Likewise.
9457 (Fw32_toggle_lock_key): Likewise.
9458 * w32menu.c (add_menu_item): Likewise.
9459 (w32_menu_display_help): Use XIL instead of checking
9460 USE_LISP_UNION_TYPE.
9461 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
9462 (init_heap): Likewise.
9463 * w32term.c (w32_read_socket): Update comment.
9464
9465 2012-06-13 Glenn Morris <rgm@gnu.org>
9466
9467 * s/usg5-4-common.h, src/s/unixware.h:
9468 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
9469
9470 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
9471
9472 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
9473
9474 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
9475 * alloc.c (make_number) [!defined make_number]:
9476 Remove, as lisp.h always defines this now.
9477 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
9478 (roundup_size): Verify that it is a power of 2.
9479 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
9480 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
9481 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
9482 -DUSE_LSB_TAG=0, to override the automatically-selected default.
9483 USE_LSB_TAG now is always defined to be either 0 or 1.
9484 All uses changed.
9485 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
9486 code works fine either way, and efficiency is not a concern here,
9487 as the union type is for debugging, not for production.
9488 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
9489 Use an inline function on all platforms when using the union type,
9490 since this is simpler and 'static inline' can be used portably
9491 within Emacs now.
9492 (LISP_INITIALLY_ZERO): New macro.
9493 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
9494 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
9495
9496 2012-06-12 Glenn Morris <rgm@gnu.org>
9497
9498 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
9499
9500 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
9501
9502 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
9503 Move BROKEN_SIGIO to configure.
9504
9505 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
9506 Move NO_TERMIO to configure.
9507
9508 2012-06-12 Chong Yidong <cyd@gnu.org>
9509
9510 * image.c (imagemagick_load_image): Use MagickFlattenImage if
9511 MagickMergeImageLayers is undefined. Use pixel pusher loop if
9512 MagickExportImagePixels is undefined.
9513
9514 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
9515
9516 * image.c (imagemagick_load_image): Remove unused label.
9517
9518 2012-06-11 Glenn Morris <rgm@gnu.org>
9519
9520 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
9521 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
9522 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
9523 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
9524
9525 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
9526
9527 * alloc.c (make_byte_code): New function.
9528 (Fmake_byte_code): Use it. Don't purify here.
9529 * lread.c (read1): Use it as well to avoid extra allocation.
9530
9531 2012-06-11 Chong Yidong <cyd@gnu.org>
9532
9533 * image.c (imagemagick_load_image): Implement transparency.
9534
9535 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
9536
9537 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
9538 account for preceding backslashes. (Bug#11663)
9539
9540 2012-06-09 Chong Yidong <cyd@gnu.org>
9541
9542 * term.c: Support italics in capable terminals (Bug#9652).
9543 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
9544 (turn_on_face): Output using TS_enter_italic_mode if available.
9545 Don't handle unused blinking and alt-charset cases.
9546 (turn_off_face): Handle italic case; discard unused tty_blinking_p
9547 and tty_alt_charset_p cases.
9548 (tty_capable_p, init_tty): Support italics.
9549
9550 * termchar.h (struct tty_display_info): Add field for italics.
9551 Remove unused blink field.
9552
9553 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
9554 Handle slant.
9555
9556 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
9557 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
9558 tty_alt_charset_p. Add tty_italic_p.
9559
9560 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
9561
9562 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
9563 dbus_type_is_basic if available.
9564 (xd_extract_signed, xd_extract_unsigned): Rename from
9565 extract_signed and extract_unsigned, respectively. Adapt callers.
9566
9567 2012-06-09 Chong Yidong <cyd@gnu.org>
9568
9569 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
9570
9571 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
9572 case (Bug#9752).
9573
9574 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
9575
9576 * xdisp.c (vmessage): Treat frame message as multibyte.
9577 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
9578 would generate the diagnostic "Making \302\247 buffer-local while
9579 let-bound!".
9580
9581 2012-06-08 Eli Zaretskii <eliz@gnu.org>
9582
9583 * dispnew.c (showing_window_margins_p): Undo last change, which
9584 was done due to an inadvertent commit.
9585 (adjust_frame_glyphs_for_frame_redisplay): Do call
9586 showing_window_margins_p.
9587
9588 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9589
9590 * eval.c (Fmake_var_non_special): New primitive.
9591 (syms_of_eval): Defsubr it.
9592 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
9593
9594 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
9595
9596 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
9597 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
9598
9599 2012-06-08 Eli Zaretskii <eliz@gnu.org>
9600
9601 * alloc.c (allocate_vectorlike): Fix last change.
9602
9603 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
9604
9605 Block-based vector allocation of small vectors.
9606 * lisp.h (struct vectorlike_header): New field `nbytes',
9607 adjust comment accordingly.
9608 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
9609 to denote vector blocks. Adjust users (live_vector_p,
9610 mark_maybe_pointer, valid_lisp_object_p) accordingly.
9611 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
9612 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
9613 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
9614 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
9615 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
9616 (roundup_size): New constant.
9617 (struct vector_block): New data type.
9618 (vector_blocks, vector_free_lists, zero_vector): New variables.
9619 (all_vectors): Rename to `large_vectors'.
9620 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
9621 (sweep_vectors): New functions.
9622 (allocate_vectorlike): Return `zero_vector' as the only vector of
9623 0 items. Allocate new vector from block if vector size is less than
9624 or equal to VBLOCK_BYTES_MAX.
9625 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
9626 (init_alloc_once): Add call to init_vectors.
9627
9628 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9629
9630 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
9631
9632 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
9633
9634 * doprnt.c (doprnt): Truncate multibyte char correctly.
9635 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
9636 would mishandle a string argument "Xc" if X was a multibyte
9637 character of length 2: it would truncate after X's first byte
9638 rather than including all of X.
9639
9640 2012-06-06 Chong Yidong <cyd@gnu.org>
9641
9642 * buffer.c (word_wrap): Doc fix.
9643
9644 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
9645
9646 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
9647
9648 2012-06-03 Glenn Morris <rgm@gnu.org>
9649
9650 * xdisp.c (tool-bar-style): Doc fix.
9651
9652 2012-06-03 Ulrich Müller <ulm@gentoo.org>
9653
9654 * Makefile.in (PAXCTL): Define.
9655 (temacs$(EXEEXT)): Disable memory randomization for the temacs
9656 binary via PaX flags if the paxctl utility is available.
9657 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
9658 Restore PaX flags to their default. (Bug#11398)
9659
9660 2012-06-03 Chong Yidong <cyd@gnu.org>
9661
9662 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
9663 buffer (Bug#11226).
9664
9665 2012-06-03 Chong Yidong <cyd@gnu.org>
9666
9667 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
9668 (note_mode_line_or_margin_highlight): If there is no help echo,
9669 use mode-line-default-help-echo. Handle the case where the mouse
9670 position is past the end of the mode line string.
9671
9672 * buffer.c (buffer_local_value_1): New function, split from
9673 Fbuffer_local_value; can return Qunbound.
9674 (Fbuffer_local_value): Use it.
9675 (Vmode_line_format): Docstring tweaks.
9676
9677 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 * sysdep.c (system_process_attributes): Improve comment.
9680
9681 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
9682
9683 * keyboard.c: Export real-this-command to Elisp.
9684 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
9685 and DEFVAR it. Update all users.
9686
9687 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 * minibuf.c (Fassoc_string): Remove duplicate declaration.
9690
9691 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
9692 Convert pctcpu and pctmem to Lisp float properly.
9693 Let the compiler fold better, as 100.0/0x8000 is exact.
9694
9695 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
9696
9697 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
9698 cons_block.
9699
9700 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
9701
9702 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
9703
9704 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
9705
9706 For a 'struct window', replace some Lisp_Object fields to
9707 bitfields where appropriate, remove unused fields.
9708 * window.h (struct window): Remove unused 'last_mark_x' and
9709 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
9710 change its type from Lisp_Object to bitfield.
9711 Change type of 'force_start', 'optional_new_start',
9712 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
9713 fields from Lisp_Object to bitfield. Adjust users accordingly.
9714
9715 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9716
9717 Pacify gcc -Wdouble-precision when using Xaw.
9718 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
9719 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
9720 Use 'float' consistently, rather than 'float' in most places
9721 and 'double' in a couple of places.
9722
9723 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9724
9725 * xdisp.c (handle_stop): Detect whether we have overlay strings
9726 loaded by testing it->current.overlay_string_index to be
9727 non-negative, instead of checking whether n_overlay_strings is
9728 positive. (Bug#11587)
9729
9730 2012-05-31 Chong Yidong <cyd@gnu.org>
9731
9732 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
9733
9734 * doc.c (Fsubstitute_command_keys): Doc fix.
9735
9736 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9737
9738 * search.c (search_buffer): Remove calls to
9739 r_alloc_inhibit_buffer_relocation, as it is now called by
9740 maybe_unify_char, which was the cause of relocation of buffer text
9741 in bug#11519.
9742
9743 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9744
9745 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
9746 for the duration of call to load_charset, to avoid problems with
9747 callers of maybe_unify_char that access buffer text through C
9748 pointers.
9749
9750 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
9751 decrement the inhibition flag, instead of just setting or
9752 resetting it.
9753
9754 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9755
9756 Remove obsolete '#define static' cruft.
9757 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
9758 This #undef was "temporary" in 2000; it is no longer needed
9759 now that '#define static' has gone away.
9760 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
9761 (gray_bitmap_bits): Remove; no longer needed.
9762 All uses replaced with definiens.
9763 * xterm.c: Include "bitmaps/gray.xbm".
9764
9765 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9766
9767 Clean up __executable_start, monstartup when --enable-profiling.
9768 The following changes affect the code only when profiling.
9769 * dispnew.c (__executable_start): Rename from safe_bcopy.
9770 Define only on platforms that need it.
9771 * emacs.c: Include <sys/gmon.h> when profiling.
9772 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
9773 (__executable_start): Remove decl, since lisp.h does it now.
9774 (safe_bcopy): Remove decl; no longer has that name.
9775 (main): Coalesce #if into single bit of code, for simplicity.
9776 Cast pointers to uintptr_t, since standard libraries want integers
9777 and not pointers.
9778 * lisp.h (__executable_start): New decl.
9779
9780 2012-05-31 Glenn Morris <rgm@gnu.org>
9781
9782 * image.c (Fimagemagick_types): Doc fix.
9783
9784 2012-05-30 Jim Meyering <meyering@redhat.com>
9785
9786 * callproc.c (Fcall_process_region): Include directory component
9787 in mkstemp error message (Bug#11586).
9788
9789 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9790
9791 * alloc.c, lisp.h (make_pure_vector): Now static.
9792
9793 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
9794
9795 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
9796 Move to byte-run.el.
9797 (Fautoload): Do the hash-doc more carefully.
9798 * data.c (Fdefalias): Purify definition, except for keymaps.
9799 (Qdefun): Move from eval.c.
9800 * lisp.h (Qdefun): Remove.
9801 * lread.c (read1): Tiny simplification.
9802
9803 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
9804
9805 Do not create empty overlays with the evaporate property (Bug#9642).
9806 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
9807 Bug#9642, but explicitly check that the buffer the overlay would
9808 be moved to is live and rearrange lines to make sure that errors
9809 will not put the overlay in an inconsistent state.
9810 (Fdelete_overlay): Cosmetics.
9811
9812 2012-05-28 Eli Zaretskii <eliz@gnu.org>
9813
9814 * w32term.c (my_bring_window_to_top): New function.
9815 (x_raise_frame): Use handle returned by DeferWindowPos, which
9816 could be different from the original one.
9817 Call my_bring_window_to_top instead of my_set_foreground_window.
9818 (Bug#11513)
9819
9820 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
9821 by calling BringWindowToTop.
9822
9823 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
9824 (WM_EMACS_END): Increase by one.
9825
9826 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
9827
9828 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
9829 This avoids undefined behavior that might cause the eassert
9830 to not catch an out-of-range value.
9831
9832 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
9833
9834 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
9835 Update dependencies.
9836
9837 2012-05-27 Eli Zaretskii <eliz@gnu.org>
9838
9839 * bidi.c (bidi_mirror_char): Fix last change.
9840
9841 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
9842
9843 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
9844 when referring to sectname field in printf format.
9845
9846 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
9847
9848 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
9849 Only r_alloc_inhibit_buffer_relocation needed to be added;
9850 the others were already declared.
9851
9852 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
9853 before checking whether it's out of range. Put the check inside
9854 eassert. See
9855 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
9856
9857 2012-05-27 Ken Brown <kbrown@cornell.edu>
9858
9859 * callproc.c (Fcall_process): Restore a line that was accidentally
9860 commented out in the 2011-02-13 change (bug#11547).
9861
9862 2012-05-27 Eli Zaretskii <eliz@gnu.org>
9863
9864 * lisp.h [REL_ALLOC]: Add prototypes for external functions
9865 defined on ralloc.c.
9866
9867 * buffer.c [REL_ALLOC]: Remove prototypes of
9868 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
9869 they are now on lisp.h.
9870
9871 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
9872
9873 * search.c (search_buffer): Use it to inhibit relocation of buffer
9874 text while re_search_2 is doing its job, because re_search_2 is
9875 passed C pointers to buffer text. (Bug#11519)
9876
9877 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
9878 Update value to 24.
9879
9880 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
9881 state after an additional call to move_it_in_display_line_to, keep
9882 the values of it->max_ascent and it->max_descent found for the
9883 entire line.
9884 (pos_visible_p): Revert the comparison against bottom_y to what it
9885 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
9886 (Bug#11464)
9887
9888 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 Fix coding-related core dumps with gcc -ftrapv.
9891 The code was computing A - B, where A and B are pointers, and B is
9892 random garbage. This can lead to core dumps on platforms that
9893 have special pointer registers, and it also leads to core dumps on
9894 x86-64 when compiled with gcc -ftrapv. The fix is to compute
9895 A - B only when B is initialized properly.
9896 * coding.c (coding_set_source, coding_set_destination): Return void.
9897 (coding_change_source, coding_change_destinations): New functions,
9898 with the old behaviors of coding_set_source and coding_set_destination.
9899 All callers that need an offset changed to use these new functions.
9900
9901 2012-05-26 Glenn Morris <rgm@gnu.org>
9902
9903 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
9904
9905 2012-05-26 Eli Zaretskii <eliz@gnu.org>
9906
9907 Extend mouse support on W32 text-mode console.
9908 * xdisp.c (draw_row_with_mouse_face):
9909 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
9910
9911 * w32console.c: Include window.h.
9912 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
9913 New functions.
9914 (initialize_w32_display): Initialize mouse-highlight data.
9915
9916 * w32inevt.c: Include termchar.h and window.h.
9917 (do_mouse_event): Support mouse-autoselect-window. When the mouse
9918 moves, call note_mouse_highlight. If help_echo changed, call
9919 gen_help_event to produce help-echo message in the echo area.
9920 Call clear_mouse_face if mouse_face_hidden is set in the mouse
9921 highlight info.
9922
9923 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9924
9925 * lread.c (read1): Simplify slightly to avoid an overflow warning
9926 with GCC 4.7.0 on x86-64.
9927
9928 2012-05-26 Eli Zaretskii <eliz@gnu.org>
9929
9930 * bidi.c (bidi_mirror_char): Revert last change: an int is
9931 definitely wide enough here.
9932
9933 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
9934
9935 Fix integer width and related bugs (Bug#9874).
9936 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
9937 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
9938 (string_bytes, check_sblock, allocate_string_data):
9939 (compact_small_strings, Fmake_bool_vector, make_string)
9940 (make_unibyte_string, make_multibyte_string)
9941 (make_string_from_bytes, make_specified_string)
9942 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
9943 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
9944 (mark_vectorlike):
9945 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9946 (allocate_pseudovector):
9947 Use int, not EMACS_INT, where int is wide enough.
9948 (inhibit_garbage_collection, Fgarbage_collect):
9949 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9950 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
9951 int might not be wide enough.
9952 (bidi_cache_search, bidi_cache_find, bidi_init_it)
9953 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
9954 (bidi_at_paragraph_end, bidi_find_paragraph_start)
9955 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
9956 (bidi_level_of_next_char, bidi_move_to_visually_next):
9957 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9958 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
9959 (Fkill_buffer, Fset_buffer_major_mode)
9960 (advance_to_char_boundary, Fbuffer_swap_text)
9961 (Fset_buffer_multibyte, overlays_at, overlays_in)
9962 (overlay_touches_p, struct sortvec, record_overlay_string)
9963 (overlay_strings, recenter_overlay_lists)
9964 (adjust_overlays_for_insert, adjust_overlays_for_delete)
9965 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
9966 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
9967 (Foverlay_recenter, last_overlay_modification_hooks_used)
9968 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
9969 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9970 (validate_region): Omit unnecessary test for b <= e,
9971 since that's guaranteed by the previous test.
9972 (adjust_overlays_for_delete): Avoid pos + length overflow.
9973 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
9974 (report_overlay_modification):
9975 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9976 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
9977 Omit pointer cast, which isn't needed anyway, and doesn't work
9978 after the EMACS_INT -> ptrdiff_t change.
9979 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
9980 * buffer.h: Adjust decls to match defn changes elsewhere.
9981 (struct buffer_text, struct buffer):
9982 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9983 Use EMACS_INT, not int, where int might not be wide enough.
9984 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
9985 not int, to avoid needless 32-bit limit on 64-bit hosts.
9986 (exec_byte_code): Use tighter memory-full test, one that checks
9987 for alloca overflow. Don't compute the address of the object just
9988 before an array, as that's not portable. Use EMACS_INT, not
9989 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
9990 * callint.c (Fcall_interactively):
9991 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9992 * callproc.c (call_process_kill, Fcall_process):
9993 Don't assume pid_t fits into an Emacs fixnum.
9994 (call_process_cleanup, Fcall_process, child_setup):
9995 Don't assume pid_t fits into int.
9996 (call_process_cleanup, Fcall_process, delete_temp_file)
9997 (Fcall_process_region):
9998 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9999 (Fcall_process): Simplify handling of volatile integers.
10000 Use int, not EMACS_INT, where int will do.
10001 * casefiddle.c (casify_object, casify_region, operate_on_word)
10002 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
10003 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10004 (casify_object): Avoid integer overflow when overallocating buffer.
10005 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
10006 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
10007 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
10008 * category.h (CATEGORYP): Don't assume arg is nonnegative.
10009 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
10010 integers are now checked earlier. All uses replaced with XINT.
10011 (ccl_driver):
10012 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10013 For CCL_MapSingle, check that content and value are in int range.
10014 (ccl_driver, Fregister_code_conversion_map):
10015 Check that Vcode_version_map_vector is a vector.
10016 (resolve_symbol_ccl_program): Check that vector header is in range.
10017 Always copy the vector, so that we can check its contents reliably
10018 now rather than having to recheck each instruction as it's being
10019 executed. Check that vector words fit in 'int'.
10020 (ccl_get_compiled_code, Fregister_ccl_program)
10021 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
10022 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
10023 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
10024 contents are in range.
10025 (Fccl_execute_on_string): Check that status is in range.
10026 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
10027 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
10028 Accept and return EMACS_INT, not int, because callers can pass values
10029 out of 'int' range.
10030 (c_string_width, strwidth, lisp_string_width, chars_in_text)
10031 (multibyte_chars_in_text, parse_str_as_multibyte)
10032 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
10033 (str_as_unibyte, str_to_unibyte, string_count_byte8)
10034 (string_escape_byte8, Fget_byte):
10035 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10036 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
10037 avoid mishandling large integers.
10038 * character.h: Adjust decls to match defn changes elsewhere.
10039 * charset.c (load_charset_map_from_file, find_charsets_in_text)
10040 (Ffind_charset_region):
10041 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10042 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
10043 (load_charset_map_from_vector, Fdefine_charset_internal):
10044 Don't assume fixnum fits in int.
10045 (load_charset_map_from_vector, Fmap_charset_chars):
10046 Remove now-unnecessary CHECK_NATNUMs.
10047 (Fdefine_charset_internal): Check ranges here, more carefully.
10048 Don't rely on undefined behavior with signed left shift overflow.
10049 Don't assume unsigned int fits into fixnum, or that fixnum fits
10050 into unsigned int. Don't require max_code to be a valid fixnum;
10051 that's not true for gb10830 4-byte on a 32-bit host. Allow
10052 invalid_code to be a cons, for the same reason. Require code_offset
10053 to be a character. Avoid int overflow if max_char is close
10054 to INT_MAX.
10055 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
10056 this is intended anyway and avoids some undefined behavior.
10057 (load_charset_map): Pass unsigned, not int, as 2nd arg of
10058 INDEX_TO_CODE_POINT, as that's what it expects.
10059 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
10060 * charset.h (DECODE_CHAR): Return int, not unsigned;
10061 this is what was intended anyway, and it avoids undefined behavior.
10062 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
10063 integer-overflow issues.
10064 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
10065 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
10066 where the argument is EMACS_INT, and this behavior is not intended.
10067 * chartab.c (Fmake_char_table, Fset_char_table_range)
10068 (uniprop_get_decoder, uniprop_get_encoder):
10069 Don't assume fixnum fits in int.
10070 * cmds.c (move_point): New function, that does the gist of
10071 Fforward_char and Fbackward_char, but does so while checking
10072 for integer overflow more accurately.
10073 (Fforward_char, Fbackward_char): Use it.
10074 (Fforward_line, Fend_of_line, internal_self_insert)
10075 (internal_self_insert):
10076 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10077 Fix a FIXME, by checking for integer overflow when calculating
10078 target_clm and actual_clm.
10079 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
10080 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
10081 (ASSURE_DESTINATION, coding_alloc_by_realloc)
10082 (coding_alloc_by_making_gap, alloc_destination)
10083 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
10084 (encode_coding_utf_16, detect_coding_emacs_mule)
10085 (decode_coding_emacs_mule, encode_coding_emacs_mule)
10086 (detect_coding_iso_2022, decode_coding_iso_2022)
10087 (encode_invocation_designation, encode_designation_at_bol)
10088 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
10089 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
10090 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
10091 (encode_coding_ccl, encode_coding_raw_text)
10092 (detect_coding_charset, decode_coding_charset)
10093 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
10094 (produce_composition, produce_charset, produce_annotation)
10095 (decode_coding, handle_composition_annotation)
10096 (handle_charset_annotation, consume_chars, decode_coding_gap)
10097 (decode_coding_object, encode_coding_object, detect_coding_system)
10098 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
10099 (code_convert_region, code_convert_string)
10100 (Fdefine_coding_system_internal)
10101 (coding_set_source, coding_set_destination):
10102 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10103 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
10104 (Fdefine_coding_system_internal):
10105 Don't assume fixnums fit in int.
10106 (decode_coding_gap, decode_coding_object, encode_coding_object)
10107 (Fread_coding_system, Fdetect_coding_region)
10108 (Funencodable_char_position, Fcheck_coding_systems_region)
10109 (get_translation, handle_composition_annotation, consume_chars):
10110 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10111 (consume_chars): Rewrite to not calculate an address outside buffer.
10112 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
10113 Don't access memory outside of the args array.
10114 (Fdefine_coding_system_internal): Check for charset-id overflow.
10115 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
10116 result of ENCODE_CHAR.
10117 * coding.h: Adjust decls to match defn changes elsewhere.
10118 (struct coding_system):
10119 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10120 * composite.c (get_composition_id, find_composition)
10121 (run_composition_function, update_compositions)
10122 (compose_text, composition_gstring_put_cache)
10123 (composition_gstring_p, composition_gstring_width)
10124 (fill_gstring_header, fill_gstring_body, autocmp_chars)
10125 (composition_compute_stop_pos, composition_reseat_it)
10126 (composition_update_it, struct position_record)
10127 (find_automatic_composition, composition_adjust_point)
10128 (Fcomposition_get_gstring, Ffind_composition_internal):
10129 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10130 (update_compositions):
10131 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10132 * composite.h: Adjust decls to match defn changes elsewhere.
10133 (struct composition):
10134 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10135 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
10136 Do not attempt to compute the address of the object just before a
10137 buffer; this is not portable.
10138 (Faref, Faset):
10139 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10140 (Faset): Use int, not EMACS_INT, where int is wide enough.
10141 (Fstring_to_number): Don't assume fixnums fit in int.
10142 (Frem): Don't assume arg is nonnegative.
10143 * dbusbind.c (xd_append_arg): Check for integers out of range.
10144 (Fdbus_call_method): Don't overflow the timeout int.
10145 (extract_signed, extract_unsigned): New functions.
10146 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
10147 (xd_get_connection_references): Return ptrdiff_t, not int.
10148 All uses changed.
10149 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
10150 (xd_read_message_1):
10151 Use int, not unsigned, where the dbus API uses int.
10152 (Fdbus_message_internal): Don't overflow mtype.
10153 (syms_of_dbusbind): Allocate right-sized buffer for integers.
10154 * dired.c (directory_files_internal, file_name_completion, scmp)
10155 (file_name_completion_stat):
10156 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10157 (file_name_completion): Don't overflow matchcount.
10158 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
10159 * dispextern.h: Adjust decls to match defn changes elsewhere.
10160 (struct text_pos, struct glyph, struct bidi_saved_info)
10161 (struct bidi_string_data, struct bidi_it, struct composition_it)
10162 (struct it):
10163 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10164 (struct display_pos, struct composition_it, struct it):
10165 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10166 * dispnew.c (increment_matrix_positions)
10167 (increment_row_positions, mode_line_string)
10168 (marginal_area_string):
10169 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10170 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
10171 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10172 (duration_to_sec_usec): New function, to check for overflow better.
10173 (Fsleep_for, sit_for): Use it.
10174 * doc.c (get_doc_string, store_function_docstring):
10175 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10176 (get_doc_string, Fsnarf_documentation):
10177 Use int, not EMACS_INT, where int is wide enough.
10178 (get_doc_string):
10179 Use SAFE_ALLOCA, not alloca.
10180 Check for overflow when converting EMACS_INT to off_t.
10181 * doprnt.c (doprnt):
10182 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10183 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
10184 Don't assume uid_t fits into fixnum.
10185 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
10186 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
10187 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
10188 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
10189 (general_insert_function)
10190 (Finsert_char, make_buffer_string, make_buffer_string_both)
10191 (update_buffer_properties, Fbuffer_substring)
10192 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
10193 (Fsubst_char_in_region, check_translation)
10194 (Ftranslate_region_internal, save_restriction_restore, Fformat)
10195 (transpose_markers, Ftranspose_regions):
10196 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10197 (clip_to_bounds): Move to lisp.h as an inline function).
10198 (Fconstrain_to_field): Don't assume integers are nonnegative.
10199 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
10200 (Fsubst_char_in_region, Fsave_restriction):
10201 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10202 (Femacs_pid): Don't assume pid_t fits into fixnum.
10203 (lo_time): Use int, not EMACS_INT, when int suffices.
10204 (lisp_time_argument): Check for usec out of range.
10205 (Fencode_time): Don't assume fixnum fits in int.
10206 (Fuser_login_name, Fuser_full_name): Signal an error
10207 if a uid argument is out of range, rather than relying on
10208 undefined behavior.
10209 (Fformat_time_string): Remove now-unnecessary check.
10210 lisp_time_argument checks for out-of-range usec now.
10211 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
10212 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
10213 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
10214 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
10215 (init_cmdargs, Fdump_emacs):
10216 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10217 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
10218 the bottom (typically) 32 bits of the fixnum.
10219 * eval.c (specpdl_size, call_debugger):
10220 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10221 (when_entered_debugger, Fbacktrace_debug):
10222 Don't assume fixnum can fit in int.
10223 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
10224 the object just before a buffer; this is not portable.
10225 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
10226 (grow_specpdl, unbind_to):
10227 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10228 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
10229 (grow_specpdl): Simplify allocation by using xpalloc.
10230 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
10231 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
10232 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
10233 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10234 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
10235 (a_write, e_write):
10236 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10237 (Fcopy_file, non_regular_nbytes, read_non_regular)
10238 (Finsert_file_contents):
10239 Use int, not EMACS_INT, where int is wide enough.
10240 (READ_BUF_SIZE): Verify that it fits in int.
10241 (Finsert_file_contents): Check that counts are in proper range,
10242 rather than assuming fixnums fit into ptrdiff_t etc.
10243 Don't assume fixnums fit into int.
10244 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
10245 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
10246 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
10247 (string_char_to_byte, string_byte_to_char)
10248 (string_make_multibyte, string_to_multibyte)
10249 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
10250 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
10251 (substring_both, Fdelete, internal_equal, Ffillarray)
10252 (Fclear_string, mapcar1)
10253 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
10254 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
10255 (larger_vector, make_hash_table, maybe_resize_hash_table)
10256 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
10257 (Fmaphash, secure_hash):
10258 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10259 (concat): Check for string index and length overflow.
10260 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
10261 (Frequire):
10262 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10263 (larger_vector): New API (vec, incr_min, size_max) replaces old
10264 one (vec, new_size, init). This catches size overflow.
10265 INIT was removed because it was always Qnil.
10266 All callers changed.
10267 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
10268 the upper bound on a hash table index size.
10269 (make_hash_table, maybe_resize_hash_table): Use it.
10270 (secure_hash): Computer start_byte and end_byte only after
10271 they're known to be in ptrdiff_t range.
10272 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
10273 (Ffont_get_glyphs, Ffont_at):
10274 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10275 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
10276 (Flist_fonts, Fopen_font):
10277 Don't assume fixnum can fit in int.
10278 (check_gstring): Don't assume index can fit in int.
10279 (font_match_p): Check that fixnum is a character, not a nonnegative
10280 fixnum, since the later code needs to stuff it into an int.
10281 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
10282 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
10283 conversion overflow issues.
10284 (Fopen_font): Check for integer out of range.
10285 (Ffont_get_glyphs): Don't assume index can fit in int.
10286 * font.h: Adjust decls to match defn changes elsewhere.
10287 * fontset.c (reorder_font_vector): Redo score calculation to avoid
10288 integer overflow.
10289 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
10290 printmax_t, where ptrdiff_t is wide enough.
10291 (Finternal_char_font):
10292 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10293 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
10294 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
10295 (Fset_frame_position, x_set_frame_parameters)
10296 (x_set_line_spacing, x_set_border_width)
10297 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
10298 Check that fixnums are in proper range for system types.
10299 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
10300 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10301 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
10302 Use SAFE_ALLOCA_LISP, not alloca.
10303 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
10304 intptr_t is wide enough.
10305 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
10306 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
10307 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
10308 Check for fixnum out of range.
10309 * ftfont.c (ftfont_list): Don't assume index fits in int.
10310 Check that fixnums are in proper range for system types.
10311 (ftfont_shape_by_flt):
10312 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10313 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
10314 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10315 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
10316 Check that fixnums are in proper range for system types.
10317 * gnutls.h: Adjust decls to match defn changes elsewhere.
10318 * gtkutil.c (xg_dialog_run):
10319 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10320 (update_frame_tool_bar):
10321 Check that fixnums are in proper range for system types.
10322 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
10323 (lookup_image): Check that fixnums are in range for system types.
10324 * indent.c (last_known_column, last_known_column_point):
10325 (current_column_bol_cache):
10326 (skip_invisible, current_column, check_display_width):
10327 (check_display_width, scan_for_column, current_column_1)
10328 (Findent_to, Fcurrent_indentation, position_indentation)
10329 (indented_beyond_p, Fmove_to_column, compute_motion):
10330 (Fcompute_motion, Fvertical_motion):
10331 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10332 (last_known_column_modified): Use EMACS_INT, not int.
10333 (check_display_width):
10334 (Fcompute_motion):
10335 Check that fixnums and floats are in proper range for system types.
10336 (compute_motion): Don't assume index or fixnum fits in int.
10337 (compute_motion, Fcompute_motion):
10338 Use int, not EMACS_INT, when it is wide enough.
10339 (vmotion): Omit local var start_hpos that is always 0; that way
10340 we don't need to worry about overflow in expressions involving it.
10341 * indent.h: Adjust decls to match defn changes elsewhere.
10342 (struct position):
10343 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10344 Use int, not EMACS_INT, where int is wide enough.
10345 Remove unused members ovstring_chars_done and tab_offset;
10346 all uses removed.
10347 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
10348 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
10349 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
10350 (make_gap, copy_text, insert, insert_and_inherit)
10351 (insert_before_markers, insert_before_markers_and_inherit)
10352 (insert_1, count_combining_before, count_combining_after)
10353 (insert_1_both, insert_from_string)
10354 (insert_from_string_before_markers, insert_from_string_1)
10355 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
10356 (adjust_after_replace, adjust_after_insert, replace_range)
10357 (replace_range_2, del_range, del_range_1, del_range_byte)
10358 (del_range_both, del_range_2, modify_region)
10359 (prepare_to_modify_buffer, signal_before_change)
10360 (signal_after_change, Fcombine_after_change_execute):
10361 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10362 * intervals.c (traverse_intervals, rotate_right, rotate_left)
10363 (balance_an_interval, split_interval_right, split_interval_left)
10364 (find_interval, next_interval, update_interval)
10365 (adjust_intervals_for_insertion, delete_node, delete_interval)
10366 (interval_deletion_adjustment, adjust_intervals_for_deletion)
10367 (static_offset_intervals, offset_intervals)
10368 (merge_interval_right, merge_interval_left, make_new_interval)
10369 (graft_intervals_into_buffer, temp_set_point_both)
10370 (temp_set_point, set_point, adjust_for_invis_intang)
10371 (set_point_both, move_if_not_intangible, get_property_and_range)
10372 (get_local_map, copy_intervals, copy_intervals_to_string)
10373 (compare_string_intervals, set_intervals_multibyte_1):
10374 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10375 * intervals.h: Adjust decls to match defn changes elsewhere.
10376 (struct interval):
10377 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10378 * keyboard.c (this_command_key_count, this_single_command_key_start)
10379 (before_command_key_count, before_command_echo_length, echo_now)
10380 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
10381 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
10382 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
10383 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
10384 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10385 (last_non_minibuf_size, last_point_position, echo_truncate)
10386 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
10387 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
10388 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
10389 (stuff_buffered_input):
10390 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10391 (last_auto_save, command_loop_1, read_char):
10392 Use EMACS_INT, not int, to avoid integer overflow.
10393 (record_char): Avoid overflow in total_keys computation.
10394 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
10395 * keyboard.h: Adjust decls to match defn changes elsewhere.
10396 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
10397 (Fkey_description, Fdescribe_vector, Flookup_key):
10398 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10399 (click_position): New function, to check that positions are in range.
10400 (Fcurrent_active_maps):
10401 (describe_command):
10402 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10403 (Faccessible_keymaps, Fkey_description):
10404 (preferred_sequence_p):
10405 Don't assume fixnum can fit into int.
10406 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
10407 Check for integer overflow in size calculations.
10408 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
10409 avoid mishandling large integers.
10410 * lisp.h: Adjust decls to match defn changes elsewhere.
10411 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
10412 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
10413 (struct Lisp_Marker):
10414 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10415 (clip_to_bounds): Now an inline function, moved here from editfns.c.
10416 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
10417 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
10418 All callers changed.
10419 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
10420 Assume the arg has valid form, since it always does.
10421 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
10422 unsigned integer system type.
10423 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
10424 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
10425 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10426 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
10427 (duration_to_sec_usec): New decl.
10428 * lread.c (read_from_string_index, read_from_string_index_byte)
10429 (read_from_string_limit, readchar, unreadchar, openp)
10430 (read_internal_start, read1, oblookup):
10431 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10432 (Fload, readevalloop, Feval_buffer, Feval_region):
10433 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10434 (openp): Check for out-of-range argument to 'access'.
10435 (read1): Use int, not EMACS_INT, where int is wide enough.
10436 Don't assume fixnum fits into int.
10437 Fix off-by-one error that can read outside a buffer.
10438 (read_filtered_event): Use duration_to_sec_usec
10439 to do proper overflow checking on durations.
10440 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
10441 in size calculation.
10442 (Fexecute_kbd_macro):
10443 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10444 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
10445 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
10446 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
10447 (set_marker_both, set_marker_restricted_both, marker_position)
10448 (marker_byte_position, Fbuffer_has_markers_at):
10449 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10450 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
10451 * menu.c (ensure_menu_items): Rename from grow_menu_items.
10452 It now merely ensures that the menu is large enough, without
10453 necessarily growing it, as this avoids some integer overflow issues.
10454 All callers changed.
10455 (keymap_panes, parse_single_submenu, Fx_popup_menu):
10456 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10457 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
10458 Use SAFE_ALLOCA_LISP, not alloca.
10459 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
10460 to EMACS_INT. Check that fixnums are in proper range for system types.
10461 * minibuf.c (minibuf_prompt_width, string_to_object)
10462 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
10463 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
10464 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10465 (get_minibuffer, read_minibuf_unwind):
10466 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10467 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
10468 this simplifies overflow checking. All callers changed.
10469 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
10470 (Ftest_completion):
10471 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10472 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
10473 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
10474 Check that fixnums are in proper range for system types.
10475 (Fx_create_frame, Fx_show_tip):
10476 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10477 * nsfont.m (ns_findfonts, nsfont_list_family):
10478 Don't assume fixnum fits in long.
10479 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
10480 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10481 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
10482 wide enough.
10483 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
10484 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10485 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
10486 (PRINTDECLARE, PRINTPREPARE):
10487 (strout, print_string):
10488 (print, print_preprocess, print_check_string_charset_prop)
10489 (print_object):
10490 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10491 (PRINTDECLARE):
10492 (temp_output_buffer_setup, Fprin1_to_string, print_object):
10493 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10494 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
10495 (printchar, strout): Use xpalloc to catch size calculation overflow.
10496 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
10497 (print_error_message): Use SAFE_ALLOCA, not alloca.
10498 (print_object): Use int, not EMACS_INT, where int is wide enough.
10499 (print_depth, new_backquote_output, print_number_index):
10500 Use ptrdiff_t, not int, where int might not be wide enough.
10501 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
10502 (Fset_process_window_size, Fformat_network_address)
10503 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
10504 (sigchld_handler):
10505 Check that fixnums are in proper range for system types.
10506 (Fsignal_process): Simplify by avoiding a goto.
10507 Check for process-ids out of pid_t range rather than relying on
10508 undefined behavior.
10509 (process_tick, update_tick): Use EMACS_INT, not int.
10510 (Fformat_network_address, read_process_output, send_process)
10511 (Fprocess_send_region, status_notify):
10512 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10513 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
10514 (wait_reading_process_output, read_process_output, exec_sentinel):
10515 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10516 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
10517 (Faccept_process_output): Use duration_to_sec_usec to do proper
10518 overflow checking on durations.
10519 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
10520 Don't assume pid_t fits in int.
10521 * process.h (struct Lisp_Process): Members tick and update_tick
10522 are now of type EMACS_INT, not int.
10523 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
10524 configured --with-wide-int.
10525 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
10526 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
10527 * search.c (looking_at_1, string_match_1):
10528 (fast_string_match, fast_c_string_match_ignore_case)
10529 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
10530 (scan_newline, find_before_next_newline, search_command)
10531 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
10532 (set_search_regs, wordify):
10533 (Freplace_match):
10534 (Fmatch_data):
10535 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10536 (string_match_1, search_buffer, set_search_regs):
10537 (Fmatch_data):
10538 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10539 (wordify): Check for overflow in size calculation.
10540 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
10541 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
10542 Check that fixnums are in proper range for system types.
10543 * sound.c (struct sound_device)
10544 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
10545 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10546 (Fplay_sound_internal):
10547 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10548 * syntax.c (struct lisp_parse_state, find_start_modiff)
10549 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
10550 (Fparse_partial_sexp):
10551 Don't assume fixnums can fit in int.
10552 (struct lisp_parse_state, find_start_pos, find_start_value)
10553 (find_start_value_byte, find_start_begv)
10554 (update_syntax_table, char_quoted, dec_bytepos)
10555 (find_defun_start, prev_char_comend_first, back_comment):
10556 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
10557 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
10558 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10559 (Finternal_describe_syntax_value): Check that match_lisp is a
10560 character, not an integer, since the code stuffs it into int.
10561 (scan_words, scan_sexps_forward):
10562 Check that fixnums are in proper range for system types.
10563 (Fforward_word):
10564 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10565 (scan_sexps_forward):
10566 Use CHARACTERP, not INTEGERP, since the value must fit into int.
10567 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
10568 * syntax.h: Adjust decls to match defn changes elsewhere.
10569 (struct gl_state_s):
10570 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10571 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
10572 MOST_POSITIVE_FIXNUM.
10573 * sysdep.c (wait_for_termination_1, wait_for_termination)
10574 (interruptible_wait_for_termination, mkdir):
10575 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
10576 (emacs_read, emacs_write):
10577 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10578 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
10579 and double all fit in int.
10580 * term.c (set_tty_color_mode):
10581 Check that fixnums are in proper range for system types.
10582 * termhooks.h (struct input_event):
10583 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10584 * textprop.c (validate_interval_range, interval_of)
10585 (Fadd_text_properties, set_text_properties_1)
10586 (Fremove_text_properties, Fremove_list_of_text_properties)
10587 (Ftext_property_any, Ftext_property_not_all)
10588 (copy_text_properties, text_property_list, extend_property_ranges)
10589 (verify_interval_modification):
10590 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10591 (Fnext_single_char_property_change)
10592 (Fprevious_single_char_property_change):
10593 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10594 (copy_text_properties):
10595 Check for integer overflow in index calculation.
10596 * undo.c (last_boundary_position, record_point, record_insert)
10597 (record_delete, record_marker_adjustment, record_change)
10598 (record_property_change):
10599 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10600 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
10601 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10602 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10603 (Fx_hide_tip, Fx_file_dialog):
10604 * w32menu.c (set_frame_menubar):
10605 Use ptrdiff_t, not int, for consistency with rest of code.
10606 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
10607 (select_window, Fdelete_other_windows_internal)
10608 (window_scroll_pixel_based, window_scroll_line_based)
10609 (Frecenter, Fset_window_configuration):
10610 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10611 (Fset_window_hscroll, run_window_configuration_change_hook)
10612 (set_window_buffer, temp_output_buffer_show, scroll_command)
10613 (Fscroll_other_window, Frecenter):
10614 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10615 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
10616 Don't assume fixnum fits in int.
10617 (Fset_window_scroll_bars):
10618 Check that fixnums are in proper range for system types.
10619 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
10620 (string_pos, c_string_pos, number_of_chars, init_iterator)
10621 (in_ellipses_for_invisible_text_p, init_from_display_pos)
10622 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
10623 (compute_display_string_end, handle_face_prop)
10624 (face_before_or_after_it_pos, handle_invisible_prop)
10625 (handle_display_prop, handle_display_spec, handle_single_display_spec)
10626 (display_prop_intangible_p, string_buffer_position_lim)
10627 (string_buffer_position, handle_composition_prop, load_overlay_strings)
10628 (get_overlay_strings_1, get_overlay_strings)
10629 (iterate_out_of_display_property, forward_to_next_line_start)
10630 (back_to_previous_visible_line_start, reseat, reseat_to_string)
10631 (get_next_display_element, set_iterator_to_next)
10632 (get_visually_first_element, compute_stop_pos_backwards)
10633 (handle_stop_backwards, next_element_from_buffer)
10634 (move_it_in_display_line_to, move_it_in_display_line)
10635 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10636 (add_to_log, message_dolog, message_log_check_duplicate)
10637 (message2, message2_nolog, message3, message3_nolog
10638 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
10639 (current_message_1, truncate_echo_area, truncate_message_1)
10640 (set_message, set_message_1, store_mode_line_noprop)
10641 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
10642 (text_outside_line_unchanged_p, check_point_in_composition)
10643 (reconsider_clip_changes)
10644 (redisplay_internal, set_cursor_from_row, try_scrolling)
10645 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
10646 (redisplay_window, find_last_unchanged_at_beg_row)
10647 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
10648 (trailing_whitespace_p, find_row_edges, display_line)
10649 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
10650 (display_mode_element, store_mode_line_string)
10651 (pint2str, pint2hrstr, decode_mode_spec)
10652 (display_count_lines, display_string, draw_glyphs)
10653 (x_produce_glyphs, x_insert_glyphs)
10654 (rows_from_pos_range, mouse_face_from_buffer_pos)
10655 (fast_find_string_pos, mouse_face_from_string_pos)
10656 (note_mode_line_or_margin_highlight, note_mouse_highlight):
10657 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10658 (safe_call, init_from_display_pos, handle_fontified_prop)
10659 (handle_single_display_spec, load_overlay_strings)
10660 (with_echo_area_buffer, setup_echo_area_for_printing)
10661 (display_echo_area, echo_area_display)
10662 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
10663 (update_tool_bar, hscroll_window_tree, redisplay_internal)
10664 (redisplay_window, dump_glyph_row, display_mode_line)
10665 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
10666 (handle_display_spec, display_prop_string_p):
10667 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10668 (handle_single_display_spec, build_desired_tool_bar_string)
10669 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
10670 (get_specified_cursor_type):
10671 Check that fixnums are in proper range for system types.
10672 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
10673 (Flookup_image_map):
10674 Don't assume fixnums fit in int.
10675 (compare_overlay_entries):
10676 Avoid mishandling comparisons due to subtraction overflow.
10677 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
10678 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
10679 (handle_tool_bar_click):
10680 Use int, not unsigned, since we prefer signed and the signedness
10681 doesn't matter here.
10682 (get_next_display_element, next_element_from_display_vector):
10683 Use int, not EMACS_INT, when int is wide enough.
10684 (start_hourglass): Use duration_to_sec_usec to do proper
10685 overflow checking on durations.
10686 * xfaces.c (Fbitmap_spec_p):
10687 Check that fixnums are in proper range for system types.
10688 (compare_fonts_by_sort_order):
10689 Avoid mishandling comparisons due to subtraction overflow.
10690 (Fx_family_fonts, realize_basic_faces):
10691 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10692 (Fx_family_fonts):
10693 Don't assume fixnum fits in int.
10694 Use SAFE_ALLOCA_LISP, not alloca.
10695 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
10696 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
10697 (face_at_buffer_position, face_for_overlay_string)
10698 (face_at_string_position):
10699 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10700 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
10701 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
10702 (Fx_show_tip):
10703 Check that fixnums are in proper range for system types.
10704 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10705 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
10706 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10707 (Fx_change_window_property): Don't assume fixnums fit in int.
10708 * xfont.c (xfont_chars_supported):
10709 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10710 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
10711 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
10712 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10713 * xml.c (parse_region):
10714 * xrdb.c (magic_file_p):
10715 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10716 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
10717 (x_get_local_selection, x_reply_selection_request)
10718 (x_handle_selection_request, wait_for_property_change):
10719 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10720 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
10721 short is wide enough.
10722 (x_send_client_event): Don't assume fixnum fits in int.
10723 * xterm.c (x_x_to_emacs_modifiers):
10724 Don't assume EMACS_INT overflows nicely into int.
10725 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
10726 may come from Lisp.
10727 (handle_one_xevent): NATNUMP can eval its arg twice.
10728 (x_connection_closed):
10729 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10730 * xterm.h: Adjust decls to match defn changes elsewhere.
10731 (struct scroll_bar): Use struct vectorlike_header
10732 rather than rolling our own approximation.
10733 (SCROLL_BAR_VEC_SIZE): Remove; not used.
10734
10735 2012-05-25 Glenn Morris <rgm@gnu.org>
10736
10737 * lisp.mk (lisp): Update for more files being compiled now.
10738
10739 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
10740
10741 * lread.c: Remove `read_pure' which makes no difference.
10742 (read_pure): Remove var.
10743 (unreadpure): Remove function.
10744 (readevalloop): Don't call read_list with -1 flag.
10745 (read1, read_vector): Don't test read_pure any more.
10746 (read_list): Simplify.
10747
10748 * fileio.c, character.h: Minor style tweaks.
10749
10750 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
10751
10752 * window.h (clip_changed): Remove useless declaration.
10753
10754 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
10755
10756 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
10757 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
10758
10759 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
10760
10761 Remove src/m/*.
10762 This directory predates autoconf and is no longer needed nowadays.
10763 Move its few remaining bits of functionality to where they're needed.
10764 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
10765 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
10766 * m/template.h: Remove.
10767 * Makefile.in (M_FILE): Remove. All uses removed.
10768 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
10769 * lisp.h (USE_LSB_TAG):
10770 * mem-limits.h (EXCEEDS_LISP_PTR):
10771 Use VAL_MAX, not VALBITS, in #if.
10772 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
10773 (EMACS_UINT): Define unconditionally now.
10774 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
10775 (BITS_PER_EMACS_INT): New constants, replacing
10776 what used to be in config.h, but not useful in #if.
10777 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
10778 define them any more.
10779 (VAL_MAX): New macro.
10780 (VALMASK): Use it.
10781 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
10782 BITS_PER_EMACS_INT, in #if.
10783 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
10784 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
10785 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
10786 * s/ms-w32.h (DATA_START):
10787 Move here from removed file m/intel386.h.
10788 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
10789 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
10790
10791 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
10792
10793 Assume C89 or later.
10794 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
10795 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
10796 (xrealloc):
10797 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
10798 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
10799 * textprop.c, tparam.c (NULL): Remove.
10800 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
10801 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
10802 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
10803 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
10804 * xterm.c (input_signal_count): Assume volatile works.
10805
10806 2012-05-21 Ken Brown <kbrown@cornell.edu>
10807
10808 * xgselect.c (xg_select): Fix first argument in call to 'select'
10809 (bug#11508).
10810
10811 2012-05-20 Ken Brown <kbrown@cornell.edu>
10812
10813 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
10814 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
10815
10816 2012-05-19 Ken Brown <kbrown@cornell.edu>
10817
10818 * xfns.c (x_in_use): Remove `static' qualifier.
10819 * xterm.h (x_in_use): Declare.
10820 * xgselect.c: Include xterm.h.
10821 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
10822 and `display_arg' (bug#9754).
10823
10824 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
10827
10828 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
10829 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
10830
10831 2012-05-18 Eli Zaretskii <eliz@gnu.org>
10832
10833 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
10834
10835 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
10836 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
10837
10838 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
10839 reference to image_cache->refcount.
10840 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
10841
10842 2012-05-17 Juri Linkov <juri@jurta.org>
10843
10844 * search.c (Fword_search_regexp, Fword_search_backward)
10845 (Fword_search_forward, Fword_search_backward_lax)
10846 (Fword_search_forward_lax): Move functions to isearch.el
10847 (bug#10145, bug#11381).
10848
10849 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
10850
10851 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
10852
10853 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
10854
10855 * lread.c (init_obarray): Declare Qt and Qnil as special.
10856
10857 2012-05-14 Glenn Morris <rgm@gnu.org>
10858
10859 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
10860 Put "libexec" before "bin", for the sake of init_callproc_1.
10861
10862 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
10863
10864 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
10865
10866 * unexaix.c: Port to more-recent AIX compilers.
10867 (report_error, report_error_1, make_hdr, copy_sym)
10868 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
10869 Make arguments const char *, not char *, to avoid violations of C
10870 standard and to fix some AIX warnings reported by Gilles Pion.
10871
10872 2012-05-14 Eli Zaretskii <eliz@gnu.org>
10873
10874 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
10875 already have overlays loaded.
10876 (handle_single_display_spec): Before returning without displaying
10877 fringe bitmap, synchronize the bidi iterator with the main display
10878 iterator, by calling iterate_out_of_display_property.
10879 (iterate_out_of_display_property): Detect buffer iteration by
10880 testing that it->string is a Lisp string.
10881 (get_next_display_element): When the current object is exhausted,
10882 and there's something on it->stack, call set_iterator_to_next to
10883 proceed with what's on the stack, instead of returning zero.
10884 (set_iterator_to_next): If called at the end of a Lisp string,
10885 proceed to consider_string_end without incrementing string
10886 position. Don't increment display vector index past the end of
10887 the display vector. (Bug#11417)
10888 (pos_visible_p): Don't report a position visible when move_it_to
10889 stopped at the last line of window, which happens to be scanned
10890 backwards by the bidi iteration. (Bug#11464)
10891
10892 2012-05-14 Eli Zaretskii <eliz@gnu.org>
10893
10894 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
10895 and right-margin display specs even if the spec is invalid or we
10896 are on a TTY, and thus unable to display on the fringes.
10897 That's because the text with the property will not be displayed anyway,
10898 so we need to signal to the caller that this is a "replacing"
10899 display spec. This fixes display when the spec is invalid or we
10900 are on a TTY.
10901
10902 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
10903
10904 * unexaix.c (make_hdr): Fix typo in prototype.
10905 This bug broke the build on AIX. Problem reported by Gilles Pion.
10906
10907 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
10908
10909 * keyboard.c (kbd_buffer_get_event): Read special events also in
10910 batch mode. (Bug#11415)
10911
10912 2012-05-12 Glenn Morris <rgm@gnu.org>
10913
10914 * ns.mk: Update for ns_appbindir no longer having trailing "/".
10915
10916 2012-05-12 Eli Zaretskii <eliz@gnu.org>
10917
10918 * lisp.mk (lisp): Add newcomment.elc.
10919
10920 2012-05-12 Glenn Morris <rgm@gnu.org>
10921
10922 * Makefile.in (MKDIR_P): New, set by configure.
10923 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
10924
10925 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
10926
10927 Remove unused function hourglass_started.
10928 * dispextern.h (hourglass_started):
10929 * w32fns.c (hourglass_started):
10930 * xdisp.c (hourglass_started): Remove.
10931
10932 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
10933
10934 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
10935 Update dependencies.
10936
10937 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
10938
10939 * xgselect.c (xg_select): Put maxfds+1 into a var.
10940 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
10941
10942 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
10943
10944 2012-05-10 Dave Abrahams <dave@boostpro.com>
10945
10946 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
10947 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
10948
10949 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
10950
10951 * dbusbind.c (xd_registered_buses): New internal Lisp object.
10952 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
10953 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
10954 Initialize xd_registered_buses.
10955
10956 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
10957
10958 Untag more efficiently if USE_LSB_TAG.
10959 This is based on a proposal by YAMAMOTO Mitsuharu in
10960 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
10961 For an admittedly artificial (nth 8000 longlist) benchmark on
10962 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
10963 Emacs's overall text size by 1%.
10964 * lisp.h (XUNTAG): New macro.
10965 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
10966 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
10967 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
10968 * eval.c (Fautoload):
10969 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
10970 * frame.h (XFRAME): Use XUNTAG.
10971
10972 Port recent dbusbind.c changes to 32-bit --with-wide-int.
10973 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
10974 Remove unportable assumptions about print widths of types like
10975 dbus_uint32_t.
10976 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
10977 intptr_t when converting between pointer and integer, to avoid GCC
10978 warnings about wrong width.
10979
10980 2012-05-09 Eli Zaretskii <eliz@gnu.org>
10981
10982 * w32proc.c (new_child): Force Windows to reserve only 64KB of
10983 stack for each reader_thread, instead of defaulting to 8MB
10984 determined by the linker. This avoids failures in creating
10985 subprocesses on Windows 7, see the discussion in this thread:
10986 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
10987
10988 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
10989
10990 Fix up display of the *Minibuf-0* buffer in the mini window.
10991 * keyboard.c (read_char): Don't clear the echo area if there's no
10992 message to clear.
10993 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
10994 contents of *Minibuf-0*) if there's no message displayed in its stead.
10995
10996 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
10997
10998 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
10999 batch mode.
11000
11001 2012-05-06 Chong Yidong <cyd@gnu.org>
11002
11003 * lisp.mk (lisp): Update.
11004
11005 2012-05-05 Jim Meyering <meyering@redhat.com>
11006
11007 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
11008
11009 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
11010
11011 * data.c (PUT_ERROR): New macro.
11012 (syms_of_data): Use it. Add new error type `user-error'.
11013 * undo.c (user_error): New function.
11014 (Fprimitive_undo): Use it.
11015 * print.c (print_error_message): Adjust print style for `user-error'.
11016 * keyboard.c (user_error): New function.
11017 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
11018
11019 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
11020
11021 Do not limit current-time-string to years 1000..9999.
11022 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
11023 (Fcurrent_time_string): Support any year that is supported by the
11024 underlying localtime representation. Don't use asctime, as it
11025 has undefined behavior for years outside the range -999..9999.
11026
11027 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
11028
11029 Fix race conditions involving setenv, gmtime, localtime, asctime.
11030 Without this fix, interrupts could mess up code that uses these
11031 nonreentrant functions, since setting TZ invalidates existing
11032 tm_zone or tzname values, and since most of these functions return
11033 pointers to static storage.
11034 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
11035 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
11036 Grow the critical sections to include not just invoking
11037 localtime/gmtime, but also accessing these functions' results
11038 including their tm_zone values if any, and any related TZ setting.
11039 (format_time_string): Last arg is now struct tm *, not struct tm **,
11040 so that the struct tm is saved in the critical section.
11041 All callers changed. Simplify allocation of initial buffer, partly
11042 motivated by the fact that memory allocation needs to be outside
11043 the critical section.
11044
11045 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
11046
11047 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
11048 with RESET_INTERVAL.
11049
11050 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
11051 Remove duplicated buffer name initialization.
11052
11053 2012-05-02 Jim Meyering <jim@meyering.net>
11054
11055 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
11056
11057 * xfns.c (x_window): Use xstrdup (Bug#11375).
11058
11059 2012-05-02 Eli Zaretskii <eliz@gnu.org>
11060
11061 * xdisp.c (pos_visible_p): If already at a newline from the
11062 display string before the 'while' loop, don't walk back the glyphs
11063 from it3.glyph_row. Solves assertion violation when the display
11064 string begins with a newline (egg.el). (Bug#11367)
11065
11066 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
11067
11068 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
11069 Move to simple.el.
11070
11071 2012-05-01 Glenn Morris <rgm@gnu.org>
11072
11073 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
11074 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
11075 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
11076 All were removed before 23.1.
11077
11078 * dispnew.c: Remove HAVE_LIBNCURSES test;
11079 it is always true on relevant platforms.
11080
11081 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
11082 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
11083
11084 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
11085
11086 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
11087
11088 * .gdbinit (xpr): Remove checks for no longer existing misc types.
11089 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
11090 Remove.
11091
11092 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
11093
11094 Do not avoid creating empty evaporating overlays (Bug#9642).
11095 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
11096 That is, do not delete an evaporating overlay if it becomes
11097 empty after its bounds are adjusted to fit within its buffer.
11098 This fix caused other problems, and I'm reverting it until we get
11099 to the bottom of them.
11100
11101 2012-04-27 Chong Yidong <cyd@gnu.org>
11102
11103 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
11104
11105 2012-04-27 Eli Zaretskii <eliz@gnu.org>
11106
11107 * xdisp.c (pos_visible_p): If the window start position is beyond
11108 ZV, start the display from buffer beginning. Prevents assertion
11109 violation in init_iterator when the minibuffer window is scrolled
11110 via the scroll bar.
11111
11112 * window.c (window_scroll_pixel_based): Likewise.
11113
11114 2012-04-27 Chong Yidong <cyd@gnu.org>
11115
11116 * keymap.c (where_is_internal): Doc fix (Bug#10872).
11117
11118 2012-04-27 Glenn Morris <rgm@gnu.org>
11119
11120 * fileio.c (Fcopy_file, Fset_file_selinux_context):
11121 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
11122
11123 2012-04-27 Eli Zaretskii <eliz@gnu.org>
11124
11125 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
11126 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
11127
11128 2012-04-26 Eli Zaretskii <eliz@gnu.org>
11129
11130 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
11131 display element, check also the underlying string or buffer
11132 character. (Bug#11341)
11133
11134 * w32menu.c: Include w32heap.h.
11135 (add_menu_item): If the call to AppendMenuW (via
11136 unicode_append_menu) fails, disable Unicode menus only if we are
11137 running on Windows 9X/Me.
11138
11139 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
11140
11141 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
11142 (xgetint): Add missing shift for LSB tags.
11143
11144 2012-04-24 Martin Rudalics <rudalics@gmx.at>
11145
11146 * keyboard.c (read_char): Don't wipe echo area for select window
11147 events: These might get delayed via `mouse-autoselect-window'
11148 (Bug#11304).
11149
11150 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
11151
11152 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
11153 manipulation of :loaded-from data.
11154
11155 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
11156
11157 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
11158 now a cons (bug#11311).
11159
11160 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
11161
11162 Do not create empty overlays with the evaporate property (Bug#9642).
11163 * buffer.c (Fmove_overlay): Delete an evaporating overlay
11164 if it becomes empty after its bounds are adjusted to fit within
11165 its buffer. Without this fix, in a nonempty buffer (let ((o
11166 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
11167 yields an empty overlay that has the evaporate property, which is
11168 not supposed to happen.
11169
11170 Fix minor GTK3 problems found by static checking.
11171 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
11172 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
11173 (struct _EmacsFixedClass, emacs_fixed_get_type):
11174 Move decls here from emacsgtkfixed.h, since they needn't be public.
11175 (emacs_fixed_get_type): Now static.
11176 (emacs_fixed_class_init): Omit unused local.
11177 (emacs_fixed_child_type): Remove; unused.
11178 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
11179 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
11180 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
11181 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
11182 (EMACS_FIXED_GET_CLASS): Remove; unused.
11183 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
11184
11185 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
11186 Problem reported by Juanma Barranquero for Windows -Wunused-function.
11187
11188 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
11189
11190 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
11191 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
11192 (__malloc_size_t, __malloc_ptrdiff_t):
11193 Remove. All uses removed, replaced by the definiens if needed,
11194 since we can assume C89 or better now.
11195 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
11196 (protect_malloc_state, align, get_contiguous_space)
11197 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
11198 (malloc_atfork_handler_child, malloc_enable_thread)
11199 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
11200 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
11201 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
11202 (special_realloc, _realloc_internal_nolock, _realloc_internal)
11203 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
11204 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
11205 Define using prototypes, not old style.
11206 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
11207 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
11208 (align): Don't assume that signed integer overflow wraps around.
11209 Omit unused local var.
11210 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
11211 (_free_internal_nolock, memalign, mallochook, reallochook):
11212 Omit no-longer-needed casts.
11213 (valloc): Use getpagesize, not __getpagesize.
11214 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
11215 (struct hdr): The 'magic' member is now size_t, not unsigned long.
11216
11217 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
11218
11219 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
11220
11221 Move functions from C to Lisp. Make non-blocking method calls
11222 the default. Implement further D-Bus standard interfaces.
11223
11224 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
11225 (QCdbus_request_name_allow_replacement)
11226 (QCdbus_request_name_replace_existing)
11227 (QCdbus_request_name_do_not_queue)
11228 (QCdbus_request_name_reply_primary_owner)
11229 (QCdbus_request_name_reply_in_queue)
11230 (QCdbus_request_name_reply_exists)
11231 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
11232 (QCdbus_registered_serial, QCdbus_registered_method)
11233 (QCdbus_registered_signal): New Lisp objects.
11234 (XD_DEBUG_MESSAGE): Use sizeof.
11235 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
11236 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
11237 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
11238 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
11239 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
11240 (xd_signature, xd_append_arg): Allow float for integer types.
11241 (xd_get_connection_references): New function.
11242 (xd_get_connection_address): Rename from xd_initialize.
11243 Return cached address.
11244 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
11245 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
11246 level.
11247 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
11248 Return number of refcounts.
11249 (Fdbus_get_unique_name): Make stronger parameter check.
11250 (Fdbus_message_internal): New defun.
11251 (Fdbus_call_method, Fdbus_call_method_asynchronously)
11252 (Fdbus_method_return_internal, Fdbus_method_error_internal)
11253 (Fdbus_send_signal, Fdbus_register_service)
11254 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
11255 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
11256 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
11257 (Vdbus_compiled_version, Vdbus_runtime_version)
11258 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
11259 (Vdbus_message_type_method_return, Vdbus_message_type_error)
11260 (Vdbus_message_type_signal): New defvars.
11261 (Vdbus_registered_buses, Vdbus_registered_objects_table):
11262 Adapt docstring.
11263
11264 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
11265
11266 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
11267 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
11268 Do not assume ptrdiff_t is the same width as 'int'.
11269
11270 * alloc.c: Handle unusual debugging option combinations.
11271 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
11272 since the two debugging options are incompatible.
11273 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
11274 is defined.
11275 (mem_init, mem_insert, mem_insert_fixup):
11276 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
11277 (NEED_MEM_INSERT): Remove; no longer needed.
11278
11279 2012-04-22 Leo Liu <sdl.web@gmail.com>
11280
11281 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
11282
11283 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
11284
11285 * sysdep.c [__FreeBSD__]: Minor cleanups.
11286 (list_system_processes, system_process_attributes) [__FreeBSD__]:
11287 Use Emacs indenting style more consistently. Avoid some casts.
11288 Use 'double' consistently rather than mixing 'float' and 'double'.
11289
11290 2012-04-21 Eduard Wiebe <usenet@pusto.de>
11291
11292 * sysdep.c (list_system_processes, system_process_attributes):
11293 Add implementation for FreeBSD (Bug#5243).
11294
11295 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
11296
11297 * lisp.mk (lisp): Update.
11298
11299 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
11300
11301 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
11302 It is never used otherwise.
11303
11304 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
11305
11306 * print.c (print_preprocess): Only check print_depth if print-circle
11307 is nil.
11308 (print_object): Check for cycles even when print-circle is nil and
11309 print-gensym is t, but only check print_depth if print-circle is nil.
11310
11311 2012-04-20 Chong Yidong <cyd@gnu.org>
11312
11313 * process.c (wait_reading_process_output): If EIO occurs on a pty,
11314 set the status to "failed" and ensure that sentinel is run.
11315
11316 2012-04-20 Glenn Morris <rgm@gnu.org>
11317
11318 * process.c (Fset_process_inherit_coding_system_flag)
11319 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
11320 (Fmake_network_process, Fmake_serial_process): Doc fix.
11321
11322 2012-04-20 Eli Zaretskii <eliz@gnu.org>
11323
11324 * xdisp.c (string_buffer_position_lim): Limit starting position to
11325 BEGV.
11326 (set_cursor_from_row): If called for a mode-line or header-line
11327 row, return zero immediately.
11328 (try_cursor_movement): If inside continuation line, don't back up
11329 farther than the first row after the header line, if any.
11330 Don't consider the header-line row as "partially visible", even if
11331 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
11332
11333 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
11334
11335 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
11336 (bug#11238).
11337
11338 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
11339 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
11340
11341 configure: new option --enable-gcc-warnings (Bug#11207)
11342 * Makefile.in (C_WARNINGS_SWITCH): Remove.
11343 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
11344 (ALL_CFLAGS): Use new macros rather than old.
11345 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
11346 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
11347 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
11348 -Wunused-result, -Wunused-variable. This should go away once
11349 the Emacs and Gnulib regex code is merged.
11350 (xmalloc, xrealloc): Now static.
11351
11352 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
11353
11354 * dired.c (Fsystem_groups): Remove unused local.
11355
11356 2012-04-17 Glenn Morris <rgm@gnu.org>
11357
11358 * dired.c (Fsystem_users): Doc fix.
11359
11360 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
11361
11362 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
11363 (syms_of_dired): Add them.
11364
11365 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
11366
11367 Fix minor alloc.c problems found by static checking.
11368 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
11369 New extern decls, to avoid calling undeclared functions.
11370 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
11371 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
11372 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
11373 (NEED_MEM_INSERT): New macro.
11374 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
11375 Remove one incorrect comment and fix another.
11376
11377 Fix minor ralloc.c problems found by static checking.
11378 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
11379 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
11380 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
11381 (r_alloc_sbrk): Now static.
11382
11383 Improve ralloc.c interface checking.
11384 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
11385 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
11386 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
11387 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
11388 [REL_ALLOC]: ... to here, to check interface.
11389 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
11390 Remove decls. This fixes an "It stinks!".
11391
11392 * alloc.c (which_symbols): Fix alignment issue / type clash.
11393
11394 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
11395
11396 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
11397 (struct Lisp_Misc_Any): Likewise.
11398 (struct Lisp_Free): Likewise.
11399 * alloc.c (union aligned_Lisp_Symbol): Define.
11400 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
11401 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
11402 (union aligned_Lisp_Misc): Define.
11403 (MARKER_BLOCK_SIZE, struct marker_block): Use union
11404 aligned_Lisp_Misc instead of union Lisp_Misc.
11405 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
11406
11407 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
11408
11409 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
11410 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
11411 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
11412 * s/netbsd.h, s/sol2-6.h:
11413 Remove definition of GC_MARK_STACK, since the default now works.
11414 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
11415 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
11416 no longer the default.
11417 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
11418
11419 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
11420
11421 * lread.c (lisp_file_lexically_bound_p):
11422 Fix hang at ";-*-\n" (bug#11238).
11423
11424 2012-04-14 Eli Zaretskii <eliz@gnu.org>
11425
11426 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
11427 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
11428
11429 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
11430
11431 * nsterm.m (constrainFrameRect): Always constrain when there is only
11432 one screen (Bug#10962).
11433
11434 2012-04-13 Ken Brown <kbrown@cornell.edu>
11435
11436 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
11437
11438 2012-04-13 Reuben Thomas <rrt@sc3d.org>
11439
11440 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
11441
11442 2012-04-11 Daniel Colascione <dancol@dancol.org>
11443
11444 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
11445 against is gone. It's better to use vfork now so that when Cygwin
11446 gains a new, working vfork, we use it automatically (bug#10398).
11447
11448 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
11449
11450 * window.c (save_window_save): Obey window-point-insertion-type.
11451
11452 2012-04-11 Glenn Morris <rgm@gnu.org>
11453
11454 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
11455
11456 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
11457
11458 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
11459
11460 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
11461
11462 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
11463 (force_quit_count): New var.
11464 (handle_interrupt): Use it.
11465
11466 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
11467
11468 * w32.c (w32_delayed_load): Record the full path of the library
11469 being loaded (bug#10424).
11470
11471 2012-04-09 Glenn Morris <rgm@gnu.org>
11472
11473 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
11474 not just in the obarray, before snarfing them. (Bug#11036)
11475
11476 * Makefile.in ($(leimdir)/leim-list.el):
11477 Pass EMACS rather than BUILT_EMACS.
11478
11479 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
11480
11481 * process.c (make_process):
11482 * process.h: Add integer `gnutls_handshakes_tried' member to
11483 process struct.
11484
11485 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
11486 Add convenience `GNUTLS_LOG2i' macro.
11487
11488 * gnutls.c (gnutls_log_function2i): Convenience log function.
11489 (emacs_gnutls_read): Use new log functions,
11490 `gnutls_handshakes_tried' process member, and
11491 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
11492 attempts per process (connection).
11493
11494 2012-04-09 Chong Yidong <cyd@gnu.org>
11495
11496 * eval.c (Fuser_variable_p, user_variable_p_eh)
11497 (lisp_indirect_variable): Functions deleted.
11498 (Fdefvar): Caller changed.
11499
11500 * callint.c (Finteractive, Fcall_interactively):
11501 * minibuf.c (Fread_variable): Callers changed.
11502
11503 2012-04-09 Eli Zaretskii <eliz@gnu.org>
11504
11505 * xdisp.c (set_cursor_from_row): If the display string appears in
11506 the buffer at position that is closer to point than the position
11507 after the display string, display the cursor on the first glyph of
11508 the display string. Fixes cursor display when a 'display' text
11509 property immediately follows invisible text. (Bug#11094)
11510
11511 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
11512
11513 composite.c: use 'double' consistently
11514 * composite.c (get_composition_id): Use 'double' consistently
11515 instead of converting 'float' to 'double' and vice versa; this is
11516 easier to understand and avoids a GCC warning.
11517
11518 2012-04-09 Glenn Morris <rgm@gnu.org>
11519
11520 * Makefile.in: Generate leim-list with bootstrap-emacs, in
11521 preparation for dumping it with emacs. (Bug#4789)
11522 (leimdir): New variable.
11523 ($(leimdir)/leim-list.el): New rule.
11524 (emacs$(EXEEXT)): Depend on leim-list.el.
11525
11526 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
11527 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
11528 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
11529
11530 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
11531
11532 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
11533 proper alignment.
11534
11535 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
11536
11537 * xml.c (init_libxml2_functions) [WINDOWSNT]:
11538 Remove unused local variable.
11539
11540 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
11541
11542 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
11543 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
11544 (mark_memory): Mark Lisp_Objects only if pointers might hide in
11545 objects, as mark_maybe_pointer will catch them otherwise.
11546 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
11547 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
11548
11549 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
11550
11551 Fix typo that broke non-Windows builds.
11552 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
11553
11554 2012-04-07 Eli Zaretskii <eliz@gnu.org>
11555
11556 Support building on MS-Windows with libxml2.
11557
11558 * makefile.w32-in (OBJ2): Add xml.$(O).
11559 (GLOBAL_SOURCES): Add xml.c.
11560 ($(BLD)/xml.$(O)): New dependency list.
11561
11562 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
11563 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
11564 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
11565 [!WINDOWSNT]: New macros.
11566 (init_libxml2_functions, libxml2_loaded_p): New functions.
11567 (parse_region): Call fn_xmlCheckVersion instead of using the macro
11568 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
11569 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
11570 Calls xmlCleanupParser only if libxml2 was loaded (or statically
11571 linked in).
11572 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
11573 Call init_libxml2_functions before calling libxml2 functions.
11574 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
11575
11576 * emacs.c: Don't include libxml/parser.h.
11577 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
11578 xmlCleanupParser directly.
11579
11580 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
11581
11582 2012-04-07 Eli Zaretskii <eliz@gnu.org>
11583
11584 * indent.c (Fvertical_motion): If there is a display string at
11585 point, use it.vpos to compute how many lines to backtrack after
11586 move_it_to point. (Bug#11133)
11587
11588 2012-04-06 Eli Zaretskii <eliz@gnu.org>
11589
11590 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
11591 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
11592 about subtle differences between FETCH_CHAR* and STRING_CHAR*
11593 macros related to unification of CJK characters. For the details,
11594 see the discussion following the message here:
11595 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
11596
11597 2012-04-04 Chong Yidong <cyd@gnu.org>
11598
11599 * keyboard.c (Vdelayed_warnings_list): Doc fix.
11600
11601 2012-04-01 Eli Zaretskii <eliz@gnu.org>
11602
11603 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
11604 instead of alloca. (Bug#11138)
11605
11606 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
11607
11608 * w32menu.c (is_simple_dialog): Properly check lisp types.
11609 (Bug#11141)
11610
11611 2012-03-31 Eli Zaretskii <eliz@gnu.org>
11612
11613 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
11614 position we get to after a call to move_it_to fails the
11615 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
11616 only if we wind up in a string from display property. (Bug#11063)
11617
11618 * window.c (Fdelete_other_windows_internal): Invalidate the row
11619 and column information about mouse highlight, so that redisplay
11620 restores it after reallocating the glyph matrices. (Bug#7464)
11621
11622 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
11623 string comes from a `display' text property, use the buffer
11624 position of that property as if we actually saw that position in
11625 the row's glyphs.
11626 (move_it_by_lines): Remove the assertion that
11627 "it->current_x == 0 && it->hpos == 0" which can be legitimately
11628 violated when there's a before-string at the beginning of a line.
11629 (Bug#11063)
11630
11631 2012-03-30 Eli Zaretskii <eliz@gnu.org>
11632
11633 * xdisp.c (append_space_for_newline): If the default face was
11634 remapped, use the remapped face for the appended newline.
11635 (extend_face_to_end_of_line): Use the remapped default face for
11636 extending the face to the end of the line.
11637 (display_line): Call extend_face_to_end_of_line when the default
11638 face was remapped. (Bug#11068)
11639
11640 2012-03-29 Eli Zaretskii <eliz@gnu.org>
11641
11642 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
11643
11644 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
11645
11646 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
11647
11648 2012-03-27 Glenn Morris <rgm@gnu.org>
11649
11650 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
11651 Doc fixes.
11652
11653 2012-03-26 Kenichi Handa <handa@m17n.org>
11654
11655 * dispextern.h (struct glyph): Fix previous change. Change the
11656 bit length of glyphless.ch to 25 (Bug#11082).
11657
11658 2012-03-26 Chong Yidong <cyd@gnu.org>
11659
11660 * keyboard.c (Vselection_inhibit_update_commands): New variable.
11661 (command_loop_1): Use it; inhibit selection update for
11662 handle-select-window too (Bug#8996).
11663
11664 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
11665
11666 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
11667
11668 2012-03-25 Kenichi Handa <handa@m17n.org>
11669
11670 * dispextern.h (struct glyph): Change the bit length of
11671 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
11672
11673 2012-03-24 Eli Zaretskii <eliz@gnu.org>
11674
11675 * s/ms-w32.h (tzname): Include time.h before redirecting to
11676 _tzname. Fixes the MSVC build. (Bug#9960)
11677
11678 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
11679
11680 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
11681 characters.
11682
11683 * xterm.c (XTread_socket): Only modify handling_signal if
11684 !SYNC_INPUT. (Bug#11080)
11685
11686 2012-03-23 Eli Zaretskii <eliz@gnu.org>
11687
11688 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
11689 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
11690 when fetching a multibyte character consumes more bytes than
11691 CHAR_BYTES returns, due to unification of CJK characters in
11692 string_char. (Bug#11073)
11693
11694 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
11695
11696 * process.c (wait_reading_process_output): Handle pty disconnect
11697 by refraining from sending oneself a SIGCHLD (bug#10933).
11698
11699 2012-03-22 Chong Yidong <cyd@gnu.org>
11700
11701 * dispextern.h (struct it): New member string_from_prefix_prop_p.
11702
11703 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
11704 Mark string as coming from a prefix property.
11705 (handle_face_prop): Use default face for prefix strings (Bug#4281).
11706 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
11707
11708 2012-03-21 Chong Yidong <cyd@gnu.org>
11709
11710 * xfaces.c (Vface_remapping_alist): Doc fix.
11711
11712 2012-03-20 Eli Zaretskii <eliz@gnu.org>
11713
11714 * w32proc.c (Fw32_set_console_codepage)
11715 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
11716 Doc fixes.
11717
11718 2012-03-20 Chong Yidong <cyd@gnu.org>
11719
11720 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
11721 to reflect default non-nil value of redisplay-dont-pause.
11722
11723 2012-03-19 Kenichi Handa <handa@m17n.org>
11724
11725 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
11726 it fit in a valid range (Bug#11003).
11727
11728 2012-03-18 Eli Zaretskii <eliz@gnu.org>
11729
11730 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
11731 that is not from display property, accept the row as a "cursor
11732 row" if one of the string's character has a non-nil `cursor'
11733 property. Fixes cursor positioning when there are newlines in
11734 overlay strings, e.g. in icomplete.el. (Bug#11035)
11735
11736 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
11737
11738 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
11739
11740 2012-03-12 Chong Yidong <cyd@gnu.org>
11741
11742 * eval.c (inhibit_lisp_code): Rename from
11743 inhibit_window_configuration_change_hook; move from window.c.
11744
11745 * xfns.c (unwind_create_frame_1, Fx_create_frame):
11746 * window.c (run_window_configuration_change_hook)
11747 (syms_of_window): Callers changed.
11748
11749 2012-03-11 Chong Yidong <cyd@gnu.org>
11750
11751 * keymap.c (Fkey_description): Doc fix (Bug#9700).
11752
11753 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
11754
11755 2012-03-10 Chong Yidong <cyd@gnu.org>
11756
11757 * frame.c (other_visible_frames): Don't assume the selected frame
11758 is visible (Bug#10955).
11759
11760 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
11761
11762 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
11763
11764 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
11765
11766 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
11767 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
11768 zero (Bug#10954).
11769
11770 2012-03-03 Glenn Morris <rgm@gnu.org>
11771
11772 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
11773
11774 2012-03-02 Eli Zaretskii <eliz@gnu.org>
11775
11776 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
11777 position past the first glyph_row that ends at ZV. (Bug#10902)
11778 (redisplay_window, next_element_from_string): Fix typos in
11779 comments.
11780 (redisplay_window): Pass to move_it_vertically the margin in
11781 pixels, not in screen lines.
11782
11783 2012-03-02 Glenn Morris <rgm@gnu.org>
11784
11785 * buffer.c (buffer-list-update-hook): Doc fix.
11786
11787 2012-02-29 Eli Zaretskii <eliz@gnu.org>
11788
11789 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
11790 push_it before setting up the iterator for the first overlay
11791 string, even if we have an empty string loaded.
11792 (next_overlay_string): If there's an empty string on the iterator
11793 stack, pop the stack. (Bug#10903)
11794
11795 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
11796
11797 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
11798 Suggested by Stefan Monnier in
11799 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
11800 * alloc.c (widen_to_Lisp_Object): New static function.
11801 (mark_memory): Also mark Lisp_Objects by fetching pointer words
11802 and widening them to Lisp_Objects. This would work even if
11803 USE_LSB_TAG is defined and wide integers are used, which might
11804 happen in a future version of Emacs.
11805
11806 2012-02-25 Chong Yidong <cyd@gnu.org>
11807
11808 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
11809 Doc fix.
11810
11811 * xselect.c (Fx_selection_exists_p): Doc fix.
11812 (x_clipboard_manager_save_all): Print an informative message
11813 before saving to clipboard manager.
11814
11815 2012-02-24 Chong Yidong <cyd@gnu.org>
11816
11817 * keyboard.c (process_special_events): Handle all X selection
11818 requests in kbd_buffer, not just the next one (Bug#8869).
11819
11820 2012-02-23 Chong Yidong <cyd@gnu.org>
11821
11822 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
11823 call when setting menu-bar-lines and tool-bar-lines parameters.
11824 (unwind_create_frame_1): New helper function.
11825
11826 * window.c (inhibit_window_configuration_change_hook): New var.
11827 (run_window_configuration_change_hook): Obey it.
11828 (syms_of_window): Initialize it.
11829
11830 2012-02-22 Chong Yidong <cyd@gnu.org>
11831
11832 * xterm.c (x_draw_image_relief): Add missing type check for
11833 Vtool_bar_button_margin (Bug#10743).
11834
11835 2012-02-21 Chong Yidong <cyd@gnu.org>
11836
11837 * fileio.c (Vfile_name_handler_alist): Doc fix.
11838
11839 * buffer.c (Fget_file_buffer): Protect against invalid file
11840 handler return value.
11841
11842 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
11843
11844 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
11845 when computing $valmask.
11846
11847 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
11848 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
11849 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
11850 It's useless in that case, and it can cause problems on hosts
11851 that allocate halves of EMACS_INT values separately.
11852 Reported by Dan Horák. Diagnosed by Andreas Schwab in
11853 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
11854 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
11855 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
11856 it avoids undefined behavior on hosts where shifting right by more
11857 than the word width has undefined behavior.
11858
11859 2012-02-19 Chong Yidong <cyd@gnu.org>
11860
11861 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
11862 (Funhandled_file_name_directory, Ffile_name_as_directory)
11863 (Fdirectory_file_name, Fexpand_file_name)
11864 (Fsubstitute_in_file_name): Protect against invalid file handler
11865 return values (Bug#10845).
11866
11867 2012-02-18 Eli Zaretskii <eliz@gnu.org>
11868
11869 * .gdbinit (pitx): Fix incorrect references to fields of the
11870 iterator stack.
11871
11872 2012-02-17 Chong Yidong <cyd@gnu.org>
11873
11874 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
11875
11876 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
11877
11878 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
11879 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
11880
11881 2012-02-15 Chong Yidong <cyd@gnu.org>
11882
11883 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
11884 marked as special. Also, starting docstrings with * is obsolete.
11885
11886 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
11887
11888 * gnutls.c (emacs_gnutls_write): Fix last change.
11889
11890 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
11891
11892 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
11893 send_process.
11894
11895 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
11896
11897 * keymap.c (Fsingle_key_description): Handle char ranges.
11898
11899 2012-02-12 Chong Yidong <cyd@gnu.org>
11900
11901 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
11902 as that creates a dangerous corner case.
11903
11904 * window.c (Fdelete_window_internal): Invalidate the mouse
11905 highlight (Bug#9904).
11906
11907 2012-02-12 Glenn Morris <rgm@gnu.org>
11908
11909 * xselect.c (Fx_own_selection_internal)
11910 (Fx_get_selection_internal, Fx_disown_selection_internal)
11911 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
11912 * nsselect.m (Fx_own_selection_internal)
11913 (Fx_disown_selection_internal, Fx_selection_exists_p)
11914 (Fx_selection_owner_p, Fx_get_selection_internal):
11915 Sync docs and argument specs with the xselect.c versions.
11916
11917 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
11918
11919 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
11920
11921 2012-02-11 Eli Zaretskii <eliz@gnu.org>
11922
11923 * w32select.c (Fx_selection_exists_p): Sync doc string and
11924 argument list with xselect.c. (Bug#10783)
11925
11926 * w16select.c (Fx_selection_exists_p): Sync doc string and
11927 argument list with xselect.c. (Bug#10783)
11928
11929 2012-02-10 Glenn Morris <rgm@gnu.org>
11930
11931 * fns.c (Fsecure_hash): Doc fix.
11932
11933 2012-02-09 Kenichi Handa <handa@m17n.org>
11934
11935 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
11936
11937 2012-02-07 Chong Yidong <cyd@gnu.org>
11938
11939 * buffer.c (Fbuffer_local_variables)
11940 (buffer_lisp_local_variables): Handle unbound vars correctly;
11941 don't let Qunbound leak into Lisp.
11942
11943 2012-02-07 Glenn Morris <rgm@gnu.org>
11944
11945 * image.c (Fimagemagick_types): Doc fix.
11946
11947 * image.c (imagemagick-render-type): Change it from a lisp object
11948 to an integer. Move the doc here from the lisp manual.
11949 Treat all values not equal to 0 the same.
11950
11951 2012-02-06 Chong Yidong <cyd@gnu.org>
11952
11953 * doc.c (store_function_docstring): Avoid applying docstring of
11954 alias to base function (Bug#2603).
11955
11956 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
11957
11958 * .gdbinit (pp1, pv1): Remove redundant defines.
11959 (pr): Use pp.
11960
11961 2012-02-04 Chong Yidong <cyd@gnu.org>
11962
11963 * nsterm.m: Declare a global (Bug#10694).
11964
11965 2012-02-04 Eli Zaretskii <eliz@gnu.org>
11966
11967 * w32.c (get_emacs_configuration_options):
11968 Include --enable-checking, if specified, in the return value.
11969
11970 2012-02-04 Martin Rudalics <rudalics@gmx.at>
11971
11972 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
11973 after rounding frame sizes. (Bug#9723)
11974
11975 2012-02-04 Eli Zaretskii <eliz@gnu.org>
11976
11977 * keyboard.c (adjust_point_for_property): Don't position point
11978 before BEGV. (Bug#10696)
11979
11980 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 Handle overflow when computing char display width (Bug#9496).
11983 * character.c (char_width): Return EMACS_INT, not int.
11984 (char_width, c_string_width): Check for overflow when
11985 computing the width; this is possible now that individual
11986 characters can have unbounded width. Problem introduced
11987 by merge from Emacs 23 on 2012-01-19.
11988
11989 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
11990
11991 * dbusbind.c (Fdbus_register_method): Mention the return value
11992 :ignore in the docstring.
11993
11994 2012-02-02 Glenn Morris <rgm@gnu.org>
11995
11996 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
11997
11998 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11999 Unconditionally set to t. (Bug#10673)
12000 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
12001 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
12002 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
12003
12004 2012-02-02 Kenichi Handa <handa@m17n.org>
12005
12006 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
12007 0, do not call append_composite_glyph.
12008
12009 2012-02-02 Kenichi Handa <handa@m17n.org>
12010
12011 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
12012 NULL (Bug#6988).
12013 (x_produce_glyphs): If the component of a composition is a null
12014 string, set it->pixel_width to 1 to avoid zero-width glyph.
12015
12016 2012-02-01 Eli Zaretskii <eliz@gnu.org>
12017
12018 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
12019 first 2 arguments are identical. This makes inserting large
12020 output from a subprocess an order of magnitude faster on
12021 MS-Windows, where all sbrk'ed memory is always contiguous.
12022
12023 2012-01-31 Glenn Morris <rgm@gnu.org>
12024
12025 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
12026 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
12027 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
12028
12029 2012-01-29 Glenn Morris <rgm@gnu.org>
12030
12031 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
12032
12033 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
12034
12035 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
12036
12037 2012-01-28 Chong Yidong <cyd@gnu.org>
12038
12039 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
12040
12041 2012-01-26 Chong Yidong <cyd@gnu.org>
12042
12043 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
12044
12045 * search.c (Fsearch_forward, Fsearch_backward): Document negative
12046 repeat counts (Bug#10507).
12047
12048 2012-01-26 Glenn Morris <rgm@gnu.org>
12049
12050 * lread.c (syms_of_lread): Doc fix.
12051
12052 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
12053
12054 * coding.c (encode_designation_at_bol): Change return value to
12055 EMACS_INT.
12056
12057 2012-01-25 Chong Yidong <cyd@gnu.org>
12058
12059 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
12060
12061 2012-01-21 Chong Yidong <cyd@gnu.org>
12062
12063 * floatfns.c (Fcopysign): Make the second argument non-optional,
12064 since nil is not allowed anyway.
12065
12066 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
12067
12068 * process.c (read_process_output): Use p instead of XPROCESS (proc).
12069 (send_process): Likewise.
12070
12071 2012-01-19 Martin Rudalics <rudalics@gmx.at>
12072
12073 * window.c (save_window_save, Fcurrent_window_configuration)
12074 (Vwindow_persistent_parameters): Do not use Qstate.
12075 Rewrite doc-strings.
12076
12077 2012-01-19 Kenichi Handa <handa@m17n.org>
12078
12079 * character.c (char_width): New function.
12080 (Fchar_width, c_string_width, lisp_string_width):
12081 Use char_width (Bug#9496).
12082
12083 2012-01-16 Martin Rudalics <rudalics@gmx.at>
12084
12085 * window.c (Vwindow_persistent_parameters): New variable.
12086 (Fset_window_configuration, save_window_save): Handle persistent
12087 window parameters.
12088
12089 2012-01-14 Eli Zaretskii <eliz@gnu.org>
12090
12091 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
12092 thrashing the stack of the thread. (Bug#9087)
12093
12094 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
12095
12096 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
12097
12098 2012-01-11 Eli Zaretskii <eliz@gnu.org>
12099
12100 * xdisp.c (rows_from_pos_range): Handle the case where the
12101 highlight ends on a newline. (Bug#10464)
12102 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
12103 he end column for display of highlight that ends on a newline
12104 before a R2L line.
12105
12106 2012-01-11 Glenn Morris <rgm@gnu.org>
12107
12108 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
12109 from load-path also when installation-directory is nil. (Bug#10208)
12110
12111 2012-01-10 Glenn Morris <rgm@gnu.org>
12112
12113 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
12114
12115 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
12116 Update template values to be closer to their typical values these days.
12117
12118 2012-01-09 Eli Zaretskii <eliz@gnu.org>
12119
12120 * xdisp.c (rows_from_pos_range): Accept additional argument
12121 DISP_STRING, and accept any glyph in a row whose object is that
12122 string as eligible for mouse highlight. Fixes mouse highlight of
12123 display strings from overlays. (Bug#10464)
12124
12125 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
12126
12127 emacs: fix an auto-save permissions race condition (Bug#10400)
12128 * fileio.c (auto_saving_dir_umask): New static var.
12129 (Fmake_directory_internal): Use it.
12130 (do_auto_save_make_dir): Set it, instead of invoking chmod after
12131 creating the directory. The old code temporarily assigns
12132 too-generous permissions to the directory.
12133 (do_auto_save_eh): Clear it.
12134 (Fdo_auto_save): Catch all errors, not just file errors, so
12135 that the var is always cleared.
12136
12137 2012-01-07 Eli Zaretskii <eliz@gnu.org>
12138
12139 * search.c (scan_buffer): Pass character positions to
12140 know_region_cache, not byte positions. (Bug#6540)
12141
12142 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
12143
12144 * w32.c (sys_rename): Report EXDEV when rename of a directory
12145 fails because the target is on another logical disk. (Bug#10284)
12146
12147 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
12148
12149 * xterm.c (x_embed_request_focus): New function.
12150
12151 * xterm.h: Add prototype.
12152
12153 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
12154
12155 2012-01-05 Glenn Morris <rgm@gnu.org>
12156
12157 * emacs.c (emacs_copyright): Update short copyright year to 2012.
12158
12159 2012-01-01 Eli Zaretskii <eliz@gnu.org>
12160
12161 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
12162 Load gnutls_transport_set_lowat only if GnuTLS version is below
12163 2.11.1.
12164 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
12165 GnuTLS versions below 2.11.1.
12166
12167 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
12168
12169 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
12170 to the doc string advising against its use for altering the way
12171 windows are scrolled.
12172
12173 2011-12-28 Kenichi Handa <handa@m17n.org>
12174
12175 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
12176 coding-system ASCII compatible only when it does not produce BOM
12177 on encoding (Bug#10383).
12178
12179 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
12180
12181 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
12182 can scroll.
12183 (create_and_show_popup_menu): Always use menu_position_func for
12184 Gtk3 (Bug#10361).
12185
12186 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
12187
12188 * callint.c (Fcall_interactively): Don't truncate prompt string.
12189
12190 2011-12-23 Eli Zaretskii <eliz@gnu.org>
12191
12192 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
12193 property that ends at ZV, so that the bidi iteration could be
12194 resumed from there (after widening). (Bug#10360)
12195
12196 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
12197
12198 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
12199
12200 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
12201
12202 * nsterm.m (x_free_frame_resources):
12203 Release f->output_data.ns->miniimage.
12204 (ns_index_color): Fix indentation. Do not retain
12205 color_table->colors[i].
12206
12207 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
12208 before returning.
12209
12210 * nsfns.m (x_set_background_color): Assign return value from
12211 ns_index_color to face-background instead of NSColor*.
12212 (ns_implicitly_set_icon_type): Fix indentation.
12213 Change assignment in for loop to comparison.
12214
12215 * emacs.c (ns_pool): New variable.
12216 (main): Assign ns_pool.
12217 (Fkill_emacs): Call ns_release_autorelease_pool.
12218
12219 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
12220 autorelease fdesc, release fdAttrs and tdict.
12221 (ns_get_covering_families): Release charset.
12222 (ns_findfonts): Release NSFontDescriptor created with new.
12223 (ns_uni_to_glyphs): Fix indentation.
12224 (setString): Release attrStr before assigning new value.
12225
12226 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
12227
12228 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
12229 and NS_IMPL_COCOA.
12230 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
12231 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
12232
12233 2011-12-18 David Reitter <reitter@cmu.edu>
12234
12235 * nsterm.m (ns_term_init): Subscribe for notifications
12236 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
12237 to method trackingNotification in EmacsMenu.
12238
12239 * nsmenu.m (trackingMenu): New variable.
12240 (trackingNotification): New method (from Aquamacs).
12241 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
12242 from Aquamacs (Bug#7030).
12243
12244 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
12245
12246 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
12247 (symbol_to_nsstring): Fix indentation.
12248 (ns_symbol_to_pb): New function.
12249 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
12250 (Fns_rotate_cut_buffers_internal): Remove.
12251 (Fns_store_selection_internal): Rename from
12252 Fns_store_cut_buffer_internal.
12253 (ns_get_foreign_selection, Fx_own_selection_internal)
12254 (Fx_disown_selection_internal, Fx_selection_exists_p)
12255 (Fns_get_selection_internal, Fns_store_selection_internal):
12256 Use ns_symbol_to_pb and check if return value is nil.
12257 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
12258 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
12259 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
12260 renamed to Sns_store_selection_internal.
12261 (ns_handle_selection_request): Move code to Fx_own_selection_internal
12262 and remove this function.
12263 (ns_handle_selection_clear): Remove, never used.
12264 (Fx_own_selection_internal): Move code from ns_handle_selection_request
12265 here.
12266
12267 2011-12-17 Ken Brown <kbrown@cornell.edu>
12268
12269 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
12270 GID is unknown (Bug#10257).
12271
12272 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
12273
12274 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
12275 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
12276 which caused a build failure on GNU/Linux IA-64. This problem was
12277 introduced by my 2011-10-07 patch.
12278
12279 2011-12-15 Juri Linkov <juri@jurta.org>
12280
12281 * image.c (imagemagick_error): New function. (Bug#10112)
12282 (imagemagick_load_image): Comment out `MagickSetResolution' call.
12283 Use `imagemagick_error' where ImageMagick functions return
12284 `MagickFalse'.
12285 (Fimagemagick_types): Add `Fnreverse' to return the list in the
12286 proper order.
12287
12288 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12289
12290 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
12291 fill background (Bug#8992).
12292
12293 2011-12-13 Martin Rudalics <rudalics@gmx.at>
12294
12295 * window.c (Vwindow_combination_resize)
12296 (Vwindow_combination_limit): Use t instead of non-nil in
12297 doc-strings.
12298 (Vrecenter_redisplay): Add first sentence of doc-string on
12299 separate line.
12300 (Frecenter): Fix doc-string typo.
12301
12302 2011-12-11 Kenichi Handa <handa@m17n.org>
12303
12304 * coding.c (Funencodable_char_position): Pay attention to the
12305 buffer text relocation (Bug#9389).
12306
12307 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
12308
12309 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
12310 gtk_init (Bug#10100).
12311
12312 2011-12-10 Eli Zaretskii <eliz@gnu.org>
12313
12314 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
12315 IT->string is nil. (Bug#10263)
12316
12317 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
12318
12319 * nsterm.h (x_free_frame_resources): Declare.
12320
12321 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
12322 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
12323
12324 * nsterm.h (ns_get_defaults_value): Declare.
12325
12326 * nsterm.m (ns_default): Call ns_get_defaults_value.
12327
12328 2011-12-09 Eli Zaretskii <eliz@gnu.org>
12329
12330 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
12331 (Bug#10170)
12332
12333 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12334
12335 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
12336 that where the value of an _OBJC_* symbol points to is in the .bss
12337 section (Bug#10240).
12338
12339 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12340
12341 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
12342 after the loop to call ccl_driver at least once (Bug#8619).
12343
12344 2011-12-08 Kenichi Handa <handa@m17n.org>
12345
12346 * ftfont.c (get_adstyle_property): Fix previous change
12347 (Bug#10233).
12348
12349 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
12350
12351 * w32.c (init_environment): If no_site_lisp, remove site-lisp
12352 dirs from the default value of EMACSLOADPATH (bug#10208).
12353
12354 2011-12-07 Glenn Morris <rgm@gnu.org>
12355
12356 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
12357 installation and source directories as well. (Bug#10208)
12358
12359 2011-12-06 Chong Yidong <cyd@gnu.org>
12360
12361 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
12362
12363 2011-12-06 Glenn Morris <rgm@gnu.org>
12364
12365 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
12366 as an error, not just -1. (Bug#10217)
12367
12368 2011-12-05 Chong Yidong <cyd@gnu.org>
12369
12370 * keyboard.c (process_special_events): New function.
12371 (swallow_events, Finput_pending_p): Use it (Bug#10195).
12372
12373 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
12374
12375 * coding.c (encode_designation_at_bol): Don't use uninitialized
12376 local variable (Bug#9318).
12377
12378 2011-12-05 Kenichi Handa <handa@m17n.org>
12379
12380 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
12381 return Qnil (Bug#8046, Bug#10193).
12382
12383 2011-12-05 Kenichi Handa <handa@m17n.org>
12384
12385 * coding.c (encode_designation_at_bol): New args charbuf_end and
12386 dst. Return the number of produced bytes. Callers changed.
12387 (coding_set_source): Return how many bytes coding->source was
12388 relocated.
12389 (coding_set_destination): Return how many bytes
12390 coding->destination was relocated.
12391 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
12392 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
12393
12394 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12395
12396 * coding.c (CODING_CHAR_CHARSET_P): New macro.
12397 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
12398 macro (Bug#9318).
12399
12400 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
12401
12402 The following changes are to fix Bug#9318.
12403
12404 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
12405 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
12406 (encode_coding_iso_2022, encode_coding_sjis)
12407 (encode_coding_big5, encode_coding_charset): Use the above macros.
12408
12409 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
12410
12411 * lisp.h (process_quit_flag): Fix external declaration.
12412
12413 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
12414
12415 Don't macro-inline non-performance-critical code.
12416 * eval.c (process_quit_flag): New function.
12417 * lisp.h (QUIT): Use it.
12418
12419 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
12420
12421 * nsfns.m (get_geometry_from_preferences): New function.
12422 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
12423
12424 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
12425
12426 * emacs.c (Qkill_emacs): Define.
12427 (syms_of_emacs): Initialize it.
12428 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
12429 Qquit_flag to `kill-emacs' instead.
12430 (quit_throw_to_read_char): Add parameter `from_signal'.
12431 All callers changed. Call Fkill_emacs if requested and safe.
12432 * lisp.h (QUIT): Call Fkill_emacs if requested.
12433
12434 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
12435
12436 * widget.c (update_wm_hints): Return if wmshell is null.
12437 (widget_update_wm_size_hints): New function.
12438
12439 * widget.h (widget_update_wm_size_hints): Declare.
12440
12441 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
12442 widget_update_wm_size_hints (Bug#10104).
12443
12444 2011-12-03 Eli Zaretskii <eliz@gnu.org>
12445
12446 * xdisp.c (handle_invisible_prop): If the invisible text ends just
12447 before a newline, prepare the bidi iterator for consuming the
12448 newline, and keep the current paragraph direction. (Bug#10183)
12449 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
12450
12451 2011-12-02 Juri Linkov <juri@jurta.org>
12452
12453 * search.c (Fword_search_regexp): New Lisp function created from
12454 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
12455 (Fword_search_backward, Fword_search_forward)
12456 (Fword_search_backward_lax, Fword_search_forward_lax):
12457 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
12458 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
12459
12460 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
12461
12462 * fileio.c (Finsert_file_contents): Move after-change-function call
12463 to before the "handled:" label, since all "goto handled" appear in
12464 cases where the *-change-functions have already been properly called
12465 (bug#10117).
12466
12467 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
12468
12469 * keyboard.c (interrupt_signal): Don't call kill-emacs when
12470 waiting for input. (Bug#10169)
12471
12472 2011-11-30 Eli Zaretskii <eliz@gnu.org>
12473
12474 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
12475 verifies glyph row's hash code--we have just reallocated the
12476 glyphs, so their contents can be complete garbage. (Bug#10164)
12477
12478 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
12479
12480 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
12481
12482 2011-11-30 Eli Zaretskii <eliz@gnu.org>
12483
12484 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
12485 attributes are tested _before_ calling verify_row_hash, to protect
12486 against GCC re-ordering of the tests. (Bug#10164)
12487
12488 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
12489
12490 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
12491
12492 * xterm.c (handle_one_xevent): Only set async_visible and friends
12493 if net_wm_state_hidden_seen is non-zero (Bug#10002)
12494 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
12495 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
12496
12497 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
12498
12499 Remove GCPRO-related macros that exist only to avoid shadowing locals.
12500 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
12501 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
12502 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
12503 All uses changed to use GCPRO1 etc.
12504 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
12505 Revert to old implementation (i.e., before 2011-03-11).
12506
12507 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12508
12509 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
12510 of scroll runs so as to avoid assigning disabled bogus rows and
12511 unnecessary graphics copy operations.
12512
12513 2011-11-27 Eli Zaretskii <eliz@gnu.org>
12514
12515 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
12516 (snprintf) [_MSC_VER]: Redirect to _snprintf.
12517 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
12518 (malloc, free, realloc, calloc): Redirect to e_* only when
12519 compiling Emacs.
12520
12521 * lisp.h (GCTYPEBITS): Move before first use.
12522 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
12523 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
12524 this macro definition.
12525
12526 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
12527 _MSC_VER.
12528
12529 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
12530
12531 * gtkutil.c (xg_create_frame_widgets):
12532 Call gtk_window_set_has_resize_grip (FALSE) if that function is
12533 present with Gtk+ 2.0.
12534
12535 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
12536
12537 * fileio.c (Finsert_file_contents): Undo previous change; see
12538 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
12539
12540 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
12541
12542 Rename locals to avoid shadowing.
12543 * fileio.c (Finsert_file_contents):
12544 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
12545 * process.c (wait_reading_process_output):
12546 Rename inner 'proc' to 'p' to avoid shadowing.
12547 Indent for consistency with usual Emacs style.
12548
12549 2011-11-25 Eli Zaretskii <eliz@gnu.org>
12550
12551 * xdisp.c (redisplay_window): If cursor row is not fully visible
12552 after recentering, and scroll-conservatively is set to a large
12553 number, scroll window by a few more lines to make the cursor fully
12554 visible and out of scroll-margin. (Bug#10105)
12555 (start_display): Don't move to the next line if the display should
12556 start at a newline that is part of a display vector or an overlay
12557 string. (Bug#10119)
12558
12559 2011-11-24 Juri Linkov <juri@jurta.org>
12560
12561 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
12562 after the `MagickPingImage' call. (Bug#10112)
12563
12564 2011-11-23 Chong Yidong <cyd@gnu.org>
12565
12566 * window.c (Fcoordinates_in_window_p): Accept only live windows.
12567
12568 2011-11-23 Martin Rudalics <rudalics@gmx.at>
12569
12570 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
12571 making another buffer current. (Bug#10114)
12572
12573 2011-11-23 Glenn Morris <rgm@gnu.org>
12574
12575 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
12576
12577 2011-11-23 Chong Yidong <cyd@gnu.org>
12578
12579 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
12580 using it (Bug#5984).
12581
12582 2011-11-22 Eli Zaretskii <eliz@gnu.org>
12583
12584 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
12585 and header-lines, as they don't have one computed for them.
12586 (Bug#10098)
12587
12588 * .gdbinit (prow): Make displayed values more self-explaining.
12589 Add row's hash code.
12590
12591 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
12592
12593 * process.c (wait_reading_process_output): Fix asynchrounous
12594 GnuTLS socket handling on some versions of the GnuTLS library.
12595 (wait_reading_process_output): Add comment and URL.
12596
12597 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
12598
12599 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
12600
12601 2011-11-21 Chong Yidong <cyd@gnu.org>
12602
12603 * window.c (Fnext_window, Fprevious_window): Doc fix.
12604
12605 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12606
12607 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
12608
12609 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
12610
12611 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
12612
12613 2011-11-20 Martin Rudalics <rudalics@gmx.at>
12614
12615 * window.c (Fset_window_combination_limit): Rename argument
12616 STATUS to LIMIT.
12617 (Vwindow_combination_limit): Remove "status" from doc-string.
12618
12619 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
12620
12621 * m/ibms390.h: Remove.
12622 * m/ibms390x.h: Don't include "ibms390.h".
12623
12624 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12625
12626 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
12627 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
12628
12629 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
12630
12631 * casetab.c (Fset_case_table):
12632 * charset.c (Fcharset_after): Fix typos.
12633
12634 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
12635
12636 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
12637 Otherwise, valgrind does not work on some platforms.
12638 Problem reported by Andreas Schwab in
12639 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
12640 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
12641 is set, removing the need for VIRT_ADDRESS_VARIES.
12642 (PURE_P): Use a more-efficient implementation that needs just one
12643 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
12644 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
12645 to 4 (xorl, subq, cmpq, setbe).
12646 * alloc.c (pure): Always extern now, since that's the
12647 VIRT_ADDR_VARIES behavior.
12648 (PURE_POINTER_P): Use a single comparison, not two, for
12649 consistency with the new puresize.h.
12650 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
12651 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
12652 Remove VIRT_ADDR_VARIES no longer needed.
12653
12654 2011-11-19 Eli Zaretskii <eliz@gnu.org>
12655
12656 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
12657 (erase_phys_cursor, update_window_cursor, show_mouse_face)
12658 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
12659 behave as if the cursor position were at the window margin.
12660
12661 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
12662 and the cursor position is out of bounds, behave as if the cursor
12663 position were at the window margin. (Bug#10075)
12664
12665 2011-11-18 Chong Yidong <cyd@gnu.org>
12666
12667 * window.c (Fwindow_combination_limit): Make first argument
12668 non-optional, since it is meaningless for live windows like the
12669 selected window.
12670
12671 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
12672
12673 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
12674
12675 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
12676
12677 * intervals.c: Fix grafting over the whole buffer (bug#10071).
12678 (graft_intervals_into_buffer): Simplify.
12679
12680 2011-11-18 Eli Zaretskii <eliz@gnu.org>
12681
12682 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
12683 hash values of the two rows.
12684 (copy_row_except_pointers): Preserve the used[] arrays and the
12685 hash values of the two rows. (Bug#10035)
12686 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
12687
12688 * xdisp.c (row_hash): New function, body extracted from
12689 compute_line_metrics.
12690 (compute_line_metrics): Call row_hash, instead of computing the
12691 hash code inline.
12692
12693 * dispnew.c (verify_row_hash): Call row_hash for computing the
12694 hash code of a row, instead of duplicating code from xdisp.c.
12695
12696 * dispextern.h (row_hash): Add prototype.
12697
12698 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
12699
12700 * frame.c (delete_frame): Don't delete the terminal when the last
12701 X frame is closed if emacs is built with GTK toolkit.
12702
12703 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
12704
12705 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
12706
12707 2011-11-17 Martin Rudalics <rudalics@gmx.at>
12708
12709 * window.c (Vwindow_splits): Rename to
12710 Vwindow_combination_resize. Suggested by Juri Linkov.
12711 (Fsplit_window_internal): Use Vwindow_combination_resize instead
12712 of Vwindow_splits.
12713
12714 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
12715
12716 * nsfns.m (Fns_font_name):
12717 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
12718
12719 2011-11-16 Martin Rudalics <rudalics@gmx.at>
12720
12721 * window.h (window): Rename slot "nest" to "combination_limit".
12722 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
12723 (Fset_window_nest): Rename to Fset_window_combination_limit.
12724 (Vwindow_nest): Rename to Vwindow_combination_limit.
12725 (recombine_windows, make_parent_window, make_window)
12726 (Fsplit_window_internal, saved_window)
12727 (Fset_window_configuration, save_window_save): Rename all
12728 occurrences of window_nest to window_combination_limit.
12729
12730 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
12731
12732 * image.c (imagemagick_load_image): Fix typo.
12733
12734 2011-11-14 Eli Zaretskii <eliz@gnu.org>
12735
12736 * xdisp.c (display_line): Move the call to
12737 highlight_trailing_whitespace before the call to
12738 compute_line_metrics, since the latter needs to see the final
12739 faces of all the glyphs to compute ROW's hash value.
12740 Fixes assertion violations in row_equal_p. (Bug#10035)
12741
12742 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
12743
12744 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
12745 just return (bug#10044).
12746
12747 2011-11-12 Eli Zaretskii <eliz@gnu.org>
12748
12749 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
12750 with user-defined heap size. Bump the default size of the temacs
12751 heap to 27MB, to avoid memory warning when running temacs.
12752 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
12753
12754 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
12755 current_matrix and desired_matrix. (Bug#9990)
12756 (verify_row_hash) [XASSERTS]: New function.
12757 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
12758 that the hash value of glyph rows is correct.
12759
12760 2011-11-12 Martin Rudalics <rudalics@gmx.at>
12761
12762 * window.h (window): Remove splits slot.
12763 * window.c (Fwindow_splits, Fset_window_splits): Remove.
12764 (Fdelete_other_windows_internal, make_parent_window)
12765 (make_window, Fsplit_window_internal, Fdelete_window_internal)
12766 (Fset_window_configuration, save_window_save): Don't deal with
12767 split status of windows.
12768 (saved_window): Remove splits slot.
12769 (Vwindow_splits): Rewrite doc-string.
12770
12771 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
12772
12773 * xfns.c (unwind_create_frame):
12774 * nsfns.m (unwind_create_frame):
12775 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
12776 Vframe_list (Bug#9999).
12777
12778 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
12779
12780 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
12781
12782 2011-11-11 Kenichi Handa <handa@m17n.org>
12783
12784 * callproc.c (Fcall_process): Set the member dst_multibyte of
12785 process_coding.
12786
12787 2011-11-11 Johan Bockgård <bojohan@gnu.org>
12788
12789 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
12790 avoid a crash (bug#9496).
12791
12792 2011-11-09 Chong Yidong <cyd@gnu.org>
12793
12794 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
12795 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
12796
12797 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12798
12799 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
12800
12801 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12802
12803 Avoid some portability problems by eschewing 'extern inline' functions.
12804 The trivial performance wins aren't worth the portability hassles; see
12805 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
12806 et seq.
12807 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12808 (window_box_width, window_box_left, window_box_left_offset)
12809 (window_box_right, window_box_right_offset): Undo previous change,
12810 by removing the "extern"s.
12811 * intervals.c (adjust_intervals_for_insertion)
12812 (adjust_intervals_for_deletion): Undo previous change,
12813 making these static again.
12814 (offset_intervals, temp_set_point_both, temp_set_point)
12815 (copy_intervals_to_string): No longer inline.
12816 * xdisp.c (window_text_bottom_y, window_box_width)
12817 (window_box_height, window_box_left_offset)
12818 (window_box_right_offset, window_box_left, window_box_right)
12819 (window_box): No longer inline.
12820
12821 2011-11-08 Chong Yidong <cyd@gnu.org>
12822
12823 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
12824 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
12825 Signal an error if not a live window.
12826 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
12827 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
12828
12829 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
12830
12831 * lisp.h (syms_of_abbrev): Remove declaration.
12832 Reported by CHENG Gao <chenggao@royau.me>.
12833
12834 2011-11-07 Eli Zaretskii <eliz@gnu.org>
12835
12836 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
12837 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
12838 of temacs in GUI mode.
12839
12840 2011-11-07 Martin Rudalics <rudalics@gmx.at>
12841
12842 * window.h: Declare delete_all_child_windows instead of
12843 delete_all_subwindows.
12844 * window.c (Fwindow_nest, Fset_window_nest)
12845 (Fset_window_new_total, Fset_window_new_normal)
12846 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
12847 (delete_all_subwindows): Rename to delete_all_child_windows.
12848 (Fdelete_other_windows_internal, Fset_window_configuration):
12849 Call delete_all_child_windows instead of delete_all_subwindows.
12850 * frame.c (delete_frame): Call delete_all_child_windows instead
12851 of delete_all_subwindows.
12852
12853 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
12854
12855 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
12856 This is also needed for porting to any host where GC_MARK_STACK is
12857 not GC_MAKE_GCPROS_NOOPS.
12858 (which_symbols): Use it.
12859
12860 2011-11-07 Kenichi Handa <handa@m17n.org>
12861
12862 * coding.c (coding_set_destination): Check coding->src_pos only
12863 when coding->src_object is a buffer (bug#9910).
12864
12865 * process.c (send_process): Set the member src_multibyte of coding
12866 to 0 (bug#9911) when sending a unibyte text.
12867
12868 * callproc.c (Fcall_process): Set the member src_multibyte of
12869 process_coding to 0 (bug#9912).
12870
12871 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12872
12873 * xmenu.c (cleanup_widget_value_tree): New function.
12874 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
12875 calling free_menubar_widget_value_tree directly (Bug#9830).
12876
12877 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
12878
12879 Fix some portability problems with 'inline'.
12880 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12881 (window_box_width, window_box_left, window_box_left_offset)
12882 (window_box_right, window_box_right_offset): Declare extern.
12883 Otherwise, these inline functions do not conform to C99 and
12884 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
12885 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
12886 * intervals.c (adjust_intervals_for_insertion)
12887 (adjust_intervals_for_deletion): Now extern, because otherwise the
12888 extern inline functions 'offset_intervals' couldn't refer to it.
12889 (static_offset_intervals): Remove.
12890 (offset_intervals): Rewrite using the old contents of
12891 static_offset_intervals. The old version didn't conform to C99
12892 because an extern inline function contained a reference to an
12893 identifier with static linkage.
12894
12895 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
12896
12897 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
12898 GC.
12899
12900 2011-11-06 Eli Zaretskii <eliz@gnu.org>
12901
12902 * xdisp.c (init_iterator, reseat_to_string): Don't set the
12903 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
12904 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
12905 return Qleft_to_right.
12906
12907 2011-11-06 Chong Yidong <cyd@gnu.org>
12908
12909 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
12910 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
12911 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
12912 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
12913 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
12914 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
12915 (Fwindow_vscroll): Doc fix.
12916 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
12917 argument, since it makes no sense to pass a live window and for
12918 consistency with window-child.
12919
12920 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
12921
12922 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
12923 support MSVC.
12924
12925 2011-11-05 Jason Rumney <jasonr@gnu.org>
12926
12927 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
12928 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
12929 fonts (Bug#6029).
12930 (add_font_entity_to_list): Fix logic errors in mixed boolean and
12931 bitwise arithmetic preventing use of unicode-sip and non-truetype
12932 opentype fonts.
12933
12934 2011-11-05 Eli Zaretskii <eliz@gnu.org>
12935
12936 * s/ms-w32.h (fstat, stat, utime): Move redirections to
12937 "emacs"-only part.
12938
12939 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
12940 initialization code to keep similarity to xfns.c after changes
12941 from 2011-11-05.
12942
12943 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
12944
12945 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
12946 (unwind_create_frame): New function (Bug#9943).
12947 (Fx_create_frame): Restructure code to be more similar to the one in
12948 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
12949 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
12950 Move terminal->reference_count++ just before making the frame official
12951 (Bug#9943).
12952
12953 * nsterm.m (x_free_frame_resources): New function.
12954 (x_destroy_window): Move code to x_free_frame_resources.
12955
12956 * xfns.c (unwind_create_frame): Fix comment.
12957 (Fx_create_frame, x_create_tip_frame):
12958 Move terminal->reference_count++ just before making the frame
12959 official. Move initialization of image_cache_refcount and
12960 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
12961
12962 2011-11-05 Eli Zaretskii <eliz@gnu.org>
12963
12964 Support MSVC build with newer versions of Visual Studio.
12965 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
12966 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
12967 nt/gmake.defs.
12968
12969 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
12970 which are not supported by MSVC.
12971 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
12972 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
12973 bitfields.
12974 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
12975 types in bitfields.
12976 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
12977
12978 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
12979
12980 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
12981
12982 Support MSVC build with newer versions of Visual Studio.
12983 * w32.c: Don't include w32api.h for MSVC.
12984 (init_environment) [_MSC_VER]: Call sys_access, not _access.
12985
12986 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
12987 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
12988 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
12989 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
12990 e_* cousins.
12991 (alloca) [_MSC_VER]: Define to _alloca.
12992
12993 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
12994
12995 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
12996
12997 2011-11-04 Eli Zaretskii <eliz@gnu.org>
12998
12999 * xdisp.c (note_mouse_highlight): If either of
13000 previous/next-single-property-change returns nil, treat that as
13001 the beginning or the end of the buffer. (Bug#9955)
13002
13003 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
13004
13005 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
13006 label is not null (Bug#9951).
13007 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
13008 may be NULL.
13009
13010 2011-11-04 Eli Zaretskii <eliz@gnu.org>
13011
13012 * window.c (Fwindow_body_size): Mention in the doc string that the
13013 return value is in frame's canonical units. (Bug#9949)
13014
13015 2011-11-03 Eli Zaretskii <eliz@gnu.org>
13016
13017 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
13018
13019 * w32fns.c (unwind_create_frame): If needed, free the glyph
13020 matrices of the partially constructed frame. (Bug#9943)
13021 * xfns.c (unwind_create_frame): Likewise.
13022
13023 2011-11-01 Eli Zaretskii <eliz@gnu.org>
13024
13025 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
13026 Don't stop backward scan on the continuation glyph, even though
13027 its CHARPOS is positive.
13028 (mouse_face_from_buffer_pos, note_mouse_highlight):
13029 Rename cover_string to disp_string.
13030
13031 2011-11-01 Martin Rudalics <rudalics@gmx.at>
13032
13033 * window.c (temp_output_buffer_show): Don't use
13034 Vtemp_buffer_show_specifiers.
13035 (Vtemp_buffer_show_specifiers): Remove unused variable.
13036
13037 2011-10-30 Eli Zaretskii <eliz@gnu.org>
13038
13039 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
13040 past the beginning of the current glyph matrix.
13041
13042 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
13043
13044 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
13045 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
13046 HAVE_GTK3 (Bug#9869).
13047
13048 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
13049 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
13050
13051 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
13052
13053 * xterm.c: Declare x_handle_net_wm_state to return int.
13054 (handle_one_xevent): Check if we are iconified but don't have
13055 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
13056 (get_current_wm_state): Return non-zero if not hidden,
13057 check for _NET_WM_STATE_HIDDEN (Bug#9893).
13058 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
13059 (x_handle_net_wm_state): Return what get_current_wm_state returns.
13060 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
13061
13062 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
13063
13064 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
13065 so that this new function doesn't get optimized away by a
13066 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
13067
13068 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
13069
13070 * frame.h (MOUSE_HL_INFO): Remove excess parens.
13071
13072 2011-10-29 Eli Zaretskii <eliz@gnu.org>
13073
13074 Fix the `xbytecode' command.
13075 * .gdbinit (xprintbytestr): New command.
13076 (xwhichsymbols): Rename from `which'; all callers changed.
13077 (xbytecode): Print the byte-code string as well.
13078
13079 2011-10-29 Kim Storm <storm@cua.dk>
13080
13081 * alloc.c (which_symbols): New function.
13082
13083 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
13084
13085 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
13086 line. (Bug#9903)
13087
13088 2011-10-29 Glenn Morris <rgm@gnu.org>
13089
13090 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
13091 Not clear what it was for, and it causes various bugs. (Bug#9839)
13092
13093 2011-10-28 Eli Zaretskii <eliz@gnu.org>
13094
13095 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
13096 possible random value that matches one of those tested as
13097 condition to clear the mouse face.
13098
13099 2011-10-28 Chong Yidong <cyd@gnu.org>
13100
13101 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
13102
13103 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
13104
13105 * window.c (make_window): Initialize phys_cursor_on_p.
13106
13107 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
13108
13109 * lisp.h (struct Lisp_Symbol): Update comments.
13110
13111 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
13112
13113 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
13114
13115 2011-10-28 Eli Zaretskii <eliz@gnu.org>
13116
13117 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
13118 <oslsachem@gmail.com> for helping to debug this.
13119
13120 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
13121 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
13122 (g_b_init_get_glyph_outline_w): New static variables.
13123 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
13124 (GetGlyphOutlineW_Proc): New typedefs.
13125 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
13126 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
13127 New functions.
13128 (w32font_open_internal, compute_metrics):
13129 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
13130 instead of calling the "wide" APIs directly.
13131
13132 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
13133
13134 * w32.h (syms_of_w32font): Add prototype.
13135
13136 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
13137
13138 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
13139 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
13140 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
13141 (Fmove_to_window_line): Doc fix.
13142
13143 2011-10-27 Chong Yidong <cyd@gnu.org>
13144
13145 * process.c (make_process): Set gnutls_state to NULL.
13146
13147 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
13148 non-NULL, regardless of GNUTLS_INITSTAGE.
13149 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
13150 an error. Set process slots as soon as we allocate them.
13151
13152 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
13153
13154 2011-10-27 Chong Yidong <cyd@gnu.org>
13155
13156 * gnutls.c (emacs_gnutls_deinit): New function.
13157 Deallocate credentials structures as well as calling gnutls_deinit.
13158 (Fgnutls_deinit, Fgnutls_boot): Use it.
13159
13160 * process.c (make_process): Initialize GnuTLS credentials to NULL.
13161 (deactivate_process): Call emacs_gnutls_deinit.
13162
13163 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
13164
13165 * image.c (x_create_x_image_and_pixmap):
13166 * w32.c (sys_rename, w32_delayed_load):
13167 * w32font.c (fill_in_logfont):
13168 * w32reg.c (x_get_string_resource): Silence compiler warnings.
13169
13170 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
13171
13172 * w32fns.c (w32_default_color_map): New function,
13173 extracted from Fw32_default_color_map.
13174 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
13175
13176 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
13177
13178 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
13179
13180 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
13181
13182 * keyboard.c (test_undefined): New function (bug#9751).
13183 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
13184
13185 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
13186
13187 * sysdep.c (init_sys_modes): Fix the check for the controlling
13188 terminal (Bug#6649).
13189
13190 2011-10-20 Eli Zaretskii <eliz@gnu.org>
13191
13192 * dispextern.h (struct bidi_it): New member next_en_type.
13193
13194 * bidi.c (bidi_line_init): Initialize the next_en_type member.
13195 (bidi_resolve_explicit_1): When next_en_pos is valid for the
13196 current character, check also for next_en_type being WEAK_EN.
13197 (bidi_resolve_weak): Don't enter the expensive loop if the current
13198 position is before next_en_pos. Record the bidi type of the first
13199 non-ET, non-BN character we find, in addition to its position.
13200 (bidi_level_of_next_char): Invalidate next_en_type when
13201 next_en_pos is over-stepped.
13202
13203 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
13204
13205 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
13206 * editfns.c: Rewrite current-time-zone so that it invokes
13207 the equivalent of (format-time-string "%Z") to get the time zone name.
13208 This fixes a bug when the time zone name contains characters that
13209 need converting from the system time locale to Emacs internal format.
13210 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
13211 that patch fixed format-time-string to do the conversion, but
13212 I forgot to fix current-time-zone.
13213 (format_time_string): New function, containing most of
13214 what Fformat_time_string used to contain.
13215 (Fformat_time_string): Rewrite in terms of format_time_string.
13216 This doesn't change this function's behavior.
13217 (current-time-zone): Rewrite to use format_time_string.
13218 This fixes the bug reported by Michael Schierl in
13219 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
13220 Jason Rumney's 2007-06-07 change worked around this bug, but
13221 didn't fix it.
13222 * systime.h (tzname, timezone): Remove no-longer-used declarations.
13223
13224 2011-10-19 Eli Zaretskii <eliz@gnu.org>
13225
13226 * xdisp.c (start_display): If the character at POS is displayed
13227 via a display vector, reset IT->current.dpvec_index to zero.
13228 (try_window_reusing_current_matrix): If a line ends in a display
13229 vector or the next line starts in a display vector, continue
13230 redrawing the window even though the character position of
13231 start_row was reached.
13232 (Bug#9771, part 2)
13233
13234 2011-10-18 Chong Yidong <cyd@gnu.org>
13235
13236 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
13237 with nobreak-char-display too.
13238
13239 2011-10-18 Eli Zaretskii <eliz@gnu.org>
13240
13241 Fix part 3 of bug#9771.
13242 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
13243 (bidi_resolve_neutral): Don't enter the expensive loop looking for
13244 non-neutral characters if the current character is a paragraph
13245 separator (a.k.a. Newline). This avoids running the same
13246 expensive loop twice, once when we consume the preceding newline
13247 and the other time when the line actually needs to be displayed.
13248 Avoid the loop when we see neutrals on the base embedding level
13249 following a character whose directionality is the same as the
13250 paragraph's. This avoids running the expensive loop when a line
13251 ends in a long sequence of neutrals, like control characters.
13252 Add assertion against STRONG_AL type. Slightly rearrange code
13253 that determines the type of a neutral given the first non-neutral
13254 that follows it.
13255 (bidi_level_of_next_char): Set next_en_pos to zero when
13256 invalidating its info.
13257
13258 2011-10-17 Eli Zaretskii <eliz@gnu.org>
13259
13260 * xdisp.c (push_display_prop): Determine whether to record string
13261 or buffer position by IT->string, not by IT->method. Allow
13262 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
13263 (move_it_vertically_backward): Don't look for character position
13264 immediately after the newline when in a continuation line.
13265 (Bug#9771, part 1)
13266
13267 2011-10-15 Martin Rudalics <rudalics@gmx.at>
13268
13269 * window.c (coordinates_in_window): Rewrite and delabelize
13270 vertical border check. (Bug#5357) (Bug#9618)
13271
13272 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
13273
13274 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
13275 errors in XSetWindowBorder (bug#9310).
13276
13277 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
13278
13279 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
13280 avoid crash when xmalloc overrun checking is enabled.
13281
13282 2011-10-13 Eli Zaretskii <eliz@gnu.org>
13283
13284 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
13285 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
13286 cursor motion with <left> and <right> arrow keys.
13287
13288 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
13289 some callers set that themselves.
13290
13291 2011-10-12 Eli Zaretskii <eliz@gnu.org>
13292
13293 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
13294 display string and the previous row comes from the same string and
13295 is empty. (Bug#9739) (Bug#9738)
13296
13297 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
13298
13299 * doc.c (get_doc_string): Encode file name (bug#9735).
13300
13301 2011-10-12 Eli Zaretskii <eliz@gnu.org>
13302
13303 * bidi.c (bidi_level_of_next_char):
13304 * xdisp.c (get_visually_first_element): Remove old incorrect
13305 comments regarding the Unicode Line Separator character.
13306
13307 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
13308
13309 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
13310
13311 * alloc.c (Fgc_status): Do not access beyond zombies array
13312 boundary if nzombies > MAX_ZOMBIES.
13313 * alloc.c (dump_zombies): Add missing format specifier.
13314
13315 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
13316
13317 * xdisp.c (set_cursor_from_row): Simplify conditionals,
13318 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
13319
13320 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
13321 Some packages use them to denote characters with modifiers.
13322
13323 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
13324
13325 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
13326 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
13327 matching a pp-number. Rename parameter var to var1.
13328
13329 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
13330
13331 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
13332
13333 2011-10-08 Glenn Morris <rgm@gnu.org>
13334
13335 * callint.c (Fcall_interactively): Give a more explicit error for the
13336 'c' case with a non-character input. (Bug#8479)
13337
13338 2011-10-08 Eli Zaretskii <eliz@gnu.org>
13339
13340 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
13341 lines.
13342 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
13343 lines that are hscrolled on the left.
13344
13345 * dispnew.c (buffer_posn_from_coords): Account for a possible
13346 presence of header-line. (Bug#4426)
13347
13348 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
13349
13350 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
13351 Don't advertise functionality which we discourage or doesn't work.
13352
13353 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
13354
13355 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
13356 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
13357 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
13358 this makes Emacs dump core during garbage collection on rare
13359 occasions. sizeof is obviously inferior to offsetof here, so
13360 stick with offsetof.
13361 (GC_POINTER_ALIGNMENT): New macro.
13362 (mark_memory): Omit 3rd (offset) arg; caller changed.
13363 Don't assume EMACS_INT alignment is the same as pointer alignment.
13364
13365 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
13366
13367 * keyboard.c (read_key_sequence_remapped): New var.
13368 (read_key_sequence): Compute remapping in the right buffer.
13369 (command_loop_1): Use read_key_sequence's remapping directly.
13370
13371 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
13372
13373 * dired.c (file_name_completion): Don't expand file name.
13374 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
13375 before checking file name handler.
13376
13377 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
13378 they've been requested explicitly (bug#9591).
13379
13380 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
13381
13382 * keymap.c (Fsingle_key_description): Use make_specified_string
13383 instead of build_string to build string from push_key_description.
13384 (Bug#5193)
13385
13386 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
13387
13388 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
13389 This fixes a Y2038 bug on 64-bit hosts.
13390 * buffer.c (reset_buffer):
13391 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
13392 (Fclear_buffer_auto_save_failure):
13393 Use 0, not -1, to represent an unset failure time, since time_t
13394 might not be signed.
13395
13396 Remove dependency on glibc malloc internals.
13397 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13398 Move back here from lisp.h, but with their new implementations.
13399 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13400 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
13401 * charset.c (charset_table_init): New static var.
13402 (syms_of_charset): Use it instead of xmalloc. This removes a
13403 dependency on glibc malloc internals. See Eli Zaretskii's comment in
13404 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
13405 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13406 Move back to alloc.c.
13407 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13408 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
13409
13410 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
13411
13412 * nsterm.m (windowDidResize): Call x_set_window_size only when
13413 ns_in_resize is true. Otherwise set pixelwidth/height and
13414 call change_frame_size (Bug#9628).
13415
13416 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
13417
13418 Port --enable-checking=all to Fedora 14 x86-64.
13419 * charset.c (syms_of_charset): Also account for glibc malloc's
13420 internal overhead when calculating the initial malloc maximum.
13421
13422 Port --enable-checking=all to Fedora 14 x86.
13423 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13424 Move to lisp.h.
13425 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
13426 (overrun_check_realloc, overrun_check_free):
13427 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
13428 That way, xmalloc returns a properly-aligned pointer even if
13429 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
13430 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
13431 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
13432 into account when calculating the initial malloc maximum.
13433 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13434 Move here from alloc.c, so that charset.c can use it too.
13435 Properly align; the old code wasn't right for common 32-bit hosts
13436 when configured with --enable-checking=all.
13437 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13438 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
13439
13440 2011-09-29 Eli Zaretskii <eliz@gnu.org>
13441
13442 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
13443 use EDOM.
13444
13445 2011-09-28 Eli Zaretskii <eliz@gnu.org>
13446
13447 * xdisp.c (compute_display_string_end): If there's no display
13448 string at CHARPOS, return -1.
13449
13450 * bidi.c (bidi_fetch_char): When compute_display_string_end
13451 returns a negative value, treat the character as a normal
13452 character not covered by a display string. (Bug#9624)
13453
13454 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
13455
13456 * lread.c (Fread_from_string): Fix typo in docstring.
13457
13458 2011-09-27 Eli Zaretskii <eliz@gnu.org>
13459
13460 * xdisp.c (handle_invisible_prop): If invisible text ends on a
13461 newline, reseat the iterator instead of bidi-iterating there one
13462 character at a time. (Bug#9610)
13463 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
13464 TO_CHARPOS if the bidi iterator is at base embedding level.
13465
13466 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
13467
13468 * lread.c (readevalloop): Use correct code for NBSP.
13469 (read1): Likewise. (Bug#9608)
13470
13471 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
13472
13473 * dbusbind.c (Fdbus_register_signal): When service is not
13474 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
13475
13476 2011-09-25 Glenn Morris <rgm@gnu.org>
13477
13478 * buffer.c (truncate-lines): Doc fix.
13479
13480 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
13481
13482 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
13483 (Fset_window_next_buffers): Doc fix.
13484
13485 2011-09-24 Glenn Morris <rgm@gnu.org>
13486
13487 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
13488
13489 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
13490
13491 Fix minor problems found by static checking.
13492 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
13493 * indent.c (Fvertical_motion): Fix == vs = typo.
13494
13495 2011-09-24 Eli Zaretskii <eliz@gnu.org>
13496
13497 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
13498 Default value is now t. Doc fix.
13499
13500 * indent.c (Fvertical_motion): Compute and apply the overshoot
13501 logic when moving up, not only when moving down. Fix the
13502 confusing name and values of the it_overshoot_expected variable;
13503 logic changes accordingly. (Bug#9254) (Bug#9549)
13504
13505 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
13506 CHARPOS is covered by a display string which includes newlines.
13507 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
13508 is covered by a display string with embedded newlines.
13509
13510 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
13511
13512 * dbusbind.c (Fdbus_register_signal): Add match rule to
13513 Vdbus_registered_objects_table. (Bug#9581)
13514 (Fdbus_register_method, Vdbus_registered_objects_table):
13515 Fix docstring.
13516
13517 2011-09-24 Jim Meyering <meyering@redhat.com>
13518
13519 do not ignore write error for any output size
13520 The previous change was incomplete.
13521 While it makes emacs --batch detect the vast majority of stdout
13522 write failures, errors were still ignored whenever the output size is
13523 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
13524 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
13525 && echo FAIL: ignored write error
13526 FAIL: ignored write error
13527 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
13528 && echo FAIL: ignored write error
13529 FAIL: ignored write error
13530 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
13531
13532 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
13533
13534 * emacs.c (Fkill_emacs): In noninteractive mode exit
13535 non-successfully if a write error occurred on stdout. (Bug#9574)
13536
13537 2011-09-21 Eli Zaretskii <eliz@gnu.org>
13538
13539 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
13540 the xassert test.
13541
13542 * dispextern.h (struct it): Update the comment documenting what
13543 can it->OBJECT be.
13544
13545 2011-09-20 Eli Zaretskii <eliz@gnu.org>
13546
13547 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
13548 a display string, extend search for cursor position to end of row.
13549 (find_row_edges): If the row ends in a newline from a display
13550 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
13551 Handle the case of a display string with multiple newlines.
13552 (Fcurrent_bidi_paragraph_direction): Fix search for previous
13553 non-empty line. Fixes confusing cursor motion with arrow keys at
13554 the beginning of a line that starts with whitespace.
13555
13556 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13557
13558 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
13559 (bug#9493).
13560
13561 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
13562
13563 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
13564 boolean (Bug#9154).
13565
13566 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13567
13568 * xdisp.c (display_line): Record maximum and minimum buffer
13569 positions even if no glyphs were produced (e.g., by a zero-width
13570 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
13571 buffer positions that will be removed from the glyph row because
13572 they don't fit.
13573 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
13574 column is beyond frame width: don't subtract 1 "pixel" when
13575 computing width of the stretch.
13576 (reseat_at_next_visible_line_start): Undo the change made on
13577 2011-09-17 that saved paragraph information and restored it after
13578 the call to `reseat'. (Bug#9545)
13579
13580 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13581
13582 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
13583 and turn window cursor on if cleared (Bug#9415).
13584
13585 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
13586
13587 * search.c (boyer_moore): Take unibyte characters from pattern
13588 literally. (Bug#9458)
13589
13590 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13591
13592 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
13593
13594 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
13595
13596 Fix minor problem found by static checking.
13597 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
13598 initialized, to pacify gcc -Wuninitialized.
13599
13600 * fileio.c: Report proper errno when syscall falls.
13601 (Finsert_file_contents): Save and restore errno,
13602 so that report_file_error outputs the correct diagnostic.
13603 (Fwrite_region) [CLASH_DETECTION]: Likewise.
13604
13605 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13606
13607 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
13608
13609 2011-09-17 Eli Zaretskii <eliz@gnu.org>
13610
13611 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
13612 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
13613
13614 2011-09-17 Eli Zaretskii <eliz@gnu.org>
13615
13616 * xdisp.c (reseat_at_next_visible_line_start): Keep information
13617 about the current paragraph and restore it after the call to reseat.
13618
13619 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
13620 (bidi_find_paragraph_start): Search back for paragraph beginning
13621 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
13622 (bidi_move_to_visually_next): Only trigger paragraph-related
13623 computations when the last character is a newline or at EOB, not
13624 just any NEUTRAL_B. (Bug#9470)
13625
13626 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
13627 truncated lines if point is covered by a display string. (Bug#9524)
13628
13629 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
13630
13631 * xselect.c: Relax test for outgoing X longs (Bug#9498).
13632 (cons_to_x_long): New function.
13633 (lisp_data_to_selection_data): Use it. Correct the test for
13634 short-versus-long data; it was negated. Break out of vector
13635 loop, for efficiency, when a long datum is discovered.
13636
13637 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
13638
13639 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
13640
13641 2011-09-16 Eli Zaretskii <eliz@gnu.org>
13642
13643 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
13644 GCC PR/17406) by declaring this function with external scope.
13645
13646 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13647
13648 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
13649 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
13650
13651 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
13652
13653 * editfns.c (Fformat): Correctly handle text properties on "%%".
13654
13655 2011-09-15 Eli Zaretskii <eliz@gnu.org>
13656
13657 * xterm.c (x_draw_composite_glyph_string_foreground):
13658 * w32term.c (x_draw_composite_glyph_string_foreground):
13659 * term.c (encode_terminal_code):
13660 * composite.c (composition_update_it, get_composition_id):
13661 * xdisp.c (get_next_display_element)
13662 (fill_composite_glyph_string): Add comments about special meaning
13663 of TAB characters in a composition.
13664
13665 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13666
13667 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
13668 This occurs when processing a multibyte format.
13669 Problem reported by Wolfgang Jenker.
13670
13671 2011-09-15 Johan Bockgård <bojohan@gnu.org>
13672
13673 * xdisp.c (try_cursor_movement): Only check for exact match if
13674 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
13675
13676 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13677
13678 Remove unused external symbols.
13679 * dispextern.h (calc_pixel_width_or_height): Remove decl.
13680 * xdisp.c (calc_pixel_width_or_height): Now static.
13681 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
13682 * indent.c (check_display_width):
13683 * w32term.c: Fix comment to match code.
13684 * xterm.c, xterm.h (x_catching_errors): Remove.
13685
13686 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13687
13688 * xselect.c: Use signed conversions more consistently (Bug#9498).
13689 (selection_data_to_lisp_data): Assume incoming selection data are
13690 signed integers, not unsigned. This is to be consistent with
13691 outgoing selection data, which was modified to use signed integers
13692 in as part of the fix to Bug#9196 in response to Jan D.'s comment
13693 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
13694 expects long, not unsigned long.
13695
13696 2011-09-14 Eli Zaretskii <eliz@gnu.org>
13697
13698 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
13699 computation of loop end. Reported by Johan Bockgård
13700 <bojohan@gnu.org>.
13701
13702 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
13703
13704 * frame.c (Fother_visible_frames_p): Function deleted.
13705
13706 2011-09-12 Eli Zaretskii <eliz@gnu.org>
13707
13708 * indent.c (compute_motion): Process display vector front to back
13709 rather than the other way around. (Bug#2496)
13710
13711 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
13712
13713 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
13714
13715 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
13716
13717 * minibuf.c (Fread_from_minibuffer): Doc fix.
13718
13719 2011-09-11 Eli Zaretskii <eliz@gnu.org>
13720
13721 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
13722 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
13723
13724 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13725
13726 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
13727 value for non-existent files.
13728
13729 2011-09-11 Eli Zaretskii <eliz@gnu.org>
13730
13731 * fileio.c (Finsert_file_contents): If the file cannot be opened,
13732 set its "size" to -1. This will set the modtime_size field of
13733 the corresponding buffer to -1, which is what
13734 verify-visited-file-modtime expects for files that do not exist.
13735 (Bug#9139)
13736
13737 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
13738
13739 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
13740 here ...
13741 * lisp.h: ... from here. push_key_description is no longer
13742 defined in keyboard.c, so its declaration should not be in
13743 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
13744 logically belongs with push_key_description.
13745
13746 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
13747
13748 * buffer.h: Include <sys/types.h> instead of <time.h>.
13749 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
13750 Problem reported by Herbert J. Skuhra.
13751
13752 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
13753
13754 * xml.c (parse_region): Make the parsing work for
13755 non-comment-starting XML files again (bug#9144).
13756
13757 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
13758
13759 * image.c (gif_load): Fix calculation of bottom and right corner.
13760 (Bug#9468)
13761
13762 2011-09-10 Eli Zaretskii <eliz@gnu.org>
13763
13764 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
13765 redisplay in small windows.
13766
13767 2011-09-09 Eli Zaretskii <eliz@gnu.org>
13768
13769 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
13770
13771 2011-09-08 Martin Rudalics <rudalics@gmx.at>
13772
13773 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
13774 Operate on live windows only.
13775
13776 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
13777
13778 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
13779
13780 2011-09-07 Eli Zaretskii <eliz@gnu.org>
13781
13782 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
13783 only under bidi iteration.
13784
13785 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
13786
13787 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
13788
13789 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13790
13791 isnan: Fix porting problem to Solaris 10 with bundled gcc.
13792 Without this fix, the command to link temacs failed due to an
13793 undefined symbol __builtin_isnan. This is because
13794 /usr/include/iso/math_c99.h #defines isnan(x) to
13795 __builtin_isnan(x), but the bundled gcc, which identifies itself
13796 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
13797 a __builtin_isnan.
13798 * floatfns.c (isnan): #undef, and then #define to a clone of
13799 what's in data.c.
13800 (Fisnan): Always define, since it's always available now.
13801 (syms_of_floatfns): Always define isnan at the Lisp level.
13802
13803 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13804
13805 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
13806
13807 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13808
13809 * fileio.c: Fix bugs with large file offsets (Bug#9428).
13810 The previous code assumed that file offsets (off_t values) fit in
13811 EMACS_INT variables, which is not true on typical 32-bit hosts.
13812 The code messed up by falsely reporting buffer overflow in cases
13813 such as (insert-file-contents "big" nil 1 2) into an empty buffer
13814 when "big" contains more than 2**29 bytes, even though this
13815 inserts just one byte and does not overflow the buffer.
13816 (Finsert_file_contents): Store file offsets as off_t
13817 values, not as EMACS_INT values. Check for overflow when
13818 converting between EMACS_INT and off_t. When checking for
13819 buffer overflow or for overlap, take the offsets into account.
13820 Don't use EMACS_INT for small values where int suffices.
13821 When checking for overlap, fix a typo: ZV was used where
13822 ZV_BYTE was intended.
13823 (Fwrite_region): Don't assume off_t fits into 'long'.
13824 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
13825
13826 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
13827
13828 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
13829
13830 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
13831
13832 sprintf-related integer and memory overflow issues (Bug#9412).
13833
13834 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
13835 (esprintf, exprintf, evxprintf): New functions.
13836 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
13837 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
13838 (modify_event_symbol): Do not assume that the length of
13839 name_alist_or_stem is safe to alloca and fits in int.
13840 (Fexecute_extended_command): Likewise for function name and binding.
13841 (Frecursion_depth): Wrap around reliably on integer overflow.
13842 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
13843 since some callers pass EMACS_INT values.
13844 (Fsingle_key_description): Don't crash if symbol name contains more
13845 than MAX_ALLOCA bytes.
13846 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
13847 (get_minibuffer): Arg is now EMACS_INT, not int.
13848 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
13849 (esprintf, exprintf, evxprintf): New decls.
13850 * window.h (command_loop_level, minibuf_level): Reflect API changes.
13851
13852 * dbusbind.c (signature_cat): New function.
13853 (xd_signature, Fdbus_register_signal):
13854 Do not overrun buffer; instead, report string overflow.
13855
13856 * dispnew.c (add_window_display_history): Don't overrun buffer.
13857 Truncate instead; this is OK since it's just a log.
13858
13859 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
13860 even if the time zone offset is outlandishly large.
13861 Don't mishandle offset == INT_MIN.
13862
13863 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
13864 when creating daemon; the previous buffer-overflow check was incorrect.
13865
13866 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
13867 which has the guts of the old verror function.
13868
13869 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
13870 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
13871
13872 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
13873 (font_unparse_xlfd): Don't blindly alloca long strings.
13874 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
13875 fits in int, when using sprintf. Use single snprintf to count
13876 length of string rather than counting it via multiple sprintfs;
13877 that's simpler and more reliable.
13878 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
13879 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
13880 sprintf, in case result does not fit in int.
13881
13882 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
13883 (fontset_from_font): Print it.
13884
13885 * frame.c (tty_frame_count): Now printmax_t, not int.
13886 (make_terminal_frame, set_term_frame_name): Print it.
13887 (x_report_frame_params): In X, window IDs are unsigned long,
13888 not signed long, so print them as unsigned.
13889 (validate_x_resource_name): Check for implausibly long names,
13890 and don't assume name length fits in 'int'.
13891 (x_get_resource_string): Don't blindly alloca invocation name;
13892 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
13893 not fit in int.
13894
13895 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
13896 (xg_check_special_colors, xg_set_geometry):
13897 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
13898
13899 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
13900 Use esprintf, not sprintf, in case result does not fit in int.
13901
13902 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13903 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
13904 it as a large positive number.
13905 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
13906 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13907
13908 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
13909 in case result does not fit in int.
13910
13911 * print.c (float_to_string): Detect width overflow more reliably.
13912 (print_object): Make sprintf buffer a bit bigger, to avoid potential
13913 buffer overrun. Don't assume list length fits in 'int'. Treat
13914 print length of 0 as 0, not as infinity; to be consistent with other
13915 uses of print length in this function. Don't overflow print length
13916 index. Don't assume hash table size fits in 'long', or that
13917 vectorlike size fits in 'unsigned long'.
13918
13919 * process.c (make_process): Use printmax_t, not int, to format
13920 process-name gensyms.
13921
13922 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
13923
13924 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
13925 to avoid potential buffer overrun.
13926
13927 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
13928 if X resource line is longer than 512 bytes.
13929
13930 * xfns.c (x_window): Make sprintf buffer a bit bigger
13931 to avoid potential buffer overrun.
13932
13933 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
13934
13935 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
13936
13937 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
13938
13939 Integer overflow fixes for scrolling, etc.
13940 Without these, Emacs silently mishandles large integers sometimes.
13941 For example, "C-u 4294967297 M-x recenter" was treated as if
13942 it were "C-u 1 M-x recenter" on a typical 64-bit host.
13943
13944 * xdisp.c (try_window_id): Check Emacs fixnum range before
13945 converting to 'int'.
13946
13947 * window.c (window_scroll_line_based, Frecenter):
13948 Check that an Emacs fixnum is in range before assigning it to 'int'.
13949 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
13950 values converted from Emacs fixnums.
13951 (Frecenter): Don't wrap around a line count if it is out of 'int'
13952 range; instead, treat it as an extreme value.
13953 (Fset_window_configuration, compare_window_configurations):
13954 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
13955
13956 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
13957 that can exceed INT_MAX. Check that EMACS_INT value is in range
13958 before assigning it to the (possibly-narrower) index.
13959 (match_limit): Don't assume that a fixnum can fit in 'int'.
13960
13961 * print.c (print_object): Use ptrdiff_t, not int, for index that can
13962 exceed INT_MAX.
13963
13964 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
13965 (Fvertical_motion): Don't wrap around LINES values that don't fit
13966 in 'int'. Instead, treat them as extreme values. This is good
13967 enough for windows, which can't have more than INT_MAX lines anyway.
13968
13969 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13970
13971 * Require libxml/parser.h to avoid compilation warning.
13972
13973 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
13974
13975 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
13976 since this reportedly can destroy thread storage.
13977
13978 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
13979
13980 * syntax.c (find_defun_start): Update all cache variables if
13981 exiting early (Bug#9401).
13982
13983 2011-08-30 Eli Zaretskii <eliz@gnu.org>
13984
13985 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
13986
13987 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
13988 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
13989 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
13990
13991 * term.c (tty_append_glyph): New function.
13992 (produce_stretch_glyph): Static function and its prototype deleted.
13993
13994 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
13995 Add prototypes.
13996
13997 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
13998
13999 * image.c (parse_image_spec): Check for nonnegative, not for positive,
14000 when checking :margin (Bug#9390).
14001 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
14002 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
14003 so that the name doesn't mislead. All uses changed.
14004
14005 2011-08-28 Johan Bockgård <bojohan@gnu.org>
14006
14007 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
14008 set_tty_hooks.
14009
14010 2011-08-27 Eli Zaretskii <eliz@gnu.org>
14011
14012 * xdisp.c (move_it_to): Don't bail out early when reaching
14013 position beyond to_charpos, if we are scanning backwards.
14014 (move_it_vertically_backward): When DY == 0, make sure we get to
14015 the first character in the line after the newline.
14016
14017 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
14018
14019 * ccl.c: Improve and simplify overflow checking (Bug#9196).
14020 (ccl_driver): Do not generate an out-of-range pointer.
14021 (Fccl_execute_on_string): Remove unnecessary check for
14022 integer overflow, noted by Stefan Monnier in
14023 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
14024 Remove a FIXME that didn't need fixing.
14025 Simplify the newly-introduced buffer reallocation code.
14026
14027 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
14028
14029 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
14030
14031 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
14032
14033 Integer and memory overflow issues (Bug#9196).
14034
14035 * doc.c (get_doc_string): Rework so that
14036 get_doc_string_buffer_size is the actual buffer size, rather than
14037 being 1 less than the actual buffer size; this makes xpalloc more
14038 convenient.
14039
14040 * image.c (x_allocate_bitmap_record, cache_image):
14041 * xselect.c (Fx_register_dnd_atom):
14042 Simplify previous changes by using xpalloc.
14043
14044 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
14045 since either will do and ptrdiff_t is convenient with xpalloc.
14046
14047 * charset.c (charset_table_size)
14048 (struct charset_sort_data.priority): Now ptrdiff_t.
14049 (charset_compare): Don't overflow if priorities differ greatly.
14050 (Fsort_charsets): Don't assume list length fits in int.
14051 Check for size-calculation overflow when allocating sort data.
14052 (syms_of_charset): Allocate an initial charset table that is
14053 just under 64 KiB, to avoid problems with glibc malloc and mmap.
14054
14055 * cmds.c (internal_self_insert): Check for size-calculation overflow.
14056
14057 * composite.h (struct composition.glyph_len): Now int, not unsigned.
14058 The actual value is always <= INT_MAX, and leaving it unsigned made
14059 overflow checking harder.
14060
14061 * dispextern.h (struct glyph_matrix.rows_allocated)
14062 (struct face_cache.size): Now ptrdiff_t, for convenience in use
14063 with xpalloc. The values are still always <= INT_MAX.
14064
14065 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
14066
14067 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
14068 (SAFE_NALLOCA): New macro.
14069
14070 * region-cache.c (struct boundary.pos, find_cache_boundary)
14071 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
14072 (set_cache_region, invalidate_region_cache)
14073 (revalidate_region_cache, know_region_cache, region_cache_forward)
14074 (region_cache_backward, pp_cache):
14075 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
14076 so that ptrdiff_t * can be passed to xpalloc.
14077 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
14078 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
14079 (pp_cache): Don't assume cache_len fits in int.
14080 * region-cache.h: Adjust extern decls to match.
14081
14082 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
14083 EMACS_INT, since either will do, for xpalloc.
14084
14085 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
14086 (xnmalloc, xnrealloc, xpalloc): New functions.
14087
14088 * bidi.c (bidi_shelve_header_size): New constant.
14089 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
14090 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
14091
14092 * bidi.c (bidi_cache_shrink):
14093 * buffer.c (overlays_at, overlays_in, record_overlay_string)
14094 (overlay_strings):
14095 Don't update size of array until after memory allocation succeeds,
14096 because xmalloc/xrealloc may not return.
14097 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
14098 now that we have proper integer overflow checking.
14099 (record_overlay_string, overlay_strings): Catch overflows when
14100 calculating size of overlay_str_buf.
14101
14102 * callproc.c (Fcall_process): Check for size overflow when
14103 calculating size of args2.
14104 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
14105 Normally we prefer signed values, but sticking with ptrdiff_t would
14106 require adding more-complicated checks.
14107
14108 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
14109 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
14110 Redo buffer-overflow calculations to avoid integer overflow.
14111 Add a FIXME comment where memory seems to be over-allocated.
14112
14113 * character.c (Fstring): Check for size-calculation overflow.
14114
14115 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
14116 unnecessary integer overflow. Check for size overflow.
14117 (encode_coding_object): Don't update size until xmalloc succeeds.
14118
14119 * composite.c (get_composition_id): Check for overflow in glyph
14120 length calculations.
14121
14122 Integer and memory overflow fixes for display code.
14123 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
14124 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
14125 (scrolling_window): Check for overflow in size calculations.
14126 (line_draw_cost, realloc_glyph_pool, add_row_entry):
14127 Don't assume glyph table len fits in int.
14128 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
14129 (row_table_size): Now ptrdiff_t, not int.
14130 (scrolling_window): Avoid overflow in size calculations.
14131 Don't update size until allocation succeeds.
14132 * fns.c (concat): Check for overflow in size calculations.
14133 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
14134 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
14135 (NEXT_ALMOST_PRIME_LIMIT): New constant.
14136
14137 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
14138 (get_doc_string): Check for size calculation overflow.
14139 Don't update size until allocation succeeds.
14140 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
14141 EMACS_INT, where ptrdiff_t will do.
14142 (Fsubstitute_command_keys): Check for string overflow.
14143
14144 * editfns.c (set_time_zone_rule): Don't assume environment length
14145 fits in int.
14146 (message_length): Now ptrdiff_t, not int.
14147 (Fmessage_box): Don't update size until allocation succeeds.
14148 Don't assume message length fits in int.
14149 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
14150
14151 * emacs.c (main): Do not reallocate argv, since there is a null at
14152 the end that can be overwritten, and this way there's no need to
14153 worry about size-calculation overflow.
14154 (sort_args): Check for size-calculation overflow.
14155
14156 * eval.c (init_eval_once, grow_specpdl): Don't update size until
14157 alloc succeeds.
14158 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
14159
14160 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
14161 (x_set_scroll_bar_width, x_figure_window_size):
14162 Check for integer overflow.
14163 (x_set_alpha): Do not assume XINT fits in int.
14164
14165 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
14166 This is for the members text_lines, text_cols, total_lines, total_cols,
14167 where the system imposes an 'int' limit.
14168
14169 * fringe.c (Fdefine_fringe_bitmap):
14170 Don't update size until alloc works.
14171
14172 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
14173 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
14174
14175 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
14176 Check for size-calculation overflow.
14177 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
14178 do, as we prefer signed integers.
14179 (id_to_widget.max_size, id_to_widget.used)
14180 (xg_store_widget_in_map, xg_remove_widget_from_map)
14181 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
14182 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
14183 Use and return ptrdiff_t, not int.
14184 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
14185 * gtkutil.h: Change prototypes to match the above.
14186
14187 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
14188 are duplicate now that they've been promoted to lisp.h.
14189 (x_allocate_bitmap_record, x_alloc_image_color)
14190 (make_image_cache, cache_image, xpm_load):
14191 Don't update size until alloc is done.
14192 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
14193 (x_detect_edges):
14194 Check for size calculation overflow.
14195 (ct_colors_allocated_max): New constant.
14196 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
14197 overflow.
14198
14199 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
14200 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
14201 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
14202 Use ptrdiff_t, not int, to count maps.
14203 (read_char_minibuf_menu_prompt): Check for overflow in size
14204 calculations. Don't update size until allocation succeeds.
14205 Redo calculations to avoid overflow.
14206 * keyboard.h: Change prototypes to match the above.
14207
14208 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
14209 to count maps.
14210 (current_minor_maps): Check for size calculation overflow.
14211 * keymap.h: Change prototypes to match the above.
14212
14213 * lread.c (read1, init_obarray): Don't update size until alloc done.
14214
14215 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
14216 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
14217
14218 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
14219 Now ptrdiff_t, not int.
14220 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
14221 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
14222
14223 * process.c (Fnetwork_interface_list): Check for overflow
14224 in size calculation.
14225
14226 * region-cache.c (move_cache_gap): Check for size calculation overflow.
14227
14228 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
14229 overflow. Don't bother calling xmalloc when xrealloc will do.
14230
14231 * search.c (Freplace_match): Check for size calculation overflow.
14232 (Fset_match_data): Don't assume list lengths fit in 'int'.
14233
14234 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
14235 for command line length. Do not attempt to address one before the
14236 beginning of an array, as that's not portable.
14237
14238 * term.c (max_frame_lines): Remove; unused.
14239 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
14240 not int.
14241 (encode_terminal_code, calculate_costs): Check for size
14242 calculation overflow.
14243 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
14244 table lengths and related sizes. Don't update size until alloc
14245 done. Redo calculations to avoid overflow.
14246 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
14247
14248 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
14249 subtracting pointers.
14250 (gobble_line): Check for overflow more carefully. Don't update size
14251 until alloc done.
14252
14253 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
14254 Don't update size until alloc done.
14255 Redo size calculations to avoid overflow.
14256 Check for size calculation overflow.
14257 (main) [DEBUG]: Fix typo in invoking tparam1.
14258
14259 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
14260 Use ptrdiff_t, not int, for sizes.
14261 (store_mode_line_noprop_char): Don't update size until alloc done.
14262
14263 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
14264 Use ptrdiff_t, not int, for sizes.
14265 (Finternal_make_lisp_face, cache_face):
14266 Check for size calculation overflow.
14267 (cache_face): Treat size calculation overflows as if they were
14268 memory exhaustion (the usual treatment), rather than aborting.
14269
14270 * xfns.c (x_encode_text, x_set_name_internal)
14271 (Fx_change_window_property): Use ptrdiff_t, not int, to count
14272 sizes, since they can exceed INT_MAX in size. Check for size
14273 calculation overflow.
14274
14275 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
14276 (xg_select): Check for size calculation overflow.
14277 Don't update size until alloc done.
14278
14279 * xrdb.c (get_environ_db): Don't assume path length fits in int,
14280 as sprintf is limited to int lengths.
14281
14282 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
14283 (X_LONG_MIN): New macros.
14284 Use them to make the following changes clearer.
14285 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
14286 This change doesn't affect the value now, but it may help remind
14287 future maintainers not to raise the value too much later.
14288 (SELECTION_QUANTUM): Remove, replacing with ...
14289 (selection_quantum): ... new function, which avoids overflow.
14290 All uses changed.
14291 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
14292 assumption that selection length fits in 'int'.
14293 (x_reply_selection_request, x_handle_selection_request)
14294 (x_get_window_property, receive_incremental_selection)
14295 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
14296 (lisp_data_to_selection_data, clean_local_selection_data):
14297 Use ptrdiff_t, not int, to record length of selection.
14298 (x_reply_selection_request, x_get_window_property)
14299 (receive_incremental_selection, x_property_data_to_lisp):
14300 Redo calculations to avoid overflow.
14301 (x_reply_selection_request): When sending hint, ceiling it at
14302 X_LONG_MAX rather than relying on wraparound overflow to send
14303 something.
14304 (x_get_window_property, receive_incremental_selection)
14305 (lisp_data_to_selection_data, x_property_data_to_lisp):
14306 Check for size-calculation overflow.
14307 (x_get_window_property, receive_incremental_selection)
14308 (lisp_data_to_selection_data, Fx_register_dnd_atom):
14309 Don't store size until memory allocation succeeds.
14310 (x_get_window_property): Plug memory leak on memory exhaustion.
14311 Don't double-block input; malloc is safe here. Don't assume 2**34
14312 - 4 fits in unsigned long. Add an xassert to check
14313 XGetWindowProperty overflow. Be more careful about overflow
14314 calculations, and distinguish size from memory overflow better.
14315 (receive_incremental_selection): When tracing, don't assume
14316 unsigned int is less than INT_MAX.
14317 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
14318 harmful) conversions of unsigned short to int.
14319 (lisp_data_to_selection_data): Don't assume that integers
14320 in the range -65535 through -1 fit in an X unsigned short.
14321 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
14322 result parameters unless successful. Rely on cons_to_unsigned
14323 to report problems with elements; the old code wasn't right anyway.
14324 (x_check_property_data): Check for int overflow; we cannot use
14325 a wider type due to X limits.
14326 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
14327
14328 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
14329
14330 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
14331 (x_term_init): Check for size calculation overflow.
14332 (x_color_cells): Don't store size until memory allocation succeeds.
14333 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
14334 Don't assume alloca size is less than MAX_ALLOCA.
14335 (x_term_init): Don't assume length fits in int (sprintf is limited
14336 to int size).
14337
14338 Use ptrdiff_t for composition IDs.
14339 * character.c (lisp_string_width):
14340 * composite.c (composition_table_size, n_compositions)
14341 (get_composition_id, composition_gstring_from_id):
14342 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
14343 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
14344 * window.c (Frecenter):
14345 Use ptrdiff_t, not int, for composition IDs.
14346 * composite.c (get_composition_id): Check for integer overflow.
14347 * composite.h: Adjust prototypes to match the above changes.
14348
14349 Use ptrdiff_t for hash table indexes.
14350 * category.c (hash_get_category_set):
14351 * ccl.c (ccl_driver):
14352 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
14353 * coding.c (coding_system_charset_list, detect_coding_system):
14354 * coding.h (struct coding_system.id):
14355 * composite.c (get_composition_id, gstring_lookup_cache):
14356 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
14357 * image.c (xpm_get_color_table_h):
14358 * lisp.h (hash_lookup, hash_put):
14359 * minibuf.c (Ftest_completion):
14360 Use ptrdiff_t for hash table indexes, not int (which is too
14361 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
14362 32-bit --with-wide-int hosts).
14363
14364 * charset.c (Fdefine_charset_internal): Check for integer overflow.
14365 Add a FIXME comment about memory leaks.
14366 (syms_of_charset): Don't assume xmalloc returns.
14367
14368 Don't assume that stated character widths fit in int.
14369 * character.c (Fchar_width, c_string_width, lisp_string_width):
14370 * character.h (CHAR_WIDTH):
14371 * indent.c (MULTIBYTE_BYTES_WIDTH):
14372 Use sanitize_char_width to avoid undefined and/or bad behavior
14373 with outlandish widths.
14374 * character.h (sanitize_tab_width): Rename from sanitize_width,
14375 now that we have two such functions. All uses changed.
14376 (sanitize_char_width): New inline function.
14377
14378 Don't assume that tab-width fits in int.
14379 * character.h (sanitize_width): New inline function.
14380 (SANE_TAB_WIDTH): New macro.
14381 (ASCII_CHAR_WIDTH): Use it.
14382 * indent.c (sane_tab_width): Remove. All uses replaced by
14383 SANE_TAB_WIDTH (current_buffer).
14384 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
14385
14386 * fileio.c: Integer overflow issues with file modes.
14387 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
14388
14389 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
14390 Remove unreachable code.
14391 (read_hex, load_charset_map_from_file): Check for integer overflow.
14392
14393 * xterm.c: Don't go over XClientMessageEvent limit.
14394 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
14395 (x_send_scroll_bar_event): Likewise. Check that the size does not
14396 exceed limits imposed by XClientMessageEvent, as well as the usual
14397 ptrdiff_t and size_t limits.
14398
14399 * keyboard.c: Overflow, signedness and related fixes.
14400 (make_lispy_movement): Use same integer type in forward decl
14401 that is used in the definition.
14402 (read_key_sequence, keyremap_step):
14403 Change bufsize argument back to int, undoing my 2011-03-30 change.
14404 We prefer signed types, and int is wide enough here.
14405 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
14406 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
14407 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
14408 length, not size_t. Use ptrdiff_t for index, not int.
14409 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
14410 possibility of integer overflow.
14411
14412 Overflow, signedness and related fixes for images.
14413
14414 * dispextern.h (struct it.stack[0].u.image.image_id)
14415 (struct_it.image_id, struct image.id, struct image_cache.size)
14416 (struct image_cache.used, struct image_cache.ref_count):
14417 * gtkutil.c (update_frame_tool_bar):
14418 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
14419 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
14420 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
14421 * nsmenu.m (update_frame_tool_bar):
14422 * xdisp.c (calc_pixel_width_or_height):
14423 * xfns.c (image_cache_refcount):
14424 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
14425 on typical 64-bit hosts.
14426
14427 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
14428 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
14429 Omit unnecessary casts to int.
14430 (parse_image_spec): Check that integers fall into 'int' range
14431 when the callers expect that.
14432 (image_ascent): Redo ascent calculation to avoid int overflow.
14433 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
14434 (lookup_image): Remove unnecessary tests.
14435 (xbm_image_p): Locals are now of int, not EMACS_INT,
14436 since parse_image_check makes sure they fit into int.
14437 (png_load, gif_load, svg_load_image):
14438 Prefer int to unsigned where either will do.
14439 (tiff_handler): New function, combining the cores of the
14440 old tiff_error_handler and tiff_warning_handler.
14441 This function is rewritten to use vsnprintf and thereby avoid
14442 stack buffer overflows. It uses only the features of vsnprintf
14443 that are common to both POSIX and native Microsoft.
14444 (tiff_error_handler, tiff_warning_handler): Use it.
14445 (tiff_load, gif_load, imagemagick_load_image):
14446 Don't assume :index value fits in 'int'.
14447 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
14448 (imagemagick_load_image): Check that crop parameters fit into
14449 the integer types that MagickCropImage accepts. Don't assume
14450 Vimagemagick_render_type has a nonnegative value. Don't assume
14451 size_t fits in 'long'.
14452 (gs_load): Use printmax_t to print the widest integers possible.
14453 Check for integer overflow when computing image height and width.
14454
14455 2011-08-26 Eli Zaretskii <eliz@gnu.org>
14456
14457 * xdisp.c (redisplay_window): Don't force window start if point
14458 will be invisible in the resulting window. (Bug#9324)
14459
14460 2011-08-25 Eli Zaretskii <eliz@gnu.org>
14461
14462 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
14463 the display spec is of the form `(space ...)'.
14464 (handle_display_spec): Return the value returned by
14465 handle_single_display_spec, not just 1 or zero.
14466 (handle_single_display_spec): If the display spec is of the form
14467 `(space ...)', and specifies display in the text area, return 2
14468 rather than 1.
14469 (try_cursor_movement): Check for the need to scroll more
14470 accurately, and prefer exact match for point under bidi.
14471 Don't advance `row' beyond the last row of the window.
14472
14473 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
14474 into disp_prop; all users changed.
14475
14476 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
14477 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
14478 for the text covered by the display property.
14479
14480 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
14481
14482 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
14483 Change return value to nil.
14484 (Frecord_buffer): Delete unused function.
14485
14486 2011-08-24 Eli Zaretskii <eliz@gnu.org>
14487
14488 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
14489 buffers, return left-to-right.
14490 (set_cursor_from_row): Consider candidate row a win if its glyph
14491 represents a newline and point is on that newline. Fixes cursor
14492 positioning on the newline at EOL of R2L text within L2R
14493 paragraph, and vice versa.
14494 (try_cursor_movement): Check continued rows, in addition to
14495 continuation rows. Fixes unwarranted scroll when point enters a
14496 continued line of R2L text within an L2R paragraph, or vice versa.
14497 (cursor_row_p): Consider the case of point being equal to
14498 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
14499 from the end of a short line to the beginning of a continued line
14500 of R2L text within L2R paragraph.
14501 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
14502 composed characters.
14503
14504 * bidi.c (bidi_check_type): Use xassert.
14505 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
14506 members.
14507
14508 2011-08-23 Eli Zaretskii <eliz@gnu.org>
14509
14510 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
14511 a character.
14512
14513 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
14514
14515 * nsfont.m (ns_otf_to_script): Fix typo.
14516
14517 2011-08-22 Kenichi Handa <handa@m17n.org>
14518
14519 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
14520 extra slot even if the purpose is char-code-property-table.
14521
14522 2011-08-23 Eli Zaretskii <eliz@gnu.org>
14523
14524 * xdisp.c (redisplay_window): When computing centering_position,
14525 account for the height of the header line. (Bug#8874)
14526
14527 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
14528 instead of CHAR_TO_BYTE. Fixes a crash when a completion
14529 candidate is selected by the mouse, and that candidate has a
14530 composed character under the mouse.
14531
14532 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
14533 coordinates reported by pos-visible-in-window-p for a composed
14534 character in column zero.
14535
14536 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
14537
14538 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
14539
14540 2011-08-22 Eli Zaretskii <eliz@gnu.org>
14541
14542 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
14543 consider it a hit if to_charpos is anywhere in the range of the
14544 composed buffer positions.
14545
14546 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
14547
14548 * image.c (gif_load): Don't assume that each subimage has the same
14549 dimensions as the base image. Handle disposal method that is
14550 "undefined" by the gif spec (Bug#9335).
14551
14552 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
14553
14554 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
14555 (Fcondition_case): Document `debug' symbol in error handler.
14556
14557 2011-08-19 Eli Zaretskii <eliz@gnu.org>
14558
14559 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
14560 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
14561 from an Org mode buffer to a Speedbar frame.
14562
14563 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
14564 a composition, take its buffer position from IT->cmp_it.charpos.
14565 Fixes cursor positioning at the beginning of a line that begins
14566 with a composed character.
14567
14568 2011-08-18 Eli Zaretskii <eliz@gnu.org>
14569
14570 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
14571 character bidirectional type, use STRONG_L instead. Fixes crashes
14572 in a buffer produced by `describe-categories'.
14573
14574 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
14575 members before the level stack, so they would be saved and
14576 restored when copying iterator state. Fixes incorrect reordering
14577 around TABs covered by display properties.
14578
14579 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
14580
14581 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
14582
14583 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
14584
14585 * eval.c (internal_condition_case, internal_condition_case_1)
14586 (internal_condition_case_2, internal_condition_case_n):
14587 Remove unnecessary aborts (Bug#9081).
14588
14589 2011-08-17 Eli Zaretskii <eliz@gnu.org>
14590
14591 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
14592 has no `load' handler, try opening the file locally. (Bug#9311)
14593
14594 2011-08-16 Ken Brown <kbrown@cornell.edu>
14595
14596 * gmalloc.c: Expand comment.
14597
14598 2011-08-16 Eli Zaretskii <eliz@gnu.org>
14599
14600 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
14601 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
14602
14603 2011-08-16 Ken Brown <kbrown@cornell.edu>
14604
14605 Fix memory allocation problems in Cygwin build (Bug#9273).
14606
14607 * unexcw.c ( __malloc_initialized): Declare external variable.
14608 (fixup_executable): Force the dumped emacs to reinitialize malloc.
14609
14610 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
14611 New variables.
14612 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
14613 dumped emacs.
14614 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
14615 in the static heap.
14616 [CYGWIN] (special_realloc): New function.
14617 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
14618 requests to realloc storage in the static heap.
14619
14620 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
14621
14622 * bidi.c (bidi_initialize): Remove unused local.
14623
14624 2011-08-15 Eli Zaretskii <eliz@gnu.org>
14625
14626 * bidimirror.h:
14627 * biditype.h: Remove file.
14628 * makefile.w32-in ($(BLD)/bidi.$(O)):
14629 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
14630
14631 * dispextern.h: Fix a typo in the comment to bidi_type_t.
14632
14633 * chartab.c: Improve commentary for the uniprop_table API.
14634
14635 * bidi.c (bidi_paragraph_init): Support zero value of
14636 bidi_ignore_explicit_marks_for_paragraph_level.
14637 (bidi_initialize): Use uniprop_table instead of including
14638 biditype.h and bidimirror.h.
14639
14640 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
14641 coordinates of the iterator when restoring from ppos_it.
14642 (Bug#9296)
14643
14644 2011-08-14 Kenichi Handa <handa@m17n.org>
14645
14646 * process.c (create_process): Call setup_process_coding_systems
14647 after the pid of the process is set to -1 (Bug#8162).
14648
14649 2011-08-14 Eli Zaretskii <eliz@gnu.org>
14650
14651 * xdisp.c (move_it_in_display_line_to): Don't invoke
14652 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
14653 ppos_it. Fixes vertical cursor motion when line beginning is
14654 covered by an image. (Bug#9296)
14655
14656 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
14657
14658 * nsterm.h (ns_run_ascript): Declare.
14659 (NSAPP_DATA2_RUNASSCRIPT): Define.
14660
14661 * nsfns.m (as_script, as_result, as_status): New static variables.
14662 (ns_run_ascript): New function.
14663 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
14664 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
14665 the event loop. Get status from as_status (Bug#7276).
14666
14667 * nsterm.m (sendEvent): If event is NSApplicationDefined and
14668 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
14669 the event loop (Bug#7276).
14670
14671 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
14672
14673 * gnutls.c (QCgnutls_bootprop_priority)
14674 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
14675 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
14676 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
14677 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
14678 (QCgnutls_bootprop_verify_hostname_error)
14679 (QCgnutls_bootprop_callbacks_verify): Rename from
14680 Qgnutls_bootprop_..., all uses changed.
14681
14682 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
14683 uses changed.
14684
14685 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
14686
14687 * xfaces.c (Qframe_set_background_mode): Now static.
14688 * dispextern.h (Qframe_set_background_mode): Remove decl.
14689
14690 * process.c (Fnetwork_interface_info): Declare local only if needed.
14691
14692 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
14693
14694 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
14695 (Fnetwork_interface_list): Allocate in increments of bytes instead
14696 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
14697 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
14698 sockaddr.
14699 (struct ifflag_def): notrailers is smart on OSX.
14700 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
14701 Get hardware address with getifaddrs if available.
14702
14703 2011-08-12 Eli Zaretskii <eliz@gnu.org>
14704
14705 * xdisp.c (iterate_out_of_display_property): xassert that
14706 IT->position is set to within IT->object's boundaries. Break from
14707 the loop as soon as EOB is reached; avoids infloops in redisplay
14708 when IT->position is set up wrongly due to some bug.
14709 Set IT->current to match the bidi iterator unconditionally.
14710 (push_display_prop): Allow GET_FROM_STRING as IT->method on
14711 entry. Force push_it to save on the stack the current
14712 buffer/string position, to be restored by pop_it. Fix flags in
14713 the iterator structure wrt the object coming from a display
14714 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
14715 properties. (Bug#9284)
14716
14717 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
14718
14719 * fontset.c (fontset_get_font_group): Add proper type checks.
14720 (Bug#9172)
14721
14722 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14723
14724 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
14725 and LC_VERSION_MIN_MACOSX.
14726 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
14727 (dump_it) [LC_FUNCTION_STARTS]: Use it.
14728
14729 2011-08-08 Eli Zaretskii <eliz@gnu.org>
14730
14731 * xdisp.c (forward_to_next_line_start): Allow to use the
14732 no-display-properties-and-no-overlays under bidi display.
14733 Set disp_pos in the bidi iterator to avoid searches for display
14734 properties and overlays.
14735
14736 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
14737
14738 * editfns.c (Fset_time_zone_rule): Document relationship with the
14739 setenv function.
14740
14741 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
14742 the font entity extracted from the cache (Bug#8109).
14743
14744 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
14745
14746 * composite.c (autocmp_chars): Don't reset point. That is done by
14747 restore_point_unwind (Bug#5984).
14748
14749 2011-08-07 Juri Linkov <juri@jurta.org>
14750
14751 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
14752 to show the arg `TIME' instead of `TIMEVAL'.
14753
14754 2011-08-06 Eli Zaretskii <eliz@gnu.org>
14755
14756 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
14757 display property strides EOL and includes a newline, as in
14758 longlines-mode. (Bug#9254)
14759 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
14760 word-wrap under bidirectional display. (Bug#9224)
14761
14762 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
14763 is non-zero, even if the data buffer is NULL. Fixes a crash in
14764 vertical-motion with longlines-mode. (Bug#9254)
14765
14766 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14767
14768 * bidi.c <bidi_cache_total_alloc>: Now static.
14769 (bidi_initialize): Initialize bidi_cache_total_alloc.
14770
14771 * xdisp.c (display_line): Release buffer allocated for shelved bidi
14772 cache. (Bug#9221)
14773
14774 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
14775 amount allocated this far in `bidi_cache_total_alloc'.
14776 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
14777 non-zero, only free the data buffer without restoring the cache
14778 contents. All callers changed.
14779
14780 * dispextern.h (bidi_unshelve_cache): Update prototype.
14781
14782 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
14783 (move_it_in_display_line, move_it_to)
14784 (move_it_vertically_backward, move_it_by_lines): Replace the call
14785 to xfree to an equivalent call to bidi_unshelve_cache.
14786 (move_it_in_display_line_to): Fix logic of returning
14787 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
14788
14789 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14790
14791 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
14792 came from a string character with a `cursor' property. (Bug#9229)
14793
14794 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14795
14796 * Makefile.in (LIB_PTHREAD): New variable.
14797 (LIBES): Add LIB_PTHREAD (Bug#9216).
14798
14799 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
14800 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
14801
14802 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
14803
14804 * regex.c (re_iswctype): Remove some redundant boolean conversions.
14805
14806 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14807
14808 * xterm.c (x_find_topmost_parent): New function.
14809 (x_set_frame_alpha): Find topmost parent window with
14810 x_find_topmost_parent and set the property there also (bug#9181).
14811 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
14812
14813 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
14814
14815 * callproc.c (Fcall_process): Avoid vfork clobbering
14816 the local vars buffer, coding_systems, current_dir.
14817
14818 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
14819
14820 * keymap.c (Fmake_composed_keymap): Move to subr.el.
14821
14822 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
14823
14824 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
14825 so that it is not optimized away.
14826
14827 * xdisp.c (compute_display_string_pos): Remove unused local.
14828
14829 2011-08-02 Eli Zaretskii <eliz@gnu.org>
14830
14831 Fix slow cursor motion and scrolling in large buffers with
14832 selective display, like Org Mode buffers. (Bug#9218)
14833
14834 * dispextern.h (struct bidi_it): New member disp_prop_p.
14835
14836 * xdisp.c: Remove one-slot cache of display string positions.
14837 (compute_display_string_pos): Accept an additional argument
14838 DISP_PROP_P; callers changed. Scan at most 5K characters forward
14839 for a display string or property. If found, set DISP_PROP_P
14840 non-zero.
14841
14842 * bidi.c (bidi_fetch_char): Accept an additional argument
14843 DISP_PROP_P, and pass it to compute_display_string_pos.
14844 Only handle text covered by a display string if DISP_PROP_P is returned
14845 non-zero. All callers of bidi_fetch_char changed.
14846
14847 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
14848
14849 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
14850
14851 2010-12-03 Don March <don@ohspite.net>
14852
14853 * keymap.c (Fdefine_key): Fix non-prefix key error message when
14854 last character M-[char] is translated to ESC [char] (bug#7541).
14855
14856 2011-08-02 Kenichi Handa <handa@m17n.org>
14857
14858 * lisp.h (uniprop_table): Extern it.
14859
14860 * chartab.c (uniprop_table): Make it non-static.
14861
14862 2011-08-01 Eli Zaretskii <eliz@gnu.org>
14863
14864 * xdisp.c (forward_to_next_line_start): Accept additional argument
14865 BIDI_IT_PREV, and store into it the state of the bidi iterator had
14866 on the newline.
14867 (reseat_at_next_visible_line_start): Use the bidi iterator state
14868 returned by forward_to_next_line_start to restore the state of
14869 it->bidi_it after backing up to previous newline. (Bug#9212)
14870
14871 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
14872
14873 * regex.c (re_comp): Protoize.
14874 (re_exec): Fix return type.
14875 (regexec): Fix type of `ret'. (Bug#9203)
14876
14877 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14878
14879 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
14880 This is needed if max-image-size is a floating-point number.
14881
14882 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14883
14884 * print.c (print_object): Print empty symbol as ##.
14885
14886 * lread.c (read1): Read ## as empty symbol.
14887
14888 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
14889
14890 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
14891 setting frame foreground color (Bug#9175).
14892 (x_set_background_color): Likewise.
14893
14894 * nsmenu.m (-setText): Size tooltip dimensions precisely to
14895 contents (Bug#9176).
14896 (EmacsTooltip -init): Remove bezels and add shadows to
14897 tooltip windows.
14898
14899 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
14900 or scroll bar (Bug#8470).
14901
14902 * nsfont.m (nsfont_open): Remove assignment to voffset and
14903 unnecessary vars hshink, expand, hd, full_height, min_height.
14904 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
14905
14906 * nsterm.h (nsfont_info): Remove voffset field.
14907
14908 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
14909
14910 Implement strike-through and overline on NextStep (Bug#8863).
14911
14912 * nsfont.m (nsfont_open): Use underline position provided by font,
14913 instead of hard-coded value of 2.
14914 (nsfont_draw): Call ns_draw_text_decoration instead.
14915
14916 * nsterm.h: Add declaration for ns_draw_text_decoration.
14917
14918 * nsterm.m (ns_draw_text_decoration): New function for drawing
14919 underline, overline, and strike-through.
14920 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
14921 ns_draw_text_decoration. Change treatment of cursor drawing to
14922 accommodate underlining, etc.
14923
14924 2011-07-28 Eli Zaretskii <eliz@gnu.org>
14925
14926 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
14927 default.
14928
14929 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14930
14931 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
14932 Without this fix, if a signal arrives just after memory fills up,
14933 'malloc' might be invoked reentrantly.
14934
14935 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
14936 In other words, assume that every image size is allowed, on non-X
14937 hosts. This assumption is probably wrong, but it lets Emacs compile.
14938
14939 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14940
14941 * regex.c (re_iswctype): Convert return values to boolean.
14942
14943 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
14944
14945 * xdisp.c (compute_display_string_pos): Don't use cached display
14946 string position if the buffer had its restriction changed.
14947 (Bug#9184)
14948
14949 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14950
14951 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14952
14953 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14954
14955 Integer signedness and overflow and related fixes. (Bug#9079)
14956
14957 * bidi.c: Integer size and overflow fixes.
14958 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
14959 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
14960 (bidi_cache_find_level_change, bidi_cache_ensure_space)
14961 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
14962 (bidi_find_other_level_edge):
14963 Use ptrdiff_t instead of EMACS_INT where either will do.
14964 This works better on 32-bit hosts configured --with-wide-int.
14965 (bidi_cache_ensure_space): Check for size-calculation overflow.
14966 Use % rather than repeated addition, for better worst-case speed.
14967 Don't set bidi_cache_size until after xrealloc returns, because it
14968 might not return.
14969 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
14970 (bidi_cache_ensure_space): Also check that the bidi cache size
14971 does not exceed that of the largest Lisp string or buffer. See Eli
14972 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
14973
14974 * alloc.c (__malloc_size_t): Remove.
14975 All uses replaced by size_t. See Andreas Schwab's note
14976 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
14977
14978 * image.c: Improve checking for integer overflow.
14979 (check_image_size): Assume that f is nonnull, since
14980 it is always nonnull in practice. This is one less thing to
14981 worry about when checking for integer overflow later.
14982 (x_check_image_size): New function, which checks for integer
14983 overflow issues inside X.
14984 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
14985 This removes the need for a memory_full check.
14986 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
14987 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
14988 (xbm_read_bitmap_data): Change locals back to 'int', since
14989 their values must fit in 'int'.
14990 (xpm_load_image, png_load, tiff_load):
14991 Invoke x_create_x_image_and_pixmap earlier,
14992 to avoid much needless work if the image is too large.
14993 (tiff_load): Treat overly large images as if
14994 x_create_x_image_and_pixmap failed, not as malloc failures.
14995 (gs_load): Use x_check_image_size.
14996
14997 * gtkutil.c: Omit integer casts.
14998 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
14999 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
15000
15001 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
15002
15003 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
15004 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
15005 would wrongly return t on a 64-bit host.
15006
15007 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
15008 The plain *_OVERFLOW macros run afoul of GCC bug 49705
15009 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
15010 and therefore cause GCC to emit a bogus diagnostic in some cases.
15011
15012 * image.c: Integer signedness and overflow and related fixes.
15013 This is not an exhaustive set of fixes, but it's time to
15014 record what I've got.
15015 (lookup_pixel_color, check_image_size): Remove redundant decls.
15016 (check_image_size): Don't assume that arbitrary EMACS_INT values
15017 fit in 'int', or that arbitrary 'double' values fit in 'int'.
15018 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
15019 (tiff_load, imagemagick_load_image):
15020 Check for overflow in size calculations.
15021 (x_create_x_image_and_pixmap): Remove unnecessary test for
15022 xmalloc returning NULL; that can't happen.
15023 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
15024 (xpm_color_bucket): Use better integer hashing function.
15025 (xpm_cache_color): Don't possibly over-allocate memory.
15026 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
15027 (gif_memory_source):
15028 Use ptrdiff_t, not int or size_t, to record sizes.
15029 (png_load): Don't assume values greater than 2**31 fit in 'int'.
15030 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
15031 either works, as we prefer signed integers.
15032 (tiff_read_from_memory, tiff_write_from_memory):
15033 Return tsize_t, not size_t, since that's what the TIFF API wants.
15034 (tiff_read_from_memory): Don't fail simply because the read would
15035 go past EOF; instead, return a short read.
15036 (tiff_load): Omit no-longer-needed casts.
15037 (Fimagemagick_types): Don't assume size fits into 'int'.
15038
15039 Improve hashing quality when configured --with-wide-int.
15040 * fns.c (hash_string): New function, taken from sxhash_string.
15041 Do not discard information about ASCII character case; this
15042 discarding is no longer needed.
15043 (sxhash-string): Use it. Change sig to match it. Caller changed.
15044 * lisp.h: Declare it.
15045 * lread.c (hash_string): Remove, since we now use fns.c's version.
15046 The fns.c version returns a wider integer if --with-wide-int is
15047 specified, so this should help the quality of the hashing a bit.
15048
15049 * emacs.c: Integer overflow minor fix.
15050 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
15051 Define only if GNU_LINUX.
15052 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
15053
15054 * dispnew.c: Integer signedness and overflow fixes.
15055 Remove unnecessary forward decls, that were a maintenance hassle.
15056 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
15057 All uses changed.
15058 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
15059 (scrolling_window): Use ptrdiff_t, not int, for byte count.
15060 (prepare_desired_row, line_draw_cost):
15061 Use int, not unsigned, where either works.
15062 (save_current_matrix, restore_current_matrix):
15063 Use ptrdiff_t, not size_t, where either works.
15064 (init_display): Check for overflow more accurately, and without
15065 relying on undefined behavior.
15066
15067 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
15068 Remove, replacing with the new symbols in lisp.h. All uses changed.
15069 * fileio.c (make_temp_name):
15070 * filelock.c (lock_file_1, lock_file):
15071 * xdisp.c (message_dolog):
15072 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
15073 Use pMd etc. instead.
15074 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
15075 replacing the pWIDE etc. symbols removed from editfns.c.
15076
15077 * keyboard.h (num_input_events): Now uintmax_t.
15078 This is (very slightly) less likely to mess up due to wraparound.
15079 All uses changed.
15080
15081 * buffer.c: Integer signedness fixes.
15082 (alloc_buffer_text, enlarge_buffer_text):
15083 Use ptrdiff_t rather than size_t when either will do, as we prefer
15084 signed integers.
15085
15086 * alloc.c: Integer signedness and overflow fixes.
15087 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
15088 (__malloc_size_t): Default to size_t, not to int.
15089 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
15090 (Fgarbage_collect, mark_object_loop_halt, mark_object):
15091 Prefer ptrdiff_t to size_t when either would do, as we prefer
15092 signed integers.
15093 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
15094 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
15095 Now const. Initialize with values that are in range even if char
15096 is signed.
15097 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
15098 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
15099 These functions do the right thing with sizes > 2**32.
15100 (check_depth): Now ptrdiff_t, not int.
15101 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
15102 Adjust to new way of storing sizes. Check for size overflow bugs
15103 in rest of code.
15104 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
15105 slightly wrong anyway, as it missed one instance of
15106 XMALLOC_OVERRUN_CHECK_OVERHEAD.
15107 (refill_memory_reserve): Omit needless cast to size_t.
15108 (mark_object_loop_halt): Mark as externally visible.
15109
15110 * xselect.c: Integer signedness and overflow fixes.
15111 (Fx_register_dnd_atom, x_handle_dnd_message):
15112 Use ptrdiff_t, not size_t, since we prefer signed.
15113 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
15114 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
15115 x_dnd_atoms_size and x_dnd_atoms_length.
15116
15117 * doprnt.c: Prefer signed to unsigned when either works.
15118 * eval.c (verror):
15119 * doprnt.c (doprnt):
15120 * lisp.h (doprnt):
15121 * xdisp.c (vmessage):
15122 Use ptrdiff_t, not size_t, when using or implementing doprnt,
15123 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
15124 prefer signed arithmetic to avoid comparison confusion.
15125 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
15126 but is a bit tricky.
15127
15128 Assume freestanding C89 headers, string.h, stdlib.h.
15129 * data.c, doprnt.c, floatfns.c, print.c:
15130 Include float.h unconditionally.
15131 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
15132 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
15133 * regex.c: Likewise for stddef.h, string.h.
15134 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
15135 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
15136 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
15137 (STDC_HEADERS): Remove obsolete defines.
15138 * sysdep.c: Include limits.h unconditionally.
15139
15140 Assume support for memcmp, memcpy, memmove, memset.
15141 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
15142 * regex.c (memcmp, memcpy):
15143 Remove; we assume C89 now.
15144
15145 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
15146 (__malloc_safe_bcopy): Remove; no longer needed.
15147
15148 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
15149 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
15150 well either way, and we prefer signed to unsigned.
15151
15152 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
15153
15154 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
15155 closes the connection while we're reading (bug#9182).
15156
15157 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
15158
15159 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
15160 are specified (Bug#9168).
15161
15162 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
15163
15164 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
15165 Found by GCC static checking and --with-wide-int on a 32-bit host.
15166
15167 2011-07-25 Eli Zaretskii <eliz@gnu.org>
15168
15169 * xdisp.c (compute_display_string_pos): Fix logic of caching
15170 previous display string position. Initialize cached_prev_pos to
15171 -1. Fixes slow-down at the beginning of a buffer.
15172
15173 2011-07-24 Eli Zaretskii <eliz@gnu.org>
15174
15175 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
15176 for attrs[LFACE_FONTSET_INDEX].
15177
15178 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
15179
15180 * xml.c (parse_region): Remove unused local
15181 that was recently introduced.
15182
15183 2011-07-23 Eli Zaretskii <eliz@gnu.org>
15184
15185 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
15186 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
15187
15188 * xdisp.c (move_it_in_display_line_to): Record the best matching
15189 position for TO_CHARPOS while scanning the line, and restore it on
15190 exit if none of the characters scanned was an exact match.
15191 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
15192 when exact match is impossible due to invisible text, and the
15193 lines are truncated.
15194
15195 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
15196
15197 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
15198 for OSX >= 10.7.
15199
15200 2011-07-22 Eli Zaretskii <eliz@gnu.org>
15201
15202 Fix a significant slow-down of cursor motion with C-n, C-p,
15203 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
15204 auto-repeat under bidi redisplay in fontified buffers.
15205 * xdisp.c (compute_stop_pos_backwards): New function.
15206 (next_element_from_buffer): Call compute_stop_pos_backwards to
15207 find a suitable prev_stop when we find ourselves before
15208 base_level_stop.
15209 (reseat): Don't look for prev_stop, as that could mean a very long
15210 run.
15211 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
15212 <cached_disp_overlay_modiff>: Cache for last found display string
15213 position.
15214 (compute_display_string_pos): Return the cached position if asked
15215 about the same buffer in the same area of character positions, and
15216 the buffer wasn't changed since the time the display string
15217 position was cached.
15218
15219 2011-07-22 Eli Zaretskii <eliz@gnu.org>
15220
15221 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
15222 is an integer, which is important for empty lines. (Bug#9149)
15223
15224 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
15225
15226 * frame.c (Fmodify_frame_parameters): In tty case, update the
15227 default face if necessary (Bug#4238).
15228
15229 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
15230
15231 * editfns.c (Fstring_to_char): No need to explain what a character
15232 is in the docstring (Bug#6576).
15233
15234 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
15235
15236 * xml.c (parse_region): Make sure we always return a tree.
15237
15238 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
15239
15240 * xml.c (parse_region): If a document contains only comments,
15241 return that, too.
15242
15243 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
15244
15245 * xml.c (make_dom): Return comments, too.
15246
15247 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
15248
15249 Port to OpenBSD.
15250 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
15251 and the surrounding thread.
15252 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
15253 rather than fgets, and retry after EINTR. Otherwise, 'emacs
15254 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
15255 timer goes off.
15256 * s/openbsd.h (BROKEN_SIGIO): Define.
15257 * unexelf.c (unexec) [__OpenBSD__]:
15258 Don't update the .mdebug section of the Alpha COFF symbol table.
15259
15260 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
15261
15262 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
15263 (bug#8460).
15264
15265 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
15266
15267 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
15268 This fixes some race conditions on the permissions of any newly
15269 created file.
15270
15271 * alloc.c (valid_pointer_p): Use pipe, not open.
15272 This fixes some permissions issues when debugging.
15273
15274 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
15275 If fchown fails to set both uid and gid, try to set just gid,
15276 as that is sometimes allowed. Adjust the file's mode to eliminate
15277 setuid or setgid bits that are inappropriate if fchown fails.
15278
15279 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
15280
15281 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
15282 to compare Lisp_Objects.
15283 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
15284 global_gnutls_log_level, don't mistake it for a Lisp_Object.
15285 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
15286
15287 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
15288
15289 * lread.c (read_integer): Unread even EOF character.
15290 (read1): Likewise. Properly record start position of symbol.
15291
15292 * lread.c (read1): Read `#:' as empty uninterned symbol if no
15293 symbol character follows.
15294
15295 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
15296
15297 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
15298 This works around a problem with the previous change to Fcopy_file.
15299 Recent glibc declares fchown with __attribute__((warn_unused_result)),
15300 and without this change, GCC might complain about discarding
15301 fchown's return value.
15302
15303 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
15304
15305 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
15306
15307 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
15308
15309 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
15310
15311 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
15312
15313 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
15314 it's used from the C level.
15315
15316 * process.c: Use the same condition for POLL_FOR_INPUT in both
15317 keyboard.c and process.c (bug#1858).
15318
15319 2011-07-09 Lawrence Mitchell <wence@gmx.li>
15320
15321 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
15322 (Fgnutls_boot): Use it.
15323
15324 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
15325
15326 * doc.c (Fsubstitute_command_keys): Revert last change.
15327
15328 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
15329
15330 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
15331 quotes the next character, and doesn't affect other longer
15332 sequences (bug#8935).
15333
15334 * lread.c (syms_of_lread): Clarify that is isn't only
15335 `eval-buffer' and `eval-defun' that's affected by
15336 `lexical-binding' (bug#8460).
15337
15338 2011-07-15 Eli Zaretskii <eliz@gnu.org>
15339
15340 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
15341 bidi redisplay when a line includes both an image and is truncated.
15342
15343 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
15344
15345 Fix minor problems found by static checking.
15346 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
15347 (elsz): Now a signed constant, not a size_t var. We prefer signed
15348 types to unsigned, to avoid integer comparison confusion. Without
15349 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
15350 "cannot optimize loop, the loop counter may overflow", a symptom
15351 of the confusion.
15352 * indent.c (Fvertical_motion): Mark locals as initialized.
15353 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
15354
15355 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
15356
15357 * search.c (Fre_search_backward): Mention `case-fold-search' in
15358 all the re_search_* functions (bug#8138).
15359
15360 * keyboard.c (Fopen_dribble_file): Document when the file is
15361 closed (bug#8056).
15362
15363 2011-07-14 Eli Zaretskii <eliz@gnu.org>
15364
15365 * bidi.c (bidi_dump_cached_states): Fix format of displaying
15366 bidi_cache_idx.
15367
15368 Support bidi reordering of display and overlay strings.
15369 * xdisp.c (compute_display_string_pos)
15370 (compute_display_string_end): Accept additional argument STRING.
15371 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
15372 (reseat_to_string): Initialize bidi_it->string.s and
15373 bidi_it->string.schars.
15374 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
15375 NULL (avoids a crash in bidi_paragraph_init).
15376 Initialize itb.string.lstring.
15377 (init_iterator): Call bidi_init_it only of a valid
15378 buffer position was specified. Initialize paragraph_embedding to
15379 L2R.
15380 (reseat_to_string): Initialize the bidi iterator.
15381 (display_string): If we need to ignore text properties of
15382 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
15383 original value of -1 will not work with bidi.)
15384 (compute_display_string_pos): First arg is now struct
15385 `text_pos *'; all callers changed. Support display properties on
15386 Lisp strings.
15387 (compute_display_string_end): Support display properties on Lisp
15388 strings.
15389 (init_iterator, reseat_1, reseat_to_string): Initialize the
15390 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
15391 when iterating on a string not from display properties).
15392 (compute_display_string_pos, compute_display_string_end):
15393 Fix calculation of the object to scan. Fixes an error when using
15394 arrow keys.
15395 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
15396 base_level_stop; instead, set base_level_stop to BEGV.
15397 Fixes crashes in vertical-motion.
15398 (next_element_from_buffer): Improve commentary for when
15399 the iterator is before prev_stop.
15400 (init_iterator): Initialize bidi_p from the default value of
15401 bidi-display-reordering, not from buffer-local value. Use the
15402 buffer-local value only if initializing for buffer iteration.
15403 (handle_invisible_prop): Support invisible properties on strings
15404 that are being bidi-reordered.
15405 (set_iterator_to_next): Support bidi reordering of C strings and
15406 Lisp strings.
15407 (next_element_from_string): Support bidi reordering of Lisp
15408 strings.
15409 (handle_stop_backwards): Support Lisp strings as well.
15410 (display_string): Support display of R2L glyph rows.
15411 Use IT_STRING_CHARPOS when displaying from a Lisp string.
15412 (init_iterator): Don't initialize it->bidi_p for strings
15413 here.
15414 (reseat_to_string): Initialize it->bidi_p for strings here.
15415 (next_element_from_string, next_element_from_c_string)
15416 (next_element_from_buffer): Add xassert's for correspondence
15417 between IT's object being iterated and it->bidi_it.string
15418 structure.
15419 (face_before_or_after_it_pos): Support bidi iteration.
15420 (next_element_from_c_string): Handle the case of the first string
15421 character that is not the first one in the visual order.
15422 (get_visually_first_element): New function, refactored from common
15423 parts of next_element_from_buffer, next_element_from_string, and
15424 next_element_from_c_string.
15425 (tool_bar_lines_needed, redisplay_tool_bar)
15426 (display_menu_bar): Force left-to-right direction. Add a FIXME
15427 comment for making that be controlled by a user option.
15428 (push_it, pop_it): Save and restore the state of the
15429 bidi iterator. Save and restore the bidi_p flag.
15430 (pop_it): Iterate out of display property for string iteration as
15431 well.
15432 (iterate_out_of_display_property): Support iteration over strings.
15433 (handle_single_display_spec): Set up it->bidi_it for iteration
15434 over a display string, and call bidi_init_it.
15435 (handle_single_display_spec, next_overlay_string)
15436 (get_overlay_strings_1, push_display_prop): Set up the bidi
15437 iterator for displaying display or overlay strings.
15438 (forward_to_next_line_start): Don't use the shortcut if
15439 bidi-iterating.
15440 (back_to_previous_visible_line_start): If handle_display_prop
15441 pushed the iterator stack, restore the internal state of the bidi
15442 iterator by calling bidi_pop_it same number of times.
15443 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
15444 and we are bidi-iterating, don't decrement the iterator position;
15445 instead, set the first_elt flag in the bidi iterator, to produce
15446 the same effect.
15447 (reseat_1): Remove redundant setting of string_from_display_prop_p.
15448 (push_display_prop): xassert that we are iterating a buffer.
15449 (push_it, pop_it): Save and restore paragraph_embedding member.
15450 (handle_single_display_spec, next_overlay_string)
15451 (get_overlay_strings_1, reseat_1, reseat_to_string)
15452 (push_display_prop): Set up the `unibyte' member of bidi_it.string
15453 correctly. Don't assume unibyte strings are not bidi-reordered.
15454 (compute_display_string_pos)
15455 (compute_display_string_end): Fix handling the case of C string.
15456 (push_it, pop_it): Save and restore from_disp_prop_p.
15457 (handle_single_display_spec, push_display_prop): Set the
15458 from_disp_prop_p flag.
15459 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
15460 (pop_it): Call iterate_out_of_display_property only if we are
15461 popping after iteration over a string that came from a display
15462 property. Fix a typo in popping stretch info. Add an assertion
15463 for verifying that the iterator position is in sync with the bidi
15464 iterator.
15465 (handle_single_display_spec, get_overlay_strings_1)
15466 (push_display_prop): Fix initialization of paragraph direction for
15467 string when that of the parent object is not yet determined.
15468 (reseat_1): Call bidi_init_it to resync the bidi
15469 iterator with IT's position. (Bug#7616)
15470 (find_row_edges): If ROW->start.pos gives position
15471 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
15472 (handle_stop, back_to_previous_visible_line_start, reseat_1):
15473 Reset the from_disp_prop_p flag.
15474 (SAVE_IT, RESTORE_IT): New macros.
15475 (pos_visible_p, face_before_or_after_it_pos)
15476 (back_to_previous_visible_line_start)
15477 (move_it_in_display_line_to, move_it_in_display_line)
15478 (move_it_to, move_it_vertically_backward, move_it_by_lines)
15479 (try_scrolling, redisplay_window, display_line): Use them when
15480 saving a temporary copy of the iterator and restoring it back.
15481 (back_to_previous_visible_line_start, reseat_1)
15482 (init_iterator): Empty the bidi cache "stack".
15483 (move_it_in_display_line_to): If iterator ended up at
15484 EOL, but we never saw any buffer positions smaller than
15485 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
15486 motion in bidi-reordered lines.
15487 (move_it_in_display_line_to): Record prev_method and prev_pos
15488 immediately before the call to set_iterator_to_next. Fixes cursor
15489 motion in bidi-reordered lines with stretch glyphs and strings
15490 displayed in margins. (Bug#8133) (Bug#8867)
15491 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
15492 TO_CHARPOS.
15493 (pos_visible_p): Support positions in bidi-reordered lines.
15494 Save and restore bidi cache.
15495
15496 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
15497 (bidi_paragraph_info): Delete unused struct.
15498 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
15499 (bidi_cache_start): New variable.
15500 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
15501 to zero.
15502 (bidi_cache_fetch_state, bidi_cache_search)
15503 (bidi_cache_find_level_change, bidi_cache_iterator_state)
15504 (bidi_cache_find, bidi_peek_at_next_level)
15505 (bidi_level_of_next_char, bidi_find_other_level_edge)
15506 (bidi_move_to_visually_next): Compare cache index with
15507 bidi_cache_start rather than with zero.
15508 (bidi_fetch_char): Accept new argument STRING; all callers
15509 changed. Support iteration over a string. Support strings with
15510 display properties. Support unibyte strings. Fix the type of
15511 `len' according to what STRING_CHAR_AND_LENGTH expects.
15512 (bidi_paragraph_init, bidi_resolve_explicit_1)
15513 (bidi_resolve_explicit, bidi_resolve_weak)
15514 (bidi_level_of_next_char, bidi_move_to_visually_next):
15515 Support iteration over a string.
15516 (bidi_set_sor_type, bidi_resolve_explicit_1)
15517 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
15518 can now be zero (for strings); special values 0 and -1 were
15519 changed to -1 and -2, respectively.
15520 (bidi_char_at_pos): New function.
15521 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
15522 Call it instead of FETCH_MULTIBYTE_CHAR.
15523 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
15524 initialized to valid values.
15525 (bidi_init_it): Don't initialize charpos and bytepos with invalid
15526 values.
15527 (bidi_level_of_next_char): Allow the sentinel "position" to pass
15528 the test for valid cached positions. Fix the logic for looking up
15529 the sentinel state in the cache. GCPRO the Lisp string we are
15530 iterating.
15531 (bidi_push_it, bidi_pop_it): New functions.
15532 (bidi_initialize): Initialize the bidi cache start stack pointer.
15533 (bidi_cache_ensure_space): New function, refactored from part of
15534 bidi_cache_iterator_state. Don't assume the required size is just
15535 one BIDI_CACHE_CHUNK away.
15536 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
15537 (bidi_count_bytes, bidi_char_at_pos): New functions.
15538 (bidi_cache_search): Don't assume bidi_cache_last_idx is
15539 always valid if bidi_cache_idx is valid.
15540 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
15541 is valid if it's going to be used.
15542 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
15543 (bidi_cache_fetch_state, bidi_cache_search)
15544 (bidi_cache_find_level_change, bidi_cache_ensure_space)
15545 (bidi_cache_iterator_state, bidi_cache_find)
15546 (bidi_find_other_level_edge, bidi_cache_start_stack):
15547 All variables related to cache indices are now EMACS_INT.
15548
15549 * dispextern.h (struct bidi_string_data): New structure.
15550 (struct bidi_it): New member `string'. Make flag members be 1-bit
15551 fields, and put them last in the struct.
15552 (compute_display_string_pos, compute_display_string_end):
15553 Update prototypes.
15554 (bidi_push_it, bidi_pop_it): Add prototypes.
15555 (struct iterator_stack_entry): New members bidi_p,
15556 paragraph_embedding, and from_disp_prop_p.
15557 (struct it): Member bidi_p is now a bit field 1 bit wide.
15558 (bidi_shelve_cache, bidi_unshelve_cache):
15559 Declare prototypes.
15560
15561 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
15562 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
15563 and vector-like objects.
15564
15565 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
15566 cache around display iteration.
15567
15568 * window.c (Fwindow_end, window_scroll_pixel_based)
15569 (displayed_window_lines, Frecenter): Save and restore the bidi
15570 cache around display iteration.
15571
15572 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
15573
15574 * editfns.c (Fdelete_region): Clarify the use of the named
15575 parameters (bug#6788).
15576
15577 2011-07-14 Martin Rudalics <rudalics@gmx.at>
15578
15579 * indent.c (Fvertical_motion): Set and restore w->pointm when
15580 saving and restoring the window's buffer (Bug#9006).
15581
15582 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
15583
15584 * editfns.c (Fstring_to_char): Clarify just what is returned
15585 (bug#6576). Text by Eli Zaretskii.
15586
15587 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
15588
15589 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
15590
15591 2011-07-13 Eli Zaretskii <eliz@gnu.org>
15592
15593 * buffer.c (mmap_find): Fix a typo.
15594
15595 2011-07-13 Johan Bockgård <bojohan@gnu.org>
15596
15597 Fix execution of x selection hooks.
15598 * xselect.c (Qx_lost_selection_functions)
15599 (Qx_sent_selection_functions): New vars.
15600 (syms_of_xselect): DEFSYM them.
15601 (x_handle_selection_request): Pass Qx_sent_selection_functions
15602 rather than Vx_sent_selection_functions to Frun_hook_with_args.
15603 (x_handle_selection_clear,x_clear_frame_selections):
15604 Pass Qx_lost_selection_functions rather than
15605 Vx_lost_selection_functions to Frun_hook_with_args.
15606
15607 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
15608
15609 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
15610 The old code sometimes used this field without initializing it.
15611
15612 * alloc.c (gc_sweep): Don't read past end of array.
15613 In theory, the old code could also have corrupted Emacs internals,
15614 though it'd be very unlikely.
15615
15616 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
15617
15618 * character.c (Fcharacterp): Don't advertise optional ignored
15619 argument. (Bug#4026)
15620
15621 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
15622
15623 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
15624 key" (bug#4257).
15625
15626 * window.c (Fset_window_start): Doc fix (bug#4199).
15627 (Fset_window_hscroll): Ditto.
15628
15629 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
15630
15631 Fix minor new problems caught by GCC 4.6.1.
15632 * term.c (init_tty): Remove unused local.
15633 * xsettings.c (store_monospaced_changed): Define this function only
15634 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
15635 not used otherwise.
15636
15637 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
15638
15639 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
15640
15641 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
15642
15643 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
15644 are the mini-buffer and the echo area (bug#3320).
15645
15646 * term.c (init_tty): Remove support for supdup, c10 and perq
15647 terminals, which are no longer supported (bug#1482).
15648
15649 2011-07-10 Johan Bockgård <bojohan@gnu.org>
15650
15651 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
15652
15653 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
15654
15655 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
15656 for non-popups (Bug#3642).
15657
15658 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
15659
15660 * alloc.c (reset_malloc_hooks): Protoize.
15661 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
15662 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
15663 * cm.c (losecursor): Likewise.
15664 * data.c (fmod): Likewise.
15665 * dispnew.c (swap_glyphs_in_rows): Likewise.
15666 * emacs.c (memory_warning_signal): Likewise.
15667 * floatfns.c (float_error): Likewise.
15668 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
15669 (otf_open, font_otf_capability, generate_otf_features)
15670 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
15671 Likewise.
15672 * image.c (pbm_read_file): Likewise.
15673 * indent.c (string_display_width): Likewise.
15674 * intervals.c (check_for_interval, search_for_interval)
15675 (inc_interval_count, count_intervals, root_interval)
15676 (adjust_intervals_for_insertion, make_new_interval): Likewise.
15677 * lread.c (defalias): Likewise.
15678 * ralloc.c (r_alloc_check): Likewise.
15679 * regex.c (set_image_of_range_1, set_image_of_range)
15680 (regex_grow_registers): Likewise.
15681 * sysdep.c (strerror): Likewise.
15682 * termcap.c (valid_filename_p, tprint, main): Likewise.
15683 * tparam.c (main): Likewise.
15684 * unexhp9k800.c (run_time_remap, save_data_space)
15685 (update_file_ptrs, read_header, write_header, calculate_checksum)
15686 (copy_file, copy_rest, display_header): Likewise.
15687 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
15688 Likewise.
15689 * xdisp.c (check_it): Likewise.
15690 * xfaces.c (register_color, unregister_color, unregister_colors):
15691 Likewise.
15692 * xfns.c (print_fontset_result): Likewise.
15693 * xrdb.c (member, fatal, main): Likewise.
15694
15695 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
15696
15697 Fix minor problems found by static checking (Bug#9031).
15698 * chartab.c (char_table_set_range, map_sub_char_table):
15699 Remove unused locals.
15700 (uniprop_table): Now static.
15701 * composite.c (_work_char): Remove unused static var.
15702
15703 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
15704
15705 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
15706
15707 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
15708
15709 * gtkutil.c (qttip_cb): Remove code without function.
15710
15711 2011-07-09 Eli Zaretskii <eliz@gnu.org>
15712
15713 * w32.c (pthread_sigmask): New stub.
15714
15715 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
15716
15717 Use pthread_sigmask, not sigprocmask (Bug#9010).
15718 sigprocmask is portable only for single-threaded applications, and
15719 Emacs can be multi-threaded when it uses GTK.
15720 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
15721 (LIBES): Use it.
15722 * callproc.c (Fcall_process):
15723 * process.c (create_process):
15724 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
15725 Use pthread_sigmask, not sigprocmask.
15726
15727 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15728
15729 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
15730 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
15731 wrong (Bug#8591).
15732
15733 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15734
15735 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
15736 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
15737 (xg_hide_tooltip): Fix comment.
15738
15739 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
15740 in registerServicesMenuSendTypes.
15741 (validRequestorForSendType): Don't check ns_return_types.
15742
15743 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
15744 ns_return_type.
15745
15746 2011-07-08 Jason Rumney <jasonr@gnu.org>
15747
15748 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
15749 SH_SHOW for hidden windows (Bug#5482).
15750
15751 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
15752 frame struct members of non-existent frames (Bug#6284).
15753
15754 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15755
15756 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
15757 variable firstTime not needed on OSX >= 10.6.
15758 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
15759 >= 10.5. Use setKnobProportion, setDoubleValue.
15760
15761 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
15762 (MAC_OS_X_VERSION_10_5): Define if not defined.
15763 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
15764 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
15765 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
15766
15767 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
15768 cString and lossyCString on OSX >= 10.4.
15769
15770 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
15771 sizeToFit on OSX >= 10.2.
15772
15773 * nsimage.m (allocInitFromFile): Don't use deprecated method
15774 bestRepresentationForDevice on OSX >= 10.6.
15775
15776 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
15777 to avoid warning.
15778
15779 * emacs.c: Declare unexec_init_emacs_zone.
15780
15781 * nsgui.h: Fix compiler warning about gnulib redefining verify.
15782
15783 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
15784
15785 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
15786 on svcsMenu (Bug#8842).
15787
15788 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
15789 ns_return_types.
15790 (Fns_list_services): Just return Qnil on 10.6, code not working there.
15791
15792 * nsterm.m (QUTF8_STRING): Declare.
15793 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
15794 (validRequestorForSendType): Return type is (id).
15795 Change indexOfObjectIdenticalTo to indexOfObject.
15796 Check if we have local selection before returning self (Bug#8842).
15797 (writeSelectionToPasteboard): Put local selection into paste board
15798 if we have a local selection (Bug#8842).
15799 (syms_of_nsterm): DEFSYM QUTF8_STRING.
15800
15801 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
15802 (ns_get_local_selection): Declare.
15803
15804 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
15805
15806 * keymap.c (describe_map_tree): Don't insert a double newline at
15807 the end of the buffer (bug#1169) and return whether we inserted
15808 something.
15809
15810 * callint.c (Fcall_interactively): Change "reading args" to
15811 "providing args" to try to clarify what it does (bug#1010).
15812
15813 2011-07-07 Kenichi Handa <handa@m17n.org>
15814
15815 * composite.c (composition_compute_stop_pos): Ignore a static
15816 composition starting before CHARPOS (Bug#8915).
15817
15818 * xdisp.c (handle_composition_prop): Likewise.
15819
15820 2011-07-07 Eli Zaretskii <eliz@gnu.org>
15821
15822 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
15823 (Bug#9015)
15824
15825 2011-07-07 Kenichi Handa <handa@m17n.org>
15826
15827 * character.h (unicode_category_t): New enum type.
15828
15829 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
15830 (Qchar_code_property_table): New variable.
15831 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
15832 (UNIPROP_COMPRESSED_FORM_P): New macros.
15833 (char_table_ascii): Uncompress the compressed values.
15834 (sub_char_table_ref): New arg is_uniprop. Callers changed.
15835 Uncompress the compressed values.
15836 (sub_char_table_ref_and_range): Likewise.
15837 (char_table_ref_and_range): Uncompress the compressed values.
15838 (sub_char_table_set): New arg is_uniprop. Callers changed.
15839 Uncompress the compressed values.
15840 (sub_char_table_set_range): Args changed. Callers changed.
15841 (char_table_set_range): Adjuted for the above change.
15842 (map_sub_char_table): Delete args default_val and parent. Add arg
15843 top. Give decoded values to a Lisp function.
15844 (map_char_table): Adjust for the above change. Give decoded
15845 values to a Lisp function. Gcpro more variables.
15846 (uniprop_table_uncompress)
15847 (uniprop_decode_value_run_length): New functions.
15848 (uniprop_decoder, uniprop_decoder_count): New variables.
15849 (uniprop_get_decoder, uniprop_encode_value_character)
15850 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
15851 New functions.
15852 (uniprop_encoder, uniprop_encoder_count): New variables.
15853 (uniprop_get_encoder, uniprop_table)
15854 (Funicode_property_table_internal, Fget_unicode_property_internal)
15855 (Fput_unicode_property_internal): New functions.
15856 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
15857 Sunicode_property_table_internal, Sget_unicode_property_internal,
15858 and Sput_unicode_property_internal. Defvar_lisp
15859 char-code-property-alist.
15860
15861 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
15862 Vunicode_category_table.
15863
15864 * font.c (font_range): Adjust for the change of
15865 Vunicode_category_table.
15866
15867 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
15868
15869 * m/iris4d.h: Remove file, move contents ...
15870 * s/irix6-5.h: ... here.
15871
15872 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
15873
15874 Remove unportable assumption about struct layout (Bug#8884).
15875 * alloc.c (mark_buffer):
15876 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
15877 (clone_per_buffer_values): Don't assume that
15878 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
15879 This isn't true in general, and it's particularly not true
15880 if Emacs is configured with --with-wide-int.
15881 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
15882 New macros, used in the buffer.c change.
15883
15884 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
15885
15886 * xsettings.c: Use both GConf and GSettings if both are available.
15887 (store_config_changed_event): Add comment.
15888 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
15889 (store_tool_bar_style_changed): New functions.
15890 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
15891 (struct xsettings): Move font inside HAVE_XFT.
15892 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
15893 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
15894 Move inside HAVE_XFT.
15895 (something_changed_gsettingsCB): Rename from something_changedCB.
15896 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
15897 also.
15898 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
15899 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
15900 (something_changed_gconfCB): Rename from something_changedCB.
15901 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
15902 (parse_settings): Move check for font inside HAVE_XFT.
15903 (read_settings, apply_xft_settings): Add comment.
15904 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
15905 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
15906 call store_font_name_changed.
15907 (xft_settings_event): Add comment.
15908 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
15909 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
15910 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
15911 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
15912 (xsettings_initialize): Call init_gsettings last.
15913 (xsettings_get_system_font, xsettings_get_system_normal_font):
15914 Add comment.
15915
15916 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
15917
15918 Random fixes. E.g., (random) never returned negative values.
15919 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
15920 subseconds part to the entropy, as that's a bit more random.
15921 Prefer signed to unsigned, since the signedness doesn't matter and
15922 in general we prefer signed. When given a limit, use a
15923 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
15924 latter isn't right if USE_2_TAGS_FOR_INTS.
15925 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
15926 not 0..VALMASK. Don't discard "excess" bits that random () returns.
15927
15928 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
15929
15930 * textprop.c (text_property_stickiness):
15931 Obey Vtext_property_default_nonsticky.
15932 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
15933 * w32fns.c (syms_of_w32fns):
15934 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
15935
15936 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15937
15938 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
15939 This is more efficient than Ffile_directory_p and avoids a minor race.
15940
15941 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
15942
15943 * buffer.c (Foverlay_put): Say what the return value is
15944 (bug#7835).
15945
15946 * fileio.c (barf_or_query_if_file_exists): Check first if the file
15947 is a directory before asking whether to use the file name
15948 (bug#7564).
15949 (barf_or_query_if_file_exists): Make the "File is a directory"
15950 error be more correct.
15951
15952 * fns.c (Frequire): Remove the mention of the .gz files, since
15953 that's installation-specific, but keep the mention of
15954 `get-load-suffixes'.
15955
15956 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15957
15958 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
15959 Report string overflow if the output is too long.
15960
15961 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
15962
15963 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
15964 (syms_of_gnutls): Remove duplicate DEFSYM for
15965 Qgnutls_bootprop_verify_hostname_error, an error for
15966 Qgnutls_bootprop_verify_error (which is no longer used).
15967
15968 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
15969 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
15970 Also (re)move comments that are misplaced or no longer relevant.
15971
15972 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15973
15974 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
15975
15976 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
15977
15978 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
15979 and background color parameters if they have been changed.
15980
15981 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15982
15983 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
15984
15985 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
15986
15987 * xsettings.c (SYSTEM_FONT): Define only when used.
15988 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
15989
15990 * keymap.c (access_keymap_1): Now static.
15991
15992 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
15993
15994 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
15995 leave any prefix arg for the up event (Bug#1586).
15996
15997 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
15998
15999 * lread.c (syms_of_lread): Mention single symbols defined by
16000 `defvar' or `defconst' (bug#7154).
16001
16002 * fns.c (Frequire): Mention .el.gz files (bug#7314).
16003 (Frequire): Mention get-load-suffixes.
16004
16005 2011-07-02 Martin Rudalics <rudalics@gmx.at>
16006
16007 * window.h (window): Remove clone_number slot.
16008 * window.c (Fwindow_clone_number, Fset_window_clone_number):
16009 Remove.
16010 (make_parent_window, make_window, saved_window)
16011 (Fset_window_configuration, save_window_save): Don't deal with
16012 clone numbers.
16013 * buffer.c (Qclone_number): Remove declaration.
16014 (sort_overlays, overlay_strings): Don't deal with clone numbers.
16015
16016 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
16017
16018 Add multiple inheritance to keymaps.
16019 * keymap.c (Fmake_composed_keymap): New function.
16020 (Fset_keymap_parent): Simplify.
16021 (fix_submap_inheritance): Remove.
16022 (access_keymap_1): New function extracted from access_keymap to handle
16023 embedded parents and handle lists of maps.
16024 (access_keymap): Use it.
16025 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
16026 (Fcopy_keymap): Handle embedded parents.
16027 (Fcommand_remapping, define_as_prefix): Simplify.
16028 (Fkey_binding): Simplify.
16029 (syms_of_keymap): Move minibuffer-local-completion-map,
16030 minibuffer-local-filename-completion-map,
16031 minibuffer-local-must-match-map, and
16032 minibuffer-local-filename-must-match-map to Elisp.
16033 (syms_of_keymap): Defsubr make-composed-keymap.
16034 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
16035 (parse_menu_item): Trivial simplification.
16036
16037 2011-07-01 Glenn Morris <rgm@gnu.org>
16038
16039 * Makefile.in (SETTINGS_LIBS): Fix typo.
16040
16041 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
16042
16043 * coding.c (Fencode_coding_string): Record the last coding system
16044 used, as the function doc string says (bug#8738).
16045
16046 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
16047
16048 * xsettings.c (store_monospaced_changed): Take new font as arg and
16049 check for change against current_mono_font.
16050 (EMACS_TYPE_SETTINGS): Remove this and related defines.
16051 (emacs_settings_constructor, emacs_settings_get_property)
16052 (emacs_settings_set_property, emacs_settings_class_init)
16053 (emacs_settings_init, gsettings_obj): Remove.
16054 (something_changedCB): New function for HAVE_GSETTINGS.
16055 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
16056 with value as argument.
16057 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
16058 g_settings_new (Bug#8967). Do not create gsettings_obj.
16059 Remove calls to g_settings_bind. Connect something_changedCB to
16060 "changed".
16061
16062 * xgselect.c: Add defined (HAVE_GSETTINGS).
16063 (xgselect_initialize): Ditto.
16064
16065 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
16066 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
16067 xg_select.
16068
16069 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
16070
16071 * eval.c (struct backtrace): Simplify and port the data structure.
16072 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
16073 signed bit field, as this assumption is not portable and it makes
16074 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
16075 "char debug_on_exit : 1" as this is not portable either; instead,
16076 use the portable "unsigned int debug_on_exit : 1". Remove unused
16077 member evalargs. Remove obsolete comments about cc bombing out.
16078
16079 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
16080
16081 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
16082 Let HAVE_GSETTINGS override HAVE_GCONF.
16083 (store_monospaced_changed): New function.
16084 (EMACS_SETTINGS): A new type derived from GObject to handle
16085 GSettings notifications.
16086 (emacs_settings_constructor, emacs_settings_get_property)
16087 (emacs_settings_set_property, emacs_settings_class_init):
16088 New functions.
16089 (gsettings_client, gsettings_obj): New variables.
16090 (GSETTINGS_SCHEMA): New define.
16091 (something_changedCB): Call store_monospaced_changed.
16092 (init_gsettings): New function.
16093 (xsettings_initialize): Call init_gsettings.
16094 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
16095 to NULL.
16096
16097 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
16098 GCONF_CFLAGS/LIBS.
16099
16100 2011-06-29 Martin Rudalics <rudalics@gmx.at>
16101
16102 * window.c (resize_root_window, grow_mini_window)
16103 (shrink_mini_window): Rename Qresize_root_window to
16104 Qwindow_resize_root_window and Qresize_root_window_vertically to
16105 Qwindow_resize_root_window_vertically.
16106
16107 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
16108
16109 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
16110
16111 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
16112
16113 * makefile.w32-in: Redesign dependencies so they reflect more
16114 clearly which files are directly included by each source file,
16115 and not through other includes.
16116
16117 2011-06-27 Martin Rudalics <rudalics@gmx.at>
16118
16119 * buffer.c (Qclone_number): Declare static and DEFSYM it.
16120 (sort_overlays, overlay_strings): When an overlay's clone number
16121 matches the window's clone number process the overlay even if
16122 the overlay's window property doesn't match the current window.
16123
16124 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
16125 (Fwindow_hchild): Rename to Fwindow_left_child.
16126 (Fwindow_next): Rename to Fwindow_next_sibling.
16127 (Fwindow_prev): Rename to Fwindow_prev_sibling.
16128 (resize_window_check): Rename to window_resize_check.
16129 (resize_window_apply): Rename to window_resize_apply.
16130 (Fresize_window_apply): Rename to Fwindow_resize_apply.
16131 (Fdelete_other_windows_internal, resize_frame_windows)
16132 (Fsplit_window_internal, Fdelete_window_internal)
16133 (grow_mini_window, shrink_mini_window)
16134 (Fresize_mini_window_internal): Fix callers accordingly.
16135
16136 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
16137
16138 * emacsgtkfixed.h: State that this is only used with Gtk+3.
16139 (emacs_fixed_set_min_size): Remove.
16140 (emacs_fixed_new): Take frame as argument.
16141
16142 * emacsgtkfixed.c: State that this is only used with Gtk+3.
16143 (_EmacsFixedPrivate): Remove minwidth/height.
16144 Add struct frame *f.
16145 (emacs_fixed_init): Initialize priv->f.
16146 (get_parent_class, emacs_fixed_set_min_size): Remove.
16147 (emacs_fixed_new): Set priv->f to argument.
16148 (emacs_fixed_get_preferred_width)
16149 (emacs_fixed_get_preferred_height): Use min_width/height from
16150 frames size_hint to set minimum and natural (Bug#8919).
16151 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
16152 and use min_width/height from frames size_hint to set
16153 min_width/height (Bug#8919).
16154
16155 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
16156 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
16157 Fix indentation.
16158
16159 2011-06-26 Eli Zaretskii <eliz@gnu.org>
16160
16161 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
16162 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
16163 called at ZV.
16164
16165 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
16166
16167 * process.c (wait_reading_process_output): Bypass select if
16168 waiting for a cell while ignoring keyboard input, and input is
16169 pending. Suggested by Jan Djärv (Bug#8869).
16170
16171 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
16172
16173 Use gnulib's dup2 module instead of rolling our own.
16174 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
16175
16176 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16177
16178 * dispnew.c (scrolling_window): Before scrolling, turn off a
16179 mouse-highlight in the window being scrolled.
16180
16181 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
16182
16183 Move DEFSYM to lisp.h and use everywhere.
16184
16185 * character.h (DEFSYM): Move declaration...
16186 * lisp.h (DEFSYM): ...here.
16187
16188 * gnutls.c:
16189 * minibuf.c:
16190 * w32menu.c:
16191 * w32proc.c:
16192 * w32select.c: Don't include character.h.
16193
16194 * alloc.c (syms_of_alloc):
16195 * buffer.c (syms_of_buffer):
16196 * bytecode.c (syms_of_bytecode):
16197 * callint.c (syms_of_callint):
16198 * casefiddle.c (syms_of_casefiddle):
16199 * casetab.c (init_casetab_once):
16200 * category.c (init_category_once, syms_of_category):
16201 * ccl.c (syms_of_ccl):
16202 * cmds.c (syms_of_cmds):
16203 * composite.c (syms_of_composite):
16204 * dbusbind.c (syms_of_dbusbind):
16205 * dired.c (syms_of_dired):
16206 * dispnew.c (syms_of_display):
16207 * doc.c (syms_of_doc):
16208 * editfns.c (syms_of_editfns):
16209 * emacs.c (syms_of_emacs):
16210 * eval.c (syms_of_eval):
16211 * fileio.c (syms_of_fileio):
16212 * fns.c (syms_of_fns):
16213 * frame.c (syms_of_frame):
16214 * fringe.c (syms_of_fringe):
16215 * insdel.c (syms_of_insdel):
16216 * keymap.c (syms_of_keymap):
16217 * lread.c (init_obarray, syms_of_lread):
16218 * macros.c (syms_of_macros):
16219 * msdos.c (syms_of_msdos):
16220 * print.c (syms_of_print):
16221 * process.c (syms_of_process):
16222 * search.c (syms_of_search):
16223 * sound.c (syms_of_sound):
16224 * syntax.c (init_syntax_once, syms_of_syntax):
16225 * terminal.c (syms_of_terminal):
16226 * textprop.c (syms_of_textprop):
16227 * undo.c (syms_of_undo):
16228 * w32.c (globals_of_w32):
16229 * window.c (syms_of_window):
16230 * xdisp.c (syms_of_xdisp):
16231 * xfaces.c (syms_of_xfaces):
16232 * xfns.c (syms_of_xfns):
16233 * xmenu.c (syms_of_xmenu):
16234 * xsettings.c (syms_of_xsettings):
16235 * xterm.c (syms_of_xterm): Use DEFSYM.
16236
16237 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
16238
16239 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
16240
16241 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
16242
16243 Integer and buffer overflow fixes (Bug#8873).
16244
16245 * print.c (printchar, strout): Check for string overflow.
16246 (PRINTPREPARE, printchar, strout):
16247 Don't set size unless allocation succeeds.
16248
16249 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
16250 for sizes. Check for string overflow more accurately.
16251 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
16252
16253 * macros.c: Integer and buffer overflow fixes.
16254 * keyboard.h (struct keyboard.kbd_macro_bufsize):
16255 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
16256 Use ptrdiff_t, not int, for sizes.
16257 Don't increment bufsize until after realloc succeeds.
16258 Check for size-calculation overflow.
16259 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
16260
16261 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
16262
16263 * lread.c: Integer overflow fixes.
16264 (read_integer): Radix is now EMACS_INT, not int,
16265 to improve quality of diagnostics for out-of-range radices.
16266 Calculate buffer size correctly for out-of-range radices.
16267 (read1): Check for integer overflow in radices, and in
16268 read-circle numbers.
16269 (read_escape): Avoid int overflow.
16270 (Fload, openp, read_buffer_size, read1)
16271 (substitute_object_recurse, read_vector, read_list, map_obarray):
16272 Use ptrdiff_t, not int, for sizes.
16273 (read1): Use EMACS_INT, not int, for sizes.
16274 Check for size overflow.
16275
16276 * image.c (cache_image): Check for size arithmetic overflow.
16277
16278 * lread.c: Integer overflow issues.
16279 (saved_doc_string_size, saved_doc_string_length)
16280 (prev_saved_doc_string_size, prev_saved_doc_string_length):
16281 Now ptrdiff_t, not int.
16282 (read1): Don't assume doc string length fits in int. Check for
16283 out-of-range doc string lengths.
16284 (read_list): Don't assume file position fits in int.
16285 (read_escape): Check for hex character overflow.
16286
16287 2011-06-22 Leo Liu <sdl.web@gmail.com>
16288
16289 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
16290 Move to minibuffer.el.
16291
16292 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
16293
16294 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
16295 The following patches are for when GLYPH_DEBUG && !XASSERT.
16296 * dispextern.h (trace_redisplay_p, dump_glyph_string):
16297 * dispnew.c (flush_stdout):
16298 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
16299 Mark as externally visible.
16300 * dispnew.c (check_window_matrix_pointers): Now static.
16301 * dispnew.c (window_to_frame_vpos):
16302 * xfns.c (unwind_create_frame):
16303 * xterm.c (x_check_font): Remove unused local.
16304 * scroll.c (CHECK_BOUNDS):
16305 * xfaces.c (cache_fache): Rename local to avoid shadowing.
16306 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
16307 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
16308 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
16309 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
16310 Now static.
16311 (debug_method_add): Use va_list and vsprintf rather than relying
16312 on undefined behavior with wrong number of arguments.
16313 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
16314 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
16315 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
16316 since we're not interested in debugging glyphs with old libraries.
16317 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
16318 GCC 4.6.0's static checking.
16319
16320 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
16321
16322 Integer overflow and signedness fixes (Bug#8873).
16323 A few related buffer overrun fixes, too.
16324
16325 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
16326
16327 * dispextern.h (struct face.stipple):
16328 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
16329 (x_bitmap_mask, x_allocate_bitmap_record)
16330 (x_create_bitmap_from_data, x_create_bitmap_from_file)
16331 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
16332 (x_create_bitmap_from_xpm_data):
16333 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
16334 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
16335 (.bitmaps_last):
16336 * xfaces.c (load_pixmap):
16337 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
16338 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
16339 (.bitmaps_last, struct x_output.icon_bitmap):
16340 Use ptrdiff_t, not int, for bitmap indexes.
16341 (x_allocate_bitmap_record): Check for size overflow.
16342 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
16343
16344 Use ptrdiff_t, not int, for overlay counts.
16345 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
16346 * editfns.c (overlays_around, get_pos_property):
16347 * textprop.c (get_char_property_and_overlay):
16348 * xdisp.c (next_overlay_change, note_mouse_highlight):
16349 * xfaces.c (face_at_buffer_position):
16350 * buffer.c (OVERLAY_COUNT_MAX): New macro.
16351 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
16352 (Fnext_overlay_change, Fprevious_overlay_change)
16353 (mouse_face_overlay_overlaps, Foverlays_in):
16354 Use ptrdiff_t, not int, for sizes.
16355 (overlays_at, overlays_in): Check for size-calculation overflow.
16356
16357 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
16358
16359 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
16360 (x_session_initialize): Do not assume string length fits in int.
16361
16362 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
16363 This is unlikely, but can occur if DPI is outlandish.
16364
16365 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
16366 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
16367
16368 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
16369 * xrdb.c (magic_file_p, search_magic_path):
16370 Omit last arg SUFFIX; it was always 0. All callers changed.
16371 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
16372
16373 * xfont.c (xfont_match): Avoid need for strlen.
16374
16375 * xfns.c: Don't assume strlen fits in int.
16376 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
16377
16378 * xdisp.c (message_log_check_duplicate): Return intmax_t,
16379 not unsigned long, as we prefer signed integers. All callers changed.
16380 Detect integer overflow in repeat count.
16381 (message_dolog): Don't assume print length fits in 39 bytes.
16382 (display_mode_element): Don't assume strlen fits in int.
16383
16384 * termcap.c: Don't assume sizes fit in int and never overflow.
16385 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
16386 (gobble_line): Check for size-calculation overflow.
16387
16388 * minibuf.c (Fread_buffer):
16389 * lread.c (intern, intern_c_string):
16390 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
16391 Don't assume string length fits in int.
16392
16393 * keyboard.c (parse_tool_bar_item):
16394 * gtkutil.c (style_changed_cb): Avoid need for strlen.
16395
16396 * font.c: Don't assume string length fits in int.
16397 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
16398 Use ptrdiff_t, not int.
16399 (font_intern_prop): Don't assume string length fits in int.
16400 Don't assume integer property fits in fixnum.
16401 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
16402
16403 * filelock.c: Fix some buffer overrun and integer overflow issues.
16404 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
16405 Reformulate so as not to need the command string.
16406 Invoke gzip -cd rather than gunzip, as it's more portable.
16407 (lock_info_type, lock_file_1, lock_file):
16408 Don't assume pid_t and time_t fit in unsigned long.
16409 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
16410 (current_lock_owner): Prefer signed type for sizes.
16411 Use memcpy, not strncpy, where memcpy is what is really wanted.
16412 Don't assume (via atoi) that time_t and pid_t fit in int.
16413 Check for time_t and/or pid_t out of range, e.g., via a network share.
16414 Don't alloca where an auto var works fine.
16415
16416 * fileio.c: Fix some integer overflow issues.
16417 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
16418 Don't assume string length fits in int.
16419 (directory_file_name): Don't assume string length fits in long.
16420 (make_temp_name): Don't assume pid fits in int, or that its print
16421 length is less than 20.
16422
16423 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
16424
16425 * coding.c (make_subsidiaries): Don't assume string length fits in int.
16426
16427 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
16428
16429 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
16430 We prefer signed integers, even for size calculations.
16431
16432 * emacs.c: Don't assume string length fits in 'int'.
16433 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
16434 (main): Don't invoke strlen when not needed.
16435
16436 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
16437 (XD_DEBUG_MESSAGE): Don't waste a byte.
16438
16439 * callproc.c (getenv_internal_1, getenv_internal)
16440 (Fgetenv_internal):
16441 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
16442
16443 * lread.c (invalid_syntax): Omit length argument.
16444 All uses changed. This doesn't fix a bug, but it simplifies the
16445 code away from its former Hollerith-constant appearance, and it's
16446 one less 'int' to worry about when looking at integer-overflow issues.
16447 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
16448
16449 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
16450 This didn't break anything, but it didn't help either.
16451 It's confusing to put a bogus integer in a place where the actual
16452 value does not matter.
16453 (LIST_END_P): Remove unused macro and its bogus comment.
16454 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
16455
16456 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
16457 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
16458 implementation.
16459 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
16460 We prefer signed types, and the value cannot exceed the EMACS_INT
16461 range anyway (because otherwise the length would not be representable).
16462 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
16463 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
16464 This avoids a GCC warning when WIDE_EMACS_INT.
16465
16466 * indent.c (sane_tab_width): New function.
16467 (current_column, scan_for_column, Findent_to, position_indentation)
16468 (compute_motion): Use it. This is just for clarity.
16469 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
16470
16471 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
16472
16473 * lisp.h (lint_assume): New macro.
16474 * composite.c (composition_gstring_put_cache):
16475 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
16476
16477 * editfns.c, insdel.c:
16478 Omit unnecessary forward decls, to simplify future changes.
16479
16480 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
16481
16482 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
16483
16484 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
16485 Use much-faster test for byte-length change.
16486 Don't assume string byte-length fits in 'int'.
16487 Check that character arg fits in 'int'.
16488 (mapcar1): Declare byte as byte, for clarity.
16489
16490 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
16491
16492 * fns.c (concat): Catch string overflow earlier.
16493 Do not rely on integer wraparound.
16494
16495 * dispextern.h (struct it.overlay_strings_charpos)
16496 (struct it.selective): Now EMACS_INT, not int.
16497 * xdisp.c (forward_to_next_line_start)
16498 (back_to_previous_visible_line_start)
16499 (reseat_at_next_visible_line_start, next_element_from_buffer):
16500 Don't arbitrarily truncate the value of 'selective' to int.
16501
16502 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
16503
16504 * composite.c: Don't truncate sizes to 'int'.
16505 (composition_gstring_p, composition_reseat_it)
16506 (composition_adjust_point): Use EMACS_INT, not int.
16507 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
16508 not EMACS_UINT, for indexes.
16509
16510 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
16511
16512 * buffer.c: Include <verify.h>.
16513 (struct sortvec.priority, struct sortstr.priority):
16514 Now EMACS_INT, not int.
16515 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
16516 (struct sortstr.size, record_overlay_string)
16517 (struct sortstrlist.size, struct sortlist.used):
16518 Don't truncate size to int.
16519 (record_overlay_string): Check for size-calculation overflow.
16520 (init_buffer_once): Check at compile-time, not run-time.
16521
16522 2011-06-22 Jim Meyering <meyering@redhat.com>
16523
16524 Don't leak an XBM-image-sized buffer
16525 * image.c (xbm_load): Free the image buffer after using it.
16526
16527 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
16528
16529 Port to Sun C.
16530 * composite.c (find_automatic_composition): Omit needless 'return 0;'
16531 that Sun C diagnosed.
16532 * fns.c (secure_hash): Fix pointer signedness issue.
16533 * intervals.c (static_offset_intervals): New function.
16534 (offset_intervals): Use it.
16535
16536 2011-06-21 Leo Liu <sdl.web@gmail.com>
16537
16538 * deps.mk (fns.o):
16539 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
16540 sha512.h.
16541
16542 * fns.c (secure_hash): Rename from crypto_hash_function and change
16543 the first arg to accept symbols.
16544 (Fsecure_hash): New primitive.
16545 (syms_of_fns): New symbols.
16546
16547 2011-06-20 Deniz Dogan <deniz@dogan.se>
16548
16549 * process.c (Fset_process_buffer): Clarify return value in
16550 docstring.
16551
16552 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
16553
16554 * dispnew.c (add_window_display_history): Use BVAR.
16555
16556 * xdisp.c (debug_method_add): Use BVAR.
16557 (check_window_end, dump_glyph_matrix, dump_glyph)
16558 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
16559
16560 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
16561 Likewise.
16562
16563 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
16564 check till after the cache is created in init_frame_faces.
16565
16566 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
16567
16568 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
16569
16570 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
16571
16572 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
16573 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
16574 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
16575
16576 Improve buffer-overflow checking (Bug#8873).
16577 * fileio.c (Finsert_file_contents):
16578 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
16579 Remove the old (too-loose) buffer overflow checks.
16580 They weren't needed, since make_gap checks for buffer overflow.
16581 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
16582 The old code merely checked for Emacs fixnum overflow, and relied
16583 on undefined (wraparound) behavior. The new code avoids undefined
16584 behavior, and also checks for ptrdiff_t and/or size_t overflow.
16585
16586 * editfns.c (Finsert_char): Don't dump core with very negative counts.
16587 Tune. Don't use wider integers than needed. Don't use alloca.
16588 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
16589
16590 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
16591
16592 * insdel.c, lisp.h (buffer_overflow): New function.
16593 (insert_from_buffer_1, replace_range, replace_range_2):
16594 * insdel.c (make_gap_larger):
16595 * editfns.c (Finsert_char):
16596 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
16597
16598 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
16599
16600 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
16601
16602 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
16603
16604 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
16605 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
16606
16607 * fileio.c: Don't assume EMACS_INT fits in off_t.
16608 (emacs_lseek): New static function.
16609 (Finsert_file_contents, Fwrite_region): Use it.
16610 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
16611
16612 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
16613
16614 * fns.c: Don't overflow int when computing a list length.
16615 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
16616 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
16617 truncation on 64-bit hosts. Check for QUIT every
16618 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
16619 faster and is responsive enough.
16620 (Flength): Report an error instead of overflowing an integer.
16621 (Fsafe_length): Return a float if the value is not representable
16622 as a fixnum. This shouldn't happen except in contrived situations.
16623 (Fnthcdr, Fsort): Don't assume list length fits in int.
16624 (Fcopy_sequence): Don't assume vector length fits in int.
16625
16626 * alloc.c: Check that resized vectors' lengths fit in fixnums.
16627 (header_size, word_size): New constants.
16628 (allocate_vectorlike): Don't check size overflow here.
16629 (allocate_vector): Check it here instead, since this is the only
16630 caller of allocate_vectorlike that could cause overflow.
16631 Check that the new vector's length is representable as a fixnum.
16632
16633 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
16634 The previous code was bogus. For example, next_almost_prime (32)
16635 returned 39, which is undesirable as it is a multiple of 3; and
16636 next_almost_prime (24) returned 25, which is a multiple of 5 so
16637 why was the code bothering to check for multiples of 7?
16638
16639 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
16640
16641 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
16642
16643 Variadic C functions now count arguments with ptrdiff_t.
16644 This partly undoes my 2011-03-30 change, which replaced int with size_t.
16645 Back then I didn't know that the Emacs coding style prefers signed int.
16646 Also, in the meantime I found a few more instances where arguments
16647 were being counted with int, which may truncate counts on 64-bit
16648 machines, or EMACS_INT, which may be unnecessarily wide.
16649 * lisp.h (struct Lisp_Subr.function.aMANY)
16650 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
16651 Arg counts are now ptrdiff_t, not size_t.
16652 All variadic functions and their callers changed accordingly.
16653 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
16654 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
16655 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
16656 * callint.c (Fcall_interactively): Check arg count for overflow,
16657 to avoid potential buffer overrun. Use signed char, not 'int',
16658 for 'varies' array, so that we needn't bother to check its size
16659 calculation for overflow.
16660 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
16661 * eval.c (apply_lambda):
16662 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
16663 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
16664 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
16665
16666 * callint.c (Fcall_interactively): Don't use index var as event count.
16667
16668 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
16669 * mem-limits.h (SIZE): Remove; no longer used.
16670
16671 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
16672
16673 Remove unnecessary casts.
16674 * xterm.c (x_term_init):
16675 * xfns.c (x_set_border_pixel):
16676 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
16677 These aren't needed now that we assume ANSI C.
16678
16679 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
16680 It's more likely to cause problems (due to unsigned overflow)
16681 than to cure them.
16682
16683 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
16684
16685 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
16686
16687 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
16688
16689 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
16690
16691 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
16692
16693 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
16694
16695 GLYPH_CODE_FACE returns EMACS_INT, not int.
16696 * dispextern.h (merge_faces):
16697 * xfaces.c (merge_faces):
16698 * xdisp.c (get_next_display_element, next_element_from_display_vector):
16699 Don't assume EMACS_INT fits in int.
16700
16701 * character.h (CHAR_VALID_P): Remove unused parameter.
16702 * fontset.c, lisp.h, xdisp.c: All uses changed.
16703
16704 * editfns.c (Ftranslate_region_internal): Omit redundant test.
16705
16706 * fns.c (concat): Minor tuning based on overflow analysis.
16707 This doesn't fix any bugs. Use int to hold character, instead
16708 of constantly refetching from Emacs object. Use XFASTINT, not
16709 XINT, for value known to be a character. Don't bother comparing
16710 a single byte to 0400, as it's always less.
16711
16712 * floatfns.c (Fexpt):
16713 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
16714
16715 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
16716 for characters.
16717
16718 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
16719
16720 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
16721 Without this fix, on a 64-bit host (aset S 0 4294967386) would
16722 incorrectly succeed when S was a string, because 4294967386 was
16723 truncated before it was used.
16724
16725 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
16726 Otherwise, an out-of-range integer could cause undefined behavior
16727 on a 64-bit host.
16728
16729 * composite.c: Use int, not EMACS_INT, for characters.
16730 (fill_gstring_body, composition_compute_stop_pos): Use int, not
16731 EMACS_INT, for values that are known to be in character range.
16732 This doesn't fix any bugs but is the usual style inside Emacs and
16733 may generate better code on 32-bit machines.
16734
16735 Make sure a 64-bit char is never passed to ENCODE_CHAR.
16736 This is for reasons similar to the recent CHAR_STRING fix.
16737 * charset.c (Fencode_char): Check that character arg is actually
16738 a character. Pass an int to ENCODE_CHAR.
16739 * charset.h (ENCODE_CHAR): Verify that the character argument is no
16740 wider than 'int', as a compile-time check to prevent future regressions
16741 in this area.
16742
16743 * character.c (char_string): Remove unnecessary casts.
16744
16745 Make sure a 64-bit char is never passed to CHAR_STRING.
16746 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
16747 by silently ignoring the top 32 bits, allowing some values
16748 that were far too large to be valid characters.
16749 * character.h: Include <verify.h>.
16750 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
16751 arguments are no wider than unsigned, as a compile-time check
16752 to prevent future regressions in this area.
16753 * data.c (Faset):
16754 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
16755 (Fsubst_char_in_region):
16756 * fns.c (concat):
16757 * xdisp.c (decode_mode_spec_coding):
16758 Adjust to CHAR_STRING's new requirement.
16759 * editfns.c (Finsert_char, Fsubst_char_in_region):
16760 * fns.c (concat): Check that character args are actually
16761 characters. Without this test, these functions did the wrong
16762 thing with wildly out-of-range values on 64-bit hosts.
16763
16764 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
16765 These casts should not be needed on 32-bit hosts, either.
16766 * keyboard.c (read_char):
16767 * lread.c (Fload): Remove casts to unsigned.
16768
16769 * lisp.h (UNSIGNED_CMP): New macro.
16770 This fixes comparison bugs on 64-bit hosts.
16771 (ASCII_CHAR_P): Use it.
16772 * casefiddle.c (casify_object):
16773 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
16774 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
16775 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
16776 * dispextern.h (FACE_FROM_ID):
16777 * keyboard.c (read_char): Use UNSIGNED_CMP.
16778
16779 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
16780 not to EMACS_INT, to avoid GCC warning.
16781
16782 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
16783
16784 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
16785 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
16786 isn't needed on 32-bit machines.
16787
16788 * buffer.c (Fgenerate_new_buffer_name):
16789 Use EMACS_INT for count, not int.
16790 (advance_to_char_boundary): Return EMACS_INT, not int.
16791
16792 * data.c (Qcompiled_function): Now static.
16793
16794 * window.c (window_body_lines): Now static.
16795
16796 * image.c (gif_load): Rename local to avoid shadowing.
16797
16798 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
16799 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
16800 * alloc.c (make_save_value): Integer argument is now of type
16801 ptrdiff_t, not int.
16802 (mark_object): Use ptrdiff_t, not int.
16803 * lisp.h (pD): New macro.
16804 * print.c (print_object): Use it.
16805
16806 * alloc.c: Use EMACS_INT, not int, to count objects.
16807 (total_conses, total_markers, total_symbols, total_vector_size)
16808 (total_free_conses, total_free_markers, total_free_symbols)
16809 (total_free_floats, total_floats, total_free_intervals)
16810 (total_intervals, total_strings, total_free_strings):
16811 Now EMACS_INT, not int. All uses changed.
16812 (Fgarbage_collect): Compute overall total using a double, so that
16813 integer overflow is less likely to be a problem. Check for overflow
16814 when converting back to an integer.
16815 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
16816 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
16817 These were 'int' variables that could overflow on 64-bit hosts;
16818 they were never used, so remove them instead of repairing them.
16819 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
16820 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
16821 Previously, this ceilinged at INT_MAX, but that doesn't work on
16822 64-bit machines.
16823 (allocate_pseudovector): Don't use EMACS_INT when int would do.
16824
16825 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
16826 (allocate_vectorlike): Check for ptrdiff_t overflow.
16827 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
16828 when a (possibly-narrower) signed value would do just as well.
16829 We prefer using signed arithmetic, to avoid comparison confusion.
16830
16831 * alloc.c: Catch some string size overflows that we were missing.
16832 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
16833 for convenience in STRING_BYTES_MAX.
16834 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
16835 The definition here is exact; the one in lisp.h was approximate.
16836 (allocate_string_data): Check for string overflow. This catches
16837 some instances we weren't catching before. Also, it catches
16838 size_t overflow on (unusual) hosts where SIZE_MAX <= min
16839 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
16840 and ptrdiff_t and EMACS_INT are both 64 bits.
16841
16842 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
16843 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
16844 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
16845
16846 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
16847
16848 * alloc.c (Fmake_string): Check for out-of-range init.
16849
16850 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
16851
16852 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
16853
16854 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
16855
16856 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
16857 xg_get_default_scrollbar_width.
16858
16859 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
16860 (int_gtk_range_get_value): Move to the scroll bar part of the file.
16861 (style_changed_cb): Call update_theme_scrollbar_width and call
16862 x_set_scroll_bar_default_width and xg_frame_set_char_size for
16863 all frames (Bug#8505).
16864 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
16865 Call gtk_window_set_resizable if HAVE_GTK3.
16866 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
16867 and height if HAVE_GTK3 (Bug#8505).
16868 (scroll_bar_width_for_theme): New variable.
16869 (update_theme_scrollbar_width): New function.
16870 (xg_get_default_scrollbar_width): Move code to
16871 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
16872 (xg_initialize): Call update_theme_scrollbar_width.
16873
16874 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
16875
16876 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
16877
16878 2011-06-12 Martin Rudalics <rudalics@gmx.at>
16879
16880 * frame.c (make_frame): Call other_buffer_safely instead of
16881 other_buffer.
16882
16883 * window.c (temp_output_buffer_show): Call display_buffer with
16884 second argument Vtemp_buffer_show_specifiers and reset latter
16885 immediately after the call.
16886 (Vtemp_buffer_show_specifiers): New variable.
16887 (auto_window_vscroll_p, next_screen_context_lines)
16888 (Vscroll_preserve_screen_position): Remove leading asterisks from
16889 doc-strings.
16890
16891 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
16892
16893 Fix minor problems found by GCC 4.6.0 static checking.
16894 * buffer.c (Qclone_number): Remove for now, as it's unused.
16895 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
16896 (record_buffer): Remove unused local.
16897 * frame.c (other_visible_frames, frame_buffer_list): Now static.
16898 (set_frame_buffer_list): Remove; unused.
16899 * frame.h (other_visible_frames): Remove decl.
16900 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
16901 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
16902 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
16903 if HAVE_GPM.
16904 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
16905 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
16906 Define only if HAVE_GPM.
16907 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
16908 (update_hints_inhibit): Remove; never set. All uses removed.
16909 * widgetprv.h (emacsFrameClassRec): Remove decl.
16910 * window.c (delete_deletable_window): Now returns void, since it
16911 wasn't returning anything.
16912 (compare_window_configurations): Remove unused locals.
16913 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
16914 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
16915 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
16916 the same widths as pointers. This follows up on the 2011-05-06 patch.
16917 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
16918 * xterm.h: Likewise.
16919 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
16920
16921 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
16922
16923 * makefile.w32-in: Update dependencies.
16924 (LISP_H): Add lib/intprops.h.
16925
16926 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
16927
16928 * image.c (gif_load): Add animation frame delay to the metadata.
16929 (syms_of_image): Use DEFSYM. New symbol `delay'.
16930
16931 2011-06-11 Martin Rudalics <rudalics@gmx.at>
16932
16933 * window.c (delete_deletable_window): Re-add.
16934 (Fset_window_configuration): Rewrite to handle dead buffers and
16935 consequently deletable windows.
16936 (window_tree, Fwindow_tree): Remove. Supply functionality in
16937 window.el.
16938 (compare_window_configurations): Simplify code.
16939
16940 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
16941
16942 * image.c (imagemagick_load_image): Fix type mismatch.
16943 (Fimagemagick_types): Likewise.
16944
16945 * window.h (replace_buffer_in_windows): Declare.
16946
16947 2011-06-11 Martin Rudalics <rudalics@gmx.at>
16948
16949 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
16950 Qclone_number. Remove external declaration of Qdelete_window.
16951 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
16952 code.
16953 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
16954 Run Qbuffer_list_update_hook if allowed.
16955 (Fother_buffer): Rewrite doc-string. Major rewrite for new
16956 buffer list implementation.
16957 (other_buffer_safely): New function.
16958 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
16959 calls to replace_buffer_in_windows and
16960 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
16961 if allowed.
16962 (record_buffer): Inhibit quitting and rewrite using quittable
16963 functions. Run Qbuffer_list_update_hook if allowed.
16964 (Frecord_buffer, Funrecord_buffer): New functions.
16965 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
16966 Move switch-to-buffer to window.el.
16967 (bury-buffer): Move to window.el.
16968 (Vbuffer_list_update_hook): New variable.
16969
16970 * lisp.h (other_buffer_safely): Add prototype in buffer.c
16971 section.
16972
16973 * window.h (resize_frame_windows): Move up in code.
16974 (Fwindow_frame): Remove EXFUN.
16975 (replace_buffer_in_all_windows): Remove prototype.
16976 (replace_buffer_in_windows_safely): Add prototype.
16977
16978 * window.c: Declare Qdelete_window static again. Move down
16979 declaration of select_count.
16980 (Fnext_window, Fprevious_window): Rewrite doc-strings.
16981 (Fother_window): Move to window.el.
16982 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
16983 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
16984 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
16985 window.el.
16986 (replace_buffer_in_windows): Implement by calling
16987 Qreplace_buffer_in_windows.
16988 (replace_buffer_in_all_windows): Remove with some functionality
16989 moved into replace_buffer_in_windows_safely.
16990 (replace_buffer_in_windows_safely): New function.
16991 (select_window_norecord, select_frame_norecord): Move in front
16992 of run_window_configuration_change_hook. Remove now obsolete
16993 declarations.
16994 (Fset_window_buffer): Rewrite doc-string.
16995 Call Qrecord_window_buffer.
16996 (keys_of_window): Move binding for other-window to window.el.
16997
16998 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
16999
17000 * dispextern.h (struct image): Replace data member, whose int_val
17001 and ptr_val fields were not used by anything, with a single
17002 lisp_val object.
17003
17004 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
17005 (gif_clear_image, gif_load, imagemagick_load_image)
17006 (gs_clear_image, gs_load): Callers changed.
17007
17008 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
17009
17010 * buffer.h: Include <time.h>, for time_t.
17011 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
17012
17013 Fix minor problems found by static checking.
17014
17015 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
17016
17017 Make identifiers static if they are not used in other modules.
17018 * data.c (Qcompiled_function, Qframe, Qvector):
17019 * image.c (QimageMagick, Qsvg):
17020 * minibuf.c (Qmetadata):
17021 * window.c (resize_window_check, resize_root_window): Now static.
17022 * window.h (resize_window_check, resize_root_window): Remove decls.
17023
17024 * window.c (window_deletion_count, delete_deletable_window):
17025 Remove; unused.
17026 (window_body_lines): Now static.
17027 (Fdelete_other_windows_internal): Mark vars as initialized.
17028 Make sure 'resize_failed' is initialized.
17029 (run_window_configuration_change_hook): Rename local to avoid shadowing.
17030 (resize_window_apply): Remove unused local.
17031 * window.h (delete_deletable_window): Remove decl.
17032
17033 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
17034 (imagemagick_load_image): Fix pointer signedness problem by changing
17035 last arg from unsigned char * to char *. All uses changed.
17036 Also, fix a local for similar reasons.
17037 Remove unused locals. Remove locals to avoid shadowing.
17038 (fn_rsvg_handle_free): Remove; unused.
17039 (svg_load, svg_load_image): Fix pointer signedness problem.
17040 (imagemagick_load_image): Don't use garbage pointer image_wand.
17041
17042 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
17043
17044 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
17045
17046 * image.c (gif_load): Fix omitted cast error introduced by
17047 2011-06-06 change.
17048
17049 2011-06-10 Martin Rudalics <rudalics@gmx.at>
17050
17051 * window.h (resize_proportionally, orig_total_lines)
17052 (orig_top_line): Remove from window structure.
17053 (set_window_height, set_window_width, change_window_heights)
17054 (Fdelete_window): Remove prototypes.
17055 (resize_frame_windows): Remove duplicate declaration.
17056
17057 2011-06-10 Eli Zaretskii <eliz@gnu.org>
17058
17059 * window.h (resize_frame_windows, resize_window_check)
17060 (delete_deletable_window, resize_root_window)
17061 (resize_frame_windows): Declare prototypes.
17062
17063 * window.c (resize_window_apply): Make definition be "static" to
17064 match the prototype.
17065
17066 2011-06-10 Martin Rudalics <rudalics@gmx.at>
17067
17068 * window.c: Remove declarations of Qwindow_size_fixed,
17069 window_min_size_1, window_min_size_2, window_min_size,
17070 size_window, window_fixed_size_p, enlarge_window, delete_window.
17071 Remove static from declaration of Qdelete_window, it's
17072 temporarily needed by Fbury_buffer.
17073 (replace_window): Don't assign orig_top_line and
17074 orig_total_lines.
17075 (Fdelete_window, delete_window): Remove. Window deletion is
17076 handled by window.el.
17077 (window_loop): Remove DELETE_OTHER_WINDOWS case.
17078 Replace Fdelete_window calls with calls to Qdelete_window.
17079 (Fdelete_other_windows): Remove. Deleting other windows is
17080 handled by window.el.
17081 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
17082 handled in window.el.
17083 (window_min_size_2, window_min_size_1, window_min_size): Remove.
17084 Window minimum sizes are handled in window.el.
17085 (shrink_windows, size_window, set_window_height)
17086 (set_window_width, change_window_heights, window_height)
17087 (window_width, CURBEG, CURSIZE, enlarge_window)
17088 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
17089 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
17090 handled in window.el.
17091 (make_dummy_parent): Rename to make_parent_window and give it a
17092 second argument horflag.
17093 (make_window): Don't set resize_proportionally any more.
17094 (Fsplit_window): Remove. Windows are split in window.el.
17095 (save_restore_action, save_restore_orig_size)
17096 (shrink_window_lowest_first, save_restore_orig_size): Remove.
17097 Resize mini windows in window.el.
17098 (grow_mini_window, shrink_mini_window): Implement by calling
17099 Qresize_root_window_vertically, resize_window_check and
17100 resize_window_apply.
17101 (saved_window, Fset_window_configuration, save_window_save):
17102 Do not handle orig_top_line, orig_total_lines, and
17103 resize_proportionally.
17104 (window_min_height, window_min_width): Move to window.el.
17105 (keys_of_window): Move bindings for delete-other-windows,
17106 split-window, delete-window and enlarge-window to window.el.
17107
17108 * buffer.c: Temporarily extern Qdelete_window.
17109 (Fbury_buffer): Temporarily call Qdelete_window instead of
17110 Fdelete_window (Fbury_buffer will move to window.el soon).
17111
17112 * frame.c (set_menu_bar_lines_1): Remove code handling
17113 orig_top_line and orig_total_lines.
17114
17115 * dispnew.c (adjust_frame_glyphs_initially): Don't use
17116 set_window_height but set heights directly.
17117 (change_frame_size_1): Use resize_frame_windows.
17118
17119 * xdisp.c (init_xdisp): Don't use set_window_height but set
17120 heights directly.
17121
17122 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
17123 Use resize_frame_windows instead of change_window_heights and run
17124 run_window_configuration_change_hook.
17125
17126 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
17127 instead of change_window_heights and run
17128 run_window_configuration_change_hook.
17129
17130 2011-06-09 Martin Rudalics <rudalics@gmx.at>
17131
17132 * window.c (replace_window): Rename second argument REPLACEMENT to
17133 NEW. New third argument SETFLAG. Rewrite.
17134 (delete_window, make_dummy_parent): Call replace_window with
17135 third argument 1.
17136 (window_list_1): Move down in code.
17137 (run_window_configuration_change_hook): Move set_buffer part
17138 before select_frame_norecord part in order to unwind correctly.
17139 Rename count1 to count.
17140 (recombine_windows, delete_deletable_window, resize_root_window)
17141 (Fdelete_other_windows_internal)
17142 (Frun_window_configuration_change_hook, make_parent_window)
17143 (resize_window_check, resize_window_apply, Fresize_window_apply)
17144 (resize_frame_windows, Fsplit_window_internal)
17145 (Fdelete_window_internal, Fresize_mini_window_internal):
17146 New functions.
17147 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
17148
17149 2011-06-08 Martin Rudalics <rudalics@gmx.at>
17150
17151 * window.h (window): Add some new members to window structure -
17152 normal_lines, normal_cols, new_total, new_normal, clone_number,
17153 splits, nest, prev_buffers, next_buffers.
17154 (WINDOW_TOTAL_SIZE): Move here from window.c.
17155 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
17156
17157 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
17158 Remove.
17159 (make_dummy_parent): Set new members of windows structure.
17160 (make_window): Move down in code. Handle new members of window
17161 structure.
17162 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
17163 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
17164 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
17165 (Fset_window_prev_buffers, Fwindow_next_buffers)
17166 (Fset_window_next_buffers, Fset_window_clone_number):
17167 New functions.
17168 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
17169 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
17170 Doc-string fixes.
17171 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
17172 Argument WINDOW can be now internal window too.
17173 (Fwindow_use_time): Move up in code.
17174 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
17175 Rewrite doc-string.
17176 (Fset_window_configuration, saved_window)
17177 (Fcurrent_window_configuration, save_window_save): Handle new
17178 members of window structure.
17179 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
17180 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
17181 (syms_of_window): New Lisp objects Qrecord_window_buffer,
17182 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
17183 Qget_mru_window, Qresize_root_window,
17184 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
17185 Qauto_buffer_name; staticpro them.
17186
17187 2011-06-07 Martin Rudalics <rudalics@gmx.at>
17188
17189 * window.c (Fwindow_total_size, Fwindow_left_column)
17190 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
17191 (Fwindow_list_1): New functions.
17192 (window_box_text_cols): Replace with window_body_cols.
17193 (Fwindow_width, Fscroll_left, Fscroll_right):
17194 Use window_body_cols instead of window_box_text_cols.
17195 (delete_window, Fset_window_configuration):
17196 Call delete_all_subwindows with window as argument.
17197 (delete_all_subwindows): Take a window as argument and not a
17198 structure. Rewrite.
17199 (window_loop): Remove handling of GET_LRU_WINDOW and
17200 GET_LARGEST_WINDOW.
17201 (Fget_lru_window, Fget_largest_window): Move to window.el.
17202
17203 * window.h: Extern window_body_cols instead of
17204 window_box_text_cols. delete_all_subwindows now takes a
17205 Lisp_Object as argument.
17206
17207 * indent.c (compute_motion, Fcompute_motion):
17208 Use window_body_cols instead of window_box_text_cols.
17209
17210 * frame.c (delete_frame): Call delete_all_subwindows with root
17211 window as argument.
17212
17213 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
17214
17215 * fns.c (Fputhash): Document return value.
17216
17217 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
17218
17219 * image.c (gif_load): Implement gif89a spec "no disposal" method.
17220
17221 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
17222
17223 Cons<->int and similar integer overflow fixes (Bug#8794).
17224
17225 Check for overflow when converting integer to cons and back.
17226 * charset.c (Fdefine_charset_internal, Fdecode_char):
17227 Use cons_to_unsigned to catch overflow.
17228 (Fencode_char): Use INTEGER_TO_CONS.
17229 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
17230 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
17231 * data.c (long_to_cons, cons_to_long): Remove.
17232 (cons_to_unsigned, cons_to_signed): New functions.
17233 These signal an error for invalid or out-of-range values.
17234 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
17235 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
17236 * font.c (Ffont_variation_glyphs):
17237 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
17238 * lisp.h: Include <intprops.h>.
17239 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
17240 (cons_to_signed, cons_to_unsigned): New decls.
17241 (long_to_cons, cons_to_long): Remove decls.
17242 * undo.c (record_first_change): Use INTEGER_TO_CONS.
17243 (Fprimitive_undo): Use CONS_TO_INTEGER.
17244 * xfns.c (Fx_window_property): Likewise.
17245 * xselect.c: Include <limits.h>.
17246 (x_own_selection, selection_data_to_lisp_data):
17247 Use INTEGER_TO_CONS.
17248 (x_handle_selection_request, x_handle_selection_clear)
17249 (x_get_foreign_selection, Fx_disown_selection_internal)
17250 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
17251 (lisp_data_to_selection_data): Use cons_to_unsigned.
17252 (x_fill_property_data): Use cons_to_signed.
17253 Report values out of range.
17254
17255 Check for buffer and string overflow more precisely.
17256 * buffer.h (BUF_BYTES_MAX): New macro.
17257 * lisp.h (STRING_BYTES_MAX): New macro.
17258 * alloc.c (Fmake_string):
17259 * character.c (string_escape_byte8):
17260 * coding.c (coding_alloc_by_realloc):
17261 * doprnt.c (doprnt):
17262 * editfns.c (Fformat):
17263 * eval.c (verror):
17264 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
17265 since they may not be the same number.
17266 * editfns.c (Finsert_char):
17267 * fileio.c (Finsert_file_contents):
17268 Likewise for BUF_BYTES_MAX.
17269
17270 * image.c: Use ptrdiff_t, not int, for sizes.
17271 (slurp_file): Switch from int to ptrdiff_t.
17272 All uses changed.
17273 (slurp_file): Check that file size fits in both size_t (for
17274 malloc) and ptrdiff_t (for sanity and safety).
17275
17276 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
17277 if b->modtime has its maximal value.
17278
17279 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
17280
17281 Don't assume time_t can fit into int.
17282 * buffer.h (struct buffer.modtime): Now time_t, not int.
17283 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
17284 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
17285
17286 Minor fixes for signed vs unsigned integers.
17287 * character.h (MAYBE_UNIFY_CHAR):
17288 * charset.c (maybe_unify_char):
17289 * keyboard.c (read_char, reorder_modifiers):
17290 XINT -> XFASTINT, since the integer must be nonnegative.
17291 * ftfont.c (ftfont_spec_pattern):
17292 * keymap.c (access_keymap, silly_event_symbol_error):
17293 XUINT -> XFASTINT, since the integer must be nonnegative.
17294 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
17295 since it makes no difference and we prefer signed.
17296 * keyboard.c (record_char): Use XUINT when all the neighbors do.
17297 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
17298 nonnegative.
17299
17300 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
17301
17302 * window.h (Fwindow_frame): Declare.
17303
17304 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
17305
17306 * alloc.c: Simplify handling of large-request failures (Bug#8800).
17307 (SPARE_MEMORY): Always define.
17308 (LARGE_REQUEST): Remove.
17309 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
17310
17311 2011-06-06 Martin Rudalics <rudalics@gmx.at>
17312
17313 * lisp.h: Move EXFUNS for Fframe_root_window,
17314 Fframe_first_window and Fset_frame_selected_window to window.h.
17315
17316 * window.h: Move EXFUNS for Fframe_root_window,
17317 Fframe_first_window and Fset_frame_selected_window here from
17318 lisp.h.
17319
17320 * frame.c (Fwindow_frame, Fframe_first_window)
17321 (Fframe_root_window, Fframe_selected_window)
17322 (Fset_frame_selected_window): Move to window.c.
17323 (Factive_minibuffer_window): Move to minibuf.c.
17324 (Fother_visible_frames_p): New function.
17325
17326 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
17327
17328 * window.c (decode_window, decode_any_window): Move up in code.
17329 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
17330 (inhibit_frame_unsplittable): Remove unused variable.
17331 (Fwindow_buffer): Move up and rewrite doc-string.
17332 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
17333 (Fwindow_prev): New functions.
17334 (Fwindow_frame): Move here from frame.c. Accept any window as
17335 argument.
17336 (Fframe_root_window, Fframe_first_window)
17337 (Fframe_selected_window): Move here from frame.c. Accept frame
17338 or arbitrary window as argument. Update doc-strings.
17339 (Fminibuffer_window): Move up in code.
17340 (Fwindow_minibuffer_p): Move up in code and simplify.
17341 (Fset_frame_selected_window): Move here from frame.c.
17342 Marginal rewrite.
17343 (Fselected_window, select_window, Fselect_window): Move up in
17344 code. Minor doc-string fixes.
17345
17346 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
17347
17348 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
17349 Do not assume that spare memory exists; that assumption is valid
17350 only if SYSTEM_MALLOC.
17351 (LARGE_REQUEST): New macro, so that the issue of large requests
17352 is separated from the issue of spare memory.
17353
17354 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
17355
17356 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
17357 format. (Bug#8806)
17358
17359 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
17360
17361 * xfns.c (x_set_scroll_bar_default_width): Move declarations
17362 before statements.
17363
17364 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
17365
17366 * gtkutil.c (xg_get_default_scrollbar_width): New function.
17367
17368 * gtkutil.h: Declare xg_get_default_scrollbar_width.
17369
17370 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
17371 min width by calling x_set_scroll_bar_default_width (Bug#8505).
17372
17373 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
17374
17375 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
17376
17377 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
17378
17379 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
17380 (x_clipboard_manager_save): Add return value.
17381 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
17382 New error handlers.
17383 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
17384 Obey Vx_select_enable_clipboard_manager. Catch errors in
17385 x_clipboard_manager_save (Bug#8779).
17386 (Vx_select_enable_clipboard_manager): New variable.
17387 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
17388
17389 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
17390
17391 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
17392
17393 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17394
17395 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
17396 in the current matrix if keep_current_p is non-zero.
17397
17398 2011-06-04 Eli Zaretskii <eliz@gnu.org>
17399
17400 * bidi.c (bidi_level_of_next_char): Fix last change.
17401
17402 2011-06-03 Eli Zaretskii <eliz@gnu.org>
17403
17404 Support bidi reordering of text covered by display properties.
17405
17406 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
17407 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
17408 (bidi_cache_search, bidi_cache_iterator_state)
17409 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
17410 (bidi_level_of_next_char, bidi_move_to_visually_next):
17411 Support character positions inside a run of characters covered by a
17412 display string.
17413 (bidi_paragraph_init, bidi_resolve_explicit_1)
17414 (bidi_level_of_next_char): Call bidi_fetch_char and
17415 bidi_fetch_char_advance instead of FETCH_CHAR and
17416 FETCH_CHAR_ADVANCE.
17417 (bidi_init_it): Initialize new members.
17418 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
17419 definitions.
17420 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
17421 instead of using explicit *_CHAR codes.
17422 (bidi_resolve_explicit, bidi_resolve_weak):
17423 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
17424 bidirectional text is supported only in multibyte buffers.
17425 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
17426 it to initialize the frame_window_p member of struct bidi_it.
17427 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
17428 (bidi_resolve_explicit, bidi_resolve_weak)
17429 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
17430 bidi_it->nchars is non-positive.
17431 (bidi_level_of_next_char): Don't try to lookup the cache for the
17432 next/previous character if nothing is cached there yet, or if we
17433 were just reseat()'ed to a new position.
17434
17435 * xdisp.c (set_cursor_from_row): Set start and stop points
17436 according to the row's direction when priming the loop that looks
17437 for the glyph on which to display cursor.
17438 (single_display_spec_intangible_p): Function deleted.
17439 (display_prop_intangible_p): Reimplement to call
17440 handle_display_spec instead of single_display_spec_intangible_p.
17441 Accept 3 additional arguments needed by handle_display_spec.
17442 This fixes incorrect cursor motion across display property with complex
17443 values: lists, `(when COND...)' forms, etc.
17444 (single_display_spec_string_p): Support property values that are
17445 lists with the argument STRING its top-level element.
17446 (display_prop_string_p): Fix the condition for processing a
17447 property that is a list to be consistent with handle_display_spec.
17448 (handle_display_spec): New function, refactored from the
17449 last portion of handle_display_prop.
17450 (compute_display_string_pos): Accept additional argument
17451 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
17452 value of a `display' property is a "replacing spec".
17453 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
17454 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
17455 the display property, but just return a value indicating whether
17456 the display property will replace the characters it covers.
17457 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
17458 frame_window_p members of struct bidi_it.
17459 (compute_display_string_pos, compute_display_string_end):
17460 New functions.
17461 (push_it): Accept second argument POSITION, where pop_it should
17462 jump to continue iteration.
17463 (reseat_1): Initialize bidi_it.disp_pos.
17464
17465 * keyboard.c (adjust_point_for_property): Adjust the call to
17466 display_prop_intangible_p to its new signature.
17467
17468 * dispextern.h (struct bidi_it): New member frame_window_p.
17469 (bidi_init_it): Update prototypes.
17470 (display_prop_intangible_p): Update prototype.
17471 (compute_display_string_pos, compute_display_string_end):
17472 Declare prototypes.
17473 (struct bidi_it): New members nchars and disp_pos. ch_len is now
17474 EMACS_INT.
17475
17476 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
17477
17478 Malloc failure behavior now depends on size of allocation.
17479 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
17480 * lisp.h: Change signatures accordingly.
17481 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
17482 All callers changed. (Bug#8762)
17483
17484 * gnutls.c: Use Emacs's memory allocators.
17485 Without this change, the gnutls library would invoke malloc etc.
17486 directly, which causes problems on non-SYNC_INPUT hosts, and which
17487 runs afoul of improving memory_full behavior. (Bug#8761)
17488 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
17489 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
17490 xfree instead of the default malloc, realloc, free.
17491 (Fgnutls_boot): No need to check for memory allocation failure,
17492 since xmalloc does that for us.
17493
17494 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
17495 * category.c (hash_get_category_set):
17496 * ccl.c (ccl_driver):
17497 * charset.c (Fdefine_charset_internal):
17498 * charset.h (struct charset.hash_index):
17499 * composite.c (get_composition_id, gstring_lookup_cache)
17500 (composition_gstring_put_cache):
17501 * composite.h (struct composition.hash_index):
17502 * dispextern.h (struct image.hash):
17503 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
17504 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
17505 (hashfn_equal, hashfn_user_defined, make_hash_table)
17506 (maybe_resize_hash_table, hash_lookup, hash_put)
17507 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
17508 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
17509 (Fsxhash, Fgethash, Fputhash, Fmaphash):
17510 * image.c (make_image, search_image_cache, lookup_image)
17511 (xpm_put_color_table_h):
17512 * lisp.h (struct Lisp_Hash_Table):
17513 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
17514 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
17515 for hashes and hash indexes, instead of 'unsigned' and 'int'.
17516 * alloc.c (allocate_vectorlike):
17517 Check for overflow in vector size calculations.
17518 * ccl.c (ccl_driver):
17519 Check for overflow when converting EMACS_INT to int.
17520 * fns.c, image.c: Remove unnecessary static decls that would otherwise
17521 need to be updated by these changes.
17522 * fns.c (make_hash_table, maybe_resize_hash_table):
17523 Check for integer overflow with large hash tables.
17524 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
17525 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
17526 (SXHASH_REDUCE): New macro.
17527 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
17528 Use it instead of discarding useful hash info with large hash values.
17529 (sxhash_float): New function.
17530 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
17531 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
17532 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
17533 Rewrite to use FIXNUM_BITS, as this simplifies things.
17534 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
17535 Adjust signatures to match updated version of code.
17536 (consing_since_gc): Now EMACS_INT, since a single hash table can
17537 use more than INT_MAX bytes.
17538
17539 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
17540
17541 Make it possible to build with GCC-4.6+ -O2 -flto.
17542
17543 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
17544
17545 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
17546
17547 * minibuf.c (get_minibuffer, read_minibuf_unwind):
17548 Call minibuffer-inactive-mode.
17549
17550 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
17551
17552 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
17553 Update dependencies.
17554
17555 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17556
17557 * data.c (init_data): Remove code for UTS, this system is not
17558 supported anymore.
17559
17560 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17561
17562 Don't force ./temacs to start in terminal mode.
17563
17564 * frame.c (make_initial_frame): Initialize faces in all cases, not
17565 only when CANNOT_DUMP is defined.
17566 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
17567
17568 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17569
17570 * dispnew.c (add_window_display_history): Use const for the string
17571 pointer. Remove declaration, not needed.
17572
17573 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
17574
17575 Use 'inline', not 'INLINE'.
17576 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
17577 * alloc.c, fontset.c (INLINE): Remove.
17578 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
17579 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
17580 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
17581 * gmalloc.c (register_heapinfo): Use inline unconditionally.
17582 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
17583
17584 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17585
17586 Make it possible to run ./temacs.
17587
17588 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
17589 syms_of_callproc does the same thing. Remove test for
17590 "initialized", do it in the caller.
17591 * emacs.c (main): Avoid calling set_initial_environment when dumping.
17592
17593 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
17594
17595 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
17596 (read_minibuf): Use get_minibuffer.
17597 (syms_of_minibuf): Use DEFSYM.
17598 (Qmetadata): New var.
17599 * data.c (Qbuffer): Don't make it static.
17600 (syms_of_data): Use DEFSYM.
17601
17602 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
17603
17604 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
17605 (CCL_CODE_MIN): New macro.
17606
17607 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
17608
17609 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
17610
17611 * eval.c (Qdebug): Now static.
17612 * lisp.h (Qdebug): Remove decl. This reverts a part of the
17613 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
17614 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
17615
17616 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
17617
17618 * image.c: Various fixes to ImageMagick code comments.
17619 (Fimagemagick_types): Doc fix.
17620
17621 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
17622
17623 Minor fixes prompted by GCC 4.6.0 warnings.
17624
17625 * xselect.c (converted_selections, conversion_fail_tag): Now static.
17626
17627 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
17628 (x_clipboard_manager_save_all): Move extern decl to ...
17629 * xterm.h: ... here, so that it can be checked for consistency.
17630
17631 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
17632
17633 * xselect.c (x_clipboard_manager_save_frame)
17634 (x_clipboard_manager_save_all): New functions.
17635 (Fx_clipboard_manager_save): Lisp function deleted.
17636
17637 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
17638 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
17639
17640 * xterm.h: Update prototype.
17641
17642 2011-05-28 William Xu <william.xwl@gmail.com>
17643
17644 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
17645 exiting (Bug#8239).
17646
17647 2011-05-28 Jim Meyering <meyering@redhat.com>
17648
17649 Avoid a sign-extension bug in crypto_hash_function.
17650 * fns.c (to_uchar): Define.
17651 (crypto_hash_function): Use it to convert some newly-signed
17652 variables to unsigned, to avoid sign-extension bugs. For example,
17653 without this change, (md5 "truc") would evaluate to
17654 45723a2aff78ff4fff7fff1114760e62 rather than the expected
17655 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
17656 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
17657
17658 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17659
17660 Integer overflow fixes.
17661
17662 * dbusbind.c: Serial number integer overflow fixes.
17663 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
17664 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
17665 to hold a serial number that is too large for a fixnum.
17666 (Fdbus_method_return_internal, Fdbus_method_error_internal):
17667 Check for serial numbers out of range. Decode any serial number
17668 that was so large that it became a float. (Bug#8722)
17669
17670 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
17671 (Fdbus_call_method, Fdbus_call_method_asynchronously):
17672 Use XFASTINT rather than XUINT when numbers are nonnegative.
17673 (xd_append_arg, Fdbus_method_return_internal):
17674 (Fdbus_method_error_internal): Likewise. Also, for unsigned
17675 arguments, check that Lisp number is nonnegative, rather than
17676 silently wrapping negative numbers around. (Bug#8722)
17677 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
17678 (Bug#8722)
17679
17680 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
17681
17682 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
17683
17684 ccl: Add integer overflow checks.
17685 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
17686 (IN_INT_RANGE): New macros.
17687 (ccl_driver): Use them to check for integer overflow when
17688 decoding a CCL program. Many of the new checks are whether XINT (x)
17689 fits in int; it doesn't always, on 64-bit hosts. The new version
17690 doesn't catch all possible integer overflows, but it's an
17691 improvement. (Bug#8719)
17692
17693 * alloc.c (make_event_array): Use XINT, not XUINT.
17694 There's no need for unsigned here.
17695
17696 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
17697 This follows up to the 2011-05-06 change that substituted uintptr_t
17698 for EMACS_INT. This case wasn't caught back then.
17699
17700 Rework Fformat to avoid integer overflow issues.
17701 * editfns.c: Include <float.h> unconditionally, as it's everywhere
17702 now (part of C89). Include <verify.h>.
17703 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
17704 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
17705 (Fformat): Avoid the prepass trying to compute sizes; it was only
17706 approximate and thus did not catch overflow reliably. Instead, walk
17707 through the format just once, formatting and computing sizes as we go,
17708 checking for integer overflow at every step, and allocating a larger
17709 buffer as needed. Keep track separately whether the format is
17710 multibyte. Keep only the most-recently calculated precision, rather
17711 than them all. Record whether each argument has been converted to
17712 string. Use EMACS_INT, not int, for byte and char and arg counts.
17713 Support field widths and precisions larger than INT_MAX. Avoid
17714 sprintf's undefined behavior with conversion specifications such as %#d
17715 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
17716 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
17717 formatting out-of-range floating point numbers with int
17718 formats. (Bug#8668)
17719
17720 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
17721
17722 * data.c: Avoid integer truncation in expressions involving floats.
17723 * data.c: Include <intprops.h>.
17724 (arith_driver): When there's an integer overflow in an expression
17725 involving floating point, convert the integers to floating point
17726 so that the resulting value does not suffer from catastrophic
17727 integer truncation. For example, on a 64-bit host (* 4
17728 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
17729 Do not rely on undefined behavior after integer overflow.
17730
17731 merge count_size_as_multibyte, parse_str_to_multibyte
17732 * character.c, character.h (count_size_as_multibyte):
17733 Rename from parse_str_to_multibyte; all uses changed.
17734 Check for integer overflow.
17735 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
17736 since it's now a duplicate of the other. This is more of
17737 a character than a buffer op, so better that it's in character.c.
17738 * fns.c, print.c: Adjust to above changes.
17739
17740 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
17741
17742 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
17743
17744 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17745
17746 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17747 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
17748 (x_clipboard_manager_save): Now static.
17749 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
17750
17751 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17752 (crypto_hash_function): Now static.
17753 Fix pointer signedness problems. Avoid unnecessary initializations.
17754
17755 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
17756
17757 * termhooks.h (Vselection_alist): Make it terminal-local.
17758
17759 * terminal.c (create_terminal): Initialize it.
17760
17761 * xselect.c: Support for clipboard managers.
17762 (Vselection_alist): Move to termhooks.h as terminal-local var.
17763 (LOCAL_SELECTION): New macro.
17764 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
17765 (symbol_to_x_atom): Remove gratuitous arg.
17766 (x_handle_selection_request, lisp_data_to_selection_data)
17767 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
17768 (x_own_selection, x_get_local_selection, x_convert_selection):
17769 New arg, specifying work frame. Use terminal-local Vselection_alist.
17770 (some_frame_on_display): Delete unused function.
17771 (Fx_own_selection_internal, Fx_get_selection_internal)
17772 (Fx_disown_selection_internal, Fx_selection_owner_p)
17773 (Fx_selection_exists_p): New optional frame arg.
17774 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
17775 (x_handle_selection_clear): Don't treat other terminals with the
17776 same keyboard specially. Use the terminal-local Vselection_alist.
17777 (x_clear_frame_selections): Use Frun_hook_with_args.
17778
17779 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
17780
17781 * xterm.h: Add support for those atoms.
17782
17783 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
17784
17785 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
17786 (converted_selections, conversion_fail_tag): New global variables.
17787 (x_selection_request_lisp_error): Free the above.
17788 (x_get_local_selection): Remove unnecessary code.
17789 (x_reply_selection_request): Args changed; handle arbitrary array
17790 of converted selections stored in converted_selections.
17791 Separate the XChangeProperty and SelectionNotify steps.
17792 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
17793 (x_convert_selection): New function.
17794 (x_handle_selection_event): Simplify.
17795 (x_get_foreign_selection): Don't ignore incoming requests while
17796 waiting for an answer; this will fail when we implement
17797 SAVE_TARGETS, and seems unnecessary anyway.
17798 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
17799 (Vx_sent_selection_functions): Doc fix.
17800
17801 2011-05-26 Leo Liu <sdl.web@gmail.com>
17802
17803 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
17804
17805 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17806
17807 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
17808
17809 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
17810 for fringe update if it has periodic bitmap.
17811 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
17812 and fringe_bitmap_periodic_p.
17813
17814 * fringe.c (get_fringe_bitmap_data): New function.
17815 (draw_fringe_bitmap_1, update_window_fringes): Use it.
17816 (update_window_fringes): Record periodicity of fringe bitmap in glyph
17817 row. Mark glyph row for fringe update if periodicity changed.
17818
17819 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
17820 for fringe update unless it has periodic bitmap.
17821
17822 2011-05-25 Kenichi Handa <handa@m17n.org>
17823
17824 * xdisp.c (get_next_display_element): Set correct it->face_id for
17825 a static composition.
17826
17827 2011-05-24 Leo Liu <sdl.web@gmail.com>
17828
17829 * deps.mk (fns.o):
17830 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
17831
17832 * fns.c (crypto_hash_function, Fsha1): New function.
17833 (Fmd5): Use crypto_hash_function.
17834 (syms_of_fns): Add Ssha1.
17835
17836 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17837
17838 * gnutls.c: Remove unused macros.
17839 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
17840 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
17841 Remove macros that are defined and never used.
17842 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
17843
17844 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
17845
17846 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
17847 (Fx_get_selection_internal): Minor cleanup.
17848 (Fx_own_selection_internal): Rename arguments for consistency with
17849 select.el.
17850
17851 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17852
17853 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
17854
17855 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
17856
17857 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
17858
17859 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17860
17861 * dispnew.c (scrolling_window): Don't exclude the case that the
17862 last enabled row in the desired matrix touches the bottom boundary.
17863
17864 2011-05-21 Glenn Morris <rgm@gnu.org>
17865
17866 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
17867 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
17868 and add some more files.
17869
17870 2011-05-20 Eli Zaretskii <eliz@gnu.org>
17871
17872 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
17873 report_file_error introduced by the change from 2011-05-07.
17874
17875 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
17876
17877 * systime.h (Time): Define only if emacs is defined.
17878 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
17879 where the include path doesn't have X11/X.h by default. See
17880 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
17881
17882 2011-05-20 Kenichi Handa <handa@m17n.org>
17883
17884 * composite.c (find_automatic_composition): Fix previous change.
17885
17886 2011-05-20 Glenn Morris <rgm@gnu.org>
17887
17888 * lisp.mk: New file, split from Makefile.in.
17889 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
17890 (shortlisp): Remove.
17891 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
17892
17893 2011-05-19 Glenn Morris <rgm@gnu.org>
17894
17895 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
17896 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
17897 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
17898 (lisp): Set the order to that of loadup.el.
17899 (shortlisp): Make it a copy of $lisp.
17900 (SOME_MACHINE_LISP): Remove.
17901 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
17902 Use just $shortlisp, not $SOME_MACHINE_LISP too.
17903
17904 2011-05-18 Kenichi Handa <handa@m17n.org>
17905
17906 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
17907 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
17908 (find_automatic_composition): Mostly rewrite for efficiency.
17909
17910 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
17911
17912 * makefile.w32-in: Update dependencies.
17913
17914 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
17915
17916 * menu.c: Include limits.h (fixes the MS-Windows build broken by
17917 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
17918
17919 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
17920
17921 Fix some integer overflow issues, such as string length overflow.
17922
17923 * insdel.c (count_size_as_multibyte): Check for string overflow.
17924
17925 * character.c (lisp_string_width): Check for string overflow.
17926 Use EMACS_INT, not int, for string indexes and lengths; in
17927 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
17928 the resulting string length overflows an EMACS_INT; instead,
17929 report a string overflow if no precision given. When checking for
17930 precision exhaustion, use a check that cannot possibly have
17931 integer overflow. (Bug#8675)
17932 * character.h (lisp_string_width): Adjust to new signature.
17933
17934 * alloc.c (string_overflow): New function.
17935 (Fmake_string): Use it. This doesn't change behavior, but saves
17936 a few bytes and will simplify future changes.
17937 * character.c (string_escape_byte8): Likewise.
17938 * lisp.h (string_overflow): New decl.
17939
17940 Fixups, following up to the user-interface timestamp change.
17941 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
17942 for UI timestamps, instead of unsigned long.
17943 * msdos.c (mouse_get_pos): Likewise.
17944 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
17945 * w32gui.h (Time): Define by including "systime.h" rather than by
17946 declaring it ourselves. (Bug#8664)
17947
17948 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
17949 * image.c (clear_image_cache): Likewise.
17950
17951 * term.c (term_mouse_position): Don't assume time_t wraparound.
17952
17953 Be more systematic about user-interface timestamps.
17954 Before, the code sometimes used 'Time', sometimes 'unsigned long',
17955 and sometimes 'EMACS_UINT', to represent these timestamps.
17956 This change causes it to use 'Time' uniformly, as that's what X uses.
17957 This makes the code easier to follow, and makes it easier to catch
17958 integer overflow bugs such as Bug#8664.
17959 * frame.c (Fmouse_position, Fmouse_pixel_position):
17960 Use Time, not unsigned long, for user-interface timestamps.
17961 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
17962 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
17963 * keyboard.h (last_event_timestamp): Likewise.
17964 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
17965 * menu.h (xmenu_show): Likewise.
17966 * term.c (term_mouse_position): Likewise.
17967 * termhooks.h (struct input_event.timestamp): Likewise.
17968 (struct terminal.mouse_position_hook): Likewise.
17969 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
17970 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
17971 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
17972 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
17973 what it was before.
17974 * menu.h, termhooks.h: Include "systime.h", for Time.
17975
17976 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
17977 Don't assume that the difference between two unsigned long values
17978 can fit into an integer. At this point, we know button_down_time
17979 <= event->timestamp, so the difference must be nonnegative, so
17980 there's no need to cast the result if double-click-time is
17981 nonnegative, as it should be; check that it's nonnegative, just in
17982 case. This bug is triggered when events are more than 2**31 ms
17983 apart (about 25 days). (Bug#8664)
17984
17985 * xselect.c (last_event_timestamp): Remove duplicate decl.
17986 (x_own_selection): Remove needless cast to unsigned long.
17987
17988 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
17989 that always fit in int. Use a sentinel instead of a counter, to
17990 avoid a temp and to allay GCC's concerns about possible int overflow.
17991 * frame.h (struct frame): Use int for menu_bar_items_used
17992 instead of EMACS_INT, since it always fits in int.
17993
17994 * menu.c (grow_menu_items): Check for int overflow.
17995
17996 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
17997
17998 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
17999 Before, the code was not consistent. These values cannot exceed
18000 2**31 - 1 so there's no need to make them unsigned.
18001 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
18002 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
18003 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
18004 as modifiers.
18005 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
18006
18007 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
18008 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
18009 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
18010 presumably because the widths might not match.
18011
18012 * window.c (size_window): Avoid needless test at loop start.
18013
18014 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
18015
18016 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
18017
18018 2011-05-12 Drew Adams <drew.adams@oracle.com>
18019
18020 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
18021
18022 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
18023
18024 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
18025 `width' to `bar_area_x' and `bar_area_width', respectively.
18026 (x_scroll_run): Take account of fringe background extension.
18027
18028 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
18029 Rename local vars `left' and `width' to `bar_area_x' and
18030 `bar_area_width', respectively.
18031 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
18032 background extension.
18033
18034 2011-05-10 Jim Meyering <meyering@redhat.com>
18035
18036 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
18037
18038 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
18039
18040 * image.c (Finit_image_library): Return t for built-in image types,
18041 like pbm and xbm. (Bug#8640)
18042
18043 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
18044
18045 * w32menu.c (set_frame_menubar): Fix submenu allocation.
18046
18047 2011-05-07 Eli Zaretskii <eliz@gnu.org>
18048
18049 * w32console.c (Fset_screen_color): Doc fix.
18050 (Fget_screen_color): New function.
18051 (syms_of_ntterm): Defsubr it.
18052
18053 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
18054 unlink the temporary file if Fcall_process didn't create it in the
18055 first place.
18056 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
18057 child process will be redirected to a file specified with `:file'.
18058 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
18059 cue to call_process_cleanup not to close that handle.
18060
18061 2011-05-07 Ben Key <bkey76@gmail.com>
18062
18063 * makefile.w32-in: The bootstrap-temacs rule now makes use of
18064 one of two shell specific rules, either bootstrap-temacs-CMD or
18065 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
18066 to the previous implementation of the bootstrap-temacs rule.
18067 The bootstrap-temacs-CMD rule is similar to the previous
18068 implementation of the bootstrap-temacs rule except that it
18069 makes use of the ESC_CFLAGS variable instead of the CFLAGS
18070 variable.
18071
18072 These changes, along with some changes to nt/configure.bat,
18073 nt/gmake.defs, and nt/nmake.defs, are required to extend my
18074 earlier fix to add support for --cflags and --ldflags options
18075 that include quotes so that it works whether make uses cmd or
18076 sh as the shell.
18077
18078 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
18079
18080 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
18081 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
18082 is a constant.
18083 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
18084 a string. Handle both cases.
18085 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
18086 (Fdbus_register_method): Use Qinvalid_function.
18087
18088 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
18089
18090 * makefile.w32-in: Update dependencies.
18091 (LISP_H): Add inttypes.h and stdin.h.
18092 (PROCESS_H): Add unistd.h.
18093
18094 2011-05-06 Eli Zaretskii <eliz@gnu.org>
18095
18096 * lread.c: Include limits.h (fixes the MS-Windows build broken by
18097 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
18098
18099 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
18100
18101 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
18102
18103 * term.c (vfatal): Remove stray call to va_end.
18104 It's not needed and the C Standard doesn't allow it here anyway.
18105
18106 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
18107 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
18108
18109 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
18110 bytes.
18111
18112 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
18113
18114 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
18115
18116 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
18117
18118 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
18119
18120 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
18121
18122 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
18123 * charset.c (Fdefine_charset_internal): Don't initialize
18124 charset.code_space[15]. The value was garbage, on hosts with
18125 32-bit int (Bug#8600).
18126
18127 * lread.c (read_integer): Be more consistent with string-to-number.
18128 Use string_to_number to do the actual conversion; this avoids
18129 rounding errors and fixes some other screwups. Without this fix,
18130 for example, #x1fffffffffffffff was misread as -2305843009213693952.
18131 (digit_to_number): Move earlier, for benefit of read_integer.
18132 Return -1 if the digit is out of range for the base, -2 if it is
18133 not a digit in any supported base. (Bug#8602)
18134
18135 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
18136
18137 * dispnew.c (scrolling_window): Return 1 if we scrolled,
18138 to match comment at start of function. This also removes a
18139 GCC warning about overflow in a 32+64-bit port.
18140
18141 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
18142
18143 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
18144 Reported by Stefan Monnier in
18145 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
18146 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
18147 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
18148
18149 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
18150 (EMACS_UINTPTR): Likewise, with uintptr_t.
18151
18152 * lisp.h: Prefer 64-bit EMACS_INT if available.
18153 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
18154 on 32-bit hosts that have 64-bit int, so that they can access
18155 large files.
18156 However, temporarily disable this change unless the temporary
18157 symbol WIDE_EMACS_INT is defined.
18158
18159 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
18160
18161 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
18162 This removes an assumption that EMACS_INT and long are the same
18163 width as pointers. The assumption is true for Emacs porting targets
18164 now, but we want to make other targets possible.
18165 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
18166 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
18167 In the rest of the code, change types of integers that hold casted
18168 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
18169 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
18170 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
18171 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
18172 No need to cast type when ORing.
18173 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
18174 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
18175 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
18176 assume EMACS_INT is the same width as char *.
18177 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
18178 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
18179 Remove no-longer-needed casts.
18180 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
18181 (xg_tool_bar_help_callback, xg_make_tool_item):
18182 Use EMACS_INTPTR to hold an integer
18183 that will be cast to void *; this can avoid a GCC warning
18184 if EMACS_INT is not the same width as void *.
18185 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
18186 * xdisp.c (display_echo_area_1, resize_mini_window_1):
18187 (current_message_1, set_message_1):
18188 Use a local to convert to proper width without a cast.
18189 * xmenu.c (dialog_selection_callback): Likewise.
18190
18191 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
18192 Also, don't assume VALBITS / RAND_BITS is less than 5,
18193 and don't rely on undefined behavior when shifting a 1 left into
18194 the sign bit.
18195 * lisp.h (get_random): Change signature to match.
18196
18197 * lread.c (hash_string): Use size_t, not int, for hash computation.
18198 Normally we prefer signed values; but hashing is special, because
18199 it's better to use unsigned division on hash table sizes so that
18200 the remainder is nonnegative. Also, size_t is the natural width
18201 for hashing into memory. The previous code used 'int', which doesn't
18202 retain enough info to hash well into very large tables.
18203 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
18204
18205 * dbusbind.c: Don't possibly lose pointer info when converting.
18206 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
18207 Use XPNTR rather than XHASH, so that the high-order bits of
18208 the pointer aren't lost when converting through void *.
18209
18210 * eval.c (Fautoload): Don't double-shift a pointer.
18211
18212 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
18213
18214 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
18215
18216 * gnutls.c (DEF_GNUTLS_FN):
18217 * image.c (DEF_IMGLIB_FN): Make function pointers static.
18218
18219 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
18220
18221 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
18222 marker. (Bug#8610)
18223
18224 2011-05-05 Eli Zaretskii <eliz@gnu.org>
18225
18226 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
18227 New version that can reserve upto 2GB of heap space.
18228
18229 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
18230
18231 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
18232
18233 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
18234
18235 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
18236 `gnutls_certificate_set_x509_key_file'.
18237
18238 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
18239
18240 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
18241 Update dependencies.
18242
18243 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
18244
18245 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
18246 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
18247 Remove unused parameter `fildes'.
18248 * process.c (read_process_output, send_process): Don't pass it.
18249
18250 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
18251
18252 Fix previous change: the library cache is defined in w32.c.
18253 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
18254 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
18255
18256 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
18257
18258 Implement dynamic loading of GnuTLS on Windows.
18259
18260 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
18261 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
18262 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
18263 Declare.
18264
18265 * gnutls.c (Qgnutls_dll): Define.
18266 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
18267 (gnutls_*): Declare function pointers.
18268 (init_gnutls_functions): New function to initialize function pointers.
18269 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
18270 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
18271 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
18272 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
18273 (emacs_gnutls_write, emacs_gnutls_read)
18274 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
18275 (Fgnutls_available_p): New function.
18276 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
18277 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
18278 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
18279
18280 * image.c: Include w32.h.
18281 (Vimage_type_cache): Delete.
18282 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
18283 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
18284 (w32_delayed_load): Move to w32.c.
18285
18286 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
18287
18288 * w32.c (QCloaded_from, Vlibrary_cache): Define.
18289 (w32_delayed_load): Move from image.c. When loading a library, record
18290 its filename in the :loaded-from property of the library id.
18291 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
18292 Initialize and staticpro them.
18293 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
18294
18295 * process.c: Include lisp.h before w32.h, not after.
18296 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
18297 instead of gnutls_record_check_pending.
18298
18299 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
18300
18301 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
18302
18303 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
18304 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
18305 as passed in.
18306
18307 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
18308
18309 * xterm.c (x_set_frame_alpha): Do not set property on anything
18310 else than FRAME_X_OUTER_WINDOW (Bug#8608).
18311
18312 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
18313
18314 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
18315
18316 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
18317
18318 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
18319 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
18320 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
18321 (gnutls_global_initialized, Qgnutls_bootprop_priority)
18322 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
18323 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
18324 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
18325 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
18326 (Qgnutls_bootprop_callbacks_verify): Make static.
18327
18328 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
18329
18330 * callproc.c: Indentation fixup.
18331
18332 * sysdep.c (wait_for_termination_1): Make static.
18333 (wait_for_termination, interruptible_wait_for_termination):
18334 Move after wait_for_termination_1.
18335
18336 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
18337
18338 * sysdep.c (interruptible_wait_for_termination): New function
18339 which is like wait_for_termination, but allows keyboard
18340 interruptions.
18341
18342 * callproc.c (Fcall_process): Add (:file "file") as an option for
18343 the STDOUT buffer.
18344 (Fcall_process_region): Ditto.
18345
18346 2011-04-30 Eli Zaretskii <eliz@gnu.org>
18347
18348 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
18349 rather than `XVECTOR (FOO)->size'.
18350
18351 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
18352 inttypes.h, as a gnulib replacement is used if it not available in
18353 system headers.
18354
18355 2011-04-21 Eli Zaretskii <eliz@gnu.org>
18356
18357 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
18358 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
18359 of MOST_POSITIVE_FIXNUM. (Bug#8528)
18360
18361 * coding.c (coding_alloc_by_realloc): Error out if destination
18362 will grow beyond MOST_POSITIVE_FIXNUM.
18363 (decode_coding_emacs_mule): Abort if there isn't enough place in
18364 charbuf for the composition carryover bytes. Reserve an extra
18365 space for up to 2 characters produced in a loop.
18366 (decode_coding_iso_2022): Abort if there isn't enough place in
18367 charbuf for the composition carryover bytes.
18368
18369 2011-04-21 Eli Zaretskii <eliz@gnu.org>
18370
18371 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
18372 aborting when %lld or %lll format is passed.
18373 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
18374 %llo or %llx format is passed. (Bug#8545)
18375
18376 * window.c (window_scroll_line_based): Use a marker instead of
18377 simple variables to record original value of point. (Bug#7952)
18378
18379 * doprnt.c (doprnt): Fix the case where a multibyte sequence
18380 produced by %s or %c overflows available buffer space. (Bug#8545)
18381
18382 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
18383
18384 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
18385 (SIZE_MAX): Move defn after all includes, as they might #define it.
18386
18387 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
18388
18389 * w32.c (init_environment): Warn about defaulting HOME to C:\.
18390
18391 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
18392
18393 * keyboard.c (Qdelayed_warnings_hook): Define.
18394 (command_loop_1): Run `delayed-warnings-hook'
18395 if Vdelayed_warnings_list is non-nil.
18396 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
18397 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
18398
18399 2011-04-28 Eli Zaretskii <eliz@gnu.org>
18400
18401 * doprnt.c (doprnt): Don't return value smaller than the buffer
18402 size if the message was truncated. (Bug#8545).
18403
18404 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
18405
18406 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
18407 (Fx_window_property): #if-0 the whole functions, not just the bodies.
18408
18409 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
18410
18411 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
18412
18413 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
18414
18415 * makefile.w32-in: Update dependencies.
18416
18417 2011-04-27 Eli Zaretskii <eliz@gnu.org>
18418
18419 Improve `doprnt' and its usage. (Bug#8545)
18420 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
18421 `format_end'. Remove support for %l as a conversion specifier.
18422 Don't use xrealloc. Improve diagnostics when the %l size modifier
18423 is used. Update the commentary.
18424
18425 * eval.c (verror): Simplify calculation of size_t.
18426
18427 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
18428 messages.
18429
18430 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
18431
18432 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
18433 change.
18434
18435 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
18436
18437 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
18438 This makes this file independent of the recent pseudovector change.
18439
18440 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
18441
18442 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
18443
18444 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
18445 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
18446 Remove unused local.
18447 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
18448
18449 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
18450 GCC 4.6.0 optimizes based on type-based alias analysis.
18451 For example, if b is of type struct buffer * and v of type struct
18452 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
18453 != &v->size, and therefore "v->size = 1; b->size = 2; return
18454 v->size;" must therefore return 1. This assumption is incorrect
18455 for Emacs, since it type-puns struct Lisp_Vector * with many other
18456 types. To fix this problem, this patch adds a new type struct
18457 vectorlike_header that documents the constraints on layout of vectors
18458 and pseudovectors, and helps optimizing compilers not get fooled
18459 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
18460 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
18461 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
18462 the size member.
18463 (XSETPVECTYPE): Rewrite in terms of new macro.
18464 (XSETPVECTYPESIZE): New macro, specifying both type and size.
18465 This is a bit clearer, and further avoids the possibility of
18466 undesirable aliasing.
18467 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
18468 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
18469 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
18470 since Lisp_Subr is a special case (no "next" field).
18471 (ASIZE): Now uses header.size rather than size.
18472 All previous uses of XVECTOR (foo)->size replaced to use this macro,
18473 to avoid the hassle of writing XVECTOR (foo)->header.size.
18474 (struct vectorlike_header): New type.
18475 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
18476 object, to help avoid aliasing.
18477 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
18478 (SUBRP): Likewise, since Lisp_Subr is a special case.
18479 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
18480 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
18481 (struct Lisp_Hash_Table): Combine first two members into a single
18482 struct vectorlike_header member. All uses of "size" and "next" members
18483 changed to be "header.size" and "header.next".
18484 * buffer.h (struct buffer): Likewise.
18485 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
18486 * frame.h (struct frame): Likewise.
18487 * process.h (struct Lisp_Process): Likewise.
18488 * termhooks.h (struct terminal): Likewise.
18489 * window.c (struct save_window_data, struct saved_window): Likewise.
18490 * window.h (struct window): Likewise.
18491 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
18492 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
18493 * buffer.c (init_buffer_once): Likewise.
18494 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
18495 special case.
18496 * process.c (Fformat_network_address): Use local var for size,
18497 for brevity.
18498
18499 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
18500
18501 Make the Lisp reader and string-to-float more consistent (Bug#8525)
18502 * data.c (atof): Remove decl; no longer used or needed.
18503 (digit_to_number): Move to lread.c.
18504 (Fstring_to_number): Use new string_to_number function, to be
18505 consistent with how the Lisp reader treats infinities and NaNs.
18506 Do not assume that floating-point numbers represent EMACS_INT
18507 without losing information; this is not true on most 64-bit hosts.
18508 Avoid double-rounding errors, by insisting on integers when
18509 parsing non-base-10 numbers, as the documentation specifies.
18510 * lisp.h (string_to_number): New decl, replacing ...
18511 (isfloat_string): Remove.
18512 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
18513 (read1): Do not accept +. and -. as integers; this
18514 appears to have been a coding error. Similarly, do not accept
18515 strings like +-1e0 as floating point numbers. Do not report
18516 overflow for integer overflows unless the base is not 10 which
18517 means we have no simple and reliable way to continue.
18518 Break out the floating-point parsing into a new
18519 function string_to_number, so that Fstring_to_number parses
18520 floating point numbers consistently with the Lisp reader.
18521 (digit_to_number): Move here from data.c. Make it static inline.
18522 (E_CHAR, EXP_INT): Remove, replacing with ...
18523 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
18524 (string_to_number): New function, replacing isfloat_string.
18525 This function checks for valid syntax and produces the resulting
18526 Lisp float number too. Rework it so that string-to-number
18527 no longer mishandles examples like "1.0e+". Use strtoumax,
18528 so that overflow for non-base-10 numbers is reported only when
18529 there's no portable and simple way to convert to floating point.
18530
18531 * textprop.c (set_text_properties_1): Rewrite for clarity,
18532 and to avoid GCC warning about integer overflow.
18533
18534 * intervals.h (struct interval): Use EMACS_INT for members
18535 where EMACS_UINT might cause problems. See
18536 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
18537 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
18538 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
18539 All uses changed.
18540 (offset_intervals): Tell GCC not to worry about length overflow
18541 when negating a negative length.
18542
18543 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
18544 (overrun_check_free): Likewise.
18545
18546 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
18547 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
18548 word size.
18549
18550 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
18551 (gnutls_make_error): Rename local to avoid shadowing.
18552 (gnutls_emacs_global_deinit): ifdef out; not used.
18553 (Fgnutls_boot): Use const for pointer to readonly storage.
18554 Comment out unused local. Fix pointer signedness problems.
18555
18556 * lread.c (openp): Don't stuff size_t into an 'int'.
18557 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
18558 about possible signed overflow.
18559
18560 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
18561 (GDK_KEY_g): Don't define if already defined.
18562 (xg_prepare_tooltip): Avoid pointer signedness problem.
18563 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
18564
18565 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
18566 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
18567
18568 * xfns.c (Fx_window_property): Simplify a bit,
18569 to make a bit faster and to avoid GCC 4.6.0 warning.
18570 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
18571
18572 * fns.c (internal_equal): Don't assume size_t fits in int.
18573
18574 * alloc.c (compact_small_strings): Tighten assertion a little.
18575
18576 Replace pEd with more-general pI, and fix some printf arg casts.
18577 * lisp.h (pI): New macro, generalizing old pEd macro to other
18578 conversion specifiers. For example, use "...%"pI"d..." rather
18579 than "...%"pEd"...".
18580 (pEd): Remove. All uses replaced with similar uses of pI.
18581 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
18582 * alloc.c (check_pure_size): Don't overflow by converting size to int.
18583 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
18584 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
18585 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
18586 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
18587 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
18588 64-bit hosts.
18589 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
18590 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
18591 * print.c (safe_debug_print, print_object): Likewise.
18592 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
18593 to int.
18594 Use pI instead of if-then-else-abort. Use %p to avoid casts,
18595 avoiding the 0 flag, which is not portable.
18596 * process.c (Fmake_network_process): Use pI to avoid cast.
18597 * region-cache.c (pp_cache): Likewise.
18598 * xdisp.c (decode_mode_spec): Likewise.
18599 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
18600 behavior on 64-bit hosts with printf arg.
18601 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
18602 (x_stop_queuing_selection_requests): Likewise.
18603 (x_get_window_property): Don't truncate byte count to an 'int'
18604 when tracing.
18605
18606 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
18607 here, since it parses constructs like leading '-' and spaces,
18608 which are not wanted; and it overflows with large numbers.
18609 Instead, simply match F[0-9]+, which is what is wanted anyway.
18610
18611 * alloc.c: Remove unportable assumptions about struct layout.
18612 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
18613 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
18614 (allocate_vectorlike, make_pure_vector): Use the new macros,
18615 plus offsetof, to remove unportable assumptions about struct layout.
18616 These assumptions hold on all porting targets that I know of, but
18617 they are not guaranteed, they're easy to remove, and removing them
18618 makes further changes easier.
18619
18620 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
18621 This doesn't fix a bug but makes the code clearer.
18622 (string_overrun_cookie): Now const. Use initializers that
18623 don't formally overflow signed char, to avoid warnings.
18624 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
18625 can cause Emacs to crash when string overrun checking is enabled.
18626 (allocate_buffer): Don't assume sizeof (struct buffer) is a
18627 multiple of sizeof (EMACS_INT); it need not be, if
18628 alignof(EMACS_INT) < sizeof (EMACS_INT).
18629 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
18630
18631 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
18632
18633 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
18634
18635 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
18636
18637 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
18638 supposed to be handshaking. (Bug#8556)
18639 Reported by Paul Eggert <eggert@cs.ucla.edu>.
18640
18641 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
18642
18643 * lisp.h (Qdebug): List symbol.
18644 * eval.c (Qdebug): Restore global linkage.
18645 * keyboard.c (debug-on-event): New variable.
18646 (handle_user_signal): Break into debugger when debug-on-event
18647 matches the current signal symbol.
18648
18649 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
18650
18651 * alloc.c (check_sblock, check_string_bytes)
18652 (check_string_free_list): Convert to standard C.
18653
18654 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
18655
18656 * w32.c (emacs_gnutls_push): Fix typo.
18657
18658 2011-04-25 Eli Zaretskii <eliz@gnu.org>
18659
18660 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
18661 "cast to pointer from integer of different size".
18662
18663 Improve doprnt and its use in verror. (Bug#8545)
18664 * doprnt.c (doprnt): Document the set of format control sequences
18665 supported by the function. Use SAFE_ALLOCA instead of always
18666 using `alloca'.
18667
18668 * eval.c (verror): Don't limit the buffer size at size_max-1, that
18669 is one byte too soon. Don't use xrealloc; instead xfree and
18670 xmalloc anew.
18671
18672 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
18673
18674 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
18675 callbacks stage.
18676
18677 * gnutls.c: Renamed global_initialized to
18678 gnutls_global_initialized. Added internals for the
18679 :verify-hostname-error, :verify-error, and :verify-flags
18680 parameters of `gnutls-boot' and documented those parameters in the
18681 docstring. Start callback support.
18682 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
18683 unless a fatal error occurred. Call gnutls_alert_send_appropriate
18684 on error. Return error code.
18685 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
18686 (emacs_gnutls_read): Likewise.
18687 (Fgnutls_boot): Return handshake error code.
18688 (emacs_gnutls_handle_error): New function.
18689 (wsaerror_to_errno): Likewise.
18690
18691 * w32.h (emacs_gnutls_pull): Add prototype.
18692 (emacs_gnutls_push): Likewise.
18693
18694 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
18695 (emacs_gnutls_push): Likewise.
18696
18697 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
18698
18699 * process.c (wait_reading_process_output): Check if GnuTLS
18700 buffered some data internally if no FDs are set for TLS
18701 connections.
18702
18703 * makefile.w32-in (OBJ2): Add gnutls.$(O).
18704 (LIBS): Link to USER_LIBS.
18705 ($(BLD)/gnutls.$(0)): New target.
18706
18707 2011-04-24 Eli Zaretskii <eliz@gnu.org>
18708
18709 * xdisp.c (handle_single_display_spec): Rename the
18710 display_replaced_before_p argument into display_replaced_p, to
18711 make it consistent with the commentary. Fix typos in the
18712 commentary.
18713
18714 * textprop.c (syms_of_textprop): Remove dead code.
18715 (copy_text_properties): Delete obsolete commentary about an
18716 interface that was deleted long ago. Fix typos in the description
18717 of arguments.
18718
18719 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
18720 to changes in oldXMenu/XMenu.h from 2011-04-16.
18721 <menu_help_message, prev_menu_help_message>: Constify.
18722 (IT_menu_make_room): menu->help_text is now `const char **';
18723 adjust.
18724
18725 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
18726 to changes in oldXMenu/XMenu.h from 2011-04-16.
18727 (struct XMenu): Declare `help_text' `const char **'.
18728
18729 * xfaces.c <Qunspecified>: Make extern again.
18730
18731 * syntax.c: Include sys/types.h before including regex.h, as
18732 required by POSIX.
18733
18734 * doc.c (get_doc_string): Improve the format passed to `error'.
18735
18736 * doprnt.c (doprnt): Improve commentary.
18737
18738 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
18739
18740 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
18741 them with etags.
18742
18743 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
18744 changes in globals.h immediately force recompilation.
18745 (TAGS): Depend on $(CURDIR)/m/intel386.h and
18746 $(CURDIR)/s/ms-w32.h.
18747 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
18748
18749 * character.c (Fchar_direction): Function deleted.
18750 (syms_of_character): Don't defsubr it.
18751 <char-direction-table>: Deleted.
18752
18753 2011-04-23 Eli Zaretskii <eliz@gnu.org>
18754
18755 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
18756 * doprnt.c: Include limits.h.
18757 (SIZE_MAX): New macro.
18758 (doprnt): Return a size_t value. 2nd arg is now size_t.
18759 Many local variables are now size_t instead of int or unsigned.
18760 Improve overflow protection. Support `l' modifier for integer
18761 conversions. Support %l conversion. Don't assume an EMACS_INT
18762 argument for integer conversions and for %c.
18763
18764 * lisp.h (doprnt): Restore prototype.
18765
18766 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
18767 $(SRC)/character.h.
18768
18769 * Makefile.in (base_obj): Add back doprnt.o.
18770
18771 * deps.mk (doprnt.o): Add back prerequisites.
18772 (callint.o): Depend on character.h.
18773
18774 * eval.c (internal_lisp_condition_case): Include the handler
18775 representation in the error message.
18776 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
18777 when breaking from the loop.
18778
18779 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
18780
18781 * callint.c (Fcall_interactively): When displaying error message
18782 about invalid control letter, pass the character's codepoint, not
18783 a pointer to its multibyte form. Improve display of the character
18784 in octal and display also its hex code.
18785
18786 * character.c (char_string): Use %x to display the (unsigned)
18787 codepoint of an invalid character, to avoid displaying a bogus
18788 negative value.
18789
18790 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
18791 `error', not SYMBOL_NAME itself.
18792
18793 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
18794 character arguments to `error'.
18795
18796 * charset.c (check_iso_charset_parameter): Fix incorrect argument
18797 to `error' in error message about FINAL_CHAR argument. Make sure
18798 FINAL_CHAR is a character, and use %c when it is passed as
18799 argument to `error'.
18800
18801 2011-04-23 Eli Zaretskii <eliz@gnu.org>
18802
18803 * s/ms-w32.h (localtime): Redirect to sys_localtime.
18804
18805 * w32.c: Include <time.h>.
18806 (sys_localtime): New function.
18807
18808 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
18809
18810 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
18811
18812 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
18813
18814 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
18815
18816 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
18817 zombies (Bug#8467).
18818
18819 2011-04-19 Eli Zaretskii <eliz@gnu.org>
18820
18821 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
18822 gl_state.e_property when gl_state.object is Qt.
18823
18824 * insdel.c (make_gap_larger): Remove limitation of buffer size
18825 to <= INT_MAX.
18826
18827 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
18828
18829 * xdisp.c (lookup_glyphless_char_display)
18830 (produce_glyphless_glyph): Handle cons cell entry in
18831 glyphless-char-display.
18832 (Vglyphless_char_display): Document it.
18833
18834 * term.c (produce_glyphless_glyph): Handle cons cell entry in
18835 glyphless-char-display.
18836
18837 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
18838
18839 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
18840
18841 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
18842
18843 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
18844 definition for no-X builds.
18845
18846 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
18847
18848 Static checks with GCC 4.6.0 and non-default toolkits.
18849
18850 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
18851
18852 * process.c (keyboard_bit_set): Define only if SIGIO.
18853 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
18854 (send_process): Repair possible setjmp clobbering.
18855
18856 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
18857
18858 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
18859
18860 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
18861
18862 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
18863 Define only if needed.
18864
18865 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
18866 by pacifying GCC about it. Maybe it's time to retire it?
18867 * xfaces.c (USG, __TIMEVAL__): Likewise.
18868
18869 * dispextern.h (struct redisplay_interface): Rename param
18870 to avoid shadowing.
18871 * termhooks.h (struct terminal): Likewise.
18872 * xterm.c (xembed_send_message): Likewise.
18873
18874 * insdel.c (make_gap_smaller): Define only if
18875 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
18876
18877 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
18878 it.
18879
18880 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
18881 so that we aren't warned about unused symbols.
18882
18883 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
18884
18885 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
18886
18887 * xfns.c (x_real_positions): Mark locals as initialized.
18888
18889 * xmenu.c (xmenu_show): Don't use uninitialized vars.
18890
18891 * xterm.c: Fix problems found by static analysis with other toolkits.
18892 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
18893 (x_dispatch_event): Declare static if USE_GTK, and
18894 define if USE_GTK || USE_X_TOOLKIT.
18895 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
18896 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
18897 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
18898 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
18899
18900 * xmenu.c (menu_help_callback): Pointer type fixes.
18901 Use const pointers when pointing at readonly data. Avoid pointer
18902 signedness clashes.
18903 (FALSE): Remove unused macro.
18904 (update_frame_menubar): Remove unused decl.
18905
18906 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
18907
18908 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
18909 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
18910 (single_menu_item): Rename local to avoid shadowing.
18911
18912 * keyboard.c (make_lispy_event): Remove unused local var.
18913
18914 * frame.c, frame.h (x_get_resource_string): Bring this back, but
18915 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
18916
18917 * bitmaps: Change bitmaps from unsigned char back to the X11
18918 compatible char. Avoid the old compiler warnings about
18919 out-of-range initializers by using, for example, '\xab' rather
18920 than 0xab.
18921
18922 * xgselect.c (xgselect_initialize): Check vs interface
18923 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
18924
18925 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
18926
18927 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
18928 to read-only memory.
18929
18930 * fns.c (vector): Remove; this old hack is no longer needed.
18931
18932 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
18933 Remove unused var.
18934 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
18935
18936 * xrdb.c (x_load_resources): Omit unused local.
18937
18938 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
18939 (x_window): Rename locals to avoid shadowing.
18940 (USG): Use the kludged USG macro, to pacify gcc.
18941
18942 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
18943 (x_term_init): Remove local to avoid shadowing.
18944
18945 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
18946
18947 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
18948 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
18949
18950 2011-04-16 Eli Zaretskii <eliz@gnu.org>
18951
18952 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
18953
18954 Fix regex.c, syntax.c and friends for buffers > 2GB.
18955 * syntax.h (struct gl_state_s): Declare character position members
18956 EMACS_INT.
18957
18958 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
18959
18960 * textprop.c (verify_interval_modification, interval_of):
18961 Declare arguments EMACS_INT.
18962
18963 * intervals.c (adjust_intervals_for_insertion): Declare arguments
18964 EMACS_INT.
18965
18966 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
18967
18968 * indent.c (Fvertical_motion): Local variable it_start is now
18969 EMACS_INT.
18970
18971 * regex.c (re_match, re_match_2, re_match_2_internal)
18972 (bcmp_translate, regcomp, regexec, print_double_string)
18973 (group_in_compile_stack, re_search, re_search_2, regex_compile)
18974 (re_compile_pattern, re_exec): Declare arguments and local
18975 variables `size_t' and `ssize_t' and return values `regoff_t', as
18976 appropriate.
18977 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
18978 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
18979 <compile_stack_type>: `size' and `avail' are now `size_t'.
18980
18981 * regex.h <regoff_t>: Use ssize_t, not int.
18982 (re_search, re_search_2, re_match, re_match_2): Arguments that
18983 specify buffer/string position and length are now ssize_t and
18984 size_t. Return type is regoff_t.
18985
18986 2011-04-16 Ben Key <bkey76@gmail.com>
18987
18988 * nsfont.m: Fixed bugs in ns_get_family and
18989 ns_descriptor_to_entity that were caused by using free to
18990 deallocate memory blocks that were allocated by xmalloc (via
18991 xstrdup). This caused Emacs to crash when compiled with
18992 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
18993 --enable-checking=xmallocoverrun). xfree is now used to
18994 deallocate these memory blocks.
18995
18996 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
18997
18998 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
18999
19000 emacs_write: Accept and return EMACS_INT for sizes.
19001 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
19002 et seq.
19003 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
19004 Accept and return EMACS_INT.
19005 (emacs_gnutls_write): Return the number of bytes written on
19006 partial writes.
19007 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
19008 (emacs_read, emacs_write): Remove check for negative size, as the
19009 Emacs source code has been audited now.
19010 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
19011 (emacs_read, emacs_write): Use it.
19012 * process.c (send_process): Adjust to the new signatures of
19013 emacs_write and emacs_gnutls_write. Do not attempt to store
19014 a byte offset into an 'int'; it might overflow.
19015 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
19016
19017 * sound.c: Don't assume sizes fit in 'int'.
19018 (struct sound_device.period_size, alsa_period_size):
19019 Return EMACS_INT, not int.
19020 (struct sound_device.write, vox_write, alsa_write):
19021 Accept EMACS_INT, not int.
19022 (wav_play, au_play): Use EMACS_INT to store sizes and to
19023 record read return values.
19024
19025 2011-04-15 Ben Key <bkey76@gmail.com>
19026
19027 * keyboard.c (Qundefined): Don't declare static since it is used
19028 in nsfns.m.
19029 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
19030 static since they are used in nsfont.m.
19031
19032 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
19033
19034 * process.c (Qprocessp): Don't declare static.
19035 * lisp.h (Qprocessp): Declare again.
19036
19037 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
19038
19039 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
19040
19041 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
19042
19043 Improve C-level modularity by making more things 'static'.
19044
19045 Don't publish debugger-only interfaces to other modules.
19046 * lisp.h (safe_debug_print, debug_output_compilation_hack):
19047 (verify_bytepos, count_markers): Move decls to the only modules
19048 that need them.
19049 * region-cache.h (pp_cache): Likewise.
19050 * window.h (check_all_windows): Likewise.
19051 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
19052
19053 * sysdep.c (croak): Now static, if
19054 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
19055 * syssignal.h (croak): Declare only if not static.
19056
19057 * alloc.c (refill_memory_reserve): Now static if
19058 !defined REL_ALLOC || defined SYSTEM_MALLOC.
19059 * lisp.h (refill_memory_reserve): Declare only if not static.
19060
19061 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
19062 Define only if USE_LUCID.
19063
19064 * xrdb.c (x_customization_string, x_rm_string): Now static.
19065
19066 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
19067 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
19068
19069 * xdisp.c (draw_row_with_mouse_face): Now static.
19070 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
19071
19072 * window.h (check_all_windows): Mark externally visible.
19073
19074 * window.c (window_deletion_count): Now static.
19075
19076 * undo.c: Make symbols static if they're not exported.
19077 (last_undo_buffer, last_boundary_position, pending_boundary):
19078 Now static.
19079
19080 * textprop.c (interval_insert_behind_hooks): Now static.
19081 (interval_insert_in_front_hooks): Likewise.
19082
19083 * term.c: Make symbols static if they're not exported.
19084 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
19085 (max_frame_lines, tty_set_terminal_modes):
19086 (tty_reset_terminal_modes, tty_turn_off_highlight):
19087 (get_tty_terminal): Now static.
19088 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
19089 * termhooks.h (term_mouse_moveto): Do not declare if
19090 HAVE_WINDOW_SYSTEM.
19091 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
19092 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
19093
19094 * sysdep.c: Make symbols static if they're not exported.
19095 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
19096 Now static.
19097 (sigprocmask_set, full_mask): Remove; unused.
19098 (wait_debugging): Mark as visible.
19099 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
19100 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
19101
19102 * syntax.c (syntax_temp): Define only if !__GNUC__.
19103
19104 * sound.c (current_sound_device, current_sound): Now static.
19105
19106 * search.c (searchbufs, searchbuf_head): Now static.
19107
19108 * scroll.c (scroll_cost): Remove; unused.
19109 * dispextern.h (scroll_cost): Remove decl.
19110
19111 * region-cache.h (pp_cache): Mark as externally visible.
19112
19113 * process.c: Make symbols static if they're not exported.
19114 (process_tick, update_tick, create_process, chan_process):
19115 (Vprocess_alist, proc_buffered_char, datagram_access):
19116 (fd_callback_data, send_process_frame, process_sent_to): Now static.
19117 (deactivate_process): Mark defn as static, as well as decl.
19118 * lisp.h (create_process): Remove decl.
19119 * process.h (chan_process, Vprocess_alist): Remove decls.
19120
19121 * print.c: Make symbols static if they're not exported.
19122 (print_depth, new_backquote_output, being_printed, print_buffer):
19123 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
19124 (print_interval, print_number_index, initial_stderr_stream):
19125 Now static.
19126 * lisp.h (Fprinc): Remove decl.
19127 (debug_output_compilation_hack): Mark as externally visible.
19128
19129 * sysdep.c (croak): Move decl from here to syssignal.h.
19130 * syssignal.h (croak): Put it here, so the API can be checked when
19131 'croak' is called from dissociate_if_controlling_tty.
19132
19133 * minibuf.c: Make symbols static if they're not exported.
19134 (minibuf_save_list, choose_minibuf_frame): Now static.
19135 * lisp.h (choose_minibuf_frame): Remove decl.
19136
19137 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
19138
19139 * lread.c: Make symbols static if they're not exported.
19140 (read_objects, initial_obarray, oblookup_last_bucket_number):
19141 Now static.
19142 (make_symbol): Remove; unused.
19143 * lisp.h (initial_obarray, make_symbol): Remove decls.
19144
19145 * keyboard.c: Make symbols static if they're not exported.
19146 (single_kboard, recent_keys_index, total_keys, recent_keys):
19147 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
19148 (this_single_command_key_start, echoing, last_auto_save):
19149 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
19150 (command_loop, echo_now, keyboard_init_hook, help_char_p):
19151 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
19152 (Vlispy_mouse_stem, double_click_count):
19153 Now static.
19154 (force_auto_save_soon): Define only if SIGDANGER.
19155 (ignore_mouse_drag_p): Now static if
19156 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
19157 (print_help): Remove; unused.
19158 (stop_character, last_timer_event): Mark as externally visible.
19159 * keyboard.h (ignore_mouse_drag_p): Declare only if
19160 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
19161 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
19162 * lisp.h (echoing): Remove decl.
19163 (force_auto_save_soon): Declare only if SIGDANGER.
19164 * xdisp.c (redisplay_window): Simplify code, to make it more
19165 obvious that ignore_mouse_drag_p is not accessed if !defined
19166 USE_GTK && !defined HAVE_NS.
19167
19168 * intervals.c: Make symbols static if they're not exported.
19169 (merge_properties_sticky, merge_interval_right, delete_interval):
19170 Now static.
19171 * intervals.h (merge_interval_right, delete_interval): Remove decls.
19172
19173 * insdel.c: Make symbols static if they're not exported.
19174 However, leave prepare_to_modify_buffer alone. It's never
19175 called from outside this function, but that appears to be a bug.
19176 (combine_after_change_list, combine_after_change_buffer):
19177 (adjust_after_replace, signal_before_change): Now static.
19178 (adjust_after_replace_noundo): Remove; unused.
19179 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
19180 (signal_before_change): Remove decls.
19181
19182 * indent.c (val_compute_motion, val_vmotion): Now static.
19183
19184 * image.c: Make symbols static if they're not exported.
19185 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
19186 if USE_GTK.
19187 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
19188 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
19189
19190 * fringe.c (standard_bitmaps): Now static.
19191 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
19192
19193 * frame.c: Make symbols static if they're not exported.
19194 (x_report_frame_params, make_terminal_frame): Now static.
19195 (get_frame_param): Now static, unless HAVE_NS.
19196 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
19197 (x_get_resource_string): Remove; not used.
19198 * frame.h (make_terminal_frame, x_report_frame_params):
19199 (x_get_resource_string); Remove decls.
19200 (x_fullscreen_adjust): Declare only if WINDOWSNT.
19201 * lisp.h (get_frame_param): Declare only if HAVE_NS.
19202
19203 * font.c, fontset.c: Make symbols static if they're not exported.
19204 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
19205 (FACE_SUITABLE_FOR_CHAR_P): Use it.
19206 * font.c (font_close_object): Now static.
19207 * font.h (font_close_object): Remove.
19208 * fontset.c (FONTSET_OBJLIST): Remove.
19209 (free_realized_fontset) #if-0 the body, which does nothing.
19210 (face_suitable_for_char_p): #if-0, as it's never called.
19211 * fontset.h (face_suitable_for_char_p): Remove decl.
19212 * xfaces.c (face_at_string_position):
19213 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
19214 since 0 is always ASCII.
19215
19216 * fns.c (weak_hash_tables): Now static.
19217
19218 * fileio.c: Make symbols static if they're not exported.
19219 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
19220 (Vwrite_region_annotation_buffers): Now static.
19221
19222 * eval.c: Make symbols static if they're not exported.
19223 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
19224 * lisp.h (backtrace_list): Remove decl.
19225
19226 * emacs.c: Make symbols static if they're not exported.
19227 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
19228 (fatal_error_code, fatal_error_signal_hook, standard_args):
19229 Now static.
19230 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
19231 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
19232 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
19233 * lisp.h (fatal_error_signal_hook): Remove decl.
19234 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
19235
19236 * editfns.c: Move a (normally-unused) function to its only use.
19237 * editfns.c, lisp.h (get_operating_system_release): Remove.
19238 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
19239 worth the hassle of breaking this out.
19240
19241 * xterm.c: Make symbols static if they're not exported.
19242 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
19243 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
19244 (x_destroy_window, x_delete_display):
19245 Now static.
19246 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
19247 (x_mouse_leave): Remove; unused.
19248 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
19249 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
19250 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
19251 Remove decls.
19252 (x_mouse_leave): Declare only if WINDOWSNT.
19253 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
19254 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
19255 USE_X_TOOLKIT.
19256
19257 * ftxfont.c: Make symbols static if they're not exported.
19258 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
19259 HAVE_FREETYPE.
19260 * font.h (ftxfont_driver): Likewise.
19261
19262 * xfns.c: Make symbols static if they're not exported.
19263 (x_last_font_name, x_display_info_for_name):
19264 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
19265 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
19266 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
19267 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
19268 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
19269 (last_show_tip_args): Now static.
19270 (xic_defaut_fontset, xic_create_fontsetname): Define only if
19271 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
19272 (x_screen_planes): Remove; unused.
19273 * dispextern.h (x_screen_planes): Remove decl.
19274
19275 * dispnew.c: Make symbols static if they're not exported.
19276 * dispextern.h (redraw_garbaged_frames, scrolling):
19277 (increment_row_positions): Remove.
19278 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
19279 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
19280 Now static.
19281 (redraw_garbaged_frames): Remove; unused.
19282
19283 * xfaces.c: Make symbols static if they're not exported.
19284 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
19285 Remove decls.
19286 * xterm.h (defined_color): Remove decls.
19287 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
19288 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
19289 (menu_face_changed_default, defined_color, free_realized_face):
19290 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
19291 (ascii_face_of_lisp_face): Remove; unused.
19292
19293 * xdisp.c: Make symbols static if they're not exported.
19294 * dispextern.h (scratch_glyph_row, window_box_edges):
19295 (glyph_to_pixel_coords, set_cursor_from_row):
19296 (get_next_display_element, set_iterator_to_next):
19297 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
19298 (show_mouse_face): Remove decls
19299 * frame.h (message_buf_print): Likewise.
19300 * lisp.h (pop_message, set_message, check_point_in_composition):
19301 Likewise.
19302 * xterm.h (set_vertical_scroll_bar): Likewise.
19303 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
19304 (message_buf_print, scratch_glyph_row, displayed_buffer):
19305 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
19306 (get_next_display_element, show_mouse_face, window_box_edges):
19307 (frame_to_window_pixel_xy, check_point_in_composition):
19308 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
19309 (glyph_to_pixel_coords): Remove; unused.
19310
19311 * dired.c (file_name_completion): Now static.
19312
19313 * dbusbind.c (xd_in_read_queued_messages): Now static.
19314
19315 * lisp.h (circular_list_error, FOREACH): Remove; unused.
19316 * data.c (circular_list_error): Remove.
19317
19318 * commands.h (last_point_position, last_point_position_buffer):
19319 (last_point_position_window): Remove decls.
19320 * keyboard.c: Make these variables static.
19321
19322 * coding.h (coding, code_convert_region, encode_coding_gap):
19323 Remove decls.
19324 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
19325 (iso_code_class, detect_coding, code_convert_region): Now static.
19326 (encode_coding_gap): Remove; unused.
19327
19328 * chartab.c (chartab_chars, chartab_bits): Now static.
19329
19330 * charset.h (charset_iso_8859_1): Remove decl.
19331 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
19332 Now static.
19333
19334 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
19335 * ccl.c (Vccl_program_table): Now static.
19336 (check_ccl_update): Remove; unused.
19337
19338 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
19339 * category.h: ... from here.
19340 * category.c (check_category_table, set_category_set): Now static.
19341
19342 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
19343 * lisp.h: Remove these decls.
19344
19345 * buffer.c (buffer_count): Remove unused var.
19346
19347 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
19348 so that it's not optimized away.
19349 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
19350 * dispextern.h (bidi_dump_cached_states): Remove, since it's
19351 exported only to the debugger.
19352
19353 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
19354 * atimer.h (run_all_atimers): Remove; not exported.
19355
19356 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
19357 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
19358 was inaccessible from Lisp.
19359 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
19360 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
19361
19362 alloc.c: Import and export fewer symbols, and remove unused items.
19363 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
19364 is defined.
19365 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
19366 it's not optimized away by whole-program optimization.
19367 (message_enable_multibyte, free_misc): Remove.
19368 (catchlist, handlerlist, mark_backtrace):
19369 Declare only if BYTE_MARK_STACK.
19370 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
19371 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
19372 (message_enable_multibyte): Remove decl.
19373 (free_misc, interval_free_list, float_block, float_block_index):
19374 (n_float_blocks, float_free_list, cons_block, cons_block_index):
19375 (cons_free_list, last_marked_index):
19376 Now static.
19377 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
19378 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
19379 (mark_backtrace): Define only if BYTE_MARK_STACK.
19380 * xdisp.c (message_enable_multibyte): Now static.
19381
19382 Declare Lisp_Object Q* variables to be 'static' if not exported.
19383 This makes it easier for human readers (and static analyzers)
19384 to see whether these variables are used from other modules.
19385 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
19386 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
19387 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
19388 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
19389 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
19390 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
19391 * xmenu.c, xselect.c:
19392 Declare Q* vars static if they are not used in other modules.
19393 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
19394 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
19395 Remove decls of unexported vars.
19396 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
19397
19398 * lisp.h (DEFINE_FUNC): Make sname 'static'.
19399
19400 Make Emacs functions such as Fatom 'static' by default.
19401 This makes it easier for human readers (and static analyzers)
19402 to see whether these functions can be called from other modules.
19403 DEFUN now defines a static function. To make the function external
19404 so that it can be used in other C modules, use the new macro DEFUE.
19405 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
19406 (Finit_image_library):
19407 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
19408 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
19409 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
19410 Remove decls, since these functions are now static.
19411 (Funintern, Fget_internal_run_time): New decls, since these functions
19412 were already external.
19413
19414 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
19415 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
19416 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
19417 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
19418 * keyboard.c, keymap.c, lread.c:
19419 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
19420 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
19421 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
19422 Mark functions with DEFUE instead of DEFUN,
19423 if they are used in other modules.
19424 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
19425 decls for now-static functions.
19426 * buffer.h (Fdelete_overlay): Remove decl.
19427 * callproc.c (Fgetenv_internal): Mark as internal.
19428 * composite.c (Fremove_list_of_text_properties): Remove decl.
19429 (Fcomposition_get_gstring): New forward static decl.
19430 * composite.h (Fcomposite_get_gstring): Remove decl.
19431 * dired.c (Ffile_attributes): New forward static decl.
19432 * doc.c (Fdocumntation_property): New forward static decl.
19433 * eval.c (Ffetch_bytecode): New forward static decl.
19434 (Funintern): Remove extern decl; now in .h file where it belongs.
19435 * fileio.c (Fmake_symbolic_link): New forward static decl.
19436 * image.c (Finit_image_library): New forward static decl.
19437 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
19438 * intervals.h (Fprevious_property_change):
19439 (Fremove_list_of_text_properties): Remove decls.
19440 * keyboard.c (Fthis_command_keys): Remove decl.
19441 (Fcommand_execute): New forward static decl.
19442 * keymap.c (Flookup_key): New forward static decl.
19443 (Fcopy_keymap): Now static.
19444 * keymap.h (Flookup_key): Remove decl.
19445 * process.c (Fget_process): New forward static decl.
19446 (Fprocess_datagram_address): Mark as internal.
19447 * syntax.c (Fsyntax_table_p): New forward static decl.
19448 (skip_chars): Remove duplicate decl.
19449 * textprop.c (Fprevious_property_change): New forward static decl.
19450 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
19451 Now internal.
19452 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
19453 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
19454
19455 * editfns.c (Fformat): Remove unreachable code.
19456
19457 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
19458
19459 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
19460 change. (Bug#8496)
19461
19462 2011-04-13 Eli Zaretskii <eliz@gnu.org>
19463
19464 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
19465 when at ZV. (Bug#8487)
19466
19467 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
19468
19469 * charset.c (Fclear_charset_maps): Use xfree instead of free.
19470 (Bug#8437)
19471 * keyboard.c (parse_tool_bar_item): Likewise.
19472 * sound.c (sound_cleanup, alsa_close): Likewise.
19473 * termcap.c (tgetent): Likewise.
19474 * xfns.c (x_default_font_parameter): Likewise.
19475 * xsettings.c (read_and_apply_settings): Likewise.
19476
19477 * alloc.c (overrun_check_malloc, overrun_check_realloc)
19478 (overrun_check_free): Protoize.
19479
19480 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
19481
19482 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
19483 since callers should never pass a negative size.
19484 Change the signature to match that of plain 'read' and 'write'; see
19485 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
19486 * lisp.h: Update prototypes of emacs_write and emacs_read.
19487
19488 2011-04-11 Eli Zaretskii <eliz@gnu.org>
19489
19490 * xdisp.c (redisplay_window): Don't try to determine the character
19491 position of the scroll margin if the window start point w->startp
19492 is outside the buffer's accessible region. (Bug#8468)
19493
19494 2011-04-10 Eli Zaretskii <eliz@gnu.org>
19495
19496 Fix write-region and its subroutines for buffers > 2GB.
19497 * fileio.c (a_write, e_write): Modify declaration of arguments and
19498 local variables to support buffers larger than 2GB.
19499 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
19500
19501 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
19502 argument, local variables, and return value.
19503
19504 * lisp.h: Update prototypes of emacs_write and emacs_read.
19505
19506 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
19507
19508 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
19509
19510 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
19511
19512 Fix more problems found by GCC 4.6.0's static checks.
19513
19514 * xdisp.c (vmessage): Use a better test for character truncation.
19515
19516 * charset.c (load_charset_map): <, not <=, for optimization,
19517 and to avoid potential problems with integer overflow.
19518 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
19519 * casetab.c (set_identity, shuffle): Likewise.
19520 * editfns.c (Fformat): Likewise.
19521 * syntax.c (skip_chars): Likewise.
19522
19523 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
19524 This also lets GCC 4.6.0 generate slightly better loop code.
19525
19526 * callint.c (Fcall_interactively): <, not <=, for optimization.
19527 (Fcall_interactively): Count the number of arguments produced,
19528 not the number of arguments given. This is simpler and lets GCC
19529 4.6.0 generate slightly better code.
19530
19531 * ftfont.c: Distingish more carefully between FcChar8 and char.
19532 The previous code passed unsigned char * to a functions like
19533 strlen and xstrcasecmp that expect char *, which does not
19534 conform to the C standard.
19535 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
19536 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
19537 char * when the C standard requires it.
19538
19539 * keyboard.c (read_char): Remove unused var.
19540
19541 * eval.c: Port to Windows vsnprintf (Bug#8435).
19542 Include <limits.h>.
19543 (SIZE_MAX): Define if the headers do not.
19544 (verror): Do not give up if vsnprintf returns a negative count.
19545 Instead, grow the buffer. This ports to Windows vsnprintf, which
19546 does not conform to C99. Problem reported by Eli Zaretskii.
19547 Also, simplify the allocation scheme, by avoiding the need for
19548 calling realloc, and removing the ALLOCATED variable.
19549
19550 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
19551
19552 Remove invocations of doprnt, as Emacs now uses vsnprintf.
19553 But keep the doprint source code for now, as we might revamp it
19554 and use it again (Bug#8435).
19555 * lisp.h (doprnt): Remove.
19556 * Makefile.in (base_obj): Remove doprnt.o.
19557 * deps.mk (doprnt.o): Remove.
19558
19559 error: Print 32- and 64-bit integers portably (Bug#8435).
19560 Without this change, on typical 64-bit hosts error ("...%d...", N)
19561 was used to print both 32- and 64-bit integers N, which relied on
19562 undefined behavior.
19563 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
19564 * lisp.h (error, verror): Mark as printf-like functions.
19565 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
19566 Report overflow in size calculations when allocating printf buffer.
19567 Do not truncate output string at its first null byte.
19568 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
19569 Truncate the output at a character boundary, since vsnprintf does not
19570 do that.
19571 * charset.c (check_iso_charset_parameter): Convert internal
19572 character to string before calling 'error', since %c now has the
19573 printf meaning.
19574 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
19575 overflow when computing char to be passed to 'error'. Do not
19576 pass Lisp_Object to 'error'; pass the integer instead.
19577 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
19578 formatted with plain %d.
19579
19580 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
19581
19582 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
19583
19584 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
19585
19586 * xterm.c (x_catch_errors): Remove duplicate declaration.
19587
19588 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
19589
19590 * xdisp.c, lisp.h (message_nolog): Remove; unused.
19591
19592 2011-04-10 Jim Meyering <meyering@redhat.com>
19593
19594 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
19595 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
19596 return ssize_t not "int", and use size_t as the buffer length.
19597 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
19598 * gnutls.h: Update declarations.
19599 * process.c (read_process_output): Use ssize_t, to match.
19600 (send_process): Likewise.
19601
19602 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
19603
19604 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
19605
19606 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
19607
19608 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
19609 Use unsigned char, to match FcChar8 type definition.
19610
19611 * xterm.c (handle_one_xevent):
19612 * xmenu.c (create_and_show_popup_menu):
19613 * xselect.c (x_decline_selection_request)
19614 (x_reply_selection_request): Avoid type-punned deref of X events.
19615
19616 2011-04-09 Eli Zaretskii <eliz@gnu.org>
19617
19618 Fix some uses of `int' instead of EMACS_INT.
19619 * search.c (string_match_1, fast_string_match)
19620 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
19621 (scan_buffer, find_next_newline_no_quit)
19622 (find_before_next_newline, search_command, Freplace_match)
19623 (Fmatch_data): Make some `int' variables be EMACS_INT.
19624
19625 * xdisp.c (display_count_lines): 3rd argument and return value now
19626 EMACS_INT. All callers changed.
19627 (pint2hrstr): Last argument is now EMACS_INT.
19628
19629 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
19630 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
19631 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
19632 (decode_coding_utf_16, decode_coding_emacs_mule)
19633 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
19634 (decode_coding_ccl, decode_coding_charset)
19635 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
19636 (decode_coding_iso_2022, decode_coding_emacs_mule)
19637 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
19638 <char_offset, last_offset>: Declare EMACS_INT.
19639 (encode_coding_utf_8, encode_coding_utf_16)
19640 (encode_coding_emacs_mule, encode_invocation_designation)
19641 (encode_designation_at_bol, encode_coding_iso_2022)
19642 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
19643 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
19644 Declare EMACS_INT.
19645 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
19646 (encode_invocation_designation): Last argument P_NCHARS is now
19647 EMACS_INT.
19648 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
19649 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
19650
19651 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
19652 All users changed.
19653
19654 * ccl.c (Fccl_execute_on_string): Declare some variables
19655 EMACS_INT.
19656
19657 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
19658
19659 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
19660
19661 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
19662
19663 * process.c (Fformat_network_address): Doc fix.
19664
19665 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
19666
19667 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
19668
19669 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
19670
19671 * keyboard.c (read_char): Call Lisp function help-form-show,
19672 instead of using internal_with_output_to_temp_buffer.
19673 (Qhelp_form_show): New var.
19674 (syms_of_keyboard): Use DEFSYM macro.
19675
19676 * print.c (internal_with_output_to_temp_buffer): Function deleted.
19677
19678 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
19679
19680 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
19681
19682 * process.c (Flist_processes): Remove to Lisp.
19683 (list_processes_1): Delete.
19684
19685 2011-04-06 Eli Zaretskii <eliz@gnu.org>
19686
19687 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
19688
19689 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
19690
19691 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
19692
19693 Fix more problems found by GCC 4.6.0's static checks.
19694
19695 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
19696
19697 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
19698
19699 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
19700
19701 * xdisp.c (vmessage): Mark as a printf-like function.
19702
19703 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
19704
19705 * sound.c (sound_warning): Don't crash if arg contains a printf format.
19706
19707 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
19708 printf-like functions.
19709 (tiff_load): Add casts to remove these marks before passing them
19710 to system-supplied API.
19711
19712 * eval.c (Fsignal): Remove excess argument to 'fatal'.
19713
19714 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
19715 This avoids several warnings with gcc -Wstrict-overflow.
19716 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
19717 directly, rather than having caller test rule sign. This avoids
19718 some unnecessary tests.
19719 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
19720 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
19721 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
19722
19723 * xfont.c (xfont_text_extents): Remove var that was set but not used.
19724 (xfont_open): Avoid unnecessary tests.
19725
19726 * composite.c (composition_gstring_put_cache): Use unsigned integer.
19727
19728 * composite.h, composite.c (composition_gstring_put_cache):
19729 Use EMACS_INT, not int, for length.
19730
19731 * composite.h (COMPOSITION_DECODE_REFS): New macro,
19732 breaking out part of COMPOSITION_DECODE_RULE.
19733 (COMPOSITION_DECODE_RULE): Use it.
19734 * composite.c (get_composition_id): Remove unused local vars,
19735 by using the new macro.
19736
19737 * textprop.c (set_text_properties_1): Change while to do-while,
19738 since the condition is always true at first.
19739
19740 * intervals.c (graft_intervals_into_buffer): Mark var as used.
19741 (interval_deletion_adjustment): Return unsigned value.
19742 All uses changed.
19743
19744 * process.c (list_processes_1, create_pty, read_process_output):
19745 (exec_sentinel): Remove vars that were set but not used.
19746 (create_pty): Remove unnecessary "volatile"s.
19747 (Fnetwork_interface_info): Avoid possibility of int overflow.
19748 (read_process_output): Do adaptive read buffering even if carryover.
19749 (read_process_output): Simplify nbytes computation if buffered.
19750
19751 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
19752
19753 * syntax.c (scan_words): Remove var that was set but not used.
19754 (update_syntax_table): Use unsigned instead of int.
19755
19756 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
19757 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
19758 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
19759
19760 * print.c (print_error_message): Avoid int overflow.
19761
19762 * font.c (font_list_entities): Redo for clarity,
19763 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
19764
19765 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
19766 (font_score): Avoid potential overflow in diff calculation.
19767
19768 * fns.c (substring_both): Remove var that is set but not used.
19769 (sxhash): Redo loop for clarity and to avoid wraparound warning.
19770
19771 * eval.c (funcall_lambda): Rename local to avoid shadowing.
19772
19773 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
19774 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
19775 can always succeed if overflow has undefined behavior.
19776
19777 * search.c (boyer_moore, wordify): Remove vars set but not used.
19778 (wordify): Omit three unnecessary tests.
19779
19780 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
19781 All callers changed. This avoids the need for an unused var.
19782
19783 * casefiddle.c (casify_region): Remove var that is set but not used.
19784
19785 * dired.c (file_name_completion): Remove var that is set but not used.
19786
19787 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
19788
19789 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
19790 (Finsert_file_contents): Remove unnecessary code checking fd.
19791
19792 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
19793 Check for integer overflow on size calculations.
19794
19795 * buffer.c (Fprevious_overlay_change): Remove var that is set
19796 but not used.
19797
19798 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
19799 Remove vars that are set but not used.
19800 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
19801 (timer_check_2): Mark vars as initialized.
19802
19803 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
19804
19805 * image.c (lookup_image): Remove var that is set but not used.
19806 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
19807
19808 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
19809 that are set but not used.
19810
19811 * xfns.c (make_invisible_cursor): Don't return garbage
19812 if XCreateBitmapFromData fails (Bug#8410).
19813
19814 * xselect.c (x_get_local_selection, x_handle_property_notify):
19815 Remove vars that are set but not used.
19816
19817 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
19818 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
19819
19820 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
19821 Remove var that is set but not used.
19822 (scroll_bar_windows_size): Now size_t, not int.
19823 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
19824 Check for overflow.
19825
19826 * xfaces.c (realize_named_face): Remove vars that are set but not used.
19827 (map_tty_color) [!defined MSDOS]: Likewise.
19828
19829 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
19830
19831 * coding.c: Remove vars that are set but not used.
19832 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
19833 All callers changed.
19834 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
19835 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
19836 (decode_coding_charset): Remove vars that are set but not used.
19837
19838 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
19839 that is set but not used.
19840
19841 * print.c (print_object): Remove var that is set but not used.
19842
19843 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
19844 The gnulib version avoids calling malloc in the usual case,
19845 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
19846 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
19847 * filelock.c (current_lock_owner): Likewise.
19848 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
19849 * sysdep.c: Include allocator.h, careadlinkat.h.
19850 (emacs_no_realloc_allocator): New static constant.
19851 (emacs_readlink): New function.
19852 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
19853 ../lib/careadlinkat.h.
19854
19855 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
19856
19857 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
19858 first non-nil return value).
19859
19860 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
19861
19862 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
19863 if not defined (Bug#8403).
19864
19865 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
19866
19867 * xdisp.c (display_count_lines): Remove parameter `start',
19868 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19869 (get_char_face_and_encoding): Remove parameter `multibyte_p',
19870 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19871 (fill_stretch_glyph_string): Remove parameters `row' and `area',
19872 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
19873 and thereabouts. All callers changed.
19874 (get_per_char_metric): Remove parameter `f', unused since
19875 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19876
19877 2011-04-02 Jim Meyering <meyering@redhat.com>
19878
19879 do not dereference NULL upon failed strdup
19880 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
19881 (ns_get_family): Likewise.
19882
19883 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
19884
19885 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
19886
19887 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
19888
19889 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
19890 later (Bug#8403).
19891
19892 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
19893
19894 Add lexical binding.
19895
19896 * window.c (Ftemp_output_buffer_show): New fun.
19897 (Fsave_window_excursion):
19898 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
19899
19900 * lread.c (lisp_file_lexically_bound_p): New function.
19901 (Fload): Bind Qlexical_binding.
19902 (readevalloop): Remove `evalfun' arg.
19903 Bind Qinternal_interpreter_environment.
19904 (Feval_buffer): Bind Qlexical_binding.
19905 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
19906 Mark as dynamic.
19907 (syms_of_lread): Declare `lexical-binding'.
19908
19909 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
19910
19911 * keyboard.c (eval_dyn): New fun.
19912 (menu_item_eval_property): Use it.
19913
19914 * image.c (parse_image_spec): Use Ffunctionp.
19915
19916 * fns.c (concat, mapcar1): Accept byte-code-functions.
19917
19918 * eval.c (Fsetq): Handle lexical vars.
19919 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
19920 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
19921 (FletX, Flet): Obey lexical binding.
19922 (Fcommandp): Handle closures.
19923 (Feval): New `lexical' arg.
19924 (eval_sub): New function extracted from Feval. Use it almost
19925 everywhere where Feval was used. Look up vars in lexical env.
19926 Handle closures.
19927 (Ffunctionp): Move from subr.el.
19928 (Ffuncall): Handle closures.
19929 (apply_lambda): Remove `eval_flags'.
19930 (funcall_lambda): Handle closures and new byte-code-functions.
19931 (Fspecial_variable_p): New function.
19932 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
19933 but without exporting it to Lisp.
19934
19935 * doc.c (Fdocumentation, store_function_docstring):
19936 * data.c (Finteractive_form): Handle closures.
19937
19938 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
19939 interactive spec.
19940
19941 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
19942 New byte-codes.
19943 (exec_byte_code): New function extracted from Fbyte_code to handle new
19944 calling convention for byte-code-functions. Add new byte-codes.
19945
19946 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
19947
19948 * alloc.c (Fmake_symbol): Init new `declared_special' field.
19949
19950 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
19951
19952 * xdisp.c (redisplay_internal): Fix prototype.
19953
19954 2011-03-31 Eli Zaretskii <eliz@gnu.org>
19955
19956 * xdisp.c (SCROLL_LIMIT): New macro.
19957 (try_scrolling): Use it when setting scroll_limit.
19958 Limit scrolling to 100 screen lines.
19959 (redisplay_window): Even when falling back on "recentering",
19960 position point in the window according to scroll-conservatively,
19961 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
19962
19963 (try_scrolling): When point is above the window, allow searching
19964 as far as scroll_max, or one screenful, to compute vertical
19965 distance from PT to the scroll margin position. This prevents
19966 try_scrolling from unnecessarily failing when
19967 scroll-conservatively is set to a value slightly larger than the
19968 window height. Clean up the case of PT below the margin at bottom
19969 of window: scroll_max can no longer be INT_MAX. When aggressive
19970 scrolling is in use, don't let point enter the opposite scroll
19971 margin as result of the scroll.
19972 (syms_of_xdisp) <scroll-conservatively>: Document the
19973 threshold of 100 lines for never-recentering scrolling.
19974
19975 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
19976
19977 * dispextern.h (move_it_by_lines):
19978 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
19979 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
19980 (message_log_check_duplicate): Remove parameters `prev_bol' and
19981 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19982 (redisplay_internal): Remove parameter `preserve_echo_area',
19983 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
19984
19985 * indent.c (Fvertical_motion):
19986 * window.c (window_scroll_pixel_based, Frecenter):
19987 Don't pass `need_y_p' to `move_it_by_lines'.
19988
19989 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
19990
19991 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
19992 steal a few bits to be more compact.
19993 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
19994 Remove unneeded casts.
19995
19996 * bytecode.c (Fbyte_code): CAR and CDR can GC.
19997
19998 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
19999
20000 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
20001 binding" message (bug#7967).
20002
20003 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
20004
20005 Fix more problems found by GCC 4.6.0's static checks.
20006
20007 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
20008 Remove unused local var.
20009
20010 * editfns.c (Fmessage_box): Remove unused local var.
20011
20012 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
20013 (note_mode_line_or_margin_highlight, note_mouse_highlight):
20014 Omit unused local vars.
20015 * window.c (shrink_windows): Omit unused local var.
20016 * menu.c (digest_single_submenu): Omit unused local var.
20017 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
20018 Omit unused local var.
20019
20020 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
20021 Don't assume string length fits in int.
20022 (keyremap_step, read_key_sequence): Use size_t for sizes.
20023 (read_key_sequence): Don't check last_real_key_start redundantly.
20024
20025 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
20026 instead of alloca (Bug#8344).
20027
20028 * eval.c (Fbacktrace): Don't assume nargs fits in int.
20029 (Fbacktrace_frame): Don't assume nframes fits in int.
20030
20031 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
20032
20033 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
20034 concerns.
20035
20036 * term.c (produce_glyphless_glyph): Remove unnecessary test.
20037
20038 * cm.c (calccost): Turn while-do into do-while, for clarity.
20039
20040 * keyboard.c (syms_of_keyboard): Use the same style as later
20041 in this function when indexing through an array. This also
20042 works around GCC bug 48267.
20043
20044 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
20045
20046 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
20047
20048 * chartab.c (sub_char_table_ref_and_range): Redo for slight
20049 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
20050
20051 * keyboard.c, keyboard.h (num_input_events): Now size_t.
20052 This avoids undefined behavior on integer overflow, and is a bit
20053 more convenient anyway since it is compared to a size_t variable.
20054
20055 Variadic C functions now count arguments with size_t, not int.
20056 This avoids an unnecessary limitation on 64-bit machines, which
20057 caused (substring ...) to crash on large vectors (Bug#8344).
20058 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
20059 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
20060 All variadic functions and their callers changed accordingly.
20061 (struct gcpro.nvars): Now size_t, not int. All uses changed.
20062 * data.c (arith_driver, float_arith_driver): Likewise.
20063 * editfns.c (general_insert_function): Likewise.
20064 * eval.c (struct backtrace.nargs, interactive_p)
20065 (internal_condition_case_n, run_hook_with_args, apply_lambda)
20066 (funcall_lambda, mark_backtrace): Likewise.
20067 * fns.c (concat): Likewise.
20068 * frame.c (x_set_frame_parameters): Likewise.
20069 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
20070 0 if not found, not -1. All callers changed.
20071
20072 * alloc.c (garbage_collect): Don't assume stack size fits in int.
20073 (stack_copy_size): Now size_t, not int.
20074 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
20075
20076 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
20077
20078 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
20079 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
20080 All callers changed.
20081
20082 * lisp.h (multibyte_char_to_unibyte):
20083 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
20084 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
20085 * character.h (CHAR_TO_BYTE8):
20086 * cmds.c (internal_self_insert):
20087 * editfns.c (general_insert_function):
20088 * keymap.c (push_key_description):
20089 * search.c (Freplace_match):
20090 * xdisp.c (message_dolog, set_message_1): All callers changed.
20091
20092 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
20093
20094 * keyboard.c (safe_run_hook_funcall): New function.
20095 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
20096 don't set the hook to nil, but remove the offending function instead.
20097 (Qcommand_hook_internal): Remove, unused.
20098 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
20099 Vcommand_hook_internal.
20100
20101 * eval.c (enum run_hooks_condition): Remove.
20102 (funcall_nil, funcall_not): New functions.
20103 (run_hook_with_args): Call each function through a `funcall' argument.
20104 Remove `cond' argument, now redundant.
20105 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
20106 (Frun_hook_with_args_until_failure): Adjust accordingly.
20107 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
20108
20109 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
20110
20111 * dispextern.h (string_buffer_position): Remove declaration.
20112
20113 * print.c (strout): Remove parameter `multibyte', unused since
20114 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
20115
20116 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
20117 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
20118 All callers changed.
20119
20120 * w32.c (_wsa_errlist): Use braces for struct initializers.
20121
20122 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
20123 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
20124 All callers changed.
20125 (string_buffer_position): Likewise. Also, make static (it's never
20126 used outside xdisp.c).
20127 (cursor_row_p): Remove parameter `w', unused since
20128 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
20129 (decode_mode_spec): Remove parameter `precision', introduced during
20130 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
20131 All callers changed.
20132
20133 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
20134
20135 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
20136
20137 2011-03-27 Anders Lindgren <andlind@gmail.com>
20138
20139 * nsterm.m (ns_menu_bar_is_hidden): New variable.
20140 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
20141 (ns_update_auto_hide_menu_bar): New functions.
20142 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
20143 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
20144 ns_constrain_all_frames.
20145 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
20146 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
20147
20148 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
20149
20150 * nsmenu.m (runDialogAt): Remove argument to timer_check.
20151
20152 2011-03-27 Glenn Morris <rgm@gnu.org>
20153
20154 * syssignal.h: Replace RETSIGTYPE with void.
20155 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
20156 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
20157 Replace SIGTYPE with void everywhere.
20158 * s/usg5-4-common.h (SIGTYPE): Remove definition.
20159 * s/template.h (SIGTYPE): Remove commented out definition.
20160
20161 2011-03-26 Eli Zaretskii <eliz@gnu.org>
20162
20163 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
20164 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
20165
20166 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
20167
20168 * w32.c (read_unc_volume): Use parameter `henum', instead of
20169 global variable `wget_enum_handle'.
20170
20171 * keymap.c (describe_vector): Remove parameters `indices' and
20172 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
20173 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
20174
20175 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
20176
20177 * keyboard.c (timer_check): Remove parameter `do_it_now',
20178 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
20179 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
20180 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
20181
20182 * keyboard.c (read_char):
20183 * w32menu.c (w32_menu_display_help):
20184 * xmenu.c (show_help_event, menu_help_callback):
20185 Adjust calls to `show_help_echo'.
20186
20187 * gtkutil.c (xg_maybe_add_timer):
20188 * keyboard.c (readable_events):
20189 * process.c (wait_reading_process_output):
20190 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
20191
20192 * insdel.c (adjust_markers_gap_motion):
20193 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
20194 (gap_left, gap_right): Don't call it.
20195
20196 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
20197
20198 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
20199 incurred during fontification.
20200
20201 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
20202
20203 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
20204 (DEFVAR_PER_BUFFER): Don't pass it.
20205
20206 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
20207 (scrolling_window): Don't pass it.
20208
20209 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
20210
20211 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
20212
20213 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
20214 and `suffix'.
20215 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
20216 of variables specific to SELinux and computation of `encoded_absname'.
20217
20218 * image.c (XPutPixel): Remove unused variable `height'.
20219
20220 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
20221
20222 * unexw32.c (get_section_info): Remove unused variable `section'.
20223
20224 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
20225 (system_process_attributes): Remove unused variable `sess'.
20226 (sys_read): Remove unused variable `err'.
20227
20228 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
20229 (w32_wnd_proc): Remove unused variable `isdead'.
20230 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
20231 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
20232 (x_create_tip_frame): Remove unused variable `tem'.
20233
20234 * w32inevt.c (w32_console_read_socket):
20235 Remove unused variable `no_events'.
20236
20237 * w32term.c (x_draw_composite_glyph_string_foreground):
20238 Remove unused variable `width'.
20239
20240 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
20241
20242 * w32term.c (x_set_glyph_string_clipping):
20243 Don't pass uninitialized region to CombineRgn.
20244
20245 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
20246
20247 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
20248 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
20249 (Fx_close_connection): Remove unused variable `i'.
20250
20251 * w32font.c (w32font_draw): Return number of glyphs.
20252 (w32font_open_internal): Remove unused variable `i'.
20253 (w32font_driver): Add missing initializer.
20254
20255 * w32menu.c (utf8to16): Remove unused variable `utf16'.
20256 (fill_in_menu): Remove unused variable `items_added'.
20257
20258 * w32term.c (last_mouse_press_frame): Remove static global variable.
20259 (w32_clip_to_row): Remove unused variable `f'.
20260 (x_delete_terminal): Remove unused variable `i'.
20261
20262 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
20263 (NOTHING): Remove unused static global variable.
20264 (uniscribe_check_otf): Remove unused variable `table'.
20265 (uniscribe_font_driver): Add missing initializers.
20266
20267 2011-03-23 Julien Danjou <julien@danjou.info>
20268
20269 * term.c (Fsuspend_tty, Fresume_tty):
20270 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
20271 * window.c (temp_output_buffer_show):
20272 * insdel.c (signal_before_change):
20273 * frame.c (Fhandle_switch_frame):
20274 * fileio.c (Fdo_auto_save):
20275 * emacs.c (Fkill_emacs):
20276 * editfns.c (save_excursion_restore):
20277 * cmds.c (internal_self_insert):
20278 * callint.c (Fcall_interactively):
20279 * buffer.c (Fkill_all_local_variables):
20280 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
20281 Use Frun_hooks.
20282 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
20283 unconditionally since it does the check itself.
20284
20285 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
20286
20287 Fix more problems found by GCC 4.5.2's static checks.
20288
20289 * coding.c (encode_coding_raw_text): Avoid unnecessary test
20290 the first time through the loop, since we know p0 < p1 then.
20291 This also avoids a gcc -Wstrict-overflow warning.
20292
20293 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
20294 leading to a memory leak, possible in functions like
20295 load_charset_map_from_file that can allocate an unbounded number
20296 of objects (Bug#8318).
20297
20298 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
20299 that could (at least in theory) be that large.
20300
20301 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
20302 This is less likely to overflow, and avoids undefined behavior if
20303 overflow does occur. All callers changed. Use strtoul to scan
20304 for the unsigned long integer.
20305 (pint2hrstr): Simplify and tune code slightly.
20306 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
20307
20308 * scroll.c (do_scrolling): Work around GCC bug 48228.
20309 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
20310
20311 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
20312 This also avoids a warning with gcc -Wstrict-overflow.
20313 (validate_x_resource_name): Simplify count usage.
20314 This also avoids a warning with gcc -Wstrict-overflow.
20315
20316 * fileio.c (Fcopy_file): Report error if fchown or fchmod
20317 fail (Bug#8306).
20318
20319 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
20320
20321 * process.c (Fmake_network_process): Use socklen_t, not int,
20322 where POSIX says socklen_t is required in portable programs.
20323 This fixes a porting bug on hosts like 64-bit HP-UX, where
20324 socklen_t is wider than int (Bug#8277).
20325 (Fmake_network_process, server_accept_connection):
20326 (wait_reading_process_output, read_process_output):
20327 Likewise.
20328
20329 * process.c: Rename or move locals to avoid shadowing.
20330 (list_processes_1, Fmake_network_process):
20331 (read_process_output_error_handler, exec_sentinel_error_handler):
20332 Rename or move locals.
20333 (Fmake_network_process): Define label "retry_connect" only if needed.
20334 (Fnetwork_interface_info): Fix pointer signedness.
20335 (process_send_signal): Add cast to avoid pointer signedness problem.
20336 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
20337 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
20338
20339 Make tparam.h and terminfo.c consistent.
20340 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
20341 Include tparam.h instead, since it declares them.
20342 * cm.h (PC): Remove extern decl; tparam.h now does this.
20343 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
20344 * terminfo.c: Include tparam.h, to check interfaces.
20345 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
20346 (tparam): Adjust signature to match interface in tparam.h;
20347 this removes some undefined behavior. Check that outstring and len
20348 are zero, which they always are with Emacs.
20349 * tparam.h (PC, BC, UP): New extern decls.
20350
20351 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
20352 (xftfont_open): Rename locals to avoid shadowing.
20353
20354 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
20355 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
20356 (OTF_TAG_SYM): Omit macro if not needed.
20357 (ftfont_list): Remove unused local.
20358 (get_adstyle_property, ftfont_pattern_entity):
20359 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
20360 Rename locals to avoid shadowing.
20361
20362 * xfont.c (xfont_list_family): Mark var as initialized.
20363
20364 * xml.c (make_dom): Now static.
20365
20366 * composite.c (composition_compute_stop_pos): Rename local to
20367 avoid shadowing.
20368 (composition_reseat_it): Remove unused locals.
20369 (find_automatic_composition, composition_adjust_point): Likewise.
20370 (composition_update_it): Mark var as initialized.
20371 (find_automatic_composition): Mark vars as initialized,
20372 with a FIXME (Bug#8290).
20373
20374 character.h: Rename locals to avoid shadowing.
20375 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
20376 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
20377 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
20378 (BUF_DEC_POS): Be more systematic about renaming local temporaries
20379 to avoid shadowing.
20380
20381 * textprop.c (property_change_between_p): Remove; unused.
20382
20383 * intervals.c (interval_start_pos): Now static.
20384
20385 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
20386
20387 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
20388 Rename locals to avoid shadowing.
20389
20390 * sound.c (wav_play, au_play, Fplay_sound_internal):
20391 Fix pointer signedness.
20392 (alsa_choose_format): Remove unused local var.
20393 (wav_play): Initialize a variable to 0, to prevent undefined
20394 behavior (Bug#8278).
20395
20396 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
20397
20398 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
20399
20400 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
20401 clobbering (Bug#8298).
20402 * sysdep.c (sys_subshell): Likewise.
20403 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
20404
20405 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
20406 This should get cleaned up, so that child_setup has the
20407 same signature on all platforms.
20408
20409 * callproc.c (call_process_cleanup): Now static.
20410 (relocate_fd): Rename locals to avoid shadowing.
20411
20412 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
20413
20414 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
20415 not to be necessary, and produces flickering.
20416
20417 2011-03-20 Glenn Morris <rgm@gnu.org>
20418
20419 * config.in: Remove file.
20420
20421 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
20422
20423 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
20424 are now in src/globals.h.
20425 (syms_of_minibuf): Remove spurious & from previous change.
20426
20427 2011-03-20 Leo Liu <sdl.web@gmail.com>
20428
20429 * minibuf.c (completing-read-function): New variable.
20430 (completing-read-default): Rename from completing-read.
20431 (completing-read): Call completing-read-function.
20432
20433 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
20434
20435 * xfaces.c (Fx_load_color_file):
20436 Read color file from absolute filename (bug#8250).
20437
20438 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
20439
20440 * makefile.w32-in: Update dependencies.
20441
20442 2011-03-17 Eli Zaretskii <eliz@gnu.org>
20443
20444 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
20445
20446 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
20447
20448 Fix more problems found by GCC 4.5.2's static checks.
20449
20450 * process.c (make_serial_process_unwind, send_process_trap):
20451 (sigchld_handler): Now static.
20452
20453 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
20454 That way, the code declares only the vars that it needs.
20455 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
20456 * s/cygwin.h (PTY_ITERATION): Likewise.
20457 * s/darwin.h (PTY_ITERATION): Likewise.
20458 * s/gnu-linux.h (PTY_ITERATION): Likewise.
20459
20460 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
20461 * process.c (allocate_pty): Don't declare stb unless it's needed.
20462
20463 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
20464 (CONSTANTLIM): Remove; unused.
20465 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
20466 Define only if needed.
20467
20468 * unexelf.c (unexec): Name an expression,
20469 to avoid gcc -Wbad-function-cast warning.
20470 Use a different way to cause a compilation error if anyone uses
20471 n rather than nn, a way that does not involve shadowing.
20472 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
20473
20474 * deps.mk (unexalpha.o): Remove; unused.
20475
20476 New file unexec.h, the (simple) interface for unexec (Bug#8267).
20477 * unexec.h: New file.
20478 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
20479 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
20480 Depend on unexec.h.
20481 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
20482 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
20483 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
20484 Change as necessary to match prototype in unexec.h.
20485
20486 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
20487 shadowing.
20488 (back_comment, skip_chars): Mark vars as initialized.
20489
20490 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
20491 Rename locals to avoid shadowing.
20492
20493 * lread.c (read1): Rewrite so as not to use empty "else".
20494 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
20495
20496 * print.c (Fredirect_debugging_output): Fix pointer signedess.
20497
20498 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
20499 warning when compiling print.c.
20500
20501 * font.c (font_unparse_fcname): Abort in an "impossible" situation
20502 instead of using an uninitialized var.
20503 (font_sort_entities): Mark var as initialized.
20504
20505 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
20506
20507 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
20508 pointers to constants.
20509 (font_parse_fcname): Remove unused vars.
20510 (font_delete_unmatched): Now static.
20511 (font_get_spec): Remove; unused.
20512 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
20513 (font_update_drivers, Ffont_get_glyphs, font_add_log):
20514 Rename or move locals to avoid shadowing.
20515
20516 * fns.c (require_nesting_list, require_unwind): Now static.
20517 (Ffillarray): Rename locals to avoid shadowing.
20518
20519 * floatfns.c (domain_error2): Define only if needed.
20520 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
20521
20522 * alloc.c (mark_backtrace): Move decl from here ...
20523 * lisp.h: ... to here, so that it can be checked.
20524
20525 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
20526 (Fdefvar): Rewrite so as not to use empty "else".
20527 (lisp_indirect_variable): Name an expression,
20528 to avoid gcc -Wbad-function-cast warning.
20529 (Fdefvar): Rename locals to avoid shadowing.
20530
20531 * callint.c (quotify_arg, quotify_args): Now static.
20532 (Fcall_interactively): Rename locals to avoid shadowing.
20533 Use const pointer when appropriate.
20534
20535 * lisp.h (get_system_name, get_operating_system_release):
20536 Move decls here, to check interfaces.
20537 * process.c (get_operating_system_release): Move decl to lisp.h.
20538 * xrdb.c (get_system_name): Likewise.
20539 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
20540 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
20541 some of which prompt warnings from gcc -Wbad-function-cast.
20542 (Fformat_time_string, Fencode_time, Finsert_char):
20543 (Ftranslate_region_internal, Fformat):
20544 Rename or remove local vars to avoid shadowing.
20545 (Ftranslate_region_internal): Mark var as initialized.
20546
20547 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
20548 avoid shadowing.
20549
20550 * lisp.h (eassert): Check that the argument compiles, even if
20551 ENABLE_CHECKING is not defined.
20552
20553 * data.c (Findirect_variable): Name an expression, to avoid
20554 gcc -Wbad-function-cast warning.
20555 (default_value, arithcompare, arith_driver, arith_error): Now static.
20556 (store_symval_forwarding): Rename local to avoid shadowing.
20557 (Fmake_variable_buffer_local, Fmake_local_variable):
20558 Mark variables as initialized.
20559 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
20560
20561 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
20562 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
20563 Rename locals to avoid shadowing.
20564 (mark_stack): Move local variables into the #ifdef region where
20565 they're used.
20566 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
20567 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
20568 needed otherwise.
20569 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
20570 (GC_STRING_CHARS): Remove; not used.
20571 (Fmemory_limit): Cast sbrk's returned value to char *.
20572
20573 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
20574 avoids undefined behavior in theory.
20575
20576 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
20577
20578 Use functions, not macros, for up- and down-casing (Bug#8254).
20579 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20580 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
20581 to use the following functions instead of these macros.
20582 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
20583 EMACS_INT, since callers assume the returned value fits in int.
20584 (upcase1): Likewise, for UPCASE_TABLE.
20585 (uppercasep, lowercasep, upcase): New static inline functions.
20586 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
20587 the race-condition problem in the old DOWNCASE.
20588
20589 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
20590 Rename locals to avoid shadowing.
20591 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
20592 (regex_compile, re_search_2, re_match_2_internal):
20593 Remove unused local vars.
20594 (FREE_VAR): Rewrite so as not to use empty "else",
20595 which gcc can warn about.
20596 (regex_compile, re_match_2_internal): Mark locals as initialized.
20597 (RETALLOC_IF): Define only if needed.
20598 (WORDCHAR_P): Likewise. This one is never needed, but is used
20599 only in a comment talking about a compiler bug, so put inside
20600 the #if 0 of that comment.
20601 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
20602 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
20603 Remove; unused.
20604
20605 * search.c (boyer_moore): Rename locals to avoid shadowing.
20606 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
20607 (PREV_CHAR_BOUNDARY): Likewise.
20608
20609 * search.c (simple_search): Remove unused var.
20610
20611 * dired.c (compile_pattern): Move decl from here ...
20612 * lisp.h: ... to here, so that it can be checked.
20613 (struct re_registers): New forward decl.
20614
20615 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
20616
20617 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
20618 All uses changed.
20619 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
20620 Rename locals to avoid shadowing.
20621 (Fvertical_motion): Mark locals as initialized.
20622
20623 * casefiddle.c (casify_object, casify_region): Now static.
20624 (casify_region): Mark local as initialized.
20625
20626 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
20627
20628 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
20629 New macros, so that the caller can use some names other than
20630 gcpro1, gcpro2, etc.
20631 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
20632 of the new macros.
20633 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
20634 argument, for consistency with GCPRO2_VAR, etc: it is now the
20635 prefix of the variable, not the variable itself. All uses
20636 changed.
20637 * dired.c (directory_files_internal, file_name_completion):
20638 Rename locals to avoid shadowing.
20639
20640 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
20641 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
20642 dired.c's scmp function, had undefined behavior.
20643 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20644 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
20645 * buffer.h: ... to here, because these macros use current_buffer,
20646 and the new implementation with inline functions needs to have
20647 current_buffer in scope now, rather than later when the macros
20648 are used.
20649 (downcase, upcase1): New static inline functions.
20650 (DOWNCASE, UPCASE1): Reimplement using these functions.
20651 This avoids undefined behavior in expressions like
20652 DOWNCASE (x) == DOWNCASE (y), which previously suffered
20653 from race conditions in accessing the global variables
20654 case_temp1 and case_temp2.
20655 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
20656 * lisp.h (case_temp1, case_temp2): Remove their decls.
20657 * character.h (ASCII_CHAR_P): Move from here ...
20658 * lisp.h: ... to here, so that the inline functions mentioned
20659 above can use them.
20660
20661 * dired.c (directory_files_internal_unwind): Now static.
20662
20663 * fileio.c (file_name_as_directory, directory_file_name):
20664 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
20665 Now static.
20666 (file_name_as_directory): Use const pointers when appropriate.
20667 (Fexpand_file_name): Likewise. In particular, newdir might
20668 point at constant storage, so make it a const pointer.
20669 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
20670 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
20671 signedness issues.
20672 (Fset_file_times, Finsert_file_contents, auto_save_error):
20673 Rename locals to avoid shadowing.
20674
20675 * minibuf.c (choose_minibuf_frame_1): Now static.
20676 (Ftry_completion, Fall_completions): Rename or remove locals
20677 to avoid shadowing.
20678
20679 * marker.c (bytepos_to_charpos): Remove; unused.
20680
20681 * lisp.h (verify_bytepos, count_markers): New decls,
20682 so that gcc does not warn that these functions aren't declared.
20683
20684 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
20685 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
20686 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
20687 (copy_text): Remove unused local var.
20688
20689 * filelock.c (within_one_second): Now static.
20690 (lock_file_1): Rename local to avoid shadowing.
20691
20692 * buffer.c (fix_overlays_before): Mark locals as initialized.
20693 (fix_start_end_in_overlays): Likewise. This function should be
20694 simplified by using pointers-to-pointers, but that's a different
20695 matter.
20696 (switch_to_buffer_1): Now static.
20697 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
20698 (report_overlay_modification): Rename locals to avoid shadowing.
20699
20700 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
20701 Fix pointer signedness issue.
20702 (sys_subshell): Mark local as volatile if checking for lint,
20703 to suppress a gcc -Wclobbered warning that does not seem to be right.
20704 (MAXPATHLEN): Define only if needed.
20705
20706 * process.c (serial_open, serial_configure): Move decls from here ...
20707 * systty.h: ... to here, so that they can be checked.
20708
20709 * fns.c (get_random, seed_random): Move extern decls from here ...
20710 * lisp.h: ... to here, so that they can be checked.
20711
20712 * sysdep.c (reset_io): Now static.
20713 (wait_for_termination_signal): Remove; unused.
20714
20715 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
20716 (copy_keymap_item, append_key, push_text_char_description):
20717 Now static.
20718 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
20719 (DENSE_TABLE_SIZE): Remove; unused.
20720 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
20721 (describe_map_tree):
20722 Rename locals to avoid shadowing.
20723
20724 * keyboard.c: Declare functions static if they are not used elsewhere.
20725 (echo_char, echo_dash, cmd_error, top_level_2):
20726 (poll_for_input, handle_async_input): Now static.
20727 (read_char, kbd_buffer_get_event, make_lispy_position):
20728 (make_lispy_event, make_lispy_movement, apply_modifiers):
20729 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
20730 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
20731 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
20732 (read_key_sequence, read_char): Mark locals as initialized.
20733 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
20734
20735 * keyboard.h (make_ctrl_char): New decl.
20736 (mark_kboards): Move decl here ...
20737 * alloc.c (mark_kboards): ... from here.
20738
20739 * lisp.h (force_auto_save_soon): New decl.
20740
20741 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
20742 (DEFINE_DUMMY_FUNCTION): New macro.
20743 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
20744 Use it.
20745 (main): Add casts to avoid warnings
20746 if GCC considers string literals to be constants.
20747
20748 * lisp.h (fatal_error_signal): Add decl, since it's exported.
20749
20750 * dbusbind.c: Pointer signedness fixes.
20751 (xd_signature, xd_append_arg, xd_initialize):
20752 (Fdbus_call_method, Fdbus_call_method_asynchronously):
20753 (Fdbus_method_return_internal, Fdbus_method_error_internal):
20754 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
20755 (Fdbus_register_signal): Use SSDATA when the context wants char *.
20756
20757 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
20758 if GCC considers string literals to be constants.
20759 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
20760
20761 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
20762
20763 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
20764 (print_preprocess, print_object): New macro to fix last change.
20765
20766 * print.c (print_preprocess): Don't forget font objects.
20767
20768 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
20769
20770 * emacs.c (USAGE3): Doc fixes.
20771
20772 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
20773
20774 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
20775 structure.
20776
20777 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
20778
20779 * lisp.h (VWindow_system, Qfile_name_history):
20780 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
20781 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
20782 (w32_system_caret_x, w32_system_caret_y): Declare extern.
20783
20784 * w32select.c: Don't #include "keyboard.h".
20785 (run_protected): Add extern declaration for waiting_for_input.
20786
20787 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
20788 * w32console.c (detect_input_pending, read_input_pending)
20789 (encode_terminal_code):
20790 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
20791 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
20792 (w32_system_caret_y, Qfile_name_history):
20793 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
20794 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
20795 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
20796 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
20797 * w32proc.c (Qlocal, report_file_error):
20798 * w32term.c (Vwindow_system, updating_frame):
20799 * w32uniscribe.c (initialized, uniscribe_font_driver):
20800 Remove unneeded extern declarations.
20801
20802 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
20803
20804 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
20805
20806 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
20807
20808 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
20809 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
20810 These macros can no longer be used for assignment.
20811
20812 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
20813 Assign struct members directly, instead of using BUF_BEGV etc.
20814 (record_buffer_markers, fetch_buffer_markers): New functions for
20815 recording and fetching special buffer markers.
20816 (set_buffer_internal_1, set_buffer_temp): Use them.
20817
20818 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
20819
20820 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
20821
20822 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
20823 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
20824
20825 * xdisp.c (hscroll_window_tree):
20826 (reconsider_clip_changes): Use PT instead of BUF_PT.
20827
20828 2011-03-13 Eli Zaretskii <eliz@gnu.org>
20829
20830 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
20831 $(EMACS_ROOT)/lib/intprops.h.
20832
20833 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
20834
20835 Fix more problems found by GCC 4.5.2's static checks.
20836
20837 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
20838 to unsigned char * to avoid compiler diagnostic.
20839 (xg_free_frame_widgets): Make it clear that a local variable is
20840 needed only if USE_GTK_TOOLTIP.
20841 (gdk_window_get_screen): Make it clear that this macro is needed
20842 only if USE_GTK_TOOLTIP.
20843 (int_gtk_range_get_value): New function, which avoids a diagnostic
20844 from gcc -Wbad-function-cast.
20845 (xg_set_toolkit_scroll_bar_thumb): Use it.
20846 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
20847 diagnostic from gcc -Wbad-function-cast.
20848 (get_utf8_string, xg_get_file_with_chooser):
20849 Rename locals to avoid shadowing.
20850 (create_dialog): Move locals to avoid shadowing.
20851
20852 * xgselect.c (xg_select): Remove unused var.
20853
20854 * image.c (four_corners_best): Mark locals as initialized.
20855 (gif_load): Initialize transparent_p to zero (Bug#8238).
20856 Mark another local as initialized.
20857 (my_png_error, my_error_exit): Mark with NO_RETURN.
20858
20859 * image.c (clear_image_cache): Now static.
20860 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
20861 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
20862 (x_edge_detection): Remove unnecessary cast that
20863 gcc -Wbad-function-cast diagnoses.
20864 (gif_load): Fix pointer signedness.
20865 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
20866 (jpeg_load, gif_load): Rename locals to avoid shadowing.
20867
20868 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
20869
20870 Improve quality of tests for time stamp overflow.
20871 For example, without this patch (encode-time 0 0 0 1 1
20872 1152921504606846976) returns the obviously-bogus value (-948597
20873 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
20874 reports time overflow. See
20875 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
20876 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
20877 * editfns.c: Include limits.h and intprops.h.
20878 (TIME_T_MIN, TIME_T_MAX): New macros.
20879 (time_overflow): Move earlier, to before first use.
20880 (hi_time, lo_time): New functions, for an accurate test for
20881 out-of-range times.
20882 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
20883 (Fget_internal_run_time): Don't assume time_t fits in int.
20884 (make_time): Use list2 instead of Fcons twice.
20885 (Fdecode_time): More accurate test for out-of-range times.
20886 (check_tm_member): New function.
20887 (Fencode_time): Use it, to test for out-of-range times.
20888 (lisp_time_argument): Don't rely on undefined left-shift and
20889 right-shift behavior when checking for time stamp overflow.
20890
20891 * editfns.c (time_overflow): New function, refactoring common code.
20892 (Fformat_time_string, Fdecode_time, Fencode_time):
20893 (Fcurrent_time_string): Use it.
20894
20895 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
20896 * dired.c (make_time): Move to ...
20897 * editfns.c (make_time): ... here.
20898 * systime.h: Note the move.
20899
20900 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20901
20902 * fringe.c (update_window_fringes): Remove unused variables.
20903
20904 * unexmacosx.c (copy_data_segment): Also copy __got section.
20905 (Bug#8223)
20906
20907 2011-03-12 Eli Zaretskii <eliz@gnu.org>
20908
20909 * termcap.c [MSDOS]: Include "msdos.h".
20910 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
20911 Constify `char *' arguments and their references according to
20912 prototypes in tparam.h.
20913
20914 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
20915
20916 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
20917 Adapt all references accordingly.
20918
20919 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
20920
20921 2011-03-11 Tom Tromey <tromey@redhat.com>
20922
20923 * buffer.c (syms_of_buffer): Remove obsolete comment.
20924
20925 2011-03-11 Eli Zaretskii <eliz@gnu.org>
20926
20927 * termhooks.h (encode_terminal_code): Declare prototype.
20928
20929 * msdos.c (encode_terminal_code): Don't declare prototype.
20930
20931 * term.c (encode_terminal_code): Now external again, used by
20932 w32console.c and msdos.c.
20933
20934 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
20935 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
20936
20937 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
20938
20939 Fix some minor problems found by GCC 4.5.2's static checks.
20940
20941 * fringe.c (update_window_fringes): Mark locals as initialized
20942 (Bug#8227).
20943 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
20944
20945 * alloc.c (mark_fringe_data): Move decl from here ...
20946 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
20947 to check its interface.
20948 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
20949
20950 * fontset.c (free_realized_fontset): Now static.
20951 (Fset_fontset_font): Rename local to avoid shadowing.
20952 (fontset_font): Mark local as initialized.
20953 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
20954
20955 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
20956
20957 * xselect.c (x_disown_buffer_selections): Remove; not used.
20958 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
20959 (x_own_selection, Fx_disown_selection_internal): Rename locals
20960 to avoid shadowing.
20961 (x_handle_dnd_message): Remove local to avoid shadowing.
20962
20963 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
20964 so that the caller can use some name other than gcpro1.
20965 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
20966 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20967 (Fx_backspace_delete_keys_p):
20968 Use them to avoid shadowing, and rename vars to avoid shadowing.
20969 (x_decode_color, x_set_name, x_window): Now static.
20970 (Fx_create_frame): Add braces to silence GCC warning.
20971 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
20972 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
20973 Remove unused locals.
20974 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20975 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
20976 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
20977 macros.
20978
20979 * xterm.h (x_mouse_leave): New decl.
20980
20981 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
20982 Remove unused functions.
20983 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
20984 (x_calc_absolute_position): Now static.
20985 (XTread_socket): Don't define label "out" unless it's used.
20986 Don't declare local "event" unless it's used.
20987 (x_iconify_frame, x_free_frame_resources): Don't declare locals
20988 unless they are used.
20989 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
20990 (x_fatal_error_signal): Remove; not used.
20991 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
20992 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
20993 (x_error_catcher, x_connection_closed, x_error_handler):
20994 (x_error_quitter, xembed_send_message, x_iconify_frame):
20995 (my_log_handler): Rename locals to avoid shadowing.
20996 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
20997 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
20998
20999 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
21000 Rename or move locals to avoid shadowing.
21001 (tty_defined_color, merge_face_heights): Now static.
21002 (free_realized_faces_for_fontset): Remove; not used.
21003 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
21004 does not deduce is never used uninitialized.
21005 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
21006 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
21007
21008 * terminal.c (store_terminal_param): Now static.
21009
21010 * xmenu.c (menu_highlight_callback): Now static.
21011 (set_frame_menubar): Remove unused local.
21012 (xmenu_show): Rename parameter to avoid shadowing.
21013 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
21014 since they might point to immutable storage.
21015 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
21016 since it's unused otherwise.
21017
21018 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
21019 Add a FIXME, since the code still doesn't look right. (Bug#8215)
21020 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
21021 avoids a gcc -Wuninitialized diagnostic.
21022 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
21023 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
21024 does not deduce are never used uninitialized.
21025
21026 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
21027
21028 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
21029 * window.c (window_loop, size_window):
21030 (run_window_configuration_change_hook, enlarge_window): Likewise.
21031
21032 * window.c (display_buffer): Now static.
21033 (size_window): Mark variables that gcc -Wuninitialized
21034 does not deduce are never used uninitialized.
21035 * window.h (check_all_windows): New decl, to forestall
21036 gcc -Wmissing-prototypes diagnostic.
21037 * dispextern.h (bidi_dump_cached_states): Likewise.
21038
21039 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
21040 shadowing.
21041 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
21042 Include <limits.h>.
21043 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
21044 and to avoid gcc -Wuninitialized warning.
21045 (load_charset_map): Mark variables that gcc -Wuninitialized
21046 does not deduce are never used uninitialized.
21047 (load_charset): Abort instead of using uninitialized var (Bug#8229).
21048
21049 * coding.c (coding_set_source, coding_set_destination):
21050 Use "else { /* comment */ }" rather than "else /* comment */;"
21051 for clarity, and to avoid gcc -Wempty-body warning.
21052 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
21053 a block, when the outer 'i' will do.
21054 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
21055 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
21056 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
21057 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
21058 (Fdecode_sjis_char, Fdefine_coding_system_internal):
21059 Rename locals to avoid shadowing.
21060 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
21061 * coding.c (emacs_mule_char, encode_invocation_designation):
21062 Now static, since they're not used elsewhere.
21063 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
21064 (decode_coding_object, encode_coding_object, detect_coding_system):
21065 (decode_coding_emacs_mule): Mark variables that gcc
21066 -Wuninitialized does not deduce are never used uninitialized.
21067 (detect_coding_iso_2022): Initialize a local variable that might
21068 be used uninitialized. Leave a FIXME because it's not clear that
21069 this initialization is needed. (Bug#8211)
21070 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
21071 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
21072 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
21073 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
21074 Remove unused macros.
21075
21076 * category.c (hash_get_category_set): Remove unused local var.
21077 (copy_category_table): Now static, since it's not used elsewhere.
21078 * character.c (string_count_byte8): Likewise.
21079
21080 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
21081 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
21082
21083 * chartab.c (copy_sub_char_table): Now static, since it's not used
21084 elsewhere.
21085 (sub_char_table_ref_and_range, char_table_ref_and_range):
21086 Rename locals to avoid shadowing.
21087 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
21088
21089 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
21090 (BIDI_BOB): Remove unused macro.
21091
21092 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
21093 deduce are never used uninitialized.
21094 * term.c (encode_terminal_code): Likewise.
21095
21096 * term.c (encode_terminal_code): Now static. Remove unused local.
21097
21098 * tparam.h: New file.
21099 * term.c, tparam.h: Include it.
21100 * deps.mk (term.o, tparam.o): Depend on tparam.h.
21101 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
21102 Move these decls to tparam.h, and make them agree with what
21103 is actually in tparam.c. The previous trick of using incompatible
21104 decls in different modules does not conform to the C standard.
21105 All callers of tparam changed to use tparam's actual API.
21106 * tparam.c (tparam1, tparam, tgoto):
21107 Use const pointers where appropriate.
21108
21109 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
21110 * cm.h (struct cm): Likewise.
21111 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
21112 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
21113 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
21114 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
21115 (turn_on_face, init_tty): Likewise.
21116 * termchar.h (struct tty_display_info): Likewise.
21117
21118 * term.c (term_mouse_position): Rename local to avoid shadowing.
21119
21120 * alloc.c (mark_ttys): Move decl from here ...
21121 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
21122
21123 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
21124
21125 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
21126
21127 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
21128
21129 * search.c (compile_pattern_1): Remove argument regp, unused since
21130 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
21131 (compile_pattern): Don't pass it.
21132
21133 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
21134
21135 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
21136 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
21137 for ! HAVE_GTK3.
21138 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
21139
21140 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
21141
21142 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
21143 gdk_window_get_screen, gdk_window_get_geometry,
21144 gdk_x11_window_lookup_for_display and GDK_KEY_g.
21145 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
21146 (xg_get_pixbuf_from_pixmap): New function.
21147 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
21148 to Pixmap, take frame as parameter, remove GdkColormap parameter.
21149 Call xg_get_pixbuf_from_pixmap instead of
21150 gdk_pixbuf_get_from_drawable.
21151 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
21152 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
21153 (xg_check_special_colors): Use GtkStyleContext and its functions
21154 for HAVE_GTK3.
21155 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
21156 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
21157 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
21158 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
21159 Call gtk_widget_get_preferred_size.
21160 (xg_frame_resized): gdk_window_get_geometry only takes 5
21161 parameters.
21162 (xg_win_to_widget, xg_event_is_for_menubar):
21163 Call gdk_x11_window_lookup_for_display.
21164 (xg_set_widget_bg): New function.
21165 (delete_cb): New function.
21166 (xg_create_frame_widgets): Connect delete-event to delete_cb.
21167 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
21168 (xg_set_background_color): Call xg_set_widget_bg.
21169 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
21170 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
21171 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
21172 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
21173 if ! HAVE_GTK3.
21174 (update_frame_tool_bar): Call gtk_widget_hide.
21175 (xg_initialize): Use GDK_KEY_g.
21176
21177 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
21178 if ! HAVE_GTK3
21179 (x_session_initialize): Call gdk_x11_set_sm_client_id.
21180
21181 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
21182 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
21183 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
21184
21185 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
21186
21187 * w32xfns.c (select_palette): Check success of RealizePalette against
21188 GDI_ERROR, not zero.
21189
21190 See ChangeLog.11 for earlier changes.
21191
21192 ;; Local Variables:
21193 ;; coding: utf-8
21194 ;; End:
21195
21196 Copyright (C) 2011-2012 Free Software Foundation, Inc.
21197
21198 This file is part of GNU Emacs.
21199
21200 GNU Emacs is free software: you can redistribute it and/or modify
21201 it under the terms of the GNU General Public License as published by
21202 the Free Software Foundation, either version 3 of the License, or
21203 (at your option) any later version.
21204
21205 GNU Emacs is distributed in the hope that it will be useful,
21206 but WITHOUT ANY WARRANTY; without even the implied warranty of
21207 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21208 GNU General Public License for more details.
21209
21210 You should have received a copy of the GNU General Public License
21211 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.