Minor change in variable name in inotify.c.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
1b47babd
EZ
12012-12-11 Eli Zaretskii <eliz@gnu.org>
2
3 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
4 encoded_file_name, which is what it is.
5
4c1acb95
DA
62012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
7
8 Consistently use marker_position and marker_byte_position.
9 * fringe.c (Ffringe_bitmaps_at_pos):
10 * indent.c (Fvertical_motion):
11 * insdel.c (prepare_to_modify_buffer):
12 * keyboard.c (make_lispy_position):
13 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
14 (window_scroll_pixel_based, displayed_window_lines)
15 (Fset_window_configuration):
16 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
17 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
18 Replace direct access to marker fields with calls
19 to marker_position and/or marker_byte_position.
20
0eeb69fe
JB
212012-12-11 Juanma Barranquero <lekktu@gmail.com>
22
23 * makefile.w32-in (SIG2STR_H): New macro.
24 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
25 ($(BLD)/w32notify.$(O)): Update dependencies.
26
1cf1bbd5
DC
272012-12-10 Daniel Colascione <dancol@dancol.org>
28
8db4b52f
DC
29 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
30 Windows file notification functionality unless WINDOWSNT.
31
1cf1bbd5
DC
32 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
33 declarations.
34
35 * w32fns.c (cache_system_info): Initialize the global hinst
36 variable here so various initialization calls DTRT.
37
38 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused
39 variables.
40 (hinst): Remove unneeded extern declaration.
41 (_start): Remove initialization of above variables; remove
42 initialization of hinst, as cache_system_info now does that.
43
44 * emacs.c (main): Call cache_system_info early in startup; we
45 previously weren't calling it in Cygwin builds.
46
47 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK): Teach
48 the autoconf build system how to compile a Windows resource file
49 and link it to Emacs.
50
98a07056
DA
512012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
52
53 Per-buffer window counters.
54 * buffer.h (struct buffer): New member window_count.
55 (buffer_window_count): New function.
56 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
57 Initialize window_count.
58 (Fkill_buffer): Verify window_count for the buffer being killed.
59 (modify_overlay): Do not force redisplay if buffer is not shown
60 in any window.
61 (init_buffer_once): Initialize window_count for buffer_defaults
62 and buffer_local_symbols.
63 * window.h (buffer_shared): Remove declaration.
64 (wset_buffer): Convert from inline ...
65 * window.c (wset_buffer): ... to an ordinary function.
66 (adjust_window_count): New function.
67 (make_parent_window): Use it.
68 * xdisp.c (buffer_shared): Remove.
69 (redisplay_internal, redisplay_window): Adjust users.
70 (buffer_shared_and_changed): Use per-buffer window counter.
71
2b8c9064
EZ
722012-12-10 Eli Zaretskii <eliz@gnu.org>
73
74 Support for filesystem notifications on MS-Windows.
75 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
76 and this is a TTY frame, signal the caller that keyboard input is
77 available.
78
79 * w32xfns.c (drain_message_queue): Now returns an int: an
80 indication whether any WM_EMACS_FILENOTIFY messages were found in
81 the queue.
82
83 * w32inevt.c (handle_file_notifications): New function.
84 (w32_console_read_socket): Call it to process file notifications.
85
86 * w32console.c (initialize_w32_display): Record the main thread ID
87 in dwMainThreadId.
88
89 * deps.mk (inotify.o): New dependency list.
90
91 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
92
93 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
94 (WM_EMACS_END): Bump value by 1.
95 (notification_buffer_in_use, file_notifications)
96 (notifications_size, notifications_desc): Declare.
97 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
98 Add prototypes.
99
100 * w32term.c (lispy_file_action, queue_notifications): New functions.
101 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
102 <Qrenamed_to>: New symbols.
103 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
104
105 * w32notify.c: New file, implements file event notifications for
106 MS-Windows.
107
108 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
109 by posting it to the w32_read_socket queue.
110
111 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support
112 FILE_NOTIFY_EVENT.
113
114 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
115 (GLOBAL_SOURCES): Add w32notify.c
116 ($(BLD)/w32notify.$(O)): New set of dependencies.
117
118 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
119
120 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]: Handle
121 FILE_NOTIFY_EVENT.
122 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
123 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
124 w32notify-handle-event by default.
125
126 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
127 syms_of_w32notify.
128
81606b10
RS
1292012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
130
2b8c9064 131 Support for filesystem notifications on GNU/Linux via inotify.
81606b10
RS
132 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add
133 FILE_NOTIFY_EVENT.
134
135 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
136
137 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
138 (syms_of_keyboard): DEFSYM it.
139 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
140 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
141 Qfile_inotify events.
142 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
143 special-event-map to inotify-handle-event.
144
145 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
146
147 * Makefile.in (base_obj): Add inotify.o.
148
149 * inotify.c: New file.
150
265c2fbf 1512012-12-10 Jan Djärv <jan.h.d@swipnet.se>
a06ae17d
JD
152
153 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
154
265c2fbf 1552012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
cb576b5c
FP
156
157 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
158 DWORD_PTR, for compatibility with 64-bit builds.
159
a06ae17d 160 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
cb576b5c
FP
161 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
162 (system_process_attributes): Use SIZE_T rather than DWORD, for
163 compatibility with 64-bit builds.
164
265c2fbf 1652012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
76b92fee
CS
166
167 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
168
265c2fbf 1692012-12-10 Eli Zaretskii <eliz@gnu.org>
81d8cc53
EZ
170
171 * indent.c (Fvertical_motion): If a display string will be
172 displayed on the left or the right margin, don't consider it as a
173 factor in cursor positioning. (Bug#13108)
174
265c2fbf 1752012-12-10 Martin Rudalics <rudalics@gmx.at>
2cec368c
MR
176
177 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
178
5f460827
PE
1792012-12-10 Paul Eggert <eggert@cs.ucla.edu>
180
181 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
182 for string length.
183
a16e75cd
EZ
1842012-12-08 Eli Zaretskii <eliz@gnu.org>
185
186 * w32.c (unsetenv): Return 0 if the input string is too long.
187
5745a7df
PE
1882012-12-08 Paul Eggert <eggert@cs.ucla.edu>
189
190 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
191 * alloc.c (xputenv): New function.
192 * dbusbind.c (Fdbus_init_bus):
193 * emacs.c (main):
194 * xterm.c (x_term_init):
195 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
196 * editfns.c (initial_tz): Move static var decl up.
197 (tzvalbuf_in_environ): New static var.
198 (init_editfns): Initialize these two static vars.
199 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
200 Save old TZ value on stack, if it's small.
201 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
202 instead, use xputenv+unsetenv to set and restore TZ.
203 (environbuf): Remove static var. All uses removed.
204 (Fset_time_zone_rule): Do not save TZ and environ;
205 no longer needed here.
206 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
207 Move to inside set_time_zone_rule; they don't need file scope any more.
208 (set_time_zone_rule): Maintain the TZ=value string separately.
209 (syms_of_editfns): Don't initialize initial_tz;
210 init_editfns now does it.
211 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
212 * lisp.h (xputenv): New decl.
213
c56efa40
FP
2142012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
215
216 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
217
75ceee05
EZ
2182012-12-08 Eli Zaretskii <eliz@gnu.org>
219
220 * w32.c (unsetenv, sys_putenv): New functions.
221
1b6dbfeb
CY
2222012-12-08 Chong Yidong <cyd@gnu.org>
223
224 * editfns.c (Finsert_char): Make the error message more
225 informative (Bug#12992).
226
d983a10b
PE
2272012-12-08 Paul Eggert <eggert@cs.ucla.edu>
228
7be78020
PE
229 Simplify get_lim_data.
230 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
231 Remove USG and vlimit methods; no longer used these days.
232 Add #error catchall just in case.
233
d983a10b
PE
234 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
235 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
236 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
237 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
238 (deleted_pid_list, Fdelete_process, create_process)
239 (record_child_status_change, handle_child_signal, deliver_child_signal)
240 (init_process_emacs, syms_of_process):
241 Assume SIGCHLD is defined.
242 (parse_signal): Remove. All uses removed.
243 (abbr_to_signal): New static function.
244 (Fsignal_process): Use it to convert signal names to ints.
245 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
246 kill (getpgrp (), ...).
247 (emacs_sigaction_init): Assume SIGCHLD is defined.
248 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
249 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
250 * syssignal.h (EMACS_KILLPG): Remove.
251 All uses replaced by 'kill' with a negative pid.
252 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
253 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
254
9cdde1e2
PE
2552012-12-07 Paul Eggert <eggert@cs.ucla.edu>
256
257 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
258 This will cause a production Emacs to dump core instead of
259 infinite-looping.
260
822995f8
DA
2612012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
262
263 * frame.c (make_frame): Do not set window's buffer to t.
264 * window.c (Fsplit_window_internal): Likewise. Previously it was
265 used to indicate that the window is being set up. Now we use
266 set_window_buffer for all new windows, so the condition in ...
267 (Fset_window_buffer): ... is always true and can be removed.
268
ed08365b
DA
2692012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
270
271 Convenient macro to check whether the buffer is hidden.
272 * buffer.h (BUFFER_HIDDEN_P): New macro.
273 * frame.c (make_frame): Use it. Adjust comment.
274 * buffer.c (candidate_buffer): New function.
275 (Fother_buffer, other_buffer_safely): Use it.
276
e86f5134
EZ
2772012-12-06 Eli Zaretskii <eliz@gnu.org>
278
279 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
280 if the child process is still running. Instead, exit the wait
281 loop and return zero. (Bug#13086)
282
1700db3c
DA
2832012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
284
285 * frame.h (x_char_width, x_char_height): Remove prototypes.
286 * w32term.h (x_char_width, x_char_height): Likewise.
287 * xfns.c (x_char_width, x_char_height): Remove.
288 * w32fns.c (x_char_width, x_char_height): Likewise.
289 * nsfns.c (x_char_width, x_char_height): Likewise.
290 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
291 all window frames.
292 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
293 * keyboard.c (command_loop_1): Remove prototype.
294 (command_loop_2, top_level_1): Add static to match prototype.
295
35fb8050
PE
2962012-12-06 Paul Eggert <eggert@cs.ucla.edu>
297
298 Fix a recently-introduced delete-process race condition.
299 * callproc.c, process.h (record_kill_process):
300 New function, containing part of the old call_process_kill.
301 (call_process_kill): Use it.
302 This does not change call_process_kill's behavior.
303 * process.c (Fdelete_process): Use record_kill_process to fix a
304 race condition that could cause Emacs to lose track of a child.
305
565212e5
DA
3062012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
307
308 Avoid code duplication between prev_frame and next_frame.
309 * frame.c (candidate_frame): New function. Add comment.
310 (prev_frame, next_frame): Use it. Adjust comment.
311
d8ad4d3f 3122012-12-06 Eli Zaretskii <eliz@gnu.org>
d3cefd13
EZ
313
314 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
315 fails, signal an error instead of continuing with an empty
316 string. (Bug#13079)
7c2fcf9b
EZ
317 Encode expanded temp file pattern before passing it to mkstemp or
318 mktemp.
d3cefd13 319
2e7cddd3
EZ
320 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
321 Encode the file name before passing it to dostounix_filename, in
322 case it will downcase it (under w32-downcase-file-names).
323 (Bug#12933)
324
644d3f0d
PE
3252012-12-05 Paul Eggert <eggert@cs.ucla.edu>
326
327 Minor call-process cleanups.
328 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
329 at the same time as other platforms, to simplify analysis.
330 No need for fd0_volatile since we have synch_process_fd.
331 Avoid needless emacs_close; arg is always negative.
332
396376f1
AS
3332012-12-04 Andreas Schwab <schwab@linux-m68k.org>
334
335 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
336 processes.
337
350f51ad
DA
3382012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
339
340 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
341 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
342 and mouse_face_hidden members to a bitfields.
343 * frame.h (struct frame): Remove set-but-not-used space_width member.
344 (FRAME_SPACE_WIDTH): Remove.
345 * nsterm.m, w32term.c, xterm.c: Adjust users.
346 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
347 member. Adjust users. Convert term_initted, delete_in_insert_mode,
348 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
349 members to a bitfields.
350
bc9dbce6
PE
3512012-12-03 Paul Eggert <eggert@cs.ucla.edu>
352
bb5f74ee
PE
353 Don't let call-process be a zombie factory (Bug#12980).
354 Fixing this bug required some cleanup of the signal-handling code.
355 As a side effect, this change also fixes a longstanding rare race
356 condition whereby Emacs could mistakenly kill unrelated processes,
357 and it fixes a bug where a second C-g does not kill a recalcitrant
358 synchronous process in GNU/Linux and similar platforms.
359 The patch should also fix the last vestiges of Bug#9488,
360 a bug which has mostly been fixed on the trunk by other changes.
361 * callproc.c, process.h (synch_process_alive, synch_process_death)
362 (synch_process_termsig, sync_process_retcode):
363 Remove. All uses removed, to simplify analysis and so that
364 less consing is done inside critical sections.
365 * callproc.c (call_process_exited): Remove. All uses replaced
366 with !synch_process_pid.
367 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
368 These take the role of what used to be in unwind-protect arg.
369 All uses changed.
370 (block_child_signal, unblock_child_signal):
371 New functions, to avoid races that could kill innocent-victim processes.
372 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
373 (call_process_kill): Record killed processes as deleted, so that
374 zombies do not clutter up the system. Do this inside a critical
375 section, to avoid a race that would allow the clutter.
376 (call_process_cleanup): Fix code so that the second C-g works again
377 on common platforms such as GNU/Linux.
378 (Fcall_process): Create the child process in a critical section,
379 to fix a race condition. If creating an asynchronous process,
380 record it as deleted so that zombies do not clutter up the system.
381 Do unwind-protect for WINDOWSNT too, as that's simpler in the
382 light of these changes. Omit unnecessary call to emacs_close
383 before failure, as the unwind-protect code does that.
384 * callproc.c (call_process_cleanup):
385 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
386 * process.c (record_deleted_pid): New function, containing
387 code refactored out of Fdelete_process.
388 (Fdelete_process): Use it.
389 (process_status_retrieved): Remove. All callers changed to use
390 child_status_change.
391 (record_child_status_change): Remove, folding its contents into ...
392 (handle_child_signal): ... this signal handler. Now, this
393 function is purely a handler for SIGCHLD, and is not called after
394 a synchronous waitpid returns; the synchronous code is moved to
395 wait_for_termination. There is no need to worry about reaping
396 more than one child now.
397 * sysdep.c (get_child_status, child_status_changed): New functions.
398 (wait_for_termination): Now takes int * status and bool
399 interruptible arguments, too. Do not record child status change;
400 that's now the caller's responsibility. All callers changed.
401 Reimplement in terms of get_child_status.
402 (wait_for_termination_1, interruptible_wait_for_termination):
403 Remove. All callers changed to use wait_for_termination.
404 * syswait.h: Include <stdbool.h>, for bool.
405 (record_child_status_change, interruptible_wait_for_termination):
406 Remove decls.
407 (record_deleted_pid, child_status_changed): New decls.
408 (wait_for_termination): Adjust to API changes noted above.
409
bc9dbce6
PE
410 * bytecode.c, lisp.h (Qbytecode): Remove.
411 No longer needed after 2012-11-20 interactive-p changes.
412
3cf3c607
EZ
4132012-12-03 Eli Zaretskii <eliz@gnu.org>
414
415 * xdisp.c (redisplay_window): If the cursor is visible, but inside
416 the scroll margin, move point outside the margin. (Bug#13055)
417
005c8d13
JD
4182012-12-03 Jan Djärv <jan.h.d@swipnet.se>
419
420 * gtkutil.c (my_log_handler): New function.
421 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
422
20edc1c9
DA
4232012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
424
425 * lisp.h (modify_region): Rename to...
426 (modify_region_1): ...new prototype.
427 * textprop.c (modify_region): Now static. Adjust users.
428 * insdel.c (modify_region): Rename to...
429 (modify_region_1): ...new function to work with current buffer.
430 Adjust comment and users. Use true and false for booleans.
431
62c2e5ed
DA
4322012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
433
434 * alloc.c (free_save_value): New function.
435 (safe_alloca_unwind): Use it.
436 * lisp.h (free_save_value): New prototype.
437 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
438 Add comment.
439 (save_excursion_restore): Adjust to match saved data structure.
440 Use free_save_value to offload some work from GC. Drop obsolete
441 #if 0 code.
442
c5bc2d1d 4432012-12-03 Chong Yidong <cyd@gnu.org>
a2458031
CY
444
445 * fileio.c (Vauto_save_list_file_name): Doc fix.
446
c5bc2d1d 4472012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
c7b36b95
FP
448
449 * w32fns.c: Remove prototype of atof.
450 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit
451 builds.
452 (file_dialog_callback): Declared UINT_PTR.
453
454 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
455 with 64-bit builds.
456
457 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
458 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
459 defined.
460
c5bc2d1d 4612012-12-03 Glenn Morris <rgm@gnu.org>
14d27346 462
a9de9f0c 463 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
14d27346 464
21e54a94
PE
4652012-12-02 Paul Eggert <eggert@cs.ucla.edu>
466
2dd2e622
PE
467 Fix xpalloc confusion after memory is exhausted.
468 * alloc.c (xpalloc): Comment fix.
469 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
470 and signals an error, do not clear charset_table_size, as
471 charset_table is still valid.
472 * doprnt.c (evxprintf): Clear *BUF after freeing it.
473
21e54a94
PE
474 Use execve to avoid need to munge environ (Bug#13054).
475 * callproc.c (Fcall_process):
476 * process.c (create_process):
477 Don't save and restore environ; no longer needed.
478 * callproc.c (child_setup):
479 Use execve, not execvp, to preserve environ.
480
3e5490f7
PE
4812012-12-01 Paul Eggert <eggert@cs.ucla.edu>
482
483 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
484
75b4f59c
YM
4852012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
486
487 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
488 display for sliced images (Bug#10500).
489
490 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
491
f8aff4c6
JB
4922012-11-30 Juanma Barranquero <lekktu@gmail.com>
493
494 * doc.c (Fdocumentation): Re-add handling of function-documentation,
495 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
496
3940b924
DA
4972012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
498
499 * xdisp.c (window_outdated): Remove eassert since it hits
500 some suspicious corner cases (see Bug#13007 and Bug#13012).
501 (mode_line_update_needed): New function.
502 (redisplay_internal, redisplay_window): Use it.
503 (ensure_selected_frame): New function.
504 (redisplay_internal, unwind_redisplay): Use it.
505 (redisplay_internal): Move comment about buffer_shared...
506 (buffer_shared_and_changed): ...near to its real use.
507
4a9204fe
PE
5082012-11-29 Paul Eggert <eggert@cs.ucla.edu>
509
510 * callproc.c (Fcall_process): Don't misreport vfork failure.
511
60aeceb8
PE
5122012-11-28 Paul Eggert <eggert@cs.ucla.edu>
513
514 * callproc.c (Fcall_process): Fix vfork portability problems.
515 Do not assume that fd[0], count, filefd, and save_environ survive
516 vfork. Fix bug whereby wrong errno value could be reported for
517 pipe failure. Some minor cleanups, too, as follows. Move buf and
518 bufsize to the context where they're needed. Change new_argv to
519 be of type char **, as this is more convenient and avoids casts.
520 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
521 Now local constants, not macros.
522
00dc3ead
KH
5232012-11-18 Kenichi Handa <handa@gnu.org>
524
525 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
526 for the variable "f".
527
e1bf05c1
KH
5282012-11-13 Kenichi Handa <handa@gnu.org>
529
530 * font.c (font_unparse_xlfd): Exclude special characters from the
531 generating XLFD name.
532
22626a85
PE
5332012-11-27 Paul Eggert <eggert@cs.ucla.edu>
534
350e0088
PE
535 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
536 * dired.c (stat_uname, stat_gname):
537 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
538
22626a85
PE
539 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
540 * dired.c (directory_files_internal, file_name_completion):
541 Assume EAGAIN and EINTR are defined.
350e0088 542
22626a85
PE
543 * fileio.c (Fcopy_file): Assume EISDIR is defined.
544 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
545 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
546 * lread.c (readbyte_from_file): Assume EINTR is defined.
547 * process.c (wait_reading_process_output, send_process) [subprocesses]:
548 Assume EIO and EAGAIN are defined.
549 * unexcoff.c (write_segment): Assume EFAULT is defined.
550
5c9cf0a3 5512012-11-27 Eli Zaretskii <eliz@gnu.org>
3fa1e84d
EZ
552
553 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
554 (Bug#11964)
555
22294a56
EZ
556 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
557 highlighting on the frame was cleared. Prevents assertion
558 violations when repeatedly clicking on the "Top" link of the
559 "bread-crumbs" in Info buffers.
560
5fbab051
PE
5612012-11-25 Paul Eggert <eggert@cs.ucla.edu>
562
563 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
564
bcd77a2b
KB
5652012-11-24 Ken Brown <kbrown@cornell.edu>
566
567 * keyboard.c (HAVE_MOUSE):
568 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
569 were always defined.
570
d125ca15 5712012-11-24 Eli Zaretskii <eliz@gnu.org>
8654a41b 572
24becea4
EZ
573 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
574 between bpos_covered and bpos_max. This fixes cursor display when
575 several display strings follow each other.
576
8654a41b
EZ
577 * .gdbinit (pgx): If the glyph's object is a string, display the
578 pointer to string data, rather than the value of the string object
579 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
580
cb5867b1
EZ
581 * indent.c (Fvertical_motion): If the starting position is covered
582 by a display string, return to one position before that, to avoid
583 overshooting it inside move_it_to. (Bug#12930)
584
f418b22e
DA
5852012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
586
587 * frame.h (struct frame): Remove display_preempted member
588 since all users are dead long ago.
589 * nsterm.h (struct x_output): Use the only dummy member.
590 * w32menu.c (pending_menu_activation): Remove since not
591 really used.
592 (set_frame_menubar): Adjust user.
593 * w32term.h (struct x_output): Drop outdated #if 0 code.
594 (struct w32_output): Use bitfields for explicit_parent,
595 asked_for_visible and menubar_active members. Drop
596 unused pending_menu_activation member.
597 * xterm.h (struct x_output): Drop outdated #if 0 code.
598 Use bitfields for explicit_parent, asked_for_visible,
599 has_been_visible and net_wm_state_hidden_seen members.
600
a879f0ea
EZ
6012012-11-23 Eli Zaretskii <eliz@gnu.org>
602
603 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
604 of a literal "/". (Bug#12955)
605 (gl-stamp): Invoke fc.exe directly, not through cmd.
606
95ef7787
PE
6072012-11-23 Paul Eggert <eggert@cs.ucla.edu>
608
609 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
610 * dired.c: Assume HAVE_DIRENT_H.
611 (NAMLEN): Remove, replacing with ...
612 (dirent_namelen): New function. All uses changed. Use the GNU macro
613 _D_EXACT_NAMELEN if available, as it's faster than strlen.
614 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
615 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
616 * makefile.w32-in (DIR_H): Remove. All uses replaced with
617 $(NT_INC)/dirent.h.
618 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
619 * ndir.h: Rename to ../nt/inc/dirent.h.
620 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
621 Do not include <dirent.h>; no longer needed.
622 * w32.c: Include <dirent.h> rather than "ndir.h".
623
12645ae6
CY
6242012-11-23 Chong Yidong <cyd@gnu.org>
625
626 * xftfont.c (xftfont_open): Remove duplicate assignment.
627
5c747675
DA
6282012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
629
630 * alloc.c (Fgarbage_collect): Unblock input after clearing
631 gc_in_progress to avoid note_mouse_highlight glitch with GC.
632 * frame.h (FRAME_MOUSE_UPDATE): New macro.
633 * msdos.c (IT_frame_up_to_date): Use it here...
634 * w32term.c (w32_frame_up_to_date): ...here...
635 * xterm.c (XTframe_up_to_date): ...and here...
636 * nsterm.m (ns_frame_up_to_date): ...but not here.
637 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
638 Adjust users.
639 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
640 Do not check whether GC is in progress.
641
6ceeb5f1
DA
6422012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
643
644 * xdisp.c (window_buffer_changed): New function.
645 (update_menu_bar, update_tool_bar): Use it to
646 simplify large 'if' statements.
647 (redisplay_internal): Generalize commonly used
648 'tail' and 'frame' local variables.
649
ec84768f
EZ
6502012-11-22 Eli Zaretskii <eliz@gnu.org>
651
652 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
653 with Windows system header.
654
9239d970
PE
6552012-11-21 Paul Eggert <eggert@cs.ucla.edu>
656
657 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
658 * alloc.c: Assume unistd.h exists.
659 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
660 * sysdep.c (get_current_dir_name): Assume getcwd exists.
661 (getwd) [USG]: Remove; no longer needed.
662 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
663 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
664 * w32.h (getcwd): Remove decl.
665
954bba56
SM
6662012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
667
668 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
669 Make it set selected_window as well.
670 (update_tool_bar): Use it.
671
6ef2e5ef 6722012-11-21 Ken Brown <kbrown@cornell.edu>
4ffea447
KB
673
674 * emacs.c (main): Set the G_SLICE environment variable for all
675 Cygwin builds, not just GTK builds. See
676 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
677
6ef2e5ef 6782012-11-21 Eli Zaretskii <eliz@gnu.org>
88c4a13c
EZ
679
680 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
681 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
682 Define for the MSVC compiler.
683
6ef2e5ef 684 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
273ac8d1
EZ
685
686 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
687 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
688 dostounix_filename. Prevents crashes down the road, because
689 dostounix_filename assumes it gets a unibyte string. Reported by
690 Michel de Ruiter <michel@sentient.nl>, see
691 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
692
eadf1faa
SM
6932012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
694
695 Conflate Qnil and Qunbound for `symbol-function'.
696 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
697 * lread.c (init_obarray): Set `function' fields to Qnil.
698 * eval.c (Fcommandp): Ignore Qunbound.
699 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
700 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
701 Test NILP rather than Qunbound.
702 (Ffmakunbound): Set to Qnil.
703 (Fsymbol_function): Never signal an error.
704 (Finteractive_form): Ignore Qunbound.
705
b83fdfa9
PE
7062012-11-20 Paul Eggert <eggert@cs.ucla.edu>
707
708 * eval.c (interactive_p): Remove no-longer-used decl.
709
952580c5
DA
7102012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
711
712 * xdisp.c (buffer_shared): Adjust comment.
713 (buffer_shared_and_changed): New function.
714 (prepare_menu_bars, redisplay_internal): Use it to
715 decide whether all windows or frames should be updated.
ea6de9b1
DA
716 (window_outdated): New function.
717 (text_outside_line_unchanged_p, redisplay_window): Use it.
718 (redisplay_internal): Likewise. Fix indentation.
952580c5 719
23ba2705
SM
7202012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
721
722 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
723 (syms_of_eval): Remove corresponding defsubr.
724 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
725
6e9f7997
DC
7262012-11-19 Daniel Colascione <dancol@dancol.org>
727
728 * w32fns.c (Fx_file_dialog):
729 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
730 cygwin_convert_file_name*.
731
732 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
733 Rename cygwin_convert_path* to cygwin_convert_file_name*.
734
552a1590
PE
7352012-11-18 Paul Eggert <eggert@cs.ucla.edu>
736
737 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
738
2ac9538d 7392012-11-18 Eli Zaretskii <eliz@gnu.org>
d8715cdf
EZ
740
741 * w32select.c: Include w32common.h before w32term.h, so that
742 windows.h gets included before w32term.h uses some of its
743 features, see below.
744
23ba2705
SM
745 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
746 New typedefs.
747 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
748 New prototypes.
d8715cdf
EZ
749 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
750
2ac9538d 7512012-11-18 Jan Djärv <jan.h.d@swipnet.se>
7436fc63
JD
752
753 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
754 (ns_select): Return at once if events are held (Bug#12834).
755
2ac9538d 7562012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
86dcf21c 757
758 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
759 Needed following 2012-10-20 change. (Bug#12902)
760
c1f7ba3a
JB
7612012-11-18 Juanma Barranquero <lekktu@gmail.com>
762
763 * w32proc.c (waitpid): Remove unused label get_result.
764
a75ce9d3
JB
7652012-11-17 Juanma Barranquero <lekktu@gmail.com>
766
767 * makefile.w32-in (SYSWAIT_H): New macro.
768 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
769 ($(BLD)/sysdep.$(O)): Update dependencies.
770
49cdacda
PE
7712012-11-17 Paul Eggert <eggert@cs.ucla.edu>
772
773 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
774 * callproc.c (relocate_fd): Assume F_DUPFD.
775 * emacs.c, term.c (O_RDWR): Remove.
776 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
777 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
778 * nsterm.m: Assume <fcntl.h> exists.
779 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
780 (create_pty, Fmake_network_process, server_accept_connection)
781 (wait_reading_process_output, init_process_emacs):
782 Assume O_NONBLOCK.
783 (wait_reading_process_output): Put in a special case for WINDOWSNT
784 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
785 It's not clear this is needed, but it's a more-conservative change.
786 (create_process): Assume FD_CLOEXEC.
787 (create_process, create_pty): Assume O_NOCTTY.
788 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
789 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
790 Omit if not DOS_NT, since F_GETFL is not defined there.
791 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
792 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
793 (O_NOCTTY): Remove.
794 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
795 lack it, since gnulib guarantees this.
796 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
797
22bae83f
EZ
7982012-11-17 Eli Zaretskii <eliz@gnu.org>
799
6ad30855
EZ
800 * w32.c (faccessat): Pretend that directories have the execute bit
801 set. Emacs expects that, e.g., in files.el:cd-absolute.
802
22bae83f
EZ
803 * w32proc.c (create_child): Don't clip the PID of the child
804 process to fit into an Emacs integer, as this is no longer a
805 restriction.
806 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
807 reaping only the process specified by PID argument, if that is
808 positive. Use PID instead of dead_child to know which process to
809 reap. Wait for the child to die only if WNOHANG is not in
810 OPTIONS.
811 (sys_select): Don't set dead_child.
812
813 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
814 as it is no longer needed.
815
816 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
817 no longer needed.
818 (record_child_status_change): Remove the setting of
819 record_at_most_one_child for the !WNOHANG case.
820
a631d0e0
PE
8212012-11-17 Paul Eggert <eggert@cs.ucla.edu>
822
823 Fix problems in ns port found by static checking.
824 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
825 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
826 not to process group.
827 (ns_select): Use emacs_write, not write, as that's more robust
828 in the presence of signals.
829 (fd_handler:): Check for read errors.
830
d56f2e49
GM
8312012-11-16 Glenn Morris <rgm@gnu.org>
832
833 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
834
96e05507 8352012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
5c2a7148
SM
836
837 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
838
96e05507 8392012-11-16 Eli Zaretskii <eliz@gnu.org>
730b2d8f
EZ
840
841 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
842 use the same value of thread handle.
843 (start_timer_thread): If the timer thread exited (due to error),
844 clean up by closing the two handles it used. Duplicate the caller
845 thread's handle here, so it gets duplicated only once, when
846 launching the timer thread. Set priority of the timer thread, not
847 the caller thread.
848 (getitimer): Don't duplicate the caller thread's handle here.
849 (Bug#12832)
850
96e05507 8512012-11-16 Jan Djärv <jan.h.d@swipnet.se>
f99c65e5
JD
852
853 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
854 called (Bug#12834).
855
3d082a26
PE
8562012-11-16 Paul Eggert <eggert@cs.ucla.edu>
857
858 Remove no-longer-used pty_max_bytes variable.
859 * process.c (pty_max_bytes): Remove; unused.
860 (send_process): Do not set it.
861
b72c161c
JB
8622012-11-15 Juanma Barranquero <lekktu@gmail.com>
863
864 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
865 Update dependencies.
866
bf20ea80
PE
8672012-11-15 Paul Eggert <eggert@cs.ucla.edu>
868
869 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
870 This follows up on the 2012-09-29 patch that removed indirection
871 for the 'function' field. Reported by Sergey Vinokurov in
872 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
873
14f20728
EZ
8742012-11-14 Eli Zaretskii <eliz@gnu.org>
875
876 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
877 different name, as the MS runtime does not have such a function,
878 and probably never will.) All callers changed. Ignore DIRFD
879 value if PATH is an absolute file name, to match Posix spec
880 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
881 symlinks.
882
77731919
DA
8832012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
884
885 * xdisp.c (echo_area_display, redisplay_internal):
886 Omit redundant check whether frame_garbaged is set.
887
73dcdb9f
PE
8882012-11-14 Paul Eggert <eggert@cs.ucla.edu>
889
890 Use faccessat, not access, when checking file permissions (Bug#12632).
891 This fixes a bug that has been present in Emacs since its creation.
892 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
893 which must set some sort of record. (Torek's bug report was against
894 a predecessor of GNU Emacs, but GNU Emacs happened to have the
895 same common flaw.) See Torek's Usenet posting
896 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
897 Posted: Fri Apr 8 14:18:56 1983.
898 * Makefile.in (LIB_EACCESS): New macro.
899 (LIBES): Use it.
900 * callproc.c (init_callproc):
901 * charset.c (init_charset):
902 * fileio.c (check_existing, check_executable, check_writable)
903 (Ffile_readable_p):
904 * lread.c (openp, load_path_check):
905 * process.c (allocate_pty):
906 * xrdb.c (file_p):
907 Use effective UID when checking permissions, not real UID.
908 * callproc.c (init_callproc):
909 * charset.c (init_charset):
910 * lread.c (load_path_check, init_lread):
911 Test whether directories are accessible, not merely whether they exist.
912 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
913 * fileio.c (check_existing, check_executable, check_writable)
914 (Ffile_readable_p):
915 Use symbolic names instead of integers for the flags, as they're
916 portable now.
917 (check_writable): New arg AMODE. All uses changed.
918 Set errno on failure.
919 (Ffile_readable_p): Use faccessat, not stat + open + close.
920 (Ffile_writable_p): No need to call check_existing + check_writable.
921 Just call check_writable and then look at errno. This saves a syscall.
922 dir should never be nil; replace an unnecessary runtime check
923 with an eassert. When checking the parent directory of a nonexistent
924 file, check that the directory is searchable as well as writable, as
925 we can't create files in unsearchable directories.
926 (file_directory_p): New function, which uses 'stat' on most platforms
927 but faccessat with D_OK (for efficiency) if WINDOWSNT.
928 (Ffile_directory_p, Fset_file_times): Use it.
929 (file_accessible_directory_p): New function, which uses a single
930 syscall for efficiency.
931 (Ffile_accessible_directory_p): Use it.
932 * xrdb.c (file_p): Use file_directory_p.
933 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
934 * lread.c (openp): When opening a file, use fstat rather than
935 stat, as that avoids a permissions race. When not opening a file,
936 use file_directory_p rather than stat.
937 (dir_warning): First arg is now a usage string, not a format.
938 Use errno. All uses changed.
939 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
940 that merely introduced a race.
941 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
942 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
943 and similarly for the other O_* flags.
944 * w32.c (sys_faccessat): Rename from sys_access and switch to
945 faccessat's API. All uses changed.
946 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
947 (magic_db): Rename from magic_file_p.
948 (magic_db, search_magic_path): Return an XrmDatabase rather than a
949 char *, so that we don't have to test for file existence
950 separately from opening the file for reading. This removes a race
951 fixes a permission-checking problem, and simplifies the code.
952 All uses changed.
953 (file_p): Remove; no longer needed.
954
2a14f83b
DA
9552012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
956
957 Omit glyphs initialization at startup.
958 * dispnew.c (glyphs_initialized_initially_p): Remove.
959 (adjust_frame_glyphs_initially): Likewise. Adjust users.
960 (Fredraw_frame): Move actual code from here...
c7085245 961 (redraw_frame): ...to here. Add eassert. Adjust comment.
2a14f83b
DA
962 (Fredraw_display): Use redraw_frame.
963 * xdisp.c (clear_garbaged_frames): Likewise.
964
f78ee6af 9652012-11-13 Eli Zaretskii <eliz@gnu.org>
32520273
EZ
966
967 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
968 passed to pint2str and pint2hrstr to be at most the size of the
969 frame's decode_mode_spec_buffer. This avoids crashes with very
970 large values of FIELD_WIDTH argument to decode_mode_spec.
971 (Bug#12867)
972
b95a9c0c
PE
9732012-11-13 Paul Eggert <eggert@cs.ucla.edu>
974
975 Fix a race with verify-visited-file-modtime (Bug#12863).
976 Since at least 1991 Emacs has ignored an mtime difference of no
977 more than one second, but my guess is that this was to work around
978 file system bugs that were fixed long ago. Since the race is
979 causing problems now, let's remove that code.
980 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
981 whose time stamp is off by no more than a second. Insist that the
982 file time stamps match exactly.
983
be49ba74
DA
9842012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
985
986 * frame.h (struct frame): Convert external_tool_bar member to
987 1-bit unsigned bitfield.
988 * termhooks.h (struct terminal): Remove mouse_moved member since
989 all users are long dead. Adjust comment on mouse_position_hook.
990
5b04e9f9
DA
9912012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
992
993 Simplify by using FOR_EACH_FRAME here and there.
994 * frame.c (next_frame, prev_frame, other_visible_frames)
995 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
996 * w32term.c (x_window_to_scroll_bar): Likewise.
997 * window.c (window_list): Likewise.
998 * xdisp.c (x_consider_frame_title): Likewise.
999 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
1000 * xfns.c (x_window_to_frame, x_any_window_to_frame)
1001 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
1002 * xmenu.c (menubar_id_to_frame): Likewise.
1003 * xselect.c (frame_for_x_selection): Likewise.
1004 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
1005 (x_window_to_menu_bar): Likewise.
1006 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
1007
76ae24d7
PE
10082012-11-12 Paul Eggert <eggert@cs.ucla.edu>
1009
12cc4337
PE
1010 * data.c (Qdefalias_fset_function): Now static.
1011
76ae24d7
PE
1012 Another tweak to vectorlike_header change.
1013 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
1014 Remove, and replace all uses with ...
1015 (next_in_free_list, set_next_in_free_list):
1016 New functions, which respect C's aliasing rules better.
1017
1479c557
PE
10182012-11-11 Paul Eggert <eggert@cs.ucla.edu>
1019
1020 * window.c (list4i): Rename from 'quad'. All uses changed.
1021 Needed because <sys/types.h> defines 'quad' on Solaris 10.
1022
11235c03
JB
10232012-11-11 Juanma Barranquero <lekktu@gmail.com>
1024
1025 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
1026 warning about mixing declarations and code in ISO C90.
1027
6baf66d5 10282012-11-10 Martin Rudalics <rudalics@gmx.at>
fdaf534a
MR
1029
1030 * window.c (Fsplit_window_internal): Set combination limit of
1031 new parent window to t iff Vwindow_combination_limit is t;
1032 fixing a regression introduced with the change from 2012-09-22.
6baf66d5 1033 (Fset_window_combination_limit): Fix doc-string.
fdaf534a 1034
6baf66d5 10352012-11-10 Eli Zaretskii <eliz@gnu.org>
acf93bcf
EZ
1036
1037 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
1038 amount when the scroll margins are too large. When scrolling
1039 backwards in the buffer, give up if cannot reach point or the
23ba2705
SM
1040 scroll margin within a reasonable number of screen lines.
1041 Fixes point position in window under scroll-up/down-aggressively when
acf93bcf
EZ
1042 point is positioned many lines beyond the window top/bottom.
1043 (Bug#12811)
1044
508f51f5
EZ
1045 * ralloc.c (relinquish): If real_morecore fails to return memory
1046 to the system, don't crash; instead, leave the last heap
1047 unchanged and return. (Bug#12774)
1048
32e5c58c
SM
10492012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1050
1051 * lisp.h (AUTOLOADP): New macro.
1052 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
1053 * data.c (Ffset): Remove special ad-advice-info handling.
1054 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
1055 (Fsubr_arity): CSE.
1056 (Finteractive_form): Simplify.
1057 (Fquo): Don't insist on having at least 2 arguments.
1058 (Qdefalias_fset_function): New var.
1059
719b0aa5
JD
10602012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1061
4ab15c3e
JD
1062 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
1063
719b0aa5
JD
1064 * nsfont.m (Qcondensed, Qexpanded): New variables.
1065 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
1066 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
1067
535cc8e9
DA
10682012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1069
1070 Fix recently introduced crash on MS-Windows (Bug#12839).
1071 * w32term.h (struct scroll_bar): Use convenient header.
1072 (SCROLL_BAR_VEC_SIZE): Remove.
1073 * w32term.c (x_scroll_bar_create): Use VECSIZE.
1074
7d377c48
DA
10752012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1076
1077 Tweak last vectorlike_header change.
1078 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
1079 vectorlike object on the free list. This is introduced to avoid
1080 some (but not all) pointer casting and aliasing problems, see
1081 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
1082 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
1083 objects.
1084 (xvectype, xvecsize): Use them to examine Lisp_Object values.
1085
7ad27466
JD
10862012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1087
32e5c58c 1088 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
7ad27466
JD
1089 been removed, so remove them here also.
1090
57618ecf
SM
10912012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1092
1093 * doc.c (Fdocumentation): Handle new property
1094 dynamic-docstring-function to replace the old ad-advice-info.
1095
53371430
PE
10962012-11-09 Paul Eggert <eggert@cs.ucla.edu>
1097
1098 * fns.c (Qeql, hashtest_eq): Now static.
1099
61ddb1b9
SM
11002012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1101
1102 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
1103 * fns.c (hashfn_eq, hashfn_eql, sxhash):
1104 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
1105 * buffer.c (compare_overlays): Use XLI rather than XHASH.
1106
04a2d0d3
PE
11072012-11-08 Paul Eggert <eggert@cs.ucla.edu>
1108
1109 Use same hash function for hashfn_profiler as for hash_string etc.
1110 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
1111 * lisp.h (sxhash_combine): New inline function, with the contents
1112 of the old SXHASH_COMBINE.
1113 * profiler.c (hashfn_profiler): Use it, instead of having a
1114 special hash function containing a comparison that always yields 1.
1115
de5ef41a
SM
11162012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1117
1118 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
1119 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
1120 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
1121 Remove unused vars.
1122
a23c4171
JD
11232012-11-08 Jan Djärv <jan.h.d@swipnet.se>
1124
1125 * image.c (xpm_make_color_table_h): Fix compiler error because
1126 make_hash_table changed.
1127
074d7bb0
JD
11282012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
1129
1130 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
1131
b7432bb2
SM
11322012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1133
1134 Use ad-hoc comparison function for the profiler's hash-tables.
1135 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
1136 (make_log): Use them.
1137 (handle_profiler_signal): Don't inhibit quit any longer since we don't
1138 call Fequal any more.
1139 (Ffunction_equal): New function.
1140 (cmpfn_profiler, hashfn_profiler): New functions.
1141 (syms_of_profiler): Initialize them.
1142 * lisp.h (struct hash_table_test): New struct.
1143 (struct Lisp_Hash_Table): Use it.
1144 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
1145 * fns.c (make_hash_table): Take a struct to describe the test.
1146 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
1147 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
1148 (hash_lookup, hash_remove_from_table): Move assertion checking of
1149 hashfn result here. Check hash-equality before calling cmpfn.
1150 (Fmake_hash_table): Adjust call to make_hash_table.
1151 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
1152 (syms_of_fns): Initialize them.
1153 * emacs.c (main): Move syms_of_fns earlier.
1154 * xterm.c (syms_of_xterm):
1155 * category.c (hash_get_category_set): Adjust call to make_hash_table.
1156 * print.c (print_object): Adjust to new hash-table struct.
1157 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
1158
88002743
EZ
11592012-11-08 Eli Zaretskii <eliz@gnu.org>
1160
1161 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
1162 value of w32-scroll-lock-modifier is neither nil nor one of the
1163 known key modifiers. (Bug#12806)
1164
914adc42
DA
11652012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1166
1167 Shrink struct vectorlike_header to the only size field.
1168 * lisp.h (enum pvec_type): Avoid explicit enum member values.
1169 Adjust comment.
1170 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
1171 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
1172 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
1173 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
1174 information from the vector header. Adjust comment.
1175 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
1176 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
1177 layout.
1178 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
1179 (struct vectorlike_header): Remove next member. Adjust comment.
1180 (struct Lisp_Subr): Add convenient header. Adjust comment.
1181 (allocate_pseudovector): Adjust prototype.
1182 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
1183 (sweep_string, lisp_malloc): Remove useless prototypes.
1184 (enum mem_type): Adjust comment.
1185 (NEXT_IN_FREE_LIST): New macro.
1186 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
1187 (Fmake_bool_vector): Likewise.
1188 (struct large_vector): New type to represent allocation unit for
1189 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
1190 (large_vectors): Change type to struct large_vector.
1191 (allocate_vector_from_block): Simplify.
1192 (PSEUDOVECTOR_NBYTES): Replace with...
1193 (vector_nbytes): ...new function. Adjust users.
1194 (sweep_vectors): Adjust processing of large vectors.
1195 (allocate_vectorlike): Likewise.
1196 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
1197 Add easserts. Adjust XSETPVECTYPESIZE usage.
1198 (allocate_buffer): Use BUFFER_PVEC_INIT.
1199 (live_vector_p): Adjust to match large vector.
1200 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
1201 * buffer.h (struct buffer): Add next member.
1202 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
1203 New macros.
1204 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
1205 * fns.c (internal_equal): Adjust to match enum pvec_type change.
1206 (copy_hash_table): Adjust to match vector header change.
1207 * lread.c (defsubr): Use XSETPVECTYPE.
1208 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
1209 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
1210 (xvecsize): New command.
1211
c66f21ea
DA
12122012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1213
1214 * keyboard.c (event_to_kboard): Do not dereference
1215 frame_or_window field of SELECTION_REQUEST_EVENT
1216 and SELECTION_CLEAR_EVENT events (Bug#12814).
1217 * xterm.h (struct selection_input_event): Adjust comment.
1218
eb147960
EZ
12192012-11-07 Eli Zaretskii <eliz@gnu.org>
1220
dab72075
EZ
1221 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
1222 such as Scroll Lock, if the respective keys are treated as
1223 function keys, not as modifiers. This avoids destroying non-ASCII
6b064c16 1224 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
eb147960 1225
5890e400
DA
12262012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
1227
1228 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
1229
b6b3b294
PE
12302012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1231
1232 Restore some duplicate definitions (Bug#12814).
1233 This undoes part of the 2012-11-03 changes. Some people build
1234 with plain -g rather than with -g3, and they need the duplicate
1235 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
1236 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
1237 Define as macros, as well as as enums or as constants.
1238
e770aad5
JD
12392012-11-06 Jan Djärv <jan.h.d@swipnet.se>
1240
1241 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
1242 to keypad keys (Bug#12816).
1243
68f8f1c0
PE
12442012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1245
1246 Minor adjustments of recently-changed frame functions.
1247 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
1248 known to be a frame (we're in the FRAMEP branch).
1249 * lisp.h (Qframep): Remove decl. frame.h declares this.
1250 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
1251 since they're meant for Lisp fixnum values.
1252
72f94d4b
DA
12532012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1254
1255 * window.c (Fwindow_combination_limit): Revert to the only
1256 required argument and adjust docstring as suggested in
1257 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
1258 by Martin Rudalics <rudalics@gmx.at>.
1259
d9f07150
DA
12602012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1261
1262 Widely used frame validity and checking functions.
1263 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
1264 * frame.c (decode_live_frame, decode_any_frame): New functions.
1265 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
1266 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
1267 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
1268 (Fframe_pointer_visible_p): Use decode_any_frame.
1269 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
1270 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
1271 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
1272 (Fframe_focus): Likewise. Allow zero number of arguments.
1273 Adjust docstring.
1274 (frame_buffer_list, frame_buffer_predicate): Remove.
1275 * lisp.h (frame_buffer_predicate): Remove prototype.
1276 * buffer.c (Fother_buffer): Use decode_any_frame.
1277 * xdisp.c (Ftool_bar_lines_needed): Likewise.
1278 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
1279 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
1280 (Fclose_font, Ffont_info): Use decode_live_frame.
1281 * fontset.c (check_fontset_name): Likewise.
1282 * terminal.c (Fframe_terminal): Likewise.
1283 * w32fns.c (check_x_frame): Likewise.
1284 * window.c (Fminibuffer_window, Fwindow_at)
1285 (Fcurrent_window_configuration): Likewise.
1286 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
1287 Likewise. Allow zero number of arguments. Adjust docstring.
1288 * dispnew.c (Fredraw_frame): Likewise.
1289 * xfaces.c (frame_or_selected_frame): Remove.
1290 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
1291 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
1292 (Fframe_face_alist): Use decode_live_frame.
1293 * xfns.c (check_x_frame): Likewise.
1294
89bc0592
DA
12952012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1296
1297 * window.c (quad): New function.
1298 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
1299 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
1300 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
1301 (Fwindow_line_height): Use it.
1302 (Fwindow_fringes): Use list3.
1303 (Fwindow_scroll_bars): Use list4.
1304 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
1305 (Fwindow_combination_limit): Allow zero number of arguments.
1306
c8e3a9c3
EZ
13072012-11-05 Eli Zaretskii <eliz@gnu.org>
1308
1309 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
1310
8e2417bf 1311 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
c8e3a9c3 1312 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
ae600a8e 1313 file descriptor 2 for standard error. (Bug#12805)
c8e3a9c3 1314
209c6a58
CY
13152012-11-05 Chong Yidong <cyd@gnu.org>
1316
1317 * process.c (wait_reading_process_output): Revert previous change.
1318
8148369c
PE
13192012-11-05 Paul Eggert <eggert@cs.ucla.edu>
1320
dd0333b6
PE
1321 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
1322 This removes code that has been obsolete since around 1990.
1323 * callproc.c (Fcall_process):
1324 * emacs.c (main):
1325 * process.c (create_process):
1326 * term.c (dissociate_if_controlling_tty):
1327 Assume setsid exists.
1328 * callproc.c (child_setup): Assume setpgid exists and behaves as
1329 per POSIX.1-1988 or later.
1330 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
1331 * emacs.c (shut_down_emacs):
1332 * sysdep.c (sys_suspend, init_foreground_group):
1333 Assume getpgrp behaves as per POSIX.1-1998 or later.
1334 * msdos.c (setpgrp): Remove.
1335 (tcgetpgrp, setpgid, setsid): New functions.
1336 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
1337 * term.c (no_controlling_tty): Remove; unused.
1338 * w32proc.c (setpgrp): Remove.
1339 (setsid, tcgetpgrp): New functions.
1340
8148369c
PE
1341 Simplify by assuming __fpending.
1342 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
1343 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
1344 Do not assume that __fpending's result fits in int.
1345
76abf5e5
PE
13462012-11-04 Paul Eggert <eggert@cs.ucla.edu>
1347
06b63c9b
PE
1348 Remove EMACS_OUTQSIZE+sleep hack.
1349 * dispnew.c (update_frame_1): Remove hack for terminals slower
de5ef41a
SM
1350 than 2400 bps, which throttled Emacs by having it sleep.
1351 This code hasn't worked since at least 2007, when the multi-tty stuff
06b63c9b
PE
1352 was added, and anyway those old terminals are long dead.
1353 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
1354 without the dispnew.c change, as dispnew.c doesn't include systty.h.
1355
76abf5e5
PE
1356 Fix data-loss with --version (Bug#9574).
1357 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
1358 as we can't assume that emacs_strerror is initialized, and strerror
1359 is good enough here.
1360 (main): Invoke atexit earlier, to catch earlier instances of
1361 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
1362
8f31e74b
MM
13632012-11-04 Michael Marchionna <tralfaz@pacbell.net>
1364
1365 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
1366 (keyDown): Remap keypad keys to X11 virtual key codes.
1367
0d879dca
PE
13682012-11-03 Paul Eggert <eggert@cs.ucla.edu>
1369
7ccfb720
PE
1370 Fix data-loss with --batch (Bug#9574).
1371 * emacs.c: Include <close-stream.h>.
1372 (close_output_streams): New function.
1373 (main): Pass it to atexit, so that Emacs closes stdout and stderr
1374 and handles errors appropriately.
1375 (Fkill_emacs): Don't worry about flushing, as close_output_stream
1376 does that now.
1377
0b3d4a47
PE
1378 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
1379 The symptom is a diagnostic "GLib-WARNING **: In call to
1380 g_spawn_sync(), exit status of a child process was requested but
1381 SIGCHLD action was set to SIG_IGN and ECHILD was received by
1382 waitpid(), so exit status can't be returned." The diagnostic
1383 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
1384 The real bug is a race condition between Emacs and glib: Emacs
1385 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
1386 so that glib can't find it. Work around the bug by invoking
1387 waitpid only on subprocesses that Emacs itself creates.
1388 * process.c (create_process, record_child_status_change):
1389 Don't use special value -1 in pid field, as the caller now must
de5ef41a
SM
1390 know the pid rather than having the callee infer it.
1391 The inference was sometimes incorrect anyway, due to another race.
0b3d4a47
PE
1392 (create_process): Set new 'alive' member if child is created.
1393 (process_status_retrieved): New function.
1394 (record_child_status_change): Use it.
1395 Accept negative 1st argument, which means to wait for the
1396 processes that Emacs already knows about. Move special-case code
1397 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
1398 processes that have already been waited for, by testing and
1399 clearing new 'alive' member.
1400 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
1401 now does this internally.
1402 (handle_child_signal): Let record_child_status_change do all
1403 the work, since we do not want to reap all exited child processes,
1404 only the child processes that Emacs itself created.
1405 * process.h (Lisp_Process): New boolean member 'alive'.
1406
0d879dca
PE
1407 Omit duplicate definitions no longer needed with gcc -g3.
1408 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
1409 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
1410 Define only as macros. There's no longer any need to also define
1411 these symbols as enums or as constants, since we now assume
1412 gcc -g3 when debugging.
1413
3478f4b5
EZ
14142012-11-03 Eli Zaretskii <eliz@gnu.org>
1415
1416 * lisp.mk: Adjust comments to the fact that term/internal is now
1417 loaded from loadup.el.
1418
1419 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
1420 (msdos_fatal_signal): New function.
1421 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
1422 its argument list.
1423
1424 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
1425 for GCC versions before 4.
1426 (emacs_raise): Define to call msdos_fatal_signal.
1427
1428 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
1429 iterator when starting in the middle of a display or overlay
1430 string. (Bug#12745)
1431
85fabcb7
CY
14322012-11-03 Chong Yidong <cyd@gnu.org>
1433
1434 * process.c (wait_reading_process_output): Clean up the last
1435 change.
1436
893cc455
CY
14372012-11-03 Jim Paris <jim@jtan.com> (tiny change)
1438
1439 * process.c (wait_reading_process_output): Avoid a race condition
1440 with SIGIO delivery (Bug#11536).
1441
0f7b074f
CY
14422012-11-03 Chong Yidong <cyd@gnu.org>
1443
1444 * buffer.c (cursor_type): Untabify docstring.
1445
3737fee7
DA
14462012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1447
1448 * frame.h (struct frame): Drop can_have_scroll_bars member
1449 which is meaningless for a long time. Adjust comments.
1450 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
1451 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
1452
b6a9e8b1
DA
14532012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1454
1455 * window.c (decode_next_window_args): Update window arg after
1456 calling decode_live_window and so fix crash reported at
1457 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
1458 by Juanma Barranquero <lekktu@gmail.com>.
1459 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
1460 * font.c (Ffont_at): Likewise.
1461
600d4768
JD
14622012-11-01 Jan Djärv <jan.h.d@swipnet.se>
1463
1464 * widget.c (resize_cb): New function.
1465 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
1466 (EmacsFrameResize): Check if all is up to date before changing frame
1467 size.
1468
1005b4b9
EZ
14692012-11-02 Eli Zaretskii <eliz@gnu.org>
1470
1471 Implement backtrace output for fatal errors on MS-Windows.
1472 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
1473 (BACKTRACE_LIMIT_MAX): New macro.
1474 (w32_backtrace): New function.
1475 (emacs_abort): Use w32_backtrace when the user chooses not to
1476 attach a debugger. Update the text of the abort dialog.
1477
b9e9df47
DA
14782012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1479
1480 Window-related stuff cleanup here and there.
1481 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
1482 Use decode_any_window.
1483 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
1484 * xdisp.c (Fformat_mode_line): Likewise.
1485 * font.c (Ffont_at): Use decode_live_window.
1486 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
1487 * window.c (decode_next_window_args): Likewise.
1488 (decode_any_window): Remove static.
1489 * window.h (decode_any_window): Add prototype.
1490 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
1491 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
1492 respectively.
1493
2b371ff7
DA
14942012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1495
1496 Remove pad from struct input_event.
1497 * termhooks.h (struct input_event): Remove padding field.
1498 Adjust comment.
1499 * keyboard.c (event_to_kboard): Simplify because frame_or_window
1500 member is never cons for a long time. Adjust comment.
1501 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
1502 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
1503 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
1504 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
1505
7e8b50d9
EZ
15062012-11-01 Eli Zaretskii <eliz@gnu.org>
1507
1508 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
1509
322aea6d
PE
15102012-10-31 Paul Eggert <eggert@cs.ucla.edu>
1511
1512 Fix crash when using Emacs as commit editor for git (Bug#12697).
1513 * callproc.c (setpgrp): Remove macro, as we now use setpgid
1514 and it is configured in conf_post.h.
1515 (Fcall_process): Don't invoke both setsid and setpgid; the former
1516 is enough, if it exists.
1517 * callproc.c (Fcall_process, child_setup):
1518 * process.c (create_process): Use setpgid.
1519 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
1520 for the real thing.
1521 * dispnew.c (init_display): Initialize the foreground group
1522 if we are running a tty display.
1523 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
1524 * lisp.h (init_foreground_group): New decl.
1525 * sysdep.c (inherited_pgroup): New static var.
1526 (init_foreground_group, tcsetpgrp_without_stopping)
1527 (narrow_foreground_group, widen_foreground_group): New functions.
1528 (init_sys_modes): Narrow foreground group.
1529 (reset_sys_modes): Widen foreground group.
1530
220cb2bd
MA
15312012-10-31 Michael Albinus <michael.albinus@gmx.de>
1532
1533 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
1534
218e997a
MR
15352012-10-31 Martin Rudalics <rudalics@gmx.at>
1536
1537 * minibuf.c (read_minibuf): Restore current buffer since
1538 choose_minibuf_frame calling Fset_frame_selected_window may
1539 change it (Bug#12766).
1540
02615da0
JD
15412012-10-30 Jan Djärv <jan.h.d@swipnet.se>
1542
1543 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
1544
aee5b18e
KH
15452012-10-30 Kenichi Handa <handa@gnu.org>
1546
1547 * font.c (Ffont_at): If WINDOW is specified and it is not
1548 displaying the current buffer, signal an error.
1549
ba116008
DC
15502012-10-29 Daniel Colascione <dancol@dancol.org>
1551
de5ef41a
SM
1552 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
1553 In preparation for fixing bug#12739, move these functions from
ba116008
DC
1554 here...
1555
1556 * coding.h, coding.c: ... to here, and compile them only when
53372c27
DC
1557 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
1558 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
ba116008 1559
640bf8ad
EZ
15602012-10-28 Eli Zaretskii <eliz@gnu.org>
1561
1562 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
1563 (timer_loop, getitimer, setitimer): Use it instead of
1564 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
1565 'clock'.
1566 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
1567 literal 10000.
1568
64ccff5f
JD
15692012-10-28 Jan Djärv <jan.h.d@swipnet.se>
1570
1571 * nsterm.m (NO_APPDEFINED_DATA): New define.
1572 (last_appdefined_event_data): New variable
1573 (last_appdefined_event): Remove.
1574 (ns_select): Initialize t from last_appdefined_event_data instead
1575 of [last_appdefined_event data1].
1576 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
1577 remove last_appdefined_event (Bug#12698).
1578
e483264c
SM
15792012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
1580
1581 * frame.c (x_set_font): Catch internal error.
1582
6c16c13e
EZ
15832012-10-27 Eli Zaretskii <eliz@gnu.org>
1584
e483264c
SM
1585 Avoid overflow in w32 implementation of interval timers.
1586 When possible, for ITIMER_PROF count only times the main thread
6c16c13e
EZ
1587 actually executes.
1588 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
2e612797
EZ
1589 'volatile ULONGLONG' types. All the other data which was
1590 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
6c16c13e
EZ
1591 (GetThreadTimes_Proc): New typedef.
1592 (w32_get_timer_time): New function, returns a suitable time value
1593 for the timer.
1594 (timer_loop): Enter critical section when accessing ULONGLONG
1595 values of the itimer_data struct, as these accesses are no longer
e483264c
SM
1596 atomic. Call 'w32_get_timer_time' instead of 'clock'.
1597 Remove unused variable.
6c16c13e
EZ
1598 (init_timers): Initialize s_pfn_Get_Thread_Times.
1599 (start_timer_thread): Don't assign itimer->caller_thread here.
1600 (getitimer): Assign itimer->caller_thread here.
1601 (setitimer): Always call getitimer to get the value of ticks_now.
2f246cd3 1602 (sys_spawnve): Avoid compiler warning about format mismatch.
6c16c13e 1603
ccc83f50
EZ
16042012-10-26 Eli Zaretskii <eliz@gnu.org>
1605
1606 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
1607 mouse movement events if the menu bar is active. This avoids
1608 producing a busy "hour-glass" cursor by Windows if the mouse
1609 pointer is positioned over a tooltip shown for some menu item.
1610
69deda53
PE
16112012-10-25 Paul Eggert <eggert@cs.ucla.edu>
1612
1613 Don't assume process IDs fit in int.
1614 * emacs.c (shut_down_emacs) [!DOS_NT]:
1615 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
1616 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
1617 Use pid_t, not int, to store process IDs, as 'int'
1618 is not wide enough on a few platforms (e.g., AIX and IRIX).
1619
7e70a152
KH
16202012-10-23 Kenichi Handa <handa@gnu.org>
1621
1622 The following change is to make face-font-rescale-alist work
1623 correctly for non-ASCII fonts.
1624
1625 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
1626 (font_open_for_lface): Handle Vface_font_rescale_alist.
1627
49238e7f
CY
16282012-10-23 Chong Yidong <cyd@gnu.org>
1629
1630 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
1631
5ec86886
JD
16322012-10-21 Jan Djärv <jan.h.d@swipnet.se>
1633
ef446959
JD
1634 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
1635 for screen font.
1636 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
1637
5ec86886
JD
1638 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
1639 event (Bug#12681).
1640
ee7a418d
GM
16412012-10-21 Glenn Morris <rgm@gnu.org>
1642
1643 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
1644
4973679b
PE
16452012-10-20 Paul Eggert <eggert@cs.ucla.edu>
1646
1647 Port to OpenBSD 5.1.
1648 * frame.c (Fmouse_position, Fmouse_pixel_position):
1649 * xdisp.c (produce_stretch_glyph):
1650 Declare local vars only when they're needed.
1651 This is clearer and avoids a warning on OpenBSD about unused vars.
1652 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
1653 This is safer, and avoids OpenBSD warnings about unused vars.
1654 * keyboard.c (record_menu_key): Remove unnecessary decl.
1655 (poll_timer): Define only if POLL_FOR_INPUT is defined.
1656 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
1657 as our definition clashes with OpenBSD's.
1658 * xfaces.c (load_face_colors, check_lface_attrs)
1659 (get_lface_attributes_no_remap, get_lface_attributes)
1660 (lface_fully_specified_p, x_supports_face_attributes_p)
1661 (tty_supports_face_attributes_p, face_fontset, realize_face)
1662 (realize_x_face, realize_tty_face):
1663 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
1664 merely Lisp_Object *. This is more informative and avoids
1665 a warning on OpenBSD about accessing beyond an object's size.
1666
c664f463
CY
16672012-10-20 Chong Yidong <cyd@gnu.org>
1668
1669 * lread.c (Fload): Doc fix (Bug#12592).
1670
6ec83f92 16712012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
a0d7415f
KH
1672
1673 * font.c (Ffont_at): Fix previous change.
1674
d2824928
EZ
16752012-10-19 Eli Zaretskii <eliz@gnu.org>
1676
e483264c
SM
1677 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
1678 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
c052c554
EZ
1679 for the reasons.
1680
d2824928
EZ
1681 * alloc.c (NSTATICS): Decrease to 0x800.
1682
f60d391f
SM
16832012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
1684
1685 * fns.c (Fnreverse): Include the problem element when signalling an
1686 error (bug#12677).
1687
1a9327d5
JD
16882012-10-18 Jan Djärv <jan.h.d@swipnet.se>
1689
1690 * nsterm.m (ns_select): Check writefds before call to
1691 FD_ISSET (Bug#12668).
1692
14145a1e
DC
16932012-10-18 Daniel Colascione <dancol@dancol.org>
1694
1695 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
1696 (staticpro): If we run out of staticpro slots, die with an
1697 informative error instead of just calling emacs_abort.
1698
1f76f6f5
MR
16992012-10-18 Martin Rudalics <rudalics@gmx.at>
1700
1701 Fix two flaws reported by Dmitry Antipov.
1702 * window.c (Ftemp_output_buffer_show): Remove.
1703 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
1704 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
1705
fcf14875
EZ
17062012-10-17 Eli Zaretskii <eliz@gnu.org>
1707
1f76f6f5
MR
1708 * makefile.w32-in ($(BLD)/w32.$(O)):
1709 ($(BLD)/vm-limit.$(O)):
1710 ($(BLD)/term.$(O)):
1711 ($(BLD)/unexw32.$(O)):
1712 ($(BLD)/fileio.$(O)):
a68089e4
EZ
1713 ($(BLD)/dispnew.$(O)): Update dependencies.
1714
1715 * w32term.h (w32_initialize_display_info, initialize_w32_display):
1716 Add prototypes.
1717
1718 * w32proc.c: Include ctype.h.
1719
1720 * w32.h (init_environment, check_windows_init_file)
1721 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
1722 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
1723 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
1724 (sys_link): Add prototypes.
1725
1726 * w32.c: Include w32select.h.
1727 (sys_access, e_malloc, sys_select): Add prototypes.
1728 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
1729
1730 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
1731
1732 * unexw32.c: Include lisp.h and w32.h.
1733
1734 * term.c [WINDOWSNT]: Include w32term.h.
1735
1736 * process.c [WINDOWSNT]: Add prototype of sys_select.
1737
1738 * fileio.c [WINDOWSNT]: Include w32.h.
1739
1740 * dispnew.c [WINDOWSNT]: Include w32.h.
1741
fcf14875
EZ
1742 * cygw32.c (Fcygwin_convert_path_to_windows)
1743 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
1744 Lisp_Object values. (Bug#12661)
1745
1746 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
1747 to Lisp_Object. (Bug#12661)
1748
fe0b1ec4
KH
17492012-10-17 Kenichi Handa <handa@gnu.org>
1750
1751 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
1752 invalidate.
1753
d556ebf9
DA
17542012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1755
1756 * buffer.c (Fkill_buffer): When unchaining the marker,
1f9f395d 1757 reset its buffer pointer to NULL (Bug#12652).
d556ebf9 1758
f0863a54
DA
17592012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1760
1761 Do not verify indirection counters of killed buffers (Bug#12579).
1762 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
1763 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
1764
12fbe755
DA
17652012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1766
1767 * alloc.c (Fmake_byte_code): Fix typo in comment.
1768 * print.c (print_interval): Define as static to match prototype.
1769 * indent.c (disptab_matches_widthtab, recompute_width_table):
1770 Convert to eassert.
1771
61655b89
DA
17722012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1773
1774 * editfns.c (get_system_name): Remove.
1775 * lisp.h (get_system_name): Remove prototype.
1776 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
1777 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
1778
9520f2f2
DC
17792012-10-15 Daniel Colascione <dancol@dancol.org>
1780
1781 * dbusbind.c: Add comment explaining reason for previous change.
1782
dca778d5
MR
17832012-10-15 Martin Rudalics <rudalics@gmx.at>
1784
1785 * window.c (Fwindow_end): Rewrite check whether cached position
1786 can be used (Bug#12600).
1787 (resize_frame_windows, grow_mini_window, shrink_mini_window):
1788 Set windows_or_buffers_changed.
1789
3e0341b0
DC
17902012-10-15 Daniel Colascione <dancol@dancol.org>
1791
1792 * dbusbind.c: Fix cygw32 build break when compiling with dbus
1793 enabled by undefining the symbol "interface", which the platform
1794 headers define to something incompatible.
1795
33d4113c
DC
17962012-10-14 Daniel Colascione <dancol@dancol.org>
1797
1798 * image.c (init_tiff_functions, init_imagemagick_functions)
1799 (init_svg_functions): Fix cygw32 build break by using these
1800 functions only when WINDOWSNT _and_ HAVE_NTGUI.
1801
a36fb15e
JD
18022012-10-14 Jan Djärv <jan.h.d@swipnet.se>
1803
1804 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
1805
537f336d
JD
18062012-10-13 Jan Djärv <jan.h.d@swipnet.se>
1807
1808 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
1809
0ba06a77
KH
18102012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
1811
1812 * coding.c (detect_coding): Set coding->id before calling
1813 this->detector.
1814
ce2fe65a
AS
18152012-10-13 Andreas Schwab <schwab@linux-m68k.org>
1816
1817 * fileio.c: Formatting fixes.
1818
d6453ce4
PE
18192012-10-13 Paul Eggert <eggert@cs.ucla.edu>
1820
1821 Fix some stat-related races.
1822 * fileio.c (Fwrite_region): Avoid race condition if a file is
1823 removed or renamed by some other process immediately after Emacs
1824 writes it but before Emacs stats it. Do not assume that stat (or
1825 fstat) succeeds.
1826 * image.c (slurp_file): Resolve the file name with fopen + fstat
1827 rather than stat + fopen.
1828 (pbm_read_file) [0]: Remove unused code with stat race.
1829 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
1830 Remove ineffective code with stat race.
1831
06485aa8
SM
18322012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
1833
1834 * doc.c (get_doc_string): Don't signal an error if the file is missing.
1835
167e3640
JD
18362012-10-12 Jan Djärv <jan.h.d@swipnet.se>
1837
1838 * nsterm.m (hold_event_q): New static variable.
1839 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
1840 ! q_event_ptr.
1841 (hold_event): New function.
1842 (ns_read_socket): If hold_event_q have events, store them and
1843 return (Bug#12384).
1844 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
1845 is zero (Bug#12384).
1846
c40239df
JB
18472012-10-12 Juanma Barranquero <lekktu@gmail.com>
1848
1849 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
1850
bb385a92
EZ
18512012-10-12 Eli Zaretskii <eliz@gnu.org>
1852
2a9f1099
EZ
1853 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
1854
bb385a92
EZ
1855 * fileio.c (check_existing): New function.
1856 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
1857 instead of calling 'stat', when what's needed is to check whether
1858 a file exists. This avoids expensive system calls on MS-Windows.
1859 (Bug#12587)
1860
8599b23a 1861 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
bb385a92
EZ
1862
1863 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
1864 determine whether a file exists and is not a directory.
1865
1866 * lisp.h (check_existing): Add prototype.
1867
2b9c2e68
JD
18682012-10-12 Jan Djärv <jan.h.d@swipnet.se>
1869
1870 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
1871
81749a23
GM
18722012-10-12 Glenn Morris <rgm@gnu.org>
1873
1874 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
1875
5253a5fd
SM
18762012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
1877
389a94a5
SM
1878 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
1879
5253a5fd
SM
1880 * eval.c (Fautoload): Remember previous autoload status in load-history.
1881
7cded46f
PE
18822012-10-11 Paul Eggert <eggert@cs.ucla.edu>
1883
1884 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
1885 * lread.c (load_each_byte, new_backquote_flag, readchar)
1886 (read_filtered_event, lisp_file_lexically_bound_p)
1887 (safe_to_load_version, Fload, complete_filename_p, openp)
1888 (build_load_history, readevalloop, read_escape, read1)
1889 (string_to_number, read_vector, read_list):
1890 * macros.c (Fstart_kbd_macro):
1891 * marker.c (CONSIDER):
1892 * menu.c (parse_single_submenu, digest_single_submenu)
1893 (find_and_return_menu_selection, Fx_popup_menu):
1894 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
1895 (Ftry_completion):
1896 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
1897 (ns_menu_show):
1898 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
1899 (xmenu_show, xdialog_show):
1900 Use bool for booleans.
1901 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
1902 as it's not a predicate. All uses changed. Omit unnecessary
1903 buffer termination.
1904
549c3414
DA
19052012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
1906
1907 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
1908 (save_excursion_restore): Do not restore mark if it was not saved.
1909
e85aafe7
PE
19102012-10-11 Paul Eggert <eggert@cs.ucla.edu>
1911
fd2f90cf
PE
1912 * marker.c (cached_modiff): EMACS_INT, not int.
1913
c1af190b
PE
1914 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
1915 instead of having a wrong decl.
e85aafe7
PE
1916 * nsmenu.m (waiting_for_input): Remove wrong decl.
1917
e738ca56
PE
19182012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1919
9fa1de30
PE
1920 keyboard.c, keymap.c: Use bool for booleans.
1921 * dispnew.c (sit_for): Distinguish between 3-way display_option
1922 and boolean do_display.
1923 * keyboard.c (single_kboard, this_command_key_count_reset)
1924 (waiting_for_input, echoing, immediate_quit, input_pending)
1925 (interrupt_input, interrupts_deferred, pop_kboard)
1926 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
1927 (command_loop_1, adjust_point_for_property)
1928 (safe_run_hooks_error, input_polling_used, read_char):
1929 (help_char_p, readable_events, kbd_buffer_events_waiting)
1930 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
1931 (lucid_event_type_list_p, get_input_pending):
1932 (gobble_input, menu_separator_name_p, menu_bar_item)
1933 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
1934 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
1935 (keyremap_step, test_undefined, read_key_sequence)
1936 (detect_input_pending, detect_input_pending_ignore_squeezables)
1937 (detect_input_pending_run_timers, requeued_events_pending_p)
1938 (quit_throw_to_read_char, Fset_input_interrupt_mode):
1939 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
1940 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
1941 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
1942 (accessible_keymaps_1, Fkey_description, push_key_description):
1943 (shadow_lookup, struct where_is_internal_data)
1944 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
1945 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
1946 (describe_map, describe_vector):
1947 * menu.c (single_menu_item):
1948 * nsmenu.m (ns_update_menubar):
1949 * process.c (wait_reading_process_output):
1950 * search.c (scan_buffer, scan_newline):
1951 Use bool for boolean.
1952 * keyboard.c (timers_run, swallow_events)
1953 (detect_input_pending_run_timers):
1954 * process.c (wait_reading_process_output):
1955 Use unsigned for counter where wraparound-on-overflow is desired,
1956 since unsigned is guaranteed to have that behavior and signed is not.
1957 (read_char): Use ptrdiff_t for string length.
1958 (get_input_pending): Remove first argument, since it was always
1959 the same pointer-to-int (now pointer-to-boolean) &input_pending,
1960 and behave as if it had that value. Return new value of
1961 input_pending. All callers changed.
1962 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
1963 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
1964 a string length.
1965 * keymap.c (push_key_description): Omit last arg, which was always 1.
1966 All callers changed.
1967
e738ca56
PE
1968 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
1969
29f21cdf
JB
19702012-10-10 Juanma Barranquero <lekktu@gmail.com>
1971
1972 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
1973 ($(BLD)/term.$(O)): Update dependencies.
1974
6aea7528
DA
19752012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
1976
1977 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
1978 * lisp.h (enum pvec_type): Adjust comments and omit explicit
1979 initializer for PVEC_NORMAL_VECTOR.
1980
5f3f57be
PE
19812012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1982
1983 Clean out old termopts cruft.
1984 * termopts.h (flow_control, meta_key): Remove unused decls.
1985 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
1986 Don't include termopts.h.
1987
3e98c68e
DA
19882012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
1989
1990 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
1991
77e344e5
PE
19922012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1993
1994 * commands.h (immediate_quit): Remove duplicate decl.
1995
5683d7cd
JD
19962012-10-09 Jan Djärv <jan.h.d@swipnet.se>
1997
1998 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
1999 caching.
2000 (nsfont_open): Remove setting of Vfonts_in_cache.
1f9f395d 2001 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5683d7cd 2002
cf5fc6db
EZ
20032012-10-09 Eli Zaretskii <eliz@gnu.org>
2004
b15736e6
EZ
2005 * w32fns.c (w32_last_error): Change the return value to DWORD, to
2006 match what GetLastError returns. Explain why the function is
2007 needed.
2008
cf5fc6db
EZ
2009 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
2010 'is_tooltip_frame', to avoid confusion with its global namesake.
2011
f99714ce
DC
20122012-10-08 Daniel Colascione <dancol@dancol.org>
2013
2014 * xdisp.c (start_hourglass): Call w32_note_current_window when
2b1f11ed
EZ
2015 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
2016 build that caused Emacs to display the hourglass cursor forever.
f99714ce 2017
fd59cb29
GM
2018 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
2019 which is broken under remote desktop, calculate the number of
2020 colors available for a display based on the display's number of
2021 planes and number of bits per pixel per plane. (bug#10397).
2022
62c480c9 20232012-10-08 Jan Djärv <jan.h.d@swipnet.se>
fd59cb29 2024
62c480c9
JD
2025 * nsfont.m (Vfonts_in_cache): New variable.
2026 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
2027 are used. Add cached fonts to Vfonts_in_cache.
2028 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
2029
607446ba
JB
20302012-10-08 Juanma Barranquero <lekktu@gmail.com>
2031
fd5125ad
JB
2032 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
2033 in nt/config.nt.
46979e0b
JB
2034 (FONT_H): Define after FRAME_H.
2035 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
2036 Update dependencies.
fd5125ad 2037
607446ba
JB
2038 * w32term.c: Remove leftover declaration of keyboard_codepage.
2039
b6f4e300
EZ
20402012-10-08 Eli Zaretskii <eliz@gnu.org>
2041
c54ebba4
EZ
2042 * makefile.w32-in (FONT_H): Add $(FRAME_H).
2043 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
2044 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
2045 (GLOBAL_SOURCES): Add cygw32.c.
fd59cb29
GM
2046 ($(BLD)/unexw32.$(O)):
2047 ($(BLD)/w32.$(O)):
2048 ($(BLD)/w32console.$(O)):
2049 ($(BLD)/w32fns.$(O)):
2050 ($(BLD)/w32heap.$(O)):
2051 ($(BLD)/w32menu.$(O)):
15c720a3 2052 ($(BLD)/w32proc.$(O)): Add w32common.h.
c54ebba4 2053
b6f4e300
EZ
2054 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
2055 'const char *'.
2056 (x_to_w32_color): Don't modify the argument, modify a copy instead.
2057
501199a3
DC
20582012-10-08 Daniel Colascione <dancol@dancol.org>
2059
2060 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
2061 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
2062 accidental message numbering hole. Change other messages to
2063 match.
2064
2065 * w32select.h (HAVE_W32SELECT): Remove.
2066
2067 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
1f9f395d 2068 w32common.h instead of w32heap.h.
501199a3
DC
2069
2070 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
2071 (get_allocation_unit, get_processor_type, get_w32_major_version)
2072 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2073 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2074 (OS_NT, os_subtype, cache_system_info): Move declarations to
2075 w32common.
2076
2077 * w32heap.c: Include w32common.h.
2078 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
8599b23a
SM
2079 (w32_minor_version, w32_build_number, w32_subtype):
2080 Remove duplicate definitions.
501199a3
DC
2081
2082 * w32fns.c: Include w32common.h; include w32heap.h only in
2083 WINDOWSNT.
2084
2085 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
2086 Use `report_file_error' instead of `error' in order to better
2087 inform users of what went wrong. Increase NTGUI_UNICODE file
2088 dialog box file name length to 32k, the maximum allowed by the NT
2089 kernel.
2090
2091 * w32common.h: New file.
2092 (ROUND_UP, ROUND_DOWN, get_page_size)
2093 (get_allocation_unit, get_processor_type, get_w32_major_version)
2094 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2095 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2096 (OS_NT, os_subtype, cache_system_info): Move here.
2097
2098 * unexw32.c, unexcw.c: Include w32common.h.
2099
2100 * emacs.c (main): Use (defined (WINDOWSNT) || defined
2101 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
2102 to call syms_of_w32select.
2103
2104 * cygw32.h: Remove obsolete EXFUN declarations.
2105
2106 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
2107
2108 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
2109 of w32inevt.o from SOME_MACHINE_OBJECTS.
2110
93aa5c81
DC
21112012-10-08 Daniel Colascione <dancol@dancol.org>
2112
2113 * image.c: Permanent fix for JPEG compilation issue --- limit
2114 jpeglib `boolean' redefinition to Cygwin builds.
2115
d424f3d8
EZ
21162012-10-08 Eli Zaretskii <eliz@gnu.org>
2117
8ee4c6ce
EZ
2118 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
2119
d424f3d8
EZ
2120 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
2121 Cygwin.
2122
e08348a0
DC
21232012-10-08 Daniel Colascione <dancol@dancol.org>
2124
2125 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
2126 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
2127 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
2128 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
2129 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
2130 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
2131 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
2132 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
2133 now a supported configuration.
2134
2135 * Makefile.in: consolidate image variables into LIBIMAGE; add
8e2417bf 2136 W32_OBJ and W32_LIBS. Compile new files.
e08348a0
DC
2137
2138 * conf_post.h:
2139 (_DebPrint) declare tracing facility for W32 debugging. We need
2140 to unify tracing later.
2141
2142 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
2143 unconditional use of W32 Unicode functions. Cygwin runs only on
2144 100% Unicode operating systems.
2145
2146 * cygw32.c: New file. Define Cygwin-specific facilities.
2147 (Fcygwin_convert_path_to_windows)
2148 (Fcygwin_convert_path_from_windows): New user functions for
2149 accessing Cygwin path-munging routines.
2150
2151 * cygw32.h: New file.
2152 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
2153 UTF-16LE strings temporarily inside non-Lisp-visible string
2154 objects.
2155
2156 (w32_strerror): Just what it says on the tin.
2157
2158 * emacs.c: Make the NS fork-then-exec code for daemon-launching
2159 also run for Cygwin; both systems have the same problem with using
2160 GUI facilities in a forked child. Also call syms_of_cygw32,
2161 syms_of_w32select in correct places.
2162
2163 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
2164 needs fork-then-exec for daemon launching.
2165
2166 * font.h: Include frame.h.
2167
2168 * image.c: Use the image library cache machinery only when we're
2169 compiling for native WINDOWSNT; Cygwin can use shared libraries
2170 like any other Unixlike system.
2171
2172 * keyboard.c: Clarify a comment regarding the input loop.
2173
2174 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
2175 functions directly instead of trying to detect at runtime that our
2176 host operating system supports them. We make this change for two
2177 reasons: Cygwin lacks support for the multibyte character
2178 conversion functions used by the legacy menu code, and Cygwin
2179 never needs to rely on non-Unicode APIs.
2180
2181 * unexw32.c (hinst): Declare extern.
2182
2183 * w32.c: Change header order;
2184 (w32_strerror): Move to w32fns.c because we need it for
2185 non-WINDOWSNT builds.
2186
2187 * w32.h: Add #error macro to make sure we don't include w32.h for
2188 Cygwin builds. Remove w32select declarations.
2189
2190 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
1f9f395d 2191 w32fns.c. w32console.c is WINDOWSNT-only.
e08348a0
DC
2192
2193 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
2194 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
2195 POSIXy alternative.
2196 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
2197 (w32_major_version, w32_minor_version, w32_build_number)
2198 (os_subtype, sound_type): Define here
2199 (w32_defined_color): Make color parameter const for consistency
2200 with other _defined_color functions.
2201 (w32_createwindow): Unconditionally call w32_init_class instead of
2202 doing so only when hprevinst is non-NULL. Plumbing hprevinst
2203 through the code is complex and unnecessary because class
2204 registration is practically free.
2205 (w32_name_of_message): New EMACSDEBUG-only function.
2206 (Fset_message_beep): Move here
2207 (Fx_open_connection): Require that the display name for Windows be
2208 "w32" for consistency, emacsclient disambiguation, and maybe, one
2209 day, multi-window-system support.
2210 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
2211 Cygwin files for W32 GUI facilities, since these clearly don't
2212 expect Cygwin names.
2213 (_DebPrint): Define.
2214 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
2215 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
2216 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
2217 (w32_last_error): Remove.
2218
2219 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
2220
2221 * w32heap.c (syspage_mask): Declare here.
2222 (cache_system_info): Remove.
2223
2224 * w32inevt.c (faked_key): Define globally, not statically.
2225 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
2226 (w32_console_toggle_lock_key): Move to w32fns.c.
2227
2228 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
2229
2230 * w32proc.c (_DebPrint): Move to w32fns.c.
2231 * w32select.c: Include string.h, stdio.h for Cygwin.
2232 * w32select.h: New File.
2233
2234 * w32term.c: Include io.h for non-CYGWIN builds; needed for
2235 get_osfhandle.
2236 (w32_message_fd): New variable. Under Cygwin, holds the file
2237 descriptor the system used to tell us about pending thread
2238 messages.
2239
2240 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
2241 that prevented compilation under non-WINDOWSNT systems.
2242
2243 (w32_initialize): Open /dev/windows and assign it to
2244 w32_message_fd. Provide w32 feature.
2245
2246 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
2247 (WM_EMACS_INPUT_READY): add.
2248 (prepend_msg, w32_message_fd): Declare globally.
2249
2250 * w32xfns.c:
2251 (keyboard_handle): Use only when WINDOWSNT.
2252 (notify_msg_ready): New function. Posts a message to the main
2253 thread's message queue under CYGWIN, which wakes up the main
2254 thread from select(2) by making the /dev/windows file descriptor
2255 ready. Under WINDOWSNT, it sets an event the same way the old
2256 code did.
2257
2258 (post, prepend_msg): Actually call notify_msg_ready instead of
2259 setting the input event directly.
2260
98daa893
EZ
22612012-10-07 Eli Zaretskii <eliz@gnu.org>
2262
2263 * ralloc.c (relinquish): If a heap is ready to be relinquished,
2264 but it still has blocs in it, don't return it to the system,
2265 instead of aborting. (Bug#12402)
2266
3bc0a2f7
JD
22672012-10-07 Jan Djärv <jan.h.d@swipnet.se>
2268
8ad5b73b 2269 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
493b5b1c 2270
335f5ae4
JD
2271 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
2272 MAC_OS_X_VERSION_10_6.
8ad5b73b
JD
2273 (syms_of_nsterm): Remove comment about Panther and above for
2274 ns-antialias-text.
335f5ae4
JD
2275 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
2276 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
2277 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
2278
2279 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
2280 MAC_OS_X_VERSION_10_4.
2281
8ad5b73b
JD
2282 * nsmenu.m (fillWithWidgetValue:): Remove code for <
2283 MAC_OS_X_VERSION_10_2.
335f5ae4
JD
2284
2285 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
2286
2287 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
2288 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
2289
3bc0a2f7
JD
2290 * nsterm.m (ns_in_resize): Remove (Bug#12479).
2291 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
8599b23a
SM
2292 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
2293 Remove ns_in_resize check.
3bc0a2f7
JD
2294 (ns_clear_frame_area): Remove resize handle code.
2295
2296 * nsfns.m (ns_in_resize): Remove.
e483264c
SM
2297 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
2298 Remove ns_in_resize check.
3bc0a2f7 2299
c622b48f
PE
23002012-10-07 Paul Eggert <eggert@cs.ucla.edu>
2301
2302 Improve sys_siglist detection.
2303 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
2304 defined as a macro, as is done in Solaris.
2305 (sys_siglist_entries): New macro.
2306 (save_strsignal): Use it.
2307 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
2308 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
2309
04fafa46
JD
23102012-10-06 Jan Djärv <jan.h.d@swipnet.se>
2311
2312 * nsfns.m (Fx_create_frame): Call x_default_parameter with
2313 fullscreen/Fullscreen.
2314
2315 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
2316 tobar_height is new.
2317
2318 * nsterm.m (x_make_frame_visible): Check for fullscreen.
2319 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
2320 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
2321 (windowDidResize:): Check for correct window if old style fullscreen.
2322 Capitalize word in comment. Remove incorrect comment.
2323 (initFrameFromEmacs:): tbar_height renamed tibar_height.
2324 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
2325 error in drawing background.
1f9f395d 2326 (toggleFullScreen:): Remove comment. Rearrange calls.
04fafa46
JD
2327 Set toolbar values to zero, save old height in tobar_height.
2328 Restore tool bar height when leaving fullscreen.
2329 (canBecomeMainWindow): New function.
2330
c6e21c03
PE
23312012-10-06 Paul Eggert <eggert@cs.ucla.edu>
2332
2333 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
2334
0d9f584b
EZ
23352012-10-05 Eli Zaretskii <eliz@gnu.org>
2336
a65fbb5f
EZ
2337 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
2338
0d9f584b 2339 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
8599b23a
SM
2340 that time stamps of directories could also be changed.
2341 Don't request the too broad GENERIC_WRITE, only the more restrictive
0d9f584b
EZ
2342 FILE_WRITE_ATTRIBUTES access rights.
2343
2344 * fileio.c (Fset_file_times): Special-case ignoring errors for
2345 directories only on MSDOS, not on MS-Windows.
2346
e8757f09 23472012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
ca347e3d
IK
2348
2349 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
2350
7604f298
EZ
23512012-10-04 Eli Zaretskii <eliz@gnu.org>
2352
2353 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
2354 see whether CreateFile failed.
2355
88d69b7d
PE
23562012-10-04 Paul Eggert <eggert@cs.ucla.edu>
2357
2358 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
2359 to avoid similar races.
2360 * keyboard.c (pending_signals): Now bool, not int.
2361
7509f454
PE
2362 Port timers to OpenBSD, plus check for timer failures.
2363 OpenBSD problem reported by Han Boetes.
2364 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
2365 and/or setitimer.
2366 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
2367 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
2368 like OpenBSD, which has timer_settime but does not declare it.
2369 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
2370 whether to use itimerspec-related primitives. All uses of
2371 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
2372
a3c5c0c5
PE
23732012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2374
2375 * profiler.c (handle_profiler_signal): Fix a malloc race
2376 that caused Emacs to hang on Fedora 17 when profiling Lisp.
2377
914e743b
JD
23782012-10-02 Jan Djärv <jan.h.d@swipnet.se>
2379
2380 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
2381
d8ab37a8
EZ
23822012-10-02 Eli Zaretskii <eliz@gnu.org>
2383
2384 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
2385 consistent with the change in return value of 'safe_strsignal'.
2386
b3ecad33
PE
23872012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2388
0a99eee1
PE
2389 Prefer plain 'static' to 'static inline' (Bug#12541).
2390 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
2391 (bidi_set_sor_type, bidi_push_embedding_level)
2392 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
2393 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
2394 (bidi_cache_search, bidi_cache_ensure_space)
2395 (bidi_cache_iterator_state, bidi_cache_find)
2396 (bidi_peek_at_next_level, bidi_set_paragraph_end)
2397 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
2398 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
2399 Now 'static', not 'static inline'.
2400
b3ecad33
PE
2401 Count overruns when profiling; change units to ns.
2402 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
2403 Give extra weight to samples after overruns, to attempt to count
2404 the time more accurately.
2405 (setup_cpu_timer): Change sampling interval units from ms to ns, since
2406 the underlying primitives nominally do ns.
2407 (Fprofiler_cpu_start): Document the change. Mention that
2408 the sampling intervals are only approximate.
2409
090cf9db
SM
24102012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2411
2412 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
2413
2414 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
2415 case for the special 0 coding-system.
2416
2417 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
2418 (Fmake_overlay): Remove redundant tests.
64edc777 2419 (fix_start_end_in_overlays): Remove redundant recentering.
090cf9db 2420
81550bf4
JB
24212012-10-02 Juanma Barranquero <lekktu@gmail.com>
2422
2423 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
2424 Update dependencies.
2425
aa1ba90e
PE
24262012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2427
2428 Fix a malloc race condition involving strsignal.
2429 A signal can arrive in the middle of a malloc, and Emacs's signal
2430 handler can invoke strsignal, which can invoke malloc, which is
2431 not portable. This race condition bug makes Emacs hang on GNU/Linux.
2432 Fix it by altering the signal handler so that it does not invoke
2433 strsignal.
2434 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
2435 * process.c (status_message): Use const pointer, in case strsignal
2436 is #defined to safe_strsignal.
2437 * sysdep.c (sys_siglist, init_signals): Always define and
2438 initialize a substitute sys_siglist if the system does not define
2439 one, even if HAVE_STRSIGNAL.
2440 (safe_strsignal): Rename from strsignal. Always define,
2441 using sys_siglist. Return a const pointer.
2442 * syssignal.h (safe_strsignal): New decl.
2443 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
2444
ace917bd
EZ
24452012-10-01 Eli Zaretskii <eliz@gnu.org>
2446
2447 * w32proc.c (timer_loop): Fix code that waits for timer
2448 expiration, to avoid high CPU usage.
2449
9eb71b9c
SM
24502012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2451
2452 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
2453 (sweep_weak_table): Remove redundant prototypes.
2454
b3317662
FP
24552012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
2456
2457 * emacs.c: Move the inclusion of TERM_HEADER after including
2458 windows.h on WINDOWSNT. This avoids compilation problems with
2459 MSVC.
2460
f0e5f225
EZ
24612012-10-01 Eli Zaretskii <eliz@gnu.org>
2462
2d7d1608
EZ
2463 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
2464 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
2465 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
2466 as the previous version used 'void *'.
2467
2468 * ralloc.c (ROUNDUP): Fix last change.
2469 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
2470 'size_t'.
2471
f0e5f225
EZ
2472 * w32proc.c <disable_itimers>: New static flag.
2473 (init_timers): Initialize it to zero, after creating the critical
2474 sections used by the timer threads.
2475 (term_timers): Set to 1 before deleting the critical sections.
2476 (getitimer, setitimer): If disable_itimers is non-zero, return an
2477 error indication without doing anything. Reported by Fabrice
2478 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
4cdfbb89
EZ
2479 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
2480 return results.
2481 [!HAVE_SETITIMER]: Behave as the previous version that didn't
2482 support timers.
f0e5f225
EZ
2483
2484 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
2485 term_ntproc after all the other bookkeeping, to get timers working
2486 as long as possible.
2487
82ef37c1
PE
24882012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2489
b3a4c387
PE
2490 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
2491 Suggested by Juri Linkov in
2492 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
2493
b0ab8123
PE
2494 Prefer plain 'static' to 'static inline' (Bug#12541).
2495 With static functions, modern compilers inline pretty well by
2496 themselves; advice from programmers often hurts as much as it helps.
2497 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
2498 this change shrinks the text size of the Emacs executable by 1.1%
2499 without affecting CPU significantly in my benchmark.
2500 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
2501 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
2502 (mark_maybe_object, mark_maybe_pointer, bounded_number):
2503 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2504 (bset_auto_fill_function, bset_auto_save_file_format)
2505 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2506 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2507 (bset_cache_long_line_scans, bset_case_fold_search)
2508 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2509 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2510 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2511 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2512 (bset_header_line_format, bset_indicate_buffer_boundaries)
2513 (bset_indicate_empty_lines, bset_invisibility_spec)
2514 (bset_left_fringe_width, bset_major_mode, bset_mark)
2515 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2516 (bset_name, bset_overwrite_mode, bset_pt_marker)
2517 (bset_right_fringe_width, bset_save_length)
2518 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2519 (bset_scroll_up_aggressively, bset_selective_display)
2520 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2521 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
2522 (set_buffer_overlays_after):
2523 * category.c (bset_category_table):
2524 * charset.c (read_hex):
2525 * coding.c (produce_composition, produce_charset)
2526 (handle_composition_annotation, handle_charset_annotation)
2527 (char_encodable_p):
2528 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
2529 (assign_row, set_frame_matrix_frame, make_current)
2530 (add_row_entry):
2531 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
2532 * fns.c (maybe_resize_hash_table):
2533 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
2534 * gmalloc.c (register_heapinfo):
2535 * image.c (lookup_image_type):
2536 * intervals.c (set_interval_object, set_interval_left)
2537 (set_interval_right, copy_interval_parent, rotate_right)
2538 (rotate_left, balance_possible_root_interval):
2539 * keyboard.c (kset_echo_string, kset_kbd_queue)
2540 (kset_keyboard_translate_table, kset_last_prefix_arg)
2541 (kset_last_repeatable_command, kset_local_function_key_map)
2542 (kset_overriding_terminal_local_map, kset_real_last_command)
2543 (kset_system_key_syms, clear_event, set_prop):
2544 * lread.c (digit_to_number):
2545 * marker.c (attach_marker, live_buffer, set_marker_internal):
2546 * nsterm.m (ns_compute_glyph_string_overhangs):
2547 * process.c (pset_buffer, pset_command)
2548 (pset_decode_coding_system, pset_decoding_buf)
2549 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
2550 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
2551 (pset_status, pset_tty_name, pset_type, pset_write_queue):
2552 * syntax.c (bset_syntax_table, dec_bytepos):
2553 * terminal.c (tset_param_alist):
2554 * textprop.c (interval_has_some_properties)
2555 (interval_has_some_properties_list):
2556 * window.c (wset_combination_limit, wset_dedicated)
2557 (wset_display_table, wset_hchild, wset_left_fringe_width)
2558 (wset_left_margin_cols, wset_new_normal, wset_new_total)
2559 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2560 (wset_right_fringe_width, wset_right_margin_cols)
2561 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
2562 (wset_vertical_scroll_bar_type, wset_window_parameters):
2563 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2564 (wset_column_number_displayed, wset_region_showing)
2565 (window_box_edges, run_window_scroll_functions)
2566 (append_glyph_string_lists, prepend_glyph_string_lists)
2567 (append_glyph_string, set_glyph_string_background_width)
2568 (append_glyph, append_composite_glyph)
2569 (take_vertical_position_into_account):
2570 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
2571 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
2572 (lface_hash, lface_same_font_attributes_p, lookup_face):
2573 * xml.c (libxml2_loaded_p):
2574 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
2575 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
2576 Now 'static', not 'static inline'.
2577
05584c31
PE
2578 * bidi.c: Tune.
2579 (bidi_copy_it): Do the whole copy with a single memcpy.
2580 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
2581
86ec63ba
PE
2582 Revert the FOLLOW-SYMLINKS change for file-attributes.
2583 Doing it right would require several changes to Tramp, and there's
2584 not enough time to get that tested before the freeze today.
2585 * dired.c (directory_files_internal, Ffile_attributes):
2586 Undo last change.
2587
82ef37c1
PE
2588 * frame.c (x_report_frame_params): Port better to wider ints.
2589 Do not assume that EMACS_UINT is the same width as uprintmax_t,
2590 or that pointers can be printed in 15 decimal digits.
2591 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
2592
62aba0d4
FP
25932012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
2594
2595 Support x64 build on MS-Windows.
2596 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
2597 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
2598 compatibility with x64.
5e4daaf3 2599 (x_get_focus_frame): Add prototype.
62aba0d4
FP
2600
2601 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
2602 defining an XRectangle structure.
2603
2604 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
2605 arithmetics for compatibility with x64.
2606
2607 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
2608 compatibility with x64.
2609
2610 * w32heap.h: Adjust prototypes and declarations.
2611
2612 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
2613 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
2614 DWORD, long, and unsigned long, for compatibility with x64.
2615 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
2616 (sbrk): Argument is now of type ptrdiff_t.
2617
2618 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
2619 less than 0x0500.
2620 (w32_msg_pump): Use WPARAM type for 'result'.
2621
2622 * w32.c (init_environment, get_emacs_configuration): Support AMD64
2623 architecture.
2624 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
2625 compatibility with x64.
2626
2627 * vm-limit.c (lim_data): Now size_t.
2628 (check_memory_limits): Adjust prototypes of real_morecore and
2629 __morecore to receive argument of type ptrdiff_t. Use size_t for
2630 five_percent and data_size.
2631
2632 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
2633 variables, for compatibility with x64.
2634 (rva_to_section, offset_to_section, relocate_offset)
2635 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
2636 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
2637 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
2638 for compatibility with x64.
2639
2640 * sysdep.c (STDERR_FILENO): Define if not already defined.
2641
2642 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
2643 (__morecore): Argument type is now ptrdiff_t.
2644 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
2645 (relinquish): Use ptrdiff_t type for 'excess'.
2646 (r_alloc_sbrk): Argument type is now ptrdiff_t.
2647
2648 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
2649 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
2650 instead of a literal number.
2651
2652 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
2653 (min): Define only if not already defined.
2654
2655 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
2656 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
2657 hosts.
2658
2659 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
2660 'bitmaps' is a pointer.
2661
2662 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
2663
2664 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
2665
e7a2937b
PE
26662012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2667
2668 file-attributes has a new optional arg FOLLOW-SYMLINKS.
2669 * dired.c (directory_files_internal, Ffile_attributes):
2670 New arg follow_symlinks. All uses changed.
2671
b43d62ae
SM
26722012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
2673
2674 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
2675
c06c382a
EZ
26762012-09-30 Eli Zaretskii <eliz@gnu.org>
2677
2678 Support atimers and CPU profiler via profile.c on MS-Windows.
2679 * w32proc.c (sig_mask, crit_sig): New static variables.
2680 (sys_signal): Support SIGALRM and SIGPROF.
2681 (sigemptyset, sigaddset, sigfillset, sigprocmask)
b43d62ae 2682 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
c06c382a
EZ
2683 sigfillset, and sigprocmask are no longer no-ops.
2684 (sigismember): New function.
2685 (struct itimer_data): New definition.
2686 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
2687 (crit_prof): New static variables.
2688 (MAX_SINGLE_SLEEP): New definition.
2689 (timer_loop, stop_timer_thread, term_timers, init_timers)
2690 (start_timer_thread, getitimer, setitimer): New functions.
2691 (alarm): No longer a no-op, calls setitimer.
2692
2693 * w32.c (term_ntproc): Call term_timers.
2694 (init_ntproc): Make sure all signals are unblocked at startup, to
2695 erase any traces of dumping. Call init_timers.
2696
2697 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
2698 Windows-specific code to display the hourglass mouse pointer is no
2699 longer used.
2700 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
2701 to hourglass timer expiration.
2702 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
2703 Remove, no longer used.
b43d62ae
SM
2704 (w32_note_current_window, show_hourglass, hide_hourglass):
2705 New functions, in support of hourglass cursor display similar to other
c06c382a
EZ
2706 window systems.
2707 (syms_of_w32fns): Don't initialize hourglass_timer.
2708
2709 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
2710 WINDOWSNT as well.
2711 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
2712
2713 * w32.h (init_timers, term_timers): Add prototypes.
2714
95402d5f
KH
27152012-09-30 Kenichi Handa <handa@gnu.org>
2716
2717 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
2718 to the buffer relocation which may be caused by ccl_driver.
2719
dd946752
JD
27202012-09-30 Jan Djärv <jan.h.d@swipnet.se>
2721
d7e642cc
JD
2722 * xfns.c (Fx_file_dialog): Update comment.
2723
2724 * w32fns.c (Fx_file_dialog): Update comment.
2725
2726 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
2727 Initialize panel name field if OSX >= 10.6.
2728
2729 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
2730
dd946752
JD
2731 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
2732
2733 * nsterm.m (NEW_STYLE_FS): New define.
2734 (ns_fullscreen_hook, windowWillEnterFullScreen)
2735 (windowDidEnterFullScreen, windowWillExitFullScreen)
2736 (windowDidExitFullScreen, toggleFullScreen, handleFS)
2737 (setFSValue): New functions.
2738 (EmacsFSWindow): New implementation.
2739 (canBecomeKeyWindow): New function for EmacsFSWindow.
2740 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
2741 (dealloc): Release nonfs_window if in fullscreen.
2742 (updateFrameSize:): Call windowDidMove to update top/left.
2743 (windowWillResize:toSize:): Check if frame is still maximized.
2744 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
2745 next_maximized, maximized_width, maximized_height and nonfs_window.
2746 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
2747 tbar_height.
2748 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1f9f395d 2749 fullscreen. Set maximized_width/height. Act on next_maximized.
dd946752
JD
2750
2751 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
2752 (EmacsView): Add variables for fullscreen.
2753 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
2754 (EmacsFSWindow): New interface for fullscreen.
2755
427730eb
JB
27562012-09-30 Juanma Barranquero <lekktu@gmail.com>
2757
2758 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2759
48de8b12
CY
27602012-09-30 Chong Yidong <cyd@gnu.org>
2761
2762 * fns.c (Frandom): Doc fix.
2763
5938d519
MR
27642012-09-30 Martin Rudalics <rudalics@gmx.at>
2765
2766 * window.c (Vwindow_combination_limit): New default value.
2767 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
2768
cb5b0266
PE
27692012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2770
2771 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
2772 Suggested by Eli Zaretskii in
2773 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
2774
84f72efd
EZ
27752012-09-30 Eli Zaretskii <eliz@gnu.org>
2776
2777 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
2778 HAVE_TIMER_SETTIME is defined.
2779
9d4dcdc9
PE
27802012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2781
d89460ed
PE
2782 Profiler improvements: more-accurate timers, overflow checks.
2783 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
2784 signal.h, setjmp.h. Include systime.h instead.
2785 (saturated_add): New function.
2786 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
2787 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
2788 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
2789 New static vars.
84f72efd 2790 (enum profiler_cpu_running): New enum.
d89460ed
PE
2791 (profiler_cpu_running): Now of that enum type, not bool.
2792 All uses changed to store the new value.
2793 (handle_profiler_signal): Rename from sigprof_handler_1,
2794 for consistency with other handlers. Do not check whether
2795 cpu_log is a hash-table if garbage collecting, since it
2796 doesn't matter in that case.
2797 (deliver_profiler_signal): Rename from sigprof_handler,
2798 for consistency with other handlers.
2799 (setup_cpu_timer): New function, with much of what used to be in
2800 Fprofiler_cpu_start. Check for out-of-range argument.
2801 Prefer timer_settime if available, and prefer
2802 thread cputime clocks, then process cputime clocks, then
2803 monotonic clocks, to the old realtime clock. Use make_timeval
2804 to round more-correctly when falling back to setitimer.
2805 (Fprofiler_cpu_start): Use it.
2806 (Fprofiler_cpu_stop): Prefer timer_settime if available.
2807 Don't assume that passing NULL as the 2nd argument of setitimer
2808 is the same as passing a pointer to all-zero storage.
2809 Ignore SIGPROF afterwards.
2810 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
2811 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
2812 non-fatal signal handlers. Ignore SIGPROF on startup.
2813 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
2814 in profiler.c, since sysdep.c now uses it.
2815
9d4dcdc9
PE
2816 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
2817 Suggested by Eli Zaretskii in
2818 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
2819
8e5691a0
JB
28202012-09-29 Juanma Barranquero <lekktu@gmail.com>
2821
2822 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2823
e7c1b6ef
SM
28242012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
2825
2826 * lisp.h (struct backtrace): Remove indirection for `function' field.
2827 * xdisp.c (redisplay_internal):
2828 * profiler.c (record_backtrace, sigprof_handler_1):
2829 * alloc.c (Fgarbage_collect):
2830 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
2831 (Fbacktrace_frame): Adjust accordingly.
2832
e61d39cd 28332012-09-28 Glenn Morris <rgm@gnu.org>
d393cefb
GM
2834
2835 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
2836 (Frun_hook_with_args_until_failure): Doc fixes.
2837
404043ea
EZ
28382012-09-28 Eli Zaretskii <eliz@gnu.org>
2839
2840 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
2841 Qautomatic_redisplay and change the symbol name. All users changed.
2842
704d3f45
TM
28432012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
2844
2845 * profiler.c (sigprof_handler): Fix race condition.
2846
757140ff
GM
28472012-09-28 Glenn Morris <rgm@gnu.org>
2848
2849 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
2850
a615a3ae
PE
28512012-09-27 Paul Eggert <eggert@cs.ucla.edu>
2852
2853 Check more robustly for timer_settime.
89d17fd0
PE
2854 * Makefile.in (LIB_TIMER_TIME): New macro.
2855 (LIBES): Add it.
a615a3ae
PE
2856 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
2857 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
2858 call timer_settime.
2859
3670daf7
TM
28602012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
2861
2862 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
2863
6a586b7f
JB
28642012-09-26 Juanma Barranquero <lekktu@gmail.com>
2865
2866 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2867
41c8bfcf
PE
28682012-09-26 Paul Eggert <eggert@cs.ucla.edu>
2869
2870 * character.h (MAYBE_UNIFY_CHAR): Remove.
2871 * charset.c, charset.h (maybe_unify_char): Now static.
2872 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
2873 Since this stuff is now private to charset.c, there's no need for
2874 a public macro and no need to inline by hand.
2875
3a880af4
SM
28762012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
2877 Stefan Monnier <monnier@iro.umontreal.ca>
2878 Juanma Barranquero <lekktu@gmail.com>
611b7507 2879
3a880af4
SM
2880 * profiler.c: New file.
2881 * Makefile.in (base_obj): Add profiler.o.
611b7507
JB
2882 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
2883 ($(BLD)/profiler.$(O)): New target.
3a880af4
SM
2884 * emacs.c (main): Call syms_of_profiler.
2885 * alloc.c (Qautomatic_gc): New constant.
2886 (MALLOC_PROBE): New macro.
2887 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
2888 (total_bytes_of_live_objects): New function.
2889 (Fgarbage_collect): Use it. Record itself in backtrace_list.
2890 Call malloc_probe for the memory profiler.
2891 (syms_of_alloc): Define Qautomatic_gc.
2892 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
2893 race condition.
2894 (struct backtrace): Move definition...
2895 * lisp.h (struct backtrace): ..here.
2896 (Qautomatic_gc, profiler_memory_running): Declare vars.
2897 (malloc_probe, syms_of_profiler): Declare functions.
2898 * xdisp.c (Qautomatic_redisplay): New constant.
2899 (redisplay_internal): Record itself in backtrace_list.
2900 (syms_of_xdisp): Define Qautomatic_redisplay.
611b7507 2901
5938d519 29022012-09-25 Eli Zaretskii <eliz@gnu.org>
b67238c2
JB
29032012-09-25 Juanma Barranquero <lekktu@gmail.com>
2904
2905 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
2906
e26fd2e4
PE
29072012-09-25 Paul Eggert <eggert@cs.ucla.edu>
2908
2909 Prefer POSIX timers if available.
2910 They avoid a race if the timer is too close to the current time.
2911 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
2912 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
9180598c 2913 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
e26fd2e4 2914
eedec3ee
EZ
29152012-09-25 Eli Zaretskii <eliz@gnu.org>
2916
2917 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
2918 CHAR_STRING_ADVANCE.
2919 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
2920 STRING_CHAR_ADVANCE.
2921
aa15c6bb
JB
29222012-09-25 Juanma Barranquero <lekktu@gmail.com>
2923
2924 Move Vlibrary_cache to emacs.c and reset before dumping.
2925
2926 * lisp.h (reset_image_types): Declare.
2927 [WINDOWSNT] (Vlibrary_cache): Declare.
2928
2929 * image.c (reset_image_types): New function.
2930
2931 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
2932 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
2933 (Fdump_emacs): Reset Vlibrary_cache and image_types.
2934
2935 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
2936 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
2937
2938 * w32.h (Vlibrary_cache): Do not declare.
2939
54d629be
EZ
29402012-09-25 Eli Zaretskii <eliz@gnu.org>
2941
16b22fef
EZ
2942 * w32proc.c (sys_signal): Handle all signals defined by the
2943 MS-Windows runtime, not just SIGCHLD. Actually install the signal
2944 handlers for signals supported by Windows. Don't override
2945 term_ntproc as the handler for SIGABRT.
2946 (sigaction): Rewrite to call sys_signal instead of duplicating its
2947 code.
2948 (sys_kill): Improve commentary.
2949
2950 * w32.c (term_ntproc): Accept (and ignore) one argument, for
2951 consistency with a signature of a signal handler. All callers
2952 changed.
2953 (init_ntproc): Accept an argument DUMPING. If dumping, don't
2954 install term_ntproc as a signal handler for SIGABRT, as that
2955 should be done by the dumped Emacs.
2956
2957 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
2958
2959 * w32select.c (term_w32select): Protect against repeated
2960 invocation by setting clipboard_owner to NULL after calling
2961 DestroyWindow.
2962
2963 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
2964 and term_ntproc to their modified signatures.
2965
54d629be
EZ
2966 * character.c (char_string, string_char): Remove calls to
2967 MAYBE_UNIFY_CHAR. See the discussion starting at
2968 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
2969 for the details.
2970
59f7af81
CY
29712012-09-25 Chong Yidong <cyd@gnu.org>
2972
2973 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
2974
22e8cf4a
SM
29752012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
2976
2977 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
2978 when encountering an unknown bytecode.
2979
578098f3
PE
29802012-09-24 Paul Eggert <eggert@cs.ucla.edu>
2981
2982 image.c, indent.c: Use bool for booleans.
2983 * dispextern.h (struct image_type): Members valid_p, load, init
2984 now return bool, not int. All uses changed.
2985 * image.c: Omit unnecessary static decls.
2986 (x_create_bitmap_mask, x_build_heuristic_mask):
2987 Return void, not int, since callers don't care about the return value.
2988 (x_create_bitmap_mask, define_image_type, valid_image_p)
2989 (struct image_keyword, parse_image_spec, image_spec_value)
2990 (check_image_size, image_background)
2991 (image_background_transparent, x_clear_image_1)
2992 (postprocess_image, lookup_image, x_check_image_size)
2993 (x_create_x_image_and_pixmap, xbm_image_p)
2994 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
2995 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
2996 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
2997 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
2998 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
2999 (png_image_p, init_png_functions, png_load_body, png_load)
3000 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
3001 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
3002 (init_gif_functions, gif_load, imagemagick_image_p)
3003 (imagemagick_load_image, imagemagick_load, svg_image_p)
3004 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
3005 (gs_load):
3006 * nsimage.m (ns_load_image):
3007 * nsterm.m (ns_defined_color):
3008 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
3009 * xfns.c (x_defined_color):
3010 * xterm.c (x_alloc_lighter_color_for_widget)
3011 (x_alloc_nearest_color_1, x_alloc_nearest_color)
3012 (x_alloc_lighter_color):
3013 * indent.c (disptab_matches_widthtab, current_column)
3014 (scan_for_column, string_display_width, indented_beyond_p)
3015 (compute_motion, vmotion, Fvertical_motion):
3016 Use bool for booleans.
3017
a5f2b6ec
CY
30182012-09-24 Chong Yidong <cyd@gnu.org>
3019
3020 * chartab.c (Fset_char_table_default): Obsolete function removed.
3021
18e27ea8
PE
30222012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3023
afea8a8a
PE
3024 Move pid_t related decls out of lisp.h.
3025 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
3026 (interruptible_wait_for_termination):
3027 Move these decls from lisp.h to syswait.h, since they use pid_t.
3028 Needed on FreeBSD; see Herbert J. Skuhra in
3029 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
3030 * callproc.c: Include syswait.h.
3031
18e27ea8
PE
3032 gnutls.c, gtkutil.c: Use bool for boolean.
3033 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
3034 (emacs_gnutls_handle_error):
3035 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
3036 (xg_hide_tooltip, xg_create_frame_widgets)
3037 (create_dialog, xg_uses_old_file_dialog)
3038 (xg_get_file_with_chooser, xg_get_file_with_selection)
3039 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
3040 (xg_item_label_same_p, xg_update_menubar)
3041 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
3042 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
3043 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
3044 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
3045 (update_frame_tool_bar, free_frame_tool_bar):
3046 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
3047 * nsmenu.m (ns_update_menubar):
3048 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
3049 * xfns.c (Fx_show_tip) [USE_GTK]:
3050 Use bool for boolean.
3051 * gtkutil.c (xg_update_frame_menubar):
3052 * xmenu.c (update_frame_menubar):
3053 Return void, not int, since caller ignores return value.
3054 * gtkutil.c (xg_change_toolbar_position):
3055 Return void, not 1.
3056
af0e9f75
JB
30572012-09-23 Juanma Barranquero <lekktu@gmail.com>
3058
3059 * makefile.w32-in (BLOCKINPUT_H): Remove.
3060 (SYSSIGNAL_H): New macro.
3061 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
3062 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
3063 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
3064 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
3065 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
3066 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
3067 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
3068 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
3069 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
3070 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
3071 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
3072 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
3073 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
3074 ($(BLD)/w32xfns.$(O)): Update dependencies.
3075
5101529e
EZ
30762012-09-23 Eli Zaretskii <eliz@gnu.org>
3077
3078 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
3079 fatal_error_backtrace.
3080
3081 * w32proc.c (sys_kill): Undo last change: don't do anything when
3082 invoked to deliver SIGABRT to our own process. This is now
3083 handled by emacs_raise.
3084
2c3ee0ad
JB
30852012-09-23 Juanma Barranquero <lekktu@gmail.com>
3086
3087 * w32term.c (w32_read_socket): Remove leftover reference to
3088 interrupt_input_pending.
3089
62a1d661
PE
30902012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3091
3092 Do not use SA_NODEFER.
3093 Problem reported by Dani Moncayo in
3094 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
3095 * alloc.c (die):
3096 * sysdep.c (emacs_abort): Do not reset signal handler.
3097 * emacs.c (terminate_due_to_signal): Reset signal handler here.
3098 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
3099 wanted even on POSIXish hosts, and it doesn't work on Windows.
3100
a0942b9a
JD
31012012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3102
3103 * xterm.c (x_term_init): Call fixup_locale before and after calling
3104 gtk_init (Bug#12392).
3105
d07ff9db
CY
31062012-09-23 Chong Yidong <cyd@gnu.org>
3107
3108 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
3109 Vdynamic_library_alist.
3110
3111 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
3112 (Fgnutls_available_p): Caller changed.
3113
3114 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
3115 (Flibxml_parse_xml_region): Likewise.
3116
3117 * dispextern.h (struct image_type): Remove arg from init function.
3118
3119 * image.c (Finit_image_library, lookup_image_type)
3120 (define_image_type): Remove now-unneeded second arg.
3121 (init_xpm_functions, init_png_functions, init_jpeg_functions)
3122 (init_tiff_functions, init_gif_functions, init_svg_functions):
3123 Arglist and w32_delayed_load calling convention changed.
3124 (gs_type): Remove init_gs_functions; there is no such function.
641cfd14 3125 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 3126
4d7e6e51
PE
31272012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3128
3129 Simplify and avoid signal-handling races (Bug#12471).
3130 * alloc.c (die):
3131 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
3132 Avoid recursive loop if there's a fatal error in the function itself.
3133 * atimer.c (pending_atimers):
3134 * blockinput.h: Don't include "atimer.h"; no longer needed.
3135 (interrupt_input_pending): Remove. All uses removed.
3136 pending_signals now counts both atimers and ordinary interrupts.
3137 This is less racy than having three separate pending-signal flags.
3138 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
3139 (input_blocked_p):
3140 Rename from their upper-case counterparts BLOCK_INPUT,
3141 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
3142 INPUT_BLOCKED_P, and turn into functions. All uses changed.
3143 This makes it easier to access volatile variables more accurately.
3144 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
3145 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
3146 that's more reliable if the code is buggy and sets
3147 interrupt_input_blocked to a negative value. All uses changed.
3148 * atimer.c (deliver_alarm_signal):
3149 Remove. No need to deliver this to the parent; any thread can
3150 handle this signal now. All uses replaced by underlying handler.
3151 * atimer.c (turn_on_atimers):
3152 * dispnew.c (handle_window_change_signal):
3153 * emacs.c (handle_danger_signal):
3154 * keyboard.c (kbd_buffer_get_event):
3155 Don't reestablish signal handler; not needed with sigaction.
3156 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
3157 (UNBLOCK_INPUT_TO):
3158 Rework to avoid unnecessary accesses to volatile variables.
3159 (UNBLOCK_INPUT_TO): Now a function.
3160 (totally_unblock_input, unblock_input): New decls.
3161 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
3162 (init_data): Remove. Necessary stuff now done in init_signal.
3163 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
3164 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
3165 (fatal_error_code): Remove; no longer needed.
3166 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
3167 it doesn't always backtrace. All uses changed. No need to reset
3168 signal to default, since sigaction and/or die does that for us now.
3169 Use emacs_raise (FOO), not kill (getpid (), FOO).
3170 (main): Check more-accurately whether we're dumping.
3171 Move fatal-error setup to sysdep.c
3172 * floatfns.c: Do not include "syssignal.h"; no longer needed.
3173 * gtkutil.c (xg_get_file_name, xg_get_font):
3174 Remove no-longer-needed signal-mask manipulation.
3175 * keyboard.c, process.c (POLL_FOR_INPUT):
3176 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
3177 * keyboard.c (read_avail_input): Remove.
3178 All uses replaced by gobble_input.
3179 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
3180 (kbd_buffer_store_event_hold, gobble_input):
3181 (record_asynch_buffer_change) [USABLE_SIGIO]:
3182 (store_user_signal_events):
3183 No need to mess with signal mask.
3184 (gobble_input): If blocking input and there are terminals, simply
3185 set pending_signals to 1 and return. All hooks changed to not
3186 worry about whether input is blocked.
3187 (process_pending_signals): Clear pending_signals before processing
3188 them, in case a signal comes in while we're processing.
3189 By convention callers now test pending_signals before calling us.
3190 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
3191 New functions, to support changes to blockinput.h.
3192 (handle_input_available_signal): Now extern.
3193 (reinvoke_input_signal): Remove. All uses replaced by
3194 handle_async_input.
3195 (quit_count): Now volatile, since a signal handler uses it.
3a880af4
SM
3196 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
3197 All callers changed. Block SIGINT only if not already blocked.
4d7e6e51
PE
3198 Clear sigmask reliably, even if Fsignal returns, which it can.
3199 Omit unnecessary accesses to volatile var.
3200 (quit_throw_to_read_char): No need to restore sigmask.
3201 * keyboard.c (gobble_input, handle_user_signal):
3202 * process.c (wait_reading_process_output):
3203 Call signal-handling code rather than killing ourselves.
3204 * lisp.h: Include <float.h>, for...
3205 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
3206 (pending_signals): Now volatile.
3207 (syms_of_data): Now const if IEEE floating point.
3208 (handle_input_available_signal) [USABLE_SIGIO]:
3209 (terminate_due_to_signal, record_child_status_change): New decls.
3210 * process.c (create_process): Avoid disaster if memory is exhausted
3211 while we're processing a vfork, by tightening the critical section
3212 around the vfork.
3213 (send_process_frame, process_sent_to, handle_pipe_signal)
3214 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
3215 ignores SIGPIPE.
3216 (send_process): No need for setjmp/longjmp any more, since the
3217 SIGPIPE stuff is now gone. Instead, report an error if errno
3218 is EPIPE.
3219 (record_child_status_change): Now extern. PID and W are now args.
3220 Return void, not bool. All callers changed.
3221 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
3222 Remove. All uses removed. This bug should be fixed now in a
3223 different way.
3224 (wait_for_termination_1): Use waitpid rather than sigsuspend,
3225 and record the child status change directly. This avoids the
3226 need to futz with the signal mask.
3227 (process_fatal_action): Move here from emacs.c.
3228 (emacs_sigaction_flags): New function, containing
3229 much of what used to be in emacs_sigaction_init.
3230 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
3231 caught by emacs, to make races less likely.
3232 (deliver_process_signal): Rename from handle_on_main_thread.
3233 All uses changed.
3234 (BACKTRACE_LIMIT_MAX): Now at top level.
3235 (thread_backtrace_buffer, threadback_backtrace_pointers):
3236 New static vars.
3237 (deliver_thread_signal, deliver_fatal_thread_signal):
3238 New functions, for more-accurate delivery of thread-specific signals.
3239 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
3240 (deliver_arith_signal): Handle in this thread, not
3241 in the main thread, since it's triggered by this thread.
3242 (maybe_fatal_sig): New function.
3243 (init_signals): New arg DUMPING so that we can be more accurate
3244 about whether we're dumping. Caller changed.
3245 Treat thread-specific signals differently from process-general signals.
3246 Block all signals while handling fatal error; that's safer.
3247 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
3248 on IEEE hosts.
3249 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
3250 Ignore SIGPIPE unless batch.
3251 (emacs_backtrace): Output backtrace for the appropriate thread,
3252 which is not necessarily the main thread.
3253 * syssignal.h: Include <stdbool.h>.
3254 (emacs_raise): New macro.
3255 * xterm.c (x_connection_signal): Remove; no longer needed
3256 now that we use sigaction.
3257 (x_connection_closed): No need to mess with sigmask now.
3258 (x_initialize): No need to reset SIGPIPE handler here, since
3259 init_signals does this for us now.
3260
8f4635e9
JD
32612012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3262
3263 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
fb39b937 3264 background rect may be larger (Bug#12245).
8f4635e9 3265
3296976d
CY
32662012-09-23 Chong Yidong <cyd@gnu.org>
3267
3268 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
3269
d41e491e
PE
32702012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3271
3272 * .gdbinit: Just stop at fatal_error_backtrace.
3273 See Stefan Monnier's request in
3274 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
3275 Remove no-longer-used query of system type.
3276
c88b867f
CY
32772012-09-22 Chong Yidong <cyd@gnu.org>
3278
3279 * search.c (Freplace_match): Doc fix (Bug#12325).
3280
3281 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
3282
3283 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
3284 (Fline_end_position): Doc fix.
3285
3286 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
3287
bb4d86b4
CY
32882012-09-22 Chong Yidong <cyd@gnu.org>
3289
3290 * dispextern.h (struct image_type): Add new slot, storing a type
3291 initialization function.
3292
3293 * image.c (define_image_type): Call the image initializer function
3294 if it is defined. Arguments and return value changed.
3295 (valid_image_p, make_image): Callers changed.
3296 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3a880af4
SM
3297 (gif_type, imagemagick_type, svg_type, gs_type):
3298 Add initialization functions.
bb4d86b4
CY
3299 (Finit_image_library): Call lookup_image_type.
3300 (CHECK_LIB_AVAILABLE): Macro deleted.
3301 (lookup_image_type): Call define_image_type here, rather than via
3302 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
3303 (syms_of_image): Move define_image_type calls for xbm_type and
3304 pbm_type to lookup_image_type.
3305
df9685f3
EZ
33062012-09-22 Eli Zaretskii <eliz@gnu.org>
3307
3308 * keyboard.c (timer_check_2): Move calculation of 'timers' and
3309 'idle_timers' from here ...
3310 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
3311 lists, to avoid infloops when the timer does something stupid,
3312 like reinvoke itself with the same or smaller time-out.
3313 (Bug#12447)
3314
8e17c9ba
MR
33152012-09-22 Martin Rudalics <rudalics@gmx.at>
3316
3317 * window.c (Fsplit_window_internal): Handle only Qt value of
3318 Vwindow_combination_limit separately.
3319 (Qtemp_buffer_resize): New symbol.
3a880af4
SM
3320 (Vwindow_combination_limit): New default value.
3321 Rewrite doc-string.
8e17c9ba 3322
589bd69b
EZ
33232012-09-22 Eli Zaretskii <eliz@gnu.org>
3324
3325 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
3326 the new overlay string. (Bug#10159)
3327
01108e3f
PE
33282012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3329
3330 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
3331 or that fprintf is async-signal-safe. POSIX doesn't require
3332 either assumption.
3333
82f8cd94
CY
33342012-09-22 Chong Yidong <cyd@gnu.org>
3335
3336 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
3337 (Bug#8207).
3338
3cccbd87
KH
33392012-09-22 Kenichi Handa <handa@gnu.org>
3340
3341 * composite.c (composition_reseat_it): Handle the case that a
3342 grapheme cluster is not covered by a single font (Bug#12352).
3343
09c01941
CY
33442012-09-21 Chong Yidong <cyd@gnu.org>
3345
3346 * image.c (define_image_type): Avoid adding duplicate types to
3347 image_types (Bug#12463). Suggested by Jörg Walter.
3348
acfa068f 33492012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
3350
3351 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
3352 (print_load_command_name): Add case LC_DATA_IN_CODE.
3353 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
3354
acfa068f 33552012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
3356
3357 * eval.c (Frun_hook_with_args_until_success)
3358 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
3359
acfa068f 33602012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
3361
3362 * fileio.c (Ffile_selinux_context): Only call freecon when
3363 lgetfilecon succeeded.
3364 (Fset_file_selinux_context): Likewise. (Bug#12444)
3365
acfa068f 33662012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
3367
3368 * xdisp.c (try_window_reusing_current_matrix): Under bidi
3369 reordering, locate the cursor by calling set_cursor_from_row; if
3370 that fails, clear the desired glyph matrix before returning a
3371 failure indication to the caller. Fixes leaving garbled display
3372 when fast scrolling with a down-key. (Bug#12403)
f2016bea
EZ
3373 (compute_stop_pos_backwards): Fix a typo that caused crashes while
3374 scrolling through multibyte text.
aa36e4d2 3375
e99f70c8
SM
33762012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
3377
3378 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
3379 calling mark_vectorlike since that's the one that marks the window.
3380 (mark_discard_killed_buffers): Mark the final cdr.
3381 * window.h (struct window): Move prev/next_buffers to the
3382 non-standard fields.
3383 * window.c (make_window): Initialize prev/next_buffers manually.
3384
f75beb47
PE
33852012-09-20 Paul Eggert <eggert@cs.ucla.edu>
3386
3387 Omit unused arg EXPECTED from socket hooks.
3388 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
3389 * nsterm.m (ns_term_init):
3390 * termhooks.h (struct terminal.read_socket_hook):
3391 * w32inevt.c (w32_console_read_socket):
3392 * w32term.c (w32_read_socket):
3393 * xterm.c (XTread_socket):
3394 Omit unused arg EXPECTED. All callers changed.
3395 (store_user_signal_events): Return void, not int, since callers no
3396 longer care about the return value. All uses changed.
3397
b019b76a
JB
33982012-09-20 Juanma Barranquero <lekktu@gmail.com>
3399
3400 * w32gui.h (XParseGeometry): Do not declare.
3401
05642592
PE
34022012-09-19 Paul Eggert <eggert@cs.ucla.edu>
3403
e4bce92a 3404 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1f9f395d 3405 Ignore 'expected'. See Eli Zaretskii in
e4bce92a
PE
3406 <http://bugs.gnu.org/12471#8> (last line).
3407
05642592
PE
3408 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
3409 (XParseGeometry): Now static. Substitute extremal values for
3410 values that are out of range.
3411
e543ae91
JD
34122012-09-19 Jan Djärv <jan.h.d@swipnet.se>
3413
3414 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
3415
3416 * nsfns.m (XParseGeometry): Remove.
3417 (Fx_create_frame): Call x_set_offset to correctly interpret
3418 top_pos in geometry.
3419
3a880af4 3420 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
e543ae91
JD
3421 (Fx_parse_geometry): If there is a space in string, call
3422 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
3423
45ba16c7
EZ
34242012-09-17 Eli Zaretskii <eliz@gnu.org>
3425
c8b9f1bc
EZ
3426 * search.c (scan_buffer): Use character positions in calls to
3427 region_cache_forward and region_cache_backward, not byte
3428 positions. (Bug#12196)
3429
b4c932a2
EZ
3430 * w32term.c (w32_read_socket): Set pending_signals to 1, like
3431 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
3432
45ba16c7
EZ
3433 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
3434 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
3435 emacs_blocked_malloc, now deleted.
3436
eeceac93
PE
34372012-09-17 Paul Eggert <eggert@cs.ucla.edu>
3438
3439 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
3440 The workaround was for improving performance on Solaris 2.4, but
3441 is getting in the way now. Emacs will still work if someone is
3442 still running Solaris 2.4 in a museum somewhere; Sun dropped
3443 support for Solaris 2.4 in 2003.
3444 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
3445 * process.c (create_process) [HAVE_WORKING_VFORK]:
3446 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
3447 since Emacs no longer uses vfork on that platform.
3448
78f83752
GM
34492012-09-17 Glenn Morris <rgm@gnu.org>
3450
3451 * emacs.c: Use COPYRIGHT.
3452
634b8cac
PE
34532012-09-16 Paul Eggert <eggert@cs.ucla.edu>
3454
0caaedb1
PE
3455 Remove configure's --without-sync-input option (Bug#12450).
3456 When auditing signal-handling in preparation for cleaning it up,
3457 I found that SYNC_INPUT has race conditions and would be a real
3458 pain to fix. Since it's an undocumented and deprecated
3459 configure-time option, now seems like a good time to remove it.
3460 Also see <http://bugs.gnu.org/11080#16>.
3461 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
3462 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
3463 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3464 (malloc_hysteresis):
3465 (check_depth) [XMALLOC_OVERRUN_CHECK]:
3466 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
3467 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
3468 (dont_register_blocks, bytes_used_when_reconsidered)
3469 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
3470 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
3471 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1f9f395d 3472 Remove. All uses removed.
0caaedb1
PE
3473 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
3474 implementation, one that depends on whether the new macro
3475 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
3476 is defined.
3477 * atimer.c (run_timers, handle_alarm_signal):
3478 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
3479 (handle_async_input, process_pending_signals)
3480 (handle_input_available_signal, init_keyboard):
3481 * nsterm.m (ns_read_socket):
3482 * process.c (wait_reading_process_output):
3483 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
3484 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
3485 (emacs_write):
3486 * xterm.c (XTread_socket):
3487 Assume SYNC_INPUT.
3488 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
3489 * eval.c (handling_signal): Remove. All uses removed.
3490 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
3491 All uses replaced with the SYNC_INPUT version.
3492 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
3493 Remove decls.
3494 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3495 Now static.
3496
634b8cac
PE
3497 * font.c (Ffont_shape_gstring): Remove unused local.
3498
83da1b55
GM
34992012-09-16 Glenn Morris <rgm@gnu.org>
3500
518650a5
GM
3501 * Makefile.in (clean): No longer run nextstep's clean.
3502
83da1b55
GM
3503 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
3504 (ns_frag): Remove.
3505 (ns-app): Move here from ns.mk, and simplify.
3506 (clean): Simplify nextstep entry.
3507 * ns.mk: Remove file.
3508
85a43e2e
KH
35092012-09-17 Kenichi Handa <handa@gnu.org>
3510
3511 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
3512 not covert the last few charactes.
3513
ba13e616 35142012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
3515
3516 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
3517 here, but just check the validity of glyphs in the glyph-string.
3518
a8c729af
MR
35192012-09-16 Martin Rudalics <rudalics@gmx.at>
3520
3a880af4
SM
3521 * window.c (Fwindow_parameter, Fset_window_parameter):
3522 Accept any window as argument (Bug#12452).
a8c729af 3523
c077c059
JD
35242012-09-16 Jan Djärv <jan.h.d@swipnet.se>
3525
3526 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
3527 to ns_term_init to avoid memory leak.
3528
3529 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
3530 explicit retain/release.
3531 (ns_term_init): Only allow one display. Initialize outerpool and
3532 ns_*_types.
3533
39a57ad0
PE
35342012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3535
3536 Port _setjmp fix to POSIXish hosts as well as Microsoft.
3537 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
3538 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
3539 the Microsoft problem in a different way, by altering ../nt/config.nt.
3540
7105c8cb
EZ
35412012-09-15 Eli Zaretskii <eliz@gnu.org>
3542
3543 * w32xfns.c:
3544 * w32uniscribe.c:
3545 * w32term.c:
3546 * w32select.c:
3547 * w32reg.c:
3548 * w32proc.c:
3549 * w32menu.c:
3550 * w32inevt.c:
3551 * w32heap.c:
3552 * w32font.c:
3553 * w32fns.c:
3554 * w32console.c:
3555 * w32.c:
3556 * w16select.c: Remove inclusion of setjmp.h, as it is now included
3557 by lisp.h. This completes removal of setjmp.h inclusion
3558 erroneously announced in the previous commit. (Bug#12446)
3559
3560 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
3561 more accurate.
3562
3563 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
3564 not defined as a macro. The latter happens on MS-Windows.
3565 (Bug#12446)
3566
0328b6de
PE
35672012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3568
3569 Port better to POSIX hosts lacking _setjmp (Bug#12446).
3570 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 3571 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
3572 only reason for the instance was because "lisp.h" was included.
3573 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
3574 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
3575 and _longjmp with the new symbols. Emacs already uses _setjmp if
3576 available, so this change affects only POSIXish hosts that have
3577 sigsetjmp but not _setjmp, such as some versions of Solaris and
3578 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
3579 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
3580 (png_load_body) [HAVE_PNG]:
3581 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
3582 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
3583 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
3584 since PNG requires jmp_buf. This is the only exception to the
3585 general rule that we now use sys_setjmp and sys_longjmp.
3586 This exception is OK since this code does not change the signal
3587 mask or longjmp out of a signal handler.
3588
2af03429
PE
35892012-09-14 Paul Eggert <eggert@cs.ucla.edu>
3590
3591 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3592 Include "syssignal.h", for 'main_thread'.
3593
2f294edf
DA
35942012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
3595
3596 Avoid out-of-range marker position (Bug#12426).
3a880af4
SM
3597 * insdel.c (replace_range, replace_range_2):
3598 Adjust markers before overlays, as suggested by comments.
2f294edf
DA
3599 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
3600 Remove redundant check before calling offset_intervals.
3601
6b533e9c
MR
36022012-09-14 Martin Rudalics <rudalics@gmx.at>
3603
3604 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
3605 current buffer (Bug#12387).
3606
2a7931e3
JB
36072012-09-14 Juanma Barranquero <lekktu@gmail.com>
3608
3609 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
3610
c18e885b
PE
36112012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3612
3613 Use a more backwards-compatible timer format (Bug#12430).
3614 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
3615 vector element, not from the 4th, since PSECS is now at the end.
3616 (Fcurrent_idle_time): Doc fix.
3617
d59a1afb
DA
36182012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3619
3620 Function to mark objects and remove killed buffers at once.
3621 * alloc.c (discard_killed_buffers): Rename to ...
3622 (mark_discard_killed buffers) ... new name. Add marking
3623 of remaining objects. Fix comment. Adjust users.
3624 (mark_object): Do not touch frame buffer lists here.
3625 * frame.c (delete_frame): Reset frame buffer lists here.
3626
5f0cb45a
PE
36272012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3628
8ea47e3a
PE
3629 Better workaround for GNOME bug when --enable-gcc-warnings.
3630 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
3631 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
3632 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
3633
4a4bbad2
PE
3634 Simplify SIGIO usage (Bug#12408).
3635 The code that dealt with SIGIO was crufty and confusing, e.g., it
3636 played tricks like "#undef SIGIO" but these tricks were not used
3637 consistently. Simplify mostly by not #undeffing standard symbols,
3638 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
3639 or not as we please) rather than "defined SIGIO" (standard symbol
3640 that we probably shouldn't #undef).
3641 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
3642 Modules that need it can include it.
3643 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
3644 * dispextern.h (ignore_sigio): New decl.
3645 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
3646 unconditionally, since it's now a no-op if !USABLE_SIGIO.
3647 * emacs.c (shut_down_emacs):
3648 * keyboard.c (kbd_buffer_store_event_hold):
3649 Use ignore_sigio rather than invoking 'signal' directly.
3650 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
3651 for FIONREAD.
3652 (FIONREAD, SIGIO): Do not #undef.
3653 (tty_read_avail_input): Use #error rather than a syntax error.
3654 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
3655 for I_PIPE, used by SETUP_SLAVE_PTY.
3656 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
3657 * sysdep.c (croak): Remove; no longer needed. This bit of
3658 temporary code, with Fred N. Fish's comment that it's temporary,
3659 has been in Emacs since at least 1992!
3660 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
3661 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
3662 * syssignal.h (croak): Remove decl.
3663 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
3664 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
3665 now that we're termios-only.
3666 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
3667 * term.c (dissociate_if_controlling_tty): Use #error rather than
3668 a run-time error.
3669
5f0cb45a
PE
3670 Work around GCC and GNOME bugs when --enable-gcc-warnings.
3671 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
3672 to work around GNOME bug 683906.
3673 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
3674 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
3675 This works around GCC bug 54561.
3676
40bce90b
PE
36772012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3678
3679 More fixes for 'volatile' and setjmp/longjmp.
3680 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
3681 * image.c (struct png_load_context) [HAVE_PNG]: New type.
3682 (png_load_body) [HAVE_PNG]:
3683 (jpeg_load_body) [HAVE_JPEG]:
3684 New function, with most of the old parent function's body.
3685 (png_load) [HAVE_PNG]:
3686 (jpeg_load) [HAVE_JPEG]:
3687 Invoke the new function, to avoid longjmp munging our locals.
3688 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
3689 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
3690 longjmp is passed 2, as the C standard doesn't guarantee this.
3691 Instead, store the failure code into mgr->failure_code.
3692
bfeae2cf
SM
36932012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3694
3695 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
3696 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
3697 (syms_of_keyboard): Remove support for unread-command-char.
3698
8099e36b
EZ
36992012-09-12 Eli Zaretskii <eliz@gnu.org>
3700
3701 * w32proc.c (sys_kill): If PID is our process ID and the signal is
3702 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
3703 violation. (Bug#12426)
3704
92547ff9
PE
37052012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3706
3707 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
3708
45b82ad0
SM
37092012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3710
3711 * eval.c: Add `inhibit-debugger'.
3712 (Qinhibit_debugger): New symbol.
3713 (call_debugger): Bind it instead of Qdebug_on_error.
3714 (maybe_call_debugger): Test Vinhibit_debugger.
3715 (syms_of_eval): Define inhibit-debugger.
3716 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
3717 (syms_of_xdisp): Remove inhibit-debug-on-message.
3718
5779a1dc
PE
37192012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3720
50f2e553
PE
3721 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
3722 If a nonvolatile local variable is written before a _longjmp to
3723 the frame containing the variable, and is read after the _longjmp,
3724 the value read is indeterminate. Some local variables of type
3725 'struct handler' and 'struct catchtag' are used in this way, so
3726 mark each of their slots as volatile if the slot can be set before
3727 _longjmp and read afterwards.
3728 * lisp.h (struct handler): var and chosen_clause are now volatile.
3729 (struct catchtag): val, next, and pdlcount are now volatile.
3730
ae1d87e2
PE
3731 * bidi.c (bidi_push_it, bidi_pop_it):
3732 * fns.c (copy_hash_table):
3733 * image.c (define_image_type):
3734 * keyboard.c (kbd_buffer_store_event_hold):
3735 * process.c (Fprocess_send_eof):
3736 * xfaces.c (x_create_gc) [HAVE_NS]:
3737 * xgselect.c (xg_select):
3738 Prefer assignment to memcpy when either will do.
3739
5779a1dc
PE
3740 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
3741 Use pointer-to-a-pointer to simplify and avoid a NILP check each
3742 time an item is removed. No need to mark this function 'inline';
3743 the compiler knows better than we do.
3744
c4c9756b
JD
37452012-09-11 Jan Djärv <jan.h.d@swipnet.se>
3746
3747 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
3748 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
3749 to change_frame_size (Bug#12388).
3750 (windowDidResize:): Pass YES to updateFrameSize.
3751
3752 * nsterm.h: Add delay parameter to updateFrameSize.
3753
d73e321c
DA
37542012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3755
3756 Discard killed buffers from deleted window and frame objects.
3757 This reduces an amount of references to killed buffers and
3758 helps GC to reclaim them faster.
3759 * alloc.c (discard_killed_buffers): New function.
3760 (mark_object): Use it for deleted windows and frames.
3761 (mark_object): If symbol's value is set up for a killed buffer
1f9f395d 3762 or deleted frame, restore its global binding.
d73e321c
DA
3763 * data.c (swap_in_global_binding): Add GC notice.
3764 (swap_in_symval_forwarding): Use convenient set_blv_where.
3765 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
3766 * window.h: ... to here.
3767
e578f381
DA
37682012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3769
3770 Convenient macro to check whether the buffer is live.
3771 * buffer.h (BUFFER_LIVE_P): New macro.
3772 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
3773 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
3774
3057e615
YM
37752012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3776
3777 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
3778 composition cases (Bug#12364).
3779
3780 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
3781 overhang of succeeding glyphs overlapping box cursor.
3782
3783 * w32term.c (x_draw_glyph_string): Likewise.
3784
6fda35f2
PE
37852012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3786
c990426a
PE
3787 Simplify, document, and port floating-point (Bug#12381).
3788 The porting part of this patch fixes bugs on non-IEEE platforms
3789 with frexp, ldexp, logb.
3790 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
3791 Now static.
3792 * floatfns.c: Simplify discussion of functions that Emacs doesn't
3793 support, by removing commented-out code and briefly listing the
3794 C89 functions excluded. The commented-out stuff was confusing
3795 maintenance, e.g., we thought we needed cbrt but it was commented out.
3796 (logb): Remove decl; no longer needed.
3797 (isfinite): New macro, if not already supplied.
3798 (isnan): Don't replace any existing macro.
3799 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
3800 are present on all C89 platforms.
3801 (Ffrexp): Do not special-case zero, as frexp does the right thing
3802 for that case.
3803 (Flogb): Do not use logb, as it doesn't have the desired meaning
3804 on hosts that use non-base-2 floating point. Instead, stick with
3805 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
3806 frexp, to avoid getting an unspecified result.
3807
6fda35f2
PE
3808 * xdisp.c (Qinhibit_debug_on_message): Now static.
3809
16130a58
JD
38102012-09-10 Jan Djärv <jan.h.d@swipnet.se>
3811
3812 * nsterm.m (ns_update_begin): Set clip path to whole view by using
3813 NSBezierPath (Bug#12131).
3814
d105a573
CY
38152012-09-10 Chong Yidong <cyd@gnu.org>
3816
3817 * fns.c (Fdelq, Fdelete): Doc fix.
3818
ff55dfe8
PE
38192012-09-10 Paul Eggert <eggert@cs.ucla.edu>
3820
3821 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
3822 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
3823
e7032e7c
SM
38242012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
3825
3826 * lisp.h (make_lisp_ptr): New macro to replace XSET.
3827 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
3828 Use it.
3829
e9957956
EZ
38302012-09-09 Eli Zaretskii <eliz@gnu.org>
3831
aba05ce9
EZ
3832 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
3833 left fringe if the window has a left margin. This avoids leaving
3834 traces of the cursor because its leftmost pixel is not drawn over.
3835
e9957956
EZ
3836 * dispnew.c (update_window_line): When the left margin area of a
3837 screen line is updated, set the redraw_fringe_bitmaps_p flag of
3838 that screen line. (Bug#12277)
3839
f6196b87
PE
38402012-09-09 Paul Eggert <eggert@cs.ucla.edu>
3841
3842 Assume C89 or later for math functions (Bug#12381).
3843 This simplifies the code, and makes it a bit smaller and faster,
3844 and (most important) makes it easier to clean up signal handling
3845 since we can stop worring about floating-point exceptions in
3846 library code. That was a problem before C89, but the problem
3847 went away many years ago on all practical Emacs targets.
3848 * data.c, image.c, lread.c, print.c:
3849 Don't include <math.h>; no longer needed.
3850 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
3851 might be autoconfigured, as that never happens.
3852 * data.c (fmod):
3853 * doprnt.c (DBL_MAX_10_EXP):
3854 * print.c (DBL_DIG):
3855 Remove. C89 or later always defines these.
3856 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
3857 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
3858 (arith_error, domain_error, domain_error2):
3859 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
3860 no longer needed -- we simply return what C returns. All uses removed.
3861 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
3862 the wrapped code.
3863 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
3864 Remove. All uses expanded, as these macros are no longer used
3865 more than once and are now more trouble than they're worth.
3866 (Ftan): Use tan, not sin / cos.
3867 (Flogb): Assume C89 frexp.
3868 (fmod_float): Assume C89 fmod.
3869 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
3870 (init_floatfns): Remove. All uses removed.
3871
9d7f1863
JD
38722012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3873
3874 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
3875 compositeToPoint for OSX < 10.6 (Bug#12390).
3876
eabf0404
PE
38772012-09-08 Paul Eggert <eggert@cs.ucla.edu>
3878
3879 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
3880 This produces more-accurate results.
3881
0b3b1d23
JD
38822012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3883
3884 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
3885 changes (Bug#12088).
3886
6dcef6ec
CY
38872012-09-08 Chong Yidong <cyd@gnu.org>
3888
3889 * syntax.c (Fstring_to_syntax): Doc fix.
3890
aa7d57c5
JD
38912012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3892
3893 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
3894 in the internal border.
3895 (x_set_window_size): Remove static variables and their usage.
3896 (ns_redraw_scroll_bars): Fix NSTRACE arg.
3a880af4
SM
3897 (ns_after_update_window_line, ns_draw_fringe_bitmap):
3898 Remove fringe/internal border adjustment (Bug#11052).
aa7d57c5
JD
3899 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
3900 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
3901 (ns_fix_rect_ibw): Remove.
3902 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
3903 (ns_dumpglyphs_box_or_relief): Ditto.
3904 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
3905 adjustment.
3906 (ns_dumpglyphs_image): Ditto.
fc0c31f8 3907 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
3908 border adjustment.
3909 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
3910 their usage. Add fringe_extended_p and its use as in other terms.
3911 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
3912 scroll bar was removed.
3913 (updateFrameSize): New function.
3914 (windowDidResize): Move code to updateFrameSize and call it.
3915
3916 * nsterm.h (EmacsView): Add updateFrameSize.
3917
1a5432bc
CY
39182012-09-07 Chong Yidong <cyd@gnu.org>
3919
b4f5313e
CY
3920 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
3921
1a5432bc
CY
3922 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
3923
1a4f1e9b
PE
39242012-09-07 Paul Eggert <eggert@cs.ucla.edu>
3925
3926 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
3927 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
3928 Problem introduced when merging patches. Noted by Eli Zaretskii in
3929 <http://bugs.gnu.org/12327#67>.
1a4f1e9b
PE
3930 * floatfns.c: Comment fix.
3931 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
3932 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
3933 and anyway the declaration is harmless even if SIGDANGER is not defined.
3934 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
3935 defined BROKEN_FIONREAD). systty.h formerly did this, but other
3936 source files not surprisingly expected syssignal.h to define, or
3937 not define, SIGIO, and it's cleaner to do it that way, for consistency.
3938 Include <sys/ioctl.h>, for FIONREAD.
3939 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
3940 This eliminates a problem whereby other files mysteriously had
3941 to include "syssignal.h" before including "systty.h" if they
3942 wanted to use "#ifdef SIGIO".
3943
bc8000ff
EZ
39442012-09-07 Eli Zaretskii <eliz@gnu.org>
3945
3e6d6928
EZ
3946 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
3947
3948 * w32.c (sigemptyset): Empty the set.
3949 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
3950
bc8000ff
EZ
3951 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
3952
b4fa72f2
DA
39532012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
3954
3955 * alloc.c (mark_buffer): Revert unsafe marking optimization.
3956 (mark_object): Likewise for frame objects.
3957
30730c93
PE
39582012-09-07 Paul Eggert <eggert@cs.ucla.edu>
3959
3960 * syssignal.h (handle_on_main_thread): Always declare,
3961 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
3962 This ports to platforms without HAVE_PTHREAD.
3963
2fe28299
PE
39642012-09-06 Paul Eggert <eggert@cs.ucla.edu>
3965
3966 Signal-handler cleanup (Bug#12327).
3967 Emacs's signal handlers were written in the old 4.2BSD style with
3968 sigblock and sigmask and so forth, and this led to some
3969 inefficiencies and confusion. Rewrite these to use
3970 pthread_sigmask etc. without copying signal sets around. Also,
3971 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
3972 'signal', and instead use functions that do not attempt to take
3973 over the system name space. This patch causes Emacs's text
3974 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
3975 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
3976 Do not include <signal.h> or "syssignal.h", as these
3977 modules do not use signals.
3978 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
3979 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
3980 Do not include <signal.h>, as "syssignal.h" does that for us now.
3981 * atimer.c (sigmask_atimers): New function.
3982 (block_atimers, unblock_atimers): New functions,
3983 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
3984 All uses replaced.
3985 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
3986 no longer needed here.
3987 * emacs.c (main): Inspect existing signal handler with sigaction,
fc0c31f8 3988 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
3989 * sysdep.c (struct save_signal): New member 'action', replacing
3990 old member 'handler'.
3991 (save_signal_handlers, restore_signal_handlers):
3992 Use sigaction instead of 'signal' to save and restore.
3993 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
3994 New function. All users of 'signal' modified to use set_sighandler
3995 if they're writeonly, and to use sys_signal if they're read+write.
3996 (emacs_sigaction_init, forwarded_signal): New functions.
3997 (sys_signal): Remove. All uses replaced by calls to sigaction
3998 and emacs_sigaction_init, or by direct calls to 'signal'.
3999 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
4000 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
4001 all uses replaced by pthread_sigmask etc. calls.
4002 * syssignal.h: Include <signal.h>.
4003 (emacs_sigaction_init, forwarded_signal): New decls.
4004 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
4005 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
4006 (sigmask, sys_sigmask): Remove; no longer needed.
4007 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
4008 (sigblock, sigunblock, sigfree):
4009 (sigsetmask) [!defined sigsetmask]:
4010 Remove. All uses replaced by pthread_sigmask.
4011 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
4012 no longer need to be replaced, and its typical old uses
4013 are now done via emacs_sigaction_init and sigaction.
4014 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
4015 (sys_sigdel): Remove; unused.
4016 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
4017
0216c128
EZ
40182012-09-06 Eli Zaretskii <eliz@gnu.org>
4019
4020 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
4021 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
4022
c752cfa9
DA
40232012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4024
4025 Explicitly mark buffer_defaults and buffer_local_symbols.
4026 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
4027 mark_local_symbols here.
4028 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
4029 since special buffers aren't marked here any more.
4030 (allocate_buffer): Chain new buffer with all_buffers here...
4031 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
4032 not here.
4033 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
4034 (syms_of_buffer): Remove staticpro of the above.
4035 (init_buffer_once): Set names for buffer_defaults and
4036 buffer_local_symbols.
4037
a864ef14
PE
40382012-09-06 Paul Eggert <eggert@cs.ucla.edu>
4039
4040 Use bool for booleans in font-related modules.
4041 * font.c (font_intern_prop, font_style_to_value)
4042 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
4043 (generate_otf_features, font_check_otf_features, font_check_otf)
4044 (font_match_p, font_list_entities, font_at):
4045 * fontset.c (fontset_id_valid_p, reorder_font_vector
4046 (fontset_find_font, Fset_fontset_font)
4047 (face_suitable_for_char_p) [0]:
4048 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
4049 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
4050 (m17n_flt_initialized, ftfont_shape_by_flt):
4051 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
4052 * nsfont.m (nsfont_draw):
4053 * w32font.c (w32font_draw):
4054 * w32term.c (x_draw_glyphless_glyph_string_foreground):
4055 Use bool for booleans.
4056 * font.h: Adjust to above API changes.
4057 (struct font, struct font_driver, struct font_driver_list):
4058 Use bool for booleans.
4059 (struct font): Remove useless member encoding_type.
4060 All users removed.
4061 * fontset.c, xftfont.c: Omit unnecessary static decls.
4062
0699fc18
DA
40632012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4064
4065 * alloc.c (mark_object): Revert window marking code
4066 since it's unsafe for the Fset_window_configuration.
4067
20ef56db
PE
40682012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4069
2fe28299 4070 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
4071 Be more systematic about preserving errno whenever a signal
4072 handler returns, even if it's not in the main thread. Do this by
4073 renaming signal handlers to distinguish between signal delivery
4074 and signal handling. All uses changed.
4075 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
4076 * data.c (deliver_arith_signal): Rename from arith_error.
4077 * dispnew.c (deliver_window_change_signal): Rename from
4078 window_change_signal.
4079 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
4080 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
4081 * keyboard.c (deliver_input_available_signal): Rename from
4082 input_available_signal.
4083 (deliver_user_signal): Rename from handle_user_signal.
4084 (deliver_interrupt_signal): Rename from interrupt_signal.
4085 * process.c (deliver_pipe_signal): Rename from send_process_trap.
4086 (deliver_child_signal): Rename from sigchld_handler.
4087 * atimer.c (handle_alarm_signal):
4088 * data.c (handle_arith_signal):
4089 * dispnew.c (handle_window_change_signal):
4090 * emacs.c (handle_fatal_signal, handle_danger_signal):
4091 * keyboard.c (handle_input_available_signal):
4092 * keyboard.c (handle_user_signal, handle_interrupt_signal):
4093 * process.c (handle_pipe_signal, handle_child_signal):
4094 New functions, with the actual signal-handling code taken from the
4095 original respective signal handlers, sans the sporadic attempts to
4096 preserve errno, since that's now done by handle_on_main_thread.
4097 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
4098 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
4099 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4100 Move to sysdep.c.
4101 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4102 Move initialization of main_thread to sysdep.c's init_signals.
4103 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
4104 our usage, and simplifies the mainline code.
4105 (record_child_status_change): New static function, as a helper
4106 for handle_child_signal, and with most of the old child handler's
4107 contents.
4108 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
4109 (handle_child_signal): Use the above.
4110 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4111 Moved here from emacs.c.
4112 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
4113 code moved here from emacs.c's main function.
4114 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
3a880af4
SM
4115 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
4116 This lets callers save and restore errno properly.
20ef56db 4117
e3ccf108
DA
41182012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4119
4120 Remove redundant or unused things here and there.
4121 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
4122 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
4123 * editfns.c (Fcompare_buffer_substrings): Likewise.
4124 * frame.h (struct terminal, struct font_driver_list):
4125 Remove redundant declarations.
4126 * window.h (Qleft, Qright): Likewise.
4127
697e1e39
DA
41282012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4129
4130 Do not mark objects from deleted buffers, windows and frames.
4131 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
4132 (mark_object): Likewise for windows and frames.
4133
c1ca42ca
DA
41342012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4135
4136 * alloc.c (valid_lisp_object_p): Treat killed buffers,
4137 buffer_defaults and buffer_local_symbols as valid objects.
4138 Return special value to denote them.
4139
014d93be
PE
41402012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4141
f75d7a91
PE
4142 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
4143 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
4144 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
4145 (file_name_absolute_p, Fsubstitute_in_file_name):
4146 (check_executable, check_writable, Ffile_accessible_directory_p)
4147 (Fset_file_selinux_context, Fdefault_file_modes)
4148 (Finsert_file_contents, choose_write_coding_system)
4149 (Fwrite_region, build_annotations, a_write, e_write)
4150 (Fdo_auto_save):
4151 * filelock.c (boot_time_initialized, get_boot_time)
4152 (get_boot_time_1, lock_file_1, within_one_second):
4153 * floatfns.c (in_float):
4154 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
4155 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
4156 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
4157 * lisp.h (struct Lisp_Hash_Table.cmpfn):
4158 * window.c (compare_window_configurations):
4159 Use bool for booleans.
4160 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
4161 (Fdefault_file_modes): Now mode_t, not int, for modes.
4162 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
4163 (internal_delete_file): Now returns void, not a (boolean) int,
4164 since nobody was looking at the return value.
4165 * lisp.h, window.h: Adjust to above API changes.
4166
014d93be
PE
4167 * xdisp.c (set_message): Simplify and reindent last change.
4168
776f29e1
JB
41692012-09-05 Juanma Barranquero <lekktu@gmail.com>
4170
4171 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
4172
7f7e0167
LI
41732012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
4174
4175 * eval.c (call_debugger): Make the function non-static so that we
4176 can call it from set_message.
4177
4178 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
4179 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
4180
cf29dd84
PE
41812012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4182
4183 Give more-useful info on a fatal error (Bug#12328).
4184 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
4185 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
4186 of doing the work ourselves.
4187 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
4188 do most of the work.
4189 (fatal_error_backtrace): New function, taken from the guts
4190 of the old fatal_error_signal, but with a new option to output
4191 a backtrace.
4192 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
4193 info about the signal than just its number.
4194 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
4195 * sysdep.c: Include <execinfo.h>
4196 (emacs_backtrace): New function, taken partly from the previous
4197 code of the 'die' function.
4198 (emacs_abort): Call fatal_error_backtrace rather than abort.
4199
972debf2
SM
42002012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
4201
4202 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
4203 eager (load-time) macro-expansion.
4204 * lisp.mk (lisp): Add macroexp.
4205
1088b922
PE
42062012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4207
4208 Simplify redefinition of 'abort' (Bug#12316).
4209 Do not try to redefine the 'abort' function. Instead, redo
4210 the code so that it calls 'emacs_abort' rather than 'abort'.
4211 This removes the need for the NO_ABORT configure-time macro
4212 and makes it easier to change the abort code to do a backtrace.
4213 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
4214 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
4215 Remove; sysdep.c's emacs_abort now takes its place.
4216 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
4217 'abort' changed to use 'emacs_abort'.
4218 * msdos.c (dos_abort) [defined abort]: Remove; not used.
4219 (abort) [!defined abort]: Rename to ...
4220 (emacs_abort): ... new name.
4221 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
4222 the place of the old 'abort' in emacs.c.
4223 * w32.c, w32fns.c (abort): Do not #undef.
4224 * w32.c (emacs_abort): Rename from w32_abort.
4225
30934d33
EZ
42262012-09-04 Eli Zaretskii <eliz@gnu.org>
4227
4228 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
4229 offsets[j].dv, since the y axis of the screen coordinates points
4230 down, while the y axis of the font definition coordinates points
4231 up. This fixes display of Arabic diacritics such as KASRA and
4232 KASRATAN. (Bug#11860)
4233
af26b72c
PE
42342012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4235
4236 Be more systematic about _setjmp vs setjmp.
4237 * alloc.c (test_setjmp, mark_stack):
4238 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
4239 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
4240 (png_load, my_error_exit, jpeg_load):
4241 * process.c (send_process_trap, send_process):
4242 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
4243 The underscored versions are up to 30x faster on some hosts.
4244 Formerly, the code used setjmp+longjmp sometimes and
4245 _setjmp+_longjmp at other times, with no particular reason to
4246 prefer setjmp+longjmp.
4247
26d4541d
PE
42482012-09-03 Paul Eggert <eggert@cs.ucla.edu>
4249
d42f4f0f 4250 Fix minor problem found by static checking.
26d4541d 4251 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 4252
c5e28e39
MR
42532012-09-03 Martin Rudalics <rudalics@gmx.at>
4254
4255 * buffer.c (Fdelete_all_overlays): New function.
4256
3eab3ca9
CY
42572012-09-03 Chong Yidong <cyd@gnu.org>
4258
4259 * gtkutil.c: Add extern decl for Qxft.
4260
c04889f8
PE
42612012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4262
1882aa38
PE
4263 * emacs.c, eval.c: Use bool for boolean.
4264 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
4265 (malloc_using_checking) [DOUG_LEA_MALLOC]:
4266 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
4267 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
4268 (main, decode_env_path, Fdaemon_initialized):
4269 * eval.c (call_debugger, Finteractive_p, interactive_p):
4270 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
4271 (maybe_call_debugger, Fbacktrace):
4272 * process.c (read_process_output, exec_sentinel):
4273 Use bool for booleans.
4274 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
4275 All callers changed.
4276 * eval.c (interactive_p): Omit always-true boolean argument
4277 EXCLUDE_SUBRS_P. All callers changed.
4278 * dispextern.h, lisp.h: Reflect above API changes.
4279 * firstfile.c (dummy): Use the address of 'main', whose signature
4280 won't change, instead of the address of 'initialize', whose
4281 signature just changed from int to bool.
4282 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
4283 * msdos.c (fatal_error_in_progress): ... from here.
4284 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
4285 of incrementing it.
4286 (redisplay_internal, unwind_redisplay): Simply clear
4287 REDISPLAYING_P when unwinding, instead of saving its previous,
4288 always-false value and then restoring it.
4289
a411ac43
PE
4290 Clean up some extern decls.
4291 Mostly, this hoists extern decls out of .c files and into .h files.
4292 That way, we're more likely to catch errors if the interfaces change.
4293 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
4294 declare xg_mark_data.
4295 * dispextern.h (x_frame_parm_handlers):
4296 * font.h (Qxft):
4297 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
4298 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
4299 (Qultra_bold, Qoblique, Qitalic):
4300 Move extern decl here from .c file.
4301 * alloc.c (xg_mark_data) [USE_GTK]:
4302 * doc.c (Qclosure):
4303 * eval.c (Qlexical_binding):
4304 * fns.c (time) [!HAVE_UNISTD_H]:
4305 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
4306 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
4307 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
4308 * lread.c (Qinternal_interpreter_environment):
4309 * minibuf.c (Qbuffer):
4310 * process.c (QCfamily, QCfilter):
4311 * widget.c (free_frame_faces):
4312 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
4313 * xfont.c (x_clear_errors):
4314 * xterm.c (x_frame_parm_handlers):
4315 Remove now-redundant extern decls.
4316 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
4317 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
4318 Now static.
4319 * xfaces.c: Remove unnecessary static decls.
4320 * xterm.c (updating_frame): Remove decl of nonexistent object.
4321
c04889f8
PE
4322 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
4323 when building globals.h, as the objects that are not built on
4324 this host are not needed to compile C files on this host.
4325
8b339673
JD
43262012-09-02 Jan Djärv <jan.h.d@swipnet.se>
4327
4328 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
4329
4330 * frame.h: Add missing prototype for x_wm_set_size_hint.
4331
a08d4ba7
PE
43322012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4333
4334 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
4335 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
4336 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
4337 (Fsubstitute_command_keys):
4338 * editfns.c (region_limit, find_field, Fconstrain_to_field)
4339 (save_excursion_save, save_excursion_restore)
4340 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
4341 (format_time_string, general_insert_function)
4342 (make_buffer_string, make_buffer_string_both)
4343 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
4344 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
4345 (copy_text, insert_1, insert_1_both, insert_from_string)
4346 (insert_from_string_before_markers, insert_from_string_1)
4347 (insert_from_buffer, insert_from_buffer_1, replace_range)
4348 (replace_range_2, del_range_1, del_range_byte, del_range_both)
4349 (del_range_2, modify_region):
4350 * intervals.c (intervals_equal, balance_possible_root_interval)
4351 (adjust_intervals_for_insertion, merge_properties_sticky)
4352 (graft_intervals_into_buffer, lookup_char_property)
4353 (adjust_for_invis_intang, set_point_both)
4354 (get_property_and_range, compare_string_intervals)
4355 (set_intervals_multibyte_1, set_intervals_multibyte):
4356 * keyboard.c (decode_timer):
4357 Use bool for boolean.
4358 * intervals.h, lisp.h, systime.h: Reflect above API changes.
4359 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
4360
48c948de
CY
43612012-09-02 Chong Yidong <cyd@gnu.org>
4362
4363 * keymap.c (push_key_description): Print M-TAB as C-M-i
4364 (Bug#11758).
4365
6c49a40b
JB
43662012-09-02 Juanma Barranquero <lekktu@gmail.com>
4367
4368 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
4369 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
4370 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
4371 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
4372 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
4373 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
4374 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
4375
4dfbd238
EZ
43762012-09-01 Eli Zaretskii <eliz@gnu.org>
4377
7e510e28
EZ
4378 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
4379 more than one grapheme cluster passed to the shaper: compute the
4380 offset adjustment values separately for each cluster. (Bug#11860)
4381
4dfbd238
EZ
4382 * image.c: Restore mistakenly removed inclusion of w32.h. Without
4383 it, GCC doesn't see prototypes of w32_delayed_load, and complains
4384 about implicit conversions from integer to pointer.
4385
86571ae0
DC
43862012-09-01 Daniel Colascione <dancol@dancol.org>
4387
4388 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
4389 system used too early.
4390
0e23ef9d
PE
43912012-09-01 Paul Eggert <eggert@cs.ucla.edu>
4392
4393 Better seed support for (random).
4394 * emacs.c (main): Call init_random.
4395 * fns.c (Frandom): Set the seed from a string argument, if given.
4396 Remove long-obsolete Gentzel cruft.
4397 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
4398 (init_random): New function.
4399
17a2cbbd
DC
44002012-09-01 Daniel Colascione <dancol@dancol.org>
4401
4402 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
4403 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
4404 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
4405 x_wm_set_size_hint, x_query_colors, x_real_positions,
4406 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
4407 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
4408 all of which have been moved to common code.
4409
4410 * xfaces.c: Include TERM_HEADER instead of listing all possible
4411 window-system headers.
4412
4413 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
4414 to match header.
4415
4416 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
4417 directly accessing frame internals.
4418
f18cbb28 4419 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
4420 globals_of_w32font.
4421
4422 * process.c: Include TERM_HEADER instead of listing all possible
4423 window-system headers.
4424
3a880af4
SM
4425 * nsterm.h: Remove declarations now in frame.h.
4426 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
17a2cbbd
DC
4427
4428 * menu.c: Include TERM_HEADER instead of listing all possible
4429 window-system headers.
4430
4431 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
4432 window system.
4433
4434 * keyboard.c: Include TERM_HEADER instead of listing all possible
4435 window-system headers.
4436
4437 * image.c: Include TERM_HEADER instead of listing all possible
4438 window-system headers. Declare Vlibrary_cache when compiling for
4439 Windows.
4440
4441 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
4442 window system declarations.
4443
4444 * frame.h: Move common functions here: set_frame_menubar,
4445 x_set_window_size, x_sync, x_get_focus_frame,
4446 x_set_mouse_position, x_set_mouse_pixel_position,
4447 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
4448 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
4449 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
4450 x_activate_menubar, x_real_positions, x_bitmap_icon,
4451 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
4452 and x_query_colors.
4453
4454 * frame.c: Include TERM_HEADER instead of listing all possible
4455 window-system headers.
4456
4457 * font.c: Include TERM_HEADER instead of listing all possible
4458 window-system headers.
4459
4460 * emacs.c: Include TERM_HEADER.
4461
f18cbb28
EZ
4462 * dispnew.c: Include TERM_HEADER instead of listing all possible
4463 window-system headers.
17a2cbbd 4464
f18cbb28 4465 * ccl.h: Include character.h.
17a2cbbd
DC
4466
4467 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
4468 the current window system; include in list of objects to link into
4469 Emacs.
4470
c650a5de
DA
44712012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4472
4473 Remove mark_ttys function and fix tty_display_info initialization.
4474 * lisp.h (mark_ttys): Remove prototype.
4475 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
4476 to mark_ttys because all possible values of 'top_frame' slot are
4477 the frames which are reachable from Vframe_list.
4478 * term.c (mark_ttys): Remove.
4479 (init_tty): Safely initialize 'top_frame' slot with Qnil.
4480
4e0f6479
DA
44812012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4482
4483 Change struct frame bitfields from unsigned char to unsigned.
4484 * frame.h (struct frame): Change type of 'display_preempted',
4485 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
4486 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
4487 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
4488 bitfields from unsigned char to unsigned.
4489
8b96a52c
DA
44902012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4491
4492 Remove unused member of struct x_output and struct w32_output.
4493 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
4494 * w32term.h (struct w32_output): Likewise.
4495
b4444c8a
JD
44962012-08-30 Jan Djärv <jan.h.d@swipnet.se>
4497
4498 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
4499 does not become zero (Bug#12234).
4500
b98521db
PE
45012012-08-30 Paul Eggert <eggert@cs.ucla.edu>
4502
4503 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
4504 for GCC 4.7.1 x86-64.
4505
31d02438
GM
45062012-08-30 Glenn Morris <rgm@gnu.org>
4507
4508 * lread.c (init_lread): For out-of-tree builds, only add the
4509 source directory's site-lisp dir to the load-path if it exists,
4510 consistent with in-tree builds. (Bug#12302)
4511
7f8941d8
JD
45122012-08-28 Jan Djärv <jan.h.d@swipnet.se>
4513
4514 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 4515 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
4516 (windowShouldClose:): Set window_closed.
4517 (dealloc): New member, free button_values.
fc0c31f8
JB
4518 (process_dialog:): Make member function. Remove window argument,
4519 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
4520 in button_values.
4521 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 4522 with tag. Remove return self, declare return value as void.
7f8941d8
JD
4523 (addString:row:): Remove return self, declare return value as void.
4524 (addSplit): Remove return self, declare return value as void.
4525 (clicked:): Remove return self, declare return value as void.
fc0c31f8 4526 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
4527 (initFromContents:isQuestion:): Adjust call to process_dialog.
4528 Code formatting change.
4529 (timeout_handler:): Set timer_fired to YES.
4530 (runDialogAt:): Set timer_fired to NO.
4531 Handle click on close button as quit.
4532
4533 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
4534 Add window_closed and button_values. Add void as return value for
4535 add(Button|String|Split). addButton takes int instead of Lisp_Object.
4536 Add process_dialog as new member.
4537
eada0861 45382012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 4539
eada0861
GM
4540 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
4541 is not one of the heaps we manage. (Bug#12242)
4542
45432012-08-28 Glenn Morris <rgm@gnu.org>
4544
4545 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
4546
457294dd
MR
45472012-08-28 Martin Rudalics <rudalics@gmx.at>
4548
4549 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
4550 auto-buffer-name window parameter. Install revision of reverted
4551 fix.
457294dd 4552
4f2daf31
DA
45532012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4554
4555 Do not allow to set major mode for a dead buffer.
4556 * buffer.c (Fset_buffer_major_mode): Signal an error
4557 if the buffer is dead.
4558 (Fother_buffer, other_buffer_safely): Remove redundant
4559 nested declaration.
4560
66322887
DA
45612012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4562
4563 Always use set_buffer_if_live to restore original buffer at unwind.
4564 * buffer.h (record_unwind_current_buffer): New function.
4565 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
4566 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
4567 * undo.c, window.c: Adjust users.
4568 * buffer.c (set_buffer_if_live): Fix comment.
4569
a3d794a1
DA
45702012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4571
4572 Fix usage of set_buffer_internal.
4573 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
4574 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
4575 * coding.c (decode_coding): Omit redundant test.
4576 * fileio.c (decide_coding_unwind): Likewise.
4577 * fns.c (secure_hash): Likewise.
4578 * insdel.c (modify_region): Likewise.
4579 * keyboard.c (command_loop_1): Likewise.
4580 * print.c (PRINTFINISH): Likewise.
4581 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
4582
59ea14cd
PE
45832012-08-27 Paul Eggert <eggert@cs.ucla.edu>
4584
4585 * dispnew.c: Use bool for boolean.
4586 (frame_garbaged, display_completed, delayed_size_change)
4587 (fonts_changed_p, add_window_display_history)
4588 (add_frame_display_history, verify_row_hash)
4589 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
4590 (row_equal_p, realloc_glyph_pool)
4591 (allocate_matrices_for_frame_redisplay)
4592 (showing_window_margins_p)
4593 (adjust_frame_glyphs_for_frame_redisplay)
4594 (build_frame_matrix_from_leaf_window, make_current)
4595 (mirrored_line_dance, mirror_line_dance, update_frame)
4596 (update_window_tree, update_single_window)
4597 (check_current_matrix_flags, update_window, update_text_area)
4598 (update_window_line, set_window_update_flags, scrolling_window)
4599 (update_frame_1, scrolling, buffer_posn_from_coords)
4600 (do_pending_window_change, change_frame_size)
4601 (change_frame_size_1, sit_for):
4602 Use bool for boolean.
4603 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
4604 and remove last int (actually boolean) argument, which was always 0.
4605 All callers changed.
4606 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
4607 * dispextern.h (struct composition_it): Use bool for boolean.
4608 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
4609 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
4610 * dired.c (file_name_completion):
4611 Use bool for boolean. (This was missed in an earlier change.)
4612
95072a94
MR
46132012-08-27 Martin Rudalics <rudalics@gmx.at>
4614
4615 * window.c (Fset_window_configuration): Revert first part of
4616 last change.
4617
0f19feff
JD
46182012-08-27 Jan Djärv <jan.h.d@swipnet.se>
4619
4620 * nsterm.h (NSPanel): New class variable dialog_return.
4621
3a880af4
SM
4622 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
4623 Initialize dialog_return.
0f19feff
JD
4624 (windowShouldClose:): Use stop instead of stopModalWithCode.
4625 (clicked:): Ditto, and also set dialog_return (Bug#12258).
4626 (timeout_handler:): Use stop instead of abortModal. Send a dummy
4627 event.
4628 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
4629 modal loop returns.
4630
f10fe38f
PE
46312012-08-27 Paul Eggert <eggert@cs.ucla.edu>
4632
de1339b0
PE
4633 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
4634 * composite.c (find_composition, composition_gstring_p)
4635 (composition_reseat_it, find_automatic_composition):
4636 * data.c (let_shadows_buffer_binding_p)
4637 (let_shadows_global_binding_p, set_internal, make_blv)
4638 (Fmake_variable_buffer_local, Fmake_local_variable)
4639 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
4640 (cons_to_signed, arith_driver):
4641 * dbusbind.c (xd_in_read_queued_messages):
4642 * dired.c (directory_files_internal, file_name_completion):
4643 Use bool for booleans.
4644 * dired.c (file_name_completion):
4645 * process.h (fd_callback):
4646 Omit int (actually boolean) argument. It wasn't being used.
4647 All uses changed.
4648 * composite.h, lisp.h: Reflect above API changes.
4649
f10fe38f
PE
4650 * cmds.c, coding.c: Use bool for booleans.
4651 * cmds.c (move_point, Fself_insert_command):
4652 * coding.h (struct composition status, struct coding_system):
4653 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
4654 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
4655 (emacs_mule_char, decode_coding_emacs_mule)
4656 (encode_coding_emacs_mule, detect_coding_iso_2022)
4657 (decode_coding_iso_2022, encode_invocation_designation)
4658 (encode_designation_at_bol, encode_coding_iso_2022)
4659 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
4660 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
4661 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
4662 (encode_coding_raw_text, detect_coding_charset)
4663 (decode_coding_charset, encode_coding_charset, detect_eol)
4664 (detect_coding, get_translation_table, produce_chars)
4665 (consume_chars, reused_workbuf_in_use)
4666 (make_conversion_work_buffer, code_conversion_save)
4667 (decode_coding_object, encode_coding_object)
4668 (detect_coding_system, char_encodable_p)
4669 (Funencodable_char_position, code_convert_region)
4670 (code_convert_string, code_convert_string_norecord)
4671 (Fset_coding_system_priority):
4672 * fileio.c (Finsert_file_contents):
4673 Use bool for booleans.
4674 * coding.h, lisp.h: Reflect above API changes.
4675 * coding.c: Remove unnecessary static function decls.
4676 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
4677 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
4678 not a boolean 'int', since callers never look at the return value.
4679 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
4680 * coding.h (decoding_buffer_size, encoding_buffer_size)
4681 (emacs_mule_string_char): Remove unused extern decls.
4682 (struct iso_2022_spec, struct coding_system):
4683 Use 'unsigned int : 1' for boolean fields, since there's more than one.
4684 (struct emacs_mule_spec): Remove unused field 'full_support'.
4685 All initializations removed.
4686 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
4687
5474c384
DA
46882012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
4689
f10fe38f 4690 Fix spare memory change (Bug#12286).
5474c384
DA
4691 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
4692 (valid_lisp_object_p): Likewise.
4693
c4b6914d
MR
46942012-08-27 Martin Rudalics <rudalics@gmx.at>
4695
4696 * window.c (Fset_window_configuration): Record any window's old
4697 buffer if it's replaced (see Bug#8789). If the new current
4698 buffer doesn't appear in the selected window, go to its old
4699 point (Bug#12208).
4700
35aaa1ea
DA
47012012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
4702
4703 Special MEM_TYPE_SPARE to denote reserved memory.
4704 * alloc.c (enum mem_type): New memory type.
4705 (refill_memory_reserve): Use new type for spare memory.
4706 This prevents live_cons_p and live_string_p from incorrect
4707 detection of uninitialized objects from spare memory as live.
4708
6af64513
PE
47092012-08-26 Paul Eggert <eggert@cs.ucla.edu>
4710
8b2e00a3
PE
4711 Spelling fixes.
4712 * Makefile.in (.PHONY): versioclean -> versionclean.
4713
b52d6985
PE
4714 Remove unused external symbols.
4715 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
4716 * window.c (Qwindow_valid_p, decode_valid_window):
4717 Now static, not extern.
4718 * data.c (Qinterval): Remove; unused.
4719 (syms_of_data): Do not define 'interval'.
4720 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
4721 * window.h (decode_valid_window):
4722 Remove decls.
4723
d5172d4f
PE
4724 * character.c, charset.c, chartab.c: Use bool for booleans.
4725 * character.c (lisp_string_width, string_count_byte8)
4726 (string_escape_byte8):
4727 * charset.c (charset_map_loaded, load_charset_map, read_hex):
4728 (load_charset_map_from_file, map_charset_chars)
4729 (Fdefine_charset_internal, define_charset_internal)
4730 (Fdeclare_equiv_charset, find_charsets_in_text)
4731 (Ffind_charset_region, char_charset, Fiso_charset):
4732 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
4733 (sub_char_table_set, sub_char_table_set_range)
4734 (char_table_set_range, optimize_sub_char_table)
4735 (map_sub_char_table):
4736 Use bool for boolean.
4737 * character.c (str_to_unibyte): Omit last boolean argument; it was
4738 always 0. All callers changed.
4739 * character.h, charset.h: Adjust to match previous changes.
4740 * character.h (char_printable_p): Remove decl of nonexistent function.
4741 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
4742 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
4743 are all boolean, so make them single-bit bitfields.
4744
6af64513
PE
4745 * lisp.h (ASET): Remove attempt to detect side effects.
4746 It was meant to be temporary and it often doesn't work,
4747 because when IDX has side effects the behavior of IDX==IDX
4748 is undefined. See Stefan Monnier in
4749 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
4750
e1f29348
BR
47512012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4752
4753 * lisp.h (functionp): New function (extracted from Ffunctionp).
4754 (FUNCTIONP): Use it.
4755 * eval.c (Ffunctionp): Use it.
4756
17c05d74
PE
47572012-08-25 Paul Eggert <eggert@cs.ucla.edu>
4758
0f46bc75
PE
4759 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
4760 as that's faster and simpler than static storage. Don't bother
4761 with the g_main_context_query overhead if g_main_context_pending
4762 says no events are pending.
4763 (gfds, gfds_size): Remove these static vars.
4764 (xgselect_initialize): Remove; no longer needed.
4765 All uses and decls removed.
4766
ee4c0f69
PE
4767 * emacs.c (fatal_error_signal_hook): Remove.
4768 All uses removed. This leftover from old code was always 0.
4769
17c05d74
PE
4770 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
4771 * casefiddle.c (casify_object, casify_region):
4772 * casetab.c (set_case_table):
4773 * category.c, category.h (word_boundary_p):
4774 * category.h (CHAR_HAS_CATEGORY):
4775 Use bool for booleans, instead of int.
4776
391ceac5
EZ
47772012-08-25 Eli Zaretskii <eliz@gnu.org>
4778
4779 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
4780
2f221583
PE
47812012-08-25 Paul Eggert <eggert@cs.ucla.edu>
4782
f4a681b0
PE
4783 On assertion failure, print backtrace if available.
4784 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
4785 (die) [ENABLE_CHECKING]: Print a backtrace if available.
4786 * Makefile.in (LIB_EXECINFO): New macro.
4787 (LIBES): Use it.
4788
2f221583
PE
4789 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
4790 * bytecode.c (exec_byte_code):
4791 * callint.c (check_mark, Fcall_interactively):
4792 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
4793 (getenv_internal, sync_process_alive, call_process_exited):
4794 * lisp.h (USE_SAFE_ALLOCA):
4795 Use bool for booleans, instead of int.
4796 * lisp.h, process.h: Adjust prototypes to match above changes.
4797 * callint.c (Fcall_interactively): Don't assume the mark's
4798 offset fits in 'int'.
4799
37ef52bb
PE
48002012-08-24 Paul Eggert <eggert@cs.ucla.edu>
4801
4802 * buffer.c, buffer.h: Use bool for boolean.
4803 * buffer.c (reset_buffer_local_variables)
4804 (buffer_lisp_local_variables, Fset_buffer_modified_p)
4805 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
4806 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
4807 (overlay_touches_p, overlay_strings, Foverlay_put)
4808 (report_overlay_modification, call_overlay_mod_hooks):
4809 (mmap_enlarge, mmap_set_vars):
4810 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
4811 Use bool for booleans, instead of int.
4812 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
4813 since the 1-or-0 return value is always ignored anyway.
4814 (mmap_initialized_p):
4815 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
4816 * buffer.h, lisp.h: Adjust prototypes to match above changes.
4817
2cc21167
PE
48182012-08-23 Paul Eggert <eggert@cs.ucla.edu>
4819
4820 * bidi.c: Use bool for boolean.
4821 This is a bit more readable, and makes the text segment of bidi.o
4822 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
4823 Presumably it's faster too.
4824 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
4825 Now bool.
4826 (bidi_cache_find_level_change, bidi_cache_iterator_state)
4827 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
4828 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
4829 (bidi_explicit_dir_char, bidi_level_of_next_char)
4830 (bidi_find_other_level_edge, bidi_move_to_visually_next):
4831 Use bool for booleans, instead of int.
4832 * dispextern.h (bidi_init_it, bidi_paragraph_init)
4833 (bidi_unshelve_cache): Adjust decls to match code.
4834
7db4ddf4
MR
48352012-08-23 Martin Rudalics <rudalics@gmx.at>
4836
4837 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
4838 argument.
4839
b1bb8011
PE
48402012-08-23 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
4843 * atimer.h: Include <stdbool.h>.
4844
ff687885
DN
48452012-08-22 Dan Nicolaescu <dann@gnu.org>
4846
4847 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
4848 compile time tests instead of run time tests on systems that do
4849 not use them.
4850 (FRAME_MAC_P): Remove leftover from deleted code.
4851 * frame.c (syms_of_frame): Remove leftover from deleted code.
4852
4ce7a138
JD
48532012-08-22 Jan Djärv <jan.h.d@swipnet.se>
4854
4855 * nsterm.m (insertText:): Don't clear modifiers if code is space.
4856
d733ec6d
PE
48572012-08-22 Paul Eggert <eggert@cs.ucla.edu>
4858
4859 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
4860 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 4861 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
4862 (fontset_add): Return void, for FONTSET_ADD.
4863
d0d2d26f
PE
48642012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4865
fce31d69
PE
4866 * alloc.c: Use bool for booleans.
4867 (gc_in_progress, abort_on_gc)
4868 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
4869 (dont_register_blocks) [GC_MALLOC_CHECK]:
4870 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
4871 (check_string_bytes, make_specified_string, memory_full)
4872 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
4873 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
4874 (mark_stack, valid_pointer_p, make_pure_string)
4875 (Fgarbage_collect, survives_gc_p, gc_sweep):
4876 Use bool for booleans, instead of int.
4877 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
4878 Remove unused local.
4879 * alloc.c (PURE_POINTER_P):
4880 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
4881 * editfns.c (Fformat):
4882 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
4883 (Fdo_auto_save):
4884 * fns.c (sweep_weak_table):
4885 * lisp.h (suppress_checking, push_message, survives_gc_p)
4886 (make_pure_string, gc_in_progress, abort_on_gc):
4887 * lread.c (readchar, read1):
4888 * print.c (Fprin1_to_string):
4889 * xdisp.c (push_message):
4890 Use bool for booleans affected directly or indirectly by
4891 alloc.c's changes.
4892
d0d2d26f
PE
4893 Make recently-introduced setters macros.
4894 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
4895 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
4896 (set_fontset_default, set_fontset_fallback): Rename from their
4897 upper-case counterparts, and make them functions rather than macros.
4898 This is more consistent with the other recently-introduced setters.
4899 These don't need to be inline, since they're local.
4900
d18e2bb6
JD
49012012-08-21 Jan Djärv <jan.h.d@swipnet.se>
4902
4903 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
4904 the loop (Bug#12247).
4905
1b9d9d16
PE
49062012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4907
4908 * lisp.h (vcopy): Use memcpy rather than our own loop.
4909 This fixes a performance regression introduced by the recent
4910 addition of vcopy. This means 'vcopy' will need to be modified
4911 for a copying collector, but that's OK. Also, tighten the
4912 checking in the assertion.
4913
b2f09701
EZ
49142012-08-21 Eli Zaretskii <eliz@gnu.org>
4915
4916 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
4917 components for RTL text (Bug#11860). Adjust X-OFFSET of each
4918 non-base glyph for the width of the base character, according to
e1f29348
BR
4919 what x_draw_composite_glyph_string_foreground expects.
4920 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
4921 expectations, to produce correct width of the composed character.
4922 Reverse the sign of the DU offset produced by ScriptPlace.
4923
9b994fed
PE
49242012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4925
4926 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
4927
086ca913
DA
49282012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
4929
4930 Avoid direct writes to contents member of struct Lisp_Vector.
4931 * lisp.h (vcopy): New function to copy data into vector.
4932 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
4933 * fns.c (Ffillarray): Use ASET.
4934 * keyboard.c (timer_check_2): Use AREF and ASET.
4935 (append_tool_bar_item, Frecent_keys): Use vcopy.
4936 * lread.c (read_vector): Use ASET.
4937 * msdos.c (Frecent_doskeys): Use vcopy.
4938 * xface.c (Finternal_copy_lisp_face): Use vcopy.
4939 (Finternal_merge_in_global_face): Use ASET and vcopy.
4940 * xfont.c (xfont_list_pattern): Likewise.
4941
5481664a
MR
49422012-08-21 Martin Rudalics <rudalics@gmx.at>
4943
4944 * window.c (Fwindow_point): For the selected window always return
4945 the position of its buffer's point.
4946 (Fset_window_point): For the selected window always go in its
4947 buffer to the specified position.
4948
6d470bdd
DA
49492012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
4950
4951 Setter macros for fontsets.
4952 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
4953 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
4954 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
4955 Adjust users.
4956
24564fe1
GM
49572012-08-20 Glenn Morris <rgm@gnu.org>
4958
4959 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
4960 Don't assume that `ln -f' works.
4961
0a05a035
EZ
49622012-08-20 Eli Zaretskii <eliz@gnu.org>
4963
4964 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
4965 and later about non-assignments with no effect. See discussion at
4966 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
4967 details.
4968
e46f2325
DA
49692012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4970
4971 Inline setter functions for Lisp_Objects slots of struct specbinding.
4972 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
4973 Adjust users.
4974
734fbd86
MR
49752012-08-20 Martin Rudalics <rudalics@gmx.at>
4976
4977 * window.c (select_window): Always make selected window's buffer
4978 current.
4979
f1a95992
DA
49802012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4981
4982 Use AREF and ASET for docstrings of category tables.
4983 * category.h (CATEGORY_DOCSTRING): Use AREF.
4984 (SET_CATEGORY_DOCSTRING): Use ASET.
4985 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
4986
e83064be
DA
49872012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4988
4989 Inline setter functions for hash table members.
4990 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
4991 (set_hash_hash, set_hash_index): Rename with _slot suffix.
4992 (set_hash_key_and_value, set_hash_index, set_hash_next)
4993 (set_hash_hash): New functions.
4994 * charset.c, fns.c: Adjust users.
4995
4ce60d2e
DA
49962012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4997
4998 Inline getter and setter functions for per-buffer values.
4999 * buffer.h (per_buffer_default, set_per_buffer_default)
5000 (per_buffer_value, set_per_buffer_value): New functions.
5001 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
5002 * buffer.c, data.c: Adjust users.
5003
c06c9690
JB
50042012-08-20 Juanma Barranquero <lekktu@gmail.com>
5005
5006 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
5007
32bd4250
PE
50082012-08-19 Paul Eggert <eggert@cs.ucla.edu>
5009
bad03192 5010 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
5011 as gnulib does this if the system doesn't.
5012 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
5013 Remove declaration. MS-Windows declares it on stdlib.h which is
5014 included by conf_post.h.
b69a6d22
PE
5015 * emacs.c (environ) [DOUG_LEA_MALLOC]:
5016 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
5017 * vm-limit.c: Include <unistd.h>, for 'environ'.
5018
22d7feb2
PE
5019 * unexaix.c, unexcoff.c: Include "mem-limits.h".
5020 (start_of_data): Remove decl; mem-limits.h provides it.
5021
32bd4250
PE
5022 * xdisp.c (handle_invisible_prop): Make it a bit faster
5023 and avoid a gcc -Wmaybe-uninitialized diagnostic.
5024
450809af
CY
50252012-08-19 Chong Yidong <cyd@gnu.org>
5026
5027 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
5028 ends (Bug#3874).
5029
9e677988
AS
50302012-08-19 Andreas Schwab <schwab@linux-m68k.org>
5031
6b1319ce
AS
5032 * .gdbinit: Use call instead of set when calling a function in the
5033 inferior.
5034
9e677988
AS
5035 * data.c (set_internal): Don't use set_blv_found.
5036 (Fkill_local_variable): Likewise.
5037
d7191076
AA
50382012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
5039
5040 * nsfont.m (ns_ascii_average_width): Ensure the string
5041 ascii_printable is initialized with a null-terminated character
5042 array. Otherwise, it can contain undesired extra characters.
5043
e757f1c6
PE
50442012-08-18 Paul Eggert <eggert@cs.ucla.edu>
5045
5046 port new setting code to Sun C 5.8 2005/10/13
5047 * chartab.c, lisp.h (char_table_set, char_table_set_range):
5048 Return void, not Lisp_Object. Otherwise, the compiler
5049 complains about (A?B:C) where B is void and C is Lisp_Object
5050 when compiling CHAR_TABLE_SET, due to the recent change to
5051 the API of sub_char_table_set_contents.
5052
a999ce26
CY
50532012-08-18 Chong Yidong <cyd@gnu.org>
5054
5055 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
5056 for the string case (Bug#3874).
5057
3f22b86f
PE
50582012-08-18 Paul Eggert <eggert@cs.ucla.edu>
5059
39eb03f1
PE
5060 * buffer.h (BSET): Remove (Bug#12215).
5061 Replace all uses with calls to new setter functions.
5062 (bset_bidi_paragraph_direction, bset_case_canon_table)
5063 (bset_case_eqv_table, bset_directory, bset_display_count)
5064 (bset_display_time, bset_downcase_table)
5065 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
5066 (bset_last_selected_window, bset_local_var_alist)
5067 (bset_mark_active, bset_point_before_scroll, bset_read_only)
5068 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
5069 (bset_width_table):
5070 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
5071 (bset_auto_fill_function, bset_auto_save_file_format)
5072 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
5073 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
5074 (bset_cache_long_line_scans, bset_case_fold_search)
5075 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
5076 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
5077 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
5078 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
5079 (bset_header_line_format, bset_indicate_buffer_boundaries)
5080 (bset_indicate_empty_lines, bset_invisibility_spec)
5081 (bset_left_fringe_width, bset_major_mode, bset_mark)
5082 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
5083 (bset_name, bset_overwrite_mode, bset_pt_marker)
5084 (bset_right_fringe_width, bset_save_length)
5085 (bset_scroll_bar_width, bset_scroll_down_aggressively)
5086 (bset_scroll_up_aggressively, bset_selective_display)
5087 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
5088 (bset_word_wrap, bset_zv_marker):
5089 * category.c (bset_category_table):
5090 * syntax.c (bset_syntax_table):
5091 New setter functions.
5092
6a09a33b
PE
5093 * process.h (PSET): Remove (Bug#12215).
5094 Replace all uses with calls to new setter functions.
5095 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5096 (PROCESS_INLINE): New macro.
5097 (pset_childp): New setter function.
5098 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
5099 * process.c (PROCESS_INLINE):
5100 Define to EXTERN_INLINE, so that the corresponding functions
5101 are compiled into code.
5102 (pset_buffer, pset_command, pset_decode_coding_system)
5103 (pset_decoding_buf, pset_encode_coding_system)
5104 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
5105 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
5106 (pset_type, pset_write_queue): New setter functions.
5107
e8c17b81
PE
5108 * window.h (WSET): Remove (Bug#12215).
5109 Replace all uses with calls to new setter functions.
5110 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5111 (WINDOW_INLINE): New macro.
5112 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
5113 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
5114 (wset_total_lines, wset_vertical_scroll_bar)
5115 (wset_window_end_pos, wset_window_end_valid)
5116 (wset_window_end_vpos): New setter functions.
5117 * window.c (WINDOW_INLINE):
5118 Define to EXTERN_INLINE, so that the corresponding functions
5119 are compiled into code.
5120 (wset_combination_limit, wset_dedicated, wset_display_table)
5121 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
5122 (wset_new_normal, wset_new_total, wset_next_buffers)
5123 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
5124 (wset_prev_buffers, wset_right_fringe_width)
5125 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
5126 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
5127 (wset_window_parameters):
5128 * xdisp.c (wset_base_line_number, wset_base_line_pos)
5129 (wset_column_number_displayed, wset_region_showing):
5130 New setter functions.
5131
3f22b86f
PE
5132 * termhooks.h (TSET): Remove (Bug#12215).
5133 Replace all uses with calls to new setter functions.
5134 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5135 (TERMHOOKS_INLINE): New macro.
5136 (tset_charset_list, tset_selection_alist): New setter functions.
5137 * terminal.c (TERMHOOKS_INLINE):
5138 Define to EXTERN_INLINE, so that the corresponding functions
5139 are compiled into code.
5140 (tset_param_alist): New setter function.
5141
742af32f
PE
51422012-08-17 Paul Eggert <eggert@cs.ucla.edu>
5143
15dbb4d6
PE
5144 * keyboard.h (KSET): Remove (Bug#12215).
5145 Replace all uses with calls to new setter functions.
5146 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5147 (KEYBOARD_INLINE): New macro.
5148 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
5149 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
5150 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
5151 New setter functions.
5152 * keyboard.c (KEYBOARD_INLINE):
5153 Define to EXTERN_INLINE, so that the corresponding functions
5154 are compiled into code.
5155 (kset_echo_string, kset_kbd_queue)
5156 (kset_keyboard_translate_table, kset_last_prefix_arg)
5157 (kset_last_repeatable_command, kset_local_function_key_map)
5158 (kset_overriding_terminal_local_map, kset_real_last_command)
5159 (kset_system_key_syms): New setter functions.
5160
f00af5b1
PE
5161 * frame.h (FSET): Remove (Bug#12215).
5162 Replace all uses with calls to new setter functions.
5163 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5164 (FRAME_INLINE): New macro.
5165 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
5166 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
5167 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
5168 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
5169 (fset_param_alist, fset_root_window, fset_scroll_bars)
5170 (fset_selected_window, fset_title, fset_tool_bar_items)
5171 (fset_tool_bar_position, fset_tool_bar_window): New functions.
5172 * frame.c (FRAME_INLINE):
5173 Define to EXTERN_INLINE, so that the corresponding functions
5174 are compiled into code.
5175 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
5176
0c94c8d6
PE
5177 A few more naming-convention fixes for getters and setters.
5178 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
5179 and rename from buffer_overlays_set_before.
5180 (set_buffer_overlays_after): Move here from buffer.h, and rename
5181 from buffer_overlays_set_after.
5182 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
5183 All uses changed.
5184 (set_buffer_intervals): Rename from buffer_set_intervals.
5185 * intervals.c (set_interval_object): Move here from intervals.h,
5186 and rename from interval_set_object.
5187 (set_interval_left): Move here from intervals.h, and rename from
5188 interval_set_left.
5189 (set_interval_right): Move here from intervals.h, and rename from
5190 interval_set_right.
5191 (copy_interval_parent): Move here from intervals.h, and rename from
5192 interval_copy_parent.
5193 * intervals.h (set_interval_parent): Rename from interval_set_parent.
5194 (set_interval_plist): Rename from interval_set_plist.
5195 Return void, not Lisp_Object, since no caller uses the result.
5196 * lisp.h (string_intervals): Rename from string_get_intervals.
5197 (set_string_intervals): Rename from string_set_intervals.
5198
34dabdb7
PE
5199 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
5200 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 5201 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
5202 All uses changed. See the end of
5203 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
5204
742af32f
PE
5205 * lisp.h (CSET): Remove (Bug#12215).
5206 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
5207 (set_char_table_purpose): New functions,
5208 replacing CSET. All uses changed. For example, replace
5209 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 5210 "set_char_table_parent (char_table, parent);".
742af32f
PE
5211 The old version was confusing because it used the same name
5212 'parent' for two different things.
5213
a04e2c62
DA
52142012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5215
5216 Functions to get and set Lisp_Object fields of buffer-local variables.
5217 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
5218 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
5219 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
5220 * data.c, eval.c, frame.c: Adjust users.
5221
383dcbf9
CY
52222012-08-17 Chong Yidong <cyd@gnu.org>
5223
5224 * xfaces.c (merge_face_vectors): If the target font specfies a
5225 font spec, make the font's attributes take precedence over
5226 directly-specified attributes.
5227 (merge_face_ref): Recognize :font.
5228
44386687
DA
52292012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5230
5231 Do not use memcpy for copying intervals.
5232 * intervals.c (reproduce_interval): New function.
5233 (reproduce_tree, reproduce_tree_obj): Use it.
5234 (reproduce_tree_obj): Remove prototype.
5235
927c7216
PE
52362012-08-17 Paul Eggert <eggert@cs.ucla.edu>
5237
5238 * lisp.h (duration_to_sec_usec): Remove unused decl.
5239
93044f7b
AA
52402012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
5241
5242 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
5243 to an allocated instance of NSString, not to the class itself.
5244
9851e4a5
JB
52452012-08-17 Juanma Barranquero <lekktu@gmail.com>
5246
5247 * makefile.w32-in (C_CTYPE_H): New macro.
5248 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
5249 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
5250 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
5251
620f13b0
PE
52522012-08-16 Paul Eggert <eggert@cs.ucla.edu>
5253
5254 Use ASCII tests for character types.
5255 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
5256 * xfns.c, xterm.c:
5257 Don't include <ctype.h>; was not needed.
5258 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
5259 * sysdep.c, xfaces.c:
5260 Include <c-ctype.h> instead of <ctype.h>.
5261 * nsterm.m: Include <c-ctype.h>.
5262 * charset.c (read_hex):
5263 * doc.c (Fsnarf_documentation):
5264 * fileio.c (IS_DRIVE) [WINDOWSNT]:
5265 (DRIVE_LETTER) [DOS_NT]:
5266 (Ffile_name_directory, Fexpand_file_name)
5267 (Fsubstitute_in_file_name):
5268 * font.c (font_parse_xlfd, font_parse_fcname):
5269 * frame.c (x_set_font_backend):
5270 * gtkutil.c (xg_get_font):
5271 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
5272 * nsimage.m (hexchar):
5273 * nsterm.m (ns_xlfd_to_fontname):
5274 * sysdep.c (system_process_attributes):
5275 * xfaces.c (hash_string_case_insensitive):
5276 Use C-locale tests instead of locale-specific tests for character
5277 types, since we want the ASCII interpretation here, not the
5278 interpretation suitable for whatever happens to be the current locale.
5279
52162052
MR
52802012-08-16 Martin Rudalics <rudalics@gmx.at>
5281
5282 Consistently check windows for validity/liveness
5283 (Bug#11984, Bug#12025, Bug#12026).
5284 * lisp.h (CHECK_VALID_WINDOW): New macro.
5285 * window.c (decode_window): Rename to decode_live_window.
5286 (decode_valid_window, Fwindow_valid_p): New functions.
5287 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
5288 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
5289 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
5290 (Fwindow_prev_sibling, Fwindow_combination_limit)
5291 (Fset_window_combination_limit, Fwindow_use_time)
5292 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
5293 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
5294 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
5295 (Fwindow_hscroll, Fset_window_hscroll)
5296 (Fwindow_redisplay_end_trigger)
5297 (Fset_window_redisplay_end_trigger, Fwindow_edges)
5298 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
5299 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
5300 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
5301 (Fwindow_end, Fset_window_point, Fset_window_start)
5302 (Fpos_visible_in_window_p, Fwindow_line_height)
5303 (Fwindow_dedicated_p, Fset_window_dedicated_p)
5304 (Fwindow_prev_buffers, Fset_window_prev_buffers)
5305 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
5306 (Fset_window_parameter, Fwindow_display_table)
5307 (Fset_window_display_table, Fdelete_other_windows_internal)
5308 (Fset_window_buffer, Fset_window_new_total)
5309 (Fset_window_new_normal, Fdelete_window_internal)
5310 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
5311 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
5312 (Fwindow_scroll_bars): Check whether argument window is a valid or
5313 live window. Update doc-strings.
5314 (syms_of_window): New symbol Qwindow_valid_p.
5315 * keyboard.c (Fposn_at_x_y): Check whether argument
5316 frame_or_window denotes a valid window.
5317
2751c80f
DA
53182012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5319
5320 Fix previous char table change.
5321 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
5322 * chartab.c (optimize_sub_char_table): Likewise.
5323
032a42c8
CY
53242012-08-16 Chong Yidong <cyd@gnu.org>
5325
a2d19368
CY
5326 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
5327
032a42c8
CY
5328 * xfont.c (xfont_open):
5329 * xftfont.c (xftfont_open): Set the font's max_width field.
5330
5331 * nsfont.m (nsfont_open): Similar to the Xft backend, set
5332 min_width to space_width and average_width to the average over
5333 printable ASCII characters.
5334 (ns_char_width): Code cleanup.
5335 (ns_ascii_average_width): New utility function.
5336
5337 * font.h (struct font): Update comments.
5338
a098c930
DA
53392012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5340
032a42c8 5341 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
5342 * lisp.h (CSET): New macro.
5343 (char_table_set_extras, char_table_set_contents)
5344 (sub_char_table_set_contents): New function.
5345 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
5346 * syntax.c: Adjust users.
5347
8be3a09c
SM
53482012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
5349
5350 * eval.c (eval_sub): Bind lexical-binding.
5351 * lread.c (Qlexical_binding): Make non-static.
5352
ac4845a6
JD
53532012-08-15 Jan Djärv <jan.h.d@swipnet.se>
5354
ddee6515
JD
5355 * nsmenu.m (popupSession): Remove.
5356 (pop_down_menu): Remove endModalSession.
5357 (timeout_handler:): New method.
5358 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
5359 Call runModalForWindow. Check timer_fired when it returns.
5360 If not set, cancel timer and break out of loop.
5361 Otherwise loop again, with a new timeout.
5362
5363 * nsterm.m: Include fcntl.h if present.
5364 (fd_entry, t_readfds, inNsSelect): Remove.
5365 (select_writefds, select_valid, select_timeout, selfds)
5366 (select_mutex, apploopnr): Add.
5367 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
5368 Otherwise call kbd_buffer_store_event.
5369 (ns_send_appdefined): Remove release of fd_entry.
5370 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
5371 Increment and decrement apploopnr.
5372 (ns_select): If no file descriptors, just do a NSTimer.
5373 Otherwise copy read/write masks and start select thread (fd_handler).
5374 Start main loop and wait for application defined event.
5375 Inform select thread to stop selecting after main loop is exited.
5376 (ns_term_init): Create selfds pipe and set non-blocking.
fc0c31f8 5377 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
5378 (fd_handler:): Loop forever, wait for info from the main thread
5379 to either start or stop selecting. When select returns, send
5380 and appdefined event.
5381 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
5382 If not call kbd_buffer_store_event.
5383
5384 * nsterm.h (EmacsApp): fd_handler takes id argument.
5385 (EmacsDialogPanel): Add timer_fired and timeout_handler.
5386
ac4845a6
JD
5387 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
5388
eb424fe3
EZ
53892012-08-15 Eli Zaretskii <eliz@gnu.org>
5390
5391 * region-cache.c (move_cache_gap): Update gap_len using the actual
5392 growth of the boundaries array. Do not change cache_len.
5393 (Bug#12196)
5394
4e6a86c6
DA
53952012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5396
5397 Generalize and cleanup font subsystem checks.
5398 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
5399 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
5400 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 5401
5bf192ca
DA
54022012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5403
5404 * gtkutil.c (xg_get_font): Use pango_units_to_double.
5405
f2045622
CY
54062012-08-15 Chong Yidong <cyd@gnu.org>
5407
8be3a09c
SM
5408 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
5409 When using the new font chooser, use gtk_font_chooser_get_font_desc to
5410 extract the font descriptor instead of just the font name.
5411 In that case, return a font spec instead of a string.
f2045622
CY
5412 (x_last_font_name): Move to this file from xfns.c.
5413
5414 * xfns.c (Fx_select_font): The return value can also be a font
5415 spec. Move x_last_font_name management to gtkutil.c.
5416
5417 * xfaces.c: Make font weight and style symbols non-static.
5418
7f6feb56
SM
54192012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
5420
5421 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
5422 (bug#12117).
5423
fecbd8ff
SM
54242012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
5425
5426 * alloc.c (Fgarbage_collect): Use plural form consistently.
5427
9b8d5165
EZ
54282012-08-14 Eli Zaretskii <eliz@gnu.org>
5429
5430 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
5431 iteration through the command loop. Fixes a problem whereby mouse
5432 movements are ignored until the first mouse click.
5433
f5d9e83a
PE
54342012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5435
5436 Use bool, not int, for Lisp booleans.
5437 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
5438 makes Emacs a bit smaller and presumably a bit faster.
5439 * lisp.h: Include <stdbool.h>.
5440 (struct Lisp_Boolfwd, defvar_bool):
5441 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
5442 * regex.c [!emacs]: Include <stdbool.h>.
5443 (false, true): Remove; <stdbool.h> does this for us now.
5444
55802e4a
CY
54452012-08-14 Chong Yidong <cyd@gnu.org>
5446
4abcdac8
CY
5447 * character.c (Fcharacterp): Doc fix (Bug#12076).
5448
5449 * data.c (Findirect_variable): Doc fix (Bug#11040).
5450
55802e4a
CY
5451 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
5452
5453 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 5454 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 5455
8e99d072
BR
54562012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
5457
5458 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
5459 (bug#12022).
5460
08908aca
MR
54612012-08-14 Martin Rudalics <rudalics@gmx.at>
5462
5463 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
5464 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5465 * minibuf.c (choose_minibuf_frame, read_minibuf):
5466 * w32fns.c (x_create_tip_frame):
5467 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
5468 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
5469
56120d6f
PE
54702012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5471
5472 * intervals.c (offset_intervals): Remove obsolete comment.
5473
67b77c0b
AS
54742012-08-14 Andreas Schwab <schwab@linux-m68k.org>
5475
5476 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
5477
f48b82fd
GR
54782012-08-14 Gergely Risko <gergely@risko.hu>
5479
5480 * coding.c (decode_coding): Record buffer modification before
5481 disabling undo_list (Bug#11773).
5482
fd318b54
DA
54832012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5484
5485 Revert and cleanup some recent overlay changes.
5486 * buffer.h (enum overlay_type): Remove.
5487 (buffer_get_overlays, buffer_set_overlays): Likewise.
5488 (buffer_set_overlays_before, buffer_set_overlays_after):
5489 New function. Adjust users.
5490 (unchain_both): Add eassert.
5491
41a62dd9
DA
54922012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5493
5494 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
5495
5884c324
PE
54962012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5497
5498 * gtkutil.c (xg_mark_data): Don't assume C99.
5499
ca06f160
JD
55002012-08-13 Jan Djärv <jan.h.d@swipnet.se>
5501
5502 * gtkutil.c (xg_frame_tb_info): New struct.
5503 (TB_INFO_KEY): New define.
5504 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
5505 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
5506 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
5507 if not present.
5508 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 5509 is up to date. Otherwise store new data.
ca06f160
JD
5510 (free_frame_tool_bar): Free xg_frame_tb_info if present.
5511
7864a3f7
DA
55122012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5513
5514 Use KSET for write access to Lisp_Object members of struct kboard.
5515 * keyboard.h (KSET): New macro.
5516 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
5517 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
5518 * xterm.c: Adjust users.
5519
4c31be61
DA
55202012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5521
5522 Use BSET for write access to Lisp_Object members of struct buffer.
5523 * buffer.h (BSET): New macro.
5524 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
5525 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
5526 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
5527 * window.c, xdisp.c, xfns.c: Adjust users.
5528
14ae4239
BT
55292012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
5530
5531 * lread.c (syms_of_lread): Initialize Vlexical_binding.
5532
32bcadb4
JD
55332012-08-11 Jan Djärv <jan.h.d@swipnet.se>
5534
3d29b2ce 5535 * nsterm.m (not_in_argv): New function.
fc0c31f8 5536 (application:openFile, application:openTempFile:):
3d29b2ce
JD
5537 (application:openFileWithoutUI:, application:openFiles:): Open file
5538 if not_in_argv returns non-zero (bug#12171).
5539
32bcadb4 5540 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
5541 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
5542 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
5543 (xg_get_font_name): Use those functions/macros here.
5544 Reported by Frans Oilinki <moilinki@gmail.com>.
5545
9ff9402d 55462012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
5547
5548 * unexmacosx.c (copy_data_segment): Copy initialized data in
5549 statically linked libraries from input file rather than memory.
5550
db74a5fc
YM
5551 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
5552 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
5553 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
5554
25e65510
GM
55552012-08-10 Glenn Morris <rgm@gnu.org>
5556
5557 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
5558 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
5559
7961135c
DA
55602012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5561
5562 Fix last change to allow compilation with low optimization levels.
5563 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
5564 Reported by Jan Djärv <jan.h.d@swipnet.se>.
5565
42b3a444
DA
55662012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5567
5568 Use common inline syntax in intervals.h.
5569 * intervals.h (INTERVALS_INLINE): New macro.
5570 Change all users from LISP_INLINE.
5571
9fb0c957
DA
55722012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5573
5574 Define Qnone once for all platforms.
5575 * frame.c (Qnone): Define here.
5576 (syms_of_frame): DEFSYM it.
5577 * lisp.h (Qnone): New declaration.
5578 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
5579 * xfns.c: Remove duplication. Adjust users.
5580
65e8ee52
DA
55812012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5582
5583 Remove unused macros from intervals.h.
5584 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
5585 * intervals.c: Adjust comment.
5586
9b855fd6
EZ
55872012-08-10 Eli Zaretskii <eliz@gnu.org>
5588
5589 * w32fns.c <w32_unicode_gui>: New static variable.
5590 (globals_of_w32fns): Initialize it according to os_subtype.
5591 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
5592 testing os_subtype.
5593
39cb9e56 55942012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
5595 Eli Zaretskii <eliz@gnu.org>
5596
5597 Fix bug #10299 with Unicode characters sent by customized
5598 keyboards created by MSKLC.
5599 * w32fns.c (INIT_WINDOW_CLASS): New macro.
5600 (w32_init_class): Use it to initialize the Emacs class with either
5601 ANSI or Unicode API calls.
5602 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
5603 later.
5604 (w32_wnd_proc): If the character code sent by WM_CHAR or
5605 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
5606 original message. Call DefWindowProcW on NT and later.
5607
9374581a
GM
56082012-08-10 Glenn Morris <rgm@gnu.org>
5609
4b94e8cf
GM
5610 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
5611
9374581a
GM
5612 * lisp.h (DIRECTORY_SEP): Let configure set it.
5613
a2752828
DA
56142012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
5615
5616 Use TSET for write access to Lisp_Object slots of struct terminal.
5617 * termhooks.h (TSET): New macro.
5618 * coding.c, terminal.c, xselect.c: Adjust users.
5619
cc92c454
SM
56202012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
5621
5622 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
5623 the failing expression, include them in the error message.
5624 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
5625 * lisp.h (internal_condition_case_n): Update declaration.
5626
4cb3e6b3
DA
56272012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5628
5629 Inline functions to examine and change buffer overlays.
5630 * buffer.c (unchain_both): New function.
5631 * buffer.h (buffer_get_overlays, buffer_set_overlays):
5632 (buffer_has_overlays): New function.
5633 (enum overlay_type): New enum.
5634 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
5635 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
5636
8707c1e5
DA
56372012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5638
5639 Inline functions to examine and change buffer intervals.
5640 * alloc.c (mark_interval_tree): Remove.
5641 (MARK_INTERVAL_TREE): Simplify.
5642 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
5643 * intervals.c (buffer_balance_intervals): New function.
5644 (graft_intervals_into_buffer): Adjust indentation.
5645 (set_intervals_multibyte): Simplify.
5646 * buffer.h (BUF_INTERVALS): Remove.
5647 (buffer_get_intervals, buffer_set_intervals): New function.
5648 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
5649 * intervals.c, textprop.c: Adjust users.
5650
ad8c997f
DA
56512012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5652
5653 Inline functions to examine and change string intervals.
5654 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
5655 (string_get_intervals, string_set_intervals): New function.
5656 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
5657 * lread.c, print.c, textprop.c: Adjust users.
5658
32ac3a6b
GM
56592012-08-08 Glenn Morris <rgm@gnu.org>
5660
5661 * lisp.mk (lisp): Remove language/persian.elc.
5662
77c7bcb1
DA
56632012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5664
5665 Cleanup intervals.
5666 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
5667 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
5668 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
5669 Adjust comment. Move under #if 0.
77c7bcb1
DA
5670 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
5671 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
5672
9c08a8d4
DA
56732012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5674
5675 Check total length of intervals with eassert.
5676 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
5677 * intervals.c: Change all users to eassert.
5678
26d16b35
EZ
56792012-08-07 Eli Zaretskii <eliz@gnu.org>
5680
14ae4239
BT
5681 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
5682 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
5683 INTERNAL_FIELD in Lisp_Cons.
5684
c644523b
DA
56852012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5686
5687 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
5688 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
5689 name since all xname users are fixed long time ago. Do not
5690 use INTERNAL_FIELD.
5691 (set_symbol_name, set_symbol_function, set_symbol_plist):
5692 (set_symbol_next, set_overlay_plist): New function.
5693 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
5694 (struct Lisp_Overlay): Likewise.
5695 (CVAR, MVAR, SVAR): Remove.
5696 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
5697 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
5698 * xterm.c: Adjust users.
5699 * .gdbinit: Change to use name field of struct Lisp_Symbol
5700 where appropriate.
5701
6a3d20cc
DA
57022012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5703
5704 Basic functions to set Lisp_Object and pointer slots of intervals.
5705 * intervals.h (interval_set_parent, interval_set_object):
5706 (interval_set_left, interval_set_right, interval_set_plist):
5707 (interval_copy_parent): New function.
5708 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
5709 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
5710 Adjust indentation.
6a3d20cc
DA
5711 (INTERVAL_SIZE): Remove. Adjust users.
5712 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
5713
4d2b044c
DA
57142012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5715
5716 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
5717 * process.h (PGET): Remove.
5718 (struct Lisp_Process): Do not use INTERNAL_FIELD.
5719 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
5720
d3d50620
DA
57212012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5722
5723 Drop WGET and revert read access to Lisp_Objects slots of struct window.
5724 * window.h (WGET): Remove.
5725 (struct window): Do not use INTERNAL_FIELD.
5726 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
5727 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
5728 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
5729 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
5730 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
5731 Adjust users.
5732
d10a51dc
CY
57332012-08-07 Chong Yidong <cyd@gnu.org>
5734
5735 * window.c (Fwindow_edges, Fwindow_pixel_edges)
5736 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
5737 (Fdelete_window_internal): Signal an error if the window is not on
5738 a live frame (Bug#12025).
5739
e69b0960
DA
57402012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5741
5742 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
5743 * frame.h (FGET): Remove.
5744 (struct frame): Do not use INTERNAL_FIELD.
5745 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
5746 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
5747 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
5748 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
5749
25a20a3a
JB
57502012-08-06 Juanma Barranquero <lekktu@gmail.com>
5751
5752 * w32.c: Silence compiler warnings.
5753 (map_w32_filename): Remove unused variable `is_fat'.
5754 (chase_symlinks): Add parentheses around expression.
5755
1c6f11f4
GM
57562012-08-06 Glenn Morris <rgm@gnu.org>
5757
1db4583a
GM
5758 * sysdep.c: Respect BROKEN_GETWD.
5759
1c6f11f4
GM
5760 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
5761 Let configure handle it.
5762 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
5763
2b90362b
DA
57642012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5765
5766 Use GCALIGNMENT where appropriate.
5767 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
5768 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
5769 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
5770
5f50daf2
EZ
57712012-08-06 Eli Zaretskii <eliz@gnu.org>
5772
14ae4239
BT
5773 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
5774 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 5775
cbcc7007
SM
57762012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
5777
5778 * buffer.h (struct buffer): Revert `indirections' to a simple int;
5779 that should be sufficient for everyone.
5780
4d365fa4
JD
57812012-08-06 Jan Djärv <jan.h.d@swipnet.se>
5782
5783 * keyboard.c (timer_check_2): Add break so timer_check returns next
5784 timeout.
5785
dd86bd82
DA
57862012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5787
5788 Fix Windows build errors introduced after converting to WGET and WSET.
5789 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
5790 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
5791
054e1668
JD
57922012-08-06 Jan Djärv <jan.h.d@swipnet.se>
5793
5794 * nsterm.m (ns_frame_rehighlight): Use FSET.
5795
5796 * nsmenu.m (ns_update_menubar): Use FSET.
5797
21238f11
DA
57982012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5799
5800 Separate read and write access to Lisp_Object slots of Lisp_Process.
5801 * process.h (PGET, PSET): New macros similar to AREF and ASET.
5802 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
5803
077288cf
DA
58042012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5805
5806 Separate read and write access to Lisp_Object slots of struct window.
5807 * window.h (WGET, WSET): New macros similar to AREF and ASET.
5808 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
5809 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
5810 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
5811 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
5812 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
5813 Adjust users.
5814
71688bd7
DA
58152012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5816
5817 Fix Windows build errors introduced after converting to FGET and FSET.
5818 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
5819 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
5820 (w32_judge_scroll_bars): Change to use FSET.
5821 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
5822
f99bac93
DA
58232012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5824
5825 Fix replacement typo.
5826 * window.c (replace_window): Set root_window instead of
5827 selected_window. This fixes a total window subsystem
5828 malfunction reported by Bastien Guerry <bzg@gnu.org>.
5829
8c2a0f2d
GM
58302012-08-06 Glenn Morris <rgm@gnu.org>
5831
5832 * lisp.mk (lisp): Add language/persian.elc.
5833
edd74c35
DA
58342012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5835
5836 Separate read and write access to Lisp_Object slots of struct frame.
5837 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
5838 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
5839 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
5840 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
5841 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
5842
8671676c
AS
58432012-08-05 Andreas Schwab <schwab@linux-m68k.org>
5844
5845 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
5846
663e2b3f
DA
58472012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
5848
5849 Generalize common compile-time constants.
5850 * lisp.h (header_size, bool_header_size, word_size): Now here.
5851 (struct Lisp_Vector): Add comment.
5852 (struct Lisp_Bool_Vector): Move up to define handy constants.
5853 (VECSIZE, PSEUDOVECSIZE): Simplify.
5854 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
5855 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
5856 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
5857 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
5858 * xfont.c, xmenu.c: Use word_size where appropriate.
5859
d32e47af
LM
58602012-08-05 Lawrence Mitchell <wence@gmx.li>
5861
5862 * search.c (Freplace_match): Treat \? in the replacement text
5863 literally (Bug#8161).
5864
e5d9c0d1
CY
58652012-08-05 Chong Yidong <cyd@gnu.org>
5866
5867 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
5868 * frame.c (Vdelete_frame_functions):
5869 * emacs.c (Vkill_emacs_hook): Doc fix.
5870
8da0576b
EZ
58712012-08-04 Eli Zaretskii <eliz@gnu.org>
5872
5873 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
5874 --with-x-toolkit=no builds.
5875 Reported by Carsten Mattner <carstenmattner@gmail.com>.
5876
02676e5d
CY
58772012-08-04 Chong Yidong <cyd@gnu.org>
5878
5879 * syntax.c (Fmodify_syntax_entry): Doc fix.
5880
97147da9
EZ
58812012-08-04 Eli Zaretskii <eliz@gnu.org>
5882
76151e2c
EZ
5883 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
5884 * w32.c (init_environment): Change the default values of many
5885 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
5886 them into environment when they were not already defined.
5887 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 5888 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
5889 (check_windows_init_file): Now external, not static.
5890 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
5891 called when Vload_path is already set up.
5892
5893 * w32.h (check_windows_init_file): Add prototype.
5894
5895 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
5896 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
5897 compatibility with Posix platforms.
5898 (main): Move the call to check_windows_init_file to here from
5899 w32.c.
5900 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
5901 any, in the DEFALT argument into the root of the Emacs build or
5902 installation tree, as appropriate.
5903
5904 * callproc.c (init_callproc_1): Call decode_env_path instead of
5905 doing its equivalent by hand.
5906 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
5907 the code that sets Vexec_path run on MS-Windows.
5908
5909 * lread.c (init_lread): Add comments to #ifdef's.
5910
97147da9
EZ
5911 * msdos.c (dos_set_window_size, IT_update_begin)
5912 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
5913 instead of direct references.
5914
185ee146
PE
59152012-08-04 Paul Eggert <eggert@cs.ucla.edu>
5916
5917 Export DEFAULT_REHASH_* to GDB.
5918 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
5919 Now constants, not macros.
5920
8834c57a
PE
59212012-08-03 Paul Eggert <eggert@cs.ucla.edu>
5922
98c6f1e3
PE
5923 Remove unnecessary casts involving pointers.
5924 These casts are no longer needed now that we assume C89 or later,
5925 since they involve casting to or from void *.
5926 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
5927 (make_pure_float, make_pure_vector):
5928 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
5929 * macros.c (Fstart_kbd_macro):
5930 * menu.c (find_and_return_menu_selection):
5931 * minibuf.c (read_minibuf_noninteractive):
5932 * sysdep.c (closedir):
5933 * xdisp.c (x_produce_glyphs):
5934 * xfaces.c (compare_fonts_by_sort_order):
5935 * xfns.c (x_real_positions, select_visual):
5936 * xselect.c (x_stop_queuing_selection_requests)
5937 (x_get_window_property, x_get_window_property_as_lisp_data):
5938 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
5939 Remove unnecessary pointer casts.
5940 * alloc.c (record_xmalloc): New function.
5941 * lisp.h (record_xmalloc): New decl.
5942 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
5943 more like a function. This is because the pointer cast is not
5944 needed. All uses changed.
5945 * print.c (print_string, print_error_message): Avoid length recalc.
5946
8834c57a
PE
5947 Improve fix for macroexp crash with debugging (Bug#12118).
5948 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
5949 ARRAY_MARK_FLAG when checking subscripts, because ASET is
5950 not supposed to be invoked from the garbage collector.
5951 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
5952 (gc_aset): New function, which is like ASET but can be
5953 used in the garbage collector.
5954 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
5955 (set_hash_index): Use it instead of ASET.
5956
6dad7178
EZ
59572012-08-03 Eli Zaretskii <eliz@gnu.org>
5958
5959 Support symlinks on latest versions of MS-Windows.
5960 * w32.c: Include winioctl.h and aclapi.h.
5961 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
5962 (revert_to_self): Forward declarations of static functions.
5963 <static BOOL g_b_init_get_security_info>:
5964 <g_b_init_create_symbolic_link>: New static flags.
5965 (globals_of_w32): Initialize them to zero.
5966 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
5967 (map_w32_filename): Improve commentary. Simplify switch.
5968 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
5969 headers (most versions of MinGW w32api don't).
5970 (get_security_info, create_symbolic_link)
5971 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
5972 New functions.
5973 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
5974 in the argument file name.
5975 (sys_access): Call unc_volume_file_attributes only if
5976 GetFileAttributes fails with network-related error codes.
5977 (sys_rename): Diagnose renaming of a symlink when the user doesn't
5978 have the required privileges.
14ae4239 5979 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
5980 get_file_security_desc.
5981 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
5982 with addition of handling of symlinks and support for 'lstat'.
5983 If possible, get file's attributes and security information by
6dad7178
EZ
5984 handle, not by name. Produce S_IFLNK bit for symlinks, when
5985 called from 'lstat'.
5986 (stat, lstat): New functions, call 'stat_worker'.
5987 (symlink, readlink, careadlinkat): Rewritten to create and resolve
5988 symlinks when the underlying filesystem supports them.
5989
f162bcc3
PE
59902012-08-02 Paul Eggert <eggert@cs.ucla.edu>
5991
79ea6c20
PE
5992 Fix macroexp crash on Windows with debugging (Bug#12118).
5993 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
5994 checking subscripts; problem introduced with the recent
5995 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
5996 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
5997 since it's used in non-static inline functions now.
5998
c0ce93fd
PE
5999 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
6000 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 6001
f162bcc3
PE
6002 Use C99-style 'extern inline' if available.
6003 * buffer.h (BUFFER_INLINE):
6004 * category.h (CATEGORY_INLINE):
6005 * character.h (CHARACTER_INLINE):
6006 * charset.h (CHARSET_INLINE):
6007 * composite.h (COMPOSITE_INLINE):
6008 * dispextern.h (DISPEXTERN_INLINE):
6009 * lisp.h (LISP_INLINE):
6010 * systime.h (SYSTIME_INLINE):
6011 New macro, replacing 'static inline' in this header.
6012 * buffer.h, category.h, character.h, charset.h, composite.h:
6013 * dispextern.h, lisp.h, systime.h:
6014 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
6015 * alloc.c (LISP_INLINE):
6016 * buffer.c (BUFFER_INLINE):
6017 * category.c (CATEGORY_INLINE):
6018 * character.c (CHARACTER_INLINE):
6019 * charset.c (CHARSET_INLINE):
6020 * composite.c (COMPOSITE_INLINE):
6021 * dispnew.c (DISPEXTERN_INLINE):
6022 * sysdep.c (SYSTIME_INLINE):
6023 Define to EXTERN_INLINE, so that the corresponding functions
6024 are compiled into code.
6025 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
6026 (INLINE_HEADER_END): New macros.
6027 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
6028 since it's used in non-static inline functions now.
a8333d03 6029 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 6030
837b365b
GM
60312012-08-02 Glenn Morris <rgm@gnu.org>
6032
d66b744d
GM
6033 * s/: Remove empty directory.
6034
837b365b
GM
6035 * s/ms-w32.h: Move to ../nt/inc.
6036 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
6037 Update for new ms-w32.h location.
6038
13294f95
PE
60392012-08-02 Paul Eggert <eggert@cs.ucla.edu>
6040
6041 Port to Solaris 8.
6042 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
6043
90df0db3
GM
60442012-08-02 Glenn Morris <rgm@gnu.org>
6045
6046 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
6047 hard-coding the path separator.
6048
4939150c
PE
60492012-08-01 Paul Eggert <eggert@cs.ucla.edu>
6050
6051 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
6052 This how ASET and AREF are supposed to work, and makes
6053 it easier to think about future improvements. See
6054 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
6055 * charset.h (set_charset_attr): New function.
6056 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
6057 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
6058 (aref_addr): New function. All uses of &AREF(...) changed.
6059 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
6060 (set_hash_index): New functions. All lvalue-style uses of
6061 HASH_KEY etc. changed.
6062 * keyboard.c (set_prop): New function. All lvalue-style uses
6063 of PROP changed.
6064
947b2afd
AA
60652012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
6066
6067 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
6068 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1f9f395d 6069 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
947b2afd
AA
6070 * nsfns.m (ns_set_name_as_filename): Likewise.
6071 * nsmenu.m (ns_update_menubar): Likewise.
6072 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
6073
4f5d0325
EZ
60742012-08-01 Eli Zaretskii <eliz@gnu.org>
6075
2008beae
EZ
6076 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
6077 Adapt to latest changes in field names of the corresponding Lisp
288479f6 6078 objects.
2008beae 6079
4f5d0325
EZ
6080 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
6081
fe3cc771
GM
60822012-08-01 Glenn Morris <rgm@gnu.org>
6083
6084 * s/msdos.h: Remove file.
6085 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
6086 * Makefile.in (S_FILE): Remove.
6087 (config_h): Remove S_FILE.
6088
c90acc54
JB
60892012-08-01 Juanma Barranquero <lekktu@gmail.com>
6090
6091 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
6092 Remove; moved to nt/config.nt.
6093
d8a05828
DA
60942012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6095
6096 Use INTERNAL_FIELD for conses and overlays.
6097 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
6098 Remove obsolete comment.
6099 (MVAR): New macro.
6100 (struct Lisp_Overlay): Use INTERNAL_FIELD.
6101 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
6102
8271d590
DA
61032012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6104
6105 Use INTERNAL_FIELD for symbols.
6106 * lisp.h (SVAR): New macro. Adjust users.
6107 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
6108 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
6109
3193acd2
DA
61102012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6111
6112 Use INTERNAL_FIELD for processes.
6113 * process.h (PVAR): New macro. Adjust style.
6114 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
6115 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
6116
3a45383a
DA
61172012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6118
6119 Use INTERNAL_FIELD for windows.
6120 * window.h (WVAR): New macro.
6121 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
6122 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
6123 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
6124 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
6125 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
6126 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
6127
c1dbc63c
PE
61282012-08-01 Paul Eggert <eggert@cs.ucla.edu>
6129
6130 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
6131
5c0c0e8a
GM
61322012-08-01 Glenn Morris <rgm@gnu.org>
6133
6134 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
6135 Move to configure.ac.
6136
552a99b4
JB
61372012-08-01 Juanma Barranquero <lekktu@gmail.com>
6138
6139 * makefile.w32-in (CONFIG_H): Update dependencies.
6140 (CONF_POST_H): New macro.
6141
6142 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
6143
8d8e2dfe
GM
61442012-07-31 Glenn Morris <rgm@gnu.org>
6145
bc96620a
GM
6146 * Makefile.in (S_FILE): No longer set by configure.
6147
476b1b2d
GM
6148 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
6149 is available.
6150 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
6151
b2c7a106
GM
6152 * process.h (NULL_DEVICE):
6153 * emacs.c (SEPCHAR):
6154 * editfns.c (USER_FULL_NAME): Let configure set them.
6155
d53d062a
GM
6156 * s/README, s/template.h: Remove files.
6157
4515017f
GM
6158 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
6159
8d8e2dfe
GM
6160 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
6161 Move to configure.ac.
6162
5b20b3cc
EZ
61632012-07-31 Eli Zaretskii <eliz@gnu.org>
6164
1e0afd9a
EZ
6165 * .gdbinit (xframe): Adapt to introduction of FVAR and the
6166 resulting renaming of 'struct frame' members.
6167
5b20b3cc
EZ
6168 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
6169
6170 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
6171 after introduction of FVAR.
6172
f1310128
JD
61732012-07-31 Jan Djärv <jan.h.d@swipnet.se>
6174
79e721e0
JD
6175 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
6176
6177 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
6178 instead of compositeToPoint.
6179 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
6180
8d7c7eed 6181 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 6182
e34f7f79
DA
61832012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6184
6185 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
6186 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 6187 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
6188 (BVAR): Change to use INTERNAL_FIELD.
6189 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
6190 (KVAR): Change to use INTERNAL_FIELD.
6191 * frame.h (FVAR): New macro.
6192 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
6193 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
6194 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
6195 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
6196 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
6197
c09bfb2f
DA
61982012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6199
6200 Miscellaneous fixes for non-default X toolkits.
6201 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
6202 * xterm.c (x_frame_of_widget): Remove redundant prototype.
6203 Move under #ifdef USE_LUCID.
6204 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
6205 definition and usage to avoid warnings.
6206
14c114ae
JD
62072012-07-31 Jan Djärv <jan.h.d@swipnet.se>
6208
6209 * nsterm.m (openFiles): Fix previous checkin.
6210
3bd21e82
PE
62112012-07-31 Paul Eggert <eggert@cs.ucla.edu>
6212
6213 * indent.c (compute_motion): Remove unused local.
6214
c1529ded
GM
62152012-07-31 Glenn Morris <rgm@gnu.org>
6216
400d5621
GM
6217 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
6218
268e2432
GM
6219 * conf_post.h [USG5_4]:
6220 Move remaining contents of s/usg5-4-common.h here.
6221 * s/usg5-4-common.h: Remove file.
6222
7552f3ee
GM
6223 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
6224 * s/irix6-5.h: Remove file.
6225
6a381852
GM
6226 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
6227 * s/darwin.h: Remove file.
6228
c1529ded
GM
6229 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
6230 * s/hpux10-20.h: Remove file, which is now empty.
6231
b429a4ee
GM
62322012-07-30 Glenn Morris <rgm@gnu.org>
6233
6234 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
6235 * Makefile.in (config_h): Add conf_post.h.
6236 * makefile.w32-in (CONFIG_H): Add conf_post.h.
6237
adff3182
JD
62382012-07-30 Jan Djärv <jan.h.d@swipnet.se>
6239
6240 * nsterm.m (ns_do_open_file): New variable.
b9031d69 6241 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
6242 (openFile, openTempFile, openFileWithoutUI, openFiles):
6243 Open files only if ns_do_open_file.
adff3182 6244
c32af1e4
PE
62452012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6246
7393bcbb
PE
6247 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
6248 This no-op macro hasn't been needed for many years.
6249 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
6250
c32af1e4
PE
6251 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
6252 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
6253 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
6254 gdb_make_enums_visible.
6255 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
6256 (DIRECTORY_SEP): Now a constant, not a macro.
6257
302fc036
EZ
62582012-07-30 Eli Zaretskii <eliz@gnu.org>
6259
6260 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
6261 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
6262
6263 * w32term.c <w32_keyboard_codepage>: Renamed from
6264 keyboard_codepage and now external. All users changed.
6265
6266 * w32term.h: Add declaration of w32_keyboard_codepage.
6267
6268 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
6269 the codepage to translate keys to Unicode. If this argument is
6270 -1, use the value returned by GetConsoleCP. All callers changed.
6271
88fb40b4
PE
62722012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6273
0aee6912
PE
6274 Update .PHONY listings in makefiles.
6275 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
6276 bootstrap-clean, distclean, maintainer-clean, versioclean,
6277 extraclean, frc.
6278
88fb40b4
PE
6279 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
6280 This is a bit clearer. Fix some commentary typos.
6281
0a763bd1
GM
62822012-07-30 Glenn Morris <rgm@gnu.org>
6283
32bac6d6
GM
6284 * s/netbsd.h: Let configure include signal.h if needed.
6285 Remove file, which is now empty.
6286
b65e7c46
GM
6287 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
6288 Let configure set them.
6289 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
6290 No more need to undefine.
0a763bd1 6291
169304bd
AS
62922012-07-30 Andreas Schwab <schwab@linux-m68k.org>
6293
6294 * keymap.c (Fkey_description): Don't remove 0x80 bit from
6295 non-single-byte char when adding meta modifier. (Bug#12090)
6296
6cd7a139
DA
62972012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6298
6299 Convert safe_call to use variable number of arguments.
6300 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
6301 (safe_call2): Fix comment.
6302 * lisp.h (safe_call): Adjust prototype.
6303 * coding.c (encode_coding_object): Change to use safe_call2.
6304 * xfaces.c (merge_face_heights): Change to use safe_call1.
6305
d34d6ffc
GM
63062012-07-30 Glenn Morris <rgm@gnu.org>
6307
7b8a48e4 6308 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 6309 does that unconditionally. Remove file, which is now empty.
7b8a48e4 6310
d34d6ffc
GM
6311 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
6312 Remove empty files.
6313
03a660a6
PE
63142012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6315
6316 Export to GDB most of lisp.h's remaining object-like macros.
6317 * lisp.h (min, max): Move earlier, because they're used earlier now.
6318 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
6319 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
6320 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
6321 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
6322 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
6323 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
6324 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
6325 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
6326 Now constants, for GDB. They need not be macros.
6327 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
6328 Now constants, for GDB, as well as macros, for static initializers.
6329 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
6330 Move to after the definition of struct Lisp_Char_Table,
6331 since the former now needs that type defined.
6332 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
6333 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
6334 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
6335 New enums, for gdb_make_enums_visible.
6336 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 6337 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
6338 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
6339 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
6340 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
6341 enum maxargs, enum MAX_ALLOCA.
6342 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
6343 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
6344 no longer needed, now that they are done in lisp.h.
6345
e499d0ee
DA
63462012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6347
6348 Cleanup string bytes checking.
6349 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
6350 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
6351 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
6352 (check_sblock, compact_small_strings): Simplify.
6353
d5040d2d
PE
63542012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6355
6356 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
6357 These macros are confusing and no longer need to be defined, as
6358 the enum values now suffice. All uses replaced with definiens.
6359 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
6360
7f259ae6
JB
63612012-07-29 Juanma Barranquero <lekktu@gmail.com>
6362
6363 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
6364 ($(BLD)/w32console.$(O)): Update dependencies.
6365
7e63e0c3
DA
63662012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6367
6368 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
6369 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
6370 time. Adjust users.
6371 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
6372
ffd817eb
JD
63732012-07-29 Jan Djärv <jan.h.d@swipnet.se>
6374
6375 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
6376 setting sitelisp (Bug#12010).
6377
417a7a0e
EZ
63782012-07-29 Eli Zaretskii <eliz@gnu.org>
6379
14ae4239 6380 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
6381
6382 * w32heap.c (cache_system_info):
6383 * w32.c (sys_rename):
6384 * w32proc.c (find_child_console, sys_kill): All users changed.
6385
387d4d92
PE
63862012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6387
6388 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
6389
55a6cca6
EZ
63902012-07-29 Eli Zaretskii <eliz@gnu.org>
6391
6392 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
6393
dbcf001c
DA
63942012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6395
6396 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
6397 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
6398 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 6399
e2688e4a
DA
64002012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6401
6402 Generalize marker debugging code under MARKER_DEBUG and use eassert.
6403 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
6404 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
6405 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
6406 (replace_range, replace_range_2, del_range_2): Change to eassert.
6407 * marker.c (byte_char_debug_check): Adjust style.
6408
b46a6a83
PE
64092012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
6412 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
6413 long-ago-commented-out code that talks about "WIN32".
6414 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
6415 All uses changed.
6416
e32a5799
PE
64172012-07-28 Paul Eggert <eggert@cs.ucla.edu>
6418
6419 Use Gnulib stdalign module (Bug#9772, Bug#9960).
6420 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
6421 Simplify by using alignof.
6422 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
6423 * lisp.h: Include <stdalign.h>.
6424 (GCALIGNMENT): New macro and constant.
6425 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
6426 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
6427 (stdalign): New macro, if not already defined.
6428
df81cd29
EZ
64292012-07-28 Eli Zaretskii <eliz@gnu.org>
6430
01bd1b0d
EZ
6431 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
6432 * w32inevt.c: Include w32inevt.h.
6433 (w32_read_console_input): New inline function, calls either
6434 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
6435 w32_console_unicode_input.
6436 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
6437 (w32_kbd_patch_key, key_event): Use the codepage returned by
6438 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
6439 (key_event): use uChar.UnicodeChar only if
6440 w32_console_unicode_input is non-zero.
6441
6442 * w32console.c: Include w32heap.h.
6443 <w32_console_unicode_input>: New global variable.
6444 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
6445 family of Windows, zero otherwise.
6446
6447 * w32inevt.h: Declare w32_console_unicode_input.
6448
df81cd29
EZ
6449 * xdisp.c (init_iterator): Don't reference tip_frame in a build
6450 --without-x. (Bug#11742)
6451
c20fdd9e
PE
64522012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6453
6454 Adjust GDB to reflect pvec_type changes (Bug#12036).
6455 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
6456 2012-07-04 changes to pseudovector representation.
6457 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 6458
32770973 64592012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
6460
6461 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
6462 bus address.
6463 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
6464
3438fe21
EZ
64652012-07-27 Eli Zaretskii <eliz@gnu.org>
6466
bcfbc9de
EZ
6467 * alloc.c (listn): Fix the order the arguments are consed onto the
6468 list.
6469
3438fe21
EZ
6470 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
6471 enumeration constants, as PURE and HEAP are too general, and clash
6472 with other headers and sources, such as gmalloc.c and the
6473 MS-Windows system headers. All users changed.
6474
eeaea515
DA
64752012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6476
6477 Revert last save_excursion_save and save_excursion_restore changes.
6478 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
6479 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
6480
073c88c2
DA
64812012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6482
6483 Fix recently-introduced typos in Windows port.
6484 Reported by Martin Rudalics <rudalics@gmx.at>.
6485 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 6486 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 6487
4706125e
PE
64882012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6489
6490 Improve GDB symbol export (Bug#12036).
6491 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
6492 arms of an 'if', not using conditional expressions; otherwise GDB
6493 complains about the types in the unevaluated arm when the argument
6494 is an integer literal.
6495 (xgetint): Simplify expression.
6496 * alloc.c (gdb_make_enums_visible): New constant. This ports to
6497 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
6498 Zaretskii in <http://bugs.gnu.org/12036#13>.
6499 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
6500 needed now that we have gdb_make_enums_visible.
6501 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
6502 (enum enum_USE_LSB_TAG):
6503 New enum types, packaging up enums that need to be exported to GDB.
6504
694b6c97
DA
65052012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6506
6507 Utility function to make a list from specified amount of objects.
6508 * lisp.h (enum constype): New datatype.
6509 (listn): New prototype.
6510 * alloc.c (listn): New function.
6511 (Fmemory_use_count, syms_of_alloc): Use it.
6512 * buffer.c (syms_of_buffer): Likewise.
6513 * callint.c (syms_of_callint): Likewise.
6514 * charset.c (define_charset_internal): Likewise.
6515 * coding.c (syms_of_coding): Likewise.
6516 * keymap.c (syms_of_keymap): Likewise.
6517 * search.c (syms_of_search): Likewise.
6518 * syntax.c (syms_of_syntax): Likewise.
6519 * w32.c (init_environment): Likewise.
6520 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
6521 * xdisp.c (syms_of_xdisp): Likewise.
6522 * xfns.c (syms_of_xfns): Likewise.
6523
6195f384
DA
65242012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6525
6526 Fast save_excursion_save and save_excursion_restore.
6527 * lisp.h (struct Lisp_Excursion): New data type.
6528 (PVEC_EXCURSION): New pseudovector type.
6529 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
6530 to deal with it. Adjust comments.
6531 (init_marker, attach_marker): New prototype.
6532 (unchain_marker): Adjust prototype.
6533 * marker.c (attach_marker): Change to global.
6534 (init_marker): New function.
6535 * alloc.c (Fmake_marker, build_marker): Use it.
6536 (build_marker): More easserts.
6537 (mark_object): Handle struct Lisp_Excursion.
6538 * editfns.c (save_excursion_save, save_excursion_restore):
6539 Reimplement to use struct Lisp_Excursion. Add comments.
6540
5eceb8fb
PE
65412012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6542
6543 Fix export of symbols to GDB (Bug#12036).
6544 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
6545 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
6546 emacs.c, as this is a more-suitable home. Had this been done earlier
6547 the fix for 12036 would have avoided some of the problems noted in
6548 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
6549 would have been more obvious.
562157c8
PE
6550 * emacs.c: Do not include <verify.h>; no longer needed.
6551 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
6552 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
6553 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6554 Remove; now done in lisp.h.
6555 * lisp.h (PUBLISH_TO_GDB): New macro.
6556 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
6557 (DATA_SEG_BITS): Use it.
6558 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
6559 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
6560 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
6561 not be usable in #if. This simplifies things.
6562
d6749401
JB
65632012-07-26 Juanma Barranquero <lekktu@gmail.com>
6564
6565 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
6566
1781b9e9
PE
65672012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6568
d89518db 6569 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
6570 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
6571 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
6572 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
6573 Adjust to changes in lisp.h and emacs.c, by using
6574 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
6575 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
6576 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
6577 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
6578 instead of gdb_valbits.
6579 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
6580 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
6581 instead of gdb_array_mark_flag.
6582 (xboolvector): Get size from $->size, not $->header.size.
6583 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
6584 (xreload, hook-run, hookpost-run): Remove.
6585 * emacs.c: Include <verify.h>.
6586 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
6587 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
6588 Remove.
6589 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
6590 (gdb_USE_LSB_TAG): New enum constants.
6591 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6592 Also define these as enum constants, so they're visible to GDB.
6593 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
6594 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
6595 as constants, so they're visible to GDB.
6596 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
6597 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
6598 Now enum constants, not macros, so they're visible to GDB.
6599 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
6600 more convenient now. All uses changed.
6601 (VALMASK) [USE_LSB_TAG]: Also define in this case.
6602 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
6603
3628596a
DA
66042012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
6605
6606 Explicitly free restriction data that are not needed anymore.
6607 * editfns.c (save_restriction_restore): Free restriction data.
6608
7abaf5cc
SM
66092012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
6610
6611 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
6612 add argument, tune behavior, and adjust all callers.
6613
71f88e00
PE
66142012-07-25 Paul Eggert <eggert@cs.ucla.edu>
6615
6616 Use typedef for EMACS_INT, EMACS_UINT.
6617 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
6618 than macros. This simplifies debugging in the usual case, since
6619 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
6620 and it allows expressions involving EMACS_INT casts.
6621 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
6622
57ec3034
JD
66232012-07-25 Jan Djärv <jan.h.d@swipnet.se>
6624
6625 * nsterm.m (ns_read_socket): Return early if there is a modal
6626 window (Bug#12043).
6627
8137e7b3
MR
66282012-07-25 Martin Rudalics <rudalics@gmx.at>
6629
6630 * frame.c (Fredirect_frame_focus): In doc-string don't mention
6631 that FOCUS-FRAME can be omitted.
6632
04e9897c
DA
66332012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
6634
6635 Adjust buffer text indirection counters at the end of Fkill_buffer.
6636 * buffer.c (Fkill_buffer): Adjust indirection counters when the
6637 buffer is definitely dead. This should really fix an issue reported
6638 by Christoph Scholtes again. (Bug#12007).
6639 (init_buffer_once): Initialize indirection counters of
6640 buffer_defaults and buffer_local_symbols (for sanity and safety).
6641
8a0484e1
EZ
66422012-07-24 Eli Zaretskii <eliz@gnu.org>
6643
6644 * xdisp.c (init_iterator): Don't compute dimensions of truncation
6645 and continuation glyphs on tooltip frames, leave them at zero.
6646 Avoids continued lines in tooltips. (Bug#11832)
6647
fa691a83
DA
66482012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
6649
6650 Simplify copy_overlay.
04e9897c 6651 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
6652 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
6653
436bc8e0
EZ
66542012-07-23 Eli Zaretskii <eliz@gnu.org>
6655
6656 * print.c (print_object): Don't crash when a frame's name is nil
6657 or invalid. (Bug#12025)
6658
6659 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
6660 it signals an error when a tooltip frame is being created.
6661
d7a7fda3
DA
66622012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
6663
6664 Cleanup miscellaneous objects allocation and initialization.
6665 * alloc.c (allocate_misc): Change to static. Add argument to
6666 specify the subtype. Adjust comment and users.
6667 (build_overlay): New function.
6668 * buffer.c (copy_overlays, Fmake_overlay): Use it.
6669 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
6670 (allocate_misc): Remove prototype.
6671 (build_overlay): Add prototype.
6672
66732012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
6674
6675 Swap buffer text indirection counters in Fbuffer_swap_text.
6676 * buffer.c (Fbuffer_swap_text): Swap indirections too.
6677 This avoids crash reported by Christoph Scholtes at
6678 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
6679
9d7fa573
JD
66802012-07-22 Jan Djärv <jan.h.d@swipnet.se>
6681
6682 * nsmenu.m (Popdown_data): New struct.
6683 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
6684 free Popdown_data.
6685 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
6686 (initWithContentRect): Make imgView and contentView non-static
6687 and autorelease them. Also autorelease img and matrix (Bug#12005).
6688 (dealloc): Remove (Bug#12005).
6689
0dd6d66d
DA
66902012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
6691
6692 Adjust consing_since_gc when objects are explicitly freed.
6693 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
6694 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
6695 (free_cons, free_misc): Subtract object size from consing_since_gc.
6696
d36d71df
DA
66972012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
6698
6699 Simplify and cleanup markers positioning code.
6700 * marker.c (attach_marker): More useful eassert.
6701 (live_buffer, set_marker_internal): New function.
6702 (Fset_marker, set_marker_restricted): Use set_marker_internal.
6703 (set_marker_both, set_marker_restricted_both): Use live_buffer.
6704
fb9ea40f
PE
67052012-07-22 Paul Eggert <eggert@cs.ucla.edu>
6706
6707 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
6708 as it's limited by the amount of memory, not by INT_MAX.
6709
2d5c5f7d
EZ
67102012-07-21 Eli Zaretskii <eliz@gnu.org>
6711
07fb592e
EZ
6712 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
6713 in special-event-map. See the discussion at
6714 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
6715 for the reasons.
6716
37a9eac8 6717 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
6718 info.dwItemData. Fixes crashes on 64-bit Windows.
6719 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 6720
c4328746
JD
67212012-07-21 Jan Djärv <jan.h.d@swipnet.se>
6722
fc0c31f8 6723 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 6724 (conversationIdentifier): Return value is NSInteger.
784051c4 6725 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 6726
6e5d1c12
CY
67272012-07-21 Chong Yidong <cyd@gnu.org>
6728
6729 * window.c (decode_any_window): Signal an error if the window is
6730 on a dead frame (Bug#11984).
6731
9928463d
DA
67322012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6733
6734 Add indirection counting to speed up Fkill_buffer.
6735 * buffer.h (struct buffer): New member.
6736 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
6737 (Fmake_indirect_buffer): Set indirection counter to -1, increment
6738 base buffer indirection counter.
6739 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
6740 (Fkill_buffer): Adjust indirection counters as needed, don't walk
6741 through buffer list if indirection counter is 0.
6742
f8643a6b
DA
67432012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6744
6745 Extend the value returned by Fgarbage_collect with heap statistics.
6746 * alloc.c (Qheap): New symbol.
6747 (syms_of_alloc): DEFSYM it.
6748 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
6749 (Fmemory_free): Remove.
6750 (syms_of_alloc): Don't defsubr it.
6751 * buffer.c (Fcompact_buffer): Remove.
6752 (syms_of_buffer): Don't defsubr it.
6753
dac616ff
DA
67542012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6755
6756 Make maybe_gc inline.
6757 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
6758 * lisp.h (consing_since_gc, gc_relative_threshold)
6759 (memory_full_cons_threshold): Revert declaration.
6760 (maybe_gc): Remove prototype, define as inline.
6761 * alloc.c: Remove old commented-out code.
6762 (consing_since_gc, gc_relative_threshold)
6763 (memory_full_cons_threshold): Revert to global.
6764 (maybe_gc): Remove.
6765
d7ea76b4
DA
67662012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6767
6768 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
6769 * lisp.h (build_unibyte_string): New function.
6770 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
6771 * sysdep.c, w32fns.c, xfns.c: Use it.
6772 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
6773 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
6774 Adjust users accordingly.
6775 * font.h (font_open_by_name): Adjust prototype.
6776
765e61e3
DA
67772012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6778
6779 Cleanup calls to Fgarbage_collect.
6780 * lisp.h (maybe_gc): New prototype.
6781 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
6782 Remove declarations.
6783 * alloc.c (maybe_gc): New function.
6784 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
6785 Make them static.
6786 * bytecode.c (MAYBE_GC): Use maybe_gc.
6787 * eval.c (eval_sub, Ffuncall): Likewise.
6788 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
6789 to avoid dependency from auto-save feature.
6790
52b852c7
PE
67912012-07-19 Paul Eggert <eggert@cs.ucla.edu>
6792
6793 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
6794 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
6795 'for_each_per_buffer_object_at'.
6796 All uses changed. It's better to use upper-case for macros that
6797 cannot be implemented as functions, to give the reader a clue
6798 that they're special.
6799
5db81e33
SM
68002012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
6801
6802 * alloc.c (Fgarbage_collect): Tweak docstring.
6803
5b835e1d
DA
68042012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6805
6806 Tweak the value returned from Fgarbage_collect again.
6807 * alloc.c (Fgarbage_collect): New return value, as confirmed in
6808 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
6809 Adjust documentation.
6810 (total_vector_bytes): Rename to total_vector_slots, adjust
6811 accounting.
6812 (total_free_vector_bytes): Rename to total_free_vector_slots,
6813 adjust accounting.
6814 (Qstring_bytes, Qvector_slots): New symbols.
6815 (syms_of_alloc): DEFSYM them.
6816
9cd47b72
DA
68172012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6818
6819 Buffer compaction primitive which may be used from Lisp.
6820 * buffer.c (compact_buffer, Fcompact_buffer): New function.
6821 (syms_of_buffer): Register Fcompact_buffer.
6822 * alloc.c (Fgarbage_collect): Use compact_buffer.
6823 * buffer.h (compact_buffer): New prototype.
6824 (struct buffer_text): New member.
6825
d17337e5
DA
68262012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6827
6828 New macro to iterate over all buffers, miscellaneous cleanups.
6829 * lisp.h (all_buffers): Remove declaration.
6830 * buffer.h (all_buffers): Add declaration, with comment.
6831 (for_each_buffer): New macro.
6832 * alloc.c (Fgarbage_collect, mark_object): Use it.
6833 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
6834 (init_buffer): Likewise.
6835 * data.c (Fset_default): Likewise.
6836 * coding.c (code_conversion_restore): Remove redundant check
6837 for dead buffer.
6838 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
6839
60cfd278
AS
68402012-07-18 Andreas Schwab <schwab@linux-m68k.org>
6841
6842 Fix bug that created negative-length intervals.
6843 * intervals.c (merge_interval_right, merge_interval_left):
6844 Do not zero out this interval if it is absorbed by its children,
6845 as this interval's total length doesn't change in that case. See
6846 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
6847
d06714cb
PE
68482012-07-18 Paul Eggert <eggert@cs.ucla.edu>
6849
83713154
PE
6850 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
6851 when invoking (make-bool-vector N t) and N is a positive
6852 multiple of 8 -- the last 8 bits were mistakenly cleared.
6853
d06714cb
PE
6854 Remove some struct layout assumptions in bool vectors.
6855 * alloc.c (bool_header_size): New constant.
6856 (header_size, word_size): Move earlier, as they're now used earlier.
6857 Use 'word_size' in a few more places, where it's appropriate.
6858 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
6859 padding before the data member of a bool vector.
6860 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
6861 than doing the check by hand with an abort ().
6862
464d5a5e
SM
68632012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
6864
5fbc0409
SM
6865 * eval.c (Fdefvar): Don't check constants since we only set the var if
6866 it's not yet defined anyway (bug#11904).
6867
464d5a5e
SM
6868 * lisp.h (last_undo_boundary): Declare new var.
6869 * keyboard.c (command_loop_1): Set it.
6870 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
6871 were auto-added by the command loop (bug#11774).
6872
8dc2e44a
AS
68732012-07-18 Andreas Schwab <schwab@linux-m68k.org>
6874
6875 * w32font.c (Qsymbol): Remove local definition.
6876 (syms_of_w32font): Don't DEFSYM it.
6877
169925ec
DA
68782012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
6879
6880 Fix sweep_vectors to handle large bool vectors correctly.
6881 * alloc.c (sweep_vectors): Account total_vector_bytes for
6882 bool vectors larger than VBLOCK_BYTES_MAX.
6883
5fbfb018
CY
68842012-07-18 Chong Yidong <cyd@gnu.org>
6885
6886 * frame.c (x_set_frame_parameters): Revert bogus change introduced
6887 in 2012-05-25 commit by Paul Eggert (Bug#11738).
6888
3ab6e069
DA
68892012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
6890
6891 Return more descriptive data from Fgarbage_collect.
6892 Suggested by Stefan Monnier in
6893 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
6894 * alloc.c (bounded_number): New function.
6895 (total_buffers, total_vectors): New variable.
6896 (total_string_size): Rename to total_string_bytes, adjust users.
6897 (total_vector_size): Rename to total_vector_bytes, adjust users.
6898 (sweep_vectors): Account total_vectors and total_vector_bytes.
6899 (Fgarbage_collect): New return value. Adjust documentation.
6900 (gc_sweep): Account total_buffers.
6901 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
6902 (VECTOR_SIZE): Remove.
6903 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
6904 (Qinterval, Qmisc): New symbols.
6905 (syms_of_data): Initialize them.
6906 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
6907 (Qcons, Qbuffer): New declarations.
6908
6d02fe5b
PE
69092012-07-17 Paul Eggert <eggert@cs.ucla.edu>
6910
6911 * alloc.c (Fmemory_free): Account for memory-free's own storage.
6912 Round up, not down. Improve doc.
6913
b7ffe040
DA
69142012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6915
6916 Restore old code in allocate_string_data to avoid Faset breakage.
6917 Reported by Julien Danjou <julien@danjou.info> in
6918 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
6919 * alloc.c (allocate_string_data): Restore old code with minor
6920 adjustments, fix comment to explain this subtle issue.
6921
4dc7c8d5
SM
69222012-07-17 Eli Zaretskii <eliz@gnu.org>
6923
6924 Remove FILE_SYSTEM_CASE.
6925 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
6926
6927 * fileio.c (FILE_SYSTEM_CASE): Don't define.
6928 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
6929 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
6930 call-process-region passes it through expand-file-name.
6931
6932 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
6933
69342012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6935
6936 Fix crash when creating indirect buffer (Bug#11917)
6937 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
6938 Don't handle unbound variables specially if non-zero.
6939 (Fbuffer_local_variables): Pass zero.
6940 (clone_per_buffer_values): Pass non-zero.
6941
69422012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6943
6944 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
6945 to make the loop interruptible.
6946
69472012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6948
6949 * gnutls.c (emacs_gnutls_handshake): Only retry if
6950 GNUTLS_E_INTERRUPTED.
6951
cce7fefc
DA
69522012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6953
6954 Cleanup and convert miscellaneous checks to eassert.
6955 * alloc.c (mark_interval): Fix comment, partially rephrase
6956 old comment from intervals.h (see below).
6957 * intervals.c (find_interval, adjust_intervals_for_insertion)
6958 (delete_interval, adjust_intervals_for_deletion)
6959 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
6960 Convert to eassert.
6961 (adjust_intervals_for_insertion, make_new_interval):
6962 Remove obsolete and unused code.
6963 * intervals.h (struct interval): Remove obsolete comment.
6964 * textprotp.c (erase_properties): Remove unused code.
6965 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
6966 (Fremove_list_of_text_properties): Convert to eassert.
6967
9ea10cc3
CY
69682012-07-17 Chong Yidong <cyd@gnu.org>
6969
6970 * editfns.c (Finsert_char): Doc fix.
6971
3900d5de
DA
69722012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6973
6974 Fix previous change to make Fmemory_free always accurate.
6975 * alloc.c (make_interval): Update total_free_intervals.
6976 (make_float): Likewise for total_free_floats.
6977 (free_cons, Fcons): Likewise for total_free_conses.
6978 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
6979 Likewise for total_free_vector_bytes.
6980 (Fmake_symbol): Likewise for total_free_symbols.
6981 (bytes_free): Remove.
6982
7098646f
DA
69832012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6984
6985 Simple free memory accounting feature.
6986 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
6987 (sweep_vectors): Accumulate size of free vectors.
6988 (Fgarbage_collect): Setup bytes_free.
6989 (Fmemory_free): New function.
6990 (syms_of_alloc): Register it.
6991
22657b40
DA
69922012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6993
6994 Cleanup overlays checking.
6995 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
6996 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
6997 eassert and OVERLAYP.
6998 (sort_overlays): Change to use OVERLAYP.
6999
ddfc8813
RK
70002012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
7001
7002 * editfns.c (Finsert_char): Make it interactive, and make the
7003 second arg optional. Copy interactive spec and docstring from
7004 ucs-insert.
7005
7c26cf3c
PE
70062012-07-17 Paul Eggert <eggert@cs.ucla.edu>
7007
7008 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
7009 Unlike the other wrapped functions, fabs has an unspecified
7010 effect on errno.
7011
5d127af9
JD
70122012-07-16 Jan Djärv <jan.h.d@swipnet.se>
7013
7014 * nsterm.m (keyDown): Interpret flags without left/right bits
7015 as the left key (Bug#11670).
7016
6a0dd1d7
DA
70172012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
7018
7019 Remove empty and useless init functions.
7020 * lisp.h (init_character_once, init_fns, init_image)
7021 (init_filelock, init_sound): Remove prototype.
7022 * character.c (init_character_once): Remove.
7023 * filelock.c (init_filelock): Likewise.
7024 * fns.c (init_fns): Likewise.
7025 * image.c (init_image): Likewise.
7026 * sound.c (init_sound): Likewise.
7027 * emacs.c (main): Adjust accordingly.
7028
7a6136fd
DA
70292012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
7030
7031 * gtkutil.h: Tiny cleanups.
7032 (use_old_gtk_file_dialog): Remove useless declaration.
7033 (xg_uses_old_file_dialog): Add suggested const attribute.
7034
ce811ad9
EZ
70352012-07-15 Eli Zaretskii <eliz@gnu.org>
7036
7037 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
7038 (bidi_paragraph_init): Use it to limit search forward for a strong
7039 directional character in abnormally large paragraphs full of
7040 neutral or weak characters. (Bug#11943)
7041
c9adfeaa
SF
70422012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
7043
7044 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
7045 the toolbar (Bug#9451).
7046 (xg_make_tool_item): Give the widget event box a transparent
7047 background.
7048
fff62aa9
DA
70492012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
7050
7051 Cleanup basic allocation variables and functions.
7052 * alloc.c (ignore_warnings, init_intervals, init_float)
7053 (init_cons, init_symbol, init_marker): Remove.
7054 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
7055 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
7056 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
7057 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
7058 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
7059 (staticidx, init_alloc_once, init_strings, free_ablock):
7060 Remove redundant initialization.
7061 * fns.c (init_weak_hash_tables): Remove.
7062 * lisp.h (init_weak_hash_tables): Remove prototype.
7063
9730daca
DA
70642012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
7065
7066 Use zero_vector where appropriate.
7067 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
7068 accordingly.
7069 * lisp.h (zero_vector): New declaration.
7070 * font.c (null_vector): Remove.
7071 (syms_of_font): Remove initialization and staticpro.
7072 (font_list_entities, font_find_for_lface): Change to use zero_vector.
7073 * keymap.c (Faccessible_keymaps): Likewise.
7074
2e2d2a13
LL
70752012-07-15 Leo Liu <sdl.web@gmail.com>
7076
7077 * fringe.c: Fix typo in comments.
7078
cd276f6e
LL
70792012-07-14 Leo Liu <sdl.web@gmail.com>
7080
7081 * fringe.c: Add a new bitmap exclamation-mark.
7082
5a1131d9
EZ
70832012-07-14 Eli Zaretskii <eliz@gnu.org>
7084
7085 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
7086
7087 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
7088 (HAVE_MENUS): Don't define, defined by editing config.in with
7089 msdos/sed2v2.inp.
7090 (GMALLOC_INHIBIT_VALLOC): Don't define.
7091 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
7092
22e983b7
JB
70932012-07-14 Juanma Barranquero <lekktu@gmail.com>
7094
7095 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
7096
5b3f250f
GM
70972012-07-14 Glenn Morris <rgm@gnu.org>
7098
7099 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
7100 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
7101 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
7102
33d63ff4
GM
71032012-07-13 Glenn Morris <rgm@gnu.org>
7104
5b633342
GM
7105 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
7106
33d63ff4
GM
7107 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
7108 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
7109
b55b9f85
JD
71102012-07-13 Jan Djärv <jan.h.d@swipnet.se>
7111
0dc8cf50
JD
7112 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
7113 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
7114 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
7115 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
7116 where appropriate.
7117 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
7118 as boolean expression.
7119 (x_set_window_size): Remove unused variable toolbar.
7120 (ns_get_color_default, ns_mod_to_lisp): Remove.
7121 (ns_mouse_position): Remove unused variables xchar and ychar.
7122 (ns_compute_glyph_string_overhangs): Remove unused variable face.
7123 (ns_set_vertical_scroll_bar): Remove unused variable count.
7124 (ns_delete_terminal): Remove unused variable i.
7125 (ns_term_init): Remove unused variables r, g and b.
7126 (mouseDown): Remove unused variable window.
7127 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
7128 (initFrameFromEmacs): Remove unused variable vbextra.
7129 (mouseEntered): Remove unused variables p and dpyinfo.
7130 (mouseExited): Remove unused variables p and r.
7131 (ns_define_frame_cursor, ns_clear_frame_area)
7132 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
7133 (menuDown): Assign [sender tag] to variable and cast the variable.
7134
7135 * nsterm.h (menuDown): Add id as type to argument sender.
7136 (ns_display_info_for_name): Add Lisp_Object argument.
7137 (ns_term_init): Add Lisp_Object argument.
7138 (ns_map_event_to_object): Add void argument.
7139 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
7140 prototype with arguments and only declare if __OBJC__.
7141 (nxatoms_of_nsselect): Add void argument.
7142 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
7143 (ns_alloc_autorelease_pool): Add void argument.
7144 (ns_release_autorelease_pool): Add void* argument.
7145 (ns_get_defaults_value): Add const char* argument.
7146
7147 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
7148 (initFromContents): Use SSDATA where appropriate.
7149 (ns_update_menubar): Add braces to ambigous if-else.
7150 (initWithTitle): Put () around assignment in if statement.
7151 (ns_menu_show): Remove unused variables window and keymap.
7152 (update_frame_tool_bar): Remove unused variable selected_p.
7153 (initWithContentRect): Remove unused variable this_cmd_name.
7154
7155 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
7156 appropriate.
7157 (setXBMColor): Remove unused variable len.
7158 (setPixmapData): Put () around assignment in loop statement.
7159
7160 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
7161 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
7162 where appropriate.
7163 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
7164 around assignment in loop statement.
7165 (nsfont_open): Remove unused variable i.
7166 (nsfont_open): Remove unused variable len.
7167 (nsfont_draw): Remove unused variable cs.
7168
7169 * nsfns.m (x_set_icon_name, ns_set_name_internal)
7170 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
7171 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
7172 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
7173 (Fns_font_name, Fns_perform_service)
7174 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
7175 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
7176 (ns_set_name): Remove unused variable view.
7177 (x_set_menu_bar_lines): Remove unused variable olines.
7178 (x_set_tool_bar_lines): Remove unused variable root_window.
7179 (Fns_list_colors): Put () around assignment in while statement.
7180 (Fns_perform_service): Remove unused variable len.
7181 (Fns_display_usable_bounds): Remove unused variable top.
7182 (syms_of_nsfns): Remove unused variable i.
7183
b55b9f85
JD
7184 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
7185 memcpy (Bug#11907).
7186
ed9265fc 71872012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
7188
7189 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
7190 and free it with DestroyExceptionInfo (Bug#11558).
7191
ef099b57
JB
71922012-07-13 Juanma Barranquero <lekktu@gmail.com>
7193
7194 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
7195 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
7196 Set here, not in nt/config.nt.
7197
ea814a5d
EZ
71982012-07-13 Eli Zaretskii <eliz@gnu.org>
7199
7200 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
7201 cursor overflow into the last glyph on display line when the right
7202 fringe is off. (Bug#11832)
7203
1a952767
PE
72042012-07-13 Paul Eggert <eggert@cs.ucla.edu>
7205
7206 * xdisp.c (produce_special_glyphs): Now static.
7207 * dispextern.h (produce_special_glyphs): Remove decl.
7208
983188fd
GM
72092012-07-13 Glenn Morris <rgm@gnu.org>
7210
8d7c7eed 7211 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
7212 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
7213
983188fd
GM
7214 * s/usg5-4-common.h (USG, USG5):
7215 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
7216 * s/sol2-6.h (SOLARIS2):
7217 * s/irix6-5.h (IRIX6_5):
7218 * s/hpux10-20.h (USG, USG5, HPUX):
7219 * s/gnu-linux.h (USG, GNU_LINUX):
7220 * s/freebsd.h (BSD_SYSTEM):
7221 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
7222 * s/cygwin.h (CYGWIN):
7223 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
7224 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
7225
d1e68667 72262012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
7227
7228 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 7229
6de0e799
GM
72302012-07-13 Glenn Morris <rgm@gnu.org>
7231
739ae010
GM
7232 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
7233
dbee5793
GM
7234 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
7235
6de0e799
GM
7236 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
7237 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
7238
b82da769
GM
72392012-07-12 Glenn Morris <rgm@gnu.org>
7240
4fae5a7a 7241 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
7242
7243 * process.c (init_process_emacs): Rename from init_process.
7244 The old name is also the name of a Mach system call.
7245 * lisp.h, emacs.c: Update for this name change.
7246 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
7247 longer needed.
7248
5a979817
EZ
72492012-07-12 Eli Zaretskii <eliz@gnu.org>
7250
7251 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
7252 memmove call that removes glyphs covered by the left truncation
7253 glyph. Improve commentary.
7254 (display_line): Fix display of continuation glyphs on GUI frames
7255 when the right fringe is turned off and variable-size fonts are
7256 used in the window. Move the code that appends a stretch glyph to
7257 produce_special_glyphs, so that it could be used for truncation
7258 and continuation glyphs alike.
7259 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
7260 glyph of a suitably computed width, to align the special glyphs at
7261 the window margin. Code moved from display_line. (Bug#11832)
7262
3e91a053
GM
72632012-07-12 Glenn Morris <rgm@gnu.org>
7264
ba9e4b84
GM
7265 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
7266
7267 * s/gnu-linux.h, s/hpux10-20.h:
7268 Do not unconditionally define HAVE_XRMSETDATABASE.
7269
3e91a053
GM
7270 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
7271
b300b1f4
PE
72722012-07-12 Paul Eggert <eggert@cs.ucla.edu>
7273
7274 Fix typos that broke OS X build.
7275 Reported by Randal L. Schwartz in
7276 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
7277 * nsterm.m (ns_timeout): Add missing local decl.
7278 (ns_get_color): snprintf -> sprintf, to fix typo.
7279
6e777848
GM
72802012-07-12 Glenn Morris <rgm@gnu.org>
7281
3f922c37
GM
7282 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
7283 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
7284 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
7285 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
7286
0ab7b23a
GM
7287 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
7288 Move PTY_OPEN to configure.
7289
6e777848
GM
7290 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7291 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
7292 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
7293
4a7edc24
DA
72942012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
7295
7296 Use empty_unibyte_string where applicable.
7297 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
7298 * lread.c (read1): Likewise.
7299 * xsettings.c (syms_of_xsettings): Likewise.
7300
308aab79
GM
73012012-07-12 Glenn Morris <rgm@gnu.org>
7302
42bd1719
GM
7303 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
7304 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
7305 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
7306 * s/hpux10-20.h (RUN_TIME_REMAP):
7307 * s/bsd-common.h (TABDLY): Move to configure.
7308
7309 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
7310
7311 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
7312
ea0bbd17 7313 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 7314 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
7315
7316 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 7317
308aab79
GM
7318 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
7319 * s/template.h: Move NARROWPROTO to configure.
7320
ee1cf5cf
GM
73212012-07-11 Glenn Morris <rgm@gnu.org>
7322
30fe9bf4
GM
7323 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
7324 unused since 2011-01-17 change to systty.h.
7325
ee1cf5cf
GM
7326 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
7327 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7328 Move HAVE_PTYS and HAVE_SOCKETS to configure.
7329
63e47e07
PE
73302012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7331
7332 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
7333
c43fb4c3
GM
73342012-07-11 Glenn Morris <rgm@gnu.org>
7335
7336 * s/darwin.h, s/gnu-linux.h, s/template.h:
7337 Move INTERRUPT_INPUT to configure.
7338
e8df9267
DA
73392012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7340
7341 Minor adjustments to interning code.
7342 * lisp.h (intern, intern_c_string): Redefine as static inline
7343 wrappers for intern_1 and intern_c_string_1, respectively.
7344 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
7345 * lread.c (intern_1, intern_c_string_1, oblookup):
7346 Simplify Vobarray checking.
e8df9267
DA
7347 * font.c (font_intern_prop): Likewise. Adjust comment.
7348 * w32font.c (intern_font_name): Likewise.
7349
34348bd4
AS
73502012-07-11 Andreas Schwab <schwab@linux-m68k.org>
7351
d96a1e0c
AS
7352 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
7353
34348bd4
AS
7354 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
7355 of Fcar/Fcdr if possible.
7356 * font.c (check_otf_features): Likewise.
7357 * fontset.c (Fnew_fontset): Likewise.
7358 * gnutls.c (Fgnutls_boot): Likewise.
7359 * minibuf.c (read_minibuf): Likewise.
7360 * msdos.c (IT_set_frame_parameters): Likewise.
7361 * xmenu.c (Fx_popup_dialog): Likewise.
7362 * w32menu.c (Fx_popup_dialog): Likewise.
7363
c8add24e
GM
73642012-07-11 Glenn Morris <rgm@gnu.org>
7365
4b575b3c
GM
7366 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
7367 since nothing has defined it on these platforms.
7368
09f4e3b0
GM
7369 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
7370 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
7371
172bedef
GM
7372 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7373 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7374 Move CLASH_DETECTION to configure.
7375
249685df
GM
7376 * s/gnu.h: Remove file, which is now empty.
7377
c8add24e
GM
7378 * s/gnu.h, s/gnu-linux.h:
7379 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
7380
b41253a3
JW
73812012-07-11 John Wiegley <johnw@newartisans.com>
7382
7383 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
7384 function attribute, so we only use it if it exists in the
7385 compiler.
7386
d923b542
DA
73872012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7388
7389 Avoid call to strlen in fast_c_string_match_ignore_case.
7390 * search.c (fast_c_string_match_ignore_case): Change to use
7391 length argument. Adjust users accordingly.
7392 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
7393
5ebbef1d
PE
73942012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7395
bb352260
PE
7396 Assume mkdir, rmdir.
7397 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
7398 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
7399
57054ddd
PE
7400 Assume rename.
7401 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
7402
b747d3f7
PE
7403 Assume perror.
7404 * s/hpux10-20.h (HAVE_PERROR): Remove.
7405 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
7406 Remove dummy definition, as this problem was obsolete long ago.
7407
5ebbef1d
PE
7408 Assume strerror.
7409 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
7410
984e7f30
DA
74112012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7412
7413 Avoid calls to strlen in font processing functions.
7414 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
7415 (font_open_by_name): Change to use length argument.
7416 Adjust users accordingly.
d923b542
DA
7417 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
7418 Adjust prototypes.
7419 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
7420 Change to return ptrdiff_t.
984e7f30
DA
7421 (xfont_list_pattern, xfont_match): Use length returned by
7422 xfont_decode_coding_xlfd.
7423 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
7424
20e94fdd
GM
74252012-07-11 Glenn Morris <rgm@gnu.org>
7426
9d596af3
GM
7427 * s/darwin.h, s/freebsd.h, s/netbsd.h:
7428 Move DONT_REOPEN_PTY to configure.
7429
20e94fdd
GM
7430 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
7431 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
7432
e99a530f
PE
74332012-07-10 Paul Eggert <eggert@cs.ucla.edu>
7434
22ffb973
PE
7435 Remove "#define unix" that is no longer needed (Bug#11905).
7436 * s/aix4-2.h (unix): Remove; no longer needed.
7437
e9a9ae03
PE
7438 EMACS_TIME simplification (Bug#11875).
7439 This replaces macros (which typically do not work in GDB)
7440 with functions, typedefs and enums, making the code easier to debug.
7441 The functional style also makes code easier to read and maintain.
7442 * systime.h: Include <sys/time.h> on all hosts, not just if
7443 WINDOWSNT, since 'struct timeval' is needed in general.
7444 (EMACS_TIME): Now a typedef, not a macro.
7445 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
7446 not macros.
7447 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
7448 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
7449 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
7450 (EMACS_TIME_LE): Now functions, not macros.
7451 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
7452 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
7453 which are not functions. All uses rewritten to use:
7454 (make_emacs_time): New function.
7455 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
7456 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
7457 not functions. All uses rewritten to use the following, respectively:
7458 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
7459 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 7460 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
7461 * fileio.c (Fcopy_file):
7462 * xterm.c (XTflash): Get the current time closer to when it's used.
7463 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
7464
ffacb126
PE
7465 * bytecode.c (targets): Suppress -Woverride-init warnings.
7466
e99a530f
PE
7467 Simplify by avoiding confusing use of strncpy etc.
7468 * doc.c (Fsnarf_documentation):
7469 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
7470 * frame.c (Fmake_terminal_frame):
7471 * gtkutil.c (get_utf8_string):
7472 * lread.c (openp):
7473 * nsmenu.m (ns_update_menubar):
7474 * regex.c (regerror):
7475 Prefer memcpy to strncpy and strncat when either will do.
7476 * fileio.c (Fsubstitute_in_file_name):
7477 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
7478 (menu_separator_name_p):
7479 * nsmenu.m (ns_update_menubar):
7480 Prefer memcmp to strncmp when either will do.
7481 * nsterm.m: Include <ftoastr.h>.
7482 (ns_get_color):
7483 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
7484 Prefer snprintf to strncpy.
7485 * nsterm.m (ns_term_init):
7486 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
7487 * nsterm.m (ns_term_init):
7488 Avoid the need for strncpy, by using build_string or
7489 make_unibyte_string directly. Use dtoastr, not snprintf.
7490 * process.c (Fmake_network_process): Diagnose service names that
7491 are too long, rather than silently truncating them or creating
7492 non-null-terminated names.
7493 (Fnetwork_interface_info): Likewise, for interface names.
7494 * sysdep.c (system_process_attributes) [GNU_LINUX]:
7495 Prefer sprintf to strncat.
7496 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
7497 Prefer vsnprintf to vsprintf + strncpy.
7498
c59592b3
GM
74992012-07-10 Glenn Morris <rgm@gnu.org>
7500
7501 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
7502 Clarify fallback case.
7503
7d7bbefd
DA
75042012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7505
7506 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
7507 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
7508 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 7509 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
7510 where argument type is known to be a Lisp_Cons.
7511
3a4c8000
TT
75122012-07-10 Tom Tromey <tromey@redhat.com>
7513
7514 * bytecode.c (BYTE_CODE_THREADED): New macro.
7515 (BYTE_CODES): New macro. Replaces all old byte-code defines.
7516 (enum byte_code_op): New type.
7517 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
7518 (exec_byte_code): Use them. Use token threading when applicable.
7519
2a0213a6
DA
75202012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7521
7522 Optimize pure C strings initialization.
7523 * lisp.h (make_pure_string): Fix prototype.
7524 (build_pure_c_string): New function, defined as static inline. This
7525 provides a better opportunity to optimize away calls to strlen when
7526 the function is called with compile-time constant argument.
7527 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
7528 argument, adjust users accordingly. Use build_pure_c_string where
7529 appropriate.
7530 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
7531 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
7532 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
7533
cb1caeaf
DA
75342012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7535
7536 Avoid calls to strlen in miscellaneous functions.
7537 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
7538 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
7539 * lread.c (openp): Likewise.
7540
c293e30c
DA
75412012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7542
7543 Avoid calls to strlen in path processing functions.
7544 * fileio.c (file_name_as_directory): Add comment. Change to add
7545 srclen argument and return the length of result. Adjust users
7546 accordingly.
7547 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
7548 swap 1st and 2nd arguments to obey the common convention.
7549 Adjust users accordingly.
c293e30c
DA
7550 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
7551
9e059e3f
GM
75522012-07-10 Glenn Morris <rgm@gnu.org>
7553
d02eb359
GM
7554 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
7555 Move PENDING_OUTPUT_COUNT definition to configure.
7556
882cf227
GM
7557 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
7558 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
7559 * s/gnu.h (DATA_START): Move definitions to configure.
7560
af6e839f
GM
7561 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
7562 We include usg5-4-common.h, which defines them both.
7563
40289a12
GM
7564 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
7565 O_RDONLY already includes it).
7566
9e059e3f
GM
7567 Stop ns builds setting the EMACSLOADPATH environment variable.
7568 * nsterm.m (ns_load_path): Rename from ns_init_paths.
7569 Now it does not set EMACSLOADPATH, just returns the load-path string.
7570 * nsterm.h: Update accordingly.
7571 * lread.c [HAVE_NS]: Include nsterm.h.
7572 (init_lread) [HAVE_NS]: Use ns_load_path.
7573 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
7574
7c4e8ec0
GM
75752012-07-09 Glenn Morris <rgm@gnu.org>
7576
d4f600ff
GM
7577 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
7578 since the included bsd-common.h does so.
7579
cbb31951
GM
7580 Stop ns builds setting the EMACSPATH environment variable.
7581 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
7582 (ns_init_paths): Do not set EMACSPATH.
7583 * nsterm.h (ns_exec_path): Add it.
7584 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
7585 Use ns_exec_path.
7586
7c4e8ec0
GM
7587 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
7588
26bccfae
PE
75892012-07-09 Paul Eggert <eggert@cs.ucla.edu>
7590
a0bee46f
PE
7591 * process.c (wait_reading_process_output): 'waitchannels' was unset
7592 when read_kbd || !NILP (wait_for_cell); fix this.
7593
5994c183
PE
7594 Add GCC-style 'const' attribute to functions that can use it.
7595 * character.h (char_resolve_modifier_mask):
7596 * keyboard.h (make_ctrl_char):
7597 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
7598 (init_character_once, next_almost_prime, init_fns, init_image)
7599 (flush_pending_output, init_sound):
7600 * mem-limits.h (start_of_data):
7601 * menu.h (finish_menu_items):
7602 Add ATTRIBUTE_CONST.
7603 * emacs.c (DEFINE_DUMMY_FUNCTION):
7604 Declare the dummy function with ATTRIBUTE_CONST.
7605 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
7606 Add decls with ATTRIBUTE_CONST.
7607
26bccfae
PE
7608 Minor improvements to make_formatted_string.
7609 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
7610 where int is good enough, as vsprintf returns an int.
7611 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
7612
a8290ec3
DA
76132012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
7614
7615 Use make_formatted_string to avoid double length calculation.
7616 * lisp.h (make_formatted_string): New prototype.
7617 * alloc.c (make_formatted_string): New function.
7618 * buffer.c (Fgenerate_new_buffer_name): Use it.
220cb2bd 7619 * dbusbind.c (syms_of_dbusbind): Likewise.
a8290ec3
DA
7620 * editfns.c (Fcurrent_time_zone): Likewise.
7621 * filelock.c (get_boot_time): Likewise.
7622 * frame.c (make_terminal_frame, set_term_frame_name)
7623 (x_report_frame_params): Likewise.
7624 * image.c (gs_load): Likewise.
7625 * minibuf.c (get_minibuffer): Likewise.
7626 * msdos.c (dos_set_window_size): Likewise.
7627 * process.c (make_process): Likewise.
7628 * xdisp.c (ensure_echo_area_buffers): Likewise.
7629 * xsettings.c (apply_xft_settings): Likewise.
7630
d01ba2f1
GM
76312012-07-09 Glenn Morris <rgm@gnu.org>
7632
7633 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
7634 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
7635 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
7636 * nsterm.h (ns_etc_directory): Add it.
7637 * callproc.c [HAVE_NS]: Include nsterm.h.
7638 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
7639
f1f924b6
DA
76402012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
7641
7642 Move marker debugging code under MARKER_DEBUG.
7643 * marker.c (MARKER_DEBUG): Move marker debugging code under
7644 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
7645 for bootstrap with --enable-checking (~3x slowdown reported
7646 by Juanma Barranquero <lekktu@gmail.com>).
7647 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
7648
ab531b66
PE
76492012-07-08 Paul Eggert <eggert@cs.ucla.edu>
7650
7651 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
7652 See <http://bugs.gnu.org/11825#29>.
7653
c4b3bc8a
EZ
76542012-07-08 Eli Zaretskii <eliz@gnu.org>
7655
7656 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
7657 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
7658 (display_line): Add commentary about displaying truncation glyphs
7659 on GUI frames.
7660 (produce_special_glyphs): Move here from term.c.
7661
7662 * term.c (produce_special_glyphs): Move to xdisp.c.
7663
7664 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
7665 section.
c4b3bc8a 7666
b676b881
AS
76672012-07-07 Andreas Schwab <schwab@linux-m68k.org>
7668
f17c5273
AS
7669 * xdisp.c (display_line): Avoid warning about implicit declaration
7670 of FRAME_FONT.
7671
298819b9
AS
7672 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
7673
b676b881
AS
7674 * lisp.h: Remove empty conditional.
7675
6045c4fd
PE
76762012-07-07 Paul Eggert <eggert@cs.ucla.edu>
7677
b3350bf9
PE
7678 * lread.c (load_path_check): Now static.
7679
6045c4fd
PE
7680 Fix some minor --with-ns problems found by static checking.
7681 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
7682 (x_set_font) [!HAVE_X_WINDOWS]:
7683 * image.c (xpm_load_image) [HAVE_NS]:
7684 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
7685 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
7686 Remove unused local.
7687 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
7688 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
7689 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
7690 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
7691 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
7692 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
7693 Fix pointer signedness problem.
7694 * xfaces.c (FRAME_X_FONT_TABLE):
7695 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
7696
929e7845
GM
76972012-07-07 Glenn Morris <rgm@gnu.org>
7698
7699 * lread.c (load_path_check): New function, split from init_lread.
7700 (init_lread): Reorganize. Motivation:
7701 If EMACSLOADPATH is set, check/warn about that rather than the
7702 defaults, which we are not going to use. Hence we can remove
7703 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
7704 Don't warn if site-lisp directories are missing.
7705 If not installed, start from a blank load-path, since
7706 PATH_LOADSEARCH refers to the eventual installation directories.
7707
58dd0aa4
EZ
77082012-07-07 Eli Zaretskii <eliz@gnu.org>
7709
7710 Support truncation and continuation glyphs on GUI frames, when
7711 fringes are disabled. (Bug#11832)
7712 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
7713 continuation glyphs even if on GUI frames.
7714 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
7715 or both, are absent.
7716 (start_display, move_it_in_display_line_to): Handle the case of a
7717 GUI frame without a fringe to display continuation or truncation
7718 glyphs.
7719 (insert_left_trunc_glyphs): Support GUI frames: make sure
7720 truncation glyphs overwrite enough glyphs from the current line to
7721 have sufficient space in pixels.
7722 (display_line): Support truncation and continuation glyphs on GUI
7723 frames. If some spare pixels are left on the line after inserting
7724 the truncation glyphs, fill that space with a stretch glyph of a
7725 suitably computed width.
7726
7727 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
7728 produce_glyphs, to support GUI sessions.
7729
31571fd7
PE
77302012-07-07 Paul Eggert <eggert@cs.ucla.edu>
7731
5a16b9bc
PE
7732 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
7733
f3047c75
PE
7734 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
7735
31571fd7
PE
7736 Do not require float-time's arg to fit in time_t (Bug#11825).
7737 This works better on hosts where time_t is unsigned, and where
7738 float-time is applied to the (negative) difference between two times.
7739 * editfns.c (decode_time_components): Last arg is now double *,
7740 not int *, and means to store all the result as a double, without
7741 worrying about whether the seconds part fits in time_t.
7742 All callers changed.
7743 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
7744 All callers changed.
7745 (Ffloat_time): Do not fail merely because the specified time falls
7746 outside of time_t range.
7747
4516fbef
GM
77482012-07-07 Glenn Morris <rgm@gnu.org>
7749
7750 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
7751 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
7752 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
7753
07adc2c6
JB
77542012-07-07 Juanma Barranquero <lekktu@gmail.com>
7755
7756 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
7757 Update dependencies.
7758
7759 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
7760
fd573f31
PE
77612012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7762
fee5959d
PE
7763 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
7764 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
7765 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
7766 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
7767 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
7768 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
7769
fd573f31
PE
7770 * xfont.c (compare_font_names): Redo to omit the need for casts.
7771
ddadbc0e
AS
77722012-07-06 Andreas Schwab <schwab@linux-m68k.org>
7773
fca8d6b6
AS
7774 * xfns.c (Fx_change_window_property): Doc fix.
7775 * w32fns.c (Fx_change_window_property): Doc fix.
7776
ddadbc0e
AS
7777 * w32fns.c (Fx_window_property): Accept the same arguments as the
7778 X Windows version. Doc fix.
7779 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
7780
ed9265fc 77812012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
7782 Eli Zaretskii <eliz@gnu.org>
7783
7784 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
7785 Windows-specific code from nt/config.nt moved here.
7786 Obsolete settings removed.
7787
216ee680
PE
77882012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7789
7790 * process.c: Avoid unnecessary calls to gettime.
7791 (wait_reading_process_output): Don't get the time of day
7792 when gobbling data immediately and not waiting, as there's no need
7793 for it in that case. This removes a FIXME.
7794
bdd091e4
JD
77952012-07-06 Jan Djärv <jan.h.d@swipnet.se>
7796
7797 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
7798 is defined (Bug#11768).
7799
9d44f8ce
DA
78002012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7801
7802 Fix marker debugging code.
7803 * marker.c (byte_char_debug_check): Do not perform the check
7804 if buffer is not multibyte.
090bd7cb
JB
7805 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
7806 Call byte_char_debug_check with correct arguments.
9d44f8ce 7807
90fc4786
DA
78082012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7809
7810 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
7811 * marker.c (byte_char_debug_check, count_markers):
7812 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
7813 (byte_debug_flag): Remove.
7814 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
7815 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
7816
7b7ae965
DA
78172012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7818
4e57b342
DA
7819 Avoid code repetition in marker-related functions.
7820 * marker.c (attach_marker): New function.
7821 (Fset_marker, set_marker_restricted, set_marker_both)
7822 (set_marker_restricted_both): Use it.
7823 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
7824 Consistently rename charno to charpos.
7825 (marker_position): Add eassert.
7826 (marker_byte_position): Convert to eassert.
7827
78282012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7829
7830 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 7831 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 7832 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 7833
657924ff
DA
78342012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7835
7836 Introduce fast path for the widely used marker operation.
7837 * alloc.c (build_marker): New function.
7838 * lisp.h (build_marker): New prototype.
7839 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
7840 * composite.c (autocmp_chars): Likewise.
7841 * editfns.c (buildmark): Remove.
7842 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
7843 (save_restriction_save): Use build_marker.
7844 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
7845 * window.c (save_window_save): Likewise.
7846
041a49a6
DA
78472012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7848
7849 Do not use Fdelete_overlay in delete_all_overlays
7850 to avoid redundant calls to unchain_overlay.
7851 * buffer.c (drop_overlay): New function.
7852 (delete_all_overlays, Fdelete_overlay): Use it.
7853 * minibuf.c (get_minibuffer): Fix comment.
7854
7dca65a4
PE
78552012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7856
7857 Port to OpenBSD 5.1 amd64.
7858 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
7859 This is needed for OpenBSD, and should be harmless on all BSD systems.
7860 Also, include <sys/sysctl.h>, as it should be available on all
7861 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
7862 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
7863 use p_pid member, not kp_proc.pid.
7864
8eb876e2
GM
78652012-07-06 Glenn Morris <rgm@gnu.org>
7866
7867 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
7868
38182d90
PE
78692012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7870
7871 More xmalloc and related cleanup.
7872 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
7873 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
7874 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
7875 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
7876 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
7877 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
7878 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
7879 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
7880 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
7881 * xterm.c:
7882 Omit needless casts involving void * pointers and allocation.
7883 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
7884 as the former is more robust if P's type is changed.
7885 Prefer xzalloc to xmalloc + memset 0.
7886 Simplify malloc-or-realloc to realloc.
7887 Don't worry about xmalloc returning a null pointer.
7888 Prefer xstrdup to xmalloc + strcpy.
7889 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
7890 growing it.
7891 * keyboard.c (apply_modifiers_uncached): Prefer local array to
7892 alloca of a constant.
7893
6dd5a677
EZ
78942012-07-05 Eli Zaretskii <eliz@gnu.org>
7895
7896 * xdisp.c (display_line): Fix horizontal pixel coordinates when
7897 hscroll is larger than the line width. Fixes long and futile
7898 looping inside extend_face_to_end_of_line (on a TTY) producing
7899 glyphs that are not needed and thrown away.
7900
6b312f0f
DA
79012012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
7902
7903 * marker.c (set_marker_restricted_both): Simplify by using
7904 clip_to_bounds.
7905
f520ef9b
PE
79062012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7907
7908 * editfns.c (region_limit): Simplify by using clip_to_bounds.
7909
383b7c95
JD
79102012-07-05 Jan Djärv <jan.h.d@swipnet.se>
7911
7912 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
7913 not defined (Bug#11768).
7914 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
7915 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
7916 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
7917 followed by gtk_box_set_homogeneous (Bug#11768).
7918 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
7919 (update_theme_scrollbar_width, xg_create_scroll_bar):
7920 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
7921 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
7922 (is_box_type): New function (Bug#11768).
7923 (xg_tool_item_stale_p): Call is_box_type.
5293d758 7924 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
7925 with default display (Bug#11768).
7926
d6e7bf45
EZ
79272012-07-05 Eli Zaretskii <eliz@gnu.org>
7928
7929 * xdisp.c (window_hscroll_limited): New function.
7930 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
7931 coordinates when window's hscroll is set to insanely large
7932 values. (Bug#11857)
7933
431391ec
JB
79342012-07-05 Juanma Barranquero <lekktu@gmail.com>
7935
7936 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
7937 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
7938
23f86fce
DA
79392012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
7940
7941 Cleanup xmalloc.
7942 * lisp.h (xzalloc): New prototype. Omit needless casts.
7943 * alloc.c (xzalloc): New function. Omit needless casts.
7944 * charset.c: Omit needless casts. Convert all calls to
7945 xmalloc with following memset to xzalloc.
7946 * dispnew.c: Likewise.
7947 * fringe.c: Likewise.
7948 * image.c: Likewise.
7949 * sound.c: Likewise.
7950 * term.c: Likewise.
7951 * w32fns.c: Likewise.
7952 * w32font.c: Likewise.
7953 * w32term.c: Likewise.
7954 * xfaces.c: Likewise.
7955 * xfns.c: Likewise.
7956 * xterm.c: Likewise.
7957 * atimer.c: Omit needless casts.
7958 * buffer.c: Likewise.
7959 * callproc.c: Likewise.
7960 * ccl.c: Likewise.
7961 * coding.c: Likewise.
7962 * composite.c: Likewise.
7963 * doc.c: Likewise.
7964 * doprnt.c: Likewise.
7965 * editfns.c: Likewise.
7966 * emacs.c: Likewise.
7967 * eval.c: Likewise.
7968 * filelock.c: Likewise.
7969 * fns.c: Likewise.
7970 * gtkutil.c: Likewise.
7971 * keyboard.c: Likewise.
7972 * lisp.h: Likewise.
7973 * lread.c: Likewise.
7974 * minibuf.c: Likewise.
7975 * msdos.c: Likewise.
7976 * print.c: Likewise.
7977 * process.c: Likewise.
7978 * region-cache.c: Likewise.
7979 * search.c: Likewise.
7980 * sysdep.c: Likewise.
7981 * termcap.c: Likewise.
7982 * terminal.c: Likewise.
7983 * tparam.c: Likewise.
7984 * w16select.c: Likewise.
7985 * w32.c: Likewise.
7986 * w32reg.c: Likewise.
7987 * w32select.c: Likewise.
7988 * w32uniscribe.c: Likewise.
7989 * widget.c: Likewise.
7990 * xdisp.c: Likewise.
7991 * xmenu.c: Likewise.
7992 * xrdb.c: Likewise.
7993 * xselect.c: Likewise.
7994
0497dc44
PE
79952012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7996
7997 * fileio.c (time_error_value): Check the right error number.
7998 Problem reported by Troels Nielsen in
7999 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
8000
356e7178
PE
80012012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8002
4e71fd89
PE
8003 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
8004 This should be fixed in a better way; see Eli Zaretskii in
8005 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
8006 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
8007
f0941253
PE
8008 * fileio.c (time_error_value): Rename from special_mtime.
8009 The old name's problems were noted by Eli Zaretskii in
8010 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
8011
065c9eb4
PE
8012 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
8013 This variable's comment says Emacs needs at least one GDB-visible
8014 symbol of type enum pvec_type, to work around GDB problems.
8015 The symbol's value doesn't matter.
8016
356e7178
PE
8017 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
8018 that causes compilation to fail on pre-C99 compilers.
8019
ed9265fc 80202012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
8021
8022 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
8023 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
8024
3884d954
DA
80252012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8026
d209e2fb 8027 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
8028 headers for buffer_defaults and buffer_local_symbols.
8029 Reported by Juanma Barranquero <lekktu@gmail.com>.
8030
ee28be33
SM
80312012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
8032
8033 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
8034 * lisp.h (enum pvec_type): Use fewer bits.
8035 (PSEUDOVECTOR_SIZE_BITS): New constant.
8036 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
8037 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
8038 change in pvec_type.
8039 (PSEUDOVECTOR_TYPEP): New macro.
8040 (TYPED_PSEUDOVECTORP): Use it.
8041 * fns.c (internal_equal): Adapt code to extract pvectype.
8042 * emacs.c (gdb_pvec_type): Update type.
8043 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
8044 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
8045 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
8046 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
8047 (sweep_vectors): Use it. Use local var `total_bytes' instead of
8048 abusing vector->header.next.nbytes.
8049 (live_vector_p): Use PVEC_TYPE.
8050 (mark_object): Adapt code to extract pvectype. Use switch.
8051
c7f2cd7f
PE
80522012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8053
8054 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
8055 Tighten new eassert a bit.
8056
8ce70ed2
DA
80572012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8058
8059 Fix compilation with --enable-gcc-warnings and -O1
8060 optimization level.
8061 * doprnt.c (doprnt): Change type of tem to int, initialize
8062 to avoid compiler warning. Add eassert.
8063 * search.c (simple_search): Initialize match_byte to avoid
8064 compiler warning. Add eassert.
8065
dea7f1e5
PE
80662012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8067
24a212eb
PE
8068 Avoid weird behavior with large horizontal scrolls.
8069 Without this change, for example, large hscroll values would
8070 mess up Emacs's display on Fedora 15 x86, presumably due to
8071 overflows in int calculations in the display code.
8072 Also, if buffers had long lines, Emacs would freeze.
8073 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
8074 (set_window_hscroll): New function, containing the old guts of
8075 Fset_window_hscroll. Return the clipped value.
8076 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
8077 This avoids the need to check against PTRDIFF_MAX.
8078
dea7f1e5
PE
8079 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
8080
76046526
DA
80812012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
8082
8083 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
8084
39adff0d
PE
80852012-07-04 Paul Eggert <eggert@cs.ucla.edu>
8086
63807d47
PE
8087 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
8088 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
8089 since GCC 4.4.6 issues a bogus warning for them.
8090
39adff0d
PE
8091 Fix bugs in file timestamp newness comparisons.
8092 * fileio.c (Ffile_newer_than_file_p):
8093 * lread.c (Fload): Use full timestamp resolution of files,
8094 not just the 1-second resolution, so that files that are only
8095 slightly newer still count as newer.
8096 * fileio.c (Ffile_newer_than_file_p): Don't assume file
8097 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
8098
dbeed9a6
PE
80992012-07-03 Paul Eggert <eggert@cs.ucla.edu>
8100
8101 * fileio.c: Improve handling of file time marker. (Bug#11852)
8102 (special_mtime): New function.
8103 (Finsert_file_contents, Fverify_visited_file_modtime):
8104 Use it to set special mtime values consistently.
8105
636334d6
AS
81062012-07-03 Andreas Schwab <schwab@linux-m68k.org>
8107
8108 * fileio.c (Finsert_file_contents): Properly handle st_mtime
8109 marker for non-existing file. (Bug#11852)
8110
e2017fe2
GM
81112012-07-03 Glenn Morris <rgm@gnu.org>
8112
8113 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
8114 and did not make it into globals.h).
8115
404dbd37
TT
81162012-07-03 Tom Tromey <tromey@redhat.com>
8117
8118 * window.c (Fset_window_margins, Fset_window_fringes)
8119 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
8120 * textprop.c (Fprevious_property_change): No longer static.
8121 * syntax.c (Fsyntax_table_p): No longer static.
8122 * process.c (Fget_process, Fprocess_datagram_address): No longer
8123 static.
8124 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
8125 * keyboard.c (Fcommand_execute): No longer static.
8126 Remove EXFUN.
8127 * insdel.c (Fcombine_after_change_execute): No longer static.
8128 * image.c (Finit_image_library): No longer static.
8129 * fileio.c (Fmake_symbolic_link): No longer static.
8130 * eval.c (Ffetch_bytecode): No longer static.
8131 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
8132 * doc.c (Fdocumentation_property, Fsnarf_documentation):
8133 No longer static.
404dbd37
TT
8134 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
8135 static.
8136 * dired.c (Ffile_attributes): No longer static.
8137 * composite.c (Fcomposition_get_gstring): No longer static.
8138 * callproc.c (Fgetenv_internal): No longer static.
8139
8140 * ccl.h: Remove EXFUNs.
8141 * buffer.h: Remove EXFUNs.
8142 * dispextern.h: Remove EXFUNs.
8143 * intervals.h: Remove EXFUNs.
8144 * fontset.h: Remove EXFUN.
8145 * font.h: Remove EXFUNs.
8146 * dosfns.c (system_process_attributes): Remove EXFUN.
8147 * keymap.h: Remove EXFUNs.
8148 * lisp.h: Remove EXFUNs.
8149 * w32term.h: Remove EXFUNs.
8150 * window.h: Remove EXFUNs.
8151 * xsettings.h: Remove EXFUN.
8152 * xterm.h: Remove EXFUN.
8153
8e4fd1e1
GM
81542012-07-03 Glenn Morris <rgm@gnu.org>
8155
8156 * lisp.h (Frandom): Make it visible to C.
8157 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
8158 buffer for invisible buffers. (Bug#1229)
8159
ca95b3eb
DA
81602012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8161
8162 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
8163 values which aren't power of 2.
14ae4239 8164 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
1f9f395d 8165 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
8166 accordingly.
8167
7555c33f
SM
81682012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
8169
8170 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
8171
8172 * alloc.c (mark_object): Revert part of last patch to use `switch'.
8173
d12e8f5a
DA
81742012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8175
8176 * alloc.c (allocate_vector_block): Remove redundant
8177 calls to mallopt if DOUG_LEA_MALLOC is defined.
8178 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
8179 avoid calls to mallopt if zero_vector is returned.
8180
296094c3
DA
81812012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8182
8183 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
8184 is enabled, avoid dereferencing NULL current_sblock if
8185 running undumped.
8186
36429c89
DA
81872012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8188
8189 Cleanup basic buffer management.
8190 * buffer.h (struct buffer): Change layout to use generic vector
8191 marking code. Fix some comments. Change type of 'clip_changed'
8192 to bitfield. Remove unused #ifndef old.
8193 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
8194 (GET_OVERLAYS_AT): Fix indentation.
8195 (for_each_per_buffer_object_at): New macro.
8196 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
8197 (Fbuffer_local_variables): Use it.
8198 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
8199 * alloc.c (allocate_buffer): Adjust to match new layout of
8200 struct buffer. Fix comment.
8201 (mark_overlay): New function.
8202 (mark_buffer): Use it. Use mark_vectorlike to mark normal
8203 Lisp area of struct buffer.
8204 (mark_object): Use it. Adjust marking of misc objects
8205 and related comments.
8206
3b3e4cac
PE
82072012-07-02 Paul Eggert <eggert@cs.ucla.edu>
8208
8209 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
8210 wrapper that is not needed because the wrapped code is a no-op (zero
8211 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
8212 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
8213
cf5c0175
DA
82142012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
8215
8216 * alloc.c (mark_buffer): Simplify. Remove prototype.
8217 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 8218 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
8219 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
8220 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 8221
ca26824c
GM
82222012-06-30 Glenn Morris <rgm@gnu.org>
8223
2e4c5312
GM
8224 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
8225
ca26824c
GM
8226 * epaths.in (PATH_SITELOADSEARCH): New.
8227 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
8228 This is rather than relying on --enable-locallisppath elements
8229 having "site-lisp" in their names. (Bug#10208#25, 11658)
8230
0d23c240
EZ
82312012-06-30 Eli Zaretskii <eliz@gnu.org>
8232
c9240d7a
EZ
8233 * w32proc.c (sys_select): Accept and ignore one more argument.
8234
8235 * w32.c (emacs_gnutls_pull): Call select with one more argument.
8236
0d23c240 8237 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 8238 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
8239
8240 * sysdep.c: Don't include dos.h and dosfns.h.
8241
8242 * process.c (sys_select):
8243 * msdos.c (sys_select): Accept one more argument and ignore it.
8244
8245 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
8246 adapt data types and code to that.
8247
8248 * dosfns.c:
8249 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
8250 which clashes with the gnulib function of the same name.
8251
af5a5a98
AS
82522012-06-30 Andreas Schwab <schwab@linux-m68k.org>
8253
c5e4379c
AS
8254 * font.c (font_style_to_value, font_style_symbolic)
8255 (font_prop_validate_style): Add type checks for values in
8256 font_style_table.
8257
af5a5a98
AS
8258 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
8259 argument.
8260 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
8261 uses.
8262
8d38f461
EZ
82632012-06-29 Eli Zaretskii <eliz@gnu.org>
8264
2e5a6631
EZ
8265 * xdisp.c (try_window_id): Undo last change.
8266
8d38f461
EZ
8267 * w32.c (getwd): Adjust commentary about startup_dir.
8268 (init_environment): Always call sys_access, even in non-MSVC
8269 builds. Don't chdir to the directory of the Emacs executable.
8270 This undoes code from 1997 which was justified by the need to
8271 "avoid conflicts when removing and renaming directories". But its
8272 downside was that every relative file name was being interpreted
8273 relative to the directory of the Emacs executable, which can never
8274 be TRT. In particular, it broke sys_access when called with
8275 relative file names.
8276 (sys_access): Map GetLastError to errno.
8277
2af3565e
DA
82782012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8279
8280 * window.h (struct window): Change type of 'fringes_outside_margins'
8281 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 8282 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
8283 Adjust comment.
8284 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
8285 to ptrdiff_t.
8286
c8d3a25c 82872012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 8288
c8d3a25c
GM
8289 * gnutls.c (emacs_gnutls_handshake):
8290 Add QUIT to make the loop interruptible.
57570cd3 8291
c8d3a25c 82922012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 8293
c8d3a25c
GM
8294 * charset.c (init_charset): Make lack of etc/charsets fatal.
8295
3e984ee8
DA
82962012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8297
8298 * editfns.c (region_limit): Fix type mismatch.
8299
ef884f23
DA
83002012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8301
8302 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
8303 undefined. Convert from xassert to eassert.
8304 * nsmenu.m: Convert from xassert to eassert.
8305 * nsterm.m: Likewise.
8306
7d7e0027
SM
83072012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
8308
8309 * editfns.c (region_limit): Clip to narrowing (bug#11770).
8310
aa754e6a
PE
83112012-06-28 Paul Eggert <eggert@cs.ucla.edu>
8312
8313 Avoid integer overflow on scroll-left and scroll-right.
8314 * window.c (HSCROLL_MAX): New macro.
8315 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
8316 overflow when requested scroll falls outside ptrdiff_t range.
8317
80b00b08
DA
83182012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8319
8320 * window.h (struct window): Change type of 'hscroll',
8321 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
8322 'last_modified' and 'last_overlay_modified' to EMACS_INT.
8323 Adjust users accordingly.
8324 * xdisp.c (try_cursor_movement): Replace type check with eassert.
8325 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
8326 from EMACS_INT to ptrdiff_t.
8327 (make_window): Omit redundant initialization.
8328
62b2bcf6
JB
83292012-06-28 Juanma Barranquero <lekktu@gmail.com>
8330
8331 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
8332
45942c7d
DA
83332012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8334
8335 * window.h (struct window): Change type of 'use_time' and
8336 'sequence_number' from Lisp_Object to int.
8337 * frame.c (make_frame): Adjust users accordingly.
8338 * print.c (print_object): Likewise.
8339 * window.c (select_window, Fwindow_use_time, make_parent_window)
8340 (make_window): Likewise.
8341
e509cfa6
DA
83422012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8343
8344 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
8345 enabled with --enable-checking=[all,glyphs] configure option.
8346 Fix GLYPH_DEBUG usage assuming that it may be undefined,
8347 adjust comments accordingly.
8348 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
8349 undefined, adjust comments accordingly.
8350 * image.c: Likewise.
8351 * scroll.c: Likewise.
8352 * w32fns.c: Likewise.
8353 * w32term.c: Likewise.
8354 * xdisp.c: Likewise.
8355 * xfaces.c: Likewise.
8356 * xfns.c: Likewise.
8357 * xterm.c: Likewise.
8358
a54e2c05
DA
83592012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8360
8361 Generalize run-time debugging checks.
8362 * dispextern.h (XASSERTS): Remove.
8363 * fontset.c (xassert): Remove.
8364 Convert from xassert to eassert.
8365 * alloc.c: Convert from xassert to eassert.
8366 * bidi.c: Likewise.
8367 * dispnew.c: Likewise.
8368 * fns.c: Likewise.
8369 * fringe.c: Likewise.
8370 * ftfont.c: Likewise.
8371 * gtkutil.c: Likewise.
8372 * image.c: Likewise.
8373 * keyboard.c: Likewise.
8374 * menu.c: Likewise.
8375 * process.c: Likewise.
8376 * scroll.c: Likewise.
8377 * sound.c: Likewise.
8378 * term.c: Likewise.
8379 * w32console.c: Likewise.
8380 * w32fns.c: Likewise.
8381 * w32term.c: Likewise.
8382 * window.c: Likewise.
8383 * xdisp.c: Likewise.
8384 * xfaces.c: Likewise.
8385 * xfns.c: Likewise.
8386 * xselect.c: Likewise.
8387 * xterm.c: Likewise.
8388
1ec4b7b2
SM
83892012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
8390
8391 * fns.c (maybe_resize_hash_table): Output message when growing the
8392 purify-hashtable.
8393
2014308a
DA
83942012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8395
8396 * alloc.c (allocate_string_data): Remove dead code.
8397 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
8398 avoid GCC warning about unused macro.
8399
246155eb
DA
84002012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8401
8402 * alloc.c (allocate_string): Omit intervals initialization.
8403 * alloc.c (make_uninit_multibyte_string): Initialize intervals
8404 as in make_pure_string and make_pure_c_string.
8405
43184b7b
DA
84062012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8407
d209e2fb 8408 * alloc.c (allocate_string): Fix last change.
43184b7b 8409
3fe6dd74
DA
84102012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8411
d209e2fb 8412 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
8413 to memset, add explicit initialization where appropriate.
8414
1ba6038a
GM
84152012-06-27 Glenn Morris <rgm@gnu.org>
8416
8417 * lisp.mk (lisp): Remove paths.elc.
8418
c89926a5
CY
84192012-06-27 Chong Yidong <cyd@gnu.org>
8420
8421 * doc.c (Fsubstitute_command_keys): Fix punctuation.
8422
ed6b3510
JW
84232012-06-26 John Wiegley <johnw@newartisans.com>
8424
1ec4b7b2 8425 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
8426 on Mac OS X Lion: __mod_init_func and __mod_term_func.
8427
ed6b3510
JW
8428 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
8429 when building with Clang.
8430
8edd4a2b
SM
84312012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
8432
8433 * eval.c (Fapply): Allow calling it with a single argument.
8434
f6f62d1b
EZ
84352012-06-26 Eli Zaretskii <eliz@gnu.org>
8436
8437 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
8438 _stricmp and _strnicmp.
8439 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
8440
62efea5e
DA
84412012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8442
8443 * alloc.c (allocate_window): Zero out non-Lisp part of newly
8444 allocated window.
8445 (allocate_process): Likewise for new process.
8edd4a2b 8446 (allocate_terminal): Change to use offsetof.
62efea5e
DA
8447 (allocate_frame): Likewise.
8448 * frame.c (make_frame): Omit redundant initialization.
8449 * window.c (make_parent_window): Use memset.
8450 (make_window): Omit redundant initialization.
8451 * process.c (make_process): Omit redundant initialization.
8452 * terminal.c (create_terminal): Likewise.
8453
42997f4d
DA
84542012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8455
8456 * term.c (delete_tty): Remove redundant call to memset.
8457
1130ecfc
DA
84582012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8459
8460 * alloc.c: Remove build_string.
8461 * lisp.h: Define build_string as static inline. This provides
8462 a better opportunity to optimize away calls to strlen when the
8463 function is called with compile-time constant argument.
8464 * image.c (imagemagick_error): Convert to build_string.
8465 * w32proc.c (sys_spawnve): Likewise.
8466 * xterm.c (x_term_init): Likewise.
8467
cf38a720
PE
84682012-06-26 Paul Eggert <eggert@cs.ucla.edu>
8469
99027bdd
PE
8470 Use sprintf return value instead of invoking strlen on result.
8471 In the old days this wasn't portable, since some sprintf
8472 implementations returned char *. But they died out years ago and
8473 Emacs already assumes sprintf returns int.
8474 Similarly for float_to_string.
8475 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
8476 * ccl.c (ccl_driver):
8477 * character.c (string_escape_byte8):
8478 * data.c (Fnumber_to_string):
8479 * doprnt.c (doprnt):
8480 * print.c (print_object):
8481 * xdisp.c (message_dolog):
8482 * xfns.c (syms_of_xfns):
8483 Use sprintf or float_to_string result to avoid need to call strlen.
8484 * data.c (Fnumber_to_string):
8485 Use make_unibyte_string, since the string must be ASCII.
8486 * lisp.h, print.c (float_to_string): Now returns int length.
8487 * term.c (produce_glyphless_glyph):
8488 Use sprintf result rather than recomputing it.
8489
cf38a720
PE
8490 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
8491 * Makefile.in (ALL_CFLAGS):
8492 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
8493 * gmalloc.c, regex.c: Include <config.h> unconditionally.
8494
3511c784
DA
84952012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8496
0a08eb21 8497 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
8498 strcasecmp if available.
8499 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
8500
fb7da12e
AS
85012012-06-25 Andreas Schwab <schwab@linux-m68k.org>
8502
8503 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
8504 Avoid comma operator.
8505 * menu.c (push_submenu_start, push_submenu_end)
8506 (push_left_right_boundary, push_menu_pane): Likewise.
8507 * msdos.c (dos_rawgetc): Likewise.
8508
afa2ffd8
DA
85092012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8510
8511 * xfns.c (xic_create_fontsetname): Remove redundant calls
8512 to memset.
8513
b3b4476b
PE
85142012-06-25 Paul Eggert <eggert@cs.ucla.edu>
8515
4495ff38
PE
8516 * gtkutil.c (get_utf8_string): Remove redundant assignment.
8517 sprintf already null-terminates its output.
8518
b3b4476b
PE
8519 * xfns.c (x_window): Remove redundant cast.
8520
b00876c9
DA
85212012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8522
8523 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
8524 `const char *' to `char *' to avoid compiler warning.
8525
d188e26b
PE
85262012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8527
885d1d74
PE
8528 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
8529 instead of truncating it to 63 (admittedly a generous limit).
8530
d188e26b
PE
8531 * process.c: Fix spelling and caps in comments.
8532
e2f560b1
DN
85332012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
8534
e86db54b 8535 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
8536 * sysdep.c (setpgrp): Remove definition, not used in this file.
8537
7583a3a1
JB
85382012-06-24 Juanma Barranquero <lekktu@gmail.com>
8539
8540 * makefile.w32-in: Update dependencies.
8541
696056c2
EZ
85422012-06-24 Eli Zaretskii <eliz@gnu.org>
8543
8544 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
8545 (SYSTIME_H): Add nt/inc/sys/time.h.
8546
8547 * systime.h [WINDOWSNT]: Include sys/time.h.
8548
8549 * s/ms-w32.h (struct timespec): Definition moved from
8550 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
8551
845ca893
PE
85522012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8553
8554 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
8555 * buffer.h (buffer_slot_type_mismatch):
8556 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8557 * eval.c (unwind_to_catch):
8558 * image.c (my_png_error, my_error_exit):
8559 * keyboard.c (quit_throw_to_read_char, user_error)
8560 (Fexit_recursive_edit, Fabort_recursive_edit):
8561 * lisp.h (die, args_out_of_range, args_out_of_range_3)
8562 (wrong_type_argument, buffer_overflow, __executable_start)
8563 (memory_full, buffer_memory_full, string_overflow, Fthrow)
8564 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
8565 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
8566 (fatal):
8567 (child_setup) [!DOS_NT]:
8568 * lread.c (end_of_file_error, invalid_syntax):
8569 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8570 * puresize.h (pure_write_error):
8571 * search.c (matcher_overflow):
8572 * sound.c (sound_perror, alsa_sound_perror):
8573 * sysdep.c, syssignal.h (croak):
8574 * term.c (maybe_fatal, vfatal):
8575 * textprop.c (text_read_only):
8576 * undo.c (user_error):
8577 * unexmacosx.c (unexec_error):
8578 * xterm.c (x_ins_del_lines, x_delete_glyphs):
8579 Use _Noreturn rather than NO_RETURN.
8580 No need for separate decl merely because of _Noreturn.
8581 * sound.c (sound_warning, parse_sound):
8582 Remove unnecessary forward decls.
8583
f1dd8073
PE
85842012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8585
8586 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
8587 * lisp.h (WAIT_READING_MAX): New macro.
8588 * dispnew.c (Fsleep_for, sit_for):
8589 * keyboard.c (kbd_buffer_get_event):
8590 * process.c (Faccept_process_output):
8591 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
8592 This improves on the previous patch, which introduced a bug
8593 when time_t is unsigned and as wide as intmax_t.
8594 See <http://bugs.gnu.org/9000#51>.
8595
b82c1755
EZ
85962012-06-23 Eli Zaretskii <eliz@gnu.org>
8597
8598 * dispnew.c (sit_for, Fsleep_for):
8599 * keyboard.c (kbd_buffer_get_event):
8600 * process.c (Faccept_process_output): Avoid compiler warnings when
8601 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
8602
ca300656
JB
86032012-06-23 Juanma Barranquero <lekktu@gmail.com>
8604
049ec95b
JB
8605 * makefile.w32-in: Update dependencies.
8606
ca300656
JB
8607 * w32.c (ltime): Add return type and declare static.
8608 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
8609
db7b8d06
PE
86102012-06-23 Paul Eggert <eggert@cs.ucla.edu>
8611
8612 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
8613 Privately reported by Herbert J. Skuhra.
8614 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
8615 All uses changed.
8616 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
8617 not make_lisp_timeval, when the argument is of type EMACS_TIME.
8618
0bd8297f
EZ
86192012-06-23 Eli Zaretskii <eliz@gnu.org>
8620
96512555
EZ
8621 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
8622 last argument of make_unibyte_string.
8623
0bd8297f
EZ
8624 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
8625 language ID in the event parameters.
8626
8627 * w32term.c (w32_read_socket): Put the new keyboard codepage into
8628 event.code, not the obscure "character set ID".
8629
63def6b6
CY
86302012-06-23 Chong Yidong <cyd@gnu.org>
8631
8632 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
8633
e8a02204
EZ
86342012-06-23 Eli Zaretskii <eliz@gnu.org>
8635
388cdec0
EZ
8636 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
8637 * w32.c (fdutimens): New function.
8638
8639 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
8640
8641 * s/ms-w32.h (pselect): Redirect to sys_select.
8642
8643 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
8644
e8a02204
EZ
8645 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
8646 in the logic of incrementing and decrementing the value of
8647 use_relocatable_buffers.
8648
d054f3fb
PE
86492012-06-23 Paul Eggert <eggert@cs.ucla.edu>
8650
8651 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
8652 Privately reported by Herbert J. Skuhra.
8653 [__FreeBSD__]: Remove "*/" typo after "#include".
8654 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
8655 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
8656 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
8657 Don't assume EMACS_TIME and struct timeval are the same type.
8658
d35af63c
PE
86592012-06-22 Paul Eggert <eggert@cs.ucla.edu>
8660
8661 Support higher-resolution time stamps (Bug#9000).
8662 The time stamps are only nanosecond-resolution at the C level,
8663 since that's the best that any real-world system supports now.
8664 But they are picosecond-resolution at the Lisp level, as that's
8665 easy, and leaves room for future OS improvements.
8666
8667 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
8668 (LIBES): Use it.
8669
8670 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
8671 Don't get current time unless it's needed.
8672
8673 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
8674 now provides it if it's absent.
8675 (start_atimer): Port to higher-res time stamps.
8676 Check for time stamp overflow. Don't get current time more
8677 often than is needed.
8678
8679 * buffer.h (struct buffer): Buffer modtime now has high resolution.
8680 Include systime.h, not time.h.
8681 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
8682
8683 * dired.c: Include stat-time.h.
8684 (Ffile-attributes): File times now have higher resolution.
8685
8686 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
8687 (struct image): Timestamp now has higher resolution.
8688
8689 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
8690 has at least microseconds now. All uses removed.
8691 (update_frame, update_single_window, update_window, update_frame_1)
8692 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 8693 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
8694
8695 * editfns.c (time_overflow): Now extern.
8696 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
8697 (float-time, Fformat_time_string, Fcurrent_time_string)
8698 (Fcurrent_time_zone): Accept and generate higher-resolution
8699 time stamps.
8700 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
8701 (decode_time_components, lisp_seconds_argument): New functions.
8702 (make_time): Now static.
8703 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
8704 Report an error if the time is invalid, rather than having the caller
8705 do that.
8706
8707 * fileio.c: Include <stat-time.h>
8708 (Fcopy_file): Copy higher-resolution time stamps.
8709 Prefer to set the time stamp via a file descriptor if that works.
8710 (Fset_file_times, Finsert_file_contents, Fwrite_region)
8711 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
8712 (Fvisited_file_modtime, Fset_visited_file_modtime):
8713 Support higher-resolution time stamps.
8714
8715 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
8716
8717 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
8718
8719 * image.c (prepare_image_for_display, clear_image_cache)
8720 (lookup_image): Port to higer-resolution time stamps.
8721
8722 * keyboard.c (start_polling, bind_polling_period):
8723 Check for time stamp overflow.
8724 (read_char, kbd_buffer_get_event, timer_start_idle)
8725 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
8726 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
8727 Port to higher-resolution time stamps. Do not assume time_t is signed.
8728 (decode_timer): New function. Timers are now vectors of length 9,
8729 not 8, to accommodate the picosecond component.
8730 (timer_check_2): Use it.
8731
8732 * nsterm.m (select_timeout, timeval_subtract): Remove.
8733 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
8734 as they're a bit more accurate and handle overflow better.
8735 (ns_select): Change prototype to be compatible with pselect.
8736 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
8737 * nsterm.h (ns_select): Adjust prototype.
8738
8739 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
8740 us-resolution time stamps.
8741 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
8742
8743 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
8744
8745 * lisp.h (time_overflow): New decl.
8746 (wait_reading_process_output): First arg is now intmax_t, not int,
8747 to accommodate larger waits.
8748
8749 * process.h (struct Lisp_Process.read_output_delay):
8750 Now counts nanoseconds, not microseconds.
8751 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
8752 EMACS_HAS_USECS.
8753 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
8754 (wait_reading_process_output):
8755 Port to ns-resolution time stamps.
8756 (Faccept_process_output, wait_reading_process_output):
8757 Check for time stamp overflow. Do not assume time_t is signed.
8758 (select_wrapper): Remove; we now use pselect.
8759 (Fprocess_attributes): Now generates ns-resolution time stamps.
8760
8761 * sysdep.c: Include utimens.h. Don't include utime.h
8762 or worry about struct utimbuf; gnulib does that for us now.
8763 (gettimeofday): Remove; gnulib provides a substitute.
8764 (make_timeval): New function.
8765 (set_file_times): Now sets ns-resolution time stamps.
8766 New arg FD; all uses changed.
8767 (time_from_jiffies, ltime_from_jiffies, get_up_time)
8768 (system_process_attributes):
8769 Now returns ns-resolution time stamp. All uses changed.
8770 Check for time stamp overflow.
8771
8772 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
8773 provides a substitute now.
8774
8775 * systime.h: Include timespec.h rather than sys/time.h and time.h,
8776 since it guarantees struct timespec.
8777 (EMACS_TIME): Now struct timespec, so that we can support
8778 ns-resolution time stamps.
8779 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
8780 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
8781 (EMACS_USECS): Remove.
8782 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
8783 so multiply the arg by 1000 before storing it.
8784 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
8785 New macros.
8786 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
8787 Port to ns-resolution time stamps.
8788 (EMACS_TIME_NEG_P): Remove; replaced by....
8789 (EMACS_TIME_SIGN): New macro.
8790 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
8791 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
8792 (set_file_times, make_time, lisp_time_argument): Adjust signature.
8793 (make_timeval, make_lisp_time, decode_time_components): New decls.
8794 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
8795 that it mishandled time_t overflow. You can't compare by subtracting!
8796 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
8797 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
8798
8799 * term.c: Include <sys/time.h>.
8800 (timeval_to_Time): New function, for proper overflow wraparound.
8801 (term_mouse_position, term_mouse_click): Use it.
8802
8803 * undo.c (record_first_change): Support higher-resolution time stamps
8804 in the undo buffer.
8805 (Fprimitive_undo): Use them when restoring time stamps.
8806
8807 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
8808 (w32_get_internal_run_time):
8809 Port to higher-resolution Emacs time stamps.
8810 (ltime): Now accepts single 64-bit integer, as that's more convenient
8811 for callers.
8812
8813 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
8814
8815 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
8816 for compatibility with pselect. Support ns-resolution time stamps.
8817
8818 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
8819
8820 * xselect.c (wait_for_property_change, x_get_foreign_selection):
8821 Check for time stamp overflow, and support ns-resolution time stamps.
8822
8823 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
8824 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
8825 (timeval_subtract): Remove; no longer needed.
8826 (XTflash, XTring_bell, x_wait_for_event):
8827 Port to ns-resolution time stamps. Don't assume time_t is signed.
8828
b6a92dfe
CY
88292012-06-22 Chong Yidong <cyd@gnu.org>
8830
8831 * xdisp.c (x_consider_frame_title): Revert last change.
8832
d251c37c
EZ
88332012-06-22 Eli Zaretskii <eliz@gnu.org>
8834
8835 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
8836 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
8837 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
8838 staticidx goes up to 1597 out of 1600 = 0x640.)
8839
f10deafb
PE
88402012-06-20 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
8843 Otherwise, the umask might be mistakenly 0 while handling input signals.
8844
ec6de1e2
SM
88452012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
8846
8847 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
8848
28be1ada
DA
88492012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
8850
8851 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
8852 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
8853 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
8854 access to `contents' member of Lisp_Vector objects with AREF and ASET
8855 where appropriate.
8856
c6bf3022
CY
88572012-06-19 Chong Yidong <cyd@gnu.org>
8858
8859 * frame.c (delete_frame): When selecting a frame on a different
8860 text terminal, do not alter the terminal's top-frame.
8861
8862 * xdisp.c (format_mode_line_unwind_data): Record the target
8863 frame's selected window and its terminal's top-frame.
8864 (unwind_format_mode_line): Restore them.
8865 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
8866 Callers changed.
8867 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
8868 since tty frames can be explicitly named.
8869 (prepare_menu_bars): Likewise.
8870
8871 * term.c (Ftty_top_frame): New function.
8872
defd4196
PE
88732012-06-18 Paul Eggert <eggert@cs.ucla.edu>
8874
8875 Port byte-code-meter to modern targets.
8876 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
8877 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 8878 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
8879 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
8880 (METER_1, METER_2): Simplify.
8881
1053a871
SM
88822012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
8883
8884 * data.c (Fdefalias): Return `symbol' (bug#11686).
8885
b7e8d081
MR
88862012-06-18 Martin Rudalics <rudalics@gmx.at>
8887
8888 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
8889 gets killed during executing of this function (Bug#11665).
8890 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
8891 (Vkill_buffer_query_functions): In doc-string say that functions
8892 run by this hook should not change the current buffer.
8893
7ea2b339
PE
88942012-06-18 Paul Eggert <eggert@cs.ucla.edu>
8895
8896 Fix recently-introduced process.c problems found by static checking.
8897 * process.c (write_queue_push, write_queue_pop, send_process):
8898 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
8899 (write_queue_pop): Fix pointer signedness problem.
8900 (send_process): Remove unused local.
8901
96a313a1
CY
89022012-06-17 Chong Yidong <cyd@gnu.org>
8903
8904 * xdisp.c (redisplay_internal): No need to redisplay terminal
8905 frames that are not on top.
8906
20ca2e94
TN
89072012-06-17 Troels Nielsen <bn.troels@gmail.com>
8908
8909 * process.c (make_process): Initialize write_queue.
8910 (write_queue_push, write_queue_pop): New functions.
8911 (send_process): Use them to maintain correct ordering of process
8912 writes (Bug#10815).
8913
9a900ca9
PE
89142012-06-17 Paul Eggert <eggert@cs.ucla.edu>
8915
310fbfa8
PE
8916 * lisp.h (eassert): Assume C89 or later.
8917 This removes the need for CHECK.
8918 (CHECK): Remove. Its comments about always evaluating its
8919 argument were confusing, as 'eassert' typically does not evaluate
8920 its argument.
8921
27bb1ca4
PE
8922 * coding.c (produce_chars): Use ptrdiff_t, not int.
8923
9a900ca9
PE
8924 * xterm.c (x_draw_underwave): Check for integer overflow.
8925 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
8926
41b7f8bc 89272012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
8928
8929 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
8930 referenced (Bug#11583).
8931
9b0e3eba
AA
89322012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
8933
8934 Implement wave-style variant of underlining.
8935 * dispextern.h (face_underline_type): New enum.
8936 (face): Add field for underline type.
8937 * nsterm.m (ns_draw_underwave): New function.
8938 (ns_draw_text_decoration): Use it.
8939 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
8940 New functions.
8941 (x_draw_glyph_string): Use them.
8942 * xfaces.c (Qline, Qwave): New Lisp objects.
8943 (check_lface_attrs, merge_face_ref)
1053a871
SM
8944 (Finternal_set_lisp_face_attribute, realize_x_face):
8945 Handle wave-style underline face attributes.
9b0e3eba
AA
8946 * xterm.c (x_draw_underwave): New function.
8947 (x_draw_glyph_string): Use it.
8948
0fb52f11
JB
89492012-06-16 Juanma Barranquero <lekktu@gmail.com>
8950
8951 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
8952 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
8953 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
8954 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
8955 ($(BLD)/w32select.$(O)): Update dependencies.
8956
e5560ff7
AS
89572012-06-16 Andreas Schwab <schwab@linux-m68k.org>
8958
8959 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
8960 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
8961 * character.c (_fetch_multibyte_char_p): Remove.
8962 * alloc.c: Include "character.h" before "buffer.h".
8963 * bidi.c: Likewise.
8964 * buffer.c: Likewise.
8965 * bytecode.c: Likewise.
8966 * callint.c: Likewise.
8967 * callproc.c: Likewise.
8968 * casefiddle.c: Likewise.
8969 * casetab.c: Likewise.
8970 * category.c: Likewise.
8971 * cmds.c: Likewise.
8972 * coding.c: Likewise.
8973 * composite.c: Likewise.
8974 * dired.c: Likewise.
8975 * dispnew.c: Likewise.
8976 * doc.c: Likewise.
8977 * dosfns.c: Likewise.
8978 * editfns.c: Likewise.
8979 * emacs.c: Likewise.
8980 * fileio.c: Likewise.
8981 * filelock.c: Likewise.
8982 * font.c: Likewise.
8983 * fontset.c: Likewise.
8984 * fringe.c: Likewise.
8985 * indent.c: Likewise.
8986 * insdel.c: Likewise.
8987 * intervals.c: Likewise.
8988 * keyboard.c: Likewise.
8989 * keymap.c: Likewise.
8990 * lread.c: Likewise.
8991 * macros.c: Likewise.
8992 * marker.c: Likewise.
8993 * minibuf.c: Likewise.
8994 * nsfns.m: Likewise.
8995 * nsmenu.m: Likewise.
8996 * print.c: Likewise.
8997 * process.c: Likewise.
8998 * regex.c: Likewise.
8999 * region-cache.c: Likewise.
9000 * search.c: Likewise.
9001 * syntax.c: Likewise.
9002 * term.c: Likewise.
9003 * textprop.c: Likewise.
9004 * undo.c: Likewise.
9005 * unexsol.c: Likewise.
9006 * w16select.c: Likewise.
9007 * w32fns.c: Likewise.
9008 * w32menu.c: Likewise.
9009 * window.c: Likewise.
9010 * xdisp.c: Likewise.
9011 * xfns.c: Likewise.
9012 * xmenu.c: Likewise.
9013 * xml.c: Likewise.
9014 * xselect.c: Likewise.
9015
2f07e6af
EZ
90162012-06-16 Eli Zaretskii <eliz@gnu.org>
9017
1053a871
SM
9018 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
9019 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 9020 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
9021 row.
9022 (handle_face_prop): Use chunk-relative overlay string index when
9023 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
9024 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
9025 the rightmost. (Bug#11720)
2f07e6af 9026
29b83cec
AS
90272012-06-16 Andreas Schwab <schwab@linux-m68k.org>
9028
9029 * category.h (CHAR_HAS_CATEGORY): Define as inline.
9030 (CATEGORY_MEMBER): Enforce 1/0 value.
9031 * category.c (_temp_category_set): Remove.
9032
4c5501e9
EZ
90332012-06-16 Eli Zaretskii <eliz@gnu.org>
9034
9035 * window.c (Fdelete_other_windows_internal)
9036 (Fdelete_window_internal): Don't access frame's mouse highlight
9037 info of the initial frame. (Bug#11677)
9038
2b570124
PE
90392012-06-14 Paul Eggert <eggert@cs.ucla.edu>
9040
e93864f9
PE
9041 * .gdbinit (xgetint): Fix recently-introduced paren typo.
9042 Assume USE_2_TAGS_FOR_INTS.
9043 (xreload): Adjust $tagmask width to match recent lisp.h change.
9044
2b570124
PE
9045 Simplify lisp.h in minor ways that should not affect code.
9046 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
9047 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
9048 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
9049 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
9050 (INTTYPEBITS): New macro, for clarity.
9051 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
9052 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
9053 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
9054 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
9055 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
9056
81755f69
JB
90572012-06-13 Juanma Barranquero <lekktu@gmail.com>
9058
9059 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
9060
16192a57
GM
90612012-06-13 Glenn Morris <rgm@gnu.org>
9062
9063 * s/bsd-common.h (BSD4_3):
9064 * s/usg5-4-common.h (USG5_4): No longer define; unused.
9065
646b5f55
AS
90662012-06-13 Andreas Schwab <schwab@linux-m68k.org>
9067
9068 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
9069 instead of union.
9070 (XLI, XIL): Define.
1053a871
SM
9071 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
9072 Use them.
9073 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 9074 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 9075 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
9076 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
9077 * frame.c (delete_frame): Remove outdated comment.
9078 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
9079 USE_LISP_UNION_TYPE.
9080 (Fw32_unregister_hot_key): Likewise.
9081 (Fw32_toggle_lock_key): Likewise.
9082 * w32menu.c (add_menu_item): Likewise.
9083 (w32_menu_display_help): Use XIL instead of checking
9084 USE_LISP_UNION_TYPE.
9085 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
9086 (init_heap): Likewise.
9087 * w32term.c (w32_read_socket): Update comment.
9088
1d3823c9
GM
90892012-06-13 Glenn Morris <rgm@gnu.org>
9090
c62ff706
GM
9091 * s/usg5-4-common.h, src/s/unixware.h:
9092 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
9093
1d3823c9
GM
9094 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
9095
bfe3e0a2
PE
90962012-06-13 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
9099 * alloc.c (make_number) [!defined make_number]:
9100 Remove, as lisp.h always defines this now.
9101 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
9102 (roundup_size): Verify that it is a power of 2.
9103 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
9104 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
9105 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
9106 -DUSE_LSB_TAG=0, to override the automatically-selected default.
9107 USE_LSB_TAG now is always defined to be either 0 or 1.
9108 All uses changed.
9109 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
9110 code works fine either way, and efficiency is not a concern here,
9111 as the union type is for debugging, not for production.
9112 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
9113 Use an inline function on all platforms when using the union type,
9114 since this is simpler and 'static inline' can be used portably
9115 within Emacs now.
9116 (LISP_INITIALLY_ZERO): New macro.
9117 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
9118 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
9119
45fa9c0f
GM
91202012-06-12 Glenn Morris <rgm@gnu.org>
9121
b4492cba
GM
9122 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
9123
9124 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 9125
45fa9c0f
GM
9126 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
9127 Move BROKEN_SIGIO to configure.
9128
9129 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
9130 Move NO_TERMIO to configure.
9131
0e25d334
CY
91322012-06-12 Chong Yidong <cyd@gnu.org>
9133
9134 * image.c (imagemagick_load_image): Use MagickFlattenImage if
9135 MagickMergeImageLayers is undefined. Use pixel pusher loop if
9136 MagickExportImagePixels is undefined.
9137
43682bb6
PE
91382012-06-12 Paul Eggert <eggert@cs.ucla.edu>
9139
9140 * image.c (imagemagick_load_image): Remove unused label.
9141
a9be7d2b
GM
91422012-06-11 Glenn Morris <rgm@gnu.org>
9143
9144 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
9145 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
9146 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
9147 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
9148
3017f87f
SM
91492012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
9150
9151 * alloc.c (make_byte_code): New function.
9152 (Fmake_byte_code): Use it. Don't purify here.
9153 * lread.c (read1): Use it as well to avoid extra allocation.
9154
1b9b4cf4
CY
91552012-06-11 Chong Yidong <cyd@gnu.org>
9156
9157 * image.c (imagemagick_load_image): Implement transparency.
9158
95988fcf
AS
91592012-06-10 Andreas Schwab <schwab@linux-m68k.org>
9160
9161 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
9162 account for preceding backslashes. (Bug#11663)
9163
cd4eb164
CY
91642012-06-09 Chong Yidong <cyd@gnu.org>
9165
9166 * term.c: Support italics in capable terminals (Bug#9652).
9167 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
9168 (turn_on_face): Output using TS_enter_italic_mode if available.
9169 Don't handle unused blinking and alt-charset cases.
9170 (turn_off_face): Handle italic case; discard unused tty_blinking_p
9171 and tty_alt_charset_p cases.
9172 (tty_capable_p, init_tty): Support italics.
9173
9174 * termchar.h (struct tty_display_info): Add field for italics.
9175 Remove unused blink field.
9176
9177 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
9178 Handle slant.
9179
9180 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
9181 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
9182 tty_alt_charset_p. Add tty_italic_p.
9183
ff88beb8
MA
91842012-06-09 Michael Albinus <michael.albinus@gmx.de>
9185
9186 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
9187 dbus_type_is_basic if available.
9188 (xd_extract_signed, xd_extract_unsigned): Rename from
9189 extract_signed and extract_unsigned, respectively. Adapt callers.
9190
44286096
CY
91912012-06-09 Chong Yidong <cyd@gnu.org>
9192
1682701f
CY
9193 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
9194
44286096
CY
9195 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
9196 case (Bug#9752).
9197
d86feb17
PE
91982012-06-08 Paul Eggert <eggert@cs.ucla.edu>
9199
9200 * xdisp.c (vmessage): Treat frame message as multibyte.
9201 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
9202 would generate the diagnostic "Making \302\247 buffer-local while
9203 let-bound!".
9204
d5c20fe8
EZ
92052012-06-08 Eli Zaretskii <eliz@gnu.org>
9206
9207 * dispnew.c (showing_window_margins_p): Undo last change, which
9208 was done due to an inadvertent commit.
9209 (adjust_frame_glyphs_for_frame_redisplay): Do call
9210 showing_window_margins_p.
9211
513749ee
SM
92122012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9213
9214 * eval.c (Fmake_var_non_special): New primitive.
9215 (syms_of_eval): Defsubr it.
9216 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
9217
d4a8f5c1
JB
92182012-06-08 Juanma Barranquero <lekktu@gmail.com>
9219
9220 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
9221 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
9222
8bbbc977
EZ
92232012-06-08 Eli Zaretskii <eliz@gnu.org>
9224
9225 * alloc.c (allocate_vectorlike): Fix last change.
9226
f3372c87
DA
92272012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
9228
9229 Block-based vector allocation of small vectors.
9230 * lisp.h (struct vectorlike_header): New field `nbytes',
9231 adjust comment accordingly.
9232 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
fc0c31f8 9233 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
9234 mark_maybe_pointer, valid_lisp_object_p) accordingly.
9235 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
9236 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
9237 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
9238 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
9239 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
9240 (roundup_size): New constant.
9241 (struct vector_block): New data type.
9242 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 9243 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
9244 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
9245 (sweep_vectors): New functions.
9246 (allocate_vectorlike): Return `zero_vector' as the only vector of
fc0c31f8 9247 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
9248 or equal to VBLOCK_BYTES_MAX.
9249 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
9250 (init_alloc_once): Add call to init_vectors.
9251
4f18a4ed
SM
92522012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9253
9254 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
9255
86f158bc
PE
92562012-06-07 Paul Eggert <eggert@cs.ucla.edu>
9257
9258 * doprnt.c (doprnt): Truncate multibyte char correctly.
9259 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
9260 would mishandle a string argument "Xc" if X was a multibyte
9261 character of length 2: it would truncate after X's first byte
9262 rather than including all of X.
9263
c5cfcbe0
CY
92642012-06-06 Chong Yidong <cyd@gnu.org>
9265
9266 * buffer.c (word_wrap): Doc fix.
9267
c05cf390
PE
92682012-06-04 Paul Eggert <eggert@cs.ucla.edu>
9269
9270 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
9271
0c3461de
GM
92722012-06-03 Glenn Morris <rgm@gnu.org>
9273
9274 * xdisp.c (tool-bar-style): Doc fix.
9275
c71232db
UM
92762012-06-03 Ulrich Müller <ulm@gentoo.org>
9277
9278 * Makefile.in (PAXCTL): Define.
9279 (temacs$(EXEEXT)): Disable memory randomization for the temacs
9280 binary via PaX flags if the paxctl utility is available.
9281 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
9282 Restore PaX flags to their default. (Bug#11398)
9283
383f7350
CY
92842012-06-03 Chong Yidong <cyd@gnu.org>
9285
9286 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
9287 buffer (Bug#11226).
9288
5f2c76c6
CY
92892012-06-03 Chong Yidong <cyd@gnu.org>
9290
9291 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
9292 (note_mode_line_or_margin_highlight): If there is no help echo,
9293 use mode-line-default-help-echo. Handle the case where the mouse
9294 position is past the end of the mode line string.
9295
9296 * buffer.c (buffer_local_value_1): New function, split from
9297 Fbuffer_local_value; can return Qunbound.
9298 (Fbuffer_local_value): Use it.
9299 (Vmode_line_format): Docstring tweaks.
9300
773d47f6
PE
93012012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9302
9303 * sysdep.c (system_process_attributes): Improve comment.
9304
f2d6a3df
SM
93052012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
9306
9307 * keyboard.c: Export real-this-command to Elisp.
9308 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
9309 and DEFVAR it. Update all users.
9310
63810350
PE
93112012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9312
7bd5c1f4
PE
9313 * minibuf.c (Fassoc_string): Remove duplicate declaration.
9314
63810350
PE
9315 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
9316 Convert pctcpu and pctmem to Lisp float properly.
9317 Let the compiler fold better, as 100.0/0x8000 is exact.
9318
a2821611
AS
93192012-06-02 Andreas Schwab <schwab@linux-m68k.org>
9320
9321 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
9322 cons_block.
9323
5fceba1d
PE
93242012-06-01 Paul Eggert <eggert@cs.ucla.edu>
9325
9326 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
9327
c98ff5dd
DA
93282012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
9329
9330 For a 'struct window', replace some Lisp_Object fields to
9331 bitfields where appropriate, remove unused fields.
9332 * window.h (struct window): Remove unused 'last_mark_x' and
9333 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
1f9f395d 9334 change its type from Lisp_Object to bitfield.
c98ff5dd
DA
9335 Change type of 'force_start', 'optional_new_start',
9336 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 9337 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 9338
ca34e0be
PE
93392012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9340
9341 Pacify gcc -Wdouble-precision when using Xaw.
9342 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
9343 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
9344 Use 'float' consistently, rather than 'float' in most places
9345 and 'double' in a couple of places.
9346
efc00ab1 93472012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
9348
9349 * xdisp.c (handle_stop): Detect whether we have overlay strings
9350 loaded by testing it->current.overlay_string_index to be
9351 non-negative, instead of checking whether n_overlay_strings is
9352 positive. (Bug#11587)
9353
efc00ab1 93542012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
9355
9356 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
9357
9358 * doc.c (Fsubstitute_command_keys): Doc fix.
9359
efc00ab1 93602012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
9361
9362 * search.c (search_buffer): Remove calls to
9363 r_alloc_inhibit_buffer_relocation, as it is now called by
9364 maybe_unify_char, which was the cause of relocation of buffer text
9365 in bug#11519.
9366
efc00ab1 93672012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
9368
9369 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
9370 for the duration of call to load_charset, to avoid problems with
9371 callers of maybe_unify_char that access buffer text through C
9372 pointers.
9373
9374 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
9375 decrement the inhibition flag, instead of just setting or
9376 resetting it.
9377
ba93a187
PE
93782012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9379
9380 Remove obsolete '#define static' cruft.
9381 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
9382 This #undef was "temporary" in 2000; it is no longer needed
9383 now that '#define static' has gone away.
9384 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
9385 (gray_bitmap_bits): Remove; no longer needed.
9386 All uses replaced with definiens.
9387 * xterm.c: Include "bitmaps/gray.xbm".
9388
9e4bf381
PE
93892012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9390
9391 Clean up __executable_start, monstartup when --enable-profiling.
9392 The following changes affect the code only when profiling.
9393 * dispnew.c (__executable_start): Rename from safe_bcopy.
9394 Define only on platforms that need it.
9395 * emacs.c: Include <sys/gmon.h> when profiling.
9396 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
9397 (__executable_start): Remove decl, since lisp.h does it now.
9398 (safe_bcopy): Remove decl; no longer has that name.
9399 (main): Coalesce #if into single bit of code, for simplicity.
9400 Cast pointers to uintptr_t, since standard libraries want integers
9401 and not pointers.
9402 * lisp.h (__executable_start): New decl.
9403
32d72c2f
GM
94042012-05-31 Glenn Morris <rgm@gnu.org>
9405
9406 * image.c (Fimagemagick_types): Doc fix.
9407
baac5bc7
JM
94082012-05-30 Jim Meyering <meyering@redhat.com>
9409
9410 * callproc.c (Fcall_process_region): Include directory component
9411 in mkstemp error message (Bug#11586).
9412
72cb32cf
PE
94132012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9414
9415 * alloc.c, lisp.h (make_pure_vector): Now static.
9416
61b108cc
SM
94172012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
9418
9419 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
9420 Move to byte-run.el.
9421 (Fautoload): Do the hash-doc more carefully.
9422 * data.c (Fdefalias): Purify definition, except for keymaps.
9423 (Qdefun): Move from eval.c.
9424 * lisp.h (Qdefun): Remove.
9425 * lread.c (read1): Tiny simplification.
9426
471fe23d
TN
94272012-05-29 Troels Nielsen <bn.troels@gmail.com>
9428
934f3f58 9429 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
9430 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
9431 Bug#9642, but explicitly check that the buffer the overlay would
9432 be moved to is live and rearrange lines to make sure that errors
9433 will not put the overlay in an inconsistent state.
9434 (Fdelete_overlay): Cosmetics.
9435
85d0efd1
EZ
94362012-05-28 Eli Zaretskii <eliz@gnu.org>
9437
9438 * w32term.c (my_bring_window_to_top): New function.
9439 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
9440 could be different from the original one.
9441 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
9442 (Bug#11513)
9443
9444 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
9445 by calling BringWindowToTop.
9446
9447 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
9448 (WM_EMACS_END): Increase by one.
9449
da92a98c
PE
94502012-05-28 Paul Eggert <eggert@cs.ucla.edu>
9451
9452 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
9453 This avoids undefined behavior that might cause the eassert
9454 to not catch an out-of-range value.
9455
74d1f848
JB
94562012-05-28 Juanma Barranquero <lekktu@gmail.com>
9457
9458 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
9459 Update dependencies.
9460
9e1a06fc
EZ
94612012-05-27 Eli Zaretskii <eliz@gnu.org>
9462
9463 * bidi.c (bidi_mirror_char): Fix last change.
9464
f3dd7312
AS
94652012-05-27 Andreas Schwab <schwab@linux-m68k.org>
9466
9467 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
9468 when referring to sectname field in printf format.
9469
81899c91
PE
94702012-05-27 Paul Eggert <eggert@cs.ucla.edu>
9471
57b81a9f
PE
9472 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
9473 Only r_alloc_inhibit_buffer_relocation needed to be added;
9474 the others were already declared.
9475
81899c91
PE
9476 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
9477 before checking whether it's out of range. Put the check inside
9478 eassert. See
9479 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
9480
33017faf 94812012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
9482
9483 * callproc.c (Fcall_process): Restore a line that was accidentally
9484 commented out in the 2011-02-13 change (bug#11547).
9485
33017faf 94862012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
9487
9488 * lisp.h [REL_ALLOC]: Add prototypes for external functions
9489 defined on ralloc.c.
9490
9491 * buffer.c [REL_ALLOC]: Remove prototypes of
9492 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
9493 they are now on lisp.h.
9494
9495 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
9496
9497 * search.c (search_buffer): Use it to inhibit relocation of buffer
9498 text while re_search_2 is doing its job, because re_search_2 is
9499 passed C pointers to buffer text. (Bug#11519)
9500
23415acf
EZ
9501 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
9502 Update value to 24.
9503
44e27368
EZ
9504 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
9505 state after an additional call to move_it_in_display_line_to, keep
9506 the values of it->max_ascent and it->max_descent found for the
9507 entire line.
9508 (pos_visible_p): Revert the comparison against bottom_y to what it
9509 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
9510 (Bug#11464)
9511
c1892f11
PE
95122012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9513
9514 Fix coding-related core dumps with gcc -ftrapv.
9515 The code was computing A - B, where A and B are pointers, and B is
9516 random garbage. This can lead to core dumps on platforms that
9517 have special pointer registers, and it also leads to core dumps on
9518 x86-64 when compiled with gcc -ftrapv. The fix is to compute
9519 A - B only when B is initialized properly.
9520 * coding.c (coding_set_source, coding_set_destination): Return void.
9521 (coding_change_source, coding_change_destinations): New functions,
9522 with the old behaviors of coding_set_source and coding_set_destination.
9523 All callers that need an offset changed to use these new functions.
9524
eb7afdad
GM
95252012-05-26 Glenn Morris <rgm@gnu.org>
9526
9527 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
9528
f12fdf02
EZ
95292012-05-26 Eli Zaretskii <eliz@gnu.org>
9530
53a63be6 9531 Extend mouse support on W32 text-mode console.
61b108cc
SM
9532 * xdisp.c (draw_row_with_mouse_face):
9533 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 9534
eb3f6f01 9535 * w32console.c: Include window.h.
61b108cc
SM
9536 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
9537 New functions.
eb3f6f01
EZ
9538 (initialize_w32_display): Initialize mouse-highlight data.
9539
53a63be6
EZ
9540 * w32inevt.c: Include termchar.h and window.h.
9541 (do_mouse_event): Support mouse-autoselect-window. When the mouse
9542 moves, call note_mouse_highlight. If help_echo changed, call
9543 gen_help_event to produce help-echo message in the echo area.
9544 Call clear_mouse_face if mouse_face_hidden is set in the mouse
9545 highlight info.
9546
4cfd81f6
PE
95472012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9548
9549 * lread.c (read1): Simplify slightly to avoid an overflow warning
9550 with GCC 4.7.0 on x86-64.
9551
4446092a
EZ
95522012-05-26 Eli Zaretskii <eliz@gnu.org>
9553
9554 * bidi.c (bidi_mirror_char): Revert last change: an int is
9555 definitely wide enough here.
9556
42b2a986 95572012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 9558
42b2a986 9559 Fix integer width and related bugs (Bug#9874).
eb106a49 9560 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
9561 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
9562 (string_bytes, check_sblock, allocate_string_data):
9563 (compact_small_strings, Fmake_bool_vector, make_string)
9564 (make_unibyte_string, make_multibyte_string)
9565 (make_string_from_bytes, make_specified_string)
9566 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
9567 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
9568 (mark_vectorlike):
9569 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9570 (allocate_pseudovector):
9571 Use int, not EMACS_INT, where int is wide enough.
9572 (inhibit_garbage_collection, Fgarbage_collect):
9573 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9574 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
9575 int might not be wide enough.
9576 (bidi_cache_search, bidi_cache_find, bidi_init_it)
9577 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
9578 (bidi_at_paragraph_end, bidi_find_paragraph_start)
9579 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
9580 (bidi_level_of_next_char, bidi_move_to_visually_next):
9581 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9582 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
9583 (Fkill_buffer, Fset_buffer_major_mode)
9584 (advance_to_char_boundary, Fbuffer_swap_text)
9585 (Fset_buffer_multibyte, overlays_at, overlays_in)
9586 (overlay_touches_p, struct sortvec, record_overlay_string)
9587 (overlay_strings, recenter_overlay_lists)
9588 (adjust_overlays_for_insert, adjust_overlays_for_delete)
9589 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
9590 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
9591 (Foverlay_recenter, last_overlay_modification_hooks_used)
9592 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
9593 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
9594 (validate_region): Omit unnecessary test for b <= e,
9595 since that's guaranteed by the previous test.
d311d28c
PE
9596 (adjust_overlays_for_delete): Avoid pos + length overflow.
9597 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
9598 (report_overlay_modification):
9599 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9600 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
9601 Omit pointer cast, which isn't needed anyway, and doesn't work
9602 after the EMACS_INT -> ptrdiff_t change.
02481186 9603 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
9604 * buffer.h: Adjust decls to match defn changes elsewhere.
9605 (struct buffer_text, struct buffer):
9606 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9607 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
9608 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
9609 not int, to avoid needless 32-bit limit on 64-bit hosts.
9610 (exec_byte_code): Use tighter memory-full test, one that checks
9611 for alloca overflow. Don't compute the address of the object just
9612 before an array, as that's not portable. Use EMACS_INT, not
9613 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
9614 * callint.c (Fcall_interactively):
9615 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9616 * callproc.c (call_process_kill, Fcall_process):
9617 Don't assume pid_t fits into an Emacs fixnum.
9618 (call_process_cleanup, Fcall_process, child_setup):
9619 Don't assume pid_t fits into int.
9620 (call_process_cleanup, Fcall_process, delete_temp_file)
9621 (Fcall_process_region):
9622 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9623 (Fcall_process): Simplify handling of volatile integers.
9624 Use int, not EMACS_INT, where int will do.
9625 * casefiddle.c (casify_object, casify_region, operate_on_word)
9626 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
9627 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9628 (casify_object): Avoid integer overflow when overallocating buffer.
9629 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 9630 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
9631 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
9632 * category.h (CATEGORYP): Don't assume arg is nonnegative.
9633 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
9634 integers are now checked earlier. All uses replaced with XINT.
9635 (ccl_driver):
9636 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9637 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
9638 (ccl_driver, Fregister_code_conversion_map):
9639 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
9640 (resolve_symbol_ccl_program): Check that vector header is in range.
9641 Always copy the vector, so that we can check its contents reliably
9642 now rather than having to recheck each instruction as it's being
9643 executed. Check that vector words fit in 'int'.
9644 (ccl_get_compiled_code, Fregister_ccl_program)
9645 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
9646 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
9647 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
9648 contents are in range.
9649 (Fccl_execute_on_string): Check that status is in range.
9650 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
9651 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
9652 Accept and return EMACS_INT, not int, because callers can pass values
9653 out of 'int' range.
9654 (c_string_width, strwidth, lisp_string_width, chars_in_text)
9655 (multibyte_chars_in_text, parse_str_as_multibyte)
9656 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
9657 (str_as_unibyte, str_to_unibyte, string_count_byte8)
9658 (string_escape_byte8, Fget_byte):
9659 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 9660 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
9661 avoid mishandling large integers.
9662 * character.h: Adjust decls to match defn changes elsewhere.
9663 * charset.c (load_charset_map_from_file, find_charsets_in_text)
9664 (Ffind_charset_region):
9665 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9666 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
9667 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 9668 Don't assume fixnum fits in int.
d311d28c
PE
9669 (load_charset_map_from_vector, Fmap_charset_chars):
9670 Remove now-unnecessary CHECK_NATNUMs.
9671 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
9672 Don't rely on undefined behavior with signed left shift overflow.
9673 Don't assume unsigned int fits into fixnum, or that fixnum fits
9674 into unsigned int. Don't require max_code to be a valid fixnum;
9675 that's not true for gb10830 4-byte on a 32-bit host. Allow
9676 invalid_code to be a cons, for the same reason. Require code_offset
9677 to be a character. Avoid int overflow if max_char is close
9678 to INT_MAX.
9679 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
9680 this is intended anyway and avoids some undefined behavior.
9681 (load_charset_map): Pass unsigned, not int, as 2nd arg of
9682 INDEX_TO_CODE_POINT, as that's what it expects.
9683 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
9684 * charset.h (DECODE_CHAR): Return int, not unsigned;
9685 this is what was intended anyway, and it avoids undefined behavior.
9686 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
9687 integer-overflow issues.
9688 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
9689 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
9690 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
9691 * chartab.c (Fmake_char_table, Fset_char_table_range)
9692 (uniprop_get_decoder, uniprop_get_encoder):
9693 Don't assume fixnum fits in int.
9694 * cmds.c (move_point): New function, that does the gist of
9695 Fforward_char and Fbackward_char, but does so while checking
9696 for integer overflow more accurately.
c96e5d6a 9697 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
9698 (Fforward_line, Fend_of_line, internal_self_insert)
9699 (internal_self_insert):
9700 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9701 Fix a FIXME, by checking for integer overflow when calculating
9702 target_clm and actual_clm.
9703 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 9704 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
9705 (ASSURE_DESTINATION, coding_alloc_by_realloc)
9706 (coding_alloc_by_making_gap, alloc_destination)
9707 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
9708 (encode_coding_utf_16, detect_coding_emacs_mule)
9709 (decode_coding_emacs_mule, encode_coding_emacs_mule)
9710 (detect_coding_iso_2022, decode_coding_iso_2022)
9711 (encode_invocation_designation, encode_designation_at_bol)
9712 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
9713 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
9714 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
9715 (encode_coding_ccl, encode_coding_raw_text)
9716 (detect_coding_charset, decode_coding_charset)
9717 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
9718 (produce_composition, produce_charset, produce_annotation)
9719 (decode_coding, handle_composition_annotation)
9720 (handle_charset_annotation, consume_chars, decode_coding_gap)
9721 (decode_coding_object, encode_coding_object, detect_coding_system)
9722 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
9723 (code_convert_region, code_convert_string)
8f50130c
PE
9724 (Fdefine_coding_system_internal)
9725 (coding_set_source, coding_set_destination):
d311d28c
PE
9726 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9727 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
9728 (Fdefine_coding_system_internal):
9729 Don't assume fixnums fit in int.
9730 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 9731 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
9732 (Funencodable_char_position, Fcheck_coding_systems_region)
9733 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 9734 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 9735 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 9736 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 9737 Don't access memory outside of the args array.
d311d28c 9738 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
9739 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
9740 result of ENCODE_CHAR.
d311d28c
PE
9741 * coding.h: Adjust decls to match defn changes elsewhere.
9742 (struct coding_system):
9743 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9744 * composite.c (get_composition_id, find_composition)
9745 (run_composition_function, update_compositions)
9746 (compose_text, composition_gstring_put_cache)
9747 (composition_gstring_p, composition_gstring_width)
9748 (fill_gstring_header, fill_gstring_body, autocmp_chars)
9749 (composition_compute_stop_pos, composition_reseat_it)
9750 (composition_update_it, struct position_record)
9751 (find_automatic_composition, composition_adjust_point)
9752 (Fcomposition_get_gstring, Ffind_composition_internal):
9753 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9754 (update_compositions):
9755 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9756 * composite.h: Adjust decls to match defn changes elsewhere.
9757 (struct composition):
9758 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9759 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
9760 Do not attempt to compute the address of the object just before a
9761 buffer; this is not portable.
9762 (Faref, Faset):
9763 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9764 (Faset): Use int, not EMACS_INT, where int is wide enough.
9765 (Fstring_to_number): Don't assume fixnums fit in int.
9766 (Frem): Don't assume arg is nonnegative.
9767 * dbusbind.c (xd_append_arg): Check for integers out of range.
9768 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 9769 (extract_signed, extract_unsigned): New functions.
243e0530
PE
9770 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
9771 (xd_get_connection_references): Return ptrdiff_t, not int.
9772 All uses changed.
9773 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
9774 (xd_read_message_1):
9775 Use int, not unsigned, where the dbus API uses int.
9776 (Fdbus_message_internal): Don't overflow mtype.
9777 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
9778 * dired.c (directory_files_internal, file_name_completion, scmp)
9779 (file_name_completion_stat):
9780 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9781 (file_name_completion): Don't overflow matchcount.
9782 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
9783 * dispextern.h: Adjust decls to match defn changes elsewhere.
9784 (struct text_pos, struct glyph, struct bidi_saved_info)
9785 (struct bidi_string_data, struct bidi_it, struct composition_it)
9786 (struct it):
9787 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9788 (struct display_pos, struct composition_it, struct it):
9789 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9790 * dispnew.c (increment_matrix_positions)
9791 (increment_row_positions, mode_line_string)
9792 (marginal_area_string):
9793 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 9794 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
9795 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9796 (duration_to_sec_usec): New function, to check for overflow better.
9797 (Fsleep_for, sit_for): Use it.
9798 * doc.c (get_doc_string, store_function_docstring):
9799 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9800 (get_doc_string, Fsnarf_documentation):
9801 Use int, not EMACS_INT, where int is wide enough.
9802 (get_doc_string):
9803 Use SAFE_ALLOCA, not alloca.
9804 Check for overflow when converting EMACS_INT to off_t.
9805 * doprnt.c (doprnt):
9806 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9807 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
9808 Don't assume uid_t fits into fixnum.
9809 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
9810 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
9811 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
9812 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
9813 (general_insert_function)
9814 (Finsert_char, make_buffer_string, make_buffer_string_both)
9815 (update_buffer_properties, Fbuffer_substring)
9816 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
9817 (Fsubst_char_in_region, check_translation)
9818 (Ftranslate_region_internal, save_restriction_restore, Fformat)
9819 (transpose_markers, Ftranspose_regions):
9820 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9821 (clip_to_bounds): Move to lisp.h as an inline function).
9822 (Fconstrain_to_field): Don't assume integers are nonnegative.
9823 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
9824 (Fsubst_char_in_region, Fsave_restriction):
9825 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9826 (Femacs_pid): Don't assume pid_t fits into fixnum.
9827 (lo_time): Use int, not EMACS_INT, when int suffices.
9828 (lisp_time_argument): Check for usec out of range.
9829 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
9830 (Fuser_login_name, Fuser_full_name): Signal an error
9831 if a uid argument is out of range, rather than relying on
9832 undefined behavior.
c8d5c857
PE
9833 (Fformat_time_string): Remove now-unnecessary check.
9834 lisp_time_argument checks for out-of-range usec now.
243e0530 9835 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
9836 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
9837 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
9838 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
9839 (init_cmdargs, Fdump_emacs):
9840 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9841 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
9842 the bottom (typically) 32 bits of the fixnum.
9843 * eval.c (specpdl_size, call_debugger):
9844 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9845 (when_entered_debugger, Fbacktrace_debug):
9846 Don't assume fixnum can fit in int.
9847 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
9848 the object just before a buffer; this is not portable.
9849 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
9850 (grow_specpdl, unbind_to):
9851 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9852 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
9853 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 9854 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
9855 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
9856 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
9857 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9858 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
9859 (a_write, e_write):
9860 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9861 (Fcopy_file, non_regular_nbytes, read_non_regular)
9862 (Finsert_file_contents):
9863 Use int, not EMACS_INT, where int is wide enough.
9864 (READ_BUF_SIZE): Verify that it fits in int.
9865 (Finsert_file_contents): Check that counts are in proper range,
9866 rather than assuming fixnums fit into ptrdiff_t etc.
9867 Don't assume fixnums fit into int.
125b3835 9868 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
9869 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
9870 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
9871 (string_char_to_byte, string_byte_to_char)
9872 (string_make_multibyte, string_to_multibyte)
9873 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
9874 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
9875 (substring_both, Fdelete, internal_equal, Ffillarray)
9876 (Fclear_string, mapcar1)
9877 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
9878 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
9879 (larger_vector, make_hash_table, maybe_resize_hash_table)
9880 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
9881 (Fmaphash, secure_hash):
9882 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9883 (concat): Check for string index and length overflow.
9884 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
9885 (Frequire):
9886 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9887 (larger_vector): New API (vec, incr_min, size_max) replaces old
9888 one (vec, new_size, init). This catches size overflow.
9889 INIT was removed because it was always Qnil.
9890 All callers changed.
9891 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
9892 the upper bound on a hash table index size.
9893 (make_hash_table, maybe_resize_hash_table): Use it.
9894 (secure_hash): Computer start_byte and end_byte only after
9895 they're known to be in ptrdiff_t range.
9896 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
9897 (Ffont_get_glyphs, Ffont_at):
9898 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9899 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
9900 (Flist_fonts, Fopen_font):
9901 Don't assume fixnum can fit in int.
9902 (check_gstring): Don't assume index can fit in int.
9903 (font_match_p): Check that fixnum is a character, not a nonnegative
9904 fixnum, since the later code needs to stuff it into an int.
9905 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
9906 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
9907 conversion overflow issues.
9908 (Fopen_font): Check for integer out of range.
9909 (Ffont_get_glyphs): Don't assume index can fit in int.
9910 * font.h: Adjust decls to match defn changes elsewhere.
9911 * fontset.c (reorder_font_vector): Redo score calculation to avoid
9912 integer overflow.
9913 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
9914 printmax_t, where ptrdiff_t is wide enough.
9915 (Finternal_char_font):
9916 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9917 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
9918 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
9919 (Fset_frame_position, x_set_frame_parameters)
9920 (x_set_line_spacing, x_set_border_width)
9921 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
9922 Check that fixnums are in proper range for system types.
9923 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
9924 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9925 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
9926 Use SAFE_ALLOCA_LISP, not alloca.
9927 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
9928 intptr_t is wide enough.
9929 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
9930 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
9931 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
9932 Check for fixnum out of range.
9933 * ftfont.c (ftfont_list): Don't assume index fits in int.
9934 Check that fixnums are in proper range for system types.
9935 (ftfont_shape_by_flt):
9936 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
9937 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
9938 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9939 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
9940 Check that fixnums are in proper range for system types.
9941 * gnutls.h: Adjust decls to match defn changes elsewhere.
9942 * gtkutil.c (xg_dialog_run):
9943 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9944 (update_frame_tool_bar):
9945 Check that fixnums are in proper range for system types.
9946 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 9947 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
9948 * indent.c (last_known_column, last_known_column_point):
9949 (current_column_bol_cache):
9950 (skip_invisible, current_column, check_display_width):
9951 (check_display_width, scan_for_column, current_column_1)
9952 (Findent_to, Fcurrent_indentation, position_indentation)
9953 (indented_beyond_p, Fmove_to_column, compute_motion):
9954 (Fcompute_motion, Fvertical_motion):
9955 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9956 (last_known_column_modified): Use EMACS_INT, not int.
9957 (check_display_width):
9958 (Fcompute_motion):
9959 Check that fixnums and floats are in proper range for system types.
9960 (compute_motion): Don't assume index or fixnum fits in int.
9961 (compute_motion, Fcompute_motion):
9962 Use int, not EMACS_INT, when it is wide enough.
9963 (vmotion): Omit local var start_hpos that is always 0; that way
9964 we don't need to worry about overflow in expressions involving it.
9965 * indent.h: Adjust decls to match defn changes elsewhere.
9966 (struct position):
9967 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9968 Use int, not EMACS_INT, where int is wide enough.
9969 Remove unused members ovstring_chars_done and tab_offset;
9970 all uses removed.
9971 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
9972 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
9973 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
9974 (make_gap, copy_text, insert, insert_and_inherit)
9975 (insert_before_markers, insert_before_markers_and_inherit)
9976 (insert_1, count_combining_before, count_combining_after)
9977 (insert_1_both, insert_from_string)
9978 (insert_from_string_before_markers, insert_from_string_1)
9979 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
9980 (adjust_after_replace, adjust_after_insert, replace_range)
9981 (replace_range_2, del_range, del_range_1, del_range_byte)
9982 (del_range_both, del_range_2, modify_region)
9983 (prepare_to_modify_buffer, signal_before_change)
9984 (signal_after_change, Fcombine_after_change_execute):
9985 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9986 * intervals.c (traverse_intervals, rotate_right, rotate_left)
9987 (balance_an_interval, split_interval_right, split_interval_left)
9988 (find_interval, next_interval, update_interval)
9989 (adjust_intervals_for_insertion, delete_node, delete_interval)
9990 (interval_deletion_adjustment, adjust_intervals_for_deletion)
9991 (static_offset_intervals, offset_intervals)
9992 (merge_interval_right, merge_interval_left, make_new_interval)
9993 (graft_intervals_into_buffer, temp_set_point_both)
9994 (temp_set_point, set_point, adjust_for_invis_intang)
9995 (set_point_both, move_if_not_intangible, get_property_and_range)
9996 (get_local_map, copy_intervals, copy_intervals_to_string)
9997 (compare_string_intervals, set_intervals_multibyte_1):
9998 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9999 * intervals.h: Adjust decls to match defn changes elsewhere.
10000 (struct interval):
10001 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10002 * keyboard.c (this_command_key_count, this_single_command_key_start)
10003 (before_command_key_count, before_command_echo_length, echo_now)
10004 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
10005 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
10006 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
10007 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
10008 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10009 (last_non_minibuf_size, last_point_position, echo_truncate)
10010 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
10011 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
10012 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
10013 (stuff_buffered_input):
10014 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10015 (last_auto_save, command_loop_1, read_char):
10016 Use EMACS_INT, not int, to avoid integer overflow.
10017 (record_char): Avoid overflow in total_keys computation.
10018 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
10019 * keyboard.h: Adjust decls to match defn changes elsewhere.
10020 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
10021 (Fkey_description, Fdescribe_vector, Flookup_key):
10022 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10023 (click_position): New function, to check that positions are in range.
10024 (Fcurrent_active_maps):
10025 (describe_command):
10026 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10027 (Faccessible_keymaps, Fkey_description):
10028 (preferred_sequence_p):
10029 Don't assume fixnum can fit into int.
10030 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
10031 Check for integer overflow in size calculations.
10032 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
10033 avoid mishandling large integers.
10034 * lisp.h: Adjust decls to match defn changes elsewhere.
10035 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
10036 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
10037 (struct Lisp_Marker):
10038 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10039 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
10040 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
10041 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
10042 All callers changed.
10043 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
10044 Assume the arg has valid form, since it always does.
10045 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
10046 unsigned integer system type.
10047 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
10048 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
10049 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10050 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
10051 (duration_to_sec_usec): New decl.
10052 * lread.c (read_from_string_index, read_from_string_index_byte)
10053 (read_from_string_limit, readchar, unreadchar, openp)
10054 (read_internal_start, read1, oblookup):
10055 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10056 (Fload, readevalloop, Feval_buffer, Feval_region):
10057 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10058 (openp): Check for out-of-range argument to 'access'.
10059 (read1): Use int, not EMACS_INT, where int is wide enough.
10060 Don't assume fixnum fits into int.
6efdadfd 10061 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
10062 (read_filtered_event): Use duration_to_sec_usec
10063 to do proper overflow checking on durations.
d311d28c
PE
10064 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
10065 in size calculation.
10066 (Fexecute_kbd_macro):
10067 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10068 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
10069 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
10070 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
10071 (set_marker_both, set_marker_restricted_both, marker_position)
10072 (marker_byte_position, Fbuffer_has_markers_at):
10073 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10074 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 10075 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
10076 It now merely ensures that the menu is large enough, without
10077 necessarily growing it, as this avoids some integer overflow issues.
10078 All callers changed.
10079 (keymap_panes, parse_single_submenu, Fx_popup_menu):
10080 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10081 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
10082 Use SAFE_ALLOCA_LISP, not alloca.
10083 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
10084 to EMACS_INT. Check that fixnums are in proper range for system types.
10085 * minibuf.c (minibuf_prompt_width, string_to_object)
10086 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
10087 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
10088 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10089 (get_minibuffer, read_minibuf_unwind):
10090 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10091 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
10092 this simplifies overflow checking. All callers changed.
10093 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
10094 (Ftest_completion):
10095 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10096 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
10097 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
10098 Check that fixnums are in proper range for system types.
10099 (Fx_create_frame, Fx_show_tip):
10100 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10101 * nsfont.m (ns_findfonts, nsfont_list_family):
10102 Don't assume fixnum fits in long.
10103 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
10104 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10105 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
10106 wide enough.
17fdb222 10107 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
10108 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10109 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
10110 (PRINTDECLARE, PRINTPREPARE):
10111 (strout, print_string):
10112 (print, print_preprocess, print_check_string_charset_prop)
10113 (print_object):
10114 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10115 (PRINTDECLARE):
10116 (temp_output_buffer_setup, Fprin1_to_string, print_object):
10117 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10118 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 10119 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 10120 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
10121 (print_error_message): Use SAFE_ALLOCA, not alloca.
10122 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
10123 (print_depth, new_backquote_output, print_number_index):
10124 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
10125 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
10126 (Fset_process_window_size, Fformat_network_address)
10127 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 10128 (sigchld_handler):
d311d28c 10129 Check that fixnums are in proper range for system types.
d44287d4 10130 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
10131 Check for process-ids out of pid_t range rather than relying on
10132 undefined behavior.
e4d81efc 10133 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
10134 (Fformat_network_address, read_process_output, send_process)
10135 (Fprocess_send_region, status_notify):
10136 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10137 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
10138 (wait_reading_process_output, read_process_output, exec_sentinel):
10139 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10140 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
10141 (Faccept_process_output): Use duration_to_sec_usec to do proper
10142 overflow checking on durations.
dde14581
PE
10143 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
10144 Don't assume pid_t fits in int.
02481186
PE
10145 * process.h (struct Lisp_Process): Members tick and update_tick
10146 are now of type EMACS_INT, not int.
b62b53e8
PE
10147 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
10148 configured --with-wide-int.
d311d28c
PE
10149 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
10150 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
10151 * search.c (looking_at_1, string_match_1):
10152 (fast_string_match, fast_c_string_match_ignore_case)
10153 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
10154 (scan_newline, find_before_next_newline, search_command)
10155 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
10156 (set_search_regs, wordify):
10157 (Freplace_match):
10158 (Fmatch_data):
10159 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10160 (string_match_1, search_buffer, set_search_regs):
10161 (Fmatch_data):
10162 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10163 (wordify): Check for overflow in size calculation.
10164 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
10165 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
10166 Check that fixnums are in proper range for system types.
10167 * sound.c (struct sound_device)
10168 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
10169 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10170 (Fplay_sound_internal):
10171 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 10172 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
10173 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
10174 (Fparse_partial_sexp):
10175 Don't assume fixnums can fit in int.
10176 (struct lisp_parse_state, find_start_pos, find_start_value)
10177 (find_start_value_byte, find_start_begv)
10178 (update_syntax_table, char_quoted, dec_bytepos)
10179 (find_defun_start, prev_char_comend_first, back_comment):
10180 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
10181 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
10182 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10183 (Finternal_describe_syntax_value): Check that match_lisp is a
10184 character, not an integer, since the code stuffs it into int.
10185 (scan_words, scan_sexps_forward):
10186 Check that fixnums are in proper range for system types.
10187 (Fforward_word):
10188 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10189 (scan_sexps_forward):
10190 Use CHARACTERP, not INTEGERP, since the value must fit into int.
10191 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
10192 * syntax.h: Adjust decls to match defn changes elsewhere.
10193 (struct gl_state_s):
10194 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
10195 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
10196 MOST_POSITIVE_FIXNUM.
d311d28c
PE
10197 * sysdep.c (wait_for_termination_1, wait_for_termination)
10198 (interruptible_wait_for_termination, mkdir):
10199 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
10200 (emacs_read, emacs_write):
10201 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
10202 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
10203 and double all fit in int.
d311d28c
PE
10204 * term.c (set_tty_color_mode):
10205 Check that fixnums are in proper range for system types.
10206 * termhooks.h (struct input_event):
10207 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10208 * textprop.c (validate_interval_range, interval_of)
10209 (Fadd_text_properties, set_text_properties_1)
10210 (Fremove_text_properties, Fremove_list_of_text_properties)
10211 (Ftext_property_any, Ftext_property_not_all)
10212 (copy_text_properties, text_property_list, extend_property_ranges)
10213 (verify_interval_modification):
10214 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10215 (Fnext_single_char_property_change)
10216 (Fprevious_single_char_property_change):
10217 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
10218 (copy_text_properties):
10219 Check for integer overflow in index calculation.
d311d28c
PE
10220 * undo.c (last_boundary_position, record_point, record_insert)
10221 (record_delete, record_marker_adjustment, record_change)
10222 (record_property_change):
10223 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10224 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
10225 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10226 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10227 (Fx_hide_tip, Fx_file_dialog):
10228 * w32menu.c (set_frame_menubar):
10229 Use ptrdiff_t, not int, for consistency with rest of code.
10230 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
10231 (select_window, Fdelete_other_windows_internal)
10232 (window_scroll_pixel_based, window_scroll_line_based)
10233 (Frecenter, Fset_window_configuration):
10234 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10235 (Fset_window_hscroll, run_window_configuration_change_hook)
10236 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 10237 (Fscroll_other_window, Frecenter):
d311d28c
PE
10238 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10239 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
10240 Don't assume fixnum fits in int.
10241 (Fset_window_scroll_bars):
10242 Check that fixnums are in proper range for system types.
10243 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
10244 (string_pos, c_string_pos, number_of_chars, init_iterator)
10245 (in_ellipses_for_invisible_text_p, init_from_display_pos)
10246 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
10247 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
10248 (face_before_or_after_it_pos, handle_invisible_prop)
10249 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
10250 (display_prop_intangible_p, string_buffer_position_lim)
10251 (string_buffer_position, handle_composition_prop, load_overlay_strings)
10252 (get_overlay_strings_1, get_overlay_strings)
10253 (iterate_out_of_display_property, forward_to_next_line_start)
10254 (back_to_previous_visible_line_start, reseat, reseat_to_string)
10255 (get_next_display_element, set_iterator_to_next)
10256 (get_visually_first_element, compute_stop_pos_backwards)
10257 (handle_stop_backwards, next_element_from_buffer)
10258 (move_it_in_display_line_to, move_it_in_display_line)
10259 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10260 (add_to_log, message_dolog, message_log_check_duplicate)
10261 (message2, message2_nolog, message3, message3_nolog
10262 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
10263 (current_message_1, truncate_echo_area, truncate_message_1)
10264 (set_message, set_message_1, store_mode_line_noprop)
10265 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
10266 (text_outside_line_unchanged_p, check_point_in_composition)
10267 (reconsider_clip_changes)
10268 (redisplay_internal, set_cursor_from_row, try_scrolling)
10269 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
10270 (redisplay_window, find_last_unchanged_at_beg_row)
10271 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
10272 (trailing_whitespace_p, find_row_edges, display_line)
10273 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
10274 (display_mode_element, store_mode_line_string)
10275 (pint2str, pint2hrstr, decode_mode_spec)
10276 (display_count_lines, display_string, draw_glyphs)
10277 (x_produce_glyphs, x_insert_glyphs)
10278 (rows_from_pos_range, mouse_face_from_buffer_pos)
10279 (fast_find_string_pos, mouse_face_from_string_pos)
10280 (note_mode_line_or_margin_highlight, note_mouse_highlight):
10281 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10282 (safe_call, init_from_display_pos, handle_fontified_prop)
10283 (handle_single_display_spec, load_overlay_strings)
10284 (with_echo_area_buffer, setup_echo_area_for_printing)
10285 (display_echo_area, echo_area_display)
10286 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
10287 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
10288 (redisplay_window, dump_glyph_row, display_mode_line)
10289 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 10290 (handle_display_spec, display_prop_string_p):
d311d28c
PE
10291 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10292 (handle_single_display_spec, build_desired_tool_bar_string)
10293 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
10294 (get_specified_cursor_type):
10295 Check that fixnums are in proper range for system types.
10296 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
10297 (Flookup_image_map):
10298 Don't assume fixnums fit in int.
10299 (compare_overlay_entries):
10300 Avoid mishandling comparisons due to subtraction overflow.
10301 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
10302 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
10303 (handle_tool_bar_click):
10304 Use int, not unsigned, since we prefer signed and the signedness
10305 doesn't matter here.
10306 (get_next_display_element, next_element_from_display_vector):
10307 Use int, not EMACS_INT, when int is wide enough.
10308 (start_hourglass): Use duration_to_sec_usec to do proper
10309 overflow checking on durations.
10310 * xfaces.c (Fbitmap_spec_p):
10311 Check that fixnums are in proper range for system types.
10312 (compare_fonts_by_sort_order):
10313 Avoid mishandling comparisons due to subtraction overflow.
10314 (Fx_family_fonts, realize_basic_faces):
10315 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10316 (Fx_family_fonts):
10317 Don't assume fixnum fits in int.
10318 Use SAFE_ALLOCA_LISP, not alloca.
10319 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
10320 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
10321 (face_at_buffer_position, face_for_overlay_string)
10322 (face_at_string_position):
10323 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10324 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
10325 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
10326 (Fx_show_tip):
10327 Check that fixnums are in proper range for system types.
10328 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10329 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
10330 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10331 (Fx_change_window_property): Don't assume fixnums fit in int.
10332 * xfont.c (xfont_chars_supported):
10333 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10334 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
10335 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
10336 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10337 * xml.c (parse_region):
10338 * xrdb.c (magic_file_p):
10339 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10340 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
10341 (x_get_local_selection, x_reply_selection_request)
10342 (x_handle_selection_request, wait_for_property_change):
10343 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10344 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
10345 short is wide enough.
10346 (x_send_client_event): Don't assume fixnum fits in int.
10347 * xterm.c (x_x_to_emacs_modifiers):
10348 Don't assume EMACS_INT overflows nicely into int.
10349 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
10350 may come from Lisp.
10351 (handle_one_xevent): NATNUMP can eval its arg twice.
10352 (x_connection_closed):
10353 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10354 * xterm.h: Adjust decls to match defn changes elsewhere.
10355 (struct scroll_bar): Use struct vectorlike_header
10356 rather than rolling our own approximation.
10357 (SCROLL_BAR_VEC_SIZE): Remove; not used.
10358
c6574eb5
GM
103592012-05-25 Glenn Morris <rgm@gnu.org>
10360
10361 * lisp.mk (lisp): Update for more files being compiled now.
10362
e8d32c7e
SM
103632012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
10364
48def666
SM
10365 * lread.c: Remove `read_pure' which makes no difference.
10366 (read_pure): Remove var.
10367 (unreadpure): Remove function.
10368 (readevalloop): Don't call read_list with -1 flag.
10369 (read1, read_vector): Don't test read_pure any more.
10370 (read_list): Simplify.
10371
e8d32c7e
SM
10372 * fileio.c, character.h: Minor style tweaks.
10373
4b2addb7
DA
103742012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
10375
10376 * window.h (clip_changed): Remove useless declaration.
10377
584461b2
JB
103782012-05-22 Juanma Barranquero <lekktu@gmail.com>
10379
10380 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
10381 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
10382
34374650
PE
103832012-05-22 Paul Eggert <eggert@cs.ucla.edu>
10384
10385 Remove src/m/*.
10386 This directory predates autoconf and is no longer needed nowadays.
10387 Move its few remaining bits of functionality to where they're needed.
10388 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
10389 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
10390 * m/template.h: Remove.
10391 * Makefile.in (M_FILE): Remove. All uses removed.
10392 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
10393 * lisp.h (USE_LSB_TAG):
10394 * mem-limits.h (EXCEEDS_LISP_PTR):
10395 Use VAL_MAX, not VALBITS, in #if.
10396 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
10397 (EMACS_UINT): Define unconditionally now.
10398 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
10399 (BITS_PER_EMACS_INT): New constants, replacing
10400 what used to be in config.h, but not useful in #if.
10401 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
10402 define them any more.
10403 (VAL_MAX): New macro.
10404 (VALMASK): Use it.
10405 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
10406 BITS_PER_EMACS_INT, in #if.
10407 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
10408 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
10409 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
10410 * s/ms-w32.h (DATA_START):
10411 Move here from removed file m/intel386.h.
10412 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
10413 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
10414
261cb4bb
PE
104152012-05-21 Paul Eggert <eggert@cs.ucla.edu>
10416
10417 Assume C89 or later.
10418 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
10419 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
10420 (xrealloc):
10421 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
10422 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
10423 * textprop.c, tparam.c (NULL): Remove.
10424 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
10425 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
10426 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
10427 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
10428 * xterm.c (input_signal_count): Assume volatile works.
10429
ff23cd9f
KB
104302012-05-21 Ken Brown <kbrown@cornell.edu>
10431
10432 * xgselect.c (xg_select): Fix first argument in call to 'select'
10433 (bug#11508).
10434
1b170bc6
KB
104352012-05-20 Ken Brown <kbrown@cornell.edu>
10436
10437 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 10438 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 10439
b2f4d39f
KB
104402012-05-19 Ken Brown <kbrown@cornell.edu>
10441
10442 * xfns.c (x_in_use): Remove `static' qualifier.
10443 * xterm.h (x_in_use): Declare.
10444 * xgselect.c: Include xterm.h.
10445 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
10446 and `display_arg' (bug#9754).
10447
003fdae2
PE
104482012-05-19 Paul Eggert <eggert@cs.ucla.edu>
10449
9232a6d9
PE
10450 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
10451
003fdae2
PE
10452 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
10453 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
10454
784b56e2
EZ
104552012-05-18 Eli Zaretskii <eliz@gnu.org>
10456
10457 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
10458
10459 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 10460 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
10461
10462 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
10463 reference to image_cache->refcount.
10464 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
10465
a0a79cde
JL
104662012-05-17 Juri Linkov <juri@jurta.org>
10467
10468 * search.c (Fword_search_regexp, Fword_search_backward)
10469 (Fword_search_forward, Fword_search_backward_lax)
10470 (Fword_search_forward_lax): Move functions to isearch.el
10471 (bug#10145, bug#11381).
10472
b0572523
PE
104732012-05-16 Paul Eggert <eggert@cs.ucla.edu>
10474
10475 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
10476
9660f5fc
SM
104772012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
10478
10479 * lread.c (init_obarray): Declare Qt and Qnil as special.
10480
4374de83
GM
104812012-05-14 Glenn Morris <rgm@gnu.org>
10482
10483 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 10484 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 10485
dc44c39a
PE
104862012-05-14 Paul Eggert <eggert@cs.ucla.edu>
10487
078c97cb
PE
10488 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
10489
dc44c39a
PE
10490 * unexaix.c: Port to more-recent AIX compilers.
10491 (report_error, report_error_1, make_hdr, copy_sym)
10492 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
10493 Make arguments const char *, not char *, to avoid violations of C
10494 standard and to fix some AIX warnings reported by Gilles Pion.
10495
e18afed7 104962012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
10497
10498 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
10499 already have overlays loaded.
10500 (handle_single_display_spec): Before returning without displaying
10501 fringe bitmap, synchronize the bidi iterator with the main display
10502 iterator, by calling iterate_out_of_display_property.
10503 (iterate_out_of_display_property): Detect buffer iteration by
10504 testing that it->string is a Lisp string.
10505 (get_next_display_element): When the current object is exhausted,
10506 and there's something on it->stack, call set_iterator_to_next to
10507 proceed with what's on the stack, instead of returning zero.
10508 (set_iterator_to_next): If called at the end of a Lisp string,
10509 proceed to consider_string_end without incrementing string
10510 position. Don't increment display vector index past the end of
10511 the display vector. (Bug#11417)
c8fb9dc6
EZ
10512 (pos_visible_p): Don't report a position visible when move_it_to
10513 stopped at the last line of window, which happens to be scanned
10514 backwards by the bidi iteration. (Bug#11464)
ac268e67 10515
e18afed7 105162012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
10517
10518 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
10519 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
10520 are on a TTY, and thus unable to display on the fringes.
10521 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
10522 so we need to signal to the caller that this is a "replacing"
10523 display spec. This fixes display when the spec is invalid or we
10524 are on a TTY.
10525
e18afed7 105262012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
10527
10528 * unexaix.c (make_hdr): Fix typo in prototype.
10529 This bug broke the build on AIX. Problem reported by Gilles Pion.
10530
9d0a235a
MA
105312012-05-14 Michael Albinus <michael.albinus@gmx.de>
10532
10533 * keyboard.c (kbd_buffer_get_event): Read special events also in
10534 batch mode. (Bug#11415)
10535
9e6b06ed
GM
105362012-05-12 Glenn Morris <rgm@gnu.org>
10537
10538 * ns.mk: Update for ns_appbindir no longer having trailing "/".
10539
c1a1d7a3
EZ
105402012-05-12 Eli Zaretskii <eliz@gnu.org>
10541
10542 * lisp.mk (lisp): Add newcomment.elc.
10543
3fe7cdc8
GM
105442012-05-12 Glenn Morris <rgm@gnu.org>
10545
10546 * Makefile.in (MKDIR_P): New, set by configure.
10547 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
10548
53f7d2c0
PE
105492012-05-11 Paul Eggert <eggert@cs.ucla.edu>
10550
10551 Remove unused function hourglass_started.
10552 * dispextern.h (hourglass_started):
10553 * w32fns.c (hourglass_started):
10554 * xdisp.c (hourglass_started): Remove.
10555
75aafb17
JB
105562012-05-10 Juanma Barranquero <lekktu@gmail.com>
10557
10558 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
10559 Update dependencies.
10560
12959e8e
PE
105612012-05-10 Paul Eggert <eggert@cs.ucla.edu>
10562
97107e2e
PE
10563 * xgselect.c (xg_select): Put maxfds+1 into a var.
10564 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
10565
12959e8e
PE
10566 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
10567
836d29b3
DA
105682012-05-10 Dave Abrahams <dave@boostpro.com>
10569
10570 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
10571 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
10572
5cb67954
MA
105732012-05-09 Michael Albinus <michael.albinus@gmx.de>
10574
10575 * dbusbind.c (xd_registered_buses): New internal Lisp object.
10576 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
10577 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
10578 Initialize xd_registered_buses.
10579
3478ec45
PE
105802012-05-09 Paul Eggert <eggert@cs.ucla.edu>
10581
b263a6b0
PE
10582 Untag more efficiently if USE_LSB_TAG.
10583 This is based on a proposal by YAMAMOTO Mitsuharu in
10584 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
10585 For an admittedly artificial (nth 8000 longlist) benchmark on
10586 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
10587 Emacs's overall text size by 1%.
10588 * lisp.h (XUNTAG): New macro.
10589 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
10590 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
10591 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
10592 * eval.c (Fautoload):
10593 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
10594 * frame.h (XFRAME): Use XUNTAG.
10595
3478ec45
PE
10596 Port recent dbusbind.c changes to 32-bit --with-wide-int.
10597 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
10598 Remove unportable assumptions about print widths of types like
10599 dbus_uint32_t.
10600 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
10601 intptr_t when converting between pointer and integer, to avoid GCC
10602 warnings about wrong width.
10603
666b903b 106042012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
10605
10606 * w32proc.c (new_child): Force Windows to reserve only 64KB of
10607 stack for each reader_thread, instead of defaulting to 8MB
10608 determined by the linker. This avoids failures in creating
10609 subprocesses on Windows 7, see the discussion in this thread:
10610 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
10611
b120cc17
JC
106122012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
10613
10614 Fix up display of the *Minibuf-0* buffer in the mini window.
10615 * keyboard.c (read_char): Don't clear the echo area if there's no
10616 message to clear.
10617 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 10618 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 10619
9a4b36f8
MA
106202012-05-07 Michael Albinus <michael.albinus@gmx.de>
10621
10622 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
10623 batch mode.
10624
e5f9458f
CY
106252012-05-06 Chong Yidong <cyd@gnu.org>
10626
10627 * lisp.mk (lisp): Update.
10628
eceeb5fc 106292012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
10630
10631 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
10632
71873e2b
SM
106332012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
10634
10635 * data.c (PUT_ERROR): New macro.
10636 (syms_of_data): Use it. Add new error type `user-error'.
10637 * undo.c (user_error): New function.
10638 (Fprimitive_undo): Use it.
10639 * print.c (print_error_message): Adjust print style for `user-error'.
10640 * keyboard.c (user_error): New function.
10641 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
10642
ab0fa4e4
PE
106432012-05-03 Paul Eggert <eggert@cs.ucla.edu>
10644
10645 Do not limit current-time-string to years 1000..9999.
10646 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
10647 (Fcurrent_time_string): Support any year that is supported by the
10648 underlying localtime representation. Don't use asctime, as it
10649 has undefined behavior for years outside the range -999..9999.
10650
7ed806a7
PE
106512012-05-02 Paul Eggert <eggert@cs.ucla.edu>
10652
10653 Fix race conditions involving setenv, gmtime, localtime, asctime.
10654 Without this fix, interrupts could mess up code that uses these
10655 nonreentrant functions, since setting TZ invalidates existing
10656 tm_zone or tzname values, and since most of these functions return
10657 pointers to static storage.
10658 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
10659 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
10660 Grow the critical sections to include not just invoking
10661 localtime/gmtime, but also accessing these functions' results
10662 including their tm_zone values if any, and any related TZ setting.
10663 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
10664 so that the struct tm is saved in the critical section.
10665 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
10666 motivated by the fact that memory allocation needs to be outside
10667 the critical section.
10668
0c16dfed
DA
106692012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
10670
10671 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
10672 with RESET_INTERVAL.
10673
10674 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
10675 Remove duplicated buffer name initialization.
10676
3f83ace8
JM
106772012-05-02 Jim Meyering <jim@meyering.net>
10678
10679 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
10680
c7b8541e
JM
10681 * xfns.c (x_window): Use xstrdup (Bug#11375).
10682
90207a15 106832012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
10684
10685 * xdisp.c (pos_visible_p): If already at a newline from the
10686 display string before the 'while' loop, don't walk back the glyphs
10687 from it3.glyph_row. Solves assertion violation when the display
10688 string begins with a newline (egg.el). (Bug#11367)
10689
b593d6a9
AH
106902012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
10691
10692 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
10693 Move to simple.el.
10694
4737362e
GM
106952012-05-01 Glenn Morris <rgm@gnu.org>
10696
99cf43f9
GM
10697 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
10698 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
10699 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
10700 All were removed before 23.1.
10701
9311dcff
GM
10702 * dispnew.c: Remove HAVE_LIBNCURSES test;
10703 it is always true on relevant platforms.
10704
4d5c6349
GM
10705 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
10706 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
10707
4737362e
GM
10708 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
10709
74dd3a6b
AS
107102012-04-30 Andreas Schwab <schwab@linux-m68k.org>
10711
10712 * .gdbinit (xpr): Remove checks for no longer existing misc types.
10713 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
10714 Remove.
10715
13c379ee
PE
107162012-04-28 Paul Eggert <eggert@cs.ucla.edu>
10717
10718 Do not avoid creating empty evaporating overlays (Bug#9642).
10719 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
10720 That is, do not delete an evaporating overlay if it becomes
10721 empty after its bounds are adjusted to fit within its buffer.
10722 This fix caused other problems, and I'm reverting it until we get
10723 to the bottom of them.
10724
a8e7d6d7 107252012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
10726
10727 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
10728
a8e7d6d7 107292012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
10730
10731 * xdisp.c (pos_visible_p): If the window start position is beyond
10732 ZV, start the display from buffer beginning. Prevents assertion
10733 violation in init_iterator when the minibuffer window is scrolled
10734 via the scroll bar.
10735
10736 * window.c (window_scroll_pixel_based): Likewise.
10737
a8e7d6d7 107382012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
10739
10740 * keymap.c (where_is_internal): Doc fix (Bug#10872).
10741
a8e7d6d7 107422012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
10743
10744 * fileio.c (Fcopy_file, Fset_file_selinux_context):
10745 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
10746
a8e7d6d7 107472012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 10748
b593d6a9
AH
10749 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
10750 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 10751
1c6900d9
EZ
107522012-04-26 Eli Zaretskii <eliz@gnu.org>
10753
4c3fa1d9
EZ
10754 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
10755 display element, check also the underlying string or buffer
10756 character. (Bug#11341)
10757
1c6900d9
EZ
10758 * w32menu.c: Include w32heap.h.
10759 (add_menu_item): If the call to AppendMenuW (via
10760 unicode_append_menu) fails, disable Unicode menus only if we are
10761 running on Windows 9X/Me.
10762
42bf8205
AS
107632012-04-24 Andreas Schwab <schwab@linux-m68k.org>
10764
10765 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
10766 (xgetint): Add missing shift for LSB tags.
10767
b1bac16e
MR
107682012-04-24 Martin Rudalics <rudalics@gmx.at>
10769
10770 * keyboard.c (read_char): Don't wipe echo area for select window
10771 events: These might get delayed via `mouse-autoselect-window'
10772 (Bug#11304).
10773
d69621cc
JB
107742012-04-24 Juanma Barranquero <lekktu@gmail.com>
10775
10776 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
10777 manipulation of :loaded-from data.
10778
02fd101b
JB
107792012-04-23 Juanma Barranquero <lekktu@gmail.com>
10780
10781 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
10782 now a cons (bug#11311).
10783
888bec30
PE
107842012-04-23 Paul Eggert <eggert@cs.ucla.edu>
10785
89a438bd
PE
10786 Do not create empty overlays with the evaporate property (Bug#9642).
10787 * buffer.c (Fmove_overlay): Delete an evaporating overlay
10788 if it becomes empty after its bounds are adjusted to fit within
10789 its buffer. Without this fix, in a nonempty buffer (let ((o
10790 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
10791 yields an empty overlay that has the evaporate property, which is
10792 not supposed to happen.
10793
1068fe4d
PE
10794 Fix minor GTK3 problems found by static checking.
10795 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
10796 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
10797 (struct _EmacsFixedClass, emacs_fixed_get_type):
10798 Move decls here from emacsgtkfixed.h, since they needn't be public.
10799 (emacs_fixed_get_type): Now static.
10800 (emacs_fixed_class_init): Omit unused local.
10801 (emacs_fixed_child_type): Remove; unused.
10802 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
10803 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
10804 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
10805 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
10806 (EMACS_FIXED_GET_CLASS): Remove; unused.
10807 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
10808
888bec30
PE
10809 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
10810 Problem reported by Juanma Barranquero for Windows -Wunused-function.
10811
de85e130
PE
108122012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10813
d0baac98 10814 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 10815 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
10816 (__malloc_size_t, __malloc_ptrdiff_t):
10817 Remove. All uses removed, replaced by the definiens if needed,
10818 since we can assume C89 or better now.
10819 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
10820 (protect_malloc_state, align, get_contiguous_space)
10821 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
10822 (malloc_atfork_handler_child, malloc_enable_thread)
10823 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
10824 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
10825 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
10826 (special_realloc, _realloc_internal_nolock, _realloc_internal)
10827 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
10828 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
10829 Define using prototypes, not old style.
10830 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
10831 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
10832 (align): Don't assume that signed integer overflow wraps around.
10833 Omit unused local var.
10834 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
10835 (_free_internal_nolock, memalign, mallochook, reallochook):
10836 Omit no-longer-needed casts.
10837 (valloc): Use getpagesize, not __getpagesize.
10838 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
10839 (struct hdr): The 'magic' member is now size_t, not unsigned long.
10840
de85e130
PE
10841 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
10842
dcbf5805
MA
108432012-04-22 Michael Albinus <michael.albinus@gmx.de>
10844
10845 Move functions from C to Lisp. Make non-blocking method calls
10846 the default. Implement further D-Bus standard interfaces.
10847
10848 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
10849 (QCdbus_request_name_allow_replacement)
10850 (QCdbus_request_name_replace_existing)
10851 (QCdbus_request_name_do_not_queue)
10852 (QCdbus_request_name_reply_primary_owner)
10853 (QCdbus_request_name_reply_in_queue)
10854 (QCdbus_request_name_reply_exists)
10855 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
10856 (QCdbus_registered_serial, QCdbus_registered_method)
10857 (QCdbus_registered_signal): New Lisp objects.
10858 (XD_DEBUG_MESSAGE): Use sizeof.
10859 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
10860 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
10861 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
10862 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
10863 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
10864 (xd_signature, xd_append_arg): Allow float for integer types.
10865 (xd_get_connection_references): New function.
b593d6a9
AH
10866 (xd_get_connection_address): Rename from xd_initialize.
10867 Return cached address.
dcbf5805
MA
10868 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
10869 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
10870 level.
10871 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 10872 Return number of refcounts.
dcbf5805
MA
10873 (Fdbus_get_unique_name): Make stronger parameter check.
10874 (Fdbus_message_internal): New defun.
10875 (Fdbus_call_method, Fdbus_call_method_asynchronously)
10876 (Fdbus_method_return_internal, Fdbus_method_error_internal)
10877 (Fdbus_send_signal, Fdbus_register_service)
10878 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
10879 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
10880 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
10881 (Vdbus_compiled_version, Vdbus_runtime_version)
10882 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
10883 (Vdbus_message_type_method_return, Vdbus_message_type_error)
10884 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
10885 (Vdbus_registered_buses, Vdbus_registered_objects_table):
10886 Adapt docstring.
dcbf5805 10887
52828e02
PE
108882012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10889
da05bc4c
PE
10890 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
10891 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
10892 Do not assume ptrdiff_t is the same width as 'int'.
10893
52828e02
PE
10894 * alloc.c: Handle unusual debugging option combinations.
10895 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
10896 since the two debugging options are incompatible.
10897 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
10898 is defined.
10899 (mem_init, mem_insert, mem_insert_fixup):
10900 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
10901 (NEED_MEM_INSERT): Remove; no longer needed.
10902
f01769f9
LL
109032012-04-22 Leo Liu <sdl.web@gmail.com>
10904
10905 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
10906
5790543d
PE
109072012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10908
10909 * sysdep.c [__FreeBSD__]: Minor cleanups.
10910 (list_system_processes, system_process_attributes) [__FreeBSD__]:
10911 Use Emacs indenting style more consistently. Avoid some casts.
10912 Use 'double' consistently rather than mixing 'float' and 'double'.
10913
b91b7e4d
EW
109142012-04-21 Eduard Wiebe <usenet@pusto.de>
10915
b593d6a9
AH
10916 * sysdep.c (list_system_processes, system_process_attributes):
10917 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 10918
6114eb15
AS
109192012-04-21 Andreas Schwab <schwab@linux-m68k.org>
10920
10921 * lisp.mk (lisp): Update.
10922
2f38dff7
PE
109232012-04-20 Paul Eggert <eggert@cs.ucla.edu>
10924
10925 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
10926 It is never used otherwise.
10927
4ae29f89
SM
109282012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
10929
10930 * print.c (print_preprocess): Only check print_depth if print-circle
10931 is nil.
10932 (print_object): Check for cycles even when print-circle is nil and
10933 print-gensym is t, but only check print_depth if print-circle is nil.
10934
f30d612a
CY
109352012-04-20 Chong Yidong <cyd@gnu.org>
10936
10937 * process.c (wait_reading_process_output): If EIO occurs on a pty,
10938 set the status to "failed" and ensure that sentinel is run.
10939
c07a4c0b 109402012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
10941
10942 * process.c (Fset_process_inherit_coding_system_flag)
10943 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 10944 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 10945
c07a4c0b 109462012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
10947
10948 * xdisp.c (string_buffer_position_lim): Limit starting position to
10949 BEGV.
10950 (set_cursor_from_row): If called for a mode-line or header-line
10951 row, return zero immediately.
10952 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
10953 farther than the first row after the header line, if any.
10954 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
10955 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
10956
c07a4c0b 109572012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 10958
4ae29f89
SM
10959 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
10960 (bug#11238).
ad3a2b41 10961
c07a4c0b 109622012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 109632012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
10964
10965 configure: new option --enable-gcc-warnings (Bug#11207)
10966 * Makefile.in (C_WARNINGS_SWITCH): Remove.
10967 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
10968 (ALL_CFLAGS): Use new macros rather than old.
10969 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
10970 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
10971 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
10972 -Wunused-result, -Wunused-variable. This should go away once
10973 the Emacs and Gnulib regex code is merged.
10974 (xmalloc, xrealloc): Now static.
10975
aba027e8
PE
109762012-04-17 Paul Eggert <eggert@cs.ucla.edu>
10977
10978 * dired.c (Fsystem_groups): Remove unused local.
10979
e5a36063
GM
109802012-04-17 Glenn Morris <rgm@gnu.org>
10981
10982 * dired.c (Fsystem_users): Doc fix.
10983
316411f0
DA
109842012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
10985
10986 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
10987 (syms_of_dired): Add them.
10988
9426aba4
PE
109892012-04-16 Paul Eggert <eggert@cs.ucla.edu>
10990
b62a57be
PE
10991 Fix minor alloc.c problems found by static checking.
10992 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
10993 New extern decls, to avoid calling undeclared functions.
10994 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
10995 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
10996 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
10997 (NEED_MEM_INSERT): New macro.
10998 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 10999 Remove one incorrect comment and fix another.
b62a57be 11000
3539f31f
PE
11001 Fix minor ralloc.c problems found by static checking.
11002 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
11003 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
11004 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
11005 (r_alloc_sbrk): Now static.
11006
a041960a
PE
11007 Improve ralloc.c interface checking.
11008 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
11009 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
11010 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
11011 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
11012 [REL_ALLOC]: ... to here, to check interface.
11013 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
11014 Remove decls. This fixes an "It stinks!".
11015
9426aba4
PE
11016 * alloc.c (which_symbols): Fix alignment issue / type clash.
11017
d55c12ed
AS
110182012-04-15 Andreas Schwab <schwab@linux-m68k.org>
11019
11020 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
11021 (struct Lisp_Misc_Any): Likewise.
11022 (struct Lisp_Free): Likewise.
11023 * alloc.c (union aligned_Lisp_Symbol): Define.
11024 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
11025 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
11026 (union aligned_Lisp_Misc): Define.
11027 (MARKER_BLOCK_SIZE, struct marker_block): Use union
11028 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 11029 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 11030
b948ce8b
PE
110312012-04-14 Paul Eggert <eggert@cs.ucla.edu>
11032
11033 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
11034 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
11035 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
11036 * s/netbsd.h, s/sol2-6.h:
11037 Remove definition of GC_MARK_STACK, since the default now works.
11038 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
11039 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
11040 no longer the default.
11041 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
11042
35dc09a1 110432012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 11044
35dc09a1
GM
11045 * lread.c (lisp_file_lexically_bound_p):
11046 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 11047
35dc09a1
GM
110482012-04-14 Eli Zaretskii <eliz@gnu.org>
11049
11050 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
11051 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
11052
110532012-04-14 Jan Djärv <jan.h.d@swipnet.se>
11054
11055 * nsterm.m (constrainFrameRect): Always constrain when there is only
11056 one screen (Bug#10962).
11057
bcd86815
KB
110582012-04-13 Ken Brown <kbrown@cornell.edu>
11059
11060 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
11061
c25df26e
RT
110622012-04-13 Reuben Thomas <rrt@sc3d.org>
11063
11064 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
11065
0fc59f1e
DC
110662012-04-11 Daniel Colascione <dancol@dancol.org>
11067
11068 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
11069 against is gone. It's better to use vfork now so that when Cygwin
11070 gains a new, working vfork, we use it automatically (bug#10398).
11071
de8c03dc
SM
110722012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
11073
11074 * window.c (save_window_save): Obey window-point-insertion-type.
11075
2f097256
GM
110762012-04-11 Glenn Morris <rgm@gnu.org>
11077
11078 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
11079
453b951e
SM
110802012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
11081
11082 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
11083
75f1671a 110842012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
11085
11086 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
11087 (force_quit_count): New var.
11088 (handle_interrupt): Use it.
11089
2a8ce227
JB
110902012-04-10 Juanma Barranquero <lekktu@gmail.com>
11091
11092 * w32.c (w32_delayed_load): Record the full path of the library
11093 being loaded (bug#10424).
11094
935396c0
GM
110952012-04-09 Glenn Morris <rgm@gnu.org>
11096
05920a43
GM
11097 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
11098 not just in the obarray, before snarfing them. (Bug#11036)
11099
935396c0
GM
11100 * Makefile.in ($(leimdir)/leim-list.el):
11101 Pass EMACS rather than BUILT_EMACS.
11102
a18ecafa
TZ
111032012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
11104
11105 * process.c (make_process):
11106 * process.h: Add integer `gnutls_handshakes_tried' member to
11107 process struct.
11108
6bbef4e5
JC
11109 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
11110 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
11111
11112 * gnutls.c (gnutls_log_function2i): Convenience log function.
11113 (emacs_gnutls_read): Use new log functions,
11114 `gnutls_handshakes_tried' process member, and
11115 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
11116 attempts per process (connection).
11117
b4d3bc10
CY
111182012-04-09 Chong Yidong <cyd@gnu.org>
11119
11120 * eval.c (Fuser_variable_p, user_variable_p_eh)
11121 (lisp_indirect_variable): Functions deleted.
11122 (Fdefvar): Caller changed.
11123
11124 * callint.c (Finteractive, Fcall_interactively):
11125 * minibuf.c (Fread_variable): Callers changed.
11126
70f4d973
EZ
111272012-04-09 Eli Zaretskii <eliz@gnu.org>
11128
11129 * xdisp.c (set_cursor_from_row): If the display string appears in
11130 the buffer at position that is closer to point than the position
11131 after the display string, display the cursor on the first glyph of
11132 the display string. Fixes cursor display when a 'display' text
11133 property immediately follows invisible text. (Bug#11094)
11134
cb3c2e3e
PE
111352012-04-09 Paul Eggert <eggert@cs.ucla.edu>
11136
11137 composite.c: use 'double' consistently
11138 * composite.c (get_composition_id): Use 'double' consistently
11139 instead of converting 'float' to 'double' and vice versa; this is
11140 easier to understand and avoids a GCC warning.
11141
fd06db5d
GM
111422012-04-09 Glenn Morris <rgm@gnu.org>
11143
50fe702a
GM
11144 * Makefile.in: Generate leim-list with bootstrap-emacs, in
11145 preparation for dumping it with emacs. (Bug#4789)
11146 (leimdir): New variable.
11147 ($(leimdir)/leim-list.el): New rule.
11148 (emacs$(EXEEXT)): Depend on leim-list.el.
11149
fd06db5d
GM
11150 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
11151 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
11152 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
11153
55c131ee
AS
111542012-04-08 Andreas Schwab <schwab@linux-m68k.org>
11155
11156 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
11157 proper alignment.
11158
9209588f
JB
111592012-04-07 Juanma Barranquero <lekktu@gmail.com>
11160
11161 * xml.c (init_libxml2_functions) [WINDOWSNT]:
11162 Remove unused local variable.
11163
e3fb2efb
PE
111642012-04-07 Paul Eggert <eggert@cs.ucla.edu>
11165
11166 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
11167 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
11168 (mark_memory): Mark Lisp_Objects only if pointers might hide in
11169 objects, as mark_maybe_pointer will catch them otherwise.
11170 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
11171 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
11172
b5385551
PE
111732012-04-07 Paul Eggert <eggert@cs.ucla.edu>
11174
11175 Fix typo that broke non-Windows builds.
11176 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
11177
9078ead6
EZ
111782012-04-07 Eli Zaretskii <eliz@gnu.org>
11179
11180 Support building on MS-Windows with libxml2.
11181
11182 * makefile.w32-in (OBJ2): Add xml.$(O).
11183 (GLOBAL_SOURCES): Add xml.c.
11184 ($(BLD)/xml.$(O)): New dependency list.
11185
11186 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
11187 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
11188 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
11189 [!WINDOWSNT]: New macros.
11190 (init_libxml2_functions, libxml2_loaded_p): New functions.
11191 (parse_region): Call fn_xmlCheckVersion instead of using the macro
11192 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
11193 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
11194 Calls xmlCleanupParser only if libxml2 was loaded (or statically
11195 linked in).
6bbef4e5
JC
11196 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
11197 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
11198 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
11199
11200 * emacs.c: Don't include libxml/parser.h.
11201 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
11202 xmlCleanupParser directly.
11203
11204 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
11205
3811fdf3
EZ
112062012-04-07 Eli Zaretskii <eliz@gnu.org>
11207
11208 * indent.c (Fvertical_motion): If there is a display string at
11209 point, use it.vpos to compute how many lines to backtrack after
11210 move_it_to point. (Bug#11133)
11211
2f8e16b2
EZ
112122012-04-06 Eli Zaretskii <eliz@gnu.org>
11213
11214 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
11215 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
11216 about subtle differences between FETCH_CHAR* and STRING_CHAR*
11217 macros related to unification of CJK characters. For the details,
11218 see the discussion following the message here:
11219 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
11220
3d439cd1
CY
112212012-04-04 Chong Yidong <cyd@gnu.org>
11222
11223 * keyboard.c (Vdelayed_warnings_list): Doc fix.
11224
8bc53d00
EZ
112252012-04-01 Eli Zaretskii <eliz@gnu.org>
11226
11227 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
11228 instead of alloca. (Bug#11138)
11229
3b0512a3
AS
112302012-04-01 Andreas Schwab <schwab@linux-m68k.org>
11231
11232 * w32menu.c (is_simple_dialog): Properly check lisp types.
11233 (Bug#11141)
11234
8427ddd2
EZ
112352012-03-31 Eli Zaretskii <eliz@gnu.org>
11236
979022ef
EZ
11237 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
11238 position we get to after a call to move_it_to fails the
11239 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
11240 only if we wind up in a string from display property. (Bug#11063)
11241
a6b1c7cc
EZ
11242 * window.c (Fdelete_other_windows_internal): Invalidate the row
11243 and column information about mouse highlight, so that redisplay
11244 restores it after reallocating the glyph matrices. (Bug#7464)
11245
8427ddd2
EZ
11246 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
11247 string comes from a `display' text property, use the buffer
11248 position of that property as if we actually saw that position in
11249 the row's glyphs.
697ba24b
EZ
11250 (move_it_by_lines): Remove the assertion that
11251 "it->current_x == 0 && it->hpos == 0" which can be legitimately
11252 violated when there's a before-string at the beginning of a line.
11253 (Bug#11063)
8427ddd2 11254
65a0a738
EZ
112552012-03-30 Eli Zaretskii <eliz@gnu.org>
11256
11257 * xdisp.c (append_space_for_newline): If the default face was
11258 remapped, use the remapped face for the appended newline.
11259 (extend_face_to_end_of_line): Use the remapped default face for
11260 extending the face to the end of the line.
11261 (display_line): Call extend_face_to_end_of_line when the default
11262 face was remapped. (Bug#11068)
11263
581355cc
EZ
112642012-03-29 Eli Zaretskii <eliz@gnu.org>
11265
11266 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
11267
e8fc049f
SM
112682012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
11269
11270 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
11271
4fb9a543
GM
112722012-03-27 Glenn Morris <rgm@gnu.org>
11273
11274 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
11275 Doc fixes.
11276
679910f1
KH
112772012-03-26 Kenichi Handa <handa@m17n.org>
11278
11279 * dispextern.h (struct glyph): Fix previous change. Change the
11280 bit length of glyphless.ch to 25 (Bug#11082).
11281
90d49b7f
CY
112822012-03-26 Chong Yidong <cyd@gnu.org>
11283
11284 * keyboard.c (Vselection_inhibit_update_commands): New variable.
11285 (command_loop_1): Use it; inhibit selection update for
11286 handle-select-window too (Bug#8996).
11287
f514f6f0
FP
112882012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
11289
e8fc049f 11290 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 11291
bf43fa51
KH
112922012-03-25 Kenichi Handa <handa@m17n.org>
11293
11294 * dispextern.h (struct glyph): Change the bit length of
11295 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
11296
8a0c01dd
EZ
112972012-03-24 Eli Zaretskii <eliz@gnu.org>
11298
11299 * s/ms-w32.h (tzname): Include time.h before redirecting to
11300 _tzname. Fixes the MSVC build. (Bug#9960)
11301
7d1c3a76
AS
113022012-03-24 Andreas Schwab <schwab@linux-m68k.org>
11303
8ed79523
AS
11304 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
11305 characters.
11306
7d1c3a76
AS
11307 * xterm.c (XTread_socket): Only modify handling_signal if
11308 !SYNC_INPUT. (Bug#11080)
11309
e99a9b8b
EZ
113102012-03-23 Eli Zaretskii <eliz@gnu.org>
11311
11312 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
11313 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
11314 when fetching a multibyte character consumes more bytes than
11315 CHAR_BYTES returns, due to unification of CJK characters in
11316 string_char. (Bug#11073)
11317
5063c0e1
TN
113182012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
11319
11320 * process.c (wait_reading_process_output): Handle pty disconnect
11321 by refraining from sending oneself a SIGCHLD (bug#10933).
11322
9f851fbd
CY
113232012-03-22 Chong Yidong <cyd@gnu.org>
11324
11325 * dispextern.h (struct it): New member string_from_prefix_prop_p.
11326
5063c0e1 11327 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
11328 Mark string as coming from a prefix property.
11329 (handle_face_prop): Use default face for prefix strings (Bug#4281).
11330 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
11331
fb5b8aca
CY
113322012-03-21 Chong Yidong <cyd@gnu.org>
11333
11334 * xfaces.c (Vface_remapping_alist): Doc fix.
11335
62356a1b
EZ
113362012-03-20 Eli Zaretskii <eliz@gnu.org>
11337
11338 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
11339 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
11340 Doc fixes.
62356a1b 11341
025de85b
CY
113422012-03-20 Chong Yidong <cyd@gnu.org>
11343
11344 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
11345 to reflect default non-nil value of redisplay-dont-pause.
11346
4827f94e
KH
113472012-03-19 Kenichi Handa <handa@m17n.org>
11348
11349 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
11350 it fit in a valid range (Bug#11003).
11351
e50a24a2
EZ
113522012-03-18 Eli Zaretskii <eliz@gnu.org>
11353
11354 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
11355 that is not from display property, accept the row as a "cursor
11356 row" if one of the string's character has a non-nil `cursor'
11357 property. Fixes cursor positioning when there are newlines in
11358 overlay strings, e.g. in icomplete.el. (Bug#11035)
11359
9af5ed87
PE
113602012-03-12 Paul Eggert <eggert@cs.ucla.edu>
11361
11362 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
11363
d1f55f16
CY
113642012-03-12 Chong Yidong <cyd@gnu.org>
11365
11366 * eval.c (inhibit_lisp_code): Rename from
11367 inhibit_window_configuration_change_hook; move from window.c.
11368
11369 * xfns.c (unwind_create_frame_1, Fx_create_frame):
11370 * window.c (run_window_configuration_change_hook)
11371 (syms_of_window): Callers changed.
11372
66c5eebd
CY
113732012-03-11 Chong Yidong <cyd@gnu.org>
11374
413df973
CY
11375 * keymap.c (Fkey_description): Doc fix (Bug#9700).
11376
66c5eebd
CY
11377 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
11378
1de11f56
CY
113792012-03-10 Chong Yidong <cyd@gnu.org>
11380
11381 * frame.c (other_visible_frames): Don't assume the selected frame
11382 is visible (Bug#10955).
11383
cae07000
SM
113842012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
11385
11386 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
11387
89c94350
JD
113882012-03-08 Jan Djärv <jan.h.d@swipnet.se>
11389
11390 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
11391 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
11392 zero (Bug#10954).
11393
999dd333
GM
113942012-03-03 Glenn Morris <rgm@gnu.org>
11395
01a6dcc8 11396 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 11397
de0100f2
EZ
113982012-03-02 Eli Zaretskii <eliz@gnu.org>
11399
11400 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
11401 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
11402 (redisplay_window, next_element_from_string): Fix typos in
11403 comments.
3e441275
EZ
11404 (redisplay_window): Pass to move_it_vertically the margin in
11405 pixels, not in screen lines.
de0100f2 11406
96a72ee9
GM
114072012-03-02 Glenn Morris <rgm@gnu.org>
11408
11409 * buffer.c (buffer-list-update-hook): Doc fix.
11410
312508d7
EZ
114112012-02-29 Eli Zaretskii <eliz@gnu.org>
11412
11413 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
11414 push_it before setting up the iterator for the first overlay
11415 string, even if we have an empty string loaded.
11416 (next_overlay_string): If there's an empty string on the iterator
11417 stack, pop the stack. (Bug#10903)
11418
27f3c637
PE
114192012-02-25 Paul Eggert <eggert@cs.ucla.edu>
11420
11421 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
11422 Suggested by Stefan Monnier in
11423 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
11424 * alloc.c (widen_to_Lisp_Object): New static function.
11425 (mark_memory): Also mark Lisp_Objects by fetching pointer words
11426 and widening them to Lisp_Objects. This would work even if
11427 USE_LSB_TAG is defined and wide integers are used, which might
11428 happen in a future version of Emacs.
11429
3c9dfce6
CY
114302012-02-25 Chong Yidong <cyd@gnu.org>
11431
fa74b241
CY
11432 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
11433 Doc fix.
11434
3c9dfce6
CY
11435 * xselect.c (Fx_selection_exists_p): Doc fix.
11436 (x_clipboard_manager_save_all): Print an informative message
11437 before saving to clipboard manager.
11438
9486df08
CY
114392012-02-24 Chong Yidong <cyd@gnu.org>
11440
11441 * keyboard.c (process_special_events): Handle all X selection
11442 requests in kbd_buffer, not just the next one (Bug#8869).
11443
f01d3321
CY
114442012-02-23 Chong Yidong <cyd@gnu.org>
11445
11446 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
11447 call when setting menu-bar-lines and tool-bar-lines parameters.
11448 (unwind_create_frame_1): New helper function.
11449
11450 * window.c (inhibit_window_configuration_change_hook): New var.
11451 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 11452 (syms_of_window): Initialize it.
f01d3321 11453
86b847b6
CY
114542012-02-22 Chong Yidong <cyd@gnu.org>
11455
11456 * xterm.c (x_draw_image_relief): Add missing type check for
11457 Vtool_bar_button_margin (Bug#10743).
11458
a59225b1
CY
114592012-02-21 Chong Yidong <cyd@gnu.org>
11460
11461 * fileio.c (Vfile_name_handler_alist): Doc fix.
11462
11463 * buffer.c (Fget_file_buffer): Protect against invalid file
11464 handler return value.
11465
310f5bd4
PE
114662012-02-20 Paul Eggert <eggert@cs.ucla.edu>
11467
cb3a28cc
PE
11468 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
11469 when computing $valmask.
11470
310f5bd4
PE
11471 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
11472 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
11473 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
11474 It's useless in that case, and it can cause problems on hosts
11475 that allocate halves of EMACS_INT values separately.
11476 Reported by Dan Horák. Diagnosed by Andreas Schwab in
11477 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
11478 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
11479 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
11480 it avoids undefined behavior on hosts where shifting right by more
11481 than the word width has undefined behavior.
11482
2375c96a
CY
114832012-02-19 Chong Yidong <cyd@gnu.org>
11484
11485 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
11486 (Funhandled_file_name_directory, Ffile_name_as_directory)
11487 (Fdirectory_file_name, Fexpand_file_name)
11488 (Fsubstitute_in_file_name): Protect against invalid file handler
11489 return values (Bug#10845).
11490
3eb49e71
EZ
114912012-02-18 Eli Zaretskii <eliz@gnu.org>
11492
11493 * .gdbinit (pitx): Fix incorrect references to fields of the
11494 iterator stack.
11495
7b926f3f
CY
114962012-02-17 Chong Yidong <cyd@gnu.org>
11497
11498 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
11499
11273115
PE
115002012-02-15 Paul Eggert <eggert@cs.ucla.edu>
11501
11502 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
11503 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
11504
c3a70e2b
CY
115052012-02-15 Chong Yidong <cyd@gnu.org>
11506
11507 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
11508 marked as special. Also, starting docstrings with * is obsolete.
11509
0ca43699
AS
115102012-02-13 Andreas Schwab <schwab@linux-m68k.org>
11511
11512 * gnutls.c (emacs_gnutls_write): Fix last change.
11513
2e8f3c56
LI
115142012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
11515
11516 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
11517 send_process.
11518
af70074f
SM
115192012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
11520
11521 * keymap.c (Fsingle_key_description): Handle char ranges.
11522
95986d52
CY
115232012-02-12 Chong Yidong <cyd@gnu.org>
11524
afd83bd1
CY
11525 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
11526 as that creates a dangerous corner case.
11527
95986d52
CY
11528 * window.c (Fdelete_window_internal): Invalidate the mouse
11529 highlight (Bug#9904).
11530
bd7da63e
GM
115312012-02-12 Glenn Morris <rgm@gnu.org>
11532
11533 * xselect.c (Fx_own_selection_internal)
11534 (Fx_get_selection_internal, Fx_disown_selection_internal)
11535 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
11536 * nsselect.m (Fx_own_selection_internal)
11537 (Fx_disown_selection_internal, Fx_selection_exists_p)
11538 (Fx_selection_owner_p, Fx_get_selection_internal):
11539 Sync docs and argument specs with the xselect.c versions.
11540
77abcbc2
LI
115412012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
11542
11543 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
11544
90b671e2
EZ
115452012-02-11 Eli Zaretskii <eliz@gnu.org>
11546
1c0ca0b7
EZ
11547 * w32select.c (Fx_selection_exists_p): Sync doc string and
11548 argument list with xselect.c. (Bug#10783)
11549
11550 * w16select.c (Fx_selection_exists_p): Sync doc string and
11551 argument list with xselect.c. (Bug#10783)
90b671e2 11552
49241268
GM
115532012-02-10 Glenn Morris <rgm@gnu.org>
11554
11555 * fns.c (Fsecure_hash): Doc fix.
11556
f998bbe7 115572012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
11558
11559 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
11560
0992bd9c
CY
115612012-02-07 Chong Yidong <cyd@gnu.org>
11562
11563 * buffer.c (Fbuffer_local_variables)
11564 (buffer_lisp_local_variables): Handle unbound vars correctly;
11565 don't let Qunbound leak into Lisp.
11566
af008560
GM
115672012-02-07 Glenn Morris <rgm@gnu.org>
11568
dd605cc4
GM
11569 * image.c (Fimagemagick_types): Doc fix.
11570
af008560
GM
11571 * image.c (imagemagick-render-type): Change it from a lisp object
11572 to an integer. Move the doc here from the lisp manual.
11573 Treat all values not equal to 0 the same.
11574
1449fa1d
CY
115752012-02-06 Chong Yidong <cyd@gnu.org>
11576
11577 * doc.c (store_function_docstring): Avoid applying docstring of
11578 alias to base function (Bug#2603).
11579
3723ec07
AS
115802012-02-04 Andreas Schwab <schwab@linux-m68k.org>
11581
11582 * .gdbinit (pp1, pv1): Remove redundant defines.
11583 (pr): Use pp.
11584
79c1cc1e
CY
115852012-02-04 Chong Yidong <cyd@gnu.org>
11586
11587 * nsterm.m: Declare a global (Bug#10694).
11588
d7f29f8e
EZ
115892012-02-04 Eli Zaretskii <eliz@gnu.org>
11590
cae07000
SM
11591 * w32.c (get_emacs_configuration_options):
11592 Include --enable-checking, if specified, in the return value.
d7f29f8e 11593
3b95a6f9
MR
115942012-02-04 Martin Rudalics <rudalics@gmx.at>
11595
11596 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
11597 after rounding frame sizes. (Bug#9723)
11598
d6fa96a6
EZ
115992012-02-04 Eli Zaretskii <eliz@gnu.org>
11600
11601 * keyboard.c (adjust_point_for_property): Don't position point
11602 before BEGV. (Bug#10696)
11603
df0b2940
PE
116042012-02-03 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 Handle overflow when computing char display width (Bug#9496).
11607 * character.c (char_width): Return EMACS_INT, not int.
11608 (char_width, c_string_width): Check for overflow when
11609 computing the width; this is possible now that individual
11610 characters can have unbounded width. Problem introduced
11611 by merge from Emacs 23 on 2012-01-19.
11612
6bee44d6
MA
116132012-02-02 Michael Albinus <michael.albinus@gmx.de>
11614
11615 * dbusbind.c (Fdbus_register_method): Mention the return value
11616 :ignore in the docstring.
11617
44f92739
GM
116182012-02-02 Glenn Morris <rgm@gnu.org>
11619
1b9f60cc
GM
11620 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
11621
44f92739
GM
11622 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11623 Unconditionally set to t. (Bug#10673)
11624 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11625 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
11626 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
11627
c5d3843c
KH
116282012-02-02 Kenichi Handa <handa@m17n.org>
11629
11630 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
11631 0, do not call append_composite_glyph.
11632
159462d4 116332012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
11634
11635 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
11636 NULL (Bug#6988).
11637 (x_produce_glyphs): If the component of a composition is a null
11638 string, set it->pixel_width to 1 to avoid zero-width glyph.
11639
78cef877
EZ
116402012-02-01 Eli Zaretskii <eliz@gnu.org>
11641
11642 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
11643 first 2 arguments are identical. This makes inserting large
11644 output from a subprocess an order of magnitude faster on
11645 MS-Windows, where all sbrk'ed memory is always contiguous.
11646
97897668
GM
116472012-01-31 Glenn Morris <rgm@gnu.org>
11648
11649 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 11650 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
11651 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
11652
31fd3586
GM
116532012-01-29 Glenn Morris <rgm@gnu.org>
11654
11655 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
11656
0e24a8b2
CY
116572012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
11658
11659 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
11660
cc0adcb0
CY
116612012-01-28 Chong Yidong <cyd@gnu.org>
11662
11663 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
11664
acc28cb9
CY
116652012-01-26 Chong Yidong <cyd@gnu.org>
11666
9c69cfb7
CY
11667 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
11668
acc28cb9
CY
11669 * search.c (Fsearch_forward, Fsearch_backward): Document negative
11670 repeat counts (Bug#10507).
11671
48da7392
GM
116722012-01-26 Glenn Morris <rgm@gnu.org>
11673
11674 * lread.c (syms_of_lread): Doc fix.
11675
14af5f7f
CY
116762012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
11677
11678 * coding.c (encode_designation_at_bol): Change return value to
11679 EMACS_INT.
11680
0b21c100
CY
116812012-01-25 Chong Yidong <cyd@gnu.org>
11682
11683 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
11684
3c2907f7
CY
116852012-01-21 Chong Yidong <cyd@gnu.org>
11686
11687 * floatfns.c (Fcopysign): Make the second argument non-optional,
11688 since nil is not allowed anyway.
11689
959ad23f
AS
116902012-01-21 Andreas Schwab <schwab@linux-m68k.org>
11691
11692 * process.c (read_process_output): Use p instead of XPROCESS (proc).
11693 (send_process): Likewise.
11694
34a02f46
MR
116952012-01-19 Martin Rudalics <rudalics@gmx.at>
11696
11697 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
11698 (Vwindow_persistent_parameters): Do not use Qstate.
11699 Rewrite doc-strings.
34a02f46 11700
1259009a 117012012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
11702
11703 * character.c (char_width): New function.
70d4fdf6
GM
11704 (Fchar_width, c_string_width, lisp_string_width):
11705 Use char_width (Bug#9496).
25ed9e61 11706
6a6ee00d
MR
117072012-01-16 Martin Rudalics <rudalics@gmx.at>
11708
11709 * window.c (Vwindow_persistent_parameters): New variable.
11710 (Fset_window_configuration, save_window_save): Handle persistent
11711 window parameters.
11712
c85efaf7
EZ
117132012-01-14 Eli Zaretskii <eliz@gnu.org>
11714
11715 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
11716 thrashing the stack of the thread. (Bug#9087)
11717
5944709e
PE
117182012-01-12 Paul Eggert <eggert@cs.ucla.edu>
11719
11720 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
11721
e71f5d99
EZ
117222012-01-11 Eli Zaretskii <eliz@gnu.org>
11723
11724 * xdisp.c (rows_from_pos_range): Handle the case where the
11725 highlight ends on a newline. (Bug#10464)
11726 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
11727 he end column for display of highlight that ends on a newline
11728 before a R2L line.
11729
ce316182
GM
117302012-01-11 Glenn Morris <rgm@gnu.org>
11731
11732 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
11733 from load-path also when installation-directory is nil. (Bug#10208)
11734
5b43da69
GM
117352012-01-10 Glenn Morris <rgm@gnu.org>
11736
74cc8ff9
GM
11737 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
11738
7d8d6e4e
GM
11739 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
11740 Update template values to be closer to their typical values these days.
5b43da69 11741
a0db8d43
EZ
117422012-01-09 Eli Zaretskii <eliz@gnu.org>
11743
11744 * xdisp.c (rows_from_pos_range): Accept additional argument
11745 DISP_STRING, and accept any glyph in a row whose object is that
11746 string as eligible for mouse highlight. Fixes mouse highlight of
11747 display strings from overlays. (Bug#10464)
11748
9a0115ab 117492012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 11750
b9110d6a 11751 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
11752 * fileio.c (auto_saving_dir_umask): New static var.
11753 (Fmake_directory_internal): Use it.
11754 (do_auto_save_make_dir): Set it, instead of invoking chmod after
11755 creating the directory. The old code temporarily assigns
11756 too-generous permissions to the directory.
11757 (do_auto_save_eh): Clear it.
b9110d6a 11758 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
11759 that the var is always cleared.
11760
6c1bd3f3
EZ
117612012-01-07 Eli Zaretskii <eliz@gnu.org>
11762
11763 * search.c (scan_buffer): Pass character positions to
11764 know_region_cache, not byte positions. (Bug#6540)
11765
069d2b50
L
117662012-01-07 LynX <_LynX@bk.ru> (tiny change)
11767
11768 * w32.c (sys_rename): Report EXDEV when rename of a directory
11769 fails because the target is on another logical disk. (Bug#10284)
11770
75bf0d33
DB
117712012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
11772
11773 * xterm.c (x_embed_request_focus): New function.
11774
11775 * xterm.h: Add prototype.
11776
11777 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
11778
1c6e5a32
GM
117792012-01-05 Glenn Morris <rgm@gnu.org>
11780
11781 * emacs.c (emacs_copyright): Update short copyright year to 2012.
11782
651e947e
EZ
117832012-01-01 Eli Zaretskii <eliz@gnu.org>
11784
11785 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
11786 Load gnutls_transport_set_lowat only if GnuTLS version is below
11787 2.11.1.
11788 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
11789 GnuTLS versions below 2.11.1.
11790
3778cdd8
AL
117912011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
11792
11793 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
11794 to the doc string advising against its use for altering the way
11795 windows are scrolled.
11796
0e5317f7
KH
117972011-12-28 Kenichi Handa <handa@m17n.org>
11798
11799 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
11800 coding-system ASCII compatible only when it does not produce BOM
11801 on encoding (Bug#10383).
11802
93d5ca1f
JD
118032011-12-26 Jan Djärv <jan.h.d@swipnet.se>
11804
11805 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
11806 can scroll.
11807 (create_and_show_popup_menu): Always use menu_position_func for
11808 Gtk3 (Bug#10361).
11809
ca22b785
AS
118102011-12-24 Andreas Schwab <schwab@linux-m68k.org>
11811
11812 * callint.c (Fcall_interactively): Don't truncate prompt string.
11813
d048e1e6
EZ
118142011-12-23 Eli Zaretskii <eliz@gnu.org>
11815
11816 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
11817 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 11818 resumed from there (after widening). (Bug#10360)
d048e1e6 11819
5ccaba1f
JD
118202011-12-22 Jan Djärv <jan.h.d@swipnet.se>
11821
11822 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
11823
204ee57f
JD
118242011-12-21 Jan Djärv <jan.h.d@swipnet.se>
11825
b81d40f0
JB
11826 * nsterm.m (x_free_frame_resources):
11827 Release f->output_data.ns->miniimage.
204ee57f
JD
11828 (ns_index_color): Fix indentation. Do not retain
11829 color_table->colors[i].
11830
11831 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
11832 before returning.
11833
11834 * nsfns.m (x_set_background_color): Assign return value from
11835 ns_index_color to face-background instead of NSColor*.
11836 (ns_implicitly_set_icon_type): Fix indentation.
11837 Change assignment in for loop to comparison.
11838
11839 * emacs.c (ns_pool): New variable.
11840 (main): Assign ns_pool.
11841 (Fkill_emacs): Call ns_release_autorelease_pool.
11842
11843 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
11844 autorelease fdesc, release fdAttrs and tdict.
11845 (ns_get_covering_families): Release charset.
11846 (ns_findfonts): Release NSFontDescriptor created with new.
11847 (ns_uni_to_glyphs): Fix indentation.
11848 (setString): Release attrStr before assigning new value.
11849
c803b2b7
JD
118502011-12-18 Jan Djärv <jan.h.d@swipnet.se>
11851
678f4426
JD
11852 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
11853 and NS_IMPL_COCOA.
11854 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
11855 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
11856
cd394be1 118572011-12-18 David Reitter <reitter@cmu.edu>
678f4426 11858
5fecd5fc
JD
11859 * nsterm.m (ns_term_init): Subscribe for notifications
11860 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
11861 to method trackingNotification in EmacsMenu.
11862
11863 * nsmenu.m (trackingMenu): New variable.
3771cb17 11864 (trackingNotification): New method (from Aquamacs).
5fecd5fc 11865 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 11866 from Aquamacs (Bug#7030).
678f4426
JD
11867
118682011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 11869
c803b2b7
JD
11870 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
11871 (symbol_to_nsstring): Fix indentation.
11872 (ns_symbol_to_pb): New function.
cae07000
SM
11873 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
11874 (Fns_rotate_cut_buffers_internal): Remove.
11875 (Fns_store_selection_internal): Rename from
c803b2b7
JD
11876 Fns_store_cut_buffer_internal.
11877 (ns_get_foreign_selection, Fx_own_selection_internal)
11878 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
11879 (Fns_get_selection_internal, Fns_store_selection_internal):
11880 Use ns_symbol_to_pb and check if return value is nil.
11881 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
11882 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
11883 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
11884 renamed to Sns_store_selection_internal.
11885 (ns_handle_selection_request): Move code to Fx_own_selection_internal
11886 and remove this function.
11887 (ns_handle_selection_clear): Remove, never used.
11888 (Fx_own_selection_internal): Move code from ns_handle_selection_request
11889 here.
11890
e1b01a3a
KB
118912011-12-17 Ken Brown <kbrown@cornell.edu>
11892
11893 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
11894 GID is unknown (Bug#10257).
11895
2adb6e85
PE
118962011-12-17 Paul Eggert <eggert@cs.ucla.edu>
11897
11898 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
11899 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
11900 which caused a build failure on GNU/Linux IA-64. This problem was
11901 introduced by my 2011-10-07 patch.
11902
d1d7b339
JL
119032011-12-15 Juri Linkov <juri@jurta.org>
11904
11905 * image.c (imagemagick_error): New function. (Bug#10112)
11906 (imagemagick_load_image): Comment out `MagickSetResolution' call.
11907 Use `imagemagick_error' where ImageMagick functions return
11908 `MagickFalse'.
11909 (Fimagemagick_types): Add `Fnreverse' to return the list in the
11910 proper order.
11911
100d5755
KH
119122011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11913
11914 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
11915 fill background (Bug#8992).
11916
454592a6
MR
119172011-12-13 Martin Rudalics <rudalics@gmx.at>
11918
11919 * window.c (Vwindow_combination_resize)
11920 (Vwindow_combination_limit): Use t instead of non-nil in
11921 doc-strings.
61d4b438
MR
11922 (Vrecenter_redisplay): Add first sentence of doc-string on
11923 separate line.
53524d93 11924 (Frecenter): Fix doc-string typo.
454592a6 11925
3633e3aa
KH
119262011-12-11 Kenichi Handa <handa@m17n.org>
11927
11928 * coding.c (Funencodable_char_position): Pay attention to the
11929 buffer text relocation (Bug#9389).
11930
7b9d523a 119312011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 11932
7b9d523a
JD
11933 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
11934 gtk_init (Bug#10100).
11935
b73189c6
EZ
119362011-12-10 Eli Zaretskii <eliz@gnu.org>
11937
11938 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
11939 IT->string is nil. (Bug#10263)
11940
f7dfe5d6
JD
119412011-12-10 Jan Djärv <jan.h.d@swipnet.se>
11942
83faebb4
JD
11943 * nsterm.h (x_free_frame_resources): Declare.
11944
f7dfe5d6
JD
11945 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
11946 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
11947
11948 * nsterm.h (ns_get_defaults_value): Declare.
11949
11950 * nsterm.m (ns_default): Call ns_get_defaults_value.
11951
7cd4e72c
EZ
119522011-12-09 Eli Zaretskii <eliz@gnu.org>
11953
11954 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
11955 (Bug#10170)
11956
b34d7317
YM
119572011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11958
11959 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
11960 that where the value of an _OBJC_* symbol points to is in the .bss
11961 section (Bug#10240).
11962
76470ad1
KH
119632011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
11964
11965 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 11966 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 11967
745fff94
KH
119682011-12-08 Kenichi Handa <handa@m17n.org>
11969
11970 * ftfont.c (get_adstyle_property): Fix previous change
11971 (Bug#10233).
11972
6e44397c
JB
119732011-12-07 Juanma Barranquero <lekktu@gmail.com>
11974
11975 * w32.c (init_environment): If no_site_lisp, remove site-lisp
11976 dirs from the default value of EMACSLOADPATH (bug#10208).
11977
7efa6272
GM
119782011-12-07 Glenn Morris <rgm@gnu.org>
11979
11980 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
11981 installation and source directories as well. (Bug#10208)
11982
f6fc4d87
CY
119832011-12-06 Chong Yidong <cyd@gnu.org>
11984
11985 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
11986
2bf26180
GM
119872011-12-06 Glenn Morris <rgm@gnu.org>
11988
11989 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
11990 as an error, not just -1. (Bug#10217)
11991
3a6ad4f0
CY
119922011-12-05 Chong Yidong <cyd@gnu.org>
11993
11994 * keyboard.c (process_special_events): New function.
11995 (swallow_events, Finput_pending_p): Use it (Bug#10195).
11996
75a3b399
PE
119972011-12-05 Paul Eggert <eggert@cs.ucla.edu>
11998
11999 * coding.c (encode_designation_at_bol): Don't use uninitialized
12000 local variable (Bug#9318).
12001
c3c9e25e
KH
120022011-12-05 Kenichi Handa <handa@m17n.org>
12003
12004 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
12005 return Qnil (Bug#8046, Bug#10193).
12006
5eb05ea3
KH
120072011-12-05 Kenichi Handa <handa@m17n.org>
12008
12009 * coding.c (encode_designation_at_bol): New args charbuf_end and
12010 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
12011 (coding_set_source): Return how many bytes coding->source was
12012 relocated.
12013 (coding_set_destination): Return how many bytes
12014 coding->destination was relocated.
12015 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 12016 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
12017
120182011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12019
12020 * coding.c (CODING_CHAR_CHARSET_P): New macro.
12021 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
12022 macro (Bug#9318).
12023
120242011-12-05 Andreas Schwab <schwab@linux-m68k.org>
12025
12026 The following changes are to fix Bug#9318.
12027
a79703f5 12028 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
12029 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
12030 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 12031 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 12032
7dbda6df
JB
120332011-12-05 Juanma Barranquero <lekktu@gmail.com>
12034
12035 * lisp.h (process_quit_flag): Fix external declaration.
12036
6d5eb5b0
SM
120372011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
12038
12039 Don't macro-inline non-performance-critical code.
12040 * eval.c (process_quit_flag): New function.
12041 * lisp.h (QUIT): Use it.
12042
a0c3fad0
JD
120432011-12-04 Jan Djärv <jan.h.d@swipnet.se>
12044
12045 * nsfns.m (get_geometry_from_preferences): New function.
12046 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
12047
6c07aac2
AS
120482011-12-04 Andreas Schwab <schwab@linux-m68k.org>
12049
12050 * emacs.c (Qkill_emacs): Define.
12051 (syms_of_emacs): Initialize it.
12052 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
12053 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
12054 (quit_throw_to_read_char): Add parameter `from_signal'.
12055 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
12056 * lisp.h (QUIT): Call Fkill_emacs if requested.
12057
c052ead4
JD
120582011-12-03 Jan Djärv <jan.h.d@swipnet.se>
12059
12060 * widget.c (update_wm_hints): Return if wmshell is null.
12061 (widget_update_wm_size_hints): New function.
12062
12063 * widget.h (widget_update_wm_size_hints): Declare.
12064
12065 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
12066 widget_update_wm_size_hints (Bug#10104).
12067
9e49252b
EZ
120682011-12-03 Eli Zaretskii <eliz@gnu.org>
12069
12070 * xdisp.c (handle_invisible_prop): If the invisible text ends just
12071 before a newline, prepare the bidi iterator for consuming the
12072 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 12073 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 12074
02b16839
JL
120752011-12-02 Juri Linkov <juri@jurta.org>
12076
12077 * search.c (Fword_search_regexp): New Lisp function created from
12078 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
12079 (Fword_search_backward, Fword_search_forward)
12080 (Fword_search_backward_lax, Fword_search_forward_lax):
12081 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
12082 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
12083
0068070e
SM
120842011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
12085
12086 * fileio.c (Finsert_file_contents): Move after-change-function call
12087 to before the "handled:" label, since all "goto handled" appear in
12088 cases where the *-change-functions have already been properly called
12089 (bug#10117).
12090
3360a3fc
AS
120912011-12-01 Andreas Schwab <schwab@linux-m68k.org>
12092
12093 * keyboard.c (interrupt_signal): Don't call kill-emacs when
12094 waiting for input. (Bug#10169)
12095
73d6c093
EZ
120962011-11-30 Eli Zaretskii <eliz@gnu.org>
12097
12098 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
12099 verifies glyph row's hash code--we have just reallocated the
12100 glyphs, so their contents can be complete garbage. (Bug#10164)
12101
febe6bea
JB
121022011-11-30 Juanma Barranquero <lekktu@gmail.com>
12103
12104 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
12105
801a4313
EZ
121062011-11-30 Eli Zaretskii <eliz@gnu.org>
12107
12108 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
12109 attributes are tested _before_ calling verify_row_hash, to protect
12110 against GCC re-ordering of the tests. (Bug#10164)
12111
2b56b87e
JD
121122011-11-29 Jan Djärv <jan.h.d@swipnet.se>
12113
12114 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
12115
12116 * xterm.c (handle_one_xevent): Only set async_visible and friends
12117 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 12118 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
12119 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
12120
dbf31225
PE
121212011-11-28 Paul Eggert <eggert@cs.ucla.edu>
12122
12123 Remove GCPRO-related macros that exist only to avoid shadowing locals.
12124 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
12125 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
12126 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
12127 All uses changed to use GCPRO1 etc.
12128 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
12129 Revert to old implementation (i.e., before 2011-03-11).
12130
1305621b
YM
121312011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12132
12133 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
12134 of scroll runs so as to avoid assigning disabled bogus rows and
12135 unnecessary graphics copy operations.
12136
8c9afb46
EZ
121372011-11-27 Eli Zaretskii <eliz@gnu.org>
12138
12139 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
12140 (snprintf) [_MSC_VER]: Redirect to _snprintf.
12141 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
12142 (malloc, free, realloc, calloc): Redirect to e_* only when
12143 compiling Emacs.
12144
12145 * lisp.h (GCTYPEBITS): Move before first use.
12146 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
12147 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
12148 this macro definition.
12149
12150 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
12151 _MSC_VER.
12152
54e9e3bf
JD
121532011-11-27 Jan Djärv <jan.h.d@swipnet.se>
12154
6d5eb5b0
SM
12155 * gtkutil.c (xg_create_frame_widgets):
12156 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
12157 present with Gtk+ 2.0.
12158
83aca1cb
PE
121592011-11-26 Paul Eggert <eggert@cs.ucla.edu>
12160
12161 * fileio.c (Finsert_file_contents): Undo previous change; see
12162 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
12163
5b76caa4
PE
121642011-11-26 Paul Eggert <eggert@cs.ucla.edu>
12165
12166 Rename locals to avoid shadowing.
12167 * fileio.c (Finsert_file_contents):
12168 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
12169 * process.c (wait_reading_process_output):
12170 Rename inner 'proc' to 'p' to avoid shadowing.
12171 Indent for consistency with usual Emacs style.
12172
8c535114
EZ
121732011-11-25 Eli Zaretskii <eliz@gnu.org>
12174
12175 * xdisp.c (redisplay_window): If cursor row is not fully visible
12176 after recentering, and scroll-conservatively is set to a large
12177 number, scroll window by a few more lines to make the cursor fully
12178 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
12179 (start_display): Don't move to the next line if the display should
12180 start at a newline that is part of a display vector or an overlay
12181 string. (Bug#10119)
8c535114 12182
fa4fdb5c
JL
121832011-11-24 Juri Linkov <juri@jurta.org>
12184
12185 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
12186 after the `MagickPingImage' call. (Bug#10112)
12187
90ec88df
CY
121882011-11-23 Chong Yidong <cyd@gnu.org>
12189
12190 * window.c (Fcoordinates_in_window_p): Accept only live windows.
12191
56e2e794
MR
121922011-11-23 Martin Rudalics <rudalics@gmx.at>
12193
12194 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
12195 making another buffer current. (Bug#10114)
12196
b6e64c41
GM
121972011-11-23 Glenn Morris <rgm@gnu.org>
12198
12199 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
12200
6b21de18
CY
122012011-11-23 Chong Yidong <cyd@gnu.org>
12202
12203 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
12204 using it (Bug#5984).
12205
b12cd789
EZ
122062011-11-22 Eli Zaretskii <eliz@gnu.org>
12207
12208 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
12209 and header-lines, as they don't have one computed for them.
12210 (Bug#10098)
12211
12212 * .gdbinit (prow): Make displayed values more self-explaining.
12213 Add row's hash code.
12214
261b6fd4
LMI
122152011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
12216
12217 * process.c (wait_reading_process_output): Fix asynchrounous
12218 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 12219 (wait_reading_process_output): Add comment and URL.
261b6fd4 12220
e7cfd277
JD
122212011-11-21 Jan Djärv <jan.h.d@swipnet.se>
12222
12223 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
12224
a9b9b7f5
CY
122252011-11-21 Chong Yidong <cyd@gnu.org>
12226
12227 * window.c (Fnext_window, Fprevious_window): Doc fix.
12228
b0d15b4f
SM
122292011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12230
12231 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
12232
fe7a3057
JB
122332011-11-20 Juanma Barranquero <lekktu@gmail.com>
12234
12235 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
12236
d2999b1a
MR
122372011-11-20 Martin Rudalics <rudalics@gmx.at>
12238
12239 * window.c (Fset_window_combination_limit): Rename argument
12240 STATUS to LIMIT.
12241 (Vwindow_combination_limit): Remove "status" from doc-string.
12242
d5ff9cd0
AS
122432011-11-20 Andreas Schwab <schwab@linux-m68k.org>
12244
12245 * m/ibms390.h: Remove.
12246 * m/ibms390x.h: Don't include "ibms390.h".
12247
a5bb9bd3
SM
122482011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12249
12250 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
12251 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
12252
cd1181db
JB
122532011-11-20 Juanma Barranquero <lekktu@gmail.com>
12254
12255 * casetab.c (Fset_case_table):
12256 * charset.c (Fcharset_after): Fix typos.
12257
615a3b8d 122582011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 12259
17e845af
PE
12260 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
12261 Otherwise, valgrind does not work on some platforms.
12262 Problem reported by Andreas Schwab in
6a0bf43d
PE
12263 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
12264 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
12265 is set, removing the need for VIRT_ADDRESS_VARIES.
12266 (PURE_P): Use a more-efficient implementation that needs just one
12267 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
12268 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
12269 to 4 (xorl, subq, cmpq, setbe).
12270 * alloc.c (pure): Always extern now, since that's the
12271 VIRT_ADDR_VARIES behavior.
12272 (PURE_POINTER_P): Use a single comparison, not two, for
12273 consistency with the new puresize.h.
12274 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
12275 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
12276 Remove VIRT_ADDR_VARIES no longer needed.
12277
f8fe6f96
EZ
122782011-11-19 Eli Zaretskii <eliz@gnu.org>
12279
12280 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
12281 (erase_phys_cursor, update_window_cursor, show_mouse_face)
12282 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
12283 behave as if the cursor position were at the window margin.
12284
12285 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
12286 and the cursor position is out of bounds, behave as if the cursor
12287 position were at the window margin. (Bug#10075)
12288
df05a53c
CY
122892011-11-18 Chong Yidong <cyd@gnu.org>
12290
12291 * window.c (Fwindow_combination_limit): Make first argument
12292 non-optional, since it is meaningless for live windows like the
12293 selected window.
61ccba97 12294
2071918e
DA
122952011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
12296
12297 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
12298
b50a28de
SM
122992011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
12300
12301 * intervals.c: Fix grafting over the whole buffer (bug#10071).
12302 (graft_intervals_into_buffer): Simplify.
12303
015137db
EZ
123042011-11-18 Eli Zaretskii <eliz@gnu.org>
12305
12306 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
12307 hash values of the two rows.
12308 (copy_row_except_pointers): Preserve the used[] arrays and the
12309 hash values of the two rows. (Bug#10035)
68c95424 12310 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
12311
12312 * xdisp.c (row_hash): New function, body extracted from
12313 compute_line_metrics.
12314 (compute_line_metrics): Call row_hash, instead of computing the
12315 hash code inline.
12316
12317 * dispnew.c (verify_row_hash): Call row_hash for computing the
12318 hash code of a row, instead of duplicating code from xdisp.c.
12319
12320 * dispextern.h (row_hash): Add prototype.
12321
a2addb04
TH
123222011-11-18 Tassilo Horn <tassilo@member.fsf.org>
12323
12324 * frame.c (delete_frame): Don't delete the terminal when the last
12325 X frame is closed if emacs is built with GTK toolkit.
12326
df85d315
JB
123272011-11-17 Juanma Barranquero <lekktu@gmail.com>
12328
12329 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
12330
a0c2d0ae
MR
123312011-11-17 Martin Rudalics <rudalics@gmx.at>
12332
12333 * window.c (Vwindow_splits): Rename to
12334 Vwindow_combination_resize. Suggested by Juri Linkov.
12335 (Fsplit_window_internal): Use Vwindow_combination_resize instead
12336 of Vwindow_splits.
12337
58179cce
JB
123382011-11-16 Juanma Barranquero <lekktu@gmail.com>
12339
7877f373
JB
12340 * nsfns.m (Fns_font_name):
12341 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 12342
b6f67890
MR
123432011-11-16 Martin Rudalics <rudalics@gmx.at>
12344
12345 * window.h (window): Rename slot "nest" to "combination_limit".
12346 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
12347 (Fset_window_nest): Rename to Fset_window_combination_limit.
12348 (Vwindow_nest): Rename to Vwindow_combination_limit.
12349 (recombine_windows, make_parent_window, make_window)
12350 (Fsplit_window_internal, saved_window)
12351 (Fset_window_configuration, save_window_save): Rename all
12352 occurrences of window_nest to window_combination_limit.
12353
c7015153
JB
123542011-11-15 Juanma Barranquero <lekktu@gmail.com>
12355
12356 * image.c (imagemagick_load_image): Fix typo.
12357
322ad6ec
EZ
123582011-11-14 Eli Zaretskii <eliz@gnu.org>
12359
12360 * xdisp.c (display_line): Move the call to
12361 highlight_trailing_whitespace before the call to
12362 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
12363 faces of all the glyphs to compute ROW's hash value.
12364 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 12365
f067b8ec
JB
123662011-11-14 Juanma Barranquero <lekktu@gmail.com>
12367
12368 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
12369 just return (bug#10044).
12370
1e5b2111
EZ
123712011-11-12 Eli Zaretskii <eliz@gnu.org>
12372
7ef3cbd5
EZ
12373 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
12374 with user-defined heap size. Bump the default size of the temacs
12375 heap to 27MB, to avoid memory warning when running temacs.
12376 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
12377
1e5b2111
EZ
12378 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
12379 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
12380 (verify_row_hash) [XASSERTS]: New function.
12381 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
12382 that the hash value of glyph rows is correct.
1e5b2111 12383
89d61221
MR
123842011-11-12 Martin Rudalics <rudalics@gmx.at>
12385
12386 * window.h (window): Remove splits slot.
12387 * window.c (Fwindow_splits, Fset_window_splits): Remove.
12388 (Fdelete_other_windows_internal, make_parent_window)
12389 (make_window, Fsplit_window_internal, Fdelete_window_internal)
12390 (Fset_window_configuration, save_window_save): Don't deal with
12391 split status of windows.
12392 (saved_window): Remove splits slot.
12393 (Vwindow_splits): Rewrite doc-string.
12394
97f18cc8
JD
123952011-11-11 Jan Djärv <jan.h.d@swipnet.se>
12396
12397 * xfns.c (unwind_create_frame):
12398 * nsfns.m (unwind_create_frame):
12399 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
12400 Vframe_list (Bug#9999).
12401
22a648b4
DA
124022011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
12403
0b381c7e 12404 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 12405
659afede
KH
124062011-11-11 Kenichi Handa <handa@m17n.org>
12407
12408 * callproc.c (Fcall_process): Set the member dst_multibyte of
12409 process_coding.
12410
9ac0394b
KH
124112011-11-11 Johan Bockgård <bojohan@gnu.org>
12412
12413 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
12414 avoid a crash (bug#9496).
12415
2fbdc249
CY
124162011-11-09 Chong Yidong <cyd@gnu.org>
12417
12418 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
12419 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
12420
ac6b1f81
PE
124212011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12422
12423 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
12424
09db192c
PE
124252011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12426
12427 Avoid some portability problems by eschewing 'extern inline' functions.
12428 The trivial performance wins aren't worth the portability hassles; see
12429 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
12430 et seq.
12431 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12432 (window_box_width, window_box_left, window_box_left_offset)
12433 (window_box_right, window_box_right_offset): Undo previous change,
12434 by removing the "extern"s.
12435 * intervals.c (adjust_intervals_for_insertion)
12436 (adjust_intervals_for_deletion): Undo previous change,
12437 making these static again.
12438 (offset_intervals, temp_set_point_both, temp_set_point)
12439 (copy_intervals_to_string): No longer inline.
12440 * xdisp.c (window_text_bottom_y, window_box_width)
12441 (window_box_height, window_box_left_offset)
12442 (window_box_right_offset, window_box_left, window_box_right)
12443 (window_box): No longer inline.
12444
105216ed
CY
124452011-11-08 Chong Yidong <cyd@gnu.org>
12446
12447 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
12448 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
12449 Signal an error if not a live window.
105216ed
CY
12450 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
12451 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
12452
ae9e237f
JB
124532011-11-07 Juanma Barranquero <lekktu@gmail.com>
12454
12455 * lisp.h (syms_of_abbrev): Remove declaration.
12456 Reported by CHENG Gao <chenggao@royau.me>.
12457
c7aa8333
EZ
124582011-11-07 Eli Zaretskii <eliz@gnu.org>
12459
12460 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
12461 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
12462 of temacs in GUI mode.
12463
be7f5545
MR
124642011-11-07 Martin Rudalics <rudalics@gmx.at>
12465
12466 * window.h: Declare delete_all_child_windows instead of
12467 delete_all_subwindows.
12468 * window.c (Fwindow_nest, Fset_window_nest)
12469 (Fset_window_new_total, Fset_window_new_normal)
12470 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
12471 (delete_all_subwindows): Rename to delete_all_child_windows.
12472 (Fdelete_other_windows_internal, Fset_window_configuration):
12473 Call delete_all_child_windows instead of delete_all_subwindows.
12474 * frame.c (delete_frame): Call delete_all_child_windows instead
12475 of delete_all_subwindows.
12476
ca78dc43
PE
124772011-11-07 Paul Eggert <eggert@cs.ucla.edu>
12478
12479 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
12480 This is also needed for porting to any host where GC_MARK_STACK is
12481 not GC_MAKE_GCPROS_NOOPS.
12482 (which_symbols): Use it.
12483
a0241d01
KH
124842011-11-07 Kenichi Handa <handa@m17n.org>
12485
12486 * coding.c (coding_set_destination): Check coding->src_pos only
12487 when coding->src_object is a buffer (bug#9910).
12488
12489 * process.c (send_process): Set the member src_multibyte of coding
12490 to 0 (bug#9911) when sending a unibyte text.
12491
12492 * callproc.c (Fcall_process): Set the member src_multibyte of
12493 process_coding to 0 (bug#9912).
12494
a64bfdfa 124952011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
12496
12497 * xmenu.c (cleanup_widget_value_tree): New function.
12498 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
12499 calling free_menubar_widget_value_tree directly (Bug#9830).
12500
cb41b32a
PE
125012011-11-06 Paul Eggert <eggert@cs.ucla.edu>
12502
12503 Fix some portability problems with 'inline'.
12504 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12505 (window_box_width, window_box_left, window_box_left_offset)
12506 (window_box_right, window_box_right_offset): Declare extern.
12507 Otherwise, these inline functions do not conform to C99 and
12508 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
12509 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
12510 * intervals.c (adjust_intervals_for_insertion)
12511 (adjust_intervals_for_deletion): Now extern, because otherwise the
12512 extern inline functions 'offset_intervals' couldn't refer to it.
12513 (static_offset_intervals): Remove.
12514 (offset_intervals): Rewrite using the old contents of
12515 static_offset_intervals. The old version didn't conform to C99
12516 because an extern inline function contained a reference to an
12517 identifier with static linkage.
12518
b7041366
AS
125192011-11-06 Andreas Schwab <schwab@linux-m68k.org>
12520
12521 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
12522 GC.
12523
88a37c4d
EZ
125242011-11-06 Eli Zaretskii <eliz@gnu.org>
12525
12526 * xdisp.c (init_iterator, reseat_to_string): Don't set the
12527 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
12528 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
12529 return Qleft_to_right.
12530
49745b39
CY
125312011-11-06 Chong Yidong <cyd@gnu.org>
12532
12533 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
12534 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
12535 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
12536 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
12537 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
12538 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
12539 (Fwindow_vscroll): Doc fix.
12540 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
12541 argument, since it makes no sense to pass a live window and for
12542 consistency with window-child.
12543
1f05cd82
CS
125442011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
12545
12546 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
12547 support MSVC.
12548
22610910
JR
125492011-11-05 Jason Rumney <jasonr@gnu.org>
12550
12551 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
12552 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
12553 fonts (Bug#6029).
12554 (add_font_entity_to_list): Fix logic errors in mixed boolean and
12555 bitwise arithmetic preventing use of unicode-sip and non-truetype
12556 opentype fonts.
12557
a06776b2
EZ
125582011-11-05 Eli Zaretskii <eliz@gnu.org>
12559
3ad924ba
EZ
12560 * s/ms-w32.h (fstat, stat, utime): Move redirections to
12561 "emacs"-only part.
12562
a06776b2
EZ
12563 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
12564 initialization code to keep similarity to xfns.c after changes
12565 from 2011-11-05.
12566
c9e7db78
JD
125672011-11-05 Jan Djärv <jan.h.d@swipnet.se>
12568
a97f8f3f
JD
12569 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
12570 (unwind_create_frame): New function (Bug#9943).
12571 (Fx_create_frame): Restructure code to be more similar to the one in
12572 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
12573 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
12574 Move terminal->reference_count++ just before making the frame official
12575 (Bug#9943).
12576
12577 * nsterm.m (x_free_frame_resources): New function.
12578 (x_destroy_window): Move code to x_free_frame_resources.
12579
c9e7db78 12580 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
12581 (Fx_create_frame, x_create_tip_frame):
12582 Move terminal->reference_count++ just before making the frame
75f1671a 12583 official. Move initialization of image_cache_refcount and
c9e7db78
JD
12584 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
12585
a6fc3b5c
EZ
125862011-11-05 Eli Zaretskii <eliz@gnu.org>
12587
12588 Support MSVC build with newer versions of Visual Studio.
12589 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
12590 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
12591 nt/gmake.defs.
12592
12593 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
12594 which are not supported by MSVC.
12595 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
12596 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
12597 bitfields.
12598 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
12599 types in bitfields.
12600 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
12601
12602 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
12603
58179cce 126042011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
12605
12606 Support MSVC build with newer versions of Visual Studio.
12607 * w32.c: Don't include w32api.h for MSVC.
12608 (init_environment) [_MSC_VER]: Call sys_access, not _access.
12609
12610 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
12611 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
12612 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
12613 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
12614 e_* cousins.
12615 (alloca) [_MSC_VER]: Define to _alloca.
12616
12617 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
12618
12619 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
12620
a58c13ed
EZ
126212011-11-04 Eli Zaretskii <eliz@gnu.org>
12622
12623 * xdisp.c (note_mouse_highlight): If either of
12624 previous/next-single-property-change returns nil, treat that as
12625 the beginning or the end of the buffer. (Bug#9955)
12626
fe0b6370
JD
126272011-11-04 Jan Djärv <jan.h.d@swipnet.se>
12628
a58c13ed 12629 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
12630 label is not null (Bug#9951).
12631 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
12632 may be NULL.
12633
89bd5ee1
EZ
126342011-11-04 Eli Zaretskii <eliz@gnu.org>
12635
12636 * window.c (Fwindow_body_size): Mention in the doc string that the
12637 return value is in frame's canonical units. (Bug#9949)
12638
84c3edb9
EZ
126392011-11-03 Eli Zaretskii <eliz@gnu.org>
12640
4e2fb5c7
EZ
12641 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
12642
84c3edb9 12643 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 12644 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 12645 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 12646
bc17a887
EZ
126472011-11-01 Eli Zaretskii <eliz@gnu.org>
12648
12649 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
12650 Don't stop backward scan on the continuation glyph, even though
12651 its CHARPOS is positive.
6d5eb5b0
SM
12652 (mouse_face_from_buffer_pos, note_mouse_highlight):
12653 Rename cover_string to disp_string.
bc17a887 12654
4ee88440
MR
126552011-11-01 Martin Rudalics <rudalics@gmx.at>
12656
12657 * window.c (temp_output_buffer_show): Don't use
12658 Vtemp_buffer_show_specifiers.
12659 (Vtemp_buffer_show_specifiers): Remove unused variable.
12660
c2ff3c02
EZ
126612011-10-30 Eli Zaretskii <eliz@gnu.org>
12662
12663 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
12664 past the beginning of the current glyph matrix.
12665
58179cce 126662011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
12667
12668 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
12669 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
12670 HAVE_GTK3 (Bug#9869).
b77a6a7f 12671
3b574623
JD
12672 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
12673 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
12674
b77a6a7f
JD
12675 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
12676
12677 * xterm.c: Declare x_handle_net_wm_state to return int.
12678 (handle_one_xevent): Check if we are iconified but don't have
12679 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
12680 (get_current_wm_state): Return non-zero if not hidden,
12681 check for _NET_WM_STATE_HIDDEN (Bug#9893).
12682 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
12683 (x_handle_net_wm_state): Return what get_current_wm_state returns.
12684 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
12685
196e41e4
PE
126862011-10-29 Paul Eggert <eggert@cs.ucla.edu>
12687
12688 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
12689 so that this new function doesn't get optimized away by a
12690 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
12691
021f2e1a
AS
126922011-10-29 Andreas Schwab <schwab@linux-m68k.org>
12693
12694 * frame.h (MOUSE_HL_INFO): Remove excess parens.
12695
8b058d44
EZ
126962011-10-29 Eli Zaretskii <eliz@gnu.org>
12697
12698 Fix the `xbytecode' command.
12699 * .gdbinit (xprintbytestr): New command.
b50a28de 12700 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
12701 (xbytecode): Print the byte-code string as well.
12702
4452fb80
EZ
127032011-10-29 Kim Storm <storm@cua.dk>
12704
8b058d44
EZ
12705 * alloc.c (which_symbols): New function.
12706
21b72067
AS
127072011-10-29 Andreas Schwab <schwab@linux-m68k.org>
12708
12709 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
12710 line. (Bug#9903)
12711
83ed7b5c
GM
127122011-10-29 Glenn Morris <rgm@gnu.org>
12713
12714 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
12715 Not clear what it was for, and it causes various bugs. (Bug#9839)
12716
5a7a728b
EZ
127172011-10-28 Eli Zaretskii <eliz@gnu.org>
12718
12719 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
12720 possible random value that matches one of those tested as
12721 condition to clear the mouse face.
12722
d3d0842f
CY
127232011-10-28 Chong Yidong <cyd@gnu.org>
12724
12725 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
12726
31b39d13
DN
127272011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
12728
12729 * window.c (make_window): Initialize phys_cursor_on_p.
12730
9aba6043
SM
127312011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
12732
12733 * lisp.h (struct Lisp_Symbol): Update comments.
12734
c20992f4
JB
127352011-10-28 Juanma Barranquero <lekktu@gmail.com>
12736
12737 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
12738
db4f02f2
EZ
127392011-10-28 Eli Zaretskii <eliz@gnu.org>
12740
12741 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
12742 <oslsachem@gmail.com> for helping to debug this.
12743
12744 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
12745 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
12746 (g_b_init_get_glyph_outline_w): New static variables.
12747 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
12748 (GetGlyphOutlineW_Proc): New typedefs.
12749 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
12750 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
12751 New functions.
12752 (w32font_open_internal, compute_metrics):
12753 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
12754 instead of calling the "wide" APIs directly.
12755
12756 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
12757
12758 * w32.h (syms_of_w32font): Add prototype.
12759
87e68db4
JB
127602011-10-27 Juanma Barranquero <lekktu@gmail.com>
12761
12762 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
12763 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
12764 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
12765 (Fmove_to_window_line): Doc fix.
12766
435c1d67
CY
127672011-10-27 Chong Yidong <cyd@gnu.org>
12768
12769 * process.c (make_process): Set gnutls_state to NULL.
12770
12771 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
12772 non-NULL, regardless of GNUTLS_INITSTAGE.
12773 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
12774 an error. Set process slots as soon as we allocate them.
12775
12776 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
12777
9c6c6f49
CY
127782011-10-27 Chong Yidong <cyd@gnu.org>
12779
9aba6043
SM
12780 * gnutls.c (emacs_gnutls_deinit): New function.
12781 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
12782 (Fgnutls_deinit, Fgnutls_boot): Use it.
12783
12784 * process.c (make_process): Initialize GnuTLS credentials to NULL.
12785 (deactivate_process): Call emacs_gnutls_deinit.
12786
657d08d3
JB
127872011-10-27 Juanma Barranquero <lekktu@gmail.com>
12788
12789 * image.c (x_create_x_image_and_pixmap):
12790 * w32.c (sys_rename, w32_delayed_load):
12791 * w32font.c (fill_in_logfont):
12792 * w32reg.c (x_get_string_resource): Silence compiler warnings.
12793
5430d399
JB
127942011-10-26 Juanma Barranquero <lekktu@gmail.com>
12795
12796 * w32fns.c (w32_default_color_map): New function,
12797 extracted from Fw32_default_color_map.
a7ef684b 12798 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 12799
fe0055fa
PE
128002011-10-25 Paul Eggert <eggert@cs.ucla.edu>
12801
12802 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
12803
e6346438
SM
128042011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
12805
12806 * keyboard.c (test_undefined): New function (bug#9751).
12807 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
12808
e112cc37
ET
128092011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
12810
12811 * sysdep.c (init_sys_modes): Fix the check for the controlling
12812 terminal (Bug#6649).
12813
7b5d6677
EZ
128142011-10-20 Eli Zaretskii <eliz@gnu.org>
12815
12816 * dispextern.h (struct bidi_it): New member next_en_type.
12817
12818 * bidi.c (bidi_line_init): Initialize the next_en_type member.
12819 (bidi_resolve_explicit_1): When next_en_pos is valid for the
12820 current character, check also for next_en_type being WEAK_EN.
12821 (bidi_resolve_weak): Don't enter the expensive loop if the current
12822 position is before next_en_pos. Record the bidi type of the first
12823 non-ET, non-BN character we find, in addition to its position.
12824 (bidi_level_of_next_char): Invalidate next_en_type when
12825 next_en_pos is over-stepped.
12826
7da0b018
PE
128272011-10-20 Paul Eggert <eggert@cs.ucla.edu>
12828
12829 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
12830 * editfns.c: Rewrite current-time-zone so that it invokes
12831 the equivalent of (format-time-string "%Z") to get the time zone name.
12832 This fixes a bug when the time zone name contains characters that
12833 need converting from the system time locale to Emacs internal format.
12834 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
12835 that patch fixed format-time-string to do the conversion, but
12836 I forgot to fix current-time-zone.
12837 (format_time_string): New function, containing most of
12838 what Fformat_time_string used to contain.
12839 (Fformat_time_string): Rewrite in terms of format_time_string.
12840 This doesn't change this function's behavior.
12841 (current-time-zone): Rewrite to use format_time_string.
12842 This fixes the bug reported by Michael Schierl in
12843 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
12844 Jason Rumney's 2007-06-07 change worked around this bug, but
12845 didn't fix it.
12846 * systime.h (tzname, timezone): Remove no-longer-used declarations.
12847
8547b010
EZ
128482011-10-19 Eli Zaretskii <eliz@gnu.org>
12849
12850 * xdisp.c (start_display): If the character at POS is displayed
12851 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
12852 (try_window_reusing_current_matrix): If a line ends in a display
12853 vector or the next line starts in a display vector, continue
12854 redrawing the window even though the character position of
12855 start_row was reached.
8547b010
EZ
12856 (Bug#9771, part 2)
12857
4e948d15
CY
128582011-10-18 Chong Yidong <cyd@gnu.org>
12859
12860 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
12861 with nobreak-char-display too.
12862
4787455f
EZ
128632011-10-18 Eli Zaretskii <eliz@gnu.org>
12864
12865 Fix part 3 of bug#9771.
12866 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
12867 (bidi_resolve_neutral): Don't enter the expensive loop looking for
12868 non-neutral characters if the current character is a paragraph
12869 separator (a.k.a. Newline). This avoids running the same
12870 expensive loop twice, once when we consume the preceding newline
12871 and the other time when the line actually needs to be displayed.
12872 Avoid the loop when we see neutrals on the base embedding level
12873 following a character whose directionality is the same as the
12874 paragraph's. This avoids running the expensive loop when a line
12875 ends in a long sequence of neutrals, like control characters.
12876 Add assertion against STRONG_AL type. Slightly rearrange code
12877 that determines the type of a neutral given the first non-neutral
12878 that follows it.
12879 (bidi_level_of_next_char): Set next_en_pos to zero when
12880 invalidating its info.
12881
2c91f553
EZ
128822011-10-17 Eli Zaretskii <eliz@gnu.org>
12883
12884 * xdisp.c (push_display_prop): Determine whether to record string
12885 or buffer position by IT->string, not by IT->method. Allow
12886 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
12887 (move_it_vertically_backward): Don't look for character position
12888 immediately after the newline when in a continuation line.
12889 (Bug#9771, part 1)
2c91f553 12890
c7b08b0d
MR
128912011-10-15 Martin Rudalics <rudalics@gmx.at>
12892
12893 * window.c (coordinates_in_window): Rewrite and delabelize
12894 vertical border check. (Bug#5357) (Bug#9618)
12895
6b02f655
SM
128962011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
12897
12898 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
12899 errors in XSetWindowBorder (bug#9310).
12900
81d40c92
DA
129012011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
12902
12903 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
12904 avoid crash when xmalloc overrun checking is enabled.
12905
d4172c3b
EZ
129062011-10-13 Eli Zaretskii <eliz@gnu.org>
12907
12908 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
12909 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
12910 cursor motion with <left> and <right> arrow keys.
12911
12912 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
12913 some callers set that themselves.
12914
b00eea75
EZ
129152011-10-12 Eli Zaretskii <eliz@gnu.org>
12916
12917 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
12918 display string and the previous row comes from the same string and
12919 is empty. (Bug#9739) (Bug#9738)
12920
8fe012c4
SM
129212011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
12922
12923 * doc.c (get_doc_string): Encode file name (bug#9735).
12924
0074aef2
EZ
129252011-10-12 Eli Zaretskii <eliz@gnu.org>
12926
79beb178
EZ
12927 * bidi.c (bidi_level_of_next_char):
12928 * xdisp.c (get_visually_first_element): Remove old incorrect
12929 comments regarding the Unicode Line Separator character.
12930
0074aef2
EZ
12931 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
12932
6e4b3fbe
DA
129332011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
12934
12935 * alloc.c (Fgc_status): Do not access beyond zombies array
12936 boundary if nzombies > MAX_ZOMBIES.
12937 * alloc.c (dump_zombies): Add missing format specifier.
12938
0324f3af
PE
129392011-10-12 Paul Eggert <eggert@cs.ucla.edu>
12940
b5525cac
PE
12941 * xdisp.c (set_cursor_from_row): Simplify conditionals,
12942 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
12943
0324f3af
PE
12944 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
12945 Some packages use them to denote characters with modifiers.
12946
e9b5f888
AS
129472011-10-11 Andreas Schwab <schwab@linux-m68k.org>
12948
12949 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
12950 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
12951 matching a pp-number. Rename parameter var to var1.
12952
127827c0
SM
129532011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
12954
12955 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
12956
c8fd3bd0
GM
129572011-10-08 Glenn Morris <rgm@gnu.org>
12958
12959 * callint.c (Fcall_interactively): Give a more explicit error for the
12960 'c' case with a non-character input. (Bug#8479)
12961
352ec8ff
EZ
129622011-10-08 Eli Zaretskii <eliz@gnu.org>
12963
03669ccb
EZ
12964 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
12965 lines.
7061c986
EZ
12966 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
12967 lines that are hscrolled on the left.
03669ccb 12968
352ec8ff
EZ
12969 * dispnew.c (buffer_posn_from_coords): Account for a possible
12970 presence of header-line. (Bug#4426)
12971
a66cfb1c
SM
129722011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
12973
6b02f655
SM
12974 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
12975 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 12976
7c5ee88e
PE
129772011-10-07 Paul Eggert <eggert@cs.ucla.edu>
12978
12979 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
12980 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
12981 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
12982 this makes Emacs dump core during garbage collection on rare
12983 occasions. sizeof is obviously inferior to offsetof here, so
12984 stick with offsetof.
12985 (GC_POINTER_ALIGNMENT): New macro.
12986 (mark_memory): Omit 3rd (offset) arg; caller changed.
12987 Don't assume EMACS_INT alignment is the same as pointer alignment.
12988
df1bbe5b
SM
129892011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
12990
12991 * keyboard.c (read_key_sequence_remapped): New var.
12992 (read_key_sequence): Compute remapping in the right buffer.
12993 (command_loop_1): Use read_key_sequence's remapping directly.
12994
51553db6
SM
129952011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
12996
32c1fffd
SM
12997 * dired.c (file_name_completion): Don't expand file name.
12998 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
12999 before checking file name handler.
13000
51553db6
SM
13001 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
13002 they've been requested explicitly (bug#9591).
13003
b6bd1599 130042011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
13005
13006 * keymap.c (Fsingle_key_description): Use make_specified_string
13007 instead of build_string to build string from push_key_description.
13008 (Bug#5193)
13009
f701dc2a
PE
130102011-09-30 Paul Eggert <eggert@cs.ucla.edu>
13011
4222c55d
PE
13012 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
13013 This fixes a Y2038 bug on 64-bit hosts.
13014 * buffer.c (reset_buffer):
13015 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
13016 (Fclear_buffer_auto_save_failure):
13017 Use 0, not -1, to represent an unset failure time, since time_t
13018 might not be signed.
13019
f701dc2a
PE
13020 Remove dependency on glibc malloc internals.
13021 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13022 Move back here from lisp.h, but with their new implementations.
13023 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13024 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
13025 * charset.c (charset_table_init): New static var.
13026 (syms_of_charset): Use it instead of xmalloc. This removes a
13027 dependency on glibc malloc internals. See Eli Zaretskii's comment in
13028 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
13029 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13030 Move back to alloc.c.
13031 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13032 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
13033
9ceebf39
JD
130342011-09-30 Jan Djärv <jan.h.d@swipnet.se>
13035
13036 * nsterm.m (windowDidResize): Call x_set_window_size only when
13037 ns_in_resize is true. Otherwise set pixelwidth/height and
13038 call change_frame_size (Bug#9628).
13039
cb993c58
PE
130402011-09-30 Paul Eggert <eggert@cs.ucla.edu>
13041
3930c88b
PE
13042 Port --enable-checking=all to Fedora 14 x86-64.
13043 * charset.c (syms_of_charset): Also account for glibc malloc's
13044 internal overhead when calculating the initial malloc maximum.
13045
cb993c58
PE
13046 Port --enable-checking=all to Fedora 14 x86.
13047 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13048 Move to lisp.h.
13049 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
13050 (overrun_check_realloc, overrun_check_free):
13051 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
13052 That way, xmalloc returns a properly-aligned pointer even if
13053 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
13054 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
13055 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
13056 into account when calculating the initial malloc maximum.
13057 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
13058 Move here from alloc.c, so that charset.c can use it too.
13059 Properly align; the old code wasn't right for common 32-bit hosts
13060 when configured with --enable-checking=all.
13061 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
13062 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
13063
31bed486
EZ
130642011-09-29 Eli Zaretskii <eliz@gnu.org>
13065
04c70788 13066 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
13067 use EDOM.
13068
fbcaa2f3
EZ
130692011-09-28 Eli Zaretskii <eliz@gnu.org>
13070
13071 * xdisp.c (compute_display_string_end): If there's no display
13072 string at CHARPOS, return -1.
13073
13074 * bidi.c (bidi_fetch_char): When compute_display_string_end
13075 returns a negative value, treat the character as a normal
13076 character not covered by a display string. (Bug#9624)
13077
a239d4e9
JB
130782011-09-28 Juanma Barranquero <lekktu@gmail.com>
13079
13080 * lread.c (Fread_from_string): Fix typo in docstring.
13081
88652fd5
EZ
130822011-09-27 Eli Zaretskii <eliz@gnu.org>
13083
13084 * xdisp.c (handle_invisible_prop): If invisible text ends on a
13085 newline, reseat the iterator instead of bidi-iterating there one
13086 character at a time. (Bug#9610)
32c1fffd
SM
13087 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
13088 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 13089
ed497dd4
AS
130902011-09-27 Andreas Schwab <schwab@linux-m68k.org>
13091
13092 * lread.c (readevalloop): Use correct code for NBSP.
13093 (read1): Likewise. (Bug#9608)
13094
b2bf61aa
MA
130952011-09-25 Michael Albinus <michael.albinus@gmx.de>
13096
13097 * dbusbind.c (Fdbus_register_signal): When service is not
13098 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
13099
32bbb17c
GM
131002011-09-25 Glenn Morris <rgm@gnu.org>
13101
13102 * buffer.c (truncate-lines): Doc fix.
13103
94e0933e
CY
131042011-09-24 Chong Yidong <cyd@stupidchicken.com>
13105
13106 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
13107 (Fset_window_next_buffers): Doc fix.
13108
cddde921
GM
131092011-09-24 Glenn Morris <rgm@gnu.org>
13110
13111 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
13112
1260aef1
PE
131132011-09-24 Paul Eggert <eggert@cs.ucla.edu>
13114
25b4bfa0
PE
13115 Fix minor problems found by static checking.
13116 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
13117 * indent.c (Fvertical_motion): Fix == vs = typo.
13118
e3cbd34b
EZ
131192011-09-24 Eli Zaretskii <eliz@gnu.org>
13120
a66cfb1c
SM
13121 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
13122 Default value is now t. Doc fix.
6bf7006f 13123
e3cbd34b 13124 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 13125 logic when moving up, not only when moving down. Fix the
e3cbd34b 13126 confusing name and values of the it_overshoot_expected variable;
32c1fffd 13127 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
13128
13129 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
13130 CHARPOS is covered by a display string which includes newlines.
13131 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
13132 is covered by a display string with embedded newlines.
13133
a3de0cbd
MA
131342011-09-24 Michael Albinus <michael.albinus@gmx.de>
13135
13136 * dbusbind.c (Fdbus_register_signal): Add match rule to
13137 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
13138 (Fdbus_register_method, Vdbus_registered_objects_table):
13139 Fix docstring.
a3de0cbd 13140
b260039d
JM
131412011-09-24 Jim Meyering <meyering@redhat.com>
13142
32c1fffd 13143 do not ignore write error for any output size
b260039d
JM
13144 The previous change was incomplete.
13145 While it makes emacs --batch detect the vast majority of stdout
13146 write failures, errors were still ignored whenever the output size is
13147 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
13148 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
13149 && echo FAIL: ignored write error
13150 FAIL: ignored write error
13151 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
13152 && echo FAIL: ignored write error
13153 FAIL: ignored write error
13154 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
13155
8eca8a7c
AS
131562011-09-23 Andreas Schwab <schwab@linux-m68k.org>
13157
13158 * emacs.c (Fkill_emacs): In noninteractive mode exit
13159 non-successfully if a write error occurred on stdout. (Bug#9574)
13160
3341db62
EZ
131612011-09-21 Eli Zaretskii <eliz@gnu.org>
13162
13163 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
13164 the xassert test.
13165
13166 * dispextern.h (struct it): Update the comment documenting what
13167 can it->OBJECT be.
13168
8c203dbf
EZ
131692011-09-20 Eli Zaretskii <eliz@gnu.org>
13170
13171 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
13172 a display string, extend search for cursor position to end of row.
13173 (find_row_edges): If the row ends in a newline from a display
13174 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
13175 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
13176 (Fcurrent_bidi_paragraph_direction): Fix search for previous
13177 non-empty line. Fixes confusing cursor motion with arrow keys at
13178 the beginning of a line that starts with whitespace.
8c203dbf 13179
a4824228
LMI
131802011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13181
13182 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
13183 (bug#9493).
13184
33ed493b
CY
131852011-09-18 Chong Yidong <cyd@stupidchicken.com>
13186
13187 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
13188 boolean (Bug#9154).
13189
56cd55c8
EZ
131902011-09-18 Eli Zaretskii <eliz@gnu.org>
13191
13192 * xdisp.c (display_line): Record maximum and minimum buffer
13193 positions even if no glyphs were produced (e.g., by a zero-width
13194 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
13195 buffer positions that will be removed from the glyph row because
13196 they don't fit.
c02dcedf
EZ
13197 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
13198 column is beyond frame width: don't subtract 1 "pixel" when
13199 computing width of the stretch.
3e62b7e0
EZ
13200 (reseat_at_next_visible_line_start): Undo the change made on
13201 2011-09-17 that saved paragraph information and restored it after
13202 the call to `reseat'. (Bug#9545)
56cd55c8 13203
5ed99d36 132042011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
13205
13206 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
13207 and turn window cursor on if cleared (Bug#9415).
13208
5ed99d36 132092011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
13210
13211 * search.c (boyer_moore): Take unibyte characters from pattern
13212 literally. (Bug#9458)
13213
9bade7b2
EZ
132142011-09-18 Eli Zaretskii <eliz@gnu.org>
13215
13216 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
13217
e5e9d610
PE
132182011-09-18 Paul Eggert <eggert@cs.ucla.edu>
13219
87e4427a
PE
13220 Fix minor problem found by static checking.
13221 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
13222 initialized, to pacify gcc -Wuninitialized.
13223
e5e9d610
PE
13224 * fileio.c: Report proper errno when syscall falls.
13225 (Finsert_file_contents): Save and restore errno,
13226 so that report_file_error outputs the correct diagnostic.
13227 (Fwrite_region) [CLASH_DETECTION]: Likewise.
13228
a1674f0b
EZ
132292011-09-18 Eli Zaretskii <eliz@gnu.org>
13230
13231 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
13232
fbfb6dd4
EZ
132332011-09-17 Eli Zaretskii <eliz@gnu.org>
13234
13235 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
13236 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
13237
bb187662
EZ
132382011-09-17 Eli Zaretskii <eliz@gnu.org>
13239
1137e8b8 13240 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 13241 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
13242
13243 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
13244 (bidi_find_paragraph_start): Search back for paragraph beginning
13245 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
13246 (bidi_move_to_visually_next): Only trigger paragraph-related
13247 computations when the last character is a newline or at EOB, not
13248 just any NEUTRAL_B. (Bug#9470)
13249
bb187662
EZ
13250 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
13251 truncated lines if point is covered by a display string. (Bug#9524)
13252
2e621251
PE
132532011-09-16 Paul Eggert <eggert@cs.ucla.edu>
13254
13255 * xselect.c: Relax test for outgoing X longs (Bug#9498).
13256 (cons_to_x_long): New function.
13257 (lisp_data_to_selection_data): Use it. Correct the test for
13258 short-versus-long data; it was negated. Break out of vector
13259 loop, for efficiency, when a long datum is discovered.
13260
91a15bc6
SM
132612011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
13262
13263 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
13264
b41c3a35
EZ
132652011-09-16 Eli Zaretskii <eliz@gnu.org>
13266
13267 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
13268 GCC PR/17406) by declaring this function with external scope.
13269
7812ba2d
PE
132702011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13271
13272 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
13273 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
13274
cf7edc2a
AS
132752011-09-15 Andreas Schwab <schwab@linux-m68k.org>
13276
13277 * editfns.c (Fformat): Correctly handle text properties on "%%".
13278
bd01620e
EZ
132792011-09-15 Eli Zaretskii <eliz@gnu.org>
13280
13281 * xterm.c (x_draw_composite_glyph_string_foreground):
13282 * w32term.c (x_draw_composite_glyph_string_foreground):
13283 * term.c (encode_terminal_code):
13284 * composite.c (composition_update_it, get_composition_id):
13285 * xdisp.c (get_next_display_element)
13286 (fill_composite_glyph_string): Add comments about special meaning
13287 of TAB characters in a composition.
13288
a02719a3
PE
132892011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13290
13291 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
13292 This occurs when processing a multibyte format.
13293 Problem reported by Wolfgang Jenker.
a02719a3 13294
72589a3c
JB
132952011-09-15 Johan Bockgård <bojohan@gnu.org>
13296
13297 * xdisp.c (try_cursor_movement): Only check for exact match if
13298 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
13299
1c14176c
PE
133002011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13301
13302 Remove unused external symbols.
13303 * dispextern.h (calc_pixel_width_or_height): Remove decl.
13304 * xdisp.c (calc_pixel_width_or_height): Now static.
13305 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
13306 * indent.c (check_display_width):
13307 * w32term.c: Fix comment to match code.
13308 * xterm.c, xterm.h (x_catching_errors): Remove.
13309
d2eea5b5
PE
133102011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13311
13312 * xselect.c: Use signed conversions more consistently (Bug#9498).
13313 (selection_data_to_lisp_data): Assume incoming selection data are
13314 signed integers, not unsigned. This is to be consistent with
13315 outgoing selection data, which was modified to use signed integers
13316 in as part of the fix to Bug#9196 in response to Jan D.'s comment
13317 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
13318 expects long, not unsigned long.
13319
46888499
EZ
133202011-09-14 Eli Zaretskii <eliz@gnu.org>
13321
13322 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
13323 computation of loop end. Reported by Johan Bockgård
13324 <bojohan@gnu.org>.
13325
ef8ef9fb
CY
133262011-09-13 Chong Yidong <cyd@stupidchicken.com>
13327
13328 * frame.c (Fother_visible_frames_p): Function deleted.
13329
fa819fed
EZ
133302011-09-12 Eli Zaretskii <eliz@gnu.org>
13331
13332 * indent.c (compute_motion): Process display vector front to back
13333 rather than the other way around. (Bug#2496)
13334
2ba8e008
SM
133352011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
13336
13337 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
13338
20f53c69
CY
133392011-09-11 Chong Yidong <cyd@stupidchicken.com>
13340
13341 * minibuf.c (Fread_from_minibuffer): Doc fix.
13342
d562d7a4
EZ
133432011-09-11 Eli Zaretskii <eliz@gnu.org>
13344
13345 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
13346 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
13347
1c4d7f3d
LMI
133482011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13349
13350 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
13351 value for non-existent files.
13352
b885bf36
EZ
133532011-09-11 Eli Zaretskii <eliz@gnu.org>
13354
13355 * fileio.c (Finsert_file_contents): If the file cannot be opened,
13356 set its "size" to -1. This will set the modtime_size field of
13357 the corresponding buffer to -1, which is what
13358 verify-visited-file-modtime expects for files that do not exist.
13359 (Bug#9139)
13360
6612f0bf
PE
133612011-09-11 Paul Eggert <eggert@cs.ucla.edu>
13362
13363 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
13364 here ...
13365 * lisp.h: ... from here. push_key_description is no longer
13366 defined in keyboard.c, so its declaration should not be in
13367 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
13368 logically belongs with push_key_description.
13369
dfb3f755
PE
133702011-09-10 Paul Eggert <eggert@cs.ucla.edu>
13371
13372 * buffer.h: Include <sys/types.h> instead of <time.h>.
13373 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
13374 Problem reported by Herbert J. Skuhra.
13375
3134906c
LMI
133762011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
13377
13378 * xml.c (parse_region): Make the parsing work for
13379 non-comment-starting XML files again (bug#9144).
13380
8d903f4e
AS
133812011-09-10 Andreas Schwab <schwab@linux-m68k.org>
13382
13383 * image.c (gif_load): Fix calculation of bottom and right corner.
13384 (Bug#9468)
13385
80ad64f4
EZ
133862011-09-10 Eli Zaretskii <eliz@gnu.org>
13387
13388 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
13389 redisplay in small windows.
13390
208a048d
EZ
133912011-09-09 Eli Zaretskii <eliz@gnu.org>
13392
13393 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
13394
9b1c252e
MR
133952011-09-08 Martin Rudalics <rudalics@gmx.at>
13396
13397 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
13398 Operate on live windows only.
13399
2949f33b
JB
134002011-09-08 Juanma Barranquero <lekktu@gmail.com>
13401
13402 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
13403
e08dcafd
EZ
134042011-09-07 Eli Zaretskii <eliz@gnu.org>
13405
13406 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
13407 only under bidi iteration.
13408
115b96bd
JD
134092011-09-07 Jan Djärv <jan.h.d@swipnet.se>
13410
13411 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
13412
c8199d0f
PE
134132011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13414
13415 isnan: Fix porting problem to Solaris 10 with bundled gcc.
13416 Without this fix, the command to link temacs failed due to an
13417 undefined symbol __builtin_isnan. This is because
13418 /usr/include/iso/math_c99.h #defines isnan(x) to
13419 __builtin_isnan(x), but the bundled gcc, which identifies itself
13420 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
13421 a __builtin_isnan.
13422 * floatfns.c (isnan): #undef, and then #define to a clone of
13423 what's in data.c.
13424 (Fisnan): Always define, since it's always available now.
13425 (syms_of_floatfns): Always define isnan at the Lisp level.
13426
e39b275c 134272011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
13428
13429 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
13430
b2db44d9 134312011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 13432
f4af5137 13433 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
13434 The previous code assumed that file offsets (off_t values) fit in
13435 EMACS_INT variables, which is not true on typical 32-bit hosts.
13436 The code messed up by falsely reporting buffer overflow in cases
13437 such as (insert-file-contents "big" nil 1 2) into an empty buffer
13438 when "big" contains more than 2**29 bytes, even though this
13439 inserts just one byte and does not overflow the buffer.
13440 (Finsert_file_contents): Store file offsets as off_t
13441 values, not as EMACS_INT values. Check for overflow when
13442 converting between EMACS_INT and off_t. When checking for
13443 buffer overflow or for overlap, take the offsets into account.
13444 Don't use EMACS_INT for small values where int suffices.
13445 When checking for overlap, fix a typo: ZV was used where
13446 ZV_BYTE was intended.
13447 (Fwrite_region): Don't assume off_t fits into 'long'.
13448 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
13449
ecfc0a49
MA
134502011-09-05 Michael Albinus <michael.albinus@gmx.de>
13451
13452 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
13453
6511acf2 134542011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 13455
0999621a 13456 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
13457
13458 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 13459 (esprintf, exprintf, evxprintf): New functions.
62f19c19 13460 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 13461 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
13462 (modify_event_symbol): Do not assume that the length of
13463 name_alist_or_stem is safe to alloca and fits in int.
13464 (Fexecute_extended_command): Likewise for function name and binding.
13465 (Frecursion_depth): Wrap around reliably on integer overflow.
13466 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
13467 since some callers pass EMACS_INT values.
13468 (Fsingle_key_description): Don't crash if symbol name contains more
13469 than MAX_ALLOCA bytes.
13470 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
13471 (get_minibuffer): Arg is now EMACS_INT, not int.
13472 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 13473 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
13474 * window.h (command_loop_level, minibuf_level): Reflect API changes.
13475
2be7d702
PE
13476 * dbusbind.c (signature_cat): New function.
13477 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
13478 Do not overrun buffer; instead, report string overflow.
13479
9d1df220
PE
13480 * dispnew.c (add_window_display_history): Don't overrun buffer.
13481 Truncate instead; this is OK since it's just a log.
13482
33ef5c64
PE
13483 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
13484 even if the time zone offset is outlandishly large.
13485 Don't mishandle offset == INT_MIN.
13486
66c6fdd5
PE
13487 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
13488 when creating daemon; the previous buffer-overflow check was incorrect.
13489
d749b01b
PE
13490 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
13491 which has the guts of the old verror function.
13492
b5cd1905
PE
13493 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
13494 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
13495
6e1a67fb
PE
13496 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
13497 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 13498 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 13499 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
13500 length of string rather than counting it via multiple sprintfs;
13501 that's simpler and more reliable.
c21721cc
PE
13502 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
13503 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
13504 sprintf, in case result does not fit in int.
13505
c57b67fc
PE
13506 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
13507 (fontset_from_font): Print it.
13508
8a401434
PE
13509 * frame.c (tty_frame_count): Now printmax_t, not int.
13510 (make_terminal_frame, set_term_frame_name): Print it.
13511 (x_report_frame_params): In X, window IDs are unsigned long,
13512 not signed long, so print them as unsigned.
13513 (validate_x_resource_name): Check for implausibly long names,
13514 and don't assume name length fits in 'int'.
13515 (x_get_resource_string): Don't blindly alloca invocation name;
13516 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
13517 not fit in int.
13518
6e1a67fb
PE
13519 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
13520 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
13521 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
13522
0df02bf3
PE
13523 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
13524 Use esprintf, not sprintf, in case result does not fit in int.
13525
48e30793
PE
13526 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13527 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
13528 it as a large positive number.
13529 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
13530 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13531
a66ff6d8
PE
13532 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
13533 in case result does not fit in int.
13534
aca216ff
PE
13535 * print.c (float_to_string): Detect width overflow more reliably.
13536 (print_object): Make sprintf buffer a bit bigger, to avoid potential
13537 buffer overrun. Don't assume list length fits in 'int'. Treat
13538 print length of 0 as 0, not as infinity; to be consistent with other
13539 uses of print length in this function. Don't overflow print length
13540 index. Don't assume hash table size fits in 'long', or that
13541 vectorlike size fits in 'unsigned long'.
13542
31c286f7
PE
13543 * process.c (make_process): Use printmax_t, not int, to format
13544 process-name gensyms.
13545
55e5faa1
PE
13546 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
13547
80f2e268
PE
13548 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
13549 to avoid potential buffer overrun.
13550
670741ab
PE
13551 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
13552 if X resource line is longer than 512 bytes.
13553
b7163a50
PE
13554 * xfns.c (x_window): Make sprintf buffer a bit bigger
13555 to avoid potential buffer overrun.
13556
ae58ff1f
PE
13557 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
13558
c43c8a6a
PE
13559 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
13560
3f8236f4
PE
135612011-09-04 Paul Eggert <eggert@cs.ucla.edu>
13562
53e9fe90 13563 Integer overflow fixes for scrolling, etc.
6511acf2
PE
13564 Without these, Emacs silently mishandles large integers sometimes.
13565 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
13566 it were "C-u 1 M-x recenter" on a typical 64-bit host.
13567
6511acf2
PE
13568 * xdisp.c (try_window_id): Check Emacs fixnum range before
13569 converting to 'int'.
806add1d 13570
6511acf2 13571 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
13572 Check that an Emacs fixnum is in range before assigning it to 'int'.
13573 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
13574 values converted from Emacs fixnums.
13575 (Frecenter): Don't wrap around a line count if it is out of 'int'
13576 range; instead, treat it as an extreme value.
13577 (Fset_window_configuration, compare_window_configurations):
13578 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
13579
6511acf2
PE
13580 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
13581 that can exceed INT_MAX. Check that EMACS_INT value is in range
13582 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
13583 (match_limit): Don't assume that a fixnum can fit in 'int'.
13584
6511acf2 13585 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
13586 exceed INT_MAX.
13587
6511acf2 13588 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
13589 (Fvertical_motion): Don't wrap around LINES values that don't fit
13590 in 'int'. Instead, treat them as extreme values. This is good
13591 enough for windows, which can't have more than INT_MAX lines anyway.
13592
fcb901a7
LMI
135932011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13594
0f2f6b6d
LMI
13595 * Require libxml/parser.h to avoid compilation warning.
13596
fcb901a7
LMI
13597 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
13598
13599 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
13600 since this reportedly can destroy thread storage.
13601
6e20a0d4
CY
136022011-08-30 Chong Yidong <cyd@stupidchicken.com>
13603
13604 * syntax.c (find_defun_start): Update all cache variables if
13605 exiting early (Bug#9401).
13606
148ae00e
EZ
136072011-08-30 Eli Zaretskii <eliz@gnu.org>
13608
f6cfbd8f
EZ
13609 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
13610
148ae00e
EZ
13611 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
13612 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
13613 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
13614
13615 * term.c (tty_append_glyph): New function.
13616 (produce_stretch_glyph): Static function and its prototype deleted.
13617
a66cfb1c
SM
13618 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
13619 Add prototypes.
148ae00e 13620
c4a07a4c
PE
136212011-08-29 Paul Eggert <eggert@cs.ucla.edu>
13622
13623 * image.c (parse_image_spec): Check for nonnegative, not for positive,
13624 when checking :margin (Bug#9390).
13625 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 13626 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
13627 so that the name doesn't mislead. All uses changed.
13628
6bc8cd65
JB
136292011-08-28 Johan Bockgård <bojohan@gnu.org>
13630
13631 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
13632 set_tty_hooks.
13633
dca4927e
EZ
136342011-08-27 Eli Zaretskii <eliz@gnu.org>
13635
13636 * xdisp.c (move_it_to): Don't bail out early when reaching
13637 position beyond to_charpos, if we are scanning backwards.
13638 (move_it_vertically_backward): When DY == 0, make sure we get to
13639 the first character in the line after the newline.
13640
f2cad773
PE
136412011-08-27 Paul Eggert <eggert@cs.ucla.edu>
13642
13643 * ccl.c: Improve and simplify overflow checking (Bug#9196).
13644 (ccl_driver): Do not generate an out-of-range pointer.
13645 (Fccl_execute_on_string): Remove unnecessary check for
13646 integer overflow, noted by Stefan Monnier in
13647 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
13648 Remove a FIXME that didn't need fixing.
13649 Simplify the newly-introduced buffer reallocation code.
13650
0cae2cdb
JB
136512011-08-27 Juanma Barranquero <lekktu@gmail.com>
13652
13653 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
13654
5fc295a4 136552011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 13656
70c60eb2 13657 Integer and memory overflow issues (Bug#9196).
726e0ab1 13658
d31850da
PE
13659 * doc.c (get_doc_string): Rework so that
13660 get_doc_string_buffer_size is the actual buffer size, rather than
13661 being 1 less than the actual buffer size; this makes xpalloc more
13662 convenient.
13663
a69fbedb
PE
13664 * image.c (x_allocate_bitmap_record, cache_image):
13665 * xselect.c (Fx_register_dnd_atom):
13666 Simplify previous changes by using xpalloc.
13667
fe5c5d37
PE
13668 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
13669 since either will do and ptrdiff_t is convenient with xpalloc.
13670
0065d054
PE
13671 * charset.c (charset_table_size)
13672 (struct charset_sort_data.priority): Now ptrdiff_t.
13673 (charset_compare): Don't overflow if priorities differ greatly.
13674 (Fsort_charsets): Don't assume list length fits in int.
13675 Check for size-calculation overflow when allocating sort data.
13676 (syms_of_charset): Allocate an initial charset table that is
13677 just under 64 KiB, to avoid problems with glibc malloc and mmap.
13678
13679 * cmds.c (internal_self_insert): Check for size-calculation overflow.
13680
13681 * composite.h (struct composition.glyph_len): Now int, not unsigned.
13682 The actual value is always <= INT_MAX, and leaving it unsigned made
13683 overflow checking harder.
13684
13685 * dispextern.h (struct glyph_matrix.rows_allocated)
13686 (struct face_cache.size): Now ptrdiff_t, for convenience in use
13687 with xpalloc. The values are still always <= INT_MAX.
13688
13689 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
13690
13691 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
13692 (SAFE_NALLOCA): New macro.
13693
13694 * region-cache.c (struct boundary.pos, find_cache_boundary)
13695 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
13696 (set_cache_region, invalidate_region_cache)
13697 (revalidate_region_cache, know_region_cache, region_cache_forward)
13698 (region_cache_backward, pp_cache):
13699 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
13700 so that ptrdiff_t * can be passed to xpalloc.
13701 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
13702 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
13703 (pp_cache): Don't assume cache_len fits in int.
13704 * region-cache.h: Adjust extern decls to match.
13705
13706 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
13707 EMACS_INT, since either will do, for xpalloc.
13708
13709 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
13710 (xnmalloc, xnrealloc, xpalloc): New functions.
13711
726e0ab1
PE
13712 * bidi.c (bidi_shelve_header_size): New constant.
13713 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
13714 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
13715
51f30bc5 13716 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
13717 * buffer.c (overlays_at, overlays_in, record_overlay_string)
13718 (overlay_strings):
13719 Don't update size of array until after memory allocation succeeds,
13720 because xmalloc/xrealloc may not return.
0065d054
PE
13721 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
13722 now that we have proper integer overflow checking.
13723 (record_overlay_string, overlay_strings): Catch overflows when
13724 calculating size of overlay_str_buf.
726e0ab1 13725
0065d054
PE
13726 * callproc.c (Fcall_process): Check for size overflow when
13727 calculating size of args2.
13728 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
13729 Normally we prefer signed values, but sticking with ptrdiff_t would
13730 require adding more-complicated checks.
726e0ab1
PE
13731
13732 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
13733 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
13734 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 13735 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
13736
13737 * character.c (Fstring): Check for size-calculation overflow.
13738
13739 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
13740 unnecessary integer overflow. Check for size overflow.
13741 (encode_coding_object): Don't update size until xmalloc succeeds.
13742
13743 * composite.c (get_composition_id): Check for overflow in glyph
13744 length calculations.
13745
13746 Integer and memory overflow fixes for display code.
13747 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
13748 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
13749 (scrolling_window): Check for overflow in size calculations.
13750 (line_draw_cost, realloc_glyph_pool, add_row_entry):
13751 Don't assume glyph table len fits in int.
13752 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
13753 (row_table_size): Now ptrdiff_t, not int.
13754 (scrolling_window): Avoid overflow in size calculations.
13755 Don't update size until allocation succeeds.
13756 * fns.c (concat): Check for overflow in size calculations.
13757 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
13758 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
13759 (NEXT_ALMOST_PRIME_LIMIT): New constant.
13760
13761 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
13762 (get_doc_string): Check for size calculation overflow.
13763 Don't update size until allocation succeeds.
13764 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
13765 EMACS_INT, where ptrdiff_t will do.
13766 (Fsubstitute_command_keys): Check for string overflow.
13767
13768 * editfns.c (set_time_zone_rule): Don't assume environment length
13769 fits in int.
13770 (message_length): Now ptrdiff_t, not int.
13771 (Fmessage_box): Don't update size until allocation succeeds.
13772 Don't assume message length fits in int.
13773 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
13774
0065d054
PE
13775 * emacs.c (main): Do not reallocate argv, since there is a null at
13776 the end that can be overwritten, and this way there's no need to
13777 worry about size-calculation overflow.
13778 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
13779
13780 * eval.c (init_eval_once, grow_specpdl): Don't update size until
13781 alloc succeeds.
13782 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
13783
13784 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
13785 (x_set_scroll_bar_width, x_figure_window_size):
13786 Check for integer overflow.
13787 (x_set_alpha): Do not assume XINT fits in int.
13788
13789 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
13790 This is for the members text_lines, text_cols, total_lines, total_cols,
13791 where the system imposes an 'int' limit.
13792
13793 * fringe.c (Fdefine_fringe_bitmap):
13794 Don't update size until alloc works.
13795
13796 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
13797 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
13798
13799 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
13800 Check for size-calculation overflow.
13801 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
13802 do, as we prefer signed integers.
13803 (id_to_widget.max_size, id_to_widget.used)
13804 (xg_store_widget_in_map, xg_remove_widget_from_map)
13805 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
13806 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
13807 Use and return ptrdiff_t, not int.
13808 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
13809 * gtkutil.h: Change prototypes to match the above.
13810
13811 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
13812 are duplicate now that they've been promoted to lisp.h.
13813 (x_allocate_bitmap_record, x_alloc_image_color)
13814 (make_image_cache, cache_image, xpm_load):
13815 Don't update size until alloc is done.
13816 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
13817 (x_detect_edges):
3256efce 13818 Check for size calculation overflow.
726e0ab1
PE
13819 (ct_colors_allocated_max): New constant.
13820 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
13821 overflow.
3256efce 13822
726e0ab1
PE
13823 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
13824 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
13825 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
13826 Use ptrdiff_t, not int, to count maps.
13827 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
13828 calculations. Don't update size until allocation succeeds.
13829 Redo calculations to avoid overflow.
726e0ab1
PE
13830 * keyboard.h: Change prototypes to match the above.
13831
13832 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
13833 to count maps.
13834 (current_minor_maps): Check for size calculation overflow.
13835 * keymap.h: Change prototypes to match the above.
13836
13837 * lread.c (read1, init_obarray): Don't update size until alloc done.
13838
13839 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
13840 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
13841
726e0ab1
PE
13842 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
13843 Now ptrdiff_t, not int.
13844 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
13845 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
13846
13847 * process.c (Fnetwork_interface_list): Check for overflow
13848 in size calculation.
13849
13850 * region-cache.c (move_cache_gap): Check for size calculation overflow.
13851
13852 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
13853 overflow. Don't bother calling xmalloc when xrealloc will do.
13854
13855 * search.c (Freplace_match): Check for size calculation overflow.
13856 (Fset_match_data): Don't assume list lengths fit in 'int'.
13857
13858 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
13859 for command line length. Do not attempt to address one before the
13860 beginning of an array, as that's not portable.
13861
13862 * term.c (max_frame_lines): Remove; unused.
13863 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
13864 not int.
13865 (encode_terminal_code, calculate_costs): Check for size
13866 calculation overflow.
13867 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
13868 table lengths and related sizes. Don't update size until alloc
13869 done. Redo calculations to avoid overflow.
13870 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
13871
13872 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
13873 subtracting pointers.
13874 (gobble_line): Check for overflow more carefully. Don't update size
13875 until alloc done.
13876
13877 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
13878 Don't update size until alloc done.
13879 Redo size calculations to avoid overflow.
13880 Check for size calculation overflow.
0065d054 13881 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
13882
13883 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
13884 Use ptrdiff_t, not int, for sizes.
13885 (store_mode_line_noprop_char): Don't update size until alloc done.
13886
0065d054
PE
13887 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
13888 Use ptrdiff_t, not int, for sizes.
13889 (Finternal_make_lisp_face, cache_face):
13890 Check for size calculation overflow.
13891 (cache_face): Treat size calculation overflows as if they were
13892 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
13893
13894 * xfns.c (x_encode_text, x_set_name_internal)
13895 (Fx_change_window_property): Use ptrdiff_t, not int, to count
13896 sizes, since they can exceed INT_MAX in size. Check for size
13897 calculation overflow.
13898
0065d054
PE
13899 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
13900 (xg_select): Check for size calculation overflow.
726e0ab1
PE
13901 Don't update size until alloc done.
13902
0065d054 13903 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 13904 as sprintf is limited to int lengths.
1d526e2f 13905
252c5ee1
PE
13906 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
13907 (X_LONG_MIN): New macros.
864d7ce7
PE
13908 Use them to make the following changes clearer.
13909 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
13910 This change doesn't affect the value now, but it may help remind
13911 future maintainers not to raise the value too much later.
13912 (SELECTION_QUANTUM): Remove, replacing with ...
13913 (selection_quantum): ... new function, which avoids overflow.
13914 All uses changed.
13915 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
13916 assumption that selection length fits in 'int'.
13917 (x_reply_selection_request, x_handle_selection_request)
13918 (x_get_window_property, receive_incremental_selection)
13919 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
13920 (lisp_data_to_selection_data, clean_local_selection_data):
13921 Use ptrdiff_t, not int, to record length of selection.
13922 (x_reply_selection_request, x_get_window_property)
13923 (receive_incremental_selection, x_property_data_to_lisp):
13924 Redo calculations to avoid overflow.
13925 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 13926 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
13927 something.
13928 (x_get_window_property, receive_incremental_selection)
13929 (lisp_data_to_selection_data, x_property_data_to_lisp):
13930 Check for size-calculation overflow.
13931 (x_get_window_property, receive_incremental_selection)
13932 (lisp_data_to_selection_data, Fx_register_dnd_atom):
13933 Don't store size until memory allocation succeeds.
13934 (x_get_window_property): Plug memory leak on memory exhaustion.
13935 Don't double-block input; malloc is safe here. Don't assume 2**34
13936 - 4 fits in unsigned long. Add an xassert to check
13937 XGetWindowProperty overflow. Be more careful about overflow
13938 calculations, and distinguish size from memory overflow better.
13939 (receive_incremental_selection): When tracing, don't assume
13940 unsigned int is less than INT_MAX.
13941 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
13942 harmful) conversions of unsigned short to int.
13943 (lisp_data_to_selection_data): Don't assume that integers
13944 in the range -65535 through -1 fit in an X unsigned short.
13945 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
13946 result parameters unless successful. Rely on cons_to_unsigned
13947 to report problems with elements; the old code wasn't right anyway.
13948 (x_check_property_data): Check for int overflow; we cannot use
13949 a wider type due to X limits.
13950 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
13951
726e0ab1 13952 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 13953
0065d054
PE
13954 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
13955 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
13956 (x_color_cells): Don't store size until memory allocation succeeds.
13957 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 13958 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
13959 (x_term_init): Don't assume length fits in int (sprintf is limited
13960 to int size).
bc18e09d 13961
ebfa62c0
PE
13962 Use ptrdiff_t for composition IDs.
13963 * character.c (lisp_string_width):
13964 * composite.c (composition_table_size, n_compositions)
13965 (get_composition_id, composition_gstring_from_id):
13966 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
13967 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
13968 * window.c (Frecenter):
13969 Use ptrdiff_t, not int, for composition IDs.
13970 * composite.c (get_composition_id): Check for integer overflow.
13971 * composite.h: Adjust prototypes to match the above changes.
13972
d3411f89
PE
13973 Use ptrdiff_t for hash table indexes.
13974 * category.c (hash_get_category_set):
13975 * ccl.c (ccl_driver):
13976 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
13977 * coding.c (coding_system_charset_list, detect_coding_system):
13978 * coding.h (struct coding_system.id):
13979 * composite.c (get_composition_id, gstring_lookup_cache):
13980 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
13981 * image.c (xpm_get_color_table_h):
13982 * lisp.h (hash_lookup, hash_put):
13983 * minibuf.c (Ftest_completion):
13984 Use ptrdiff_t for hash table indexes, not int (which is too
13985 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
13986 32-bit --with-wide-int hosts).
13987
e097a6fa
PE
13988 * charset.c (Fdefine_charset_internal): Check for integer overflow.
13989 Add a FIXME comment about memory leaks.
13990 (syms_of_charset): Don't assume xmalloc returns.
13991
5637687f
PE
13992 Don't assume that stated character widths fit in int.
13993 * character.c (Fchar_width, c_string_width, lisp_string_width):
13994 * character.h (CHAR_WIDTH):
13995 * indent.c (MULTIBYTE_BYTES_WIDTH):
13996 Use sanitize_char_width to avoid undefined and/or bad behavior
13997 with outlandish widths.
a66cfb1c 13998 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
13999 now that we have two such functions. All uses changed.
14000 (sanitize_char_width): New inline function.
14001
a2271ba2
PE
14002 Don't assume that tab-width fits in int.
14003 * character.h (sanitize_width): New inline function.
14004 (SANE_TAB_WIDTH): New macro.
14005 (ASCII_CHAR_WIDTH): Use it.
14006 * indent.c (sane_tab_width): Remove. All uses replaced by
14007 SANE_TAB_WIDTH (current_buffer).
14008 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
14009
18c52557
PE
14010 * fileio.c: Integer overflow issues with file modes.
14011 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
14012
caeeedc1
PE
14013 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
14014 Remove unreachable code.
14015 (read_hex, load_charset_map_from_file): Check for integer overflow.
14016
6df6ae42 14017 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
14018 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
14019 (x_send_scroll_bar_event): Likewise. Check that the size does not
14020 exceed limits imposed by XClientMessageEvent, as well as the usual
14021 ptrdiff_t and size_t limits.
14022
b13995db
PE
14023 * keyboard.c: Overflow, signedness and related fixes.
14024 (make_lispy_movement): Use same integer type in forward decl
14025 that is used in the definition.
14026 (read_key_sequence, keyremap_step):
14027 Change bufsize argument back to int, undoing my 2011-03-30 change.
14028 We prefer signed types, and int is wide enough here.
14029 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
14030 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
14031 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
14032 length, not size_t. Use ptrdiff_t for index, not int.
14033 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
14034 possibility of integer overflow.
14035
13464394
PE
14036 Overflow, signedness and related fixes for images.
14037
14038 * dispextern.h (struct it.stack[0].u.image.image_id)
14039 (struct_it.image_id, struct image.id, struct image_cache.size)
14040 (struct image_cache.used, struct image_cache.ref_count):
14041 * gtkutil.c (update_frame_tool_bar):
14042 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
14043 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
14044 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
14045 * nsmenu.m (update_frame_tool_bar):
14046 * xdisp.c (calc_pixel_width_or_height):
14047 * xfns.c (image_cache_refcount):
14048 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
14049 on typical 64-bit hosts.
14050
14051 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
14052 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
14053 Omit unnecessary casts to int.
14054 (parse_image_spec): Check that integers fall into 'int' range
14055 when the callers expect that.
14056 (image_ascent): Redo ascent calculation to avoid int overflow.
14057 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
14058 (lookup_image): Remove unnecessary tests.
14059 (xbm_image_p): Locals are now of int, not EMACS_INT,
14060 since parse_image_check makes sure they fit into int.
14061 (png_load, gif_load, svg_load_image):
14062 Prefer int to unsigned where either will do.
14063 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
14064 old tiff_error_handler and tiff_warning_handler.
14065 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
14066 stack buffer overflows. It uses only the features of vsnprintf
14067 that are common to both POSIX and native Microsoft.
14068 (tiff_error_handler, tiff_warning_handler): Use it.
14069 (tiff_load, gif_load, imagemagick_load_image):
14070 Don't assume :index value fits in 'int'.
14071 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
14072 (imagemagick_load_image): Check that crop parameters fit into
14073 the integer types that MagickCropImage accepts. Don't assume
14074 Vimagemagick_render_type has a nonnegative value. Don't assume
14075 size_t fits in 'long'.
14076 (gs_load): Use printmax_t to print the widest integers possible.
14077 Check for integer overflow when computing image height and width.
14078
c11821d4
EZ
140792011-08-26 Eli Zaretskii <eliz@gnu.org>
14080
14081 * xdisp.c (redisplay_window): Don't force window start if point
14082 will be invisible in the resulting window. (Bug#9324)
14083
0c95fcf7
EZ
140842011-08-25 Eli Zaretskii <eliz@gnu.org>
14085
14086 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
14087 the display spec is of the form `(space ...)'.
14088 (handle_display_spec): Return the value returned by
14089 handle_single_display_spec, not just 1 or zero.
14090 (handle_single_display_spec): If the display spec is of the form
14091 `(space ...)', and specifies display in the text area, return 2
14092 rather than 1.
fee65a97 14093 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
14094 accurately, and prefer exact match for point under bidi.
14095 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
14096
14097 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
14098 into disp_prop; all users changed.
14099
14100 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
14101 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
14102 for the text covered by the display property.
14103
e4ed06f1
CY
141042011-08-25 Chong Yidong <cyd@stupidchicken.com>
14105
14106 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
14107 Change return value to nil.
14108 (Frecord_buffer): Delete unused function.
14109
f67cdd7f
EZ
141102011-08-24 Eli Zaretskii <eliz@gnu.org>
14111
5980d4c6
EZ
14112 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
14113 buffers, return left-to-right.
8610fe8b
EZ
14114 (set_cursor_from_row): Consider candidate row a win if its glyph
14115 represents a newline and point is on that newline. Fixes cursor
14116 positioning on the newline at EOL of R2L text within L2R
14117 paragraph, and vice versa.
14118 (try_cursor_movement): Check continued rows, in addition to
14119 continuation rows. Fixes unwarranted scroll when point enters a
14120 continued line of R2L text within an L2R paragraph, or vice versa.
14121 (cursor_row_p): Consider the case of point being equal to
14122 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
14123 from the end of a short line to the beginning of a continued line
14124 of R2L text within L2R paragraph.
14125 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
14126 composed characters.
5980d4c6 14127
f67cdd7f
EZ
14128 * bidi.c (bidi_check_type): Use xassert.
14129 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
14130 members.
14131
bca633fb
EZ
141322011-08-23 Eli Zaretskii <eliz@gnu.org>
14133
14134 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
14135 a character.
14136
4a5885a7
CY
141372011-08-23 Chong Yidong <cyd@stupidchicken.com>
14138
14139 * nsfont.m (ns_otf_to_script): Fix typo.
14140
0902a04e
KH
141412011-08-22 Kenichi Handa <handa@m17n.org>
14142
14143 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
14144 extra slot even if the purpose is char-code-property-table.
14145
1a2e6670
EZ
141462011-08-23 Eli Zaretskii <eliz@gnu.org>
14147
8ddde651
EZ
14148 * xdisp.c (redisplay_window): When computing centering_position,
14149 account for the height of the header line. (Bug#8874)
14150
425cc014
EZ
14151 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
14152 instead of CHAR_TO_BYTE. Fixes a crash when a completion
14153 candidate is selected by the mouse, and that candidate has a
14154 composed character under the mouse.
14155
1a2e6670
EZ
14156 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
14157 coordinates reported by pos-visible-in-window-p for a composed
14158 character in column zero.
14159
8b76d6f8
SM
141602011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
14161
14162 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
14163
dac347dd
EZ
141642011-08-22 Eli Zaretskii <eliz@gnu.org>
14165
14166 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
14167 consider it a hit if to_charpos is anywhere in the range of the
14168 composed buffer positions.
14169
e013fb34
CY
141702011-08-22 Chong Yidong <cyd@stupidchicken.com>
14171
14172 * image.c (gif_load): Don't assume that each subimage has the same
14173 dimensions as the base image. Handle disposal method that is
14174 "undefined" by the gif spec (Bug#9335).
14175
bd1ba3e8
CY
141762011-08-20 Chong Yidong <cyd@stupidchicken.com>
14177
14178 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 14179 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 14180
54a1215b
EZ
141812011-08-19 Eli Zaretskii <eliz@gnu.org>
14182
823564e5
EZ
14183 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
14184 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
14185 from an Org mode buffer to a Speedbar frame.
14186
54a1215b
EZ
14187 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
14188 a composition, take its buffer position from IT->cmp_it.charpos.
14189 Fixes cursor positioning at the beginning of a line that begins
14190 with a composed character.
14191
9778ebcc
EZ
141922011-08-18 Eli Zaretskii <eliz@gnu.org>
14193
0be6ee06
EZ
14194 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
14195 character bidirectional type, use STRONG_L instead. Fixes crashes
14196 in a buffer produced by `describe-categories'.
14197
9778ebcc
EZ
14198 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
14199 members before the level stack, so they would be saved and
14200 restored when copying iterator state. Fixes incorrect reordering
14201 around TABs covered by display properties.
14202
156bffbe
AS
142032011-08-18 Andreas Schwab <schwab@linux-m68k.org>
14204
6b02f655 14205 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 14206
72ad093b
CY
142072011-08-17 Chong Yidong <cyd@stupidchicken.com>
14208
14209 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
14210 (internal_condition_case_2, internal_condition_case_n):
14211 Remove unnecessary aborts (Bug#9081).
72ad093b 14212
35774242
EZ
142132011-08-17 Eli Zaretskii <eliz@gnu.org>
14214
14215 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
14216 has no `load' handler, try opening the file locally. (Bug#9311)
14217
db76dd85
KB
142182011-08-16 Ken Brown <kbrown@cornell.edu>
14219
14220 * gmalloc.c: Expand comment.
14221
b215eee5
EZ
142222011-08-16 Eli Zaretskii <eliz@gnu.org>
14223
14224 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
14225 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
14226
a4579d33
KB
142272011-08-16 Ken Brown <kbrown@cornell.edu>
14228
14229 Fix memory allocation problems in Cygwin build (Bug#9273).
14230
14231 * unexcw.c ( __malloc_initialized): Declare external variable.
14232 (fixup_executable): Force the dumped emacs to reinitialize malloc.
14233
8b76d6f8
SM
14234 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
14235 New variables.
a4579d33
KB
14236 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
14237 dumped emacs.
14238 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
14239 in the static heap.
14240 [CYGWIN] (special_realloc): New function.
14241 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
14242 requests to realloc storage in the static heap.
14243
3ebec551
PE
142442011-08-15 Paul Eggert <eggert@cs.ucla.edu>
14245
14246 * bidi.c (bidi_initialize): Remove unused local.
14247
9fd8be00
EZ
142482011-08-15 Eli Zaretskii <eliz@gnu.org>
14249
6b02f655
SM
14250 * bidimirror.h:
14251 * biditype.h: Remove file.
14252 * makefile.w32-in ($(BLD)/bidi.$(O)):
14253 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
14254
14255 * dispextern.h: Fix a typo in the comment to bidi_type_t.
14256
14257 * chartab.c: Improve commentary for the uniprop_table API.
14258
32413314
EZ
14259 * bidi.c (bidi_paragraph_init): Support zero value of
14260 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
14261 (bidi_initialize): Use uniprop_table instead of including
14262 biditype.h and bidimirror.h.
32413314 14263
9fd8be00
EZ
14264 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
14265 coordinates of the iterator when restoring from ppos_it.
14266 (Bug#9296)
14267
5cf2b69b
KH
142682011-08-14 Kenichi Handa <handa@m17n.org>
14269
14270 * process.c (create_process): Call setup_process_coding_systems
72ad093b 14271 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 14272
daf17d00
EZ
142732011-08-14 Eli Zaretskii <eliz@gnu.org>
14274
14275 * xdisp.c (move_it_in_display_line_to): Don't invoke
14276 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
14277 ppos_it. Fixes vertical cursor motion when line beginning is
14278 covered by an image. (Bug#9296)
14279
08e3161a
JD
142802011-08-14 Jan Djärv <jan.h.d@swipnet.se>
14281
14282 * nsterm.h (ns_run_ascript): Declare.
14283 (NSAPP_DATA2_RUNASSCRIPT): Define.
14284
14285 * nsfns.m (as_script, as_result, as_status): New static variables.
14286 (ns_run_ascript): New function.
5e617bc2 14287 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
14288 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
14289 the event loop. Get status from as_status (Bug#7276).
14290
14291 * nsterm.m (sendEvent): If event is NSApplicationDefined and
14292 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
14293 the event loop (Bug#7276).
14294
a3720aa2
AS
142952011-08-14 Andreas Schwab <schwab@linux-m68k.org>
14296
14297 * gnutls.c (QCgnutls_bootprop_priority)
14298 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
14299 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
14300 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
14301 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
14302 (QCgnutls_bootprop_verify_hostname_error)
14303 (QCgnutls_bootprop_callbacks_verify): Rename from
14304 Qgnutls_bootprop_..., all uses changed.
14305
14306 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
14307 uses changed.
14308
0a0d27fb
PE
143092011-08-14 Paul Eggert <eggert@cs.ucla.edu>
14310
19d5c50c
PE
14311 * xfaces.c (Qframe_set_background_mode): Now static.
14312 * dispextern.h (Qframe_set_background_mode): Remove decl.
14313
0a0d27fb
PE
14314 * process.c (Fnetwork_interface_info): Declare local only if needed.
14315
377538cb
JD
143162011-08-13 Jan Djärv <jan.h.d@swipnet.se>
14317
14318 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
14319 (Fnetwork_interface_list): Allocate in increments of bytes instead
14320 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
14321 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
14322 sockaddr.
14323 (struct ifflag_def): notrailers is smart on OSX.
14324 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
14325 Get hardware address with getifaddrs if available.
14326
08fff70c
EZ
143272011-08-12 Eli Zaretskii <eliz@gnu.org>
14328
14329 * xdisp.c (iterate_out_of_display_property): xassert that
14330 IT->position is set to within IT->object's boundaries. Break from
14331 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
14332 when IT->position is set up wrongly due to some bug.
14333 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
14334 (push_display_prop): Allow GET_FROM_STRING as IT->method on
14335 entry. Force push_it to save on the stack the current
14336 buffer/string position, to be restored by pop_it. Fix flags in
14337 the iterator structure wrt the object coming from a display
14338 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
14339 properties. (Bug#9284)
14340
7be1c708 143412011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 14342
7be1c708
CY
14343 * fontset.c (fontset_get_font_group): Add proper type checks.
14344 (Bug#9172)
aac0c6e3 14345
7be1c708 143462011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 14347
7be1c708
CY
14348 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
14349 and LC_VERSION_MIN_MACOSX.
14350 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
14351 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 14352
97bb72a6
EZ
143532011-08-08 Eli Zaretskii <eliz@gnu.org>
14354
14355 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
14356 no-display-properties-and-no-overlays under bidi display.
14357 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 14358 properties and overlays.
97bb72a6 14359
d5617611
CY
143602011-08-08 Chong Yidong <cyd@stupidchicken.com>
14361
37e11a63
CY
14362 * editfns.c (Fset_time_zone_rule): Document relationship with the
14363 setenv function.
14364
d5617611
CY
14365 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
14366 the font entity extracted from the cache (Bug#8109).
14367
58872834
CY
143682011-08-07 Chong Yidong <cyd@stupidchicken.com>
14369
14370 * composite.c (autocmp_chars): Don't reset point. That is done by
14371 restore_point_unwind (Bug#5984).
14372
75bfc667
JL
143732011-08-07 Juri Linkov <juri@jurta.org>
14374
14375 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
14376 to show the arg `TIME' instead of `TIMEVAL'.
14377
d1410150
EZ
143782011-08-06 Eli Zaretskii <eliz@gnu.org>
14379
14380 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
14381 display property strides EOL and includes a newline, as in
14382 longlines-mode. (Bug#9254)
75b771e4
EZ
14383 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
14384 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
14385
14386 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
14387 is non-zero, even if the data buffer is NULL. Fixes a crash in
14388 vertical-motion with longlines-mode. (Bug#9254)
14389
35928349
EZ
143902011-08-05 Eli Zaretskii <eliz@gnu.org>
14391
ec7cc85b
EZ
14392 * bidi.c <bidi_cache_total_alloc>: Now static.
14393 (bidi_initialize): Initialize bidi_cache_total_alloc.
14394
8b76d6f8 14395 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
14396 cache. (Bug#9221)
14397
14398 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
14399 amount allocated this far in `bidi_cache_total_alloc'.
14400 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
14401 non-zero, only free the data buffer without restoring the cache
14402 contents. All callers changed.
14403
14404 * dispextern.h (bidi_unshelve_cache): Update prototype.
14405
14406 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
14407 (move_it_in_display_line, move_it_to)
14408 (move_it_vertically_backward, move_it_by_lines): Replace the call
14409 to xfree to an equivalent call to bidi_unshelve_cache.
14410 (move_it_in_display_line_to): Fix logic of returning
412b6358 14411 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 14412
e2e2423b
EZ
144132011-08-05 Eli Zaretskii <eliz@gnu.org>
14414
14415 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
14416 came from a string character with a `cursor' property. (Bug#9229)
14417
ae9e757a
JD
144182011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14419
14420 * Makefile.in (LIB_PTHREAD): New variable.
14421 (LIBES): Add LIB_PTHREAD (Bug#9216).
14422
14423 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
14424 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
14425
213bd7f2
AS
144262011-08-04 Andreas Schwab <schwab@linux-m68k.org>
14427
6b02f655 14428 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 14429
99aaf75f
JD
144302011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14431
14432 * xterm.c (x_find_topmost_parent): New function.
14433 (x_set_frame_alpha): Find topmost parent window with
14434 x_find_topmost_parent and set the property there also (bug#9181).
14435 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
14436
c74e9d86
PE
144372011-08-04 Paul Eggert <eggert@cs.ucla.edu>
14438
14439 * callproc.c (Fcall_process): Avoid vfork clobbering
14440 the local vars buffer, coding_systems, current_dir.
14441
640c8776
SM
144422011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
14443
14444 * keymap.c (Fmake_composed_keymap): Move to subr.el.
14445
f26d0e4c
PE
144462011-08-03 Paul Eggert <eggert@cs.ucla.edu>
14447
8a10d76c
PE
14448 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
14449 so that it is not optimized away.
14450
f26d0e4c
PE
14451 * xdisp.c (compute_display_string_pos): Remove unused local.
14452
55439c61
EZ
144532011-08-02 Eli Zaretskii <eliz@gnu.org>
14454
14455 Fix slow cursor motion and scrolling in large buffers with
14456 selective display, like Org Mode buffers. (Bug#9218)
14457
14458 * dispextern.h (struct bidi_it): New member disp_prop_p.
14459
14460 * xdisp.c: Remove one-slot cache of display string positions.
14461 (compute_display_string_pos): Accept an additional argument
5e617bc2 14462 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
14463 for a display string or property. If found, set DISP_PROP_P
14464 non-zero.
14465
14466 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
14467 DISP_PROP_P, and pass it to compute_display_string_pos.
14468 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
14469 non-zero. All callers of bidi_fetch_char changed.
14470
fb33fa43
SM
144712011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
14472
14473 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
14474
b099e063
DM
144752010-12-03 Don March <don@ohspite.net>
14476
14477 * keymap.c (Fdefine_key): Fix non-prefix key error message when
14478 last character M-[char] is translated to ESC [char] (bug#7541).
14479
5cc7f7af
KH
144802011-08-02 Kenichi Handa <handa@m17n.org>
14481
d0fffa3f 14482 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
14483
14484 * chartab.c (uniprop_table): Make it non-static.
14485
525d5e6e
EZ
144862011-08-01 Eli Zaretskii <eliz@gnu.org>
14487
14488 * xdisp.c (forward_to_next_line_start): Accept additional argument
14489 BIDI_IT_PREV, and store into it the state of the bidi iterator had
14490 on the newline.
14491 (reseat_at_next_visible_line_start): Use the bidi iterator state
14492 returned by forward_to_next_line_start to restore the state of
14493 it->bidi_it after backing up to previous newline. (Bug#9212)
14494
31011111
AS
144952011-07-30 Andreas Schwab <schwab@linux-m68k.org>
14496
14497 * regex.c (re_comp): Protoize.
14498 (re_exec): Fix return type.
14499 (regexec): Fix type of `ret'. (Bug#9203)
14500
476371c4
PE
145012011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14502
e5d76069
PE
14503 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
14504 This is needed if max-image-size is a floating-point number.
14505
9a79b20c
AS
145062011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14507
14508 * print.c (print_object): Print empty symbol as ##.
14509
14510 * lread.c (read1): Read ## as empty symbol.
14511
d8c2fa78
AA
145122011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
14513
14514 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
14515 setting frame foreground color (Bug#9175).
14516 (x_set_background_color): Likewise.
14517
ffe57a7a
AA
14518 * nsmenu.m (-setText): Size tooltip dimensions precisely to
14519 contents (Bug#9176).
14520 (EmacsTooltip -init): Remove bezels and add shadows to
14521 tooltip windows.
14522
bf3492a5
AA
14523 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
14524 or scroll bar (Bug#8470).
14525
d55e9c53
AA
14526 * nsfont.m (nsfont_open): Remove assignment to voffset and
14527 unnecessary vars hshink, expand, hd, full_height, min_height.
14528 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
14529
14530 * nsterm.h (nsfont_info): Remove voffset field.
14531
d8c2fa78 145322011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
14533
14534 Implement strike-through and overline on NextStep (Bug#8863).
14535
14536 * nsfont.m (nsfont_open): Use underline position provided by font,
14537 instead of hard-coded value of 2.
14538 (nsfont_draw): Call ns_draw_text_decoration instead.
14539
14540 * nsterm.h: Add declaration for ns_draw_text_decoration.
14541
14542 * nsterm.m (ns_draw_text_decoration): New function for drawing
14543 underline, overline, and strike-through.
14544 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
14545 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 14546 accommodate underlining, etc.
4843aac3 14547
4cc60b9b
EZ
145482011-07-28 Eli Zaretskii <eliz@gnu.org>
14549
bc7ece87
EZ
14550 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
14551 default.
4cc60b9b 14552
476371c4
PE
145532011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14554
66606eea
PE
14555 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
14556 Without this fix, if a signal arrives just after memory fills up,
14557 'malloc' might be invoked reentrantly.
14558
476371c4
PE
14559 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
14560 In other words, assume that every image size is allowed, on non-X
14561 hosts. This assumption is probably wrong, but it lets Emacs compile.
14562
f3fcc40d
AS
145632011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14564
14565 * regex.c (re_iswctype): Convert return values to boolean.
14566
350c992f
EZ
145672011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
14568
14569 * xdisp.c (compute_display_string_pos): Don't use cached display
14570 string position if the buffer had its restriction changed.
14571 (Bug#9184)
14572
5266b4bb
PE
145732011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14574
14575 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14576
2573a837 145772011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 14578
41f55ccd 14579 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 14580
39e378da
PE
14581 * bidi.c: Integer size and overflow fixes.
14582 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
14583 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
14584 (bidi_cache_find_level_change, bidi_cache_ensure_space)
14585 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
14586 (bidi_find_other_level_edge):
14587 Use ptrdiff_t instead of EMACS_INT where either will do.
14588 This works better on 32-bit hosts configured --with-wide-int.
14589 (bidi_cache_ensure_space): Check for size-calculation overflow.
14590 Use % rather than repeated addition, for better worst-case speed.
14591 Don't set bidi_cache_size until after xrealloc returns, because it
14592 might not return.
14593 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
14594 (bidi_cache_ensure_space): Also check that the bidi cache size
14595 does not exceed that of the largest Lisp string or buffer. See Eli
14596 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 14597
5e927815
PE
14598 * alloc.c (__malloc_size_t): Remove.
14599 All uses replaced by size_t. See Andreas Schwab's note
14600 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
14601
ca4aa935
PE
14602 * image.c: Improve checking for integer overflow.
14603 (check_image_size): Assume that f is nonnull, since
14604 it is always nonnull in practice. This is one less thing to
14605 worry about when checking for integer overflow later.
14606 (x_check_image_size): New function, which checks for integer
14607 overflow issues inside X.
14608 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
14609 This removes the need for a memory_full check.
14610 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
14611 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
14612 (xbm_read_bitmap_data): Change locals back to 'int', since
14613 their values must fit in 'int'.
14614 (xpm_load_image, png_load, tiff_load):
14615 Invoke x_create_x_image_and_pixmap earlier,
14616 to avoid much needless work if the image is too large.
14617 (tiff_load): Treat overly large images as if
14618 x_create_x_image_and_pixmap failed, not as malloc failures.
14619 (gs_load): Use x_check_image_size.
14620
5f8f9cc2
PE
14621 * gtkutil.c: Omit integer casts.
14622 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
14623 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
14624
5adf60bc
PE
14625 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
14626
c8907a93
PE
14627 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
14628 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
14629 would wrongly return t on a 64-bit host.
14630
e3c25c68
PE
14631 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
14632 The plain *_OVERFLOW macros run afoul of GCC bug 49705
14633 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
14634 and therefore cause GCC to emit a bogus diagnostic in some cases.
14635
3f791afe
PE
14636 * image.c: Integer signedness and overflow and related fixes.
14637 This is not an exhaustive set of fixes, but it's time to
14638 record what I've got.
14639 (lookup_pixel_color, check_image_size): Remove redundant decls.
14640 (check_image_size): Don't assume that arbitrary EMACS_INT values
14641 fit in 'int', or that arbitrary 'double' values fit in 'int'.
14642 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
14643 (tiff_load, imagemagick_load_image):
14644 Check for overflow in size calculations.
14645 (x_create_x_image_and_pixmap): Remove unnecessary test for
14646 xmalloc returning NULL; that can't happen.
14647 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
14648 (xpm_color_bucket): Use better integer hashing function.
14649 (xpm_cache_color): Don't possibly over-allocate memory.
14650 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
14651 (gif_memory_source):
14652 Use ptrdiff_t, not int or size_t, to record sizes.
14653 (png_load): Don't assume values greater than 2**31 fit in 'int'.
14654 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
14655 either works, as we prefer signed integers.
14656 (tiff_read_from_memory, tiff_write_from_memory):
14657 Return tsize_t, not size_t, since that's what the TIFF API wants.
14658 (tiff_read_from_memory): Don't fail simply because the read would
14659 go past EOF; instead, return a short read.
14660 (tiff_load): Omit no-longer-needed casts.
14661 (Fimagemagick_types): Don't assume size fits into 'int'.
14662
3cc5a532
PE
14663 Improve hashing quality when configured --with-wide-int.
14664 * fns.c (hash_string): New function, taken from sxhash_string.
14665 Do not discard information about ASCII character case; this
14666 discarding is no longer needed.
14667 (sxhash-string): Use it. Change sig to match it. Caller changed.
14668 * lisp.h: Declare it.
14669 * lread.c (hash_string): Remove, since we now use fns.c's version.
14670 The fns.c version returns a wider integer if --with-wide-int is
14671 specified, so this should help the quality of the hashing a bit.
14672
b312a492
PE
14673 * emacs.c: Integer overflow minor fix.
14674 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
14675 Define only if GNU_LINUX.
14676 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
14677
dfd153ae
PE
14678 * dispnew.c: Integer signedness and overflow fixes.
14679 Remove unnecessary forward decls, that were a maintenance hassle.
14680 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
14681 All uses changed.
14682 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
14683 (scrolling_window): Use ptrdiff_t, not int, for byte count.
14684 (prepare_desired_row, line_draw_cost):
14685 Use int, not unsigned, where either works.
14686 (save_current_matrix, restore_current_matrix):
14687 Use ptrdiff_t, not size_t, where either works.
14688 (init_display): Check for overflow more accurately, and without
14689 relying on undefined behavior.
14690
a81d11a3
PE
14691 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
14692 Remove, replacing with the new symbols in lisp.h. All uses changed.
14693 * fileio.c (make_temp_name):
14694 * filelock.c (lock_file_1, lock_file):
14695 * xdisp.c (message_dolog):
14696 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
14697 Use pMd etc. instead.
14698 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
14699 replacing the pWIDE etc. symbols removed from editfns.c.
14700
3300e6fd
PE
14701 * keyboard.h (num_input_events): Now uintmax_t.
14702 This is (very slightly) less likely to mess up due to wraparound.
14703 All uses changed.
14704
fd05c7e9
PE
14705 * buffer.c: Integer signedness fixes.
14706 (alloc_buffer_text, enlarge_buffer_text):
14707 Use ptrdiff_t rather than size_t when either will do, as we prefer
14708 signed integers.
14709
903fe15d
PE
14710 * alloc.c: Integer signedness and overflow fixes.
14711 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
14712 (__malloc_size_t): Default to size_t, not to int.
14713 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
14714 (Fgarbage_collect, mark_object_loop_halt, mark_object):
14715 Prefer ptrdiff_t to size_t when either would do, as we prefer
14716 signed integers.
14717 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
14718 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
14719 Now const. Initialize with values that are in range even if char
14720 is signed.
14721 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
14722 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
14723 These functions do the right thing with sizes > 2**32.
14724 (check_depth): Now ptrdiff_t, not int.
14725 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
14726 Adjust to new way of storing sizes. Check for size overflow bugs
14727 in rest of code.
14728 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
14729 slightly wrong anyway, as it missed one instance of
14730 XMALLOC_OVERRUN_CHECK_OVERHEAD.
14731 (refill_memory_reserve): Omit needless cast to size_t.
14732 (mark_object_loop_halt): Mark as externally visible.
14733
ac82cc6a
PE
14734 * xselect.c: Integer signedness and overflow fixes.
14735 (Fx_register_dnd_atom, x_handle_dnd_message):
14736 Use ptrdiff_t, not size_t, since we prefer signed.
14737 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
14738 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
14739 x_dnd_atoms_size and x_dnd_atoms_length.
14740
c2d1e36d
PE
14741 * doprnt.c: Prefer signed to unsigned when either works.
14742 * eval.c (verror):
14743 * doprnt.c (doprnt):
14744 * lisp.h (doprnt):
14745 * xdisp.c (vmessage):
14746 Use ptrdiff_t, not size_t, when using or implementing doprnt,
14747 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
14748 prefer signed arithmetic to avoid comparison confusion.
14749 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
14750 but is a bit tricky.
14751
0e926e56
PE
14752 Assume freestanding C89 headers, string.h, stdlib.h.
14753 * data.c, doprnt.c, floatfns.c, print.c:
14754 Include float.h unconditionally.
14755 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
14756 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
14757 * regex.c: Likewise for stddef.h, string.h.
14758 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
14759 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
14760 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
14761 (STDC_HEADERS): Remove obsolete defines.
14762 * sysdep.c: Include limits.h unconditionally.
14763
9cfdb3ec
PE
14764 Assume support for memcmp, memcpy, memmove, memset.
14765 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
14766 * regex.c (memcmp, memcpy):
14767 Remove; we assume C89 now.
14768
14769 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
14770 (__malloc_safe_bcopy): Remove; no longer needed.
14771
cf950e6b 14772 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
14773 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
14774 well either way, and we prefer signed to unsigned.
14775
dbf38e02
LMI
147762011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
14777
14778 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
14779 closes the connection while we're reading (bug#9182).
14780
d6f0886c 147812011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 14782
d6f0886c
JD
14783 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
14784 are specified (Bug#9168).
24e0f6b1 14785
2eb1f9e6
PE
147862011-07-25 Paul Eggert <eggert@cs.ucla.edu>
14787
14788 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
14789 Found by GCC static checking and --with-wide-int on a 32-bit host.
14790
22381272 147912011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
14792
14793 * xdisp.c (compute_display_string_pos): Fix logic of caching
14794 previous display string position. Initialize cached_prev_pos to
14795 -1. Fixes slow-down at the beginning of a buffer.
14796
f25e39b4
EZ
147972011-07-24 Eli Zaretskii <eliz@gnu.org>
14798
14799 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
14800 for attrs[LFACE_FONTSET_INDEX].
14801
04c4b52e
PE
148022011-07-23 Paul Eggert <eggert@cs.ucla.edu>
14803
14804 * xml.c (parse_region): Remove unused local
14805 that was recently introduced.
14806
c1734fbd
EZ
148072011-07-23 Eli Zaretskii <eliz@gnu.org>
14808
be18c5a5
EZ
14809 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
14810 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
14811
c1734fbd
EZ
14812 * xdisp.c (move_it_in_display_line_to): Record the best matching
14813 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
14814 exit if none of the characters scanned was an exact match.
14815 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
14816 when exact match is impossible due to invisible text, and the
14817 lines are truncated.
14818
a258d627
JD
148192011-07-23 Jan Djärv <jan.h.d@swipnet.se>
14820
14821 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
14822 for OSX >= 10.7.
14823
b6d5a689
EZ
148242011-07-22 Eli Zaretskii <eliz@gnu.org>
14825
0f74f785
EZ
14826 Fix a significant slow-down of cursor motion with C-n, C-p,
14827 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
14828 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 14829 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
14830 (next_element_from_buffer): Call compute_stop_pos_backwards to
14831 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
14832 base_level_stop.
14833 (reseat): Don't look for prev_stop, as that could mean a very long
14834 run.
14835 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
14836 <cached_disp_overlay_modiff>: Cache for last found display string
14837 position.
551918c1 14838 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
14839 about the same buffer in the same area of character positions, and
14840 the buffer wasn't changed since the time the display string
14841 position was cached.
551918c1 14842
b2d0c91a
EZ
148432011-07-22 Eli Zaretskii <eliz@gnu.org>
14844
14845 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
14846 is an integer, which is important for empty lines. (Bug#9149)
14847
043604ee
CY
148482011-07-22 Chong Yidong <cyd@stupidchicken.com>
14849
14850 * frame.c (Fmodify_frame_parameters): In tty case, update the
14851 default face if necessary (Bug#4238).
14852
da4adb04
CY
148532011-07-21 Chong Yidong <cyd@stupidchicken.com>
14854
14855 * editfns.c (Fstring_to_char): No need to explain what a character
14856 is in the docstring (Bug#6576).
14857
9abd0532
LMI
148582011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
14859
14860 * xml.c (parse_region): Make sure we always return a tree.
14861
36881d16
HK
148622011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
14863
14864 * xml.c (parse_region): If a document contains only comments,
14865 return that, too.
14866
1e98674d
LMI
148672011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
14868
14869 * xml.c (make_dom): Return comments, too.
14870
590bd467
PE
148712011-07-19 Paul Eggert <eggert@cs.ucla.edu>
14872
14873 Port to OpenBSD.
14874 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
14875 and the surrounding thread.
14876 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
14877 rather than fgets, and retry after EINTR. Otherwise, 'emacs
14878 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
14879 timer goes off.
14880 * s/openbsd.h (BROKEN_SIGIO): Define.
14881 * unexelf.c (unexec) [__OpenBSD__]:
14882 Don't update the .mdebug section of the Alpha COFF symbol table.
14883
f41628b2
LMI
148842011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
14885
14886 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
14887 (bug#8460).
14888
b59b67c5
PE
148892011-07-18 Paul Eggert <eggert@cs.ucla.edu>
14890
15e3a074
PE
14891 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
14892 This fixes some race conditions on the permissions of any newly
14893 created file.
14894
41bed37d
PE
14895 * alloc.c (valid_pointer_p): Use pipe, not open.
14896 This fixes some permissions issues when debugging.
14897
b59b67c5
PE
14898 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
14899 If fchown fails to set both uid and gid, try to set just gid,
14900 as that is sometimes allowed. Adjust the file's mode to eliminate
14901 setuid or setgid bits that are inappropriate if fchown fails.
14902
925a6be7
SM
149032011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
14904
14905 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
14906 to compare Lisp_Objects.
14907 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
14908 global_gnutls_log_level, don't mistake it for a Lisp_Object.
14909 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
14910
52968808
AS
149112011-07-17 Andreas Schwab <schwab@linux-m68k.org>
14912
0a6a104b
AS
14913 * lread.c (read_integer): Unread even EOF character.
14914 (read1): Likewise. Properly record start position of symbol.
14915
52968808
AS
14916 * lread.c (read1): Read `#:' as empty uninterned symbol if no
14917 symbol character follows.
14918
9e381cdd
PE
149192011-07-17 Paul Eggert <eggert@cs.ucla.edu>
14920
14921 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
14922 This works around a problem with the previous change to Fcopy_file.
14923 Recent glibc declares fchown with __attribute__((warn_unused_result)),
14924 and without this change, GCC might complain about discarding
14925 fchown's return value.
14926
b5641435
JB
149272011-07-16 Juanma Barranquero <lekktu@gmail.com>
14928
14929 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
14930
a8031457
PE
149312011-07-16 Paul Eggert <eggert@cs.ucla.edu>
14932
14933 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
14934
dd889327
LMI
149352011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
14936
750c33f7
LMI
14937 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
14938 it's used from the C level.
14939
dd889327
LMI
14940 * process.c: Use the same condition for POLL_FOR_INPUT in both
14941 keyboard.c and process.c (bug#1858).
14942
87e86684
LM
149432011-07-09 Lawrence Mitchell <wence@gmx.li>
14944
14945 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
14946 (Fgnutls_boot): Use it.
14947
64348f40
AS
149482011-07-15 Andreas Schwab <schwab@linux-m68k.org>
14949
14950 * doc.c (Fsubstitute_command_keys): Revert last change.
14951
1d698799
LMI
149522011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
14953
f863868c
LMI
14954 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
14955 quotes the next character, and doesn't affect other longer
14956 sequences (bug#8935).
14957
1d698799
LMI
14958 * lread.c (syms_of_lread): Clarify that is isn't only
14959 `eval-buffer' and `eval-defun' that's affected by
14960 `lexical-binding' (bug#8460).
14961
aa4b6df6
EZ
149622011-07-15 Eli Zaretskii <eliz@gnu.org>
14963
14964 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 14965 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 14966
5d856da6
PE
149672011-07-14 Paul Eggert <eggert@cs.ucla.edu>
14968
ad6042bb
PE
14969 Fix minor problems found by static checking.
14970 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
14971 (elsz): Now a signed constant, not a size_t var. We prefer signed
14972 types to unsigned, to avoid integer comparison confusion. Without
14973 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
14974 "cannot optimize loop, the loop counter may overflow", a symptom
14975 of the confusion.
f00bbb22 14976 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
14977 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
14978
6468f31c
LMI
149792011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
14980
49080b10
LMI
14981 * search.c (Fre_search_backward): Mention `case-fold-search' in
14982 all the re_search_* functions (bug#8138).
14983
6468f31c
LMI
14984 * keyboard.c (Fopen_dribble_file): Document when the file is
14985 closed (bug#8056).
14986
c965adc5
EZ
149872011-07-14 Eli Zaretskii <eliz@gnu.org>
14988
df9733bf
EZ
14989 * bidi.c (bidi_dump_cached_states): Fix format of displaying
14990 bidi_cache_idx.
14991
0bb23927
EZ
14992 Support bidi reordering of display and overlay strings.
14993 * xdisp.c (compute_display_string_pos)
14994 (compute_display_string_end): Accept additional argument STRING.
14995 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
14996 (reseat_to_string): Initialize bidi_it->string.s and
14997 bidi_it->string.schars.
14998 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
14999 NULL (avoids a crash in bidi_paragraph_init).
15000 Initialize itb.string.lstring.
0bb23927
EZ
15001 (init_iterator): Call bidi_init_it only of a valid
15002 buffer position was specified. Initialize paragraph_embedding to
15003 L2R.
15004 (reseat_to_string): Initialize the bidi iterator.
15005 (display_string): If we need to ignore text properties of
15006 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
15007 original value of -1 will not work with bidi.)
15008 (compute_display_string_pos): First arg is now struct
15009 `text_pos *'; all callers changed. Support display properties on
15010 Lisp strings.
15011 (compute_display_string_end): Support display properties on Lisp
15012 strings.
15013 (init_iterator, reseat_1, reseat_to_string): Initialize the
15014 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
15015 when iterating on a string not from display properties).
640c8776
SM
15016 (compute_display_string_pos, compute_display_string_end):
15017 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
15018 arrow keys.
15019 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
15020 base_level_stop; instead, set base_level_stop to BEGV.
15021 Fixes crashes in vertical-motion.
0bb23927
EZ
15022 (next_element_from_buffer): Improve commentary for when
15023 the iterator is before prev_stop.
15024 (init_iterator): Initialize bidi_p from the default value of
15025 bidi-display-reordering, not from buffer-local value. Use the
15026 buffer-local value only if initializing for buffer iteration.
15027 (handle_invisible_prop): Support invisible properties on strings
15028 that are being bidi-reordered.
15029 (set_iterator_to_next): Support bidi reordering of C strings and
15030 Lisp strings.
15031 (next_element_from_string): Support bidi reordering of Lisp
15032 strings.
15033 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
15034 (display_string): Support display of R2L glyph rows.
15035 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
15036 (init_iterator): Don't initialize it->bidi_p for strings
15037 here.
15038 (reseat_to_string): Initialize it->bidi_p for strings here.
15039 (next_element_from_string, next_element_from_c_string)
15040 (next_element_from_buffer): Add xassert's for correspondence
15041 between IT's object being iterated and it->bidi_it.string
15042 structure.
15043 (face_before_or_after_it_pos): Support bidi iteration.
15044 (next_element_from_c_string): Handle the case of the first string
15045 character that is not the first one in the visual order.
15046 (get_visually_first_element): New function, refactored from common
15047 parts of next_element_from_buffer, next_element_from_string, and
15048 next_element_from_c_string.
15049 (tool_bar_lines_needed, redisplay_tool_bar)
15050 (display_menu_bar): Force left-to-right direction. Add a FIXME
15051 comment for making that be controlled by a user option.
15052 (push_it, pop_it): Save and restore the state of the
15053 bidi iterator. Save and restore the bidi_p flag.
15054 (pop_it): Iterate out of display property for string iteration as
15055 well.
15056 (iterate_out_of_display_property): Support iteration over strings.
15057 (handle_single_display_spec): Set up it->bidi_it for iteration
15058 over a display string, and call bidi_init_it.
15059 (handle_single_display_spec, next_overlay_string)
15060 (get_overlay_strings_1, push_display_prop): Set up the bidi
15061 iterator for displaying display or overlay strings.
15062 (forward_to_next_line_start): Don't use the shortcut if
15063 bidi-iterating.
15064 (back_to_previous_visible_line_start): If handle_display_prop
15065 pushed the iterator stack, restore the internal state of the bidi
15066 iterator by calling bidi_pop_it same number of times.
15067 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
15068 and we are bidi-iterating, don't decrement the iterator position;
15069 instead, set the first_elt flag in the bidi iterator, to produce
15070 the same effect.
15071 (reseat_1): Remove redundant setting of string_from_display_prop_p.
15072 (push_display_prop): xassert that we are iterating a buffer.
15073 (push_it, pop_it): Save and restore paragraph_embedding member.
15074 (handle_single_display_spec, next_overlay_string)
15075 (get_overlay_strings_1, reseat_1, reseat_to_string)
15076 (push_display_prop): Set up the `unibyte' member of bidi_it.string
15077 correctly. Don't assume unibyte strings are not bidi-reordered.
15078 (compute_display_string_pos)
15079 (compute_display_string_end): Fix handling the case of C string.
15080 (push_it, pop_it): Save and restore from_disp_prop_p.
15081 (handle_single_display_spec, push_display_prop): Set the
15082 from_disp_prop_p flag.
15083 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
15084 (pop_it): Call iterate_out_of_display_property only if we are
15085 popping after iteration over a string that came from a display
15086 property. Fix a typo in popping stretch info. Add an assertion
15087 for verifying that the iterator position is in sync with the bidi
15088 iterator.
15089 (handle_single_display_spec, get_overlay_strings_1)
15090 (push_display_prop): Fix initialization of paragraph direction for
15091 string when that of the parent object is not yet determined.
15092 (reseat_1): Call bidi_init_it to resync the bidi
15093 iterator with IT's position. (Bug#7616)
15094 (find_row_edges): If ROW->start.pos gives position
15095 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
15096 (handle_stop, back_to_previous_visible_line_start, reseat_1):
15097 Reset the from_disp_prop_p flag.
15098 (SAVE_IT, RESTORE_IT): New macros.
15099 (pos_visible_p, face_before_or_after_it_pos)
15100 (back_to_previous_visible_line_start)
15101 (move_it_in_display_line_to, move_it_in_display_line)
15102 (move_it_to, move_it_vertically_backward, move_it_by_lines)
15103 (try_scrolling, redisplay_window, display_line): Use them when
15104 saving a temporary copy of the iterator and restoring it back.
15105 (back_to_previous_visible_line_start, reseat_1)
15106 (init_iterator): Empty the bidi cache "stack".
15107 (move_it_in_display_line_to): If iterator ended up at
15108 EOL, but we never saw any buffer positions smaller than
15109 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
15110 motion in bidi-reordered lines.
15111 (move_it_in_display_line_to): Record prev_method and prev_pos
15112 immediately before the call to set_iterator_to_next. Fixes cursor
15113 motion in bidi-reordered lines with stretch glyphs and strings
15114 displayed in margins. (Bug#8133) (Bug#8867)
15115 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
15116 TO_CHARPOS.
640c8776
SM
15117 (pos_visible_p): Support positions in bidi-reordered lines.
15118 Save and restore bidi cache.
0bb23927
EZ
15119
15120 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
15121 (bidi_paragraph_info): Delete unused struct.
15122 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
15123 (bidi_cache_start): New variable.
15124 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
15125 to zero.
15126 (bidi_cache_fetch_state, bidi_cache_search)
15127 (bidi_cache_find_level_change, bidi_cache_iterator_state)
15128 (bidi_cache_find, bidi_peek_at_next_level)
15129 (bidi_level_of_next_char, bidi_find_other_level_edge)
15130 (bidi_move_to_visually_next): Compare cache index with
15131 bidi_cache_start rather than with zero.
15132 (bidi_fetch_char): Accept new argument STRING; all callers
15133 changed. Support iteration over a string. Support strings with
15134 display properties. Support unibyte strings. Fix the type of
15135 `len' according to what STRING_CHAR_AND_LENGTH expects.
15136 (bidi_paragraph_init, bidi_resolve_explicit_1)
15137 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
15138 (bidi_level_of_next_char, bidi_move_to_visually_next):
15139 Support iteration over a string.
0bb23927
EZ
15140 (bidi_set_sor_type, bidi_resolve_explicit_1)
15141 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
15142 can now be zero (for strings); special values 0 and -1 were
15143 changed to -1 and -2, respectively.
15144 (bidi_char_at_pos): New function.
15145 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
15146 Call it instead of FETCH_MULTIBYTE_CHAR.
15147 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
15148 initialized to valid values.
15149 (bidi_init_it): Don't initialize charpos and bytepos with invalid
15150 values.
15151 (bidi_level_of_next_char): Allow the sentinel "position" to pass
15152 the test for valid cached positions. Fix the logic for looking up
15153 the sentinel state in the cache. GCPRO the Lisp string we are
15154 iterating.
15155 (bidi_push_it, bidi_pop_it): New functions.
15156 (bidi_initialize): Initialize the bidi cache start stack pointer.
15157 (bidi_cache_ensure_space): New function, refactored from part of
15158 bidi_cache_iterator_state. Don't assume the required size is just
15159 one BIDI_CACHE_CHUNK away.
15160 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
15161 (bidi_count_bytes, bidi_char_at_pos): New functions.
15162 (bidi_cache_search): Don't assume bidi_cache_last_idx is
15163 always valid if bidi_cache_idx is valid.
15164 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
15165 is valid if it's going to be used.
15166 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
15167 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
15168 (bidi_cache_find_level_change, bidi_cache_ensure_space)
15169 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
15170 (bidi_find_other_level_edge, bidi_cache_start_stack):
15171 All variables related to cache indices are now EMACS_INT.
c965adc5 15172
0bb23927
EZ
15173 * dispextern.h (struct bidi_string_data): New structure.
15174 (struct bidi_it): New member `string'. Make flag members be 1-bit
15175 fields, and put them last in the struct.
640c8776
SM
15176 (compute_display_string_pos, compute_display_string_end):
15177 Update prototypes.
0bb23927
EZ
15178 (bidi_push_it, bidi_pop_it): Add prototypes.
15179 (struct iterator_stack_entry): New members bidi_p,
15180 paragraph_embedding, and from_disp_prop_p.
15181 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
15182 (bidi_shelve_cache, bidi_unshelve_cache):
15183 Declare prototypes.
0bb23927
EZ
15184
15185 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
15186 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
15187 and vector-like objects.
15188
15189 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
15190 cache around display iteration.
15191
15192 * window.c (Fwindow_end, window_scroll_pixel_based)
15193 (displayed_window_lines, Frecenter): Save and restore the bidi
15194 cache around display iteration.
15195
3bbd2265
LMI
151962011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
15197
15198 * editfns.c (Fdelete_region): Clarify the use of the named
15199 parameters (bug#6788).
15200
adc47434
MR
152012011-07-14 Martin Rudalics <rudalics@gmx.at>
15202
15203 * indent.c (Fvertical_motion): Set and restore w->pointm when
15204 saving and restoring the window's buffer (Bug#9006).
15205
837c31f8
LMI
152062011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
15207
15208 * editfns.c (Fstring_to_char): Clarify just what is returned
15209 (bug#6576). Text by Eli Zaretskii.
15210
ac389d0c
JB
152112011-07-13 Juanma Barranquero <lekktu@gmail.com>
15212
15213 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
15214
0be0ce47
EZ
152152011-07-13 Eli Zaretskii <eliz@gnu.org>
15216
15217 * buffer.c (mmap_find): Fix a typo.
15218
cd18e7e3
JB
152192011-07-13 Johan Bockgård <bojohan@gnu.org>
15220
15221 Fix execution of x selection hooks.
15222 * xselect.c (Qx_lost_selection_functions)
15223 (Qx_sent_selection_functions): New vars.
15224 (syms_of_xselect): DEFSYM them.
15225 (x_handle_selection_request): Pass Qx_sent_selection_functions
15226 rather than Vx_sent_selection_functions to Frun_hook_with_args.
15227 (x_handle_selection_clear,x_clear_frame_selections):
15228 Pass Qx_lost_selection_functions rather than
15229 Vx_lost_selection_functions to Frun_hook_with_args.
15230
47ea7f44
PE
152312011-07-13 Paul Eggert <eggert@cs.ucla.edu>
15232
ac389d0c 15233 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
15234 The old code sometimes used this field without initializing it.
15235
47ea7f44
PE
15236 * alloc.c (gc_sweep): Don't read past end of array.
15237 In theory, the old code could also have corrupted Emacs internals,
15238 though it'd be very unlikely.
15239
bc985c87
AS
152402011-07-12 Andreas Schwab <schwab@linux-m68k.org>
15241
15242 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 15243 argument. (Bug#4026)
bc985c87 15244
0cf34688
LMI
152452011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
15246
b3dadd76
LMI
15247 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
15248 key" (bug#4257).
15249
0cf34688
LMI
15250 * window.c (Fset_window_start): Doc fix (bug#4199).
15251 (Fset_window_hscroll): Ditto.
15252
270768cd
PE
152532011-07-12 Paul Eggert <eggert@cs.ucla.edu>
15254
077e3dda 15255 Fix minor new problems caught by GCC 4.6.1.
270768cd 15256 * term.c (init_tty): Remove unused local.
490011a6 15257 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 15258 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 15259 not used otherwise.
270768cd 15260
b1f58454
CY
152612011-07-12 Chong Yidong <cyd@stupidchicken.com>
15262
15263 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
15264
22b9578d
LMI
152652011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
15266
6e70ab07
LMI
15267 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
15268 are the mini-buffer and the echo area (bug#3320).
15269
22b9578d
LMI
15270 * term.c (init_tty): Remove support for supdup, c10 and perq
15271 terminals, which are no longer supported (bug#1482).
15272
8974cc9f
JB
152732011-07-10 Johan Bockgård <bojohan@gnu.org>
15274
15275 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
15276
a560d974
JD
152772011-07-10 Jan Djärv <jan.h.d@swipnet.se>
15278
15279 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
15280 for non-popups (Bug#3642).
15281
1dae0f0a
AS
152822011-07-10 Andreas Schwab <schwab@linux-m68k.org>
15283
268c2c36 15284 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 15285 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
15286 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
15287 * cm.c (losecursor): Likewise.
1dae0f0a
AS
15288 * data.c (fmod): Likewise.
15289 * dispnew.c (swap_glyphs_in_rows): Likewise.
15290 * emacs.c (memory_warning_signal): Likewise.
15291 * floatfns.c (float_error): Likewise.
15292 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
15293 (otf_open, font_otf_capability, generate_otf_features)
15294 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
15295 Likewise.
15296 * image.c (pbm_read_file): Likewise.
15297 * indent.c (string_display_width): Likewise.
15298 * intervals.c (check_for_interval, search_for_interval)
15299 (inc_interval_count, count_intervals, root_interval)
15300 (adjust_intervals_for_insertion, make_new_interval): Likewise.
15301 * lread.c (defalias): Likewise.
268c2c36 15302 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
15303 * regex.c (set_image_of_range_1, set_image_of_range)
15304 (regex_grow_registers): Likewise.
15305 * sysdep.c (strerror): Likewise.
15306 * termcap.c (valid_filename_p, tprint, main): Likewise.
15307 * tparam.c (main): Likewise.
15308 * unexhp9k800.c (run_time_remap, save_data_space)
15309 (update_file_ptrs, read_header, write_header, calculate_checksum)
15310 (copy_file, copy_rest, display_header): Likewise.
15311 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
15312 Likewise.
15313 * xdisp.c (check_it): Likewise.
15314 * xfaces.c (register_color, unregister_color, unregister_colors):
15315 Likewise.
15316 * xfns.c (print_fontset_result): Likewise.
15317 * xrdb.c (member, fatal, main): Likewise.
15318
99033785
PE
153192011-07-10 Paul Eggert <eggert@cs.ucla.edu>
15320
15321 Fix minor problems found by static checking (Bug#9031).
15322 * chartab.c (char_table_set_range, map_sub_char_table):
15323 Remove unused locals.
15324 (uniprop_table): Now static.
15325 * composite.c (_work_char): Remove unused static var.
15326
9cb2ac56
JB
153272011-07-09 Juanma Barranquero <lekktu@gmail.com>
15328
15329 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
15330
f25661f0
JD
153312011-07-09 Jan Djärv <jan.h.d@swipnet.se>
15332
15333 * gtkutil.c (qttip_cb): Remove code without function.
15334
8278c4fe
EZ
153352011-07-09 Eli Zaretskii <eliz@gnu.org>
15336
15337 * w32.c (pthread_sigmask): New stub.
15338
1692ae2d 153392011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 15340
8a6ebd58 15341 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
15342 sigprocmask is portable only for single-threaded applications, and
15343 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
15344 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
15345 (LIBES): Use it.
15346 * callproc.c (Fcall_process):
15347 * process.c (create_process):
15348 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
15349 Use pthread_sigmask, not sigprocmask.
123403e4 15350
1b854618
JD
153512011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15352
15353 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
15354 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
15355 wrong (Bug#8591).
15356
3fe4b549
JD
153572011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15358
0ce7e563
JD
15359 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
15360 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
15361 (xg_hide_tooltip): Fix comment.
15362
3fe4b549
JD
15363 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
15364 in registerServicesMenuSendTypes.
15365 (validRequestorForSendType): Don't check ns_return_types.
15366
15367 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
15368 ns_return_type.
15369
5df75e47
JR
153702011-07-08 Jason Rumney <jasonr@gnu.org>
15371
22610910
JR
15372 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
15373 SH_SHOW for hidden windows (Bug#5482).
15374
5df75e47
JR
15375 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
15376 frame struct members of non-existent frames (Bug#6284).
15377
699c10bd
JD
153782011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15379
4393663b
JD
15380 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
15381 variable firstTime not needed on OSX >= 10.6.
15382 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
15383 >= 10.5. Use setKnobProportion, setDoubleValue.
15384
15385 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
15386 (MAC_OS_X_VERSION_10_5): Define if not defined.
15387 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
15388 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
15389 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
15390
15391 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 15392 cString and lossyCString on OSX >= 10.4.
4393663b 15393
58179cce 15394 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
15395 sizeToFit on OSX >= 10.2.
15396
15397 * nsimage.m (allocInitFromFile): Don't use deprecated method
15398 bestRepresentationForDevice on OSX >= 10.6.
15399
15400 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
15401 to avoid warning.
15402
15403 * emacs.c: Declare unexec_init_emacs_zone.
15404
a63e0781
JD
15405 * nsgui.h: Fix compiler warning about gnulib redefining verify.
15406
699c10bd
JD
15407 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
15408
15409 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
15410 on svcsMenu (Bug#8842).
15411
15412 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
15413 ns_return_types.
15414 (Fns_list_services): Just return Qnil on 10.6, code not working there.
15415
15416 * nsterm.m (QUTF8_STRING): Declare.
15417 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
15418 (validRequestorForSendType): Return type is (id).
15419 Change indexOfObjectIdenticalTo to indexOfObject.
15420 Check if we have local selection before returning self (Bug#8842).
15421 (writeSelectionToPasteboard): Put local selection into paste board
15422 if we have a local selection (Bug#8842).
15423 (syms_of_nsterm): DEFSYM QUTF8_STRING.
15424
15425 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
15426 (ns_get_local_selection): Declare.
15427
54e10184
LMI
154282011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
15429
9888ff71
LMI
15430 * keymap.c (describe_map_tree): Don't insert a double newline at
15431 the end of the buffer (bug#1169) and return whether we inserted
15432 something.
15433
54e10184
LMI
15434 * callint.c (Fcall_interactively): Change "reading args" to
15435 "providing args" to try to clarify what it does (bug#1010).
15436
15fa4783
KH
154372011-07-07 Kenichi Handa <handa@m17n.org>
15438
15439 * composite.c (composition_compute_stop_pos): Ignore a static
15440 composition starting before CHARPOS (Bug#8915).
15441
15442 * xdisp.c (handle_composition_prop): Likewise.
15443
a8815b00
EZ
154442011-07-07 Eli Zaretskii <eliz@gnu.org>
15445
15446 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
15447 (Bug#9015)
15448
ef7b981d 154492011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
15450
15451 * character.h (unicode_category_t): New enum type.
15452
15453 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
15454 (Qchar_code_property_table): New variable.
15455 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
15456 (UNIPROP_COMPRESSED_FORM_P): New macros.
15457 (char_table_ascii): Uncompress the compressed values.
15458 (sub_char_table_ref): New arg is_uniprop. Callers changed.
15459 Uncompress the compressed values.
ac389d0c 15460 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
15461 (char_table_ref_and_range): Uncompress the compressed values.
15462 (sub_char_table_set): New arg is_uniprop. Callers changed.
15463 Uncompress the compressed values.
15464 (sub_char_table_set_range): Args changed. Callers changed.
15465 (char_table_set_range): Adjuted for the above change.
15466 (map_sub_char_table): Delete args default_val and parent. Add arg
15467 top. Give decoded values to a Lisp function.
640c8776 15468 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
15469 values to a Lisp function. Gcpro more variables.
15470 (uniprop_table_uncompress)
15471 (uniprop_decode_value_run_length): New functions.
15472 (uniprop_decoder, uniprop_decoder_count): New variables.
15473 (uniprop_get_decoder, uniprop_encode_value_character)
15474 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
15475 New functions.
15476 (uniprop_encoder, uniprop_encoder_count): New variables.
15477 (uniprop_get_encoder, uniprop_table)
15478 (Funicode_property_table_internal, Fget_unicode_property_internal)
15479 (Fput_unicode_property_internal): New functions.
15480 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
15481 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 15482 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
15483 char-code-property-alist.
15484
640c8776 15485 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
15486 Vunicode_category_table.
15487
640c8776 15488 * font.c (font_range): Adjust for the change of
c805dec0
KH
15489 Vunicode_category_table.
15490
76b397fb
DN
154912011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
15492
15493 * m/iris4d.h: Remove file, move contents ...
15494 * s/irix6-5.h: ... here.
15495
22b4128e
PE
154962011-07-06 Paul Eggert <eggert@cs.ucla.edu>
15497
15498 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
15499 * alloc.c (mark_buffer):
15500 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
15501 (clone_per_buffer_values): Don't assume that
22b4128e
PE
15502 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
15503 This isn't true in general, and it's particularly not true
15504 if Emacs is configured with --with-wide-int.
15505 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
15506 New macros, used in the buffer.c change.
15507
869795d6
JD
155082011-07-05 Jan Djärv <jan.h.d@swipnet.se>
15509
15510 * xsettings.c: Use both GConf and GSettings if both are available.
15511 (store_config_changed_event): Add comment.
15512 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
15513 (store_tool_bar_style_changed): New functions.
5e617bc2 15514 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
15515 (struct xsettings): Move font inside HAVE_XFT.
15516 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 15517 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 15518 Move inside HAVE_XFT.
640c8776 15519 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
15520 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
15521 also.
15522 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 15523 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 15524 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
15525 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
15526 (parse_settings): Move check for font inside HAVE_XFT.
15527 (read_settings, apply_xft_settings): Add comment.
15528 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
15529 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
15530 call store_font_name_changed.
15531 (xft_settings_event): Add comment.
15532 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
15533 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
15534 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
15535 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
15536 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
15537 (xsettings_get_system_font, xsettings_get_system_normal_font):
15538 Add comment.
869795d6 15539
d8ed26bd
PE
155402011-07-05 Paul Eggert <eggert@cs.ucla.edu>
15541
15542 Random fixes. E.g., (random) never returned negative values.
15543 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
15544 subseconds part to the entropy, as that's a bit more random.
15545 Prefer signed to unsigned, since the signedness doesn't matter and
15546 in general we prefer signed. When given a limit, use a
15547 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
15548 latter isn't right if USE_2_TAGS_FOR_INTS.
15549 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
15550 not 0..VALMASK. Don't discard "excess" bits that random () returns.
15551
cabf1cac
SM
155522011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
15553
15554 * textprop.c (text_property_stickiness):
15555 Obey Vtext_property_default_nonsticky.
15556 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
15557 * w32fns.c (syms_of_w32fns):
15558 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
15559
6e9b2be9
PE
155602011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15561
15562 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
15563 This is more efficient than Ffile_directory_p and avoids a minor race.
15564
90186c68
LMI
155652011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
15566
7c301272
LMI
15567 * buffer.c (Foverlay_put): Say what the return value is
15568 (bug#7835).
15569
c4f2d8d4
LMI
15570 * fileio.c (barf_or_query_if_file_exists): Check first if the file
15571 is a directory before asking whether to use the file name
15572 (bug#7564).
ad637907
LMI
15573 (barf_or_query_if_file_exists): Make the "File is a directory"
15574 error be more correct.
c4f2d8d4 15575
90186c68
LMI
15576 * fns.c (Frequire): Remove the mention of the .gz files, since
15577 that's installation-specific, but keep the mention of
15578 `get-load-suffixes'.
15579
da64016e
PE
155802011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15581
15582 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
15583 Report string overflow if the output is too long.
15584
7d47b580
JB
155852011-07-04 Juanma Barranquero <lekktu@gmail.com>
15586
a555cb87
JB
15587 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
15588 (syms_of_gnutls): Remove duplicate DEFSYM for
15589 Qgnutls_bootprop_verify_hostname_error, an error for
15590 Qgnutls_bootprop_verify_error (which is no longer used).
15591
7d47b580
JB
15592 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
15593 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
15594 Also (re)move comments that are misplaced or no longer relevant.
15595
1e49bfab
LMI
155962011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15597
15598 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
15599
1485f4c0
CY
156002011-07-03 Chong Yidong <cyd@stupidchicken.com>
15601
15602 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
15603 and background color parameters if they have been changed.
15604
a9ab721e
LMI
156052011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15606
15607 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
15608
cf7cff57
PE
156092011-07-03 Paul Eggert <eggert@cs.ucla.edu>
15610
2e13213d
PE
15611 * xsettings.c (SYSTEM_FONT): Define only when used.
15612 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
15613
cf7cff57
PE
15614 * keymap.c (access_keymap_1): Now static.
15615
7a8e04f7
CY
156162011-07-02 Chong Yidong <cyd@stupidchicken.com>
15617
15618 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
15619 leave any prefix arg for the up event (Bug#1586).
15620
61352f62
LMI
156212011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
15622
69bb1ef7
LMI
15623 * lread.c (syms_of_lread): Mention single symbols defined by
15624 `defvar' or `defconst' (bug#7154).
15625
61352f62 15626 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 15627 (Frequire): Mention get-load-suffixes.
61352f62 15628
28545e04
MR
156292011-07-02 Martin Rudalics <rudalics@gmx.at>
15630
15631 * window.h (window): Remove clone_number slot.
15632 * window.c (Fwindow_clone_number, Fset_window_clone_number):
15633 Remove.
15634 (make_parent_window, make_window, saved_window)
15635 (Fset_window_configuration, save_window_save): Don't deal with
15636 clone numbers.
15637 * buffer.c (Qclone_number): Remove declaration.
15638 (sort_overlays, overlay_strings): Don't deal with clone numbers.
15639
3349e122
SM
156402011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
15641
15642 Add multiple inheritance to keymaps.
15643 * keymap.c (Fmake_composed_keymap): New function.
15644 (Fset_keymap_parent): Simplify.
15645 (fix_submap_inheritance): Remove.
15646 (access_keymap_1): New function extracted from access_keymap to handle
15647 embedded parents and handle lists of maps.
15648 (access_keymap): Use it.
15649 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
15650 (Fcopy_keymap): Handle embedded parents.
15651 (Fcommand_remapping, define_as_prefix): Simplify.
15652 (Fkey_binding): Simplify.
15653 (syms_of_keymap): Move minibuffer-local-completion-map,
15654 minibuffer-local-filename-completion-map,
15655 minibuffer-local-must-match-map, and
15656 minibuffer-local-filename-must-match-map to Elisp.
15657 (syms_of_keymap): Defsubr make-composed-keymap.
15658 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
15659 (parse_menu_item): Trivial simplification.
15660
3279eb87
GM
156612011-07-01 Glenn Morris <rgm@gnu.org>
15662
15663 * Makefile.in (SETTINGS_LIBS): Fix typo.
15664
39cb9e56 156652011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
15666
15667 * coding.c (Fencode_coding_string): Record the last coding system
15668 used, as the function doc string says (bug#8738).
15669
0949d2b6
JD
156702011-07-01 Jan Djärv <jan.h.d@swipnet.se>
15671
15672 * xsettings.c (store_monospaced_changed): Take new font as arg and
15673 check for change against current_mono_font.
15674 (EMACS_TYPE_SETTINGS): Remove this and related defines.
15675 (emacs_settings_constructor, emacs_settings_get_property)
15676 (emacs_settings_set_property, emacs_settings_class_init)
15677 (emacs_settings_init, gsettings_obj): Remove.
15678 (something_changedCB): New function for HAVE_GSETTINGS.
15679 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
15680 with value as argument.
15681 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
15682 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 15683 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
15684 "changed".
15685
15686 * xgselect.c: Add defined (HAVE_GSETTINGS).
15687 (xgselect_initialize): Ditto.
15688
15689 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
15690 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
15691 xg_select.
15692
bbc6b304
PE
156932011-07-01 Paul Eggert <eggert@cs.ucla.edu>
15694
15695 * eval.c (struct backtrace): Simplify and port the data structure.
15696 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
15697 signed bit field, as this assumption is not portable and it makes
15698 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
15699 "char debug_on_exit : 1" as this is not portable either; instead,
15700 use the portable "unsigned int debug_on_exit : 1". Remove unused
15701 member evalargs. Remove obsolete comments about cc bombing out.
15702
9851bfc5
JD
157032011-06-30 Jan Djärv <jan.h.d@swipnet.se>
15704
51bb811f 15705 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
15706 Let HAVE_GSETTINGS override HAVE_GCONF.
15707 (store_monospaced_changed): New function.
15708 (EMACS_SETTINGS): A new type derived from GObject to handle
15709 GSettings notifications.
15710 (emacs_settings_constructor, emacs_settings_get_property)
15711 (emacs_settings_set_property, emacs_settings_class_init):
15712 New functions.
15713 (gsettings_client, gsettings_obj): New variables.
15714 (GSETTINGS_SCHEMA): New define.
15715 (something_changedCB): Call store_monospaced_changed.
15716 (init_gsettings): New function.
15717 (xsettings_initialize): Call init_gsettings.
15718 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
15719 to NULL.
15720
640c8776 15721 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
15722 GCONF_CFLAGS/LIBS.
15723
5386012d
MR
157242011-06-29 Martin Rudalics <rudalics@gmx.at>
15725
15726 * window.c (resize_root_window, grow_mini_window)
15727 (shrink_mini_window): Rename Qresize_root_window to
15728 Qwindow_resize_root_window and Qresize_root_window_vertically to
15729 Qwindow_resize_root_window_vertically.
15730
f13e0b08
PE
157312011-06-28 Paul Eggert <eggert@cs.ucla.edu>
15732
15733 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
15734
94515237
JB
157352011-06-27 Juanma Barranquero <lekktu@gmail.com>
15736
15737 * makefile.w32-in: Redesign dependencies so they reflect more
15738 clearly which files are directly included by each source file,
15739 and not through other includes.
15740
e43b6e43
MR
157412011-06-27 Martin Rudalics <rudalics@gmx.at>
15742
15743 * buffer.c (Qclone_number): Declare static and DEFSYM it.
15744 (sort_overlays, overlay_strings): When an overlay's clone number
15745 matches the window's clone number process the overlay even if
15746 the overlay's window property doesn't match the current window.
15747
d68443dc
MR
15748 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
15749 (Fwindow_hchild): Rename to Fwindow_left_child.
15750 (Fwindow_next): Rename to Fwindow_next_sibling.
15751 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
15752 (resize_window_check): Rename to window_resize_check.
15753 (resize_window_apply): Rename to window_resize_apply.
15754 (Fresize_window_apply): Rename to Fwindow_resize_apply.
15755 (Fdelete_other_windows_internal, resize_frame_windows)
15756 (Fsplit_window_internal, Fdelete_window_internal)
15757 (grow_mini_window, shrink_mini_window)
15758 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 15759
c7e73be5
JD
157602011-06-26 Jan Djärv <jan.h.d@swipnet.se>
15761
15762 * emacsgtkfixed.h: State that this is only used with Gtk+3.
15763 (emacs_fixed_set_min_size): Remove.
15764 (emacs_fixed_new): Take frame as argument.
15765
15766 * emacsgtkfixed.c: State that this is only used with Gtk+3.
15767 (_EmacsFixedPrivate): Remove minwidth/height.
15768 Add struct frame *f.
15769 (emacs_fixed_init): Initialize priv->f.
15770 (get_parent_class, emacs_fixed_set_min_size): Remove.
15771 (emacs_fixed_new): Set priv->f to argument.
15772 (emacs_fixed_get_preferred_width)
15773 (emacs_fixed_get_preferred_height): Use min_width/height from
15774 frames size_hint to set minimum and natural (Bug#8919).
15775 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
15776 and use min_width/height from frames size_hint to set
15777 min_width/height (Bug#8919).
15778
15779 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
15780 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
15781 Fix indentation.
c7e73be5 15782
cf99dcf8
EZ
157832011-06-26 Eli Zaretskii <eliz@gnu.org>
15784
15785 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
15786 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
15787 called at ZV.
15788
029529ac
CY
157892011-06-26 Chong Yidong <cyd@stupidchicken.com>
15790
15791 * process.c (wait_reading_process_output): Bypass select if
15792 waiting for a cell while ignoring keyboard input, and input is
15793 pending. Suggested by Jan Djärv (Bug#8869).
15794
7a7ef429
PE
157952011-06-25 Paul Eggert <eggert@cs.ucla.edu>
15796
15797 Use gnulib's dup2 module instead of rolling our own.
15798 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
15799
11fdef7d 158002011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
15801
15802 * dispnew.c (scrolling_window): Before scrolling, turn off a
15803 mouse-highlight in the window being scrolled.
15804
cd3520a4
JB
158052011-06-24 Juanma Barranquero <lekktu@gmail.com>
15806
15807 Move DEFSYM to lisp.h and use everywhere.
15808
15809 * character.h (DEFSYM): Move declaration...
15810 * lisp.h (DEFSYM): ...here.
15811
15812 * gnutls.c:
15813 * minibuf.c:
15814 * w32menu.c:
15815 * w32proc.c:
15816 * w32select.c: Don't include character.h.
15817
15818 * alloc.c (syms_of_alloc):
15819 * buffer.c (syms_of_buffer):
15820 * bytecode.c (syms_of_bytecode):
15821 * callint.c (syms_of_callint):
15822 * casefiddle.c (syms_of_casefiddle):
15823 * casetab.c (init_casetab_once):
15824 * category.c (init_category_once, syms_of_category):
15825 * ccl.c (syms_of_ccl):
15826 * cmds.c (syms_of_cmds):
15827 * composite.c (syms_of_composite):
15828 * dbusbind.c (syms_of_dbusbind):
15829 * dired.c (syms_of_dired):
15830 * dispnew.c (syms_of_display):
15831 * doc.c (syms_of_doc):
15832 * editfns.c (syms_of_editfns):
15833 * emacs.c (syms_of_emacs):
15834 * eval.c (syms_of_eval):
15835 * fileio.c (syms_of_fileio):
15836 * fns.c (syms_of_fns):
15837 * frame.c (syms_of_frame):
15838 * fringe.c (syms_of_fringe):
15839 * insdel.c (syms_of_insdel):
15840 * keymap.c (syms_of_keymap):
15841 * lread.c (init_obarray, syms_of_lread):
15842 * macros.c (syms_of_macros):
15843 * msdos.c (syms_of_msdos):
15844 * print.c (syms_of_print):
15845 * process.c (syms_of_process):
15846 * search.c (syms_of_search):
15847 * sound.c (syms_of_sound):
15848 * syntax.c (init_syntax_once, syms_of_syntax):
15849 * terminal.c (syms_of_terminal):
15850 * textprop.c (syms_of_textprop):
15851 * undo.c (syms_of_undo):
15852 * w32.c (globals_of_w32):
15853 * window.c (syms_of_window):
15854 * xdisp.c (syms_of_xdisp):
15855 * xfaces.c (syms_of_xfaces):
15856 * xfns.c (syms_of_xfns):
15857 * xmenu.c (syms_of_xmenu):
15858 * xsettings.c (syms_of_xsettings):
15859 * xterm.c (syms_of_xterm): Use DEFSYM.
15860
4228cf16
TZ
158612011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
15862
cd3520a4 15863 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 15864
7fcccf1e
PE
158652011-06-23 Paul Eggert <eggert@cs.ucla.edu>
15866
7efb4e0e
PE
15867 Integer and buffer overflow fixes (Bug#8873).
15868
ff5844ad
PE
15869 * print.c (printchar, strout): Check for string overflow.
15870 (PRINTPREPARE, printchar, strout):
15871 Don't set size unless allocation succeeds.
15872
90532f02
PE
15873 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
15874 for sizes. Check for string overflow more accurately.
15875 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
15876
6d84508d
PE
15877 * macros.c: Integer and buffer overflow fixes.
15878 * keyboard.h (struct keyboard.kbd_macro_bufsize):
15879 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
15880 Use ptrdiff_t, not int, for sizes.
15881 Don't increment bufsize until after realloc succeeds.
15882 Check for size-calculation overflow.
15883 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
15884
437b2cb4
PE
15885 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
15886
8b9ac8b4
PE
15887 * lread.c: Integer overflow fixes.
15888 (read_integer): Radix is now EMACS_INT, not int,
15889 to improve quality of diagnostics for out-of-range radices.
15890 Calculate buffer size correctly for out-of-range radices.
15891 (read1): Check for integer overflow in radices, and in
15892 read-circle numbers.
82cb60d3
PE
15893 (read_escape): Avoid int overflow.
15894 (Fload, openp, read_buffer_size, read1)
15895 (substitute_object_recurse, read_vector, read_list, map_obarray):
15896 Use ptrdiff_t, not int, for sizes.
15897 (read1): Use EMACS_INT, not int, for sizes.
20270765 15898 Check for size overflow.
8b9ac8b4 15899
7fcccf1e
PE
15900 * image.c (cache_image): Check for size arithmetic overflow.
15901
bfbbd7e7
PE
15902 * lread.c: Integer overflow issues.
15903 (saved_doc_string_size, saved_doc_string_length)
15904 (prev_saved_doc_string_size, prev_saved_doc_string_length):
15905 Now ptrdiff_t, not int.
15906 (read1): Don't assume doc string length fits in int. Check for
15907 out-of-range doc string lengths.
15908 (read_list): Don't assume file position fits in int.
39019e54 15909 (read_escape): Check for hex character overflow.
bfbbd7e7 15910
4e323265
LL
159112011-06-22 Leo Liu <sdl.web@gmail.com>
15912
15913 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
15914 Move to minibuffer.el.
15915
85fece3e
PE
159162011-06-22 Paul Eggert <eggert@cs.ucla.edu>
15917
20b84ce9 15918 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
15919 The following patches are for when GLYPH_DEBUG && !XASSERT.
15920 * dispextern.h (trace_redisplay_p, dump_glyph_string):
15921 * dispnew.c (flush_stdout):
15922 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
15923 Mark as externally visible.
15924 * dispnew.c (check_window_matrix_pointers): Now static.
15925 * dispnew.c (window_to_frame_vpos):
15926 * xfns.c (unwind_create_frame):
15927 * xterm.c (x_check_font): Remove unused local.
15928 * scroll.c (CHECK_BOUNDS):
15929 * xfaces.c (cache_fache): Rename local to avoid shadowing.
15930 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
15931 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
15932 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
15933 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
15934 Now static.
15935 (debug_method_add): Use va_list and vsprintf rather than relying
15936 on undefined behavior with wrong number of arguments.
15937 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
15938 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
15939 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
15940 since we're not interested in debugging glyphs with old libraries.
15941 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
15942 GCC 4.6.0's static checking.
15943
0766b489
PE
159442011-06-22 Paul Eggert <eggert@cs.ucla.edu>
15945
31fd4b32
PE
15946 Integer overflow and signedness fixes (Bug#8873).
15947 A few related buffer overrun fixes, too.
15948
b79e8648
PE
15949 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
15950
0766b489
PE
15951 * dispextern.h (struct face.stipple):
15952 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
15953 (x_bitmap_mask, x_allocate_bitmap_record)
15954 (x_create_bitmap_from_data, x_create_bitmap_from_file)
15955 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
15956 (x_create_bitmap_from_xpm_data):
15957 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
15958 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
15959 (.bitmaps_last):
15960 * xfaces.c (load_pixmap):
15961 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
15962 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
15963 (.bitmaps_last, struct x_output.icon_bitmap):
15964 Use ptrdiff_t, not int, for bitmap indexes.
15965 (x_allocate_bitmap_record): Check for size overflow.
15966 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
15967
b081724f
PE
15968 Use ptrdiff_t, not int, for overlay counts.
15969 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
15970 * editfns.c (overlays_around, get_pos_property):
15971 * textprop.c (get_char_property_and_overlay):
15972 * xdisp.c (next_overlay_change, note_mouse_highlight):
15973 * xfaces.c (face_at_buffer_position):
21514da7
PE
15974 * buffer.c (OVERLAY_COUNT_MAX): New macro.
15975 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
15976 (Fnext_overlay_change, Fprevious_overlay_change)
15977 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 15978 Use ptrdiff_t, not int, for sizes.
21514da7 15979 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 15980
3de73e5e
PE
15981 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
15982
2606c57b
PE
15983 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
15984 (x_session_initialize): Do not assume string length fits in int.
15985
aaafe47a
PE
15986 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
15987 This is unlikely, but can occur if DPI is outlandish.
15988
2674ddc8 15989 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
15990 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
15991
28154962
PE
15992 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
15993 * xrdb.c (magic_file_p, search_magic_path):
15994 Omit last arg SUFFIX; it was always 0. All callers changed.
15995 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
15996
7de51af5
PE
15997 * xfont.c (xfont_match): Avoid need for strlen.
15998
25ed6cc3
PE
15999 * xfns.c: Don't assume strlen fits in int.
16000 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
16001
4eab31dd
PE
16002 * xdisp.c (message_log_check_duplicate): Return intmax_t,
16003 not unsigned long, as we prefer signed integers. All callers changed.
16004 Detect integer overflow in repeat count.
16005 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 16006 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 16007
171e2a58
PE
16008 * termcap.c: Don't assume sizes fit in int and never overflow.
16009 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
16010 (gobble_line): Check for size-calculation overflow.
16011
ad39faca 16012 * minibuf.c (Fread_buffer):
6e5bb2dc 16013 * lread.c (intern, intern_c_string):
74ca2eb3
PE
16014 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
16015 Don't assume string length fits in int.
16016
52c61c22 16017 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
16018 * gtkutil.c (style_changed_cb): Avoid need for strlen.
16019
b5b8c9e5
PE
16020 * font.c: Don't assume string length fits in int.
16021 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
16022 Use ptrdiff_t, not int.
ccd6111c
PE
16023 (font_intern_prop): Don't assume string length fits in int.
16024 Don't assume integer property fits in fixnum.
16025 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 16026
882f0d81 16027 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 16028 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
16029 Reformulate so as not to need the command string.
16030 Invoke gzip -cd rather than gunzip, as it's more portable.
16031 (lock_info_type, lock_file_1, lock_file):
16032 Don't assume pid_t and time_t fit in unsigned long.
16033 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
16034 (current_lock_owner): Prefer signed type for sizes.
16035 Use memcpy, not strncpy, where memcpy is what is really wanted.
16036 Don't assume (via atoi) that time_t and pid_t fit in int.
16037 Check for time_t and/or pid_t out of range, e.g., via a network share.
16038 Don't alloca where an auto var works fine.
16039
93f4cf88
PE
16040 * fileio.c: Fix some integer overflow issues.
16041 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
16042 Don't assume string length fits in int.
16043 (directory_file_name): Don't assume string length fits in long.
16044 (make_temp_name): Don't assume pid fits in int, or that its print
16045 length is less than 20.
16046
f3e92b69
PE
16047 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
16048
1bfdaf10
PE
16049 * coding.c (make_subsidiaries): Don't assume string length fits in int.
16050
35016e9a
PE
16051 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
16052
3d1e65a1
PE
16053 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
16054 We prefer signed integers, even for size calculations.
16055
0b963a93
PE
16056 * emacs.c: Don't assume string length fits in 'int'.
16057 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
16058 (main): Don't invoke strlen when not needed.
16059
573f4b54
PE
16060 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
16061 (XD_DEBUG_MESSAGE): Don't waste a byte.
16062
989f33ba
PE
16063 * callproc.c (getenv_internal_1, getenv_internal)
16064 (Fgetenv_internal):
965d34eb
PE
16065 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
16066
e4d29b33
PE
16067 * lread.c (invalid_syntax): Omit length argument.
16068 All uses changed. This doesn't fix a bug, but it simplifies the
16069 code away from its former Hollerith-constant appearance, and it's
16070 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 16071 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 16072
eb49b136
PE
16073 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
16074 This didn't break anything, but it didn't help either.
16075 It's confusing to put a bogus integer in a place where the actual
16076 value does not matter.
9f62aeb1 16077 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 16078 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 16079
15375a22
PE
16080 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
16081 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
16082 implementation.
b61cc01c
PE
16083 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
16084 We prefer signed types, and the value cannot exceed the EMACS_INT
16085 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
16086 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
16087 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
16088 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 16089
53b2623d
PE
16090 * indent.c (sane_tab_width): New function.
16091 (current_column, scan_for_column, Findent_to, position_indentation)
16092 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 16093 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 16094
51cab52b 16095 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 16096
f2ed8a70
PE
16097 * lisp.h (lint_assume): New macro.
16098 * composite.c (composition_gstring_put_cache):
16099 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
16100
abe80cc6
PE
16101 * editfns.c, insdel.c:
16102 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 16103
b02c740e
PE
16104 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
16105
ebc96716
PE
16106 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
16107
b4e50fa0 16108 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 16109 Use much-faster test for byte-length change.
311d5d7c 16110 Don't assume string byte-length fits in 'int'.
a4cf38e4 16111 Check that character arg fits in 'int'.
85461888 16112 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 16113
c0c1ee9f
PE
16114 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
16115
a498d7f4
PE
16116 * fns.c (concat): Catch string overflow earlier.
16117 Do not rely on integer wraparound.
16118
51cab52b
PE
16119 * dispextern.h (struct it.overlay_strings_charpos)
16120 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
16121 * xdisp.c (forward_to_next_line_start)
16122 (back_to_previous_visible_line_start)
16123 (reseat_at_next_visible_line_start, next_element_from_buffer):
16124 Don't arbitrarily truncate the value of 'selective' to int.
16125
76031fad
PE
16126 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
16127
5eb55db9
PE
16128 * composite.c: Don't truncate sizes to 'int'.
16129 (composition_gstring_p, composition_reseat_it)
16130 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
16131 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
16132 not EMACS_UINT, for indexes.
5eb55db9 16133
0703a717
PE
16134 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
16135
d6202519
PE
16136 * buffer.c: Include <verify.h>.
16137 (struct sortvec.priority, struct sortstr.priority):
8961a454 16138 Now EMACS_INT, not int.
c20998a7 16139 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
16140 (struct sortstr.size, record_overlay_string)
16141 (struct sortstrlist.size, struct sortlist.used):
16142 Don't truncate size to int.
16143 (record_overlay_string): Check for size-calculation overflow.
d6202519 16144 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 16145
d5a19415
JM
161462011-06-22 Jim Meyering <meyering@redhat.com>
16147
029529ac 16148 Don't leak an XBM-image-sized buffer
d5a19415
JM
16149 * image.c (xbm_load): Free the image buffer after using it.
16150
a9041e6c
PE
161512011-06-21 Paul Eggert <eggert@cs.ucla.edu>
16152
16153 Port to Sun C.
16154 * composite.c (find_automatic_composition): Omit needless 'return 0;'
16155 that Sun C diagnosed.
16156 * fns.c (secure_hash): Fix pointer signedness issue.
16157 * intervals.c (static_offset_intervals): New function.
16158 (offset_intervals): Use it.
16159
7f3f739f
LL
161602011-06-21 Leo Liu <sdl.web@gmail.com>
16161
16162 * deps.mk (fns.o):
16163 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
16164 sha512.h.
16165
16166 * fns.c (secure_hash): Rename from crypto_hash_function and change
16167 the first arg to accept symbols.
5b66d427 16168 (Fsecure_hash): New primitive.
7f3f739f
LL
16169 (syms_of_fns): New symbols.
16170
76147d94
DD
161712011-06-20 Deniz Dogan <deniz@dogan.se>
16172
16173 * process.c (Fset_process_buffer): Clarify return value in
16174 docstring.
16175
7d7d0045
CY
161762011-06-18 Chong Yidong <cyd@stupidchicken.com>
16177
16178 * dispnew.c (add_window_display_history): Use BVAR.
16179
16180 * xdisp.c (debug_method_add): Use BVAR.
16181 (check_window_end, dump_glyph_matrix, dump_glyph)
16182 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
16183
16184 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
16185 Likewise.
16186
16187 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
16188 check till after the cache is created in init_frame_faces.
16189
ff2bc410
SM
161902011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
16191
16192 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
16193
28177add
PE
161942011-06-16 Paul Eggert <eggert@cs.ucla.edu>
16195
dd3482fe
PE
16196 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
16197 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
16198 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
16199
393d71f3 16200 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
16201 * fileio.c (Finsert_file_contents):
16202 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
16203 Remove the old (too-loose) buffer overflow checks.
16204 They weren't needed, since make_gap checks for buffer overflow.
16205 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
16206 The old code merely checked for Emacs fixnum overflow, and relied
16207 on undefined (wraparound) behavior. The new code avoids undefined
16208 behavior, and also checks for ptrdiff_t and/or size_t overflow.
16209
2e6813b0 16210 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
16211 Tune. Don't use wider integers than needed. Don't use alloca.
16212 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 16213
599a9e4f
PE
16214 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
16215
99561444
PE
16216 * insdel.c, lisp.h (buffer_overflow): New function.
16217 (insert_from_buffer_1, replace_range, replace_range_2):
16218 * insdel.c (make_gap_larger):
16219 * editfns.c (Finsert_char):
16220 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
16221
28177add
PE
16222 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
16223
e69dafad
PE
162242011-06-15 Paul Eggert <eggert@cs.ucla.edu>
16225
4baa020d 16226 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 16227
b1c46f02
PE
16228 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
16229 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
16230
e69dafad
PE
16231 * fileio.c: Don't assume EMACS_INT fits in off_t.
16232 (emacs_lseek): New static function.
16233 (Finsert_file_contents, Fwrite_region): Use it.
16234 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
16235
566684ea
PE
16236 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
16237
e6966cd6
PE
16238 * fns.c: Don't overflow int when computing a list length.
16239 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
16240 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
16241 truncation on 64-bit hosts. Check for QUIT every
16242 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
16243 faster and is responsive enough.
16244 (Flength): Report an error instead of overflowing an integer.
16245 (Fsafe_length): Return a float if the value is not representable
16246 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 16247 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 16248 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 16249
dd0b0efb
PE
16250 * alloc.c: Check that resized vectors' lengths fit in fixnums.
16251 (header_size, word_size): New constants.
16252 (allocate_vectorlike): Don't check size overflow here.
16253 (allocate_vector): Check it here instead, since this is the only
16254 caller of allocate_vectorlike that could cause overflow.
16255 Check that the new vector's length is representable as a fixnum.
16256
86fe5cfe
PE
16257 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
16258 The previous code was bogus. For example, next_almost_prime (32)
16259 returned 39, which is undesirable as it is a multiple of 3; and
16260 next_almost_prime (24) returned 25, which is a multiple of 5 so
16261 why was the code bothering to check for multiples of 7?
16262
80e88859
PE
16263 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
16264
4a2f0ad6
PE
16265 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
16266
f66c7cf8
PE
16267 Variadic C functions now count arguments with ptrdiff_t.
16268 This partly undoes my 2011-03-30 change, which replaced int with size_t.
16269 Back then I didn't know that the Emacs coding style prefers signed int.
16270 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
16271 were being counted with int, which may truncate counts on 64-bit
16272 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
16273 * lisp.h (struct Lisp_Subr.function.aMANY)
16274 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
16275 Arg counts are now ptrdiff_t, not size_t.
16276 All variadic functions and their callers changed accordingly.
16277 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
16278 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
16279 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
16280 * callint.c (Fcall_interactively): Check arg count for overflow,
16281 to avoid potential buffer overrun. Use signed char, not 'int',
16282 for 'varies' array, so that we needn't bother to check its size
16283 calculation for overflow.
16284 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
16285 * eval.c (apply_lambda):
16286 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
16287 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
16288 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
16289
a1759b76
PE
16290 * callint.c (Fcall_interactively): Don't use index var as event count.
16291
d96be9fc
PE
16292 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
16293 * mem-limits.h (SIZE): Remove; no longer used.
16294
a690a978 16295 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 16296
578c21e6
PE
16297 Remove unnecessary casts.
16298 * xterm.c (x_term_init):
16299 * xfns.c (x_set_border_pixel):
16300 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
16301 These aren't needed now that we assume ANSI C.
16302
96f53c6c
PE
16303 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
16304 It's more likely to cause problems (due to unsigned overflow)
16305 than to cure them.
16306
83c77d31
PE
16307 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
16308
ee2079f1
PE
16309 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
16310
6da65536
PE
16311 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
16312
7147c4a4
PE
16313 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
16314
193e32d9
PE
16315 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
16316
e5533da6
PE
16317 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
16318
9910e595
PE
16319 GLYPH_CODE_FACE returns EMACS_INT, not int.
16320 * dispextern.h (merge_faces):
16321 * xfaces.c (merge_faces):
01103c44
PE
16322 * xdisp.c (get_next_display_element, next_element_from_display_vector):
16323 Don't assume EMACS_INT fits in int.
9910e595 16324
2638320e
PE
16325 * character.h (CHAR_VALID_P): Remove unused parameter.
16326 * fontset.c, lisp.h, xdisp.c: All uses changed.
16327
045eb8d9
PE
16328 * editfns.c (Ftranslate_region_internal): Omit redundant test.
16329
c1f134b5
PE
16330 * fns.c (concat): Minor tuning based on overflow analysis.
16331 This doesn't fix any bugs. Use int to hold character, instead
16332 of constantly refetching from Emacs object. Use XFASTINT, not
16333 XINT, for value known to be a character. Don't bother comparing
16334 a single byte to 0400, as it's always less.
16335
395fcb93 16336 * floatfns.c (Fexpt):
327eeec8
PE
16337 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
16338
abbd3d23
PE
16339 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
16340 for characters.
16341
684a03ef
PE
16342 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
16343
0fed43f3
PE
16344 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
16345 Without this fix, on a 64-bit host (aset S 0 4294967386) would
16346 incorrectly succeed when S was a string, because 4294967386 was
16347 truncated before it was used.
16348
8fd02eb7
PE
16349 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
16350 Otherwise, an out-of-range integer could cause undefined behavior
16351 on a 64-bit host.
16352
f8c86b69
PE
16353 * composite.c: Use int, not EMACS_INT, for characters.
16354 (fill_gstring_body, composition_compute_stop_pos): Use int, not
16355 EMACS_INT, for values that are known to be in character range.
16356 This doesn't fix any bugs but is the usual style inside Emacs and
16357 may generate better code on 32-bit machines.
16358
34206dd2
PE
16359 Make sure a 64-bit char is never passed to ENCODE_CHAR.
16360 This is for reasons similar to the recent CHAR_STRING fix.
16361 * charset.c (Fencode_char): Check that character arg is actually
16362 a character. Pass an int to ENCODE_CHAR.
16363 * charset.h (ENCODE_CHAR): Verify that the character argument is no
16364 wider than 'int', as a compile-time check to prevent future regressions
16365 in this area.
16366
c5958d4c 16367 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
16368
16369 Make sure a 64-bit char is never passed to CHAR_STRING.
16370 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
16371 by silently ignoring the top 32 bits, allowing some values
16372 that were far too large to be valid characters.
16373 * character.h: Include <verify.h>.
16374 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
16375 arguments are no wider than unsigned, as a compile-time check
16376 to prevent future regressions in this area.
16377 * data.c (Faset):
01103c44 16378 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
16379 (Fsubst_char_in_region):
16380 * fns.c (concat):
16381 * xdisp.c (decode_mode_spec_coding):
16382 Adjust to CHAR_STRING's new requirement.
16383 * editfns.c (Finsert_char, Fsubst_char_in_region):
16384 * fns.c (concat): Check that character args are actually
16385 characters. Without this test, these functions did the wrong
16386 thing with wildly out-of-range values on 64-bit hosts.
16387
d37ca623
PE
16388 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
16389 These casts should not be needed on 32-bit hosts, either.
16390 * keyboard.c (read_char):
16391 * lread.c (Fload): Remove casts to unsigned.
16392
ea204efb
PE
16393 * lisp.h (UNSIGNED_CMP): New macro.
16394 This fixes comparison bugs on 64-bit hosts.
16395 (ASCII_CHAR_P): Use it.
16396 * casefiddle.c (casify_object):
01103c44 16397 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
16398 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
16399 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
16400 * dispextern.h (FACE_FROM_ID):
16401 * keyboard.c (read_char): Use UNSIGNED_CMP.
16402
41cb286c
PE
16403 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
16404 not to EMACS_INT, to avoid GCC warning.
16405
4a1b9832
PE
16406 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
16407
55daad71
PE
16408 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
16409 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
16410 isn't needed on 32-bit machines.
8f95c75c 16411
01103c44
PE
16412 * buffer.c (Fgenerate_new_buffer_name):
16413 Use EMACS_INT for count, not int.
0ceccced 16414 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
16415
16416 * data.c (Qcompiled_function): Now static.
16417
c6f072e7
PE
16418 * window.c (window_body_lines): Now static.
16419
20ce5912
PE
16420 * image.c (gif_load): Rename local to avoid shadowing.
16421
9c4c5f81
PE
16422 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
16423 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
16424 * alloc.c (make_save_value): Integer argument is now of type
16425 ptrdiff_t, not int.
16426 (mark_object): Use ptrdiff_t, not int.
16427 * lisp.h (pD): New macro.
16428 * print.c (print_object): Use it.
16429
c0c5c8ae
PE
16430 * alloc.c: Use EMACS_INT, not int, to count objects.
16431 (total_conses, total_markers, total_symbols, total_vector_size)
16432 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
16433 (total_free_floats, total_floats, total_free_intervals)
16434 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
16435 Now EMACS_INT, not int. All uses changed.
16436 (Fgarbage_collect): Compute overall total using a double, so that
16437 integer overflow is less likely to be a problem. Check for overflow
16438 when converting back to an integer.
5a25e253
PE
16439 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
16440 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
16441 These were 'int' variables that could overflow on 64-bit hosts;
16442 they were never used, so remove them instead of repairing them.
211a0b2a 16443 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
16444 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
16445 Previously, this ceilinged at INT_MAX, but that doesn't work on
16446 64-bit machines.
e46bb31a 16447 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 16448
c78baabf 16449 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 16450 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
16451 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
16452 when a (possibly-narrower) signed value would do just as well.
16453 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 16454
c9d624c6
PE
16455 * alloc.c: Catch some string size overflows that we were missing.
16456 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
16457 for convenience in STRING_BYTES_MAX.
16458 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
16459 The definition here is exact; the one in lisp.h was approximate.
16460 (allocate_string_data): Check for string overflow. This catches
16461 some instances we weren't catching before. Also, it catches
16462 size_t overflow on (unusual) hosts where SIZE_MAX <= min
16463 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
16464 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 16465
c9d624c6
PE
16466 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
16467 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 16468 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 16469
353032ce
PE
16470 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
16471
2bccce07
PE
16472 * alloc.c (Fmake_string): Check for out-of-range init.
16473
0ac30604
SM
164742011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
16475
16476 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
16477
c195f2de
JD
164782011-06-14 Jan Djärv <jan.h.d@swipnet.se>
16479
16480 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
16481 xg_get_default_scrollbar_width.
16482
16483 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
16484 (int_gtk_range_get_value): Move to the scroll bar part of the file.
16485 (style_changed_cb): Call update_theme_scrollbar_width and call
16486 x_set_scroll_bar_default_width and xg_frame_set_char_size for
16487 all frames (Bug#8505).
16488 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
16489 Call gtk_window_set_resizable if HAVE_GTK3.
16490 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
16491 and height if HAVE_GTK3 (Bug#8505).
16492 (scroll_bar_width_for_theme): New variable.
16493 (update_theme_scrollbar_width): New function.
16494 (xg_get_default_scrollbar_width): Move code to
16495 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
16496 (xg_initialize): Call update_theme_scrollbar_width.
16497
16498 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
16499
16500 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
16501
e10ac9f1
MR
165022011-06-12 Martin Rudalics <rudalics@gmx.at>
16503
16504 * frame.c (make_frame): Call other_buffer_safely instead of
16505 other_buffer.
16506
16507 * window.c (temp_output_buffer_show): Call display_buffer with
16508 second argument Vtemp_buffer_show_specifiers and reset latter
16509 immediately after the call.
16510 (Vtemp_buffer_show_specifiers): New variable.
16511 (auto_window_vscroll_p, next_screen_context_lines)
16512 (Vscroll_preserve_screen_position): Remove leading asterisks from
16513 doc-strings.
16514
2d3c217e 165152011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 16516
7b7f97e8 16517 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
16518 * buffer.c (Qclone_number): Remove for now, as it's unused.
16519 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
16520 (record_buffer): Remove unused local.
16521 * frame.c (other_visible_frames, frame_buffer_list): Now static.
16522 (set_frame_buffer_list): Remove; unused.
16523 * frame.h (other_visible_frames): Remove decl.
16524 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
16525 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
16526 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
16527 if HAVE_GPM.
16528 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
16529 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
16530 Define only if HAVE_GPM.
16531 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
16532 (update_hints_inhibit): Remove; never set. All uses removed.
16533 * widgetprv.h (emacsFrameClassRec): Remove decl.
16534 * window.c (delete_deletable_window): Now returns void, since it
16535 wasn't returning anything.
16536 (compare_window_configurations): Remove unused locals.
16537 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
16538 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
16539 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
16540 the same widths as pointers. This follows up on the 2011-05-06 patch.
16541 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
16542 * xterm.h: Likewise.
16543 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
16544
1384b89e
JB
165452011-06-12 Juanma Barranquero <lekktu@gmail.com>
16546
16547 * makefile.w32-in: Update dependencies.
16548 (LISP_H): Add lib/intprops.h.
16549
1100a63c
CY
165502011-06-11 Chong Yidong <cyd@stupidchicken.com>
16551
16552 * image.c (gif_load): Add animation frame delay to the metadata.
16553 (syms_of_image): Use DEFSYM. New symbol `delay'.
16554
6198ccd0
MR
165552011-06-11 Martin Rudalics <rudalics@gmx.at>
16556
16557 * window.c (delete_deletable_window): Re-add.
16558 (Fset_window_configuration): Rewrite to handle dead buffers and
16559 consequently deletable windows.
16560 (window_tree, Fwindow_tree): Remove. Supply functionality in
16561 window.el.
16562 (compare_window_configurations): Simplify code.
16563
b6e3633c
AS
165642011-06-11 Andreas Schwab <schwab@linux-m68k.org>
16565
1ab0dee5
AS
16566 * image.c (imagemagick_load_image): Fix type mismatch.
16567 (Fimagemagick_types): Likewise.
16568
b6e3633c
AS
16569 * window.h (replace_buffer_in_windows): Declare.
16570
9397e56f
MR
165712011-06-11 Martin Rudalics <rudalics@gmx.at>
16572
16573 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
16574 Qclone_number. Remove external declaration of Qdelete_window.
16575 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
16576 code.
640c8776
SM
16577 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
16578 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
16579 (Fother_buffer): Rewrite doc-string. Major rewrite for new
16580 buffer list implementation.
16581 (other_buffer_safely): New function.
16582 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
16583 calls to replace_buffer_in_windows and
16584 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
16585 if allowed.
16586 (record_buffer): Inhibit quitting and rewrite using quittable
16587 functions. Run Qbuffer_list_update_hook if allowed.
16588 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
16589 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
16590 Move switch-to-buffer to window.el.
9397e56f
MR
16591 (bury-buffer): Move to window.el.
16592 (Vbuffer_list_update_hook): New variable.
16593
16594 * lisp.h (other_buffer_safely): Add prototype in buffer.c
16595 section.
16596
16597 * window.h (resize_frame_windows): Move up in code.
16598 (Fwindow_frame): Remove EXFUN.
16599 (replace_buffer_in_all_windows): Remove prototype.
16600 (replace_buffer_in_windows_safely): Add prototype.
16601
16602 * window.c: Declare Qdelete_window static again. Move down
16603 declaration of select_count.
16604 (Fnext_window, Fprevious_window): Rewrite doc-strings.
16605 (Fother_window): Move to window.el.
16606 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
16607 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
16608 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
16609 window.el.
16610 (replace_buffer_in_windows): Implement by calling
16611 Qreplace_buffer_in_windows.
16612 (replace_buffer_in_all_windows): Remove with some functionality
16613 moved into replace_buffer_in_windows_safely.
16614 (replace_buffer_in_windows_safely): New function.
16615 (select_window_norecord, select_frame_norecord): Move in front
16616 of run_window_configuration_change_hook. Remove now obsolete
16617 declarations.
640c8776
SM
16618 (Fset_window_buffer): Rewrite doc-string.
16619 Call Qrecord_window_buffer.
9397e56f
MR
16620 (keys_of_window): Move binding for other-window to window.el.
16621
b50691aa
CY
166222011-06-11 Chong Yidong <cyd@stupidchicken.com>
16623
16624 * dispextern.h (struct image): Replace data member, whose int_val
16625 and ptr_val fields were not used by anything, with a single
16626 lisp_val object.
16627
16628 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
16629 (gif_clear_image, gif_load, imagemagick_load_image)
16630 (gs_clear_image, gs_load): Callers changed.
16631
3f754b86
PE
166322011-06-10 Paul Eggert <eggert@cs.ucla.edu>
16633
cca69397
PE
16634 * buffer.h: Include <time.h>, for time_t.
16635 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
16636
109e28d0
PE
16637 Fix minor problems found by static checking.
16638
60737f02
PE
16639 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
16640
4b66faf3
PE
16641 Make identifiers static if they are not used in other modules.
16642 * data.c (Qcompiled_function, Qframe, Qvector):
16643 * image.c (QimageMagick, Qsvg):
16644 * minibuf.c (Qmetadata):
16645 * window.c (resize_window_check, resize_root_window): Now static.
16646 * window.h (resize_window_check, resize_root_window): Remove decls.
16647
109e28d0
PE
16648 * window.c (window_deletion_count, delete_deletable_window):
16649 Remove; unused.
46a4ce9e
PE
16650 (window_body_lines): Now static.
16651 (Fdelete_other_windows_internal): Mark vars as initialized.
16652 Make sure 'resize_failed' is initialized.
16653 (run_window_configuration_change_hook): Rename local to avoid shadowing.
16654 (resize_window_apply): Remove unused local.
16655 * window.h (delete_deletable_window): Remove decl.
16656
109e28d0 16657 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
16658 (imagemagick_load_image): Fix pointer signedness problem by changing
16659 last arg from unsigned char * to char *. All uses changed.
16660 Also, fix a local for similar reasons.
16661 Remove unused locals. Remove locals to avoid shadowing.
16662 (fn_rsvg_handle_free): Remove; unused.
16663 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 16664 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 16665
3f754b86
PE
16666 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
16667
2547adb1
CY
166682011-06-10 Chong Yidong <cyd@stupidchicken.com>
16669
16670 * image.c (gif_load): Fix omitted cast error introduced by
16671 2011-06-06 change.
16672
2c8e37d4
MR
166732011-06-10 Martin Rudalics <rudalics@gmx.at>
16674
16675 * window.h (resize_proportionally, orig_total_lines)
16676 (orig_top_line): Remove from window structure.
16677 (set_window_height, set_window_width, change_window_heights)
16678 (Fdelete_window): Remove prototypes.
16679 (resize_frame_windows): Remove duplicate declaration.
16680
440a42e3
EZ
166812011-06-10 Eli Zaretskii <eliz@gnu.org>
16682
16683 * window.h (resize_frame_windows, resize_window_check)
16684 (delete_deletable_window, resize_root_window)
16685 (resize_frame_windows): Declare prototypes.
16686
16687 * window.c (resize_window_apply): Make definition be "static" to
16688 match the prototype.
16689
562dd5e9
MR
166902011-06-10 Martin Rudalics <rudalics@gmx.at>
16691
16692 * window.c: Remove declarations of Qwindow_size_fixed,
16693 window_min_size_1, window_min_size_2, window_min_size,
16694 size_window, window_fixed_size_p, enlarge_window, delete_window.
16695 Remove static from declaration of Qdelete_window, it's
16696 temporarily needed by Fbury_buffer.
16697 (replace_window): Don't assign orig_top_line and
16698 orig_total_lines.
16699 (Fdelete_window, delete_window): Remove. Window deletion is
16700 handled by window.el.
640c8776
SM
16701 (window_loop): Remove DELETE_OTHER_WINDOWS case.
16702 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
16703 (Fdelete_other_windows): Remove. Deleting other windows is
16704 handled by window.el.
16705 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
16706 handled in window.el.
16707 (window_min_size_2, window_min_size_1, window_min_size): Remove.
16708 Window minimum sizes are handled in window.el.
16709 (shrink_windows, size_window, set_window_height)
16710 (set_window_width, change_window_heights, window_height)
16711 (window_width, CURBEG, CURSIZE, enlarge_window)
16712 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
16713 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
16714 handled in window.el.
16715 (make_dummy_parent): Rename to make_parent_window and give it a
16716 second argument horflag.
16717 (make_window): Don't set resize_proportionally any more.
16718 (Fsplit_window): Remove. Windows are split in window.el.
16719 (save_restore_action, save_restore_orig_size)
16720 (shrink_window_lowest_first, save_restore_orig_size): Remove.
16721 Resize mini windows in window.el.
16722 (grow_mini_window, shrink_mini_window): Implement by calling
16723 Qresize_root_window_vertically, resize_window_check and
16724 resize_window_apply.
640c8776
SM
16725 (saved_window, Fset_window_configuration, save_window_save):
16726 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
16727 resize_proportionally.
16728 (window_min_height, window_min_width): Move to window.el.
16729 (keys_of_window): Move bindings for delete-other-windows,
16730 split-window, delete-window and enlarge-window to window.el.
16731
16732 * buffer.c: Temporarily extern Qdelete_window.
16733 (Fbury_buffer): Temporarily call Qdelete_window instead of
16734 Fdelete_window (Fbury_buffer will move to window.el soon).
16735
16736 * frame.c (set_menu_bar_lines_1): Remove code handling
16737 orig_top_line and orig_total_lines.
16738
16739 * dispnew.c (adjust_frame_glyphs_initially): Don't use
16740 set_window_height but set heights directly.
16741 (change_frame_size_1): Use resize_frame_windows.
16742
16743 * xdisp.c (init_xdisp): Don't use set_window_height but set
16744 heights directly.
16745
640c8776
SM
16746 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
16747 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
16748 run_window_configuration_change_hook.
16749
16750 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
16751 instead of change_window_heights and run
16752 run_window_configuration_change_hook.
16753
1a13852e
MR
167542011-06-09 Martin Rudalics <rudalics@gmx.at>
16755
16756 * window.c (replace_window): Rename second argument REPLACEMENT to
16757 NEW. New third argument SETFLAG. Rewrite.
16758 (delete_window, make_dummy_parent): Call replace_window with
16759 third argument 1.
16760 (window_list_1): Move down in code.
16761 (run_window_configuration_change_hook): Move set_buffer part
16762 before select_frame_norecord part in order to unwind correctly.
16763 Rename count1 to count.
16764 (recombine_windows, delete_deletable_window, resize_root_window)
16765 (Fdelete_other_windows_internal)
16766 (Frun_window_configuration_change_hook, make_parent_window)
16767 (resize_window_check, resize_window_apply, Fresize_window_apply)
16768 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
16769 (Fdelete_window_internal, Fresize_mini_window_internal):
16770 New functions.
1a13852e
MR
16771 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
16772
f3d1777e
MR
167732011-06-08 Martin Rudalics <rudalics@gmx.at>
16774
496e208e
MR
16775 * window.h (window): Add some new members to window structure -
16776 normal_lines, normal_cols, new_total, new_normal, clone_number,
16777 splits, nest, prev_buffers, next_buffers.
16778 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 16779 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 16780
f3d1777e
MR
16781 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
16782 Remove.
496e208e
MR
16783 (make_dummy_parent): Set new members of windows structure.
16784 (make_window): Move down in code. Handle new members of window
16785 structure.
16786 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
16787 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
16788 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
16789 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
16790 (Fset_window_next_buffers, Fset_window_clone_number):
16791 New functions.
496e208e
MR
16792 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
16793 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
16794 Doc-string fixes.
16795 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
16796 Argument WINDOW can be now internal window too.
16797 (Fwindow_use_time): Move up in code.
16798 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
16799 Rewrite doc-string.
16800 (Fset_window_configuration, saved_window)
16801 (Fcurrent_window_configuration, save_window_save): Handle new
16802 members of window structure.
b9e809c2
MR
16803 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
16804 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
16805 (syms_of_window): New Lisp objects Qrecord_window_buffer,
16806 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
16807 Qget_mru_window, Qresize_root_window,
16808 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
16809 Qauto_buffer_name; staticpro them.
f3d1777e 16810
abde8f8c
MR
168112011-06-07 Martin Rudalics <rudalics@gmx.at>
16812
16813 * window.c (Fwindow_total_size, Fwindow_left_column)
16814 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
16815 (Fwindow_list_1): New functions.
16816 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
16817 (Fwindow_width, Fscroll_left, Fscroll_right):
16818 Use window_body_cols instead of window_box_text_cols.
16819 (delete_window, Fset_window_configuration):
16820 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
16821 (delete_all_subwindows): Take a window as argument and not a
16822 structure. Rewrite.
190b47e6
MR
16823 (window_loop): Remove handling of GET_LRU_WINDOW and
16824 GET_LARGEST_WINDOW.
16825 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
16826
16827 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
16828 window_box_text_cols. delete_all_subwindows now takes a
16829 Lisp_Object as argument.
abde8f8c 16830
640c8776
SM
16831 * indent.c (compute_motion, Fcompute_motion):
16832 Use window_body_cols instead of window_box_text_cols.
abde8f8c 16833
fa8a67e6
MR
16834 * frame.c (delete_frame): Call delete_all_subwindows with root
16835 window as argument.
16836
a54e3482
DC
168372011-06-07 Daniel Colascione <dan.colascione@gmail.com>
16838
16839 * fns.c (Fputhash): Document return value.
16840
60002bf5
CY
168412011-06-06 Chong Yidong <cyd@stupidchicken.com>
16842
16843 * image.c (gif_load): Implement gif89a spec "no disposal" method.
16844
0c671da6 168452011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 16846
b862a52a 16847 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 16848
be44ca6c
PE
16849 Check for overflow when converting integer to cons and back.
16850 * charset.c (Fdefine_charset_internal, Fdecode_char):
16851 Use cons_to_unsigned to catch overflow.
16852 (Fencode_char): Use INTEGER_TO_CONS.
16853 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
16854 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
16855 * data.c (long_to_cons, cons_to_long): Remove.
16856 (cons_to_unsigned, cons_to_signed): New functions.
16857 These signal an error for invalid or out-of-range values.
16858 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
16859 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
16860 * font.c (Ffont_variation_glyphs):
16861 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
16862 * lisp.h: Include <intprops.h>.
16863 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
16864 (cons_to_signed, cons_to_unsigned): New decls.
16865 (long_to_cons, cons_to_long): Remove decls.
16866 * undo.c (record_first_change): Use INTEGER_TO_CONS.
16867 (Fprimitive_undo): Use CONS_TO_INTEGER.
16868 * xfns.c (Fx_window_property): Likewise.
16869 * xselect.c: Include <limits.h>.
16870 (x_own_selection, selection_data_to_lisp_data):
16871 Use INTEGER_TO_CONS.
16872 (x_handle_selection_request, x_handle_selection_clear)
16873 (x_get_foreign_selection, Fx_disown_selection_internal)
16874 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
16875 (lisp_data_to_selection_data): Use cons_to_unsigned.
16876 (x_fill_property_data): Use cons_to_signed.
16877 Report values out of range.
16878
d1f3d2af
PE
16879 Check for buffer and string overflow more precisely.
16880 * buffer.h (BUF_BYTES_MAX): New macro.
16881 * lisp.h (STRING_BYTES_MAX): New macro.
16882 * alloc.c (Fmake_string):
16883 * character.c (string_escape_byte8):
16884 * coding.c (coding_alloc_by_realloc):
16885 * doprnt.c (doprnt):
16886 * editfns.c (Fformat):
16887 * eval.c (verror):
16888 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
16889 since they may not be the same number.
16890 * editfns.c (Finsert_char):
16891 * fileio.c (Finsert_file_contents):
16892 Likewise for BUF_BYTES_MAX.
16893
dd52fcea
PE
16894 * image.c: Use ptrdiff_t, not int, for sizes.
16895 (slurp_file): Switch from int to ptrdiff_t.
16896 All uses changed.
16897 (slurp_file): Check that file size fits in both size_t (for
16898 malloc) and ptrdiff_t (for sanity and safety).
16899
7f9bbdbb
PE
16900 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
16901 if b->modtime has its maximal value.
16902
dfe18f82
PE
16903 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
16904
84acfcf0
PE
16905 Don't assume time_t can fit into int.
16906 * buffer.h (struct buffer.modtime): Now time_t, not int.
16907 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
16908 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
16909
ccd9a01a
PE
16910 Minor fixes for signed vs unsigned integers.
16911 * character.h (MAYBE_UNIFY_CHAR):
16912 * charset.c (maybe_unify_char):
16913 * keyboard.c (read_char, reorder_modifiers):
16914 XINT -> XFASTINT, since the integer must be nonnegative.
16915 * ftfont.c (ftfont_spec_pattern):
16916 * keymap.c (access_keymap, silly_event_symbol_error):
16917 XUINT -> XFASTINT, since the integer must be nonnegative.
16918 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
16919 since it makes no difference and we prefer signed.
16920 * keyboard.c (record_char): Use XUINT when all the neighbors do.
16921 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
16922 nonnegative.
16923
d6d100dd
SM
169242011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
16925
16926 * window.h (Fwindow_frame): Declare.
16927
2b6148e4
PE
169282011-06-06 Paul Eggert <eggert@cs.ucla.edu>
16929
16930 * alloc.c: Simplify handling of large-request failures (Bug#8800).
16931 (SPARE_MEMORY): Always define.
16932 (LARGE_REQUEST): Remove.
16933 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
16934
f230ecc9
MR
169352011-06-06 Martin Rudalics <rudalics@gmx.at>
16936
727e958e
MR
16937 * lisp.h: Move EXFUNS for Fframe_root_window,
16938 Fframe_first_window and Fset_frame_selected_window to window.h.
16939
16940 * window.h: Move EXFUNS for Fframe_root_window,
16941 Fframe_first_window and Fset_frame_selected_window here from
16942 lisp.h.
16943
16944 * frame.c (Fwindow_frame, Fframe_first_window)
16945 (Fframe_root_window, Fframe_selected_window)
16946 (Fset_frame_selected_window): Move to window.c.
16947 (Factive_minibuffer_window): Move to minibuf.c.
16948 (Fother_visible_frames_p): New function.
16949
16950 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
16951
f230ecc9
MR
16952 * window.c (decode_window, decode_any_window): Move up in code.
16953 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
16954 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
16955 (Fwindow_buffer): Move up and rewrite doc-string.
16956 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
16957 (Fwindow_prev): New functions.
727e958e
MR
16958 (Fwindow_frame): Move here from frame.c. Accept any window as
16959 argument.
16960 (Fframe_root_window, Fframe_first_window)
16961 (Fframe_selected_window): Move here from frame.c. Accept frame
16962 or arbitrary window as argument. Update doc-strings.
16963 (Fminibuffer_window): Move up in code.
16964 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
16965 (Fset_frame_selected_window): Move here from frame.c.
16966 Marginal rewrite.
727e958e
MR
16967 (Fselected_window, select_window, Fselect_window): Move up in
16968 code. Minor doc-string fixes.
f230ecc9 16969
4d09bcf6
PE
169702011-06-06 Paul Eggert <eggert@cs.ucla.edu>
16971
16972 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
16973 Do not assume that spare memory exists; that assumption is valid
16974 only if SYSTEM_MALLOC.
16975 (LARGE_REQUEST): New macro, so that the issue of large requests
16976 is separated from the issue of spare memory.
16977
810928a2
AS
169782011-06-05 Andreas Schwab <schwab@linux-m68k.org>
16979
172418ad
AS
16980 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
16981 format. (Bug#8806)
16982
43f862f7
AS
16983 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
16984
810928a2
AS
16985 * xfns.c (x_set_scroll_bar_default_width): Move declarations
16986 before statements.
16987
a059fe24
JD
169882011-06-05 Jan Djärv <jan.h.d@swipnet.se>
16989
16990 * gtkutil.c (xg_get_default_scrollbar_width): New function.
16991
16992 * gtkutil.h: Declare xg_get_default_scrollbar_width.
16993
16994 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
16995 min width by calling x_set_scroll_bar_default_width (Bug#8505).
16996
989bf368
JB
169972011-06-05 Juanma Barranquero <lekktu@gmail.com>
16998
16999 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
17000
4b80f674
CY
170012011-06-04 Chong Yidong <cyd@stupidchicken.com>
17002
17003 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
17004 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
17005 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
17006 New error handlers.
4b80f674
CY
17007 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
17008 Obey Vx_select_enable_clipboard_manager. Catch errors in
17009 x_clipboard_manager_save (Bug#8779).
17010 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 17011 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 17012
99a33b77 170132011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
17014
17015 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
17016
99a33b77 170172011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
17018
17019 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
17020 in the current matrix if keep_current_p is non-zero.
17021
8264569d
EZ
170222011-06-04 Eli Zaretskii <eliz@gnu.org>
17023
17024 * bidi.c (bidi_level_of_next_char): Fix last change.
17025
57f97249
EZ
170262011-06-03 Eli Zaretskii <eliz@gnu.org>
17027
fec2107c 17028 Support bidi reordering of text covered by display properties.
57f97249 17029
fec2107c
EZ
17030 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
17031 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
17032 (bidi_cache_search, bidi_cache_iterator_state)
17033 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
17034 (bidi_level_of_next_char, bidi_move_to_visually_next):
17035 Support character positions inside a run of characters covered by a
fec2107c
EZ
17036 display string.
17037 (bidi_paragraph_init, bidi_resolve_explicit_1)
17038 (bidi_level_of_next_char): Call bidi_fetch_char and
17039 bidi_fetch_char_advance instead of FETCH_CHAR and
17040 FETCH_CHAR_ADVANCE.
17041 (bidi_init_it): Initialize new members.
17042 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
17043 definitions.
17044 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
17045 instead of using explicit *_CHAR codes.
d6d100dd
SM
17046 (bidi_resolve_explicit, bidi_resolve_weak):
17047 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
17048 bidirectional text is supported only in multibyte buffers.
17049 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
17050 it to initialize the frame_window_p member of struct bidi_it.
17051 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
17052 (bidi_resolve_explicit, bidi_resolve_weak)
17053 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
17054 bidi_it->nchars is non-positive.
17055 (bidi_level_of_next_char): Don't try to lookup the cache for the
17056 next/previous character if nothing is cached there yet, or if we
17057 were just reseat()'ed to a new position.
c40e2fb2 17058
0e14fe90
EZ
17059 * xdisp.c (set_cursor_from_row): Set start and stop points
17060 according to the row's direction when priming the loop that looks
17061 for the glyph on which to display cursor.
17062 (single_display_spec_intangible_p): Function deleted.
17063 (display_prop_intangible_p): Reimplement to call
17064 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
17065 Accept 3 additional arguments needed by handle_display_spec.
17066 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
17067 values: lists, `(when COND...)' forms, etc.
17068 (single_display_spec_string_p): Support property values that are
17069 lists with the argument STRING its top-level element.
17070 (display_prop_string_p): Fix the condition for processing a
17071 property that is a list to be consistent with handle_display_spec.
fec2107c 17072 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
17073 last portion of handle_display_prop.
17074 (compute_display_string_pos): Accept additional argument
17075 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
17076 value of a `display' property is a "replacing spec".
17077 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
17078 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
17079 the display property, but just return a value indicating whether
17080 the display property will replace the characters it covers.
17081 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
17082 frame_window_p members of struct bidi_it.
d6d100dd
SM
17083 (compute_display_string_pos, compute_display_string_end):
17084 New functions.
fec2107c
EZ
17085 (push_it): Accept second argument POSITION, where pop_it should
17086 jump to continue iteration.
17087 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 17088
fec2107c
EZ
17089 * keyboard.c (adjust_point_for_property): Adjust the call to
17090 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
17091
17092 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
17093 (bidi_init_it): Update prototypes.
17094 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
17095 (compute_display_string_pos, compute_display_string_end):
17096 Declare prototypes.
fec2107c
EZ
17097 (struct bidi_it): New members nchars and disp_pos. ch_len is now
17098 EMACS_INT.
fc6f18ce 17099
40087514 171002011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 17101
57f53182
PE
17102 Malloc failure behavior now depends on size of allocation.
17103 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
17104 * lisp.h: Change signatures accordingly.
17105 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
17106 All callers changed. (Bug#8762)
17107
17108 * gnutls.c: Use Emacs's memory allocators.
17109 Without this change, the gnutls library would invoke malloc etc.
17110 directly, which causes problems on non-SYNC_INPUT hosts, and which
17111 runs afoul of improving memory_full behavior. (Bug#8761)
17112 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
17113 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
17114 xfree instead of the default malloc, realloc, free.
17115 (Fgnutls_boot): No need to check for memory allocation failure,
17116 since xmalloc does that for us.
17117
ac32cd99 17118 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
17119 * category.c (hash_get_category_set):
17120 * ccl.c (ccl_driver):
17121 * charset.c (Fdefine_charset_internal):
17122 * charset.h (struct charset.hash_index):
17123 * composite.c (get_composition_id, gstring_lookup_cache)
17124 (composition_gstring_put_cache):
17125 * composite.h (struct composition.hash_index):
17126 * dispextern.h (struct image.hash):
17127 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
17128 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
17129 (hashfn_equal, hashfn_user_defined, make_hash_table)
17130 (maybe_resize_hash_table, hash_lookup, hash_put)
17131 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
17132 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
17133 (Fsxhash, Fgethash, Fputhash, Fmaphash):
17134 * image.c (make_image, search_image_cache, lookup_image)
17135 (xpm_put_color_table_h):
17136 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 17137 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 17138 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 17139 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
17140 * alloc.c (allocate_vectorlike):
17141 Check for overflow in vector size calculations.
17142 * ccl.c (ccl_driver):
17143 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
17144 * fns.c, image.c: Remove unnecessary static decls that would otherwise
17145 need to be updated by these changes.
40087514
PE
17146 * fns.c (make_hash_table, maybe_resize_hash_table):
17147 Check for integer overflow with large hash tables.
0de4bb68
PE
17148 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
17149 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
17150 (SXHASH_REDUCE): New macro.
17151 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
17152 Use it instead of discarding useful hash info with large hash values.
17153 (sxhash_float): New function.
17154 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
17155 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
17156 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
17157 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
17158 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
17159 Adjust signatures to match updated version of code.
17160 (consing_since_gc): Now EMACS_INT, since a single hash table can
17161 use more than INT_MAX bytes.
17162
698d32e2
DN
171632011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
17164
17165 Make it possible to build with GCC-4.6+ -O2 -flto.
17166
17167 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
17168
fd6fa53f
SM
171692011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
17170
17171 * minibuf.c (get_minibuffer, read_minibuf_unwind):
17172 Call minibuffer-inactive-mode.
17173
864db017
JB
171742011-05-31 Juanma Barranquero <lekktu@gmail.com>
17175
17176 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
17177 Update dependencies.
17178
2ad0baf4
DN
171792011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17180
17181 * data.c (init_data): Remove code for UTS, this system is not
17182 supported anymore.
17183
4fcc2638
DN
171842011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17185
17186 Don't force ./temacs to start in terminal mode.
17187
17188 * frame.c (make_initial_frame): Initialize faces in all cases, not
17189 only when CANNOT_DUMP is defined.
17190 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
17191
c56e0fd5
DN
171922011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17193
17194 * dispnew.c (add_window_display_history): Use const for the string
17195 pointer. Remove declaration, not needed.
17196
333d54da 171972011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 17198
55d4c1b2 17199 Use 'inline', not 'INLINE'.
333d54da 17200 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
17201 * alloc.c, fontset.c (INLINE): Remove.
17202 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
17203 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
17204 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
17205 * gmalloc.c (register_heapinfo): Use inline unconditionally.
17206 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
17207
738db178
DN
172082011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17209
17210 Make it possible to run ./temacs.
17211
17212 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
17213 syms_of_callproc does the same thing. Remove test for
17214 "initialized", do it in the caller.
17215 * emacs.c (main): Avoid calling set_initial_environment when dumping.
17216
620c53a6
SM
172172011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
17218
17219 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
17220 (read_minibuf): Use get_minibuffer.
17221 (syms_of_minibuf): Use DEFSYM.
17222 (Qmetadata): New var.
17223 * data.c (Qbuffer): Don't make it static.
17224 (syms_of_data): Use DEFSYM.
17225
e003a292
PE
172262011-05-31 Paul Eggert <eggert@cs.ucla.edu>
17227
17228 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
17229 (CCL_CODE_MIN): New macro.
17230
ed008a6d
PE
172312011-05-30 Paul Eggert <eggert@cs.ucla.edu>
17232
3687c2ef
PE
17233 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
17234
ed008a6d
PE
17235 * eval.c (Qdebug): Now static.
17236 * lisp.h (Qdebug): Remove decl. This reverts a part of the
17237 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
17238 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
17239
d66c4c7c
CY
172402011-05-29 Chong Yidong <cyd@stupidchicken.com>
17241
17242 * image.c: Various fixes to ImageMagick code comments.
17243 (Fimagemagick_types): Doc fix.
17244
5fbc2025
PE
172452011-05-29 Paul Eggert <eggert@cs.ucla.edu>
17246
0196f88a
PE
17247 Minor fixes prompted by GCC 4.6.0 warnings.
17248
17249 * xselect.c (converted_selections, conversion_fail_tag): Now static.
17250
5fbc2025
PE
17251 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
17252 (x_clipboard_manager_save_all): Move extern decl to ...
17253 * xterm.h: ... here, so that it can be checked for consistency.
17254
1dd3c2d9
CY
172552011-05-29 Chong Yidong <cyd@stupidchicken.com>
17256
17257 * xselect.c (x_clipboard_manager_save_frame)
17258 (x_clipboard_manager_save_all): New functions.
17259 (Fx_clipboard_manager_save): Lisp function deleted.
17260
17261 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
17262 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
17263
17264 * xterm.h: Update prototype.
17265
5ba6571d
WX
172662011-05-28 William Xu <william.xwl@gmail.com>
17267
17268 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
17269 exiting (Bug#8239).
17270
3eaff834
JM
172712011-05-28 Jim Meyering <meyering@redhat.com>
17272
e1900994 17273 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
17274 * fns.c (to_uchar): Define.
17275 (crypto_hash_function): Use it to convert some newly-signed
17276 variables to unsigned, to avoid sign-extension bugs. For example,
17277 without this change, (md5 "truc") would evaluate to
17278 45723a2aff78ff4fff7fff1114760e62 rather than the expected
17279 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 17280 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 17281
0f6990a7
PE
172822011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17283
17284 Integer overflow fixes.
c8a9ca5a 17285
08686060
PE
17286 * dbusbind.c: Serial number integer overflow fixes.
17287 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
17288 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
17289 to hold a serial number that is too large for a fixnum.
17290 (Fdbus_method_return_internal, Fdbus_method_error_internal):
17291 Check for serial numbers out of range. Decode any serial number
59568bf0 17292 that was so large that it became a float. (Bug#8722)
08686060 17293
2d1fc3c7
PE
17294 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
17295 (Fdbus_call_method, Fdbus_call_method_asynchronously):
17296 Use XFASTINT rather than XUINT when numbers are nonnegative.
17297 (xd_append_arg, Fdbus_method_return_internal):
17298 (Fdbus_method_error_internal): Likewise. Also, for unsigned
17299 arguments, check that Lisp number is nonnegative, rather than
59568bf0 17300 silently wrapping negative numbers around. (Bug#8722)
30217ff0 17301 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 17302 (Bug#8722)
2d1fc3c7 17303
c8a9ca5a
PE
17304 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
17305
519e1d69
PE
17306 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
17307
6df6ae42 17308 ccl: Add integer overflow checks.
30569699
PE
17309 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
17310 (IN_INT_RANGE): New macros.
17311 (ccl_driver): Use them to check for integer overflow when
17312 decoding a CCL program. Many of the new checks are whether XINT (x)
17313 fits in int; it doesn't always, on 64-bit hosts. The new version
17314 doesn't catch all possible integer overflows, but it's an
847044ea 17315 improvement. (Bug#8719)
30569699 17316
c11285dc
PE
17317 * alloc.c (make_event_array): Use XINT, not XUINT.
17318 There's no need for unsigned here.
17319
fdccd48e
PE
17320 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
17321 This follows up to the 2011-05-06 change that substituted uintptr_t
17322 for EMACS_INT. This case wasn't caught back then.
17323
37910ab2
PE
17324 Rework Fformat to avoid integer overflow issues.
17325 * editfns.c: Include <float.h> unconditionally, as it's everywhere
17326 now (part of C89). Include <verify.h>.
17327 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
17328 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
17329 (Fformat): Avoid the prepass trying to compute sizes; it was only
17330 approximate and thus did not catch overflow reliably. Instead, walk
17331 through the format just once, formatting and computing sizes as we go,
17332 checking for integer overflow at every step, and allocating a larger
17333 buffer as needed. Keep track separately whether the format is
17334 multibyte. Keep only the most-recently calculated precision, rather
17335 than them all. Record whether each argument has been converted to
17336 string. Use EMACS_INT, not int, for byte and char and arg counts.
17337 Support field widths and precisions larger than INT_MAX. Avoid
17338 sprintf's undefined behavior with conversion specifications such as %#d
17339 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
17340 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
17341 formatting out-of-range floating point numbers with int
9173deec 17342 formats. (Bug#8668)
37910ab2 17343
2e6578fb
PE
17344 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
17345
0ae6bdee
PE
17346 * data.c: Avoid integer truncation in expressions involving floats.
17347 * data.c: Include <intprops.h>.
17348 (arith_driver): When there's an integer overflow in an expression
17349 involving floating point, convert the integers to floating point
17350 so that the resulting value does not suffer from catastrophic
17351 integer truncation. For example, on a 64-bit host (* 4
17352 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
17353 Do not rely on undefined behavior after integer overflow.
17354
de883a70
PE
17355 merge count_size_as_multibyte, parse_str_to_multibyte
17356 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 17357 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
17358 Check for integer overflow.
17359 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
17360 since it's now a duplicate of the other. This is more of
17361 a character than a buffer op, so better that it's in character.c.
17362 * fns.c, print.c: Adjust to above changes.
17363
2ff916cb
PE
173642011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
17365
17366 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
17367
f1b54466
PE
173682011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17369
fb1ac845
PE
17370 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17371 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
17372 (x_clipboard_manager_save): Now static.
17373 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
17374
f1b54466
PE
17375 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17376 (crypto_hash_function): Now static.
17377 Fix pointer signedness problems. Avoid unnecessary initializations.
17378
a9f737ee
CY
173792011-05-27 Chong Yidong <cyd@stupidchicken.com>
17380
17381 * termhooks.h (Vselection_alist): Make it terminal-local.
17382
17383 * terminal.c (create_terminal): Initialize it.
17384
17385 * xselect.c: Support for clipboard managers.
17386 (Vselection_alist): Move to termhooks.h as terminal-local var.
17387 (LOCAL_SELECTION): New macro.
17388 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
17389 (symbol_to_x_atom): Remove gratuitous arg.
17390 (x_handle_selection_request, lisp_data_to_selection_data)
17391 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
17392 (x_own_selection, x_get_local_selection, x_convert_selection):
17393 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
17394 (some_frame_on_display): Delete unused function.
17395 (Fx_own_selection_internal, Fx_get_selection_internal)
17396 (Fx_disown_selection_internal, Fx_selection_owner_p)
17397 (Fx_selection_exists_p): New optional frame arg.
17398 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
17399 (x_handle_selection_clear): Don't treat other terminals with the
17400 same keyboard specially. Use the terminal-local Vselection_alist.
17401 (x_clear_frame_selections): Use Frun_hook_with_args.
17402
17403 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
17404
17405 * xterm.h: Add support for those atoms.
17406
e067f0c1
CY
174072011-05-26 Chong Yidong <cyd@stupidchicken.com>
17408
17409 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
17410 (converted_selections, conversion_fail_tag): New global variables.
17411 (x_selection_request_lisp_error): Free the above.
17412 (x_get_local_selection): Remove unnecessary code.
17413 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
17414 of converted selections stored in converted_selections.
17415 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
17416 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
17417 (x_convert_selection): New function.
17418 (x_handle_selection_event): Simplify.
17419 (x_get_foreign_selection): Don't ignore incoming requests while
17420 waiting for an answer; this will fail when we implement
17421 SAVE_TARGETS, and seems unnecessary anyway.
17422 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
17423 (Vx_sent_selection_functions): Doc fix.
17424
0f4aebc0
LL
174252011-05-26 Leo Liu <sdl.web@gmail.com>
17426
17427 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
17428
e61124cd
YM
174292011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17430
17431 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
17432
17433 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
17434 for fringe update if it has periodic bitmap.
ac389d0c 17435 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
17436 and fringe_bitmap_periodic_p.
17437
17438 * fringe.c (get_fringe_bitmap_data): New function.
17439 (draw_fringe_bitmap_1, update_window_fringes): Use it.
17440 (update_window_fringes): Record periodicity of fringe bitmap in glyph
17441 row. Mark glyph row for fringe update if periodicity changed.
17442
17443 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
17444 for fringe update unless it has periodic bitmap.
17445
f16d9837
KH
174462011-05-25 Kenichi Handa <handa@m17n.org>
17447
17448 * xdisp.c (get_next_display_element): Set correct it->face_id for
17449 a static composition.
17450
e1b90ef6
LL
174512011-05-24 Leo Liu <sdl.web@gmail.com>
17452
17453 * deps.mk (fns.o):
17454 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
17455
17456 * fns.c (crypto_hash_function, Fsha1): New function.
17457 (Fmd5): Use crypto_hash_function.
17458 (syms_of_fns): Add Ssha1.
17459
7400048f
PE
174602011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17461
17462 * gnutls.c: Remove unused macros.
17463 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
17464 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
17465 Remove macros that are defined and never used.
17466 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
17467
abb71cf4
CY
174682011-05-22 Chong Yidong <cyd@stupidchicken.com>
17469
17470 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
17471 (Fx_get_selection_internal): Minor cleanup.
17472 (Fx_own_selection_internal): Rename arguments for consistency with
17473 select.el.
17474
6307db39
PE
174752011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17476
17477 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
17478
f3d4e0a4
CY
174792011-05-22 Chong Yidong <cyd@stupidchicken.com>
17480
17481 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
17482
4d8ade89
YM
174832011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17484
17485 * dispnew.c (scrolling_window): Don't exclude the case that the
17486 last enabled row in the desired matrix touches the bottom boundary.
17487
32078c8d
GM
174882011-05-21 Glenn Morris <rgm@gnu.org>
17489
17490 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
17491 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
17492 and add some more files.
32078c8d 17493
7285dc67
EZ
174942011-05-20 Eli Zaretskii <eliz@gnu.org>
17495
17496 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
17497 report_file_error introduced by the change from 2011-05-07.
17498
89d1bd22
PE
174992011-05-20 Paul Eggert <eggert@cs.ucla.edu>
17500
17501 * systime.h (Time): Define only if emacs is defined.
17502 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
17503 where the include path doesn't have X11/X.h by default. See
17504 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
17505
cd394be1 175062011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
17507
17508 * composite.c (find_automatic_composition): Fix previous change.
17509
b9704ad9
GM
175102011-05-20 Glenn Morris <rgm@gnu.org>
17511
17512 * lisp.mk: New file, split from Makefile.in.
17513 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
17514 (shortlisp): Remove.
17515 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
17516
4a720484
GM
175172011-05-19 Glenn Morris <rgm@gnu.org>
17518
17519 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
17520 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
17521 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
17522 (lisp): Set the order to that of loadup.el.
17523 (shortlisp): Make it a copy of $lisp.
17524 (SOME_MACHINE_LISP): Remove.
17525 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
17526 Use just $shortlisp, not $SOME_MACHINE_LISP too.
17527
a28d4396
KH
175282011-05-18 Kenichi Handa <handa@m17n.org>
17529
17530 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
17531 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
17532 (find_automatic_composition): Mostly rewrite for efficiency.
17533
a2b1fa8e
JB
175342011-05-18 Juanma Barranquero <lekktu@gmail.com>
17535
17536 * makefile.w32-in: Update dependencies.
17537
8e1f5610
CS
175382011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
17539
17540 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 17541 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 17542
7025ee00 175432011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 17544
cdfa6eab
PE
17545 Fix some integer overflow issues, such as string length overflow.
17546
06d6db33
PE
17547 * insdel.c (count_size_as_multibyte): Check for string overflow.
17548
2b4560a8
PE
17549 * character.c (lisp_string_width): Check for string overflow.
17550 Use EMACS_INT, not int, for string indexes and lengths; in
17551 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
17552 the resulting string length overflows an EMACS_INT; instead,
17553 report a string overflow if no precision given. When checking for
17554 precision exhaustion, use a check that cannot possibly have
17555 integer overflow. (Bug#8675)
17556 * character.h (lisp_string_width): Adjust to new signature.
17557
cb93f9be
PE
17558 * alloc.c (string_overflow): New function.
17559 (Fmake_string): Use it. This doesn't change behavior, but saves
17560 a few bytes and will simplify future changes.
17561 * character.c (string_escape_byte8): Likewise.
17562 * lisp.h (string_overflow): New decl.
17563
1a1f3366
PE
17564 Fixups, following up to the user-interface timestamp change.
17565 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
17566 for UI timestamps, instead of unsigned long.
9fbd6841
PE
17567 * msdos.c (mouse_get_pos): Likewise.
17568 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
17569 * w32gui.h (Time): Define by including "systime.h" rather than by
17570 declaring it ourselves. (Bug#8664)
17571
d4e3e4d3
PE
17572 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
17573 * image.c (clear_image_cache): Likewise.
17574
f6a24d19
PE
17575 * term.c (term_mouse_position): Don't assume time_t wraparound.
17576
08dc5ae6
PE
17577 Be more systematic about user-interface timestamps.
17578 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
17579 and sometimes 'EMACS_UINT', to represent these timestamps.
17580 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
17581 This makes the code easier to follow, and makes it easier to catch
17582 integer overflow bugs such as Bug#8664.
17583 * frame.c (Fmouse_position, Fmouse_pixel_position):
17584 Use Time, not unsigned long, for user-interface timestamps.
17585 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
17586 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
17587 * keyboard.h (last_event_timestamp): Likewise.
17588 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
17589 * menu.h (xmenu_show): Likewise.
17590 * term.c (term_mouse_position): Likewise.
17591 * termhooks.h (struct input_event.timestamp): Likewise.
17592 (struct terminal.mouse_position_hook): Likewise.
17593 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
17594 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
17595 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
17596 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
17597 what it was before.
17598 * menu.h, termhooks.h: Include "systime.h", for Time.
17599
8e55734a
PE
17600 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
17601 Don't assume that the difference between two unsigned long values
17602 can fit into an integer. At this point, we know button_down_time
17603 <= event->timestamp, so the difference must be nonnegative, so
17604 there's no need to cast the result if double-click-time is
17605 nonnegative, as it should be; check that it's nonnegative, just in
17606 case. This bug is triggered when events are more than 2**31 ms
86db42d2 17607 apart (about 25 days). (Bug#8664)
8e55734a 17608
841f1b75 17609 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 17610 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 17611
3e26f69c
PE
17612 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
17613 that always fit in int. Use a sentinel instead of a counter, to
17614 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
17615 * frame.h (struct frame): Use int for menu_bar_items_used
17616 instead of EMACS_INT, since it always fits in int.
3e26f69c 17617
5cc152c0
PE
17618 * menu.c (grow_menu_items): Check for int overflow.
17619
d89eb65e
PE
17620 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
17621
5235bd3e
PE
17622 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
17623 Before, the code was not consistent. These values cannot exceed
17624 2**31 - 1 so there's no need to make them unsigned.
17625 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
17626 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
17627 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
17628 as modifiers.
17629 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
17630
bc827e23
PE
17631 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
17632 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
17633 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
17634 presumably because the widths might not match.
17635
78eb494e
PE
17636 * window.c (size_window): Avoid needless test at loop start.
17637
04f2d78b
CB
176382011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
17639
17640 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
17641
d2fc7e3d 176422011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
17643
17644 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
17645
d2fc7e3d 176462011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
17647
17648 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
17649 `width' to `bar_area_x' and `bar_area_width', respectively.
17650 (x_scroll_run): Take account of fringe background extension.
17651
04f2d78b
CB
17652 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
17653 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
17654 `bar_area_width', respectively.
17655 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
17656 background extension.
17657
79b70037
GM
176582011-05-10 Jim Meyering <meyering@redhat.com>
17659
17660 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
17661
2f142cc5
JB
176622011-05-10 Juanma Barranquero <lekktu@gmail.com>
17663
17664 * image.c (Finit_image_library): Return t for built-in image types,
17665 like pbm and xbm. (Bug#8640)
17666
57679c86
AS
176672011-05-09 Andreas Schwab <schwab@linux-m68k.org>
17668
17669 * w32menu.c (set_frame_menubar): Fix submenu allocation.
17670
888c9e86
EZ
176712011-05-07 Eli Zaretskii <eliz@gnu.org>
17672
b0512a1d
EZ
17673 * w32console.c (Fset_screen_color): Doc fix.
17674 (Fget_screen_color): New function.
17675 (syms_of_ntterm): Defsubr it.
17676
7285dc67
EZ
17677 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
17678 unlink the temporary file if Fcall_process didn't create it in the
17679 first place.
17680 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
17681 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
17682 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
17683 cue to call_process_cleanup not to close that handle.
17684
4d3fcc8e
BK
176852011-05-07 Ben Key <bkey76@gmail.com>
17686
17687 * makefile.w32-in: The bootstrap-temacs rule now makes use of
17688 one of two shell specific rules, either bootstrap-temacs-CMD or
17689 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
17690 to the previous implementation of the bootstrap-temacs rule.
17691 The bootstrap-temacs-CMD rule is similar to the previous
17692 implementation of the bootstrap-temacs rule except that it
17693 makes use of the ESC_CFLAGS variable instead of the CFLAGS
17694 variable.
17695
17696 These changes, along with some changes to nt/configure.bat,
17697 nt/gmake.defs, and nt/nmake.defs, are required to extend my
17698 earlier fix to add support for --cflags and --ldflags options
17699 that include quotes so that it works whether make uses cmd or
17700 sh as the shell.
17701
b4289b64
MA
177022011-05-06 Michael Albinus <michael.albinus@gmx.de>
17703
17704 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
17705 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
17706 is a constant.
17707 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
17708 a string. Handle both cases.
17709 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
17710 (Fdbus_register_method): Use Qinvalid_function.
17711
af4c0e28
JB
177122011-05-06 Juanma Barranquero <lekktu@gmail.com>
17713
17714 * makefile.w32-in: Update dependencies.
17715 (LISP_H): Add inttypes.h and stdin.h.
17716 (PROCESS_H): Add unistd.h.
17717
c51453d9
EZ
177182011-05-06 Eli Zaretskii <eliz@gnu.org>
17719
17720 * lread.c: Include limits.h (fixes the MS-Windows build broken by
17721 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
17722
8ff0ac3c 177232011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 17724
4c4b566b
PE
17725 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
17726
aab2b9b5
PE
17727 * term.c (vfatal): Remove stray call to va_end.
17728 It's not needed and the C Standard doesn't allow it here anyway.
17729
c378da0b
PE
17730 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
17731 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
17732
288b08c7
PE
17733 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
17734 bytes.
17735
e3601888
PE
17736 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
17737
db6c0e74
PE
17738 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
17739
dd5963ea
PE
17740 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
17741
88c9450f
PE
17742 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
17743
2f9442b8
PE
17744 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
17745
c032b5f8
PE
17746 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
17747 * charset.c (Fdefine_charset_internal): Don't initialize
17748 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 17749 32-bit int (Bug#8600).
a108c10b
PE
17750
17751 * lread.c (read_integer): Be more consistent with string-to-number.
17752 Use string_to_number to do the actual conversion; this avoids
17753 rounding errors and fixes some other screwups. Without this fix,
17754 for example, #x1fffffffffffffff was misread as -2305843009213693952.
17755 (digit_to_number): Move earlier, for benefit of read_integer.
17756 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 17757 not a digit in any supported base. (Bug#8602)
a108c10b 17758
ad5f9eea
PE
17759 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
17760
aec1708a
PE
17761 * dispnew.c (scrolling_window): Return 1 if we scrolled,
17762 to match comment at start of function. This also removes a
17763 GCC warning about overflow in a 32+64-bit port.
17764
47be4ab5
PE
17765 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
17766
371cac43
PE
17767 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
17768 Reported by Stefan Monnier in
17769 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
17770 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
17771 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 17772
d01a7826
PE
17773 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
17774 (EMACS_UINTPTR): Likewise, with uintptr_t.
17775
7fd47d5c
PE
17776 * lisp.h: Prefer 64-bit EMACS_INT if available.
17777 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
17778 on 32-bit hosts that have 64-bit int, so that they can access
17779 large files.
122b0c86
PE
17780 However, temporarily disable this change unless the temporary
17781 symbol WIDE_EMACS_INT is defined.
7fd47d5c 17782
8727937b
PE
17783 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
17784
8ac068ac
PE
17785 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
17786 This removes an assumption that EMACS_INT and long are the same
17787 width as pointers. The assumption is true for Emacs porting targets
17788 now, but we want to make other targets possible.
17789 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
17790 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
17791 In the rest of the code, change types of integers that hold casted
17792 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
17793 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
17794 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
17795 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
17796 No need to cast type when ORing.
17797 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
17798 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
17799 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
17800 assume EMACS_INT is the same width as char *.
17801 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
17802 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
17803 Remove no-longer-needed casts.
17804 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
17805 (xg_tool_bar_help_callback, xg_make_tool_item):
17806 Use EMACS_INTPTR to hold an integer
17807 that will be cast to void *; this can avoid a GCC warning
17808 if EMACS_INT is not the same width as void *.
17809 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
17810 * xdisp.c (display_echo_area_1, resize_mini_window_1):
17811 (current_message_1, set_message_1):
17812 Use a local to convert to proper width without a cast.
17813 * xmenu.c (dialog_selection_callback): Likewise.
17814
ede49d71
PE
17815 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
17816 Also, don't assume VALBITS / RAND_BITS is less than 5,
17817 and don't rely on undefined behavior when shifting a 1 left into
17818 the sign bit.
17819 * lisp.h (get_random): Change signature to match.
17820
2f30ecd0
PE
17821 * lread.c (hash_string): Use size_t, not int, for hash computation.
17822 Normally we prefer signed values; but hashing is special, because
17823 it's better to use unsigned division on hash table sizes so that
17824 the remainder is nonnegative. Also, size_t is the natural width
17825 for hashing into memory. The previous code used 'int', which doesn't
17826 retain enough info to hash well into very large tables.
17827 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
17828
2a866e7b
PE
17829 * dbusbind.c: Don't possibly lose pointer info when converting.
17830 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
17831 Use XPNTR rather than XHASH, so that the high-order bits of
17832 the pointer aren't lost when converting through void *.
17833
51639eac
PE
17834 * eval.c (Fautoload): Don't double-shift a pointer.
17835
92394119
PE
17836 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
17837
dbdb9a7c
JB
178382011-05-06 Juanma Barranquero <lekktu@gmail.com>
17839
17840 * gnutls.c (DEF_GNUTLS_FN):
17841 * image.c (DEF_IMGLIB_FN): Make function pointers static.
17842
db7a0b4f
AS
178432011-05-05 Andreas Schwab <schwab@linux-m68k.org>
17844
17845 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
17846 marker. (Bug#8610)
17847
cd394be1 178482011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
17849
17850 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
17851 New version that can reserve upto 2GB of heap space.
17852
f7ff1b0f 178532011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
17854
17855 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
17856
639c109b
TZ
178572011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
17858
17859 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
17860 `gnutls_certificate_set_x509_key_file'.
17861
d2127135
JB
178622011-05-05 Juanma Barranquero <lekktu@gmail.com>
17863
17864 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
17865 Update dependencies.
17866
e968f4f3
JB
178672011-05-04 Juanma Barranquero <lekktu@gmail.com>
17868
17869 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
17870 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
17871 Remove unused parameter `fildes'.
17872 * process.c (read_process_output, send_process): Don't pass it.
17873
84d358f0
JB
178742011-05-04 Juanma Barranquero <lekktu@gmail.com>
17875
17876 Fix previous change: the library cache is defined in w32.c.
17877 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
17878 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
17879
0898ca10
JB
178802011-05-04 Juanma Barranquero <lekktu@gmail.com>
17881
17882 Implement dynamic loading of GnuTLS on Windows.
17883
17884 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
17885 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
17886 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
17887 Declare.
17888
17889 * gnutls.c (Qgnutls_dll): Define.
17890 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
17891 (gnutls_*): Declare function pointers.
17892 (init_gnutls_functions): New function to initialize function pointers.
17893 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
17894 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
17895 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
17896 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
17897 (emacs_gnutls_write, emacs_gnutls_read)
17898 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
17899 (Fgnutls_available_p): New function.
17900 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
17901 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
17902 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
17903
17904 * image.c: Include w32.h.
17905 (Vimage_type_cache): Delete.
17906 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
17907 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
17908 (w32_delayed_load): Move to w32.c.
17909
17910 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
17911
17912 * w32.c (QCloaded_from, Vlibrary_cache): Define.
17913 (w32_delayed_load): Move from image.c. When loading a library, record
17914 its filename in the :loaded-from property of the library id.
17915 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
17916 Initialize and staticpro them.
17917 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
17918
17919 * process.c: Include lisp.h before w32.h, not after.
17920 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
17921 instead of gnutls_record_check_pending.
17922
17923 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
17924
ff4de4aa
TZ
179252011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
17926
17927 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
17928 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
17929 as passed in.
17930
abe95abb
JD
179312011-05-03 Jan Djärv <jan.h.d@swipnet.se>
17932
17933 * xterm.c (x_set_frame_alpha): Do not set property on anything
17934 else than FRAME_X_OUTER_WINDOW (Bug#8608).
17935
e16e55d4
JB
179362011-05-02 Juanma Barranquero <lekktu@gmail.com>
17937
17938 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
17939
bafcf6a5
JB
179402011-05-02 Juanma Barranquero <lekktu@gmail.com>
17941
17942 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
17943 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
17944 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
17945 (gnutls_global_initialized, Qgnutls_bootprop_priority)
17946 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
17947 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
17948 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
17949 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
17950 (Qgnutls_bootprop_callbacks_verify): Make static.
17951
e7a6747f
AS
179522011-05-01 Andreas Schwab <schwab@linux-m68k.org>
17953
19ed11ba
AS
17954 * callproc.c: Indentation fixup.
17955
e7a6747f 17956 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
17957 (wait_for_termination, interruptible_wait_for_termination):
17958 Move after wait_for_termination_1.
e7a6747f 17959
1ef14cb4
LMI
179602011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
17961
17962 * sysdep.c (interruptible_wait_for_termination): New function
17963 which is like wait_for_termination, but allows keyboard
17964 interruptions.
17965
17966 * callproc.c (Fcall_process): Add (:file "file") as an option for
17967 the STDOUT buffer.
17968 (Fcall_process_region): Ditto.
17969
330d880c
EZ
179702011-04-30 Eli Zaretskii <eliz@gnu.org>
17971
8db90b73
EZ
17972 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
17973 rather than `XVECTOR (FOO)->size'.
17974
330d880c
EZ
17975 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
17976 inttypes.h, as a gnulib replacement is used if it not available in
17977 system headers.
17978
15cbd324
EZ
179792011-04-21 Eli Zaretskii <eliz@gnu.org>
17980
17981 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
17982 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
17983 of MOST_POSITIVE_FIXNUM. (Bug#8528)
17984
17985 * coding.c (coding_alloc_by_realloc): Error out if destination
17986 will grow beyond MOST_POSITIVE_FIXNUM.
17987 (decode_coding_emacs_mule): Abort if there isn't enough place in
17988 charbuf for the composition carryover bytes. Reserve an extra
17989 space for up to 2 characters produced in a loop.
17990 (decode_coding_iso_2022): Abort if there isn't enough place in
17991 charbuf for the composition carryover bytes.
17992
179932011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 17994
ae940cca
EZ
17995 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
17996 aborting when %lld or %lll format is passed.
17997 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
17998 %llo or %llx format is passed. (Bug#8545)
17999
03ab8921
EZ
18000 * window.c (window_scroll_line_based): Use a marker instead of
18001 simple variables to record original value of point. (Bug#7952)
18002
afda1437
EZ
18003 * doprnt.c (doprnt): Fix the case where a multibyte sequence
18004 produced by %s or %c overflows available buffer space. (Bug#8545)
18005
f76dee0c
PE
180062011-04-28 Paul Eggert <eggert@cs.ucla.edu>
18007
18008 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 18009 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 18010
fdc5744d
JB
180112011-04-28 Juanma Barranquero <lekktu@gmail.com>
18012
18013 * w32.c (init_environment): Warn about defaulting HOME to C:\.
18014
638f053a
JB
180152011-04-28 Juanma Barranquero <lekktu@gmail.com>
18016
18017 * keyboard.c (Qdelayed_warnings_hook): Define.
18018 (command_loop_1): Run `delayed-warnings-hook'
18019 if Vdelayed_warnings_list is non-nil.
18020 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
18021 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
18022
d178f871
EZ
180232011-04-28 Eli Zaretskii <eliz@gnu.org>
18024
18025 * doprnt.c (doprnt): Don't return value smaller than the buffer
18026 size if the message was truncated. (Bug#8545).
18027
b124fd93
JB
180282011-04-28 Juanma Barranquero <lekktu@gmail.com>
18029
18030 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
18031 (Fx_window_property): #if-0 the whole functions, not just the bodies.
18032
e810457d
PE
180332011-04-27 Paul Eggert <eggert@cs.ucla.edu>
18034
18035 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
18036
ea51cceb
JB
180372011-04-27 Juanma Barranquero <lekktu@gmail.com>
18038
18039 * makefile.w32-in: Update dependencies.
18040
94dcfacf
EZ
180412011-04-27 Eli Zaretskii <eliz@gnu.org>
18042
18043 Improve `doprnt' and its usage. (Bug#8545)
18044 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
18045 `format_end'. Remove support for %l as a conversion specifier.
18046 Don't use xrealloc. Improve diagnostics when the %l size modifier
18047 is used. Update the commentary.
18048
18049 * eval.c (verror): Simplify calculation of size_t.
18050
18051 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
18052 messages.
18053
f61f41d7
PE
180542011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
18055
18056 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
18057 change.
18058
96fb4434
PE
180592011-04-27 Paul Eggert <eggert@cs.ucla.edu>
18060
18061 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
18062 This makes this file independent of the recent pseudovector change.
18063
671875da 180642011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 18065
69e9b5a3
PE
18066 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
18067
b5f869a7 18068 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 18069 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 18070 Remove unused local.
c8926152 18071 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 18072
841a1577 18073 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
18074 GCC 4.6.0 optimizes based on type-based alias analysis.
18075 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
18076 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
18077 != &v->size, and therefore "v->size = 1; b->size = 2; return
18078 v->size;" must therefore return 1. This assumption is incorrect
18079 for Emacs, since it type-puns struct Lisp_Vector * with many other
18080 types. To fix this problem, this patch adds a new type struct
f904488f 18081 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
18082 and pseudovectors, and helps optimizing compilers not get fooled
18083 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
18084 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
18085 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
18086 the size member.
eab3844f
PE
18087 (XSETPVECTYPE): Rewrite in terms of new macro.
18088 (XSETPVECTYPESIZE): New macro, specifying both type and size.
18089 This is a bit clearer, and further avoids the possibility of
18090 undesirable aliasing.
18091 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 18092 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
18093 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
18094 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
18095 (ASIZE): Now uses header.size rather than size.
18096 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
18097 to avoid the hassle of writing XVECTOR (foo)->header.size.
18098 (struct vectorlike_header): New type.
eab3844f
PE
18099 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
18100 object, to help avoid aliasing.
18101 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
18102 (SUBRP): Likewise, since Lisp_Subr is a special case.
18103 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
18104 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
18105 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 18106 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
18107 changed to be "header.size" and "header.next".
18108 * buffer.h (struct buffer): Likewise.
18109 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
18110 * frame.h (struct frame): Likewise.
18111 * process.h (struct Lisp_Process): Likewise.
18112 * termhooks.h (struct terminal): Likewise.
18113 * window.c (struct save_window_data, struct saved_window): Likewise.
18114 * window.h (struct window): Likewise.
18115 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
18116 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
18117 * buffer.c (init_buffer_once): Likewise.
18118 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
18119 special case.
18120 * process.c (Fformat_network_address): Use local var for size,
18121 for brevity.
18122
0df1eac5
PE
18123 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
18124
847ab9d1 18125 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
18126 * data.c (atof): Remove decl; no longer used or needed.
18127 (digit_to_number): Move to lread.c.
18128 (Fstring_to_number): Use new string_to_number function, to be
18129 consistent with how the Lisp reader treats infinities and NaNs.
18130 Do not assume that floating-point numbers represent EMACS_INT
18131 without losing information; this is not true on most 64-bit hosts.
18132 Avoid double-rounding errors, by insisting on integers when
18133 parsing non-base-10 numbers, as the documentation specifies.
18134 * lisp.h (string_to_number): New decl, replacing ...
18135 (isfloat_string): Remove.
bc0a5c13 18136 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 18137 (read1): Do not accept +. and -. as integers; this
452f4150
PE
18138 appears to have been a coding error. Similarly, do not accept
18139 strings like +-1e0 as floating point numbers. Do not report
18140 overflow for integer overflows unless the base is not 10 which
18141 means we have no simple and reliable way to continue.
18142 Break out the floating-point parsing into a new
18143 function string_to_number, so that Fstring_to_number parses
18144 floating point numbers consistently with the Lisp reader.
04f2d78b 18145 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
18146 (E_CHAR, EXP_INT): Remove, replacing with ...
18147 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
18148 (string_to_number): New function, replacing isfloat_string.
18149 This function checks for valid syntax and produces the resulting
18150 Lisp float number too. Rework it so that string-to-number
bc0a5c13 18151 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
18152 so that overflow for non-base-10 numbers is reported only when
18153 there's no portable and simple way to convert to floating point.
452f4150 18154
67769ffc
PE
18155 * textprop.c (set_text_properties_1): Rewrite for clarity,
18156 and to avoid GCC warning about integer overflow.
18157
c20db43f
PE
18158 * intervals.h (struct interval): Use EMACS_INT for members
18159 where EMACS_UINT might cause problems. See
18160 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
18161 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
18162 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
18163 All uses changed.
37aa2f85
PE
18164 (offset_intervals): Tell GCC not to worry about length overflow
18165 when negating a negative length.
c20db43f 18166
2538aa2f
PE
18167 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
18168 (overrun_check_free): Likewise.
18169
f2d3008d
PE
18170 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
18171 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
18172 word size.
18173
ec8df744
PE
18174 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
18175 (gnutls_make_error): Rename local to avoid shadowing.
18176 (gnutls_emacs_global_deinit): ifdef out; not used.
18177 (Fgnutls_boot): Use const for pointer to readonly storage.
18178 Comment out unused local. Fix pointer signedness problems.
18179
640ee02d
PE
18180 * lread.c (openp): Don't stuff size_t into an 'int'.
18181 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
18182 about possible signed overflow.
18183
6048fb2a
PE
18184 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
18185 (GDK_KEY_g): Don't define if already defined.
18186 (xg_prepare_tooltip): Avoid pointer signedness problem.
18187 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
18188
fa3c87e1
PE
18189 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
18190 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
18191
2172544b
PE
18192 * xfns.c (Fx_window_property): Simplify a bit,
18193 to make a bit faster and to avoid GCC 4.6.0 warning.
18194 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
18195
9b821a21
PE
18196 * fns.c (internal_equal): Don't assume size_t fits in int.
18197
3c616cfa
PE
18198 * alloc.c (compact_small_strings): Tighten assertion a little.
18199
c2982e87
PE
18200 Replace pEd with more-general pI, and fix some printf arg casts.
18201 * lisp.h (pI): New macro, generalizing old pEd macro to other
18202 conversion specifiers. For example, use "...%"pI"d..." rather
18203 than "...%"pEd"...".
18204 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 18205 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
18206 * alloc.c (check_pure_size): Don't overflow by converting size to int.
18207 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
18208 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
18209 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
18210 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
18211 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
18212 64-bit hosts.
18213 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
18214 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
18215 * print.c (safe_debug_print, print_object): Likewise.
18216 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
18217 to int.
6f04d126
PE
18218 Use pI instead of if-then-else-abort. Use %p to avoid casts,
18219 avoiding the 0 flag, which is not portable.
c2982e87
PE
18220 * process.c (Fmake_network_process): Use pI to avoid cast.
18221 * region-cache.c (pp_cache): Likewise.
18222 * xdisp.c (decode_mode_spec): Likewise.
18223 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
18224 behavior on 64-bit hosts with printf arg.
6f04d126 18225 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
18226 (x_stop_queuing_selection_requests): Likewise.
18227 (x_get_window_property): Don't truncate byte count to an 'int'
18228 when tracing.
0b432f21 18229
5e073ec7
PE
18230 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
18231 here, since it parses constructs like leading '-' and spaces,
18232 which are not wanted; and it overflows with large numbers.
18233 Instead, simply match F[0-9]+, which is what is wanted anyway.
18234
36372bf9
PE
18235 * alloc.c: Remove unportable assumptions about struct layout.
18236 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
18237 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
18238 (allocate_vectorlike, make_pure_vector): Use the new macros,
18239 plus offsetof, to remove unportable assumptions about struct layout.
18240 These assumptions hold on all porting targets that I know of, but
18241 they are not guaranteed, they're easy to remove, and removing them
18242 makes further changes easier.
18243
0b432f21
PE
18244 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
18245 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
18246 (string_overrun_cookie): Now const. Use initializers that
18247 don't formally overflow signed char, to avoid warnings.
000098c1
PE
18248 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
18249 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
18250 (allocate_buffer): Don't assume sizeof (struct buffer) is a
18251 multiple of sizeof (EMACS_INT); it need not be, if
18252 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 18253 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 18254
895009e1
JB
182552011-04-26 Juanma Barranquero <lekktu@gmail.com>
18256
18257 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
18258
6a7a1b0b
TZ
182592011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
18260
18261 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 18262 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
18263 Reported by Paul Eggert <eggert@cs.ucla.edu>.
18264
841a1577 182652011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
18266
18267 * lisp.h (Qdebug): List symbol.
895009e1 18268 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
18269 * keyboard.c (debug-on-event): New variable.
18270 (handle_user_signal): Break into debugger when debug-on-event
18271 matches the current signal symbol.
18272
f2d3ba6f
DN
182732011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
18274
18275 * alloc.c (check_sblock, check_string_bytes)
18276 (check_string_free_list): Convert to standard C.
18277
42ce4c63
TZ
182782011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
18279
18280 * w32.c (emacs_gnutls_push): Fix typo.
18281
825cd63c
EZ
182822011-04-25 Eli Zaretskii <eliz@gnu.org>
18283
fb11d64d
EZ
18284 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
18285 "cast to pointer from integer of different size".
18286
825cd63c
EZ
18287 Improve doprnt and its use in verror. (Bug#8545)
18288 * doprnt.c (doprnt): Document the set of format control sequences
18289 supported by the function. Use SAFE_ALLOCA instead of always
18290 using `alloca'.
18291
18292 * eval.c (verror): Don't limit the buffer size at size_max-1, that
18293 is one byte too soon. Don't use xrealloc; instead xfree and
18294 xmalloc anew.
18295
e061a11b
TZ
182962011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
18297
18298 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
18299 callbacks stage.
18300
18301 * gnutls.c: Renamed global_initialized to
18302 gnutls_global_initialized. Added internals for the
18303 :verify-hostname-error, :verify-error, and :verify-flags
18304 parameters of `gnutls-boot' and documented those parameters in the
18305 docstring. Start callback support.
9173deec
JB
18306 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
18307 unless a fatal error occurred. Call gnutls_alert_send_appropriate
18308 on error. Return error code.
e061a11b
TZ
18309 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
18310 (emacs_gnutls_read): Likewise.
18311 (Fgnutls_boot): Return handshake error code.
18312 (emacs_gnutls_handle_error): New function.
18313 (wsaerror_to_errno): Likewise.
18314
18315 * w32.h (emacs_gnutls_pull): Add prototype.
18316 (emacs_gnutls_push): Likewise.
18317
18318 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
18319 (emacs_gnutls_push): Likewise.
18320
183212011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
18322
18323 * process.c (wait_reading_process_output): Check if GnuTLS
18324 buffered some data internally if no FDs are set for TLS
18325 connections.
18326
18327 * makefile.w32-in (OBJ2): Add gnutls.$(O).
18328 (LIBS): Link to USER_LIBS.
18329 ($(BLD)/gnutls.$(0)): New target.
18330
fa6996bc
EZ
183312011-04-24 Eli Zaretskii <eliz@gnu.org>
18332
eb35682e
EZ
18333 * xdisp.c (handle_single_display_spec): Rename the
18334 display_replaced_before_p argument into display_replaced_p, to
18335 make it consistent with the commentary. Fix typos in the
18336 commentary.
18337
e2ad650c
EZ
18338 * textprop.c (syms_of_textprop): Remove dead code.
18339 (copy_text_properties): Delete obsolete commentary about an
18340 interface that was deleted long ago. Fix typos in the description
18341 of arguments.
18342
1b2de274
EZ
18343 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
18344 to changes in oldXMenu/XMenu.h from 2011-04-16.
18345 <menu_help_message, prev_menu_help_message>: Constify.
18346 (IT_menu_make_room): menu->help_text is now `const char **';
18347 adjust.
18348
18349 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
18350 to changes in oldXMenu/XMenu.h from 2011-04-16.
18351 (struct XMenu): Declare `help_text' `const char **'.
18352
18353 * xfaces.c <Qunspecified>: Make extern again.
18354
18355 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 18356 required by POSIX.
1b2de274 18357
762b15be
EZ
18358 * doc.c (get_doc_string): Improve the format passed to `error'.
18359
18360 * doprnt.c (doprnt): Improve commentary.
18361
18362 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
18363
18364 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
18365 them with etags.
18366
f1052e5d
EZ
18367 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
18368 changes in globals.h immediately force recompilation.
762b15be
EZ
18369 (TAGS): Depend on $(CURDIR)/m/intel386.h and
18370 $(CURDIR)/s/ms-w32.h.
18371 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 18372
fa6996bc
EZ
18373 * character.c (Fchar_direction): Function deleted.
18374 (syms_of_character): Don't defsubr it.
18375 <char-direction-table>: Deleted.
18376
e6c3da20
EZ
183772011-04-23 Eli Zaretskii <eliz@gnu.org>
18378
18379 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
18380 * doprnt.c: Include limits.h.
18381 (SIZE_MAX): New macro.
04f2d78b
CB
18382 (doprnt): Return a size_t value. 2nd arg is now size_t.
18383 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
18384 Improve overflow protection. Support `l' modifier for integer
18385 conversions. Support %l conversion. Don't assume an EMACS_INT
18386 argument for integer conversions and for %c.
18387
18388 * lisp.h (doprnt): Restore prototype.
18389
18390 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
18391 $(SRC)/character.h.
18392
18393 * Makefile.in (base_obj): Add back doprnt.o.
18394
18395 * deps.mk (doprnt.o): Add back prerequisites.
18396 (callint.o): Depend on character.h.
18397
18398 * eval.c (internal_lisp_condition_case): Include the handler
18399 representation in the error message.
18400 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
18401 when breaking from the loop.
18402
18403 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
18404
18405 * callint.c (Fcall_interactively): When displaying error message
18406 about invalid control letter, pass the character's codepoint, not
18407 a pointer to its multibyte form. Improve display of the character
18408 in octal and display also its hex code.
18409
18410 * character.c (char_string): Use %x to display the (unsigned)
18411 codepoint of an invalid character, to avoid displaying a bogus
18412 negative value.
18413
18414 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
18415 `error', not SYMBOL_NAME itself.
18416
18417 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
18418 character arguments to `error'.
18419
18420 * charset.c (check_iso_charset_parameter): Fix incorrect argument
18421 to `error' in error message about FINAL_CHAR argument. Make sure
18422 FINAL_CHAR is a character, and use %c when it is passed as
18423 argument to `error'.
18424
4ffd0d6b 184252011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
18426
18427 * s/ms-w32.h (localtime): Redirect to sys_localtime.
18428
18429 * w32.c: Include <time.h>.
18430 (sys_localtime): New function.
18431
4ffd0d6b 184322011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
18433
18434 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
18435
4ffd0d6b 18436 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 18437
4ffd0d6b 184382011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 18439
4ffd0d6b
GM
18440 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
18441 zombies (Bug#8467).
aac0c6e3 18442
04c56954
EZ
184432011-04-19 Eli Zaretskii <eliz@gnu.org>
18444
18445 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
18446 gl_state.e_property when gl_state.object is Qt.
18447
18448 * insdel.c (make_gap_larger): Remove limitation of buffer size
18449 to <= INT_MAX.
18450
16a43933
CY
184512011-04-18 Chong Yidong <cyd@stupidchicken.com>
18452
18453 * xdisp.c (lookup_glyphless_char_display)
18454 (produce_glyphless_glyph): Handle cons cell entry in
18455 glyphless-char-display.
18456 (Vglyphless_char_display): Document it.
18457
18458 * term.c (produce_glyphless_glyph): Handle cons cell entry in
18459 glyphless-char-display.
18460
4581706e
CY
184612011-04-17 Chong Yidong <cyd@stupidchicken.com>
18462
18463 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
18464
18465 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
18466
18467 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
18468 definition for no-X builds.
18469
4887c6e2 184702011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 18471
fd35b6f9
PE
18472 Static checks with GCC 4.6.0 and non-default toolkits.
18473
5c1ccb01
PE
18474 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
18475
006c5daa
PE
18476 * process.c (keyboard_bit_set): Define only if SIGIO.
18477 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
18478 (send_process): Repair possible setjmp clobbering.
18479
efc736d3
PE
18480 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
18481
4e2fe2e6
PE
18482 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
18483
f97334a2
PE
18484 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
18485
4e75f29d
PE
18486 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
18487 Define only if needed.
18488
90efadd1
PE
18489 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
18490 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 18491 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 18492
3c647824
PE
18493 * dispextern.h (struct redisplay_interface): Rename param
18494 to avoid shadowing.
e264f262 18495 * termhooks.h (struct terminal): Likewise.
761383f4 18496 * xterm.c (xembed_send_message): Likewise.
3c647824 18497
b58c5c4a
PE
18498 * insdel.c (make_gap_smaller): Define only if
18499 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
18500
cad59032
PE
18501 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
18502 it.
18503
c339dc2e
PE
18504 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
18505 so that we aren't warned about unused symbols.
18506
91a3e27b
PE
18507 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
18508
399c71d3 18509 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 18510
8ffc96f5
PE
18511 * xfns.c (x_real_positions): Mark locals as initialized.
18512
eef9bc79
PE
18513 * xmenu.c (xmenu_show): Don't use uninitialized vars.
18514
098db9dd
PE
18515 * xterm.c: Fix problems found by static analysis with other toolkits.
18516 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
18517 (x_dispatch_event): Declare static if USE_GTK, and
18518 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 18519 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 18520 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
18521 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
18522 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 18523
eb18f6cc
PE
18524 * xmenu.c (menu_help_callback): Pointer type fixes.
18525 Use const pointers when pointing at readonly data. Avoid pointer
18526 signedness clashes.
18527 (FALSE): Remove unused macro.
18528 (update_frame_menubar): Remove unused decl.
18529
1fe72bf8
PE
18530 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
18531
60d9e1db
PE
18532 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
18533 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
18534 (single_menu_item): Rename local to avoid shadowing.
18535
39261c26
PE
18536 * keyboard.c (make_lispy_event): Remove unused local var.
18537
018c5e19
PE
18538 * frame.c, frame.h (x_get_resource_string): Bring this back, but
18539 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
18540
63d2b86e
PE
18541 * bitmaps: Change bitmaps from unsigned char back to the X11
18542 compatible char. Avoid the old compiler warnings about
18543 out-of-range initializers by using, for example, '\xab' rather
18544 than 0xab.
18545
aefd87e1
PE
18546 * xgselect.c (xgselect_initialize): Check vs interface
18547 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
18548
bf501fb9
PE
18549 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
18550
e9829fdf
PE
18551 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
18552 to read-only memory.
18553
1086c095
PE
18554 * fns.c (vector): Remove; this old hack is no longer needed.
18555
2baccd04 18556 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 18557 Remove unused var.
dde42981 18558 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 18559
72391843 18560 * xrdb.c (x_load_resources): Omit unused local.
3565b346 18561
436c16df 18562 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 18563 (x_window): Rename locals to avoid shadowing.
dc5ddd85 18564 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 18565
92bb796d 18566 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 18567 (x_term_init): Remove local to avoid shadowing.
92bb796d 18568
764430a3 18569 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
18570
18571 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
18572 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
18573
d1dfb56c
EZ
185742011-04-16 Eli Zaretskii <eliz@gnu.org>
18575
c4354cb4
EZ
18576 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
18577
d1dfb56c
EZ
18578 Fix regex.c, syntax.c and friends for buffers > 2GB.
18579 * syntax.h (struct gl_state_s): Declare character position members
18580 EMACS_INT.
18581
18582 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
18583
04f2d78b
CB
18584 * textprop.c (verify_interval_modification, interval_of):
18585 Declare arguments EMACS_INT.
d1dfb56c
EZ
18586
18587 * intervals.c (adjust_intervals_for_insertion): Declare arguments
18588 EMACS_INT.
18589
18590 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
18591
18592 * indent.c (Fvertical_motion): Local variable it_start is now
18593 EMACS_INT.
18594
18595 * regex.c (re_match, re_match_2, re_match_2_internal)
18596 (bcmp_translate, regcomp, regexec, print_double_string)
18597 (group_in_compile_stack, re_search, re_search_2, regex_compile)
18598 (re_compile_pattern, re_exec): Declare arguments and local
18599 variables `size_t' and `ssize_t' and return values `regoff_t', as
18600 appropriate.
18601 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
18602 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
18603 <compile_stack_type>: `size' and `avail' are now `size_t'.
18604
18605 * regex.h <regoff_t>: Use ssize_t, not int.
18606 (re_search, re_search_2, re_match, re_match_2): Arguments that
18607 specify buffer/string position and length are now ssize_t and
18608 size_t. Return type is regoff_t.
18609
613052cd
BK
186102011-04-16 Ben Key <bkey76@gmail.com>
18611
18612 * nsfont.m: Fixed bugs in ns_get_family and
18613 ns_descriptor_to_entity that were caused by using free to
18614 deallocate memory blocks that were allocated by xmalloc (via
18615 xstrdup). This caused Emacs to crash when compiled with
18616 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
18617 --enable-checking=xmallocoverrun). xfree is now used to
18618 deallocate these memory blocks.
18619
4170f62f 186202011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 18621
71b41406
PE
18622 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
18623
9587a89d
PE
18624 emacs_write: Accept and return EMACS_INT for sizes.
18625 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
18626 et seq.
18627 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
18628 Accept and return EMACS_INT.
18629 (emacs_gnutls_write): Return the number of bytes written on
18630 partial writes.
18631 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
18632 (emacs_read, emacs_write): Remove check for negative size, as the
18633 Emacs source code has been audited now.
9587a89d
PE
18634 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
18635 (emacs_read, emacs_write): Use it.
273a5f82
PE
18636 * process.c (send_process): Adjust to the new signatures of
18637 emacs_write and emacs_gnutls_write. Do not attempt to store
18638 a byte offset into an 'int'; it might overflow.
9587a89d 18639 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 18640
3e047f51
PE
18641 * sound.c: Don't assume sizes fit in 'int'.
18642 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 18643 Return EMACS_INT, not int.
3e047f51 18644 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
18645 Accept EMACS_INT, not int.
18646 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
18647 record read return values.
18648
cc39a9db
BK
186492011-04-15 Ben Key <bkey76@gmail.com>
18650
c9d0ec6d
JB
18651 * keyboard.c (Qundefined): Don't declare static since it is used
18652 in nsfns.m.
18653 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
18654 static since they are used in nsfont.m.
cc39a9db 18655
6c60eb9f
SM
186562011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
18657
18658 * process.c (Qprocessp): Don't declare static.
18659 * lisp.h (Qprocessp): Declare again.
18660
7990b61a
JB
186612011-04-15 Juanma Barranquero <lekktu@gmail.com>
18662
18663 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
18664
5d4cb038
PE
186652011-04-14 Paul Eggert <eggert@cs.ucla.edu>
18666
8bd7b830 18667 Improve C-level modularity by making more things 'static'.
cd64ea1d 18668
e3b27b31
PE
18669 Don't publish debugger-only interfaces to other modules.
18670 * lisp.h (safe_debug_print, debug_output_compilation_hack):
18671 (verify_bytepos, count_markers): Move decls to the only modules
18672 that need them.
18673 * region-cache.h (pp_cache): Likewise.
18674 * window.h (check_all_windows): Likewise.
18675 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
18676
5d4cb038
PE
18677 * sysdep.c (croak): Now static, if
18678 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
18679 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
18680
18681 * alloc.c (refill_memory_reserve): Now static if
18682 !defined REL_ALLOC || defined SYSTEM_MALLOC.
18683 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 18684
e87b6180
PE
18685 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
18686 Define only if USE_LUCID.
18687
ac64929e
PE
18688 * xrdb.c (x_customization_string, x_rm_string): Now static.
18689
6f37259d
PE
18690 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
18691 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
18692
1683e3ab
PE
18693 * xdisp.c (draw_row_with_mouse_face): Now static.
18694 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
18695
de9c2632
PE
18696 * window.h (check_all_windows): Mark externally visible.
18697
2b96acb7
PE
18698 * window.c (window_deletion_count): Now static.
18699
18700 * undo.c: Make symbols static if they're not exported.
18701 (last_undo_buffer, last_boundary_position, pending_boundary):
18702 Now static.
18703
50436f33
PE
18704 * textprop.c (interval_insert_behind_hooks): Now static.
18705 (interval_insert_in_front_hooks): Likewise.
18706
64520e5c
PE
18707 * term.c: Make symbols static if they're not exported.
18708 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
18709 (max_frame_lines, tty_set_terminal_modes):
18710 (tty_reset_terminal_modes, tty_turn_off_highlight):
18711 (get_tty_terminal): Now static.
18712 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
18713 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 18714 HAVE_WINDOW_SYSTEM.
64520e5c
PE
18715 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
18716 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
18717
1fa53021
PE
18718 * sysdep.c: Make symbols static if they're not exported.
18719 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
18720 Now static.
18721 (sigprocmask_set, full_mask): Remove; unused.
18722 (wait_debugging): Mark as visible.
18723 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
18724 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
18725
d4b43b22
PE
18726 * syntax.c (syntax_temp): Define only if !__GNUC__.
18727
b7c513d0
PE
18728 * sound.c (current_sound_device, current_sound): Now static.
18729
989b29ad
PE
18730 * search.c (searchbufs, searchbuf_head): Now static.
18731
13a55a78
PE
18732 * scroll.c (scroll_cost): Remove; unused.
18733 * dispextern.h (scroll_cost): Remove decl.
18734
de68a1fc
PE
18735 * region-cache.h (pp_cache): Mark as externally visible.
18736
40ccffa6
PE
18737 * process.c: Make symbols static if they're not exported.
18738 (process_tick, update_tick, create_process, chan_process):
18739 (Vprocess_alist, proc_buffered_char, datagram_access):
18740 (fd_callback_data, send_process_frame, process_sent_to): Now static.
18741 (deactivate_process): Mark defn as static, as well as decl.
18742 * lisp.h (create_process): Remove decl.
18743 * process.h (chan_process, Vprocess_alist): Remove decls.
18744
ad64fc97
PE
18745 * print.c: Make symbols static if they're not exported.
18746 (print_depth, new_backquote_output, being_printed, print_buffer):
18747 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
18748 (print_interval, print_number_index, initial_stderr_stream):
18749 Now static.
18750 * lisp.h (Fprinc): Remove decl.
18751 (debug_output_compilation_hack): Mark as externally visible.
18752
adddb265
PE
18753 * sysdep.c (croak): Move decl from here to syssignal.h.
18754 * syssignal.h (croak): Put it here, so the API can be checked when
18755 'croak' is called from dissociate_if_controlling_tty.
18756
1717ede2
PE
18757 * minibuf.c: Make symbols static if they're not exported.
18758 (minibuf_save_list, choose_minibuf_frame): Now static.
18759 * lisp.h (choose_minibuf_frame): Remove decl.
18760
fa5fb2bc
PE
18761 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
18762
1e3890d1
PE
18763 * lread.c: Make symbols static if they're not exported.
18764 (read_objects, initial_obarray, oblookup_last_bucket_number):
18765 Now static.
18766 (make_symbol): Remove; unused.
18767 * lisp.h (initial_obarray, make_symbol): Remove decls.
18768
8a1414fa
PE
18769 * keyboard.c: Make symbols static if they're not exported.
18770 (single_kboard, recent_keys_index, total_keys, recent_keys):
18771 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
18772 (this_single_command_key_start, echoing, last_auto_save):
18773 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
18774 (command_loop, echo_now, keyboard_init_hook, help_char_p):
18775 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
18776 (Vlispy_mouse_stem, double_click_count):
18777 Now static.
18778 (force_auto_save_soon): Define only if SIGDANGER.
18779 (ignore_mouse_drag_p): Now static if
18780 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
18781 (print_help): Remove; unused.
18782 (stop_character, last_timer_event): Mark as externally visible.
18783 * keyboard.h (ignore_mouse_drag_p): Declare only if
18784 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
18785 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
18786 * lisp.h (echoing): Remove decl.
18787 (force_auto_save_soon): Declare only if SIGDANGER.
18788 * xdisp.c (redisplay_window): Simplify code, to make it more
18789 obvious that ignore_mouse_drag_p is not accessed if !defined
18790 USE_GTK && !defined HAVE_NS.
18791
93ea6e8f
PE
18792 * intervals.c: Make symbols static if they're not exported.
18793 (merge_properties_sticky, merge_interval_right, delete_interval):
18794 Now static.
18795 * intervals.h (merge_interval_right, delete_interval): Remove decls.
18796
77382fcc
PE
18797 * insdel.c: Make symbols static if they're not exported.
18798 However, leave prepare_to_modify_buffer alone. It's never
18799 called from outside this function, but that appears to be a bug.
18800 (combine_after_change_list, combine_after_change_buffer):
4889fc82 18801 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
18802 (adjust_after_replace_noundo): Remove; unused.
18803 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 18804 (signal_before_change): Remove decls.
77382fcc 18805
9306c32e
PE
18806 * indent.c (val_compute_motion, val_vmotion): Now static.
18807
cd44d2eb
PE
18808 * image.c: Make symbols static if they're not exported.
18809 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
18810 if USE_GTK.
18811 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
18812 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
18813
ad9a7a06
PE
18814 * fringe.c (standard_bitmaps): Now static.
18815 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
18816
81626931
PE
18817 * frame.c: Make symbols static if they're not exported.
18818 (x_report_frame_params, make_terminal_frame): Now static.
18819 (get_frame_param): Now static, unless HAVE_NS.
18820 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
18821 (x_get_resource_string): Remove; not used.
18822 * frame.h (make_terminal_frame, x_report_frame_params):
18823 (x_get_resource_string); Remove decls.
18824 (x_fullscreen_adjust): Declare only if WINDOWSNT.
18825 * lisp.h (get_frame_param): Declare only if HAVE_NS.
18826
239f9db9
PE
18827 * font.c, fontset.c: Make symbols static if they're not exported.
18828 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
18829 (FACE_SUITABLE_FOR_CHAR_P): Use it.
18830 * font.c (font_close_object): Now static.
18831 * font.h (font_close_object): Remove.
18832 * fontset.c (FONTSET_OBJLIST): Remove.
18833 (free_realized_fontset) #if-0 the body, which does nothing.
18834 (face_suitable_for_char_p): #if-0, as it's never called.
18835 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
18836 * xfaces.c (face_at_string_position):
18837 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
18838 since 0 is always ASCII.
18839
dfcf3579
PE
18840 * fns.c (weak_hash_tables): Now static.
18841
5045092b
PE
18842 * fileio.c: Make symbols static if they're not exported.
18843 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
18844 (Vwrite_region_annotation_buffers): Now static.
18845
57a96f5c
PE
18846 * eval.c: Make symbols static if they're not exported.
18847 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
18848 * lisp.h (backtrace_list): Remove decl.
18849
35f08c38
PE
18850 * emacs.c: Make symbols static if they're not exported.
18851 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
18852 (fatal_error_code, fatal_error_signal_hook, standard_args):
18853 Now static.
18854 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
18855 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
18856 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
18857 * lisp.h (fatal_error_signal_hook): Remove decl.
18858 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
18859
f44bd759
PE
18860 * editfns.c: Move a (normally-unused) function to its only use.
18861 * editfns.c, lisp.h (get_operating_system_release): Remove.
18862 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
18863 worth the hassle of breaking this out.
18864
b532497d
PE
18865 * xterm.c: Make symbols static if they're not exported.
18866 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
18867 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
18868 (x_destroy_window, x_delete_display):
18869 Now static.
18870 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
18871 (x_mouse_leave): Remove; unused.
18872 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
18873 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
18874 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
18875 Remove decls.
18876 (x_mouse_leave): Declare only if WINDOWSNT.
18877 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
18878 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
18879 USE_X_TOOLKIT.
18880
1675728f
PE
18881 * ftxfont.c: Make symbols static if they're not exported.
18882 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
18883 HAVE_FREETYPE.
18884 * font.h (ftxfont_driver): Likewise.
18885
e4cebfca
PE
18886 * xfns.c: Make symbols static if they're not exported.
18887 (x_last_font_name, x_display_info_for_name):
18888 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
18889 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
18890 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
18891 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
18892 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
18893 (last_show_tip_args): Now static.
18894 (xic_defaut_fontset, xic_create_fontsetname): Define only if
18895 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
18896 (x_screen_planes): Remove; unused.
18897 * dispextern.h (x_screen_planes): Remove decl.
18898
5bf46f05
PE
18899 * dispnew.c: Make symbols static if they're not exported.
18900 * dispextern.h (redraw_garbaged_frames, scrolling):
18901 (increment_row_positions): Remove.
18902 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
18903 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
18904 Now static.
18905 (redraw_garbaged_frames): Remove; unused.
18906
435f4c28
PE
18907 * xfaces.c: Make symbols static if they're not exported.
18908 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
18909 Remove decls.
18910 * xterm.h (defined_color): Remove decls.
18911 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
18912 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
18913 (menu_face_changed_default, defined_color, free_realized_face):
18914 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
18915 (ascii_face_of_lisp_face): Remove; unused.
18916
8524aef3
PE
18917 * xdisp.c: Make symbols static if they're not exported.
18918 * dispextern.h (scratch_glyph_row, window_box_edges):
18919 (glyph_to_pixel_coords, set_cursor_from_row):
18920 (get_next_display_element, set_iterator_to_next):
18921 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
18922 (show_mouse_face): Remove decls
18923 * frame.h (message_buf_print): Likewise.
18924 * lisp.h (pop_message, set_message, check_point_in_composition):
18925 Likewise.
18926 * xterm.h (set_vertical_scroll_bar): Likewise.
18927 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
18928 (message_buf_print, scratch_glyph_row, displayed_buffer):
18929 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
18930 (get_next_display_element, show_mouse_face, window_box_edges):
18931 (frame_to_window_pixel_xy, check_point_in_composition):
18932 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
18933 (glyph_to_pixel_coords): Remove; unused.
18934
16390cd2
PE
18935 * dired.c (file_name_completion): Now static.
18936
18937 * dbusbind.c (xd_in_read_queued_messages): Now static.
18938
a25f4dfa
PE
18939 * lisp.h (circular_list_error, FOREACH): Remove; unused.
18940 * data.c (circular_list_error): Remove.
18941
14a9c8df
PE
18942 * commands.h (last_point_position, last_point_position_buffer):
18943 (last_point_position_window): Remove decls.
18944 * keyboard.c: Make these variables static.
18945
04f2d78b
CB
18946 * coding.h (coding, code_convert_region, encode_coding_gap):
18947 Remove decls.
74ab6df5
PE
18948 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
18949 (iso_code_class, detect_coding, code_convert_region): Now static.
18950 (encode_coding_gap): Remove; unused.
18951
38dfbee1
PE
18952 * chartab.c (chartab_chars, chartab_bits): Now static.
18953
a2cb4e63
PE
18954 * charset.h (charset_iso_8859_1): Remove decl.
18955 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
18956 Now static.
18957
127198fd
PE
18958 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
18959 * ccl.c (Vccl_program_table): Now static.
18960 (check_ccl_update): Remove; unused.
18961
d85b608f
PE
18962 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
18963 * category.h: ... from here.
18964 * category.c (check_category_table, set_category_set): Now static.
18965
31cd66f3
PE
18966 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
18967 * lisp.h: Remove these decls.
18968
c358e587
PE
18969 * buffer.c (buffer_count): Remove unused var.
18970
e78aecca
PE
18971 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
18972 so that it's not optimized away.
18973 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
18974 * dispextern.h (bidi_dump_cached_states): Remove, since it's
18975 exported only to the debugger.
18976
e192d7d3 18977 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 18978 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 18979
92470028
PE
18980 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
18981 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
18982 was inaccessible from Lisp.
18983 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
18984 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
18985
244ed907
PE
18986 alloc.c: Import and export fewer symbols, and remove unused items.
18987 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
18988 is defined.
18989 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
18990 it's not optimized away by whole-program optimization.
18991 (message_enable_multibyte, free_misc): Remove.
18992 (catchlist, handlerlist, mark_backtrace):
18993 Declare only if BYTE_MARK_STACK.
18994 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
18995 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
18996 (message_enable_multibyte): Remove decl.
18997 (free_misc, interval_free_list, float_block, float_block_index):
18998 (n_float_blocks, float_free_list, cons_block, cons_block_index):
18999 (cons_free_list, last_marked_index):
19000 Now static.
19001 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
19002 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
19003 (mark_backtrace): Define only if BYTE_MARK_STACK.
19004 * xdisp.c (message_enable_multibyte): Now static.
19005
61c2b50e 19006 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
19007 This makes it easier for human readers (and static analyzers)
19008 to see whether these variables are used from other modules.
19009 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
19010 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
19011 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
19012 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
19013 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
19014 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
19015 * xmenu.c, xselect.c:
19016 Declare Q* vars static if they are not used in other modules.
19017 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
19018 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
19019 Remove decls of unexported vars.
19020 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
19021
95c82688
PE
19022 * lisp.h (DEFINE_FUNC): Make sname 'static'.
19023
16a97296
PE
19024 Make Emacs functions such as Fatom 'static' by default.
19025 This makes it easier for human readers (and static analyzers)
19026 to see whether these functions can be called from other modules.
19027 DEFUN now defines a static function. To make the function external
19028 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
19029 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
19030 (Finit_image_library):
16a97296
PE
19031 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
19032 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
19033 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
19034 Remove decls, since these functions are now static.
19035 (Funintern, Fget_internal_run_time): New decls, since these functions
19036 were already external.
95c82688 19037
16a97296
PE
19038 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
19039 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
19040 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
19041 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
19042 * keyboard.c, keymap.c, lread.c:
19043 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
19044 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
19045 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
19046 Mark functions with DEFUE instead of DEFUN,
19047 if they are used in other modules.
19048 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
19049 decls for now-static functions.
19050 * buffer.h (Fdelete_overlay): Remove decl.
19051 * callproc.c (Fgetenv_internal): Mark as internal.
19052 * composite.c (Fremove_list_of_text_properties): Remove decl.
19053 (Fcomposition_get_gstring): New forward static decl.
19054 * composite.h (Fcomposite_get_gstring): Remove decl.
19055 * dired.c (Ffile_attributes): New forward static decl.
19056 * doc.c (Fdocumntation_property): New forward static decl.
19057 * eval.c (Ffetch_bytecode): New forward static decl.
19058 (Funintern): Remove extern decl; now in .h file where it belongs.
19059 * fileio.c (Fmake_symbolic_link): New forward static decl.
19060 * image.c (Finit_image_library): New forward static decl.
19061 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
19062 * intervals.h (Fprevious_property_change):
19063 (Fremove_list_of_text_properties): Remove decls.
19064 * keyboard.c (Fthis_command_keys): Remove decl.
19065 (Fcommand_execute): New forward static decl.
19066 * keymap.c (Flookup_key): New forward static decl.
19067 (Fcopy_keymap): Now static.
19068 * keymap.h (Flookup_key): Remove decl.
19069 * process.c (Fget_process): New forward static decl.
19070 (Fprocess_datagram_address): Mark as internal.
19071 * syntax.c (Fsyntax_table_p): New forward static decl.
19072 (skip_chars): Remove duplicate decl.
19073 * textprop.c (Fprevious_property_change): New forward static decl.
19074 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
19075 Now internal.
19076 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
19077 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
19078
785bbd42
PE
19079 * editfns.c (Fformat): Remove unreachable code.
19080
8b913b57
AS
190812011-04-14 Andreas Schwab <schwab@linux-m68k.org>
19082
19083 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
19084 change. (Bug#8496)
19085
a6744a35
EZ
190862011-04-13 Eli Zaretskii <eliz@gnu.org>
19087
19088 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
19089 when at ZV. (Bug#8487)
19090
e7974947
AS
190912011-04-12 Andreas Schwab <schwab@linux-m68k.org>
19092
baad03f0
AS
19093 * charset.c (Fclear_charset_maps): Use xfree instead of free.
19094 (Bug#8437)
19095 * keyboard.c (parse_tool_bar_item): Likewise.
19096 * sound.c (sound_cleanup, alsa_close): Likewise.
19097 * termcap.c (tgetent): Likewise.
19098 * xfns.c (x_default_font_parameter): Likewise.
19099 * xsettings.c (read_and_apply_settings): Likewise.
19100
e7974947
AS
19101 * alloc.c (overrun_check_malloc, overrun_check_realloc)
19102 (overrun_check_free): Protoize.
19103
28272684
PE
191042011-04-12 Paul Eggert <eggert@cs.ucla.edu>
19105
19106 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
19107 since callers should never pass a negative size.
19108 Change the signature to match that of plain 'read' and 'write'; see
19109 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
19110 * lisp.h: Update prototypes of emacs_write and emacs_read.
19111
11997c76
EZ
191122011-04-11 Eli Zaretskii <eliz@gnu.org>
19113
19114 * xdisp.c (redisplay_window): Don't try to determine the character
19115 position of the scroll margin if the window start point w->startp
e896f03c 19116 is outside the buffer's accessible region. (Bug#8468)
11997c76 19117
8a2cbd72
EZ
191182011-04-10 Eli Zaretskii <eliz@gnu.org>
19119
19120 Fix write-region and its subroutines for buffers > 2GB.
19121 * fileio.c (a_write, e_write): Modify declaration of arguments and
19122 local variables to support buffers larger than 2GB.
19123 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
19124
19125 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
19126 argument, local variables, and return value.
19127
19128 * lisp.h: Update prototypes of emacs_write and emacs_read.
19129
19130 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
19131
4073e537 191322011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 19133
1ebfdcb6
PE
19134 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
19135
b2ded58d
PE
19136 Fix more problems found by GCC 4.6.0's static checks.
19137
7d66342c
PE
19138 * xdisp.c (vmessage): Use a better test for character truncation.
19139
bbf47d44
PE
19140 * charset.c (load_charset_map): <, not <=, for optimization,
19141 and to avoid potential problems with integer overflow.
9248994d 19142 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 19143 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 19144 * editfns.c (Fformat): Likewise.
1e69125e 19145 * syntax.c (skip_chars): Likewise.
3befa583 19146
e3019616
PE
19147 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
19148 This also lets GCC 4.6.0 generate slightly better loop code.
19149
becfa255
PE
19150 * callint.c (Fcall_interactively): <, not <=, for optimization.
19151 (Fcall_interactively): Count the number of arguments produced,
19152 not the number of arguments given. This is simpler and lets GCC
19153 4.6.0 generate slightly better code.
19154
dae0cd48
PE
19155 * ftfont.c: Distingish more carefully between FcChar8 and char.
19156 The previous code passed unsigned char * to a functions like
19157 strlen and xstrcasecmp that expect char *, which does not
19158 conform to the C standard.
19159 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
19160 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
19161 char * when the C standard requires it.
19162
76032d70
PE
19163 * keyboard.c (read_char): Remove unused var.
19164
eb3f1cc8
PE
19165 * eval.c: Port to Windows vsnprintf (Bug#8435).
19166 Include <limits.h>.
19167 (SIZE_MAX): Define if the headers do not.
19168 (verror): Do not give up if vsnprintf returns a negative count.
19169 Instead, grow the buffer. This ports to Windows vsnprintf, which
19170 does not conform to C99. Problem reported by Eli Zaretskii.
19171 Also, simplify the allocation scheme, by avoiding the need for
19172 calling realloc, and removing the ALLOCATED variable.
19173
70476b54
PE
19174 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
19175
12020a9e
PE
19176 Remove invocations of doprnt, as Emacs now uses vsnprintf.
19177 But keep the doprint source code for now, as we might revamp it
19178 and use it again (Bug#8435).
ea6c7ae6
PE
19179 * lisp.h (doprnt): Remove.
19180 * Makefile.in (base_obj): Remove doprnt.o.
19181 * deps.mk (doprnt.o): Remove.
19182
5fdb398c
PE
19183 error: Print 32- and 64-bit integers portably (Bug#8435).
19184 Without this change, on typical 64-bit hosts error ("...%d...", N)
19185 was used to print both 32- and 64-bit integers N, which relied on
19186 undefined behavior.
61bdb816 19187 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
19188 * lisp.h (error, verror): Mark as printf-like functions.
19189 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
19190 Report overflow in size calculations when allocating printf buffer.
19191 Do not truncate output string at its first null byte.
19192 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
19193 Truncate the output at a character boundary, since vsnprintf does not
19194 do that.
19195 * charset.c (check_iso_charset_parameter): Convert internal
19196 character to string before calling 'error', since %c now has the
19197 printf meaning.
19198 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
19199 overflow when computing char to be passed to 'error'. Do not
19200 pass Lisp_Object to 'error'; pass the integer instead.
19201 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
19202 formatted with plain %d.
19203
b189fa66
PE
19204 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
19205
bff87ef0
PE
19206 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
19207
7e2cac20
PE
19208 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
19209
ce4d90b5
PE
19210 * xterm.c (x_catch_errors): Remove duplicate declaration.
19211
266c9547
PE
19212 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
19213
79c49ad2
PE
19214 * xdisp.c, lisp.h (message_nolog): Remove; unused.
19215
368f4090
JM
192162011-04-10 Jim Meyering <meyering@redhat.com>
19217
19218 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
19219 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
19220 return ssize_t not "int", and use size_t as the buffer length.
19221 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
19222 * gnutls.h: Update declarations.
19223 * process.c (read_process_output): Use ssize_t, to match.
19224 (send_process): Likewise.
19225
a32d4040
CY
192262011-04-09 Chong Yidong <cyd@stupidchicken.com>
19227
19228 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
19229
8546720e 192302011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 19231
04f2d78b
CB
19232 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
19233 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 19234
8546720e
GM
19235 * xterm.c (handle_one_xevent):
19236 * xmenu.c (create_and_show_popup_menu):
19237 * xselect.c (x_decline_selection_request)
19238 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 19239
0a2f5c1a 192402011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
19241
19242 Fix some uses of `int' instead of EMACS_INT.
19243 * search.c (string_match_1, fast_string_match)
19244 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
19245 (scan_buffer, find_next_newline_no_quit)
19246 (find_before_next_newline, search_command, Freplace_match)
19247 (Fmatch_data): Make some `int' variables be EMACS_INT.
19248
19249 * xdisp.c (display_count_lines): 3rd argument and return value now
19250 EMACS_INT. All callers changed.
19251 (pint2hrstr): Last argument is now EMACS_INT.
19252
19253 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
19254 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
19255 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
19256 (decode_coding_utf_16, decode_coding_emacs_mule)
19257 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
19258 (decode_coding_ccl, decode_coding_charset)
19259 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
19260 (decode_coding_iso_2022, decode_coding_emacs_mule)
19261 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
19262 <char_offset, last_offset>: Declare EMACS_INT.
19263 (encode_coding_utf_8, encode_coding_utf_16)
19264 (encode_coding_emacs_mule, encode_invocation_designation)
19265 (encode_designation_at_bol, encode_coding_iso_2022)
19266 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
19267 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
19268 Declare EMACS_INT.
19269 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
19270 (encode_invocation_designation): Last argument P_NCHARS is now
19271 EMACS_INT.
19272 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
19273 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
19274
19275 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
19276 All users changed.
19277
19278 * ccl.c (Fccl_execute_on_string): Declare some variables
19279 EMACS_INT.
19280
8546720e 192812011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
19282
19283 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
19284
4e19a977
CS
192852011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
19286
19287 * process.c (Fformat_network_address): Doc fix.
19288
87302331
R
192892011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
19290
ee7683eb 19291 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 19292
cbb59342
CY
192932011-04-08 Chong Yidong <cyd@stupidchicken.com>
19294
19295 * keyboard.c (read_char): Call Lisp function help-form-show,
19296 instead of using internal_with_output_to_temp_buffer.
19297 (Qhelp_form_show): New var.
e0d38eeb 19298 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
19299
19300 * print.c (internal_with_output_to_temp_buffer): Function deleted.
19301
19302 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
19303
e67a13ab
CY
193042011-04-06 Chong Yidong <cyd@stupidchicken.com>
19305
04f2d78b
CB
19306 * process.c (Flist_processes): Remove to Lisp.
19307 (list_processes_1): Delete.
e67a13ab 19308
973f782d
EZ
193092011-04-06 Eli Zaretskii <eliz@gnu.org>
19310
7c106b1e
EZ
19311 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
19312
973f782d
EZ
19313 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
19314
41cf7d1a 193152011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 19316
ca23cc88
PE
19317 Fix more problems found by GCC 4.6.0's static checks.
19318
f390e2d5
PE
19319 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
19320
42eea0d0
PE
19321 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
19322
b69769da 19323 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 19324
f9541e84
PE
19325 * xdisp.c (vmessage): Mark as a printf-like function.
19326
13841b55
PE
19327 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
19328
c136c10f
PE
19329 * sound.c (sound_warning): Don't crash if arg contains a printf format.
19330
5e2d4a30
PE
19331 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
19332 printf-like functions.
19333 (tiff_load): Add casts to remove these marks before passing them
19334 to system-supplied API.
19335
583f48b9
PE
19336 * eval.c (Fsignal): Remove excess argument to 'fatal'.
19337
b25d760e
PE
19338 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
19339 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
19340 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
19341 directly, rather than having caller test rule sign. This avoids
19342 some unnecessary tests.
19343 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
19344 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
19345 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 19346
bc7b6697 19347 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 19348 (xfont_open): Avoid unnecessary tests.
bc7b6697 19349
27ccc379
PE
19350 * composite.c (composition_gstring_put_cache): Use unsigned integer.
19351
dcd5c89a
PE
19352 * composite.h, composite.c (composition_gstring_put_cache):
19353 Use EMACS_INT, not int, for length.
19354
b13a45c6
PE
19355 * composite.h (COMPOSITION_DECODE_REFS): New macro,
19356 breaking out part of COMPOSITION_DECODE_RULE.
19357 (COMPOSITION_DECODE_RULE): Use it.
19358 * composite.c (get_composition_id): Remove unused local vars,
19359 by using the new macro.
19360
1e792e4d
PE
19361 * textprop.c (set_text_properties_1): Change while to do-while,
19362 since the condition is always true at first.
19363
dc6c6455 19364 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
19365 (interval_deletion_adjustment): Return unsigned value.
19366 All uses changed.
dc6c6455 19367
aba7731a
PE
19368 * process.c (list_processes_1, create_pty, read_process_output):
19369 (exec_sentinel): Remove vars that were set but not used.
afd4052b 19370 (create_pty): Remove unnecessary "volatile"s.
bc57d757 19371 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 19372 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 19373 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 19374
fdfc4bf3
PE
19375 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
19376
fca8fe46 19377 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 19378 (update_syntax_table): Use unsigned instead of int.
fca8fe46 19379
06a0259a 19380 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 19381 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 19382 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 19383
e7b9e80f
PE
19384 * print.c (print_error_message): Avoid int overflow.
19385
56201685
PE
19386 * font.c (font_list_entities): Redo for clarity,
19387 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
19388
78834453 19389 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 19390 (font_score): Avoid potential overflow in diff calculation.
78834453 19391
0bc0b309 19392 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 19393 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 19394
e610eaca
PE
19395 * eval.c (funcall_lambda): Rename local to avoid shadowing.
19396
b895abce
PE
19397 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
19398 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
19399 can always succeed if overflow has undefined behavior.
19400
1f1d9321 19401 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 19402 (wordify): Omit three unnecessary tests.
1f1d9321 19403
c59478bc
PE
19404 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
19405 All callers changed. This avoids the need for an unused var.
19406
79b73827
PE
19407 * casefiddle.c (casify_region): Remove var that is set but not used.
19408
a4db5dfe
PE
19409 * dired.c (file_name_completion): Remove var that is set but not used.
19410
43aae36e
PE
19411 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
19412
2a47c44d 19413 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 19414 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 19415
a37c69bf
PE
19416 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
19417 Check for integer overflow on size calculations.
19418
328ab8e7
PE
19419 * buffer.c (Fprevious_overlay_change): Remove var that is set
19420 but not used.
19421
e5a2a5cb
PE
19422 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
19423 Remove vars that are set but not used.
8d84a6eb 19424 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 19425 (timer_check_2): Mark vars as initialized.
e5a2a5cb 19426
a60e5f68
PE
19427 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
19428
f661cb61 19429 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 19430 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 19431
f0397f5a
PE
19432 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
19433 that are set but not used.
19434
8664db06 19435 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 19436 if XCreateBitmapFromData fails (Bug#8410).
8664db06 19437
6abdaa4a
PE
19438 * xselect.c (x_get_local_selection, x_handle_property_notify):
19439 Remove vars that are set but not used.
19440
0ce7538d 19441 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 19442 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 19443
9ae848fc
PE
19444 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
19445 Remove var that is set but not used.
0b918413
PE
19446 (scroll_bar_windows_size): Now size_t, not int.
19447 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
19448 Check for overflow.
9ae848fc 19449
a5a62657
PE
19450 * xfaces.c (realize_named_face): Remove vars that are set but not used.
19451 (map_tty_color) [!defined MSDOS]: Likewise.
19452
5c5cdd39
PE
19453 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
19454
66ebf983
PE
19455 * coding.c: Remove vars that are set but not used.
19456 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
19457 All callers changed.
19458 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
19459 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
19460 (decode_coding_charset): Remove vars that are set but not used.
19461
1be4d761
PE
19462 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
19463 that is set but not used.
19464
47553fa8
PE
19465 * print.c (print_object): Remove var that is set but not used.
19466
1f7196bf 19467 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
19468 The gnulib version avoids calling malloc in the usual case,
19469 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
19470 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
19471 * filelock.c (current_lock_owner): Likewise.
19472 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
19473 * sysdep.c: Include allocator.h, careadlinkat.h.
19474 (emacs_no_realloc_allocator): New static constant.
19475 (emacs_readlink): New function.
fdb61804
PE
19476 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
19477 ../lib/careadlinkat.h.
d1fdcab7 19478
f84c17c7
SM
194792011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
19480
19481 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
19482 first non-nil return value).
19483
ef3862ad
JD
194842011-04-03 Jan Djärv <jan.h.d@swipnet.se>
19485
19486 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
19487 if not defined (Bug#8403).
19488
376a7006
JB
194892011-04-02 Juanma Barranquero <lekktu@gmail.com>
19490
19491 * xdisp.c (display_count_lines): Remove parameter `start',
19492 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19493 (get_char_face_and_encoding): Remove parameter `multibyte_p',
19494 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19495 (fill_stretch_glyph_string): Remove parameters `row' and `area',
19496 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
19497 and thereabouts. All callers changed.
19498 (get_per_char_metric): Remove parameter `f', unused since
19499 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19500
6ca3801d
JM
195012011-04-02 Jim Meyering <meyering@redhat.com>
19502
19503 do not dereference NULL upon failed strdup
19504 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
19505 (ns_get_family): Likewise.
19506
d8e2b5ba
JB
195072011-04-02 Juanma Barranquero <lekktu@gmail.com>
19508
19509 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
19510
8c74fcbd
JD
195112011-04-02 Jan Djärv <jan.h.d@swipnet.se>
19512
19513 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
19514 later (Bug#8403).
19515
7200d79c
SM
195162011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
19517
03408648 19518 Add lexical binding.
7200d79c 19519
03408648
SM
19520 * window.c (Ftemp_output_buffer_show): New fun.
19521 (Fsave_window_excursion):
19522 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
19523
19524 * lread.c (lisp_file_lexically_bound_p): New function.
19525 (Fload): Bind Qlexical_binding.
19526 (readevalloop): Remove `evalfun' arg.
19527 Bind Qinternal_interpreter_environment.
19528 (Feval_buffer): Bind Qlexical_binding.
19529 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
19530 Mark as dynamic.
19531 (syms_of_lread): Declare `lexical-binding'.
19532
19533 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
19534
19535 * keyboard.c (eval_dyn): New fun.
19536 (menu_item_eval_property): Use it.
ca105506
SM
19537
19538 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 19539
03408648
SM
19540 * fns.c (concat, mapcar1): Accept byte-code-functions.
19541
19542 * eval.c (Fsetq): Handle lexical vars.
19543 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
19544 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
19545 (FletX, Flet): Obey lexical binding.
19546 (Fcommandp): Handle closures.
19547 (Feval): New `lexical' arg.
19548 (eval_sub): New function extracted from Feval. Use it almost
19549 everywhere where Feval was used. Look up vars in lexical env.
19550 Handle closures.
19551 (Ffunctionp): Move from subr.el.
19552 (Ffuncall): Handle closures.
19553 (apply_lambda): Remove `eval_flags'.
19554 (funcall_lambda): Handle closures and new byte-code-functions.
19555 (Fspecial_variable_p): New function.
19556 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
19557 but without exporting it to Lisp.
23aba0ea 19558
23aba0ea 19559 * doc.c (Fdocumentation, store_function_docstring):
03408648 19560 * data.c (Finteractive_form): Handle closures.
23aba0ea 19561
03408648
SM
19562 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
19563 interactive spec.
ba83908c 19564
04f2d78b
CB
19565 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
19566 New byte-codes.
03408648
SM
19567 (exec_byte_code): New function extracted from Fbyte_code to handle new
19568 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 19569
03408648 19570 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 19571
03408648 19572 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 19573
e2abce01
JB
195742011-03-31 Juanma Barranquero <lekktu@gmail.com>
19575
19576 * xdisp.c (redisplay_internal): Fix prototype.
19577
63696a73 195782011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 19579
63696a73 19580 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
19581 (try_scrolling): Use it when setting scroll_limit.
19582 Limit scrolling to 100 screen lines.
63696a73
EZ
19583 (redisplay_window): Even when falling back on "recentering",
19584 position point in the window according to scroll-conservatively,
19585 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
19586
19587 (try_scrolling): When point is above the window, allow searching
19588 as far as scroll_max, or one screenful, to compute vertical
19589 distance from PT to the scroll margin position. This prevents
19590 try_scrolling from unnecessarily failing when
19591 scroll-conservatively is set to a value slightly larger than the
19592 window height. Clean up the case of PT below the margin at bottom
19593 of window: scroll_max can no longer be INT_MAX. When aggressive
19594 scrolling is in use, don't let point enter the opposite scroll
19595 margin as result of the scroll.
19596 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
19597 threshold of 100 lines for never-recentering scrolling.
19598
e4cc2dfc
JB
195992011-03-31 Juanma Barranquero <lekktu@gmail.com>
19600
19601 * dispextern.h (move_it_by_lines):
19602 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
19603 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
19604 (message_log_check_duplicate): Remove parameters `prev_bol' and
19605 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19606 (redisplay_internal): Remove parameter `preserve_echo_area',
19607 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
19608
19609 * indent.c (Fvertical_motion):
19610 * window.c (window_scroll_pixel_based, Frecenter):
19611 Don't pass `need_y_p' to `move_it_by_lines'.
19612
1c470562
SM
196132011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
19614
44f230aa
SM
19615 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
19616 steal a few bits to be more compact.
19617 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
19618 Remove unneeded casts.
19619
1c470562
SM
19620 * bytecode.c (Fbyte_code): CAR and CDR can GC.
19621
888adce9
ZK
196222011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
19623
19624 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
19625 binding" message (bug#7967).
19626
f838ed7b
PE
196272011-03-30 Paul Eggert <eggert@cs.ucla.edu>
19628
77861b95
PE
19629 Fix more problems found by GCC 4.6.0's static checks.
19630
de6dbc14
PE
19631 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
19632 Remove unused local var.
19633
f838ed7b
PE
19634 * editfns.c (Fmessage_box): Remove unused local var.
19635
792c7b2b
PE
19636 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
19637 (note_mode_line_or_margin_highlight, note_mouse_highlight):
19638 Omit unused local vars.
c499e557 19639 * window.c (shrink_windows): Omit unused local var.
b01a1c29 19640 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
19641 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
19642 Omit unused local var.
19643
ba0165e1
PE
19644 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
19645 Don't assume string length fits in int.
32ad8845 19646 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 19647 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 19648
3c59b4c9
PE
19649 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
19650 instead of alloca (Bug#8344).
19651
a3eed478 19652 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 19653 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 19654
eb4d412d
PE
19655 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
19656
1658b401
PE
19657 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
19658 concerns.
19659
19660 * term.c (produce_glyphless_glyph): Remove unnecessary test.
19661
19662 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 19663
9a2c6e05
PE
19664 * keyboard.c (syms_of_keyboard): Use the same style as later
19665 in this function when indexing through an array. This also
19666 works around GCC bug 48267.
19667
03d0a109
PE
19668 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
19669
44f730c8
PE
19670 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
19671
fe75f926
PE
19672 * chartab.c (sub_char_table_ref_and_range): Redo for slight
19673 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
19674
ffa8c828
PE
19675 * keyboard.c, keyboard.h (num_input_events): Now size_t.
19676 This avoids undefined behavior on integer overflow, and is a bit
19677 more convenient anyway since it is compared to a size_t variable.
19678
c5101a77
PE
19679 Variadic C functions now count arguments with size_t, not int.
19680 This avoids an unnecessary limitation on 64-bit machines, which
19681 caused (substring ...) to crash on large vectors (Bug#8344).
19682 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
19683 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 19684 All variadic functions and their callers changed accordingly.
c5101a77
PE
19685 (struct gcpro.nvars): Now size_t, not int. All uses changed.
19686 * data.c (arith_driver, float_arith_driver): Likewise.
19687 * editfns.c (general_insert_function): Likewise.
19688 * eval.c (struct backtrace.nargs, interactive_p)
19689 (internal_condition_case_n, run_hook_with_args, apply_lambda)
19690 (funcall_lambda, mark_backtrace): Likewise.
19691 * fns.c (concat): Likewise.
19692 * frame.c (x_set_frame_parameters): Likewise.
19693 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
19694 0 if not found, not -1. All callers changed.
19695
dd3f25f7
PE
19696 * alloc.c (garbage_collect): Don't assume stack size fits in int.
19697 (stack_copy_size): Now size_t, not int.
19698 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
19699
461c2ab9
JB
197002011-03-28 Juanma Barranquero <lekktu@gmail.com>
19701
19702 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
19703 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
19704 All callers changed.
19705
19706 * lisp.h (multibyte_char_to_unibyte):
19707 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
19708 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
19709 * character.h (CHAR_TO_BYTE8):
19710 * cmds.c (internal_self_insert):
19711 * editfns.c (general_insert_function):
19712 * keymap.c (push_key_description):
19713 * search.c (Freplace_match):
19714 * xdisp.c (message_dolog, set_message_1): All callers changed.
19715
f6d62986
SM
197162011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
19717
19718 * keyboard.c (safe_run_hook_funcall): New function.
19719 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
19720 don't set the hook to nil, but remove the offending function instead.
19721 (Qcommand_hook_internal): Remove, unused.
19722 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
19723 Vcommand_hook_internal.
19724
19725 * eval.c (enum run_hooks_condition): Remove.
19726 (funcall_nil, funcall_not): New functions.
19727 (run_hook_with_args): Call each function through a `funcall' argument.
19728 Remove `cond' argument, now redundant.
19729 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
19730 (Frun_hook_with_args_until_failure): Adjust accordingly.
19731 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
19732
1db5b1ad
JB
197332011-03-28 Juanma Barranquero <lekktu@gmail.com>
19734
19735 * dispextern.h (string_buffer_position): Remove declaration.
19736
19737 * print.c (strout): Remove parameter `multibyte', unused since
19738 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
19739
19740 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
19741 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
19742 All callers changed.
19743
19744 * w32.c (_wsa_errlist): Use braces for struct initializers.
19745
19746 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
19747 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
19748 All callers changed.
19749 (string_buffer_position): Likewise. Also, make static (it's never
19750 used outside xdisp.c).
19751 (cursor_row_p): Remove parameter `w', unused since
19752 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
19753 (decode_mode_spec): Remove parameter `precision', introduced during
19754 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
19755 All callers changed.
19756
5ffb62aa
JD
197572011-03-27 Jan Djärv <jan.h.d@swipnet.se>
19758
19759 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
19760
461c2ab9 197612011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
19762
19763 * nsterm.m (ns_menu_bar_is_hidden): New variable.
19764 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
19765 (ns_update_auto_hide_menu_bar): New functions.
19766 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
19767 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
19768 ns_constrain_all_frames.
19769 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
19770 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
19771
5c380ffb
JD
197722011-03-27 Jan Djärv <jan.h.d@swipnet.se>
19773
19774 * nsmenu.m (runDialogAt): Remove argument to timer_check.
19775
9af30bdf
GM
197762011-03-27 Glenn Morris <rgm@gnu.org>
19777
19778 * syssignal.h: Replace RETSIGTYPE with void.
19779 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
19780 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
19781 Replace SIGTYPE with void everywhere.
19782 * s/usg5-4-common.h (SIGTYPE): Remove definition.
19783 * s/template.h (SIGTYPE): Remove commented out definition.
19784
e2abce01
JB
197852011-03-26 Eli Zaretskii <eliz@gnu.org>
19786
19787 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
19788 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
19789
f868cd8a
JB
197902011-03-26 Juanma Barranquero <lekktu@gmail.com>
19791
59eb0929
JB
19792 * w32.c (read_unc_volume): Use parameter `henum', instead of
19793 global variable `wget_enum_handle'.
19794
19795 * keymap.c (describe_vector): Remove parameters `indices' and
19796 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
19797 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
19798
f868cd8a
JB
19799 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
19800
19801 * keyboard.c (timer_check): Remove parameter `do_it_now',
19802 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
19803 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
19804 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
19805
19806 * keyboard.c (read_char):
19807 * w32menu.c (w32_menu_display_help):
19808 * xmenu.c (show_help_event, menu_help_callback):
19809 Adjust calls to `show_help_echo'.
19810
19811 * gtkutil.c (xg_maybe_add_timer):
19812 * keyboard.c (readable_events):
19813 * process.c (wait_reading_process_output):
19814 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
19815
19816 * insdel.c (adjust_markers_gap_motion):
19817 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
19818 (gap_left, gap_right): Don't call it.
19819
2ecf6fdb
CY
198202011-03-25 Chong Yidong <cyd@stupidchicken.com>
19821
19822 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
19823 incurred during fontification.
19824
6b1f9ba4
JB
198252011-03-25 Juanma Barranquero <lekktu@gmail.com>
19826
19827 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
19828 (DEFVAR_PER_BUFFER): Don't pass it.
19829
19830 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
19831 (scrolling_window): Don't pass it.
19832
0f4a96b5
JB
198332011-03-25 Juanma Barranquero <lekktu@gmail.com>
19834
19835 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
19836
19837 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
19838 and `suffix'.
19839 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
19840 of variables specific to SELinux and computation of `encoded_absname'.
19841
19842 * image.c (XPutPixel): Remove unused variable `height'.
19843
19844 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
19845
19846 * unexw32.c (get_section_info): Remove unused variable `section'.
19847
19848 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
19849 (system_process_attributes): Remove unused variable `sess'.
19850 (sys_read): Remove unused variable `err'.
19851
19852 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
19853 (w32_wnd_proc): Remove unused variable `isdead'.
19854 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
19855 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
19856 (x_create_tip_frame): Remove unused variable `tem'.
19857
19858 * w32inevt.c (w32_console_read_socket):
19859 Remove unused variable `no_events'.
19860
19861 * w32term.c (x_draw_composite_glyph_string_foreground):
19862 Remove unused variable `width'.
19863
1149507c
JB
198642011-03-24 Juanma Barranquero <lekktu@gmail.com>
19865
19866 * w32term.c (x_set_glyph_string_clipping):
19867 Don't pass uninitialized region to CombineRgn.
19868
9c88f339
JB
198692011-03-23 Juanma Barranquero <lekktu@gmail.com>
19870
19871 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
19872 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
19873 (Fx_close_connection): Remove unused variable `i'.
19874
19875 * w32font.c (w32font_draw): Return number of glyphs.
19876 (w32font_open_internal): Remove unused variable `i'.
19877 (w32font_driver): Add missing initializer.
19878
19879 * w32menu.c (utf8to16): Remove unused variable `utf16'.
19880 (fill_in_menu): Remove unused variable `items_added'.
19881
19882 * w32term.c (last_mouse_press_frame): Remove static global variable.
19883 (w32_clip_to_row): Remove unused variable `f'.
19884 (x_delete_terminal): Remove unused variable `i'.
19885
19886 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
19887 (NOTHING): Remove unused static global variable.
19888 (uniscribe_check_otf): Remove unused variable `table'.
19889 (uniscribe_font_driver): Add missing initializers.
19890
dee091a3
JD
198912011-03-23 Julien Danjou <julien@danjou.info>
19892
19893 * term.c (Fsuspend_tty, Fresume_tty):
19894 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
19895 * window.c (temp_output_buffer_show):
19896 * insdel.c (signal_before_change):
19897 * frame.c (Fhandle_switch_frame):
19898 * fileio.c (Fdo_auto_save):
19899 * emacs.c (Fkill_emacs):
19900 * editfns.c (save_excursion_restore):
19901 * cmds.c (internal_self_insert):
19902 * callint.c (Fcall_interactively):
19903 * buffer.c (Fkill_all_local_variables):
19904 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
19905 Use Frun_hooks.
0f4a96b5 19906 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 19907 unconditionally since it does the check itself.
dee091a3 19908
2c520ab5 199092011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 19910
c9c49752
PE
19911 Fix more problems found by GCC 4.5.2's static checks.
19912
8abc3f12
PE
19913 * coding.c (encode_coding_raw_text): Avoid unnecessary test
19914 the first time through the loop, since we know p0 < p1 then.
19915 This also avoids a gcc -Wstrict-overflow warning.
19916
a2d26660
PE
19917 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
19918 leading to a memory leak, possible in functions like
19919 load_charset_map_from_file that can allocate an unbounded number
b12ef411 19920 of objects (Bug#8318).
a2d26660 19921
916c72e9
PE
19922 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
19923 that could (at least in theory) be that large.
19924
19ab8a18
PE
19925 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
19926 This is less likely to overflow, and avoids undefined behavior if
19927 overflow does occur. All callers changed. Use strtoul to scan
19928 for the unsigned long integer.
b7cbbd6f
PE
19929 (pint2hrstr): Simplify and tune code slightly.
19930 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 19931
f0641eff
PE
19932 * scroll.c (do_scrolling): Work around GCC bug 48228.
19933 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
19934
7f650bb9
PE
19935 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
19936 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
19937 (validate_x_resource_name): Simplify count usage.
19938 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 19939
37dd57d1
PE
19940 * fileio.c (Fcopy_file): Report error if fchown or fchmod
19941 fail (Bug#8306).
81e56e61 19942
699979fc 19943 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 19944
401bf9b4
PE
19945 * process.c (Fmake_network_process): Use socklen_t, not int,
19946 where POSIX says socklen_t is required in portable programs.
19947 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 19948 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
19949 (Fmake_network_process, server_accept_connection):
19950 (wait_reading_process_output, read_process_output):
19951 Likewise.
19952
b93aacde
PE
19953 * process.c: Rename or move locals to avoid shadowing.
19954 (list_processes_1, Fmake_network_process):
19955 (read_process_output_error_handler, exec_sentinel_error_handler):
19956 Rename or move locals.
4dc343ee 19957 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 19958 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 19959 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 19960 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 19961 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 19962
af8a867c 19963 Make tparam.h and terminfo.c consistent.
44f230aa
SM
19964 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
19965 Include tparam.h instead, since it declares them.
af8a867c
PE
19966 * cm.h (PC): Remove extern decl; tparam.h now does this.
19967 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
19968 * terminfo.c: Include tparam.h, to check interfaces.
19969 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
19970 (tparam): Adjust signature to match interface in tparam.h;
19971 this removes some undefined behavior. Check that outstring and len
19972 are zero, which they always are with Emacs.
19973 * tparam.h (PC, BC, UP): New extern decls.
19974
0248044d 19975 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 19976 (xftfont_open): Rename locals to avoid shadowing.
0248044d 19977
8ff096c1 19978 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
19979 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
19980 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 19981 (ftfont_list): Remove unused local.
49eaafba
PE
19982 (get_adstyle_property, ftfont_pattern_entity):
19983 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
19984 Rename locals to avoid shadowing.
8ff096c1 19985
e2be39f6
PE
19986 * xfont.c (xfont_list_family): Mark var as initialized.
19987
c9735e30
PE
19988 * xml.c (make_dom): Now static.
19989
8f5201ae
PE
19990 * composite.c (composition_compute_stop_pos): Rename local to
19991 avoid shadowing.
b246f932
PE
19992 (composition_reseat_it): Remove unused locals.
19993 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 19994 (composition_update_it): Mark var as initialized.
11b61122
PE
19995 (find_automatic_composition): Mark vars as initialized,
19996 with a FIXME (Bug#8290).
8f5201ae 19997
760fbc2c
PE
19998 character.h: Rename locals to avoid shadowing.
19999 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
20000 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
20001 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
20002 (BUF_DEC_POS): Be more systematic about renaming local temporaries
20003 to avoid shadowing.
20004
ff08eb85
PE
20005 * textprop.c (property_change_between_p): Remove; unused.
20006
fc7bf025
PE
20007 * intervals.c (interval_start_pos): Now static.
20008
235d7abc
PE
20009 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
20010
44f230aa
SM
20011 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
20012 Rename locals to avoid shadowing.
3e7d6594 20013
50060332
PE
20014 * sound.c (wav_play, au_play, Fplay_sound_internal):
20015 Fix pointer signedness.
d01f234b 20016 (alsa_choose_format): Remove unused local var.
c83b8872
PE
20017 (wav_play): Initialize a variable to 0, to prevent undefined
20018 behavior (Bug#8278).
50060332 20019
c4fc4e30
PE
20020 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
20021
918436ed
PE
20022 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
20023
c939f91b
PE
20024 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
20025 clobbering (Bug#8298).
b9c7f648
PE
20026 * sysdep.c (sys_subshell): Likewise.
20027 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 20028
6bd8c144
PE
20029 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
20030 This should get cleaned up, so that child_setup has the
20031 same signature on all platforms.
20032
7710357c 20033 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 20034 (relocate_fd): Rename locals to avoid shadowing.
7710357c 20035
c59da222
CY
200362011-03-22 Chong Yidong <cyd@stupidchicken.com>
20037
20038 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
20039 not to be necessary, and produces flickering.
20040
66b87493
GM
200412011-03-20 Glenn Morris <rgm@gnu.org>
20042
20043 * config.in: Remove file.
20044
45b6f6d5
JB
200452011-03-20 Juanma Barranquero <lekktu@gmail.com>
20046
20047 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
20048 are now in src/globals.h.
20049 (syms_of_minibuf): Remove spurious & from previous change.
20050
cd394be1 200512011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
20052
20053 * minibuf.c (completing-read-function): New variable.
20054 (completing-read-default): Rename from completing-read.
20055 (completing-read): Call completing-read-function.
20056
b14e3e21
CY
200572011-03-19 Juanma Barranquero <lekktu@gmail.com>
20058
20059 * xfaces.c (Fx_load_color_file):
20060 Read color file from absolute filename (bug#8250).
20061
f2b726e6
JB
200622011-03-19 Juanma Barranquero <lekktu@gmail.com>
20063
20064 * makefile.w32-in: Update dependencies.
20065
09f6ff02
EZ
200662011-03-17 Eli Zaretskii <eliz@gnu.org>
20067
20068 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
20069
29a6015a
PE
200702011-03-17 Paul Eggert <eggert@cs.ucla.edu>
20071
a3a6c54e
PE
20072 Fix more problems found by GCC 4.5.2's static checks.
20073
b766f867
PE
20074 * process.c (make_serial_process_unwind, send_process_trap):
20075 (sigchld_handler): Now static.
20076
be02381c
PE
20077 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
20078 That way, the code declares only the vars that it needs.
20079 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
20080 * s/cygwin.h (PTY_ITERATION): Likewise.
20081 * s/darwin.h (PTY_ITERATION): Likewise.
20082 * s/gnu-linux.h (PTY_ITERATION): Likewise.
20083
57048744
PE
20084 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
20085 * process.c (allocate_pty): Don't declare stb unless it's needed.
20086
7914961c 20087 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
20088 (CONSTANTLIM): Remove; unused.
20089 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
20090 Define only if needed.
7914961c 20091
b3967b18
PE
20092 * unexelf.c (unexec): Name an expression,
20093 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
20094 Use a different way to cause a compilation error if anyone uses
20095 n rather than nn, a way that does not involve shadowing.
73366a00 20096 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 20097
29a6015a
PE
20098 * deps.mk (unexalpha.o): Remove; unused.
20099
43cfc33e 20100 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 20101 * unexec.h: New file.
ce701a33
PE
20102 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
20103 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
20104 Depend on unexec.h.
20105 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
20106 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
20107 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 20108 Change as necessary to match prototype in unexec.h.
ce701a33 20109
01f44d5a
PE
20110 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
20111 shadowing.
4f63c6bb 20112 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 20113
a6670b0b
PE
20114 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
20115 Rename locals to avoid shadowing.
20116
cef2010d 20117 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 20118 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 20119
d4d7173a
PE
20120 * print.c (Fredirect_debugging_output): Fix pointer signedess.
20121
f08b802a
PE
20122 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
20123 warning when compiling print.c.
20124
3ddb0639
PE
20125 * font.c (font_unparse_fcname): Abort in an "impossible" situation
20126 instead of using an uninitialized var.
5ad03b97 20127 (font_sort_entities): Mark var as initialized.
3ddb0639 20128
170a2692
PE
20129 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
20130
e663c700
PE
20131 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
20132 pointers to constants.
89bc529a 20133 (font_parse_fcname): Remove unused vars.
7b81e2d0 20134 (font_delete_unmatched): Now static.
ea838e10 20135 (font_get_spec): Remove; unused.
13a547c6
PE
20136 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
20137 (font_update_drivers, Ffont_get_glyphs, font_add_log):
20138 Rename or move locals to avoid shadowing.
e663c700 20139
2a80c887 20140 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 20141 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 20142
1384fa33 20143 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 20144 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 20145
8b2c52e9
PE
20146 * alloc.c (mark_backtrace): Move decl from here ...
20147 * lisp.h: ... to here, so that it can be checked.
20148
475545b5 20149 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 20150 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
20151 (lisp_indirect_variable): Name an expression,
20152 to avoid gcc -Wbad-function-cast warning.
1faed8ae 20153 (Fdefvar): Rename locals to avoid shadowing.
475545b5 20154
b1349114 20155 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 20156 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 20157 Use const pointer when appropriate.
b1349114 20158
a2928364
PE
20159 * lisp.h (get_system_name, get_operating_system_release):
20160 Move decls here, to check interfaces.
20161 * process.c (get_operating_system_release): Move decl to lisp.h.
20162 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
20163 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
20164 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
20165 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
20166 (Fformat_time_string, Fencode_time, Finsert_char):
20167 (Ftranslate_region_internal, Fformat):
20168 Rename or remove local vars to avoid shadowing.
9710023e 20169 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 20170
a415e694
PE
20171 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
20172 avoid shadowing.
20173
8ef4622d
PE
20174 * lisp.h (eassert): Check that the argument compiles, even if
20175 ENABLE_CHECKING is not defined.
20176
946f9a5b
PE
20177 * data.c (Findirect_variable): Name an expression, to avoid
20178 gcc -Wbad-function-cast warning.
112396d6 20179 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 20180 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
20181 (Fmake_variable_buffer_local, Fmake_local_variable):
20182 Mark variables as initialized.
52746918 20183 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 20184
e5aab7e7 20185 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
20186 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
20187 Rename locals to avoid shadowing.
dff45157
PE
20188 (mark_stack): Move local variables into the #ifdef region where
20189 they're used.
7bc26fdb
PE
20190 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
20191 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
20192 needed otherwise.
20193 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
20194 (GC_STRING_CHARS): Remove; not used.
d40d4be1 20195 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 20196
e5aab7e7
PE
20197 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
20198 avoids undefined behavior in theory.
20199
4da60324
PE
20200 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
20201
88043301
PE
20202 Use functions, not macros, for up- and down-casing (Bug#8254).
20203 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20204 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
20205 to use the following functions instead of these macros.
20206 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
20207 EMACS_INT, since callers assume the returned value fits in int.
20208 (upcase1): Likewise, for UPCASE_TABLE.
20209 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 20210 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 20211 the race-condition problem in the old DOWNCASE.
88043301 20212
19ed5445
PE
20213 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
20214 Rename locals to avoid shadowing.
20215 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
20216 (regex_compile, re_search_2, re_match_2_internal):
20217 Remove unused local vars.
952db0d7
PE
20218 (FREE_VAR): Rewrite so as not to use empty "else",
20219 which gcc can warn about.
da053e48 20220 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
20221 (RETALLOC_IF): Define only if needed.
20222 (WORDCHAR_P): Likewise. This one is never needed, but is used
20223 only in a comment talking about a compiler bug, so put inside
20224 the #if 0 of that comment.
20225 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
20226 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
20227 Remove; unused.
19ed5445 20228
1f3561e4 20229 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
20230 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
20231 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 20232
ded6f8f7
PE
20233 * search.c (simple_search): Remove unused var.
20234
dbd37a95
PE
20235 * dired.c (compile_pattern): Move decl from here ...
20236 * lisp.h: ... to here, so that it can be checked.
20237 (struct re_registers): New forward decl.
20238
7e47afad
PE
20239 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
20240
85f24f61
PE
20241 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
20242 All uses changed.
20243 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
20244 Rename locals to avoid shadowing.
5671df8f 20245 (Fvertical_motion): Mark locals as initialized.
85f24f61 20246
181aa2be 20247 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 20248 (casify_region): Mark local as initialized.
181aa2be 20249
930d429c
PE
20250 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
20251
7082eac6
PE
20252 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
20253 New macros, so that the caller can use some names other than
20254 gcpro1, gcpro2, etc.
20255 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
20256 of the new macros.
20257 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
20258 argument, for consistency with GCPRO2_VAR, etc: it is now the
20259 prefix of the variable, not the variable itself. All uses
20260 changed.
38b2c076
PE
20261 * dired.c (directory_files_internal, file_name_completion):
20262 Rename locals to avoid shadowing.
20263
15206ed9
PE
20264 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
20265 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
20266 dired.c's scmp function, had undefined behavior.
20267 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20268 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
20269 * buffer.h: ... to here, because these macros use current_buffer,
20270 and the new implementation with inline functions needs to have
20271 current_buffer in scope now, rather than later when the macros
20272 are used.
20273 (downcase, upcase1): New static inline functions.
20274 (DOWNCASE, UPCASE1): Reimplement using these functions.
20275 This avoids undefined behavior in expressions like
20276 DOWNCASE (x) == DOWNCASE (y), which previously suffered
20277 from race conditions in accessing the global variables
20278 case_temp1 and case_temp2.
20279 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
20280 * lisp.h (case_temp1, case_temp2): Remove their decls.
20281 * character.h (ASCII_CHAR_P): Move from here ...
20282 * lisp.h: ... to here, so that the inline functions mentioned
20283 above can use them.
20284
4a6bea26
PE
20285 * dired.c (directory_files_internal_unwind): Now static.
20286
f14b7e14
PE
20287 * fileio.c (file_name_as_directory, directory_file_name):
20288 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
20289 Now static.
2893f146
PE
20290 (file_name_as_directory): Use const pointers when appropriate.
20291 (Fexpand_file_name): Likewise. In particular, newdir might
20292 point at constant storage, so make it a const pointer.
fd4ead52 20293 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
20294 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
20295 signedness issues.
f839df0c
PE
20296 (Fset_file_times, Finsert_file_contents, auto_save_error):
20297 Rename locals to avoid shadowing.
f14b7e14 20298
5716756e 20299 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
20300 (Ftry_completion, Fall_completions): Rename or remove locals
20301 to avoid shadowing.
5716756e 20302
b4c3046a
PE
20303 * marker.c (bytepos_to_charpos): Remove; unused.
20304
b45db522
PE
20305 * lisp.h (verify_bytepos, count_markers): New decls,
20306 so that gcc does not warn that these functions aren't declared.
20307
85876d07
PE
20308 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
20309 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 20310 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 20311 (copy_text): Remove unused local var.
85876d07 20312
03d78a21 20313 * filelock.c (within_one_second): Now static.
b3dd38ab 20314 (lock_file_1): Rename local to avoid shadowing.
03d78a21 20315
5df8f01b
PE
20316 * buffer.c (fix_overlays_before): Mark locals as initialized.
20317 (fix_start_end_in_overlays): Likewise. This function should be
20318 simplified by using pointers-to-pointers, but that's a different
20319 matter.
b1d876f1 20320 (switch_to_buffer_1): Now static.
8f54f30a
PE
20321 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
20322 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 20323
a70072c9 20324 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 20325 Fix pointer signedness issue.
edced198
PE
20326 (sys_subshell): Mark local as volatile if checking for lint,
20327 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 20328 (MAXPATHLEN): Define only if needed.
a70072c9 20329
a0977c44
PE
20330 * process.c (serial_open, serial_configure): Move decls from here ...
20331 * systty.h: ... to here, so that they can be checked.
20332
a884fdcc
PE
20333 * fns.c (get_random, seed_random): Move extern decls from here ...
20334 * lisp.h: ... to here, so that they can be checked.
20335
604efe86 20336 * sysdep.c (reset_io): Now static.
b8950c94 20337 (wait_for_termination_signal): Remove; unused.
604efe86 20338
38fc62d9
PE
20339 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
20340 (copy_keymap_item, append_key, push_text_char_description):
20341 Now static.
1004a21a 20342 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 20343 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
20344 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
20345 (describe_map_tree):
20346 Rename locals to avoid shadowing.
38fc62d9 20347
2f2650da
PE
20348 * keyboard.c: Declare functions static if they are not used elsewhere.
20349 (echo_char, echo_dash, cmd_error, top_level_2):
20350 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
20351 (read_char, kbd_buffer_get_event, make_lispy_position):
20352 (make_lispy_event, make_lispy_movement, apply_modifiers):
20353 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
20354 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
20355 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 20356 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 20357 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 20358
a053e86c 20359 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
20360 (mark_kboards): Move decl here ...
20361 * alloc.c (mark_kboards): ... from here.
a053e86c 20362
4752793e
PE
20363 * lisp.h (force_auto_save_soon): New decl.
20364
74f10ca7 20365 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
20366 (DEFINE_DUMMY_FUNCTION): New macro.
20367 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
20368 Use it.
c03cd23f
PE
20369 (main): Add casts to avoid warnings
20370 if GCC considers string literals to be constants.
74f10ca7 20371
022e70d4
PE
20372 * lisp.h (fatal_error_signal): Add decl, since it's exported.
20373
59d6fe83
PE
20374 * dbusbind.c: Pointer signedness fixes.
20375 (xd_signature, xd_append_arg, xd_initialize):
20376 (Fdbus_call_method, Fdbus_call_method_asynchronously):
20377 (Fdbus_method_return_internal, Fdbus_method_error_internal):
20378 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
20379 (Fdbus_register_signal): Use SSDATA when the context wants char *.
20380
78320123
PE
20381 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
20382 if GCC considers string literals to be constants.
49cebcca 20383 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 20384
35ac2a97
SM
203852011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
20386
fb103ca9
SM
20387 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
20388 (print_preprocess, print_object): New macro to fix last change.
20389
35ac2a97
SM
20390 * print.c (print_preprocess): Don't forget font objects.
20391
62973b41
JB
203922011-03-16 Juanma Barranquero <lekktu@gmail.com>
20393
20394 * emacs.c (USAGE3): Doc fixes.
20395
0e48bb22
AS
203962011-03-15 Andreas Schwab <schwab@linux-m68k.org>
20397
20398 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
20399 structure.
20400
7684e57b
JB
204012011-03-14 Juanma Barranquero <lekktu@gmail.com>
20402
20403 * lisp.h (VWindow_system, Qfile_name_history):
20404 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
20405 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
20406 (w32_system_caret_x, w32_system_caret_y): Declare extern.
20407
20408 * w32select.c: Don't #include "keyboard.h".
c96bbc66 20409 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
20410
20411 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
20412 * w32console.c (detect_input_pending, read_input_pending)
20413 (encode_terminal_code):
20414 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
20415 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
20416 (w32_system_caret_y, Qfile_name_history):
20417 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
20418 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
20419 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
20420 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
20421 * w32proc.c (Qlocal, report_file_error):
20422 * w32term.c (Vwindow_system, updating_frame):
20423 * w32uniscribe.c (initialized, uniscribe_font_driver):
20424 Remove unneeded extern declarations.
20425
2aa46d6c
CY
204262011-03-14 Chong Yidong <cyd@stupidchicken.com>
20427
c96bbc66 20428 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 20429
cffc6f3b
CY
204302011-03-13 Chong Yidong <cyd@stupidchicken.com>
20431
20432 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
20433 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
20434 These macros can no longer be used for assignment.
20435
44f230aa
SM
20436 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
20437 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
20438 (record_buffer_markers, fetch_buffer_markers): New functions for
20439 recording and fetching special buffer markers.
20440 (set_buffer_internal_1, set_buffer_temp): Use them.
20441
20442 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
20443
20444 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
20445
20446 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
20447 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
20448
20449 * xdisp.c (hscroll_window_tree):
20450 (reconsider_clip_changes): Use PT instead of BUF_PT.
20451
d251f04b
EZ
204522011-03-13 Eli Zaretskii <eliz@gnu.org>
20453
20454 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
20455 $(EMACS_ROOT)/lib/intprops.h.
20456
f0c77cd1
PE
204572011-03-13 Paul Eggert <eggert@cs.ucla.edu>
20458
3eca4629
PE
20459 Fix more problems found by GCC 4.5.2's static checks.
20460
7c86ee98
PE
20461 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
20462 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
20463 (xg_free_frame_widgets): Make it clear that a local variable is
20464 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
20465 (gdk_window_get_screen): Make it clear that this macro is needed
20466 only if USE_GTK_TOOLTIP.
1e5524e7
PE
20467 (int_gtk_range_get_value): New function, which avoids a diagnostic
20468 from gcc -Wbad-function-cast.
20469 (xg_set_toolkit_scroll_bar_thumb): Use it.
20470 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
20471 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
20472 (get_utf8_string, xg_get_file_with_chooser):
20473 Rename locals to avoid shadowing.
20474 (create_dialog): Move locals to avoid shadowing.
7c86ee98 20475
41729b81
PE
20476 * xgselect.c (xg_select): Remove unused var.
20477
f0c77cd1
PE
20478 * image.c (four_corners_best): Mark locals as initialized.
20479 (gif_load): Initialize transparent_p to zero (Bug#8238).
20480 Mark another local as initialized.
ec6cf4c6 20481 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 20482
ce0ad53d 20483 * image.c (clear_image_cache): Now static.
d5d5a617 20484 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 20485 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
20486 (x_edge_detection): Remove unnecessary cast that
20487 gcc -Wbad-function-cast diagnoses.
2037898d 20488 (gif_load): Fix pointer signedness.
6ae141d6
PE
20489 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
20490 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 20491
33383987 204922011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 20493
d32df629
PE
20494 Improve quality of tests for time stamp overflow.
20495 For example, without this patch (encode-time 0 0 0 1 1
20496 1152921504606846976) returns the obviously-bogus value (-948597
20497 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
20498 reports time overflow. See
20499 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
20500 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
20501 * editfns.c: Include limits.h and intprops.h.
20502 (TIME_T_MIN, TIME_T_MAX): New macros.
20503 (time_overflow): Move earlier, to before first use.
20504 (hi_time, lo_time): New functions, for an accurate test for
20505 out-of-range times.
20506 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
20507 (Fget_internal_run_time): Don't assume time_t fits in int.
20508 (make_time): Use list2 instead of Fcons twice.
20509 (Fdecode_time): More accurate test for out-of-range times.
20510 (check_tm_member): New function.
20511 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
20512 (lisp_time_argument): Don't rely on undefined left-shift and
20513 right-shift behavior when checking for time stamp overflow.
8be6f318 20514
fe31d94c
PE
20515 * editfns.c (time_overflow): New function, refactoring common code.
20516 (Fformat_time_string, Fdecode_time, Fencode_time):
20517 (Fcurrent_time_string): Use it.
20518
8be6f318
PE
20519 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
20520 * dired.c (make_time): Move to ...
20521 * editfns.c (make_time): ... here.
20522 * systime.h: Note the move.
20523
09d9db2c 205242011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 20525
126bc0dc
YM
20526 * fringe.c (update_window_fringes): Remove unused variables.
20527
c47cbdfd
YM
20528 * unexmacosx.c (copy_data_segment): Also copy __got section.
20529 (Bug#8223)
20530
7ac80be9
EZ
205312011-03-12 Eli Zaretskii <eliz@gnu.org>
20532
c96bbc66 20533 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
20534 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
20535 Constify `char *' arguments and their references according to
20536 prototypes in tparam.h.
20537
ecb0f94d 20538 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 20539
7ac80be9
EZ
20540 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
20541 Adapt all references accordingly.
20542
20543 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
20544
ef1fd07e
TT
205452011-03-11 Tom Tromey <tromey@redhat.com>
20546
20547 * buffer.c (syms_of_buffer): Remove obsolete comment.
20548
7ef4b50c
EZ
205492011-03-11 Eli Zaretskii <eliz@gnu.org>
20550
20551 * termhooks.h (encode_terminal_code): Declare prototype.
20552
20553 * msdos.c (encode_terminal_code): Don't declare prototype.
20554
20555 * term.c (encode_terminal_code): Now external again, used by
20556 w32console.c and msdos.c.
20557
44f230aa
SM
20558 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
20559 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 20560
4b1ec863 205612011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 20562
1714f52b 20563 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 20564
4b1ec863
PE
20565 * fringe.c (update_window_fringes): Mark locals as initialized
20566 (Bug#8227).
20567 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 20568
524c7aa6
PE
20569 * alloc.c (mark_fringe_data): Move decl from here ...
20570 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
20571 to check its interface.
20572 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
20573
a5c0af81 20574 * fontset.c (free_realized_fontset): Now static.
7519b8cd 20575 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 20576 (fontset_font): Mark local as initialized.
a9a06e0b 20577 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 20578
b4716021
PE
20579 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
20580
811e9bac 20581 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 20582 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
20583 (x_own_selection, Fx_disown_selection_internal): Rename locals
20584 to avoid shadowing.
20585 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 20586
7e3ab302
PE
20587 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
20588 so that the caller can use some name other than gcpro1.
20589 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
20590 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20591 (Fx_backspace_delete_keys_p):
20592 Use them to avoid shadowing, and rename vars to avoid shadowing.
20593 (x_decode_color, x_set_name, x_window): Now static.
6b437900 20594 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 20595 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
20596 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
20597 Remove unused locals.
7e3ab302
PE
20598 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20599 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
20600 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
20601 macros.
f78faa98 20602
e2b13473
PE
20603 * xterm.h (x_mouse_leave): New decl.
20604
77f23912
PE
20605 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
20606 Remove unused functions.
cdf4ba58
PE
20607 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
20608 (x_calc_absolute_position): Now static.
7411c686 20609 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 20610 Don't declare local "event" unless it's used.
ed7bf3a5
PE
20611 (x_iconify_frame, x_free_frame_resources): Don't declare locals
20612 unless they are used.
38d0b34a
PE
20613 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
20614 (x_fatal_error_signal): Remove; not used.
a6067996
PE
20615 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
20616 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
20617 (x_error_catcher, x_connection_closed, x_error_handler):
20618 (x_error_quitter, xembed_send_message, x_iconify_frame):
20619 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 20620 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 20621 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 20622
44f230aa
SM
20623 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
20624 Rename or move locals to avoid shadowing.
6b463e58 20625 (tty_defined_color, merge_face_heights): Now static.
5967d051 20626 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
20627 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
20628 does not deduce is never used uninitialized.
73719eba
PE
20629 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
20630 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 20631
426994c3 20632 * terminal.c (store_terminal_param): Now static.
5489860b 20633
032f1620 20634 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 20635 (set_frame_menubar): Remove unused local.
d4323972 20636 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
20637 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
20638 since they might point to immutable storage.
281585b0
PE
20639 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
20640 since it's unused otherwise.
032f1620 20641
367c19e5 20642 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 20643 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
20644 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
20645 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 20646 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
20647 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
20648 does not deduce are never used uninitialized.
70739cbe 20649
07b48fa9
PE
20650 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
20651
8868a238 20652 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
20653 * window.c (window_loop, size_window):
20654 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 20655
7e5cf297 20656 * window.c (display_buffer): Now static.
d6550a9f
PE
20657 (size_window): Mark variables that gcc -Wuninitialized
20658 does not deduce are never used uninitialized.
a586633d
PE
20659 * window.h (check_all_windows): New decl, to forestall
20660 gcc -Wmissing-prototypes diagnostic.
5b555da1 20661 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 20662
f6095868
PE
20663 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
20664 shadowing.
20665 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
20666 Include <limits.h>.
20667 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
20668 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
20669 (load_charset_map): Mark variables that gcc -Wuninitialized
20670 does not deduce are never used uninitialized.
53df7c11 20671 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 20672
f38b440c
PE
20673 * coding.c (coding_set_source, coding_set_destination):
20674 Use "else { /* comment */ }" rather than "else /* comment */;"
20675 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
20676 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
20677 a block, when the outer 'i' will do.
20678 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
20679 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
20680 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
20681 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
20682 (Fdecode_sjis_char, Fdefine_coding_system_internal):
20683 Rename locals to avoid shadowing.
20684 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
20685 * coding.c (emacs_mule_char, encode_invocation_designation):
20686 Now static, since they're not used elsewhere.
413bb2db 20687 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 20688 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
20689 (decode_coding_emacs_mule): Mark variables that gcc
20690 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
20691 (detect_coding_iso_2022): Initialize a local variable that might
20692 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 20693 this initialization is needed. (Bug#8211)
5f58e762
PE
20694 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
20695 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
20696 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
20697 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
20698 Remove unused macros.
f38b440c 20699
232b38b9 20700 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 20701 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 20702 * character.c (string_count_byte8): Likewise.
232b38b9 20703
fb90da1b
PE
20704 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
20705 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
20706
fb93dbc2
PE
20707 * chartab.c (copy_sub_char_table): Now static, since it's not used
20708 elsewhere.
5c156ace
PE
20709 (sub_char_table_ref_and_range, char_table_ref_and_range):
20710 Rename locals to avoid shadowing.
bbcd0949 20711 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 20712
7d3b3862 20713 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 20714 (BIDI_BOB): Remove unused macro.
7d3b3862 20715
6be7d3da
PE
20716 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
20717 deduce are never used uninitialized.
c2ed9c8b 20718 * term.c (encode_terminal_code): Likewise.
6be7d3da 20719
75f8807f 20720 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 20721
50938595
PE
20722 * tparam.h: New file.
20723 * term.c, tparam.h: Include it.
20724 * deps.mk (term.o, tparam.o): Depend on tparam.h.
20725 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
20726 Move these decls to tparam.h, and make them agree with what
20727 is actually in tparam.c. The previous trick of using incompatible
20728 decls in different modules does not conform to the C standard.
20729 All callers of tparam changed to use tparam's actual API.
20730 * tparam.c (tparam1, tparam, tgoto):
20731 Use const pointers where appropriate.
20732
fbceeba2
PE
20733 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
20734 * cm.h (struct cm): Likewise.
20735 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
20736 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
20737 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
20738 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
20739 (turn_on_face, init_tty): Likewise.
20740 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 20741
7f3f1250
PE
20742 * term.c (term_mouse_position): Rename local to avoid shadowing.
20743
e6ca6543
PE
20744 * alloc.c (mark_ttys): Move decl from here ...
20745 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
20746
c40f8d15
AS
207472011-03-11 Andreas Schwab <schwab@linux-m68k.org>
20748
20749 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
20750
cfe0661d
JB
207512011-03-09 Juanma Barranquero <lekktu@gmail.com>
20752
20753 * search.c (compile_pattern_1): Remove argument regp, unused since
20754 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
20755 (compile_pattern): Don't pass it.
20756
0afb4571
J
207572011-03-08 Jan Djärv <jan.h.d@swipnet.se>
20758
20759 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
20760 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
20761 for ! HAVE_GTK3.
20762 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
20763
20764 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
20765
20766 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
20767 gdk_window_get_screen, gdk_window_get_geometry,
20768 gdk_x11_window_lookup_for_display and GDK_KEY_g.
20769 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
20770 (xg_get_pixbuf_from_pixmap): New function.
20771 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
20772 to Pixmap, take frame as parameter, remove GdkColormap parameter.
20773 Call xg_get_pixbuf_from_pixmap instead of
20774 gdk_pixbuf_get_from_drawable.
20775 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
20776 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
20777 (xg_check_special_colors): Use GtkStyleContext and its functions
20778 for HAVE_GTK3.
20779 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
20780 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
20781 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
20782 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
20783 Call gtk_widget_get_preferred_size.
0afb4571
J
20784 (xg_frame_resized): gdk_window_get_geometry only takes 5
20785 parameters.
44f230aa
SM
20786 (xg_win_to_widget, xg_event_is_for_menubar):
20787 Call gdk_x11_window_lookup_for_display.
0afb4571
J
20788 (xg_set_widget_bg): New function.
20789 (delete_cb): New function.
895009e1 20790 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 20791 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
20792 (xg_set_background_color): Call xg_set_widget_bg.
20793 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
20794 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
20795 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
20796 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
20797 if ! HAVE_GTK3.
20798 (update_frame_tool_bar): Call gtk_widget_hide.
20799 (xg_initialize): Use GDK_KEY_g.
20800
20801 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
20802 if ! HAVE_GTK3
20803 (x_session_initialize): Call gdk_x11_set_sm_client_id.
20804
20805 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
20806 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
20807 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
20808
1c2cc4ef
JB
208092011-03-08 Juanma Barranquero <lekktu@gmail.com>
20810
20811 * w32xfns.c (select_palette): Check success of RealizePalette against
20812 GDI_ERROR, not zero.
20813
33383987 20814See ChangeLog.11 for earlier changes.
aac0c6e3
MR
20815
20816;; Local Variables:
20817;; coding: utf-8
aac0c6e3
MR
20818;; End:
20819
2f097256 20820 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
20821
20822 This file is part of GNU Emacs.
20823
20824 GNU Emacs is free software: you can redistribute it and/or modify
20825 it under the terms of the GNU General Public License as published by
20826 the Free Software Foundation, either version 3 of the License, or
20827 (at your option) any later version.
20828
20829 GNU Emacs is distributed in the hope that it will be useful,
20830 but WITHOUT ANY WARRANTY; without even the implied warranty of
20831 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20832 GNU General Public License for more details.
20833
20834 You should have received a copy of the GNU General Public License
20835 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.