1 2012-12-10 Paul Eggert <eggert@cs.ucla.edu>
3 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
6 2012-12-08 Eli Zaretskii <eliz@gnu.org>
8 * w32.c (unsetenv): Return 0 if the input string is too long.
10 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
12 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
13 * alloc.c (xputenv): New function.
14 * dbusbind.c (Fdbus_init_bus):
16 * xterm.c (x_term_init):
17 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
18 * editfns.c (initial_tz): Move static var decl up.
19 (tzvalbuf_in_environ): New static var.
20 (init_editfns): Initialize these two static vars.
21 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
22 Save old TZ value on stack, if it's small.
23 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
24 instead, use xputenv+unsetenv to set and restore TZ.
25 (environbuf): Remove static var. All uses removed.
26 (Fset_time_zone_rule): Do not save TZ and environ;
27 no longer needed here.
28 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
29 Move to inside set_time_zone_rule; they don't need file scope any more.
30 (set_time_zone_rule): Maintain the TZ=value string separately.
31 (syms_of_editfns): Don't initialize initial_tz;
32 init_editfns now does it.
33 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
34 * lisp.h (xputenv): New decl.
36 2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
38 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
40 2012-12-08 Eli Zaretskii <eliz@gnu.org>
42 * w32.c (unsetenv, sys_putenv): New functions.
44 2012-12-08 Chong Yidong <cyd@gnu.org>
46 * editfns.c (Finsert_char): Make the error message more
47 informative (Bug#12992).
49 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
51 Simplify get_lim_data.
52 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
53 Remove USG and vlimit methods; no longer used these days.
54 Add #error catchall just in case.
56 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
57 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
58 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
59 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
60 (deleted_pid_list, Fdelete_process, create_process)
61 (record_child_status_change, handle_child_signal, deliver_child_signal)
62 (init_process_emacs, syms_of_process):
63 Assume SIGCHLD is defined.
64 (parse_signal): Remove. All uses removed.
65 (abbr_to_signal): New static function.
66 (Fsignal_process): Use it to convert signal names to ints.
67 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
68 kill (getpgrp (), ...).
69 (emacs_sigaction_init): Assume SIGCHLD is defined.
70 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
71 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
72 * syssignal.h (EMACS_KILLPG): Remove.
73 All uses replaced by 'kill' with a negative pid.
74 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
75 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
77 2012-12-07 Paul Eggert <eggert@cs.ucla.edu>
79 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
80 This will cause a production Emacs to dump core instead of
83 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
85 * frame.c (make_frame): Do not set window's buffer to t.
86 * window.c (Fsplit_window_internal): Likewise. Previously it was
87 used to indicate that the window is being set up. Now we use
88 set_window_buffer for all new windows, so the condition in ...
89 (Fset_window_buffer): ... is always true and can be removed.
91 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
93 Convenient macro to check whether the buffer is hidden.
94 * buffer.h (BUFFER_HIDDEN_P): New macro.
95 * frame.c (make_frame): Use it. Adjust comment.
96 * buffer.c (candidate_buffer): New function.
97 (Fother_buffer, other_buffer_safely): Use it.
99 2012-12-06 Eli Zaretskii <eliz@gnu.org>
101 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
102 if the child process is still running. Instead, exit the wait
103 loop and return zero. (Bug#13086)
105 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
107 * frame.h (x_char_width, x_char_height): Remove prototypes.
108 * w32term.h (x_char_width, x_char_height): Likewise.
109 * xfns.c (x_char_width, x_char_height): Remove.
110 * w32fns.c (x_char_width, x_char_height): Likewise.
111 * nsfns.c (x_char_width, x_char_height): Likewise.
112 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
114 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
115 * keyboard.c (command_loop_1): Remove prototype.
116 (command_loop_2, top_level_1): Add static to match prototype.
118 2012-12-06 Paul Eggert <eggert@cs.ucla.edu>
120 Fix a recently-introduced delete-process race condition.
121 * callproc.c, process.h (record_kill_process):
122 New function, containing part of the old call_process_kill.
123 (call_process_kill): Use it.
124 This does not change call_process_kill's behavior.
125 * process.c (Fdelete_process): Use record_kill_process to fix a
126 race condition that could cause Emacs to lose track of a child.
128 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
130 Avoid code duplication between prev_frame and next_frame.
131 * frame.c (candidate_frame): New function. Add comment.
132 (prev_frame, next_frame): Use it. Adjust comment.
134 2012-12-06 Eli Zaretskii <eliz@gnu.org>
136 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
137 fails, signal an error instead of continuing with an empty
139 Encode expanded temp file pattern before passing it to mkstemp or
142 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
143 Encode the file name before passing it to dostounix_filename, in
144 case it will downcase it (under w32-downcase-file-names).
147 2012-12-05 Paul Eggert <eggert@cs.ucla.edu>
149 Minor call-process cleanups.
150 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
151 at the same time as other platforms, to simplify analysis.
152 No need for fd0_volatile since we have synch_process_fd.
153 Avoid needless emacs_close; arg is always negative.
155 2012-12-04 Andreas Schwab <schwab@linux-m68k.org>
157 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
160 2012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
162 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
163 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
164 and mouse_face_hidden members to a bitfields.
165 * frame.h (struct frame): Remove set-but-not-used space_width member.
166 (FRAME_SPACE_WIDTH): Remove.
167 * nsterm.m, w32term.c, xterm.c: Adjust users.
168 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
169 member. Adjust users. Convert term_initted, delete_in_insert_mode,
170 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
171 members to a bitfields.
173 2012-12-03 Paul Eggert <eggert@cs.ucla.edu>
175 Don't let call-process be a zombie factory (Bug#12980).
176 Fixing this bug required some cleanup of the signal-handling code.
177 As a side effect, this change also fixes a longstanding rare race
178 condition whereby Emacs could mistakenly kill unrelated processes,
179 and it fixes a bug where a second C-g does not kill a recalcitrant
180 synchronous process in GNU/Linux and similar platforms.
181 The patch should also fix the last vestiges of Bug#9488,
182 a bug which has mostly been fixed on the trunk by other changes.
183 * callproc.c, process.h (synch_process_alive, synch_process_death)
184 (synch_process_termsig, sync_process_retcode):
185 Remove. All uses removed, to simplify analysis and so that
186 less consing is done inside critical sections.
187 * callproc.c (call_process_exited): Remove. All uses replaced
188 with !synch_process_pid.
189 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
190 These take the role of what used to be in unwind-protect arg.
192 (block_child_signal, unblock_child_signal):
193 New functions, to avoid races that could kill innocent-victim processes.
194 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
195 (call_process_kill): Record killed processes as deleted, so that
196 zombies do not clutter up the system. Do this inside a critical
197 section, to avoid a race that would allow the clutter.
198 (call_process_cleanup): Fix code so that the second C-g works again
199 on common platforms such as GNU/Linux.
200 (Fcall_process): Create the child process in a critical section,
201 to fix a race condition. If creating an asynchronous process,
202 record it as deleted so that zombies do not clutter up the system.
203 Do unwind-protect for WINDOWSNT too, as that's simpler in the
204 light of these changes. Omit unnecessary call to emacs_close
205 before failure, as the unwind-protect code does that.
206 * callproc.c (call_process_cleanup):
207 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
208 * process.c (record_deleted_pid): New function, containing
209 code refactored out of Fdelete_process.
210 (Fdelete_process): Use it.
211 (process_status_retrieved): Remove. All callers changed to use
213 (record_child_status_change): Remove, folding its contents into ...
214 (handle_child_signal): ... this signal handler. Now, this
215 function is purely a handler for SIGCHLD, and is not called after
216 a synchronous waitpid returns; the synchronous code is moved to
217 wait_for_termination. There is no need to worry about reaping
218 more than one child now.
219 * sysdep.c (get_child_status, child_status_changed): New functions.
220 (wait_for_termination): Now takes int * status and bool
221 interruptible arguments, too. Do not record child status change;
222 that's now the caller's responsibility. All callers changed.
223 Reimplement in terms of get_child_status.
224 (wait_for_termination_1, interruptible_wait_for_termination):
225 Remove. All callers changed to use wait_for_termination.
226 * syswait.h: Include <stdbool.h>, for bool.
227 (record_child_status_change, interruptible_wait_for_termination):
229 (record_deleted_pid, child_status_changed): New decls.
230 (wait_for_termination): Adjust to API changes noted above.
232 * bytecode.c, lisp.h (Qbytecode): Remove.
233 No longer needed after 2012-11-20 interactive-p changes.
235 2012-12-03 Eli Zaretskii <eliz@gnu.org>
237 * xdisp.c (redisplay_window): If the cursor is visible, but inside
238 the scroll margin, move point outside the margin. (Bug#13055)
240 2012-12-03 Jan Djärv <jan.h.d@swipnet.se>
242 * gtkutil.c (my_log_handler): New function.
243 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
245 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
247 * lisp.h (modify_region): Rename to...
248 (modify_region_1): ...new prototype.
249 * textprop.c (modify_region): Now static. Adjust users.
250 * insdel.c (modify_region): Rename to...
251 (modify_region_1): ...new function to work with current buffer.
252 Adjust comment and users. Use true and false for booleans.
254 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
256 * alloc.c (free_save_value): New function.
257 (safe_alloca_unwind): Use it.
258 * lisp.h (free_save_value): New prototype.
259 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
261 (save_excursion_restore): Adjust to match saved data structure.
262 Use free_save_value to offload some work from GC. Drop obsolete
265 2012-12-03 Chong Yidong <cyd@gnu.org>
267 * fileio.c (Vauto_save_list_file_name): Doc fix.
269 2012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
271 * w32fns.c: Remove prototype of atof.
272 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit
274 (file_dialog_callback): Declared UINT_PTR.
276 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
279 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
280 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
283 2012-12-03 Glenn Morris <rgm@gnu.org>
285 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
287 2012-12-02 Paul Eggert <eggert@cs.ucla.edu>
289 Fix xpalloc confusion after memory is exhausted.
290 * alloc.c (xpalloc): Comment fix.
291 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
292 and signals an error, do not clear charset_table_size, as
293 charset_table is still valid.
294 * doprnt.c (evxprintf): Clear *BUF after freeing it.
296 Use execve to avoid need to munge environ (Bug#13054).
297 * callproc.c (Fcall_process):
298 * process.c (create_process):
299 Don't save and restore environ; no longer needed.
300 * callproc.c (child_setup):
301 Use execve, not execvp, to preserve environ.
303 2012-12-01 Paul Eggert <eggert@cs.ucla.edu>
305 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
307 2012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
309 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
310 display for sliced images (Bug#10500).
312 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
314 2012-11-30 Juanma Barranquero <lekktu@gmail.com>
316 * doc.c (Fdocumentation): Re-add handling of function-documentation,
317 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
319 2012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
321 * xdisp.c (window_outdated): Remove eassert since it hits
322 some suspicious corner cases (see Bug#13007 and Bug#13012).
323 (mode_line_update_needed): New function.
324 (redisplay_internal, redisplay_window): Use it.
325 (ensure_selected_frame): New function.
326 (redisplay_internal, unwind_redisplay): Use it.
327 (redisplay_internal): Move comment about buffer_shared...
328 (buffer_shared_and_changed): ...near to its real use.
330 2012-11-29 Paul Eggert <eggert@cs.ucla.edu>
332 * callproc.c (Fcall_process): Don't misreport vfork failure.
334 2012-11-28 Paul Eggert <eggert@cs.ucla.edu>
336 * callproc.c (Fcall_process): Fix vfork portability problems.
337 Do not assume that fd[0], count, filefd, and save_environ survive
338 vfork. Fix bug whereby wrong errno value could be reported for
339 pipe failure. Some minor cleanups, too, as follows. Move buf and
340 bufsize to the context where they're needed. Change new_argv to
341 be of type char **, as this is more convenient and avoids casts.
342 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
343 Now local constants, not macros.
345 2012-11-18 Kenichi Handa <handa@gnu.org>
347 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
348 for the variable "f".
350 2012-11-13 Kenichi Handa <handa@gnu.org>
352 * font.c (font_unparse_xlfd): Exclude special characters from the
353 generating XLFD name.
355 2012-11-27 Paul Eggert <eggert@cs.ucla.edu>
357 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
358 * dired.c (stat_uname, stat_gname):
359 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
361 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
362 * dired.c (directory_files_internal, file_name_completion):
363 Assume EAGAIN and EINTR are defined.
365 * fileio.c (Fcopy_file): Assume EISDIR is defined.
366 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
367 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
368 * lread.c (readbyte_from_file): Assume EINTR is defined.
369 * process.c (wait_reading_process_output, send_process) [subprocesses]:
370 Assume EIO and EAGAIN are defined.
371 * unexcoff.c (write_segment): Assume EFAULT is defined.
373 2012-11-27 Eli Zaretskii <eliz@gnu.org>
375 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
378 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
379 highlighting on the frame was cleared. Prevents assertion
380 violations when repeatedly clicking on the "Top" link of the
381 "bread-crumbs" in Info buffers.
383 2012-11-25 Paul Eggert <eggert@cs.ucla.edu>
385 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
387 2012-11-24 Ken Brown <kbrown@cornell.edu>
389 * keyboard.c (HAVE_MOUSE):
390 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
393 2012-11-24 Eli Zaretskii <eliz@gnu.org>
395 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
396 between bpos_covered and bpos_max. This fixes cursor display when
397 several display strings follow each other.
399 * .gdbinit (pgx): If the glyph's object is a string, display the
400 pointer to string data, rather than the value of the string object
401 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
403 * indent.c (Fvertical_motion): If the starting position is covered
404 by a display string, return to one position before that, to avoid
405 overshooting it inside move_it_to. (Bug#12930)
407 2012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
409 * frame.h (struct frame): Remove display_preempted member
410 since all users are dead long ago.
411 * nsterm.h (struct x_output): Use the only dummy member.
412 * w32menu.c (pending_menu_activation): Remove since not
414 (set_frame_menubar): Adjust user.
415 * w32term.h (struct x_output): Drop outdated #if 0 code.
416 (struct w32_output): Use bitfields for explicit_parent,
417 asked_for_visible and menubar_active members. Drop
418 unused pending_menu_activation member.
419 * xterm.h (struct x_output): Drop outdated #if 0 code.
420 Use bitfields for explicit_parent, asked_for_visible,
421 has_been_visible and net_wm_state_hidden_seen members.
423 2012-11-23 Eli Zaretskii <eliz@gnu.org>
425 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
426 of a literal "/". (Bug#12955)
427 (gl-stamp): Invoke fc.exe directly, not through cmd.
429 2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
431 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
432 * dired.c: Assume HAVE_DIRENT_H.
433 (NAMLEN): Remove, replacing with ...
434 (dirent_namelen): New function. All uses changed. Use the GNU macro
435 _D_EXACT_NAMELEN if available, as it's faster than strlen.
436 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
437 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
438 * makefile.w32-in (DIR_H): Remove. All uses replaced with
440 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
441 * ndir.h: Rename to ../nt/inc/dirent.h.
442 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
443 Do not include <dirent.h>; no longer needed.
444 * w32.c: Include <dirent.h> rather than "ndir.h".
446 2012-11-23 Chong Yidong <cyd@gnu.org>
448 * xftfont.c (xftfont_open): Remove duplicate assignment.
450 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
452 * alloc.c (Fgarbage_collect): Unblock input after clearing
453 gc_in_progress to avoid note_mouse_highlight glitch with GC.
454 * frame.h (FRAME_MOUSE_UPDATE): New macro.
455 * msdos.c (IT_frame_up_to_date): Use it here...
456 * w32term.c (w32_frame_up_to_date): ...here...
457 * xterm.c (XTframe_up_to_date): ...and here...
458 * nsterm.m (ns_frame_up_to_date): ...but not here.
459 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
461 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
462 Do not check whether GC is in progress.
464 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
466 * xdisp.c (window_buffer_changed): New function.
467 (update_menu_bar, update_tool_bar): Use it to
468 simplify large 'if' statements.
469 (redisplay_internal): Generalize commonly used
470 'tail' and 'frame' local variables.
472 2012-11-22 Eli Zaretskii <eliz@gnu.org>
474 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
475 with Windows system header.
477 2012-11-21 Paul Eggert <eggert@cs.ucla.edu>
479 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
480 * alloc.c: Assume unistd.h exists.
481 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
482 * sysdep.c (get_current_dir_name): Assume getcwd exists.
483 (getwd) [USG]: Remove; no longer needed.
484 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
485 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
486 * w32.h (getcwd): Remove decl.
488 2012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
490 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
491 Make it set selected_window as well.
492 (update_tool_bar): Use it.
494 2012-11-21 Ken Brown <kbrown@cornell.edu>
496 * emacs.c (main): Set the G_SLICE environment variable for all
497 Cygwin builds, not just GTK builds. See
498 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
500 2012-11-21 Eli Zaretskii <eliz@gnu.org>
502 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
503 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
504 Define for the MSVC compiler.
506 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
508 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
509 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
510 dostounix_filename. Prevents crashes down the road, because
511 dostounix_filename assumes it gets a unibyte string. Reported by
512 Michel de Ruiter <michel@sentient.nl>, see
513 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
515 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
517 Conflate Qnil and Qunbound for `symbol-function'.
518 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
519 * lread.c (init_obarray): Set `function' fields to Qnil.
520 * eval.c (Fcommandp): Ignore Qunbound.
521 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
522 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
523 Test NILP rather than Qunbound.
524 (Ffmakunbound): Set to Qnil.
525 (Fsymbol_function): Never signal an error.
526 (Finteractive_form): Ignore Qunbound.
528 2012-11-20 Paul Eggert <eggert@cs.ucla.edu>
530 * eval.c (interactive_p): Remove no-longer-used decl.
532 2012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
534 * xdisp.c (buffer_shared): Adjust comment.
535 (buffer_shared_and_changed): New function.
536 (prepare_menu_bars, redisplay_internal): Use it to
537 decide whether all windows or frames should be updated.
538 (window_outdated): New function.
539 (text_outside_line_unchanged_p, redisplay_window): Use it.
540 (redisplay_internal): Likewise. Fix indentation.
542 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
544 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
545 (syms_of_eval): Remove corresponding defsubr.
546 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
548 2012-11-19 Daniel Colascione <dancol@dancol.org>
550 * w32fns.c (Fx_file_dialog):
551 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
552 cygwin_convert_file_name*.
554 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
555 Rename cygwin_convert_path* to cygwin_convert_file_name*.
557 2012-11-18 Paul Eggert <eggert@cs.ucla.edu>
559 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
561 2012-11-18 Eli Zaretskii <eliz@gnu.org>
563 * w32select.c: Include w32common.h before w32term.h, so that
564 windows.h gets included before w32term.h uses some of its
567 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
569 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
571 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
573 2012-11-18 Jan Djärv <jan.h.d@swipnet.se>
575 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
576 (ns_select): Return at once if events are held (Bug#12834).
578 2012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
580 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
581 Needed following 2012-10-20 change. (Bug#12902)
583 2012-11-18 Juanma Barranquero <lekktu@gmail.com>
585 * w32proc.c (waitpid): Remove unused label get_result.
587 2012-11-17 Juanma Barranquero <lekktu@gmail.com>
589 * makefile.w32-in (SYSWAIT_H): New macro.
590 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
591 ($(BLD)/sysdep.$(O)): Update dependencies.
593 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
595 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
596 * callproc.c (relocate_fd): Assume F_DUPFD.
597 * emacs.c, term.c (O_RDWR): Remove.
598 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
599 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
600 * nsterm.m: Assume <fcntl.h> exists.
601 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
602 (create_pty, Fmake_network_process, server_accept_connection)
603 (wait_reading_process_output, init_process_emacs):
605 (wait_reading_process_output): Put in a special case for WINDOWSNT
606 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
607 It's not clear this is needed, but it's a more-conservative change.
608 (create_process): Assume FD_CLOEXEC.
609 (create_process, create_pty): Assume O_NOCTTY.
610 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
611 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
612 Omit if not DOS_NT, since F_GETFL is not defined there.
613 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
614 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
616 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
617 lack it, since gnulib guarantees this.
618 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
620 2012-11-17 Eli Zaretskii <eliz@gnu.org>
622 * w32.c (faccessat): Pretend that directories have the execute bit
623 set. Emacs expects that, e.g., in files.el:cd-absolute.
625 * w32proc.c (create_child): Don't clip the PID of the child
626 process to fit into an Emacs integer, as this is no longer a
628 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
629 reaping only the process specified by PID argument, if that is
630 positive. Use PID instead of dead_child to know which process to
631 reap. Wait for the child to die only if WNOHANG is not in
633 (sys_select): Don't set dead_child.
635 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
636 as it is no longer needed.
638 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
640 (record_child_status_change): Remove the setting of
641 record_at_most_one_child for the !WNOHANG case.
643 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
645 Fix problems in ns port found by static checking.
646 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
647 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
648 not to process group.
649 (ns_select): Use emacs_write, not write, as that's more robust
650 in the presence of signals.
651 (fd_handler:): Check for read errors.
653 2012-11-16 Glenn Morris <rgm@gnu.org>
655 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
657 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
659 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
661 2012-11-16 Eli Zaretskii <eliz@gnu.org>
663 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
664 use the same value of thread handle.
665 (start_timer_thread): If the timer thread exited (due to error),
666 clean up by closing the two handles it used. Duplicate the caller
667 thread's handle here, so it gets duplicated only once, when
668 launching the timer thread. Set priority of the timer thread, not
670 (getitimer): Don't duplicate the caller thread's handle here.
673 2012-11-16 Jan Djärv <jan.h.d@swipnet.se>
675 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
678 2012-11-16 Paul Eggert <eggert@cs.ucla.edu>
680 Remove no-longer-used pty_max_bytes variable.
681 * process.c (pty_max_bytes): Remove; unused.
682 (send_process): Do not set it.
684 2012-11-15 Juanma Barranquero <lekktu@gmail.com>
686 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
689 2012-11-15 Paul Eggert <eggert@cs.ucla.edu>
691 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
692 This follows up on the 2012-09-29 patch that removed indirection
693 for the 'function' field. Reported by Sergey Vinokurov in
694 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
696 2012-11-14 Eli Zaretskii <eliz@gnu.org>
698 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
699 different name, as the MS runtime does not have such a function,
700 and probably never will.) All callers changed. Ignore DIRFD
701 value if PATH is an absolute file name, to match Posix spec
702 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
705 2012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
707 * xdisp.c (echo_area_display, redisplay_internal):
708 Omit redundant check whether frame_garbaged is set.
710 2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
712 Use faccessat, not access, when checking file permissions (Bug#12632).
713 This fixes a bug that has been present in Emacs since its creation.
714 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
715 which must set some sort of record. (Torek's bug report was against
716 a predecessor of GNU Emacs, but GNU Emacs happened to have the
717 same common flaw.) See Torek's Usenet posting
718 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
719 Posted: Fri Apr 8 14:18:56 1983.
720 * Makefile.in (LIB_EACCESS): New macro.
722 * callproc.c (init_callproc):
723 * charset.c (init_charset):
724 * fileio.c (check_existing, check_executable, check_writable)
726 * lread.c (openp, load_path_check):
727 * process.c (allocate_pty):
729 Use effective UID when checking permissions, not real UID.
730 * callproc.c (init_callproc):
731 * charset.c (init_charset):
732 * lread.c (load_path_check, init_lread):
733 Test whether directories are accessible, not merely whether they exist.
734 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
735 * fileio.c (check_existing, check_executable, check_writable)
737 Use symbolic names instead of integers for the flags, as they're
739 (check_writable): New arg AMODE. All uses changed.
740 Set errno on failure.
741 (Ffile_readable_p): Use faccessat, not stat + open + close.
742 (Ffile_writable_p): No need to call check_existing + check_writable.
743 Just call check_writable and then look at errno. This saves a syscall.
744 dir should never be nil; replace an unnecessary runtime check
745 with an eassert. When checking the parent directory of a nonexistent
746 file, check that the directory is searchable as well as writable, as
747 we can't create files in unsearchable directories.
748 (file_directory_p): New function, which uses 'stat' on most platforms
749 but faccessat with D_OK (for efficiency) if WINDOWSNT.
750 (Ffile_directory_p, Fset_file_times): Use it.
751 (file_accessible_directory_p): New function, which uses a single
752 syscall for efficiency.
753 (Ffile_accessible_directory_p): Use it.
754 * xrdb.c (file_p): Use file_directory_p.
755 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
756 * lread.c (openp): When opening a file, use fstat rather than
757 stat, as that avoids a permissions race. When not opening a file,
758 use file_directory_p rather than stat.
759 (dir_warning): First arg is now a usage string, not a format.
760 Use errno. All uses changed.
761 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
762 that merely introduced a race.
763 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
764 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
765 and similarly for the other O_* flags.
766 * w32.c (sys_faccessat): Rename from sys_access and switch to
767 faccessat's API. All uses changed.
768 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
769 (magic_db): Rename from magic_file_p.
770 (magic_db, search_magic_path): Return an XrmDatabase rather than a
771 char *, so that we don't have to test for file existence
772 separately from opening the file for reading. This removes a race
773 fixes a permission-checking problem, and simplifies the code.
775 (file_p): Remove; no longer needed.
777 2012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
779 Omit glyphs initialization at startup.
780 * dispnew.c (glyphs_initialized_initially_p): Remove.
781 (adjust_frame_glyphs_initially): Likewise. Adjust users.
782 (Fredraw_frame): Move actual code from here...
783 (redraw_frame): ...to here. Add eassert. Adjust comment.
784 (Fredraw_display): Use redraw_frame.
785 * xdisp.c (clear_garbaged_frames): Likewise.
787 2012-11-13 Eli Zaretskii <eliz@gnu.org>
789 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
790 passed to pint2str and pint2hrstr to be at most the size of the
791 frame's decode_mode_spec_buffer. This avoids crashes with very
792 large values of FIELD_WIDTH argument to decode_mode_spec.
795 2012-11-13 Paul Eggert <eggert@cs.ucla.edu>
797 Fix a race with verify-visited-file-modtime (Bug#12863).
798 Since at least 1991 Emacs has ignored an mtime difference of no
799 more than one second, but my guess is that this was to work around
800 file system bugs that were fixed long ago. Since the race is
801 causing problems now, let's remove that code.
802 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
803 whose time stamp is off by no more than a second. Insist that the
804 file time stamps match exactly.
806 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
808 * frame.h (struct frame): Convert external_tool_bar member to
809 1-bit unsigned bitfield.
810 * termhooks.h (struct terminal): Remove mouse_moved member since
811 all users are long dead. Adjust comment on mouse_position_hook.
813 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
815 Simplify by using FOR_EACH_FRAME here and there.
816 * frame.c (next_frame, prev_frame, other_visible_frames)
817 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
818 * w32term.c (x_window_to_scroll_bar): Likewise.
819 * window.c (window_list): Likewise.
820 * xdisp.c (x_consider_frame_title): Likewise.
821 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
822 * xfns.c (x_window_to_frame, x_any_window_to_frame)
823 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
824 * xmenu.c (menubar_id_to_frame): Likewise.
825 * xselect.c (frame_for_x_selection): Likewise.
826 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
827 (x_window_to_menu_bar): Likewise.
828 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
830 2012-11-12 Paul Eggert <eggert@cs.ucla.edu>
832 * data.c (Qdefalias_fset_function): Now static.
834 Another tweak to vectorlike_header change.
835 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
836 Remove, and replace all uses with ...
837 (next_in_free_list, set_next_in_free_list):
838 New functions, which respect C's aliasing rules better.
840 2012-11-11 Paul Eggert <eggert@cs.ucla.edu>
842 * window.c (list4i): Rename from 'quad'. All uses changed.
843 Needed because <sys/types.h> defines 'quad' on Solaris 10.
845 2012-11-11 Juanma Barranquero <lekktu@gmail.com>
847 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
848 warning about mixing declarations and code in ISO C90.
850 2012-11-10 Martin Rudalics <rudalics@gmx.at>
852 * window.c (Fsplit_window_internal): Set combination limit of
853 new parent window to t iff Vwindow_combination_limit is t;
854 fixing a regression introduced with the change from 2012-09-22.
855 (Fset_window_combination_limit): Fix doc-string.
857 2012-11-10 Eli Zaretskii <eliz@gnu.org>
859 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
860 amount when the scroll margins are too large. When scrolling
861 backwards in the buffer, give up if cannot reach point or the
862 scroll margin within a reasonable number of screen lines.
863 Fixes point position in window under scroll-up/down-aggressively when
864 point is positioned many lines beyond the window top/bottom.
867 * ralloc.c (relinquish): If real_morecore fails to return memory
868 to the system, don't crash; instead, leave the last heap
869 unchanged and return. (Bug#12774)
871 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
873 * lisp.h (AUTOLOADP): New macro.
874 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
875 * data.c (Ffset): Remove special ad-advice-info handling.
876 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
878 (Finteractive_form): Simplify.
879 (Fquo): Don't insist on having at least 2 arguments.
880 (Qdefalias_fset_function): New var.
882 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
884 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
886 * nsfont.m (Qcondensed, Qexpanded): New variables.
887 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
888 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
890 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
892 Fix recently introduced crash on MS-Windows (Bug#12839).
893 * w32term.h (struct scroll_bar): Use convenient header.
894 (SCROLL_BAR_VEC_SIZE): Remove.
895 * w32term.c (x_scroll_bar_create): Use VECSIZE.
897 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
899 Tweak last vectorlike_header change.
900 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
901 vectorlike object on the free list. This is introduced to avoid
902 some (but not all) pointer casting and aliasing problems, see
903 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
904 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
906 (xvectype, xvecsize): Use them to examine Lisp_Object values.
908 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
910 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
911 been removed, so remove them here also.
913 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
915 * doc.c (Fdocumentation): Handle new property
916 dynamic-docstring-function to replace the old ad-advice-info.
918 2012-11-09 Paul Eggert <eggert@cs.ucla.edu>
920 * fns.c (Qeql, hashtest_eq): Now static.
922 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
924 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
925 * fns.c (hashfn_eq, hashfn_eql, sxhash):
926 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
927 * buffer.c (compare_overlays): Use XLI rather than XHASH.
929 2012-11-08 Paul Eggert <eggert@cs.ucla.edu>
931 Use same hash function for hashfn_profiler as for hash_string etc.
932 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
933 * lisp.h (sxhash_combine): New inline function, with the contents
934 of the old SXHASH_COMBINE.
935 * profiler.c (hashfn_profiler): Use it, instead of having a
936 special hash function containing a comparison that always yields 1.
938 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
940 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
941 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
942 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
945 2012-11-08 Jan Djärv <jan.h.d@swipnet.se>
947 * image.c (xpm_make_color_table_h): Fix compiler error because
948 make_hash_table changed.
950 2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
952 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
954 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
956 Use ad-hoc comparison function for the profiler's hash-tables.
957 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
958 (make_log): Use them.
959 (handle_profiler_signal): Don't inhibit quit any longer since we don't
960 call Fequal any more.
961 (Ffunction_equal): New function.
962 (cmpfn_profiler, hashfn_profiler): New functions.
963 (syms_of_profiler): Initialize them.
964 * lisp.h (struct hash_table_test): New struct.
965 (struct Lisp_Hash_Table): Use it.
966 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
967 * fns.c (make_hash_table): Take a struct to describe the test.
968 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
969 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
970 (hash_lookup, hash_remove_from_table): Move assertion checking of
971 hashfn result here. Check hash-equality before calling cmpfn.
972 (Fmake_hash_table): Adjust call to make_hash_table.
973 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
974 (syms_of_fns): Initialize them.
975 * emacs.c (main): Move syms_of_fns earlier.
976 * xterm.c (syms_of_xterm):
977 * category.c (hash_get_category_set): Adjust call to make_hash_table.
978 * print.c (print_object): Adjust to new hash-table struct.
979 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
981 2012-11-08 Eli Zaretskii <eliz@gnu.org>
983 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
984 value of w32-scroll-lock-modifier is neither nil nor one of the
985 known key modifiers. (Bug#12806)
987 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
989 Shrink struct vectorlike_header to the only size field.
990 * lisp.h (enum pvec_type): Avoid explicit enum member values.
992 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
993 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
994 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
995 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
996 information from the vector header. Adjust comment.
997 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
998 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
1000 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
1001 (struct vectorlike_header): Remove next member. Adjust comment.
1002 (struct Lisp_Subr): Add convenient header. Adjust comment.
1003 (allocate_pseudovector): Adjust prototype.
1004 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
1005 (sweep_string, lisp_malloc): Remove useless prototypes.
1006 (enum mem_type): Adjust comment.
1007 (NEXT_IN_FREE_LIST): New macro.
1008 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
1009 (Fmake_bool_vector): Likewise.
1010 (struct large_vector): New type to represent allocation unit for
1011 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
1012 (large_vectors): Change type to struct large_vector.
1013 (allocate_vector_from_block): Simplify.
1014 (PSEUDOVECTOR_NBYTES): Replace with...
1015 (vector_nbytes): ...new function. Adjust users.
1016 (sweep_vectors): Adjust processing of large vectors.
1017 (allocate_vectorlike): Likewise.
1018 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
1019 Add easserts. Adjust XSETPVECTYPESIZE usage.
1020 (allocate_buffer): Use BUFFER_PVEC_INIT.
1021 (live_vector_p): Adjust to match large vector.
1022 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
1023 * buffer.h (struct buffer): Add next member.
1024 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
1026 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
1027 * fns.c (internal_equal): Adjust to match enum pvec_type change.
1028 (copy_hash_table): Adjust to match vector header change.
1029 * lread.c (defsubr): Use XSETPVECTYPE.
1030 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
1031 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
1032 (xvecsize): New command.
1034 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1036 * keyboard.c (event_to_kboard): Do not dereference
1037 frame_or_window field of SELECTION_REQUEST_EVENT
1038 and SELECTION_CLEAR_EVENT events (Bug#12814).
1039 * xterm.h (struct selection_input_event): Adjust comment.
1041 2012-11-07 Eli Zaretskii <eliz@gnu.org>
1043 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
1044 such as Scroll Lock, if the respective keys are treated as
1045 function keys, not as modifiers. This avoids destroying non-ASCII
1046 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
1048 2012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
1050 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
1052 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1054 Restore some duplicate definitions (Bug#12814).
1055 This undoes part of the 2012-11-03 changes. Some people build
1056 with plain -g rather than with -g3, and they need the duplicate
1057 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
1058 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
1059 Define as macros, as well as as enums or as constants.
1061 2012-11-06 Jan Djärv <jan.h.d@swipnet.se>
1063 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
1064 to keypad keys (Bug#12816).
1066 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1068 Minor adjustments of recently-changed frame functions.
1069 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
1070 known to be a frame (we're in the FRAMEP branch).
1071 * lisp.h (Qframep): Remove decl. frame.h declares this.
1072 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
1073 since they're meant for Lisp fixnum values.
1075 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1077 * window.c (Fwindow_combination_limit): Revert to the only
1078 required argument and adjust docstring as suggested in
1079 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
1080 by Martin Rudalics <rudalics@gmx.at>.
1082 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1084 Widely used frame validity and checking functions.
1085 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
1086 * frame.c (decode_live_frame, decode_any_frame): New functions.
1087 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
1088 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
1089 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
1090 (Fframe_pointer_visible_p): Use decode_any_frame.
1091 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
1092 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
1093 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
1094 (Fframe_focus): Likewise. Allow zero number of arguments.
1096 (frame_buffer_list, frame_buffer_predicate): Remove.
1097 * lisp.h (frame_buffer_predicate): Remove prototype.
1098 * buffer.c (Fother_buffer): Use decode_any_frame.
1099 * xdisp.c (Ftool_bar_lines_needed): Likewise.
1100 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
1101 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
1102 (Fclose_font, Ffont_info): Use decode_live_frame.
1103 * fontset.c (check_fontset_name): Likewise.
1104 * terminal.c (Fframe_terminal): Likewise.
1105 * w32fns.c (check_x_frame): Likewise.
1106 * window.c (Fminibuffer_window, Fwindow_at)
1107 (Fcurrent_window_configuration): Likewise.
1108 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
1109 Likewise. Allow zero number of arguments. Adjust docstring.
1110 * dispnew.c (Fredraw_frame): Likewise.
1111 * xfaces.c (frame_or_selected_frame): Remove.
1112 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
1113 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
1114 (Fframe_face_alist): Use decode_live_frame.
1115 * xfns.c (check_x_frame): Likewise.
1117 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1119 * window.c (quad): New function.
1120 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
1121 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
1122 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
1123 (Fwindow_line_height): Use it.
1124 (Fwindow_fringes): Use list3.
1125 (Fwindow_scroll_bars): Use list4.
1126 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
1127 (Fwindow_combination_limit): Allow zero number of arguments.
1129 2012-11-05 Eli Zaretskii <eliz@gnu.org>
1131 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
1133 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
1134 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
1135 file descriptor 2 for standard error. (Bug#12805)
1137 2012-11-05 Chong Yidong <cyd@gnu.org>
1139 * process.c (wait_reading_process_output): Revert previous change.
1141 2012-11-05 Paul Eggert <eggert@cs.ucla.edu>
1143 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
1144 This removes code that has been obsolete since around 1990.
1145 * callproc.c (Fcall_process):
1147 * process.c (create_process):
1148 * term.c (dissociate_if_controlling_tty):
1149 Assume setsid exists.
1150 * callproc.c (child_setup): Assume setpgid exists and behaves as
1151 per POSIX.1-1988 or later.
1152 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
1153 * emacs.c (shut_down_emacs):
1154 * sysdep.c (sys_suspend, init_foreground_group):
1155 Assume getpgrp behaves as per POSIX.1-1998 or later.
1156 * msdos.c (setpgrp): Remove.
1157 (tcgetpgrp, setpgid, setsid): New functions.
1158 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
1159 * term.c (no_controlling_tty): Remove; unused.
1160 * w32proc.c (setpgrp): Remove.
1161 (setsid, tcgetpgrp): New functions.
1163 Simplify by assuming __fpending.
1164 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
1165 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
1166 Do not assume that __fpending's result fits in int.
1168 2012-11-04 Paul Eggert <eggert@cs.ucla.edu>
1170 Remove EMACS_OUTQSIZE+sleep hack.
1171 * dispnew.c (update_frame_1): Remove hack for terminals slower
1172 than 2400 bps, which throttled Emacs by having it sleep.
1173 This code hasn't worked since at least 2007, when the multi-tty stuff
1174 was added, and anyway those old terminals are long dead.
1175 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
1176 without the dispnew.c change, as dispnew.c doesn't include systty.h.
1178 Fix data-loss with --version (Bug#9574).
1179 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
1180 as we can't assume that emacs_strerror is initialized, and strerror
1181 is good enough here.
1182 (main): Invoke atexit earlier, to catch earlier instances of
1183 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
1185 2012-11-04 Michael Marchionna <tralfaz@pacbell.net>
1187 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
1188 (keyDown): Remap keypad keys to X11 virtual key codes.
1190 2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
1192 Fix data-loss with --batch (Bug#9574).
1193 * emacs.c: Include <close-stream.h>.
1194 (close_output_streams): New function.
1195 (main): Pass it to atexit, so that Emacs closes stdout and stderr
1196 and handles errors appropriately.
1197 (Fkill_emacs): Don't worry about flushing, as close_output_stream
1200 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
1201 The symptom is a diagnostic "GLib-WARNING **: In call to
1202 g_spawn_sync(), exit status of a child process was requested but
1203 SIGCHLD action was set to SIG_IGN and ECHILD was received by
1204 waitpid(), so exit status can't be returned." The diagnostic
1205 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
1206 The real bug is a race condition between Emacs and glib: Emacs
1207 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
1208 so that glib can't find it. Work around the bug by invoking
1209 waitpid only on subprocesses that Emacs itself creates.
1210 * process.c (create_process, record_child_status_change):
1211 Don't use special value -1 in pid field, as the caller now must
1212 know the pid rather than having the callee infer it.
1213 The inference was sometimes incorrect anyway, due to another race.
1214 (create_process): Set new 'alive' member if child is created.
1215 (process_status_retrieved): New function.
1216 (record_child_status_change): Use it.
1217 Accept negative 1st argument, which means to wait for the
1218 processes that Emacs already knows about. Move special-case code
1219 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
1220 processes that have already been waited for, by testing and
1221 clearing new 'alive' member.
1222 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
1223 now does this internally.
1224 (handle_child_signal): Let record_child_status_change do all
1225 the work, since we do not want to reap all exited child processes,
1226 only the child processes that Emacs itself created.
1227 * process.h (Lisp_Process): New boolean member 'alive'.
1229 Omit duplicate definitions no longer needed with gcc -g3.
1230 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
1231 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
1232 Define only as macros. There's no longer any need to also define
1233 these symbols as enums or as constants, since we now assume
1234 gcc -g3 when debugging.
1236 2012-11-03 Eli Zaretskii <eliz@gnu.org>
1238 * lisp.mk: Adjust comments to the fact that term/internal is now
1239 loaded from loadup.el.
1241 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
1242 (msdos_fatal_signal): New function.
1243 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
1246 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
1247 for GCC versions before 4.
1248 (emacs_raise): Define to call msdos_fatal_signal.
1250 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
1251 iterator when starting in the middle of a display or overlay
1254 2012-11-03 Chong Yidong <cyd@gnu.org>
1256 * process.c (wait_reading_process_output): Clean up the last
1259 2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
1261 * process.c (wait_reading_process_output): Avoid a race condition
1262 with SIGIO delivery (Bug#11536).
1264 2012-11-03 Chong Yidong <cyd@gnu.org>
1266 * buffer.c (cursor_type): Untabify docstring.
1268 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1270 * frame.h (struct frame): Drop can_have_scroll_bars member
1271 which is meaningless for a long time. Adjust comments.
1272 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
1273 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
1275 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1277 * window.c (decode_next_window_args): Update window arg after
1278 calling decode_live_window and so fix crash reported at
1279 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
1280 by Juanma Barranquero <lekktu@gmail.com>.
1281 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
1282 * font.c (Ffont_at): Likewise.
1284 2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
1286 * widget.c (resize_cb): New function.
1287 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
1288 (EmacsFrameResize): Check if all is up to date before changing frame
1291 2012-11-02 Eli Zaretskii <eliz@gnu.org>
1293 Implement backtrace output for fatal errors on MS-Windows.
1294 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
1295 (BACKTRACE_LIMIT_MAX): New macro.
1296 (w32_backtrace): New function.
1297 (emacs_abort): Use w32_backtrace when the user chooses not to
1298 attach a debugger. Update the text of the abort dialog.
1300 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1302 Window-related stuff cleanup here and there.
1303 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
1304 Use decode_any_window.
1305 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
1306 * xdisp.c (Fformat_mode_line): Likewise.
1307 * font.c (Ffont_at): Use decode_live_window.
1308 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
1309 * window.c (decode_next_window_args): Likewise.
1310 (decode_any_window): Remove static.
1311 * window.h (decode_any_window): Add prototype.
1312 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
1313 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
1316 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1318 Remove pad from struct input_event.
1319 * termhooks.h (struct input_event): Remove padding field.
1321 * keyboard.c (event_to_kboard): Simplify because frame_or_window
1322 member is never cons for a long time. Adjust comment.
1323 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
1324 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
1325 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
1326 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
1328 2012-11-01 Eli Zaretskii <eliz@gnu.org>
1330 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
1332 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
1334 Fix crash when using Emacs as commit editor for git (Bug#12697).
1335 * callproc.c (setpgrp): Remove macro, as we now use setpgid
1336 and it is configured in conf_post.h.
1337 (Fcall_process): Don't invoke both setsid and setpgid; the former
1338 is enough, if it exists.
1339 * callproc.c (Fcall_process, child_setup):
1340 * process.c (create_process): Use setpgid.
1341 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
1343 * dispnew.c (init_display): Initialize the foreground group
1344 if we are running a tty display.
1345 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
1346 * lisp.h (init_foreground_group): New decl.
1347 * sysdep.c (inherited_pgroup): New static var.
1348 (init_foreground_group, tcsetpgrp_without_stopping)
1349 (narrow_foreground_group, widen_foreground_group): New functions.
1350 (init_sys_modes): Narrow foreground group.
1351 (reset_sys_modes): Widen foreground group.
1353 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
1355 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
1357 2012-10-31 Martin Rudalics <rudalics@gmx.at>
1359 * minibuf.c (read_minibuf): Restore current buffer since
1360 choose_minibuf_frame calling Fset_frame_selected_window may
1361 change it (Bug#12766).
1363 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
1365 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
1367 2012-10-30 Kenichi Handa <handa@gnu.org>
1369 * font.c (Ffont_at): If WINDOW is specified and it is not
1370 displaying the current buffer, signal an error.
1372 2012-10-29 Daniel Colascione <dancol@dancol.org>
1374 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
1375 In preparation for fixing bug#12739, move these functions from
1378 * coding.h, coding.c: ... to here, and compile them only when
1379 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
1380 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
1382 2012-10-28 Eli Zaretskii <eliz@gnu.org>
1384 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
1385 (timer_loop, getitimer, setitimer): Use it instead of
1386 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
1388 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
1391 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
1393 * nsterm.m (NO_APPDEFINED_DATA): New define.
1394 (last_appdefined_event_data): New variable
1395 (last_appdefined_event): Remove.
1396 (ns_select): Initialize t from last_appdefined_event_data instead
1397 of [last_appdefined_event data1].
1398 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
1399 remove last_appdefined_event (Bug#12698).
1401 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
1403 * frame.c (x_set_font): Catch internal error.
1405 2012-10-27 Eli Zaretskii <eliz@gnu.org>
1407 Avoid overflow in w32 implementation of interval timers.
1408 When possible, for ITIMER_PROF count only times the main thread
1410 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
1411 'volatile ULONGLONG' types. All the other data which was
1412 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
1413 (GetThreadTimes_Proc): New typedef.
1414 (w32_get_timer_time): New function, returns a suitable time value
1416 (timer_loop): Enter critical section when accessing ULONGLONG
1417 values of the itimer_data struct, as these accesses are no longer
1418 atomic. Call 'w32_get_timer_time' instead of 'clock'.
1419 Remove unused variable.
1420 (init_timers): Initialize s_pfn_Get_Thread_Times.
1421 (start_timer_thread): Don't assign itimer->caller_thread here.
1422 (getitimer): Assign itimer->caller_thread here.
1423 (setitimer): Always call getitimer to get the value of ticks_now.
1424 (sys_spawnve): Avoid compiler warning about format mismatch.
1426 2012-10-26 Eli Zaretskii <eliz@gnu.org>
1428 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
1429 mouse movement events if the menu bar is active. This avoids
1430 producing a busy "hour-glass" cursor by Windows if the mouse
1431 pointer is positioned over a tooltip shown for some menu item.
1433 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
1435 Don't assume process IDs fit in int.
1436 * emacs.c (shut_down_emacs) [!DOS_NT]:
1437 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
1438 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
1439 Use pid_t, not int, to store process IDs, as 'int'
1440 is not wide enough on a few platforms (e.g., AIX and IRIX).
1442 2012-10-23 Kenichi Handa <handa@gnu.org>
1444 The following change is to make face-font-rescale-alist work
1445 correctly for non-ASCII fonts.
1447 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
1448 (font_open_for_lface): Handle Vface_font_rescale_alist.
1450 2012-10-23 Chong Yidong <cyd@gnu.org>
1452 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
1454 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
1456 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
1458 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
1460 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
1463 2012-10-21 Glenn Morris <rgm@gnu.org>
1465 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
1467 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
1469 Port to OpenBSD 5.1.
1470 * frame.c (Fmouse_position, Fmouse_pixel_position):
1471 * xdisp.c (produce_stretch_glyph):
1472 Declare local vars only when they're needed.
1473 This is clearer and avoids a warning on OpenBSD about unused vars.
1474 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
1475 This is safer, and avoids OpenBSD warnings about unused vars.
1476 * keyboard.c (record_menu_key): Remove unnecessary decl.
1477 (poll_timer): Define only if POLL_FOR_INPUT is defined.
1478 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
1479 as our definition clashes with OpenBSD's.
1480 * xfaces.c (load_face_colors, check_lface_attrs)
1481 (get_lface_attributes_no_remap, get_lface_attributes)
1482 (lface_fully_specified_p, x_supports_face_attributes_p)
1483 (tty_supports_face_attributes_p, face_fontset, realize_face)
1484 (realize_x_face, realize_tty_face):
1485 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
1486 merely Lisp_Object *. This is more informative and avoids
1487 a warning on OpenBSD about accessing beyond an object's size.
1489 2012-10-20 Chong Yidong <cyd@gnu.org>
1491 * lread.c (Fload): Doc fix (Bug#12592).
1493 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
1495 * font.c (Ffont_at): Fix previous change.
1497 2012-10-19 Eli Zaretskii <eliz@gnu.org>
1499 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
1500 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
1503 * alloc.c (NSTATICS): Decrease to 0x800.
1505 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
1507 * fns.c (Fnreverse): Include the problem element when signalling an
1510 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
1512 * nsterm.m (ns_select): Check writefds before call to
1513 FD_ISSET (Bug#12668).
1515 2012-10-18 Daniel Colascione <dancol@dancol.org>
1517 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
1518 (staticpro): If we run out of staticpro slots, die with an
1519 informative error instead of just calling emacs_abort.
1521 2012-10-18 Martin Rudalics <rudalics@gmx.at>
1523 Fix two flaws reported by Dmitry Antipov.
1524 * window.c (Ftemp_output_buffer_show): Remove.
1525 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
1526 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
1528 2012-10-17 Eli Zaretskii <eliz@gnu.org>
1530 * makefile.w32-in ($(BLD)/w32.$(O)):
1531 ($(BLD)/vm-limit.$(O)):
1533 ($(BLD)/unexw32.$(O)):
1534 ($(BLD)/fileio.$(O)):
1535 ($(BLD)/dispnew.$(O)): Update dependencies.
1537 * w32term.h (w32_initialize_display_info, initialize_w32_display):
1540 * w32proc.c: Include ctype.h.
1542 * w32.h (init_environment, check_windows_init_file)
1543 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
1544 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
1545 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
1546 (sys_link): Add prototypes.
1548 * w32.c: Include w32select.h.
1549 (sys_access, e_malloc, sys_select): Add prototypes.
1550 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
1552 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
1554 * unexw32.c: Include lisp.h and w32.h.
1556 * term.c [WINDOWSNT]: Include w32term.h.
1558 * process.c [WINDOWSNT]: Add prototype of sys_select.
1560 * fileio.c [WINDOWSNT]: Include w32.h.
1562 * dispnew.c [WINDOWSNT]: Include w32.h.
1564 * cygw32.c (Fcygwin_convert_path_to_windows)
1565 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
1566 Lisp_Object values. (Bug#12661)
1568 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
1569 to Lisp_Object. (Bug#12661)
1571 2012-10-17 Kenichi Handa <handa@gnu.org>
1573 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
1576 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1578 * buffer.c (Fkill_buffer): When unchaining the marker,
1579 reset its buffer pointer to NULL (Bug#12652).
1581 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1583 Do not verify indirection counters of killed buffers (Bug#12579).
1584 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
1585 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
1587 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1589 * alloc.c (Fmake_byte_code): Fix typo in comment.
1590 * print.c (print_interval): Define as static to match prototype.
1591 * indent.c (disptab_matches_widthtab, recompute_width_table):
1594 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1596 * editfns.c (get_system_name): Remove.
1597 * lisp.h (get_system_name): Remove prototype.
1598 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
1599 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
1601 2012-10-15 Daniel Colascione <dancol@dancol.org>
1603 * dbusbind.c: Add comment explaining reason for previous change.
1605 2012-10-15 Martin Rudalics <rudalics@gmx.at>
1607 * window.c (Fwindow_end): Rewrite check whether cached position
1608 can be used (Bug#12600).
1609 (resize_frame_windows, grow_mini_window, shrink_mini_window):
1610 Set windows_or_buffers_changed.
1612 2012-10-15 Daniel Colascione <dancol@dancol.org>
1614 * dbusbind.c: Fix cygw32 build break when compiling with dbus
1615 enabled by undefining the symbol "interface", which the platform
1616 headers define to something incompatible.
1618 2012-10-14 Daniel Colascione <dancol@dancol.org>
1620 * image.c (init_tiff_functions, init_imagemagick_functions)
1621 (init_svg_functions): Fix cygw32 build break by using these
1622 functions only when WINDOWSNT _and_ HAVE_NTGUI.
1624 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
1626 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
1628 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
1630 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
1632 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
1634 * coding.c (detect_coding): Set coding->id before calling
1637 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
1639 * fileio.c: Formatting fixes.
1641 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
1643 Fix some stat-related races.
1644 * fileio.c (Fwrite_region): Avoid race condition if a file is
1645 removed or renamed by some other process immediately after Emacs
1646 writes it but before Emacs stats it. Do not assume that stat (or
1648 * image.c (slurp_file): Resolve the file name with fopen + fstat
1649 rather than stat + fopen.
1650 (pbm_read_file) [0]: Remove unused code with stat race.
1651 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
1652 Remove ineffective code with stat race.
1654 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
1656 * doc.c (get_doc_string): Don't signal an error if the file is missing.
1658 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
1660 * nsterm.m (hold_event_q): New static variable.
1661 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
1663 (hold_event): New function.
1664 (ns_read_socket): If hold_event_q have events, store them and
1666 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
1667 is zero (Bug#12384).
1669 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
1671 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
1673 2012-10-12 Eli Zaretskii <eliz@gnu.org>
1675 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
1677 * fileio.c (check_existing): New function.
1678 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
1679 instead of calling 'stat', when what's needed is to check whether
1680 a file exists. This avoids expensive system calls on MS-Windows.
1683 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
1685 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
1686 determine whether a file exists and is not a directory.
1688 * lisp.h (check_existing): Add prototype.
1690 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
1692 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
1694 2012-10-12 Glenn Morris <rgm@gnu.org>
1696 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
1698 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
1700 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
1702 * eval.c (Fautoload): Remember previous autoload status in load-history.
1704 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
1706 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
1707 * lread.c (load_each_byte, new_backquote_flag, readchar)
1708 (read_filtered_event, lisp_file_lexically_bound_p)
1709 (safe_to_load_version, Fload, complete_filename_p, openp)
1710 (build_load_history, readevalloop, read_escape, read1)
1711 (string_to_number, read_vector, read_list):
1712 * macros.c (Fstart_kbd_macro):
1713 * marker.c (CONSIDER):
1714 * menu.c (parse_single_submenu, digest_single_submenu)
1715 (find_and_return_menu_selection, Fx_popup_menu):
1716 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
1718 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
1720 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
1721 (xmenu_show, xdialog_show):
1722 Use bool for booleans.
1723 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
1724 as it's not a predicate. All uses changed. Omit unnecessary
1727 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
1729 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
1730 (save_excursion_restore): Do not restore mark if it was not saved.
1732 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
1734 * marker.c (cached_modiff): EMACS_INT, not int.
1736 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
1737 instead of having a wrong decl.
1738 * nsmenu.m (waiting_for_input): Remove wrong decl.
1740 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1742 keyboard.c, keymap.c: Use bool for booleans.
1743 * dispnew.c (sit_for): Distinguish between 3-way display_option
1744 and boolean do_display.
1745 * keyboard.c (single_kboard, this_command_key_count_reset)
1746 (waiting_for_input, echoing, immediate_quit, input_pending)
1747 (interrupt_input, interrupts_deferred, pop_kboard)
1748 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
1749 (command_loop_1, adjust_point_for_property)
1750 (safe_run_hooks_error, input_polling_used, read_char):
1751 (help_char_p, readable_events, kbd_buffer_events_waiting)
1752 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
1753 (lucid_event_type_list_p, get_input_pending):
1754 (gobble_input, menu_separator_name_p, menu_bar_item)
1755 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
1756 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
1757 (keyremap_step, test_undefined, read_key_sequence)
1758 (detect_input_pending, detect_input_pending_ignore_squeezables)
1759 (detect_input_pending_run_timers, requeued_events_pending_p)
1760 (quit_throw_to_read_char, Fset_input_interrupt_mode):
1761 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
1762 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
1763 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
1764 (accessible_keymaps_1, Fkey_description, push_key_description):
1765 (shadow_lookup, struct where_is_internal_data)
1766 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
1767 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
1768 (describe_map, describe_vector):
1769 * menu.c (single_menu_item):
1770 * nsmenu.m (ns_update_menubar):
1771 * process.c (wait_reading_process_output):
1772 * search.c (scan_buffer, scan_newline):
1773 Use bool for boolean.
1774 * keyboard.c (timers_run, swallow_events)
1775 (detect_input_pending_run_timers):
1776 * process.c (wait_reading_process_output):
1777 Use unsigned for counter where wraparound-on-overflow is desired,
1778 since unsigned is guaranteed to have that behavior and signed is not.
1779 (read_char): Use ptrdiff_t for string length.
1780 (get_input_pending): Remove first argument, since it was always
1781 the same pointer-to-int (now pointer-to-boolean) &input_pending,
1782 and behave as if it had that value. Return new value of
1783 input_pending. All callers changed.
1784 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
1785 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
1787 * keymap.c (push_key_description): Omit last arg, which was always 1.
1788 All callers changed.
1790 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
1792 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
1794 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
1795 ($(BLD)/term.$(O)): Update dependencies.
1797 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
1799 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
1800 * lisp.h (enum pvec_type): Adjust comments and omit explicit
1801 initializer for PVEC_NORMAL_VECTOR.
1803 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1805 Clean out old termopts cruft.
1806 * termopts.h (flow_control, meta_key): Remove unused decls.
1807 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
1808 Don't include termopts.h.
1810 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
1812 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
1814 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
1816 * commands.h (immediate_quit): Remove duplicate decl.
1818 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
1820 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
1822 (nsfont_open): Remove setting of Vfonts_in_cache.
1823 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
1825 2012-10-09 Eli Zaretskii <eliz@gnu.org>
1827 * w32fns.c (w32_last_error): Change the return value to DWORD, to
1828 match what GetLastError returns. Explain why the function is
1831 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
1832 'is_tooltip_frame', to avoid confusion with its global namesake.
1834 2012-10-08 Daniel Colascione <dancol@dancol.org>
1836 * xdisp.c (start_hourglass): Call w32_note_current_window when
1837 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
1838 build that caused Emacs to display the hourglass cursor forever.
1840 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
1841 which is broken under remote desktop, calculate the number of
1842 colors available for a display based on the display's number of
1843 planes and number of bits per pixel per plane. (bug#10397).
1845 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
1847 * nsfont.m (Vfonts_in_cache): New variable.
1848 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
1849 are used. Add cached fonts to Vfonts_in_cache.
1850 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
1852 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
1854 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
1856 (FONT_H): Define after FRAME_H.
1857 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
1858 Update dependencies.
1860 * w32term.c: Remove leftover declaration of keyboard_codepage.
1862 2012-10-08 Eli Zaretskii <eliz@gnu.org>
1864 * makefile.w32-in (FONT_H): Add $(FRAME_H).
1865 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
1866 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
1867 (GLOBAL_SOURCES): Add cygw32.c.
1868 ($(BLD)/unexw32.$(O)):
1870 ($(BLD)/w32console.$(O)):
1871 ($(BLD)/w32fns.$(O)):
1872 ($(BLD)/w32heap.$(O)):
1873 ($(BLD)/w32menu.$(O)):
1874 ($(BLD)/w32proc.$(O)): Add w32common.h.
1876 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
1878 (x_to_w32_color): Don't modify the argument, modify a copy instead.
1880 2012-10-08 Daniel Colascione <dancol@dancol.org>
1882 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
1883 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
1884 accidental message numbering hole. Change other messages to
1887 * w32select.h (HAVE_W32SELECT): Remove.
1889 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
1890 w32common.h instead of w32heap.h.
1892 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
1893 (get_allocation_unit, get_processor_type, get_w32_major_version)
1894 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
1895 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
1896 (OS_NT, os_subtype, cache_system_info): Move declarations to
1899 * w32heap.c: Include w32common.h.
1900 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
1901 (w32_minor_version, w32_build_number, w32_subtype):
1902 Remove duplicate definitions.
1904 * w32fns.c: Include w32common.h; include w32heap.h only in
1907 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
1908 Use `report_file_error' instead of `error' in order to better
1909 inform users of what went wrong. Increase NTGUI_UNICODE file
1910 dialog box file name length to 32k, the maximum allowed by the NT
1913 * w32common.h: New file.
1914 (ROUND_UP, ROUND_DOWN, get_page_size)
1915 (get_allocation_unit, get_processor_type, get_w32_major_version)
1916 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
1917 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
1918 (OS_NT, os_subtype, cache_system_info): Move here.
1920 * unexw32.c, unexcw.c: Include w32common.h.
1922 * emacs.c (main): Use (defined (WINDOWSNT) || defined
1923 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
1924 to call syms_of_w32select.
1926 * cygw32.h: Remove obsolete EXFUN declarations.
1928 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
1930 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
1931 of w32inevt.o from SOME_MACHINE_OBJECTS.
1933 2012-10-08 Daniel Colascione <dancol@dancol.org>
1935 * image.c: Permanent fix for JPEG compilation issue --- limit
1936 jpeglib `boolean' redefinition to Cygwin builds.
1938 2012-10-08 Eli Zaretskii <eliz@gnu.org>
1940 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
1942 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
1945 2012-10-08 Daniel Colascione <dancol@dancol.org>
1947 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
1948 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
1949 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
1950 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
1951 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
1952 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
1953 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
1954 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
1955 now a supported configuration.
1957 * Makefile.in: consolidate image variables into LIBIMAGE; add
1958 W32_OBJ and W32_LIBS. Compile new files.
1961 (_DebPrint) declare tracing facility for W32 debugging. We need
1962 to unify tracing later.
1964 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
1965 unconditional use of W32 Unicode functions. Cygwin runs only on
1966 100% Unicode operating systems.
1968 * cygw32.c: New file. Define Cygwin-specific facilities.
1969 (Fcygwin_convert_path_to_windows)
1970 (Fcygwin_convert_path_from_windows): New user functions for
1971 accessing Cygwin path-munging routines.
1973 * cygw32.h: New file.
1974 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
1975 UTF-16LE strings temporarily inside non-Lisp-visible string
1978 (w32_strerror): Just what it says on the tin.
1980 * emacs.c: Make the NS fork-then-exec code for daemon-launching
1981 also run for Cygwin; both systems have the same problem with using
1982 GUI facilities in a forked child. Also call syms_of_cygw32,
1983 syms_of_w32select in correct places.
1985 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
1986 needs fork-then-exec for daemon launching.
1988 * font.h: Include frame.h.
1990 * image.c: Use the image library cache machinery only when we're
1991 compiling for native WINDOWSNT; Cygwin can use shared libraries
1992 like any other Unixlike system.
1994 * keyboard.c: Clarify a comment regarding the input loop.
1996 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
1997 functions directly instead of trying to detect at runtime that our
1998 host operating system supports them. We make this change for two
1999 reasons: Cygwin lacks support for the multibyte character
2000 conversion functions used by the legacy menu code, and Cygwin
2001 never needs to rely on non-Unicode APIs.
2003 * unexw32.c (hinst): Declare extern.
2005 * w32.c: Change header order;
2006 (w32_strerror): Move to w32fns.c because we need it for
2007 non-WINDOWSNT builds.
2009 * w32.h: Add #error macro to make sure we don't include w32.h for
2010 Cygwin builds. Remove w32select declarations.
2012 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
2013 w32fns.c. w32console.c is WINDOWSNT-only.
2015 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
2016 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
2018 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
2019 (w32_major_version, w32_minor_version, w32_build_number)
2020 (os_subtype, sound_type): Define here
2021 (w32_defined_color): Make color parameter const for consistency
2022 with other _defined_color functions.
2023 (w32_createwindow): Unconditionally call w32_init_class instead of
2024 doing so only when hprevinst is non-NULL. Plumbing hprevinst
2025 through the code is complex and unnecessary because class
2026 registration is practically free.
2027 (w32_name_of_message): New EMACSDEBUG-only function.
2028 (Fset_message_beep): Move here
2029 (Fx_open_connection): Require that the display name for Windows be
2030 "w32" for consistency, emacsclient disambiguation, and maybe, one
2031 day, multi-window-system support.
2032 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
2033 Cygwin files for W32 GUI facilities, since these clearly don't
2034 expect Cygwin names.
2035 (_DebPrint): Define.
2036 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
2037 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
2038 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
2039 (w32_last_error): Remove.
2041 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
2043 * w32heap.c (syspage_mask): Declare here.
2044 (cache_system_info): Remove.
2046 * w32inevt.c (faked_key): Define globally, not statically.
2047 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
2048 (w32_console_toggle_lock_key): Move to w32fns.c.
2050 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
2052 * w32proc.c (_DebPrint): Move to w32fns.c.
2053 * w32select.c: Include string.h, stdio.h for Cygwin.
2054 * w32select.h: New File.
2056 * w32term.c: Include io.h for non-CYGWIN builds; needed for
2058 (w32_message_fd): New variable. Under Cygwin, holds the file
2059 descriptor the system used to tell us about pending thread
2062 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
2063 that prevented compilation under non-WINDOWSNT systems.
2065 (w32_initialize): Open /dev/windows and assign it to
2066 w32_message_fd. Provide w32 feature.
2068 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
2069 (WM_EMACS_INPUT_READY): add.
2070 (prepend_msg, w32_message_fd): Declare globally.
2073 (keyboard_handle): Use only when WINDOWSNT.
2074 (notify_msg_ready): New function. Posts a message to the main
2075 thread's message queue under CYGWIN, which wakes up the main
2076 thread from select(2) by making the /dev/windows file descriptor
2077 ready. Under WINDOWSNT, it sets an event the same way the old
2080 (post, prepend_msg): Actually call notify_msg_ready instead of
2081 setting the input event directly.
2083 2012-10-07 Eli Zaretskii <eliz@gnu.org>
2085 * ralloc.c (relinquish): If a heap is ready to be relinquished,
2086 but it still has blocs in it, don't return it to the system,
2087 instead of aborting. (Bug#12402)
2089 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
2091 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
2093 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
2094 MAC_OS_X_VERSION_10_6.
2095 (syms_of_nsterm): Remove comment about Panther and above for
2097 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
2098 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
2099 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
2101 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
2102 MAC_OS_X_VERSION_10_4.
2104 * nsmenu.m (fillWithWidgetValue:): Remove code for <
2105 MAC_OS_X_VERSION_10_2.
2107 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
2109 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
2110 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
2112 * nsterm.m (ns_in_resize): Remove (Bug#12479).
2113 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
2114 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
2115 Remove ns_in_resize check.
2116 (ns_clear_frame_area): Remove resize handle code.
2118 * nsfns.m (ns_in_resize): Remove.
2119 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
2120 Remove ns_in_resize check.
2122 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
2124 Improve sys_siglist detection.
2125 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
2126 defined as a macro, as is done in Solaris.
2127 (sys_siglist_entries): New macro.
2128 (save_strsignal): Use it.
2129 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
2130 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
2132 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
2134 * nsfns.m (Fx_create_frame): Call x_default_parameter with
2135 fullscreen/Fullscreen.
2137 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
2138 tobar_height is new.
2140 * nsterm.m (x_make_frame_visible): Check for fullscreen.
2141 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
2142 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
2143 (windowDidResize:): Check for correct window if old style fullscreen.
2144 Capitalize word in comment. Remove incorrect comment.
2145 (initFrameFromEmacs:): tbar_height renamed tibar_height.
2146 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
2147 error in drawing background.
2148 (toggleFullScreen:): Remove comment. Rearrange calls.
2149 Set toolbar values to zero, save old height in tobar_height.
2150 Restore tool bar height when leaving fullscreen.
2151 (canBecomeMainWindow): New function.
2153 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
2155 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
2157 2012-10-05 Eli Zaretskii <eliz@gnu.org>
2159 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
2161 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
2162 that time stamps of directories could also be changed.
2163 Don't request the too broad GENERIC_WRITE, only the more restrictive
2164 FILE_WRITE_ATTRIBUTES access rights.
2166 * fileio.c (Fset_file_times): Special-case ignoring errors for
2167 directories only on MSDOS, not on MS-Windows.
2169 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
2171 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
2173 2012-10-04 Eli Zaretskii <eliz@gnu.org>
2175 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
2176 see whether CreateFile failed.
2178 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
2180 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
2181 to avoid similar races.
2182 * keyboard.c (pending_signals): Now bool, not int.
2184 Port timers to OpenBSD, plus check for timer failures.
2185 OpenBSD problem reported by Han Boetes.
2186 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
2188 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
2189 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
2190 like OpenBSD, which has timer_settime but does not declare it.
2191 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
2192 whether to use itimerspec-related primitives. All uses of
2193 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
2195 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2197 * profiler.c (handle_profiler_signal): Fix a malloc race
2198 that caused Emacs to hang on Fedora 17 when profiling Lisp.
2200 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
2202 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
2204 2012-10-02 Eli Zaretskii <eliz@gnu.org>
2206 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
2207 consistent with the change in return value of 'safe_strsignal'.
2209 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2211 Prefer plain 'static' to 'static inline' (Bug#12541).
2212 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
2213 (bidi_set_sor_type, bidi_push_embedding_level)
2214 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
2215 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
2216 (bidi_cache_search, bidi_cache_ensure_space)
2217 (bidi_cache_iterator_state, bidi_cache_find)
2218 (bidi_peek_at_next_level, bidi_set_paragraph_end)
2219 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
2220 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
2221 Now 'static', not 'static inline'.
2223 Count overruns when profiling; change units to ns.
2224 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
2225 Give extra weight to samples after overruns, to attempt to count
2226 the time more accurately.
2227 (setup_cpu_timer): Change sampling interval units from ms to ns, since
2228 the underlying primitives nominally do ns.
2229 (Fprofiler_cpu_start): Document the change. Mention that
2230 the sampling intervals are only approximate.
2232 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2234 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
2236 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
2237 case for the special 0 coding-system.
2239 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
2240 (Fmake_overlay): Remove redundant tests.
2241 (fix_start_end_in_overlays): Remove redundant recentering.
2243 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
2245 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
2246 Update dependencies.
2248 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2250 Fix a malloc race condition involving strsignal.
2251 A signal can arrive in the middle of a malloc, and Emacs's signal
2252 handler can invoke strsignal, which can invoke malloc, which is
2253 not portable. This race condition bug makes Emacs hang on GNU/Linux.
2254 Fix it by altering the signal handler so that it does not invoke
2256 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
2257 * process.c (status_message): Use const pointer, in case strsignal
2258 is #defined to safe_strsignal.
2259 * sysdep.c (sys_siglist, init_signals): Always define and
2260 initialize a substitute sys_siglist if the system does not define
2261 one, even if HAVE_STRSIGNAL.
2262 (safe_strsignal): Rename from strsignal. Always define,
2263 using sys_siglist. Return a const pointer.
2264 * syssignal.h (safe_strsignal): New decl.
2265 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
2267 2012-10-01 Eli Zaretskii <eliz@gnu.org>
2269 * w32proc.c (timer_loop): Fix code that waits for timer
2270 expiration, to avoid high CPU usage.
2272 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2274 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
2275 (sweep_weak_table): Remove redundant prototypes.
2277 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
2279 * emacs.c: Move the inclusion of TERM_HEADER after including
2280 windows.h on WINDOWSNT. This avoids compilation problems with
2283 2012-10-01 Eli Zaretskii <eliz@gnu.org>
2285 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
2286 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
2287 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
2288 as the previous version used 'void *'.
2290 * ralloc.c (ROUNDUP): Fix last change.
2291 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
2294 * w32proc.c <disable_itimers>: New static flag.
2295 (init_timers): Initialize it to zero, after creating the critical
2296 sections used by the timer threads.
2297 (term_timers): Set to 1 before deleting the critical sections.
2298 (getitimer, setitimer): If disable_itimers is non-zero, return an
2299 error indication without doing anything. Reported by Fabrice
2300 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
2301 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
2303 [!HAVE_SETITIMER]: Behave as the previous version that didn't
2306 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
2307 term_ntproc after all the other bookkeeping, to get timers working
2308 as long as possible.
2310 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2312 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
2313 Suggested by Juri Linkov in
2314 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
2316 Prefer plain 'static' to 'static inline' (Bug#12541).
2317 With static functions, modern compilers inline pretty well by
2318 themselves; advice from programmers often hurts as much as it helps.
2319 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
2320 this change shrinks the text size of the Emacs executable by 1.1%
2321 without affecting CPU significantly in my benchmark.
2322 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
2323 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
2324 (mark_maybe_object, mark_maybe_pointer, bounded_number):
2325 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2326 (bset_auto_fill_function, bset_auto_save_file_format)
2327 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2328 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2329 (bset_cache_long_line_scans, bset_case_fold_search)
2330 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2331 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2332 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2333 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2334 (bset_header_line_format, bset_indicate_buffer_boundaries)
2335 (bset_indicate_empty_lines, bset_invisibility_spec)
2336 (bset_left_fringe_width, bset_major_mode, bset_mark)
2337 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2338 (bset_name, bset_overwrite_mode, bset_pt_marker)
2339 (bset_right_fringe_width, bset_save_length)
2340 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2341 (bset_scroll_up_aggressively, bset_selective_display)
2342 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2343 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
2344 (set_buffer_overlays_after):
2345 * category.c (bset_category_table):
2346 * charset.c (read_hex):
2347 * coding.c (produce_composition, produce_charset)
2348 (handle_composition_annotation, handle_charset_annotation)
2350 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
2351 (assign_row, set_frame_matrix_frame, make_current)
2353 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
2354 * fns.c (maybe_resize_hash_table):
2355 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
2356 * gmalloc.c (register_heapinfo):
2357 * image.c (lookup_image_type):
2358 * intervals.c (set_interval_object, set_interval_left)
2359 (set_interval_right, copy_interval_parent, rotate_right)
2360 (rotate_left, balance_possible_root_interval):
2361 * keyboard.c (kset_echo_string, kset_kbd_queue)
2362 (kset_keyboard_translate_table, kset_last_prefix_arg)
2363 (kset_last_repeatable_command, kset_local_function_key_map)
2364 (kset_overriding_terminal_local_map, kset_real_last_command)
2365 (kset_system_key_syms, clear_event, set_prop):
2366 * lread.c (digit_to_number):
2367 * marker.c (attach_marker, live_buffer, set_marker_internal):
2368 * nsterm.m (ns_compute_glyph_string_overhangs):
2369 * process.c (pset_buffer, pset_command)
2370 (pset_decode_coding_system, pset_decoding_buf)
2371 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
2372 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
2373 (pset_status, pset_tty_name, pset_type, pset_write_queue):
2374 * syntax.c (bset_syntax_table, dec_bytepos):
2375 * terminal.c (tset_param_alist):
2376 * textprop.c (interval_has_some_properties)
2377 (interval_has_some_properties_list):
2378 * window.c (wset_combination_limit, wset_dedicated)
2379 (wset_display_table, wset_hchild, wset_left_fringe_width)
2380 (wset_left_margin_cols, wset_new_normal, wset_new_total)
2381 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2382 (wset_right_fringe_width, wset_right_margin_cols)
2383 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
2384 (wset_vertical_scroll_bar_type, wset_window_parameters):
2385 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2386 (wset_column_number_displayed, wset_region_showing)
2387 (window_box_edges, run_window_scroll_functions)
2388 (append_glyph_string_lists, prepend_glyph_string_lists)
2389 (append_glyph_string, set_glyph_string_background_width)
2390 (append_glyph, append_composite_glyph)
2391 (take_vertical_position_into_account):
2392 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
2393 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
2394 (lface_hash, lface_same_font_attributes_p, lookup_face):
2395 * xml.c (libxml2_loaded_p):
2396 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
2397 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
2398 Now 'static', not 'static inline'.
2401 (bidi_copy_it): Do the whole copy with a single memcpy.
2402 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
2404 Revert the FOLLOW-SYMLINKS change for file-attributes.
2405 Doing it right would require several changes to Tramp, and there's
2406 not enough time to get that tested before the freeze today.
2407 * dired.c (directory_files_internal, Ffile_attributes):
2410 * frame.c (x_report_frame_params): Port better to wider ints.
2411 Do not assume that EMACS_UINT is the same width as uprintmax_t,
2412 or that pointers can be printed in 15 decimal digits.
2413 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
2415 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
2417 Support x64 build on MS-Windows.
2418 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
2419 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
2420 compatibility with x64.
2421 (x_get_focus_frame): Add prototype.
2423 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
2424 defining an XRectangle structure.
2426 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
2427 arithmetics for compatibility with x64.
2429 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
2430 compatibility with x64.
2432 * w32heap.h: Adjust prototypes and declarations.
2434 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
2435 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
2436 DWORD, long, and unsigned long, for compatibility with x64.
2437 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
2438 (sbrk): Argument is now of type ptrdiff_t.
2440 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
2442 (w32_msg_pump): Use WPARAM type for 'result'.
2444 * w32.c (init_environment, get_emacs_configuration): Support AMD64
2446 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
2447 compatibility with x64.
2449 * vm-limit.c (lim_data): Now size_t.
2450 (check_memory_limits): Adjust prototypes of real_morecore and
2451 __morecore to receive argument of type ptrdiff_t. Use size_t for
2452 five_percent and data_size.
2454 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
2455 variables, for compatibility with x64.
2456 (rva_to_section, offset_to_section, relocate_offset)
2457 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
2458 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
2459 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
2460 for compatibility with x64.
2462 * sysdep.c (STDERR_FILENO): Define if not already defined.
2464 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
2465 (__morecore): Argument type is now ptrdiff_t.
2466 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
2467 (relinquish): Use ptrdiff_t type for 'excess'.
2468 (r_alloc_sbrk): Argument type is now ptrdiff_t.
2470 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
2471 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
2472 instead of a literal number.
2474 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
2475 (min): Define only if not already defined.
2477 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
2478 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
2481 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
2482 'bitmaps' is a pointer.
2484 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
2486 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
2488 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2490 file-attributes has a new optional arg FOLLOW-SYMLINKS.
2491 * dired.c (directory_files_internal, Ffile_attributes):
2492 New arg follow_symlinks. All uses changed.
2494 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
2496 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
2498 2012-09-30 Eli Zaretskii <eliz@gnu.org>
2500 Support atimers and CPU profiler via profile.c on MS-Windows.
2501 * w32proc.c (sig_mask, crit_sig): New static variables.
2502 (sys_signal): Support SIGALRM and SIGPROF.
2503 (sigemptyset, sigaddset, sigfillset, sigprocmask)
2504 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
2505 sigfillset, and sigprocmask are no longer no-ops.
2506 (sigismember): New function.
2507 (struct itimer_data): New definition.
2508 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
2509 (crit_prof): New static variables.
2510 (MAX_SINGLE_SLEEP): New definition.
2511 (timer_loop, stop_timer_thread, term_timers, init_timers)
2512 (start_timer_thread, getitimer, setitimer): New functions.
2513 (alarm): No longer a no-op, calls setitimer.
2515 * w32.c (term_ntproc): Call term_timers.
2516 (init_ntproc): Make sure all signals are unblocked at startup, to
2517 erase any traces of dumping. Call init_timers.
2519 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
2520 Windows-specific code to display the hourglass mouse pointer is no
2522 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
2523 to hourglass timer expiration.
2524 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
2525 Remove, no longer used.
2526 (w32_note_current_window, show_hourglass, hide_hourglass):
2527 New functions, in support of hourglass cursor display similar to other
2529 (syms_of_w32fns): Don't initialize hourglass_timer.
2531 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
2533 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
2535 * w32.h (init_timers, term_timers): Add prototypes.
2537 2012-09-30 Kenichi Handa <handa@gnu.org>
2539 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
2540 to the buffer relocation which may be caused by ccl_driver.
2542 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
2544 * xfns.c (Fx_file_dialog): Update comment.
2546 * w32fns.c (Fx_file_dialog): Update comment.
2548 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
2549 Initialize panel name field if OSX >= 10.6.
2551 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
2553 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
2555 * nsterm.m (NEW_STYLE_FS): New define.
2556 (ns_fullscreen_hook, windowWillEnterFullScreen)
2557 (windowDidEnterFullScreen, windowWillExitFullScreen)
2558 (windowDidExitFullScreen, toggleFullScreen, handleFS)
2559 (setFSValue): New functions.
2560 (EmacsFSWindow): New implementation.
2561 (canBecomeKeyWindow): New function for EmacsFSWindow.
2562 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
2563 (dealloc): Release nonfs_window if in fullscreen.
2564 (updateFrameSize:): Call windowDidMove to update top/left.
2565 (windowWillResize:toSize:): Check if frame is still maximized.
2566 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
2567 next_maximized, maximized_width, maximized_height and nonfs_window.
2568 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
2570 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
2571 fullscreen. Set maximized_width/height. Act on next_maximized.
2573 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
2574 (EmacsView): Add variables for fullscreen.
2575 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
2576 (EmacsFSWindow): New interface for fullscreen.
2578 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
2580 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2582 2012-09-30 Chong Yidong <cyd@gnu.org>
2584 * fns.c (Frandom): Doc fix.
2586 2012-09-30 Martin Rudalics <rudalics@gmx.at>
2588 * window.c (Vwindow_combination_limit): New default value.
2589 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
2591 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2593 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
2594 Suggested by Eli Zaretskii in
2595 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
2597 2012-09-30 Eli Zaretskii <eliz@gnu.org>
2599 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
2600 HAVE_TIMER_SETTIME is defined.
2602 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2604 Profiler improvements: more-accurate timers, overflow checks.
2605 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
2606 signal.h, setjmp.h. Include systime.h instead.
2607 (saturated_add): New function.
2608 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
2609 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
2610 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
2612 (enum profiler_cpu_running): New enum.
2613 (profiler_cpu_running): Now of that enum type, not bool.
2614 All uses changed to store the new value.
2615 (handle_profiler_signal): Rename from sigprof_handler_1,
2616 for consistency with other handlers. Do not check whether
2617 cpu_log is a hash-table if garbage collecting, since it
2618 doesn't matter in that case.
2619 (deliver_profiler_signal): Rename from sigprof_handler,
2620 for consistency with other handlers.
2621 (setup_cpu_timer): New function, with much of what used to be in
2622 Fprofiler_cpu_start. Check for out-of-range argument.
2623 Prefer timer_settime if available, and prefer
2624 thread cputime clocks, then process cputime clocks, then
2625 monotonic clocks, to the old realtime clock. Use make_timeval
2626 to round more-correctly when falling back to setitimer.
2627 (Fprofiler_cpu_start): Use it.
2628 (Fprofiler_cpu_stop): Prefer timer_settime if available.
2629 Don't assume that passing NULL as the 2nd argument of setitimer
2630 is the same as passing a pointer to all-zero storage.
2631 Ignore SIGPROF afterwards.
2632 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
2633 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
2634 non-fatal signal handlers. Ignore SIGPROF on startup.
2635 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
2636 in profiler.c, since sysdep.c now uses it.
2638 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
2639 Suggested by Eli Zaretskii in
2640 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
2642 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
2644 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2646 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
2648 * lisp.h (struct backtrace): Remove indirection for `function' field.
2649 * xdisp.c (redisplay_internal):
2650 * profiler.c (record_backtrace, sigprof_handler_1):
2651 * alloc.c (Fgarbage_collect):
2652 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
2653 (Fbacktrace_frame): Adjust accordingly.
2655 2012-09-28 Glenn Morris <rgm@gnu.org>
2657 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
2658 (Frun_hook_with_args_until_failure): Doc fixes.
2660 2012-09-28 Eli Zaretskii <eliz@gnu.org>
2662 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
2663 Qautomatic_redisplay and change the symbol name. All users changed.
2665 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
2667 * profiler.c (sigprof_handler): Fix race condition.
2669 2012-09-28 Glenn Morris <rgm@gnu.org>
2671 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
2673 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
2675 Check more robustly for timer_settime.
2676 * Makefile.in (LIB_TIMER_TIME): New macro.
2678 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
2679 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
2682 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
2684 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
2686 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
2688 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2690 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
2692 * character.h (MAYBE_UNIFY_CHAR): Remove.
2693 * charset.c, charset.h (maybe_unify_char): Now static.
2694 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
2695 Since this stuff is now private to charset.c, there's no need for
2696 a public macro and no need to inline by hand.
2698 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
2699 Stefan Monnier <monnier@iro.umontreal.ca>
2700 Juanma Barranquero <lekktu@gmail.com>
2702 * profiler.c: New file.
2703 * Makefile.in (base_obj): Add profiler.o.
2704 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
2705 ($(BLD)/profiler.$(O)): New target.
2706 * emacs.c (main): Call syms_of_profiler.
2707 * alloc.c (Qautomatic_gc): New constant.
2708 (MALLOC_PROBE): New macro.
2709 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
2710 (total_bytes_of_live_objects): New function.
2711 (Fgarbage_collect): Use it. Record itself in backtrace_list.
2712 Call malloc_probe for the memory profiler.
2713 (syms_of_alloc): Define Qautomatic_gc.
2714 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
2716 (struct backtrace): Move definition...
2717 * lisp.h (struct backtrace): ..here.
2718 (Qautomatic_gc, profiler_memory_running): Declare vars.
2719 (malloc_probe, syms_of_profiler): Declare functions.
2720 * xdisp.c (Qautomatic_redisplay): New constant.
2721 (redisplay_internal): Record itself in backtrace_list.
2722 (syms_of_xdisp): Define Qautomatic_redisplay.
2724 2012-09-25 Eli Zaretskii <eliz@gnu.org>
2725 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
2727 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
2729 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
2731 Prefer POSIX timers if available.
2732 They avoid a race if the timer is too close to the current time.
2733 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
2734 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
2735 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
2737 2012-09-25 Eli Zaretskii <eliz@gnu.org>
2739 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
2740 CHAR_STRING_ADVANCE.
2741 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
2742 STRING_CHAR_ADVANCE.
2744 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
2746 Move Vlibrary_cache to emacs.c and reset before dumping.
2748 * lisp.h (reset_image_types): Declare.
2749 [WINDOWSNT] (Vlibrary_cache): Declare.
2751 * image.c (reset_image_types): New function.
2753 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
2754 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
2755 (Fdump_emacs): Reset Vlibrary_cache and image_types.
2757 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
2758 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
2760 * w32.h (Vlibrary_cache): Do not declare.
2762 2012-09-25 Eli Zaretskii <eliz@gnu.org>
2764 * w32proc.c (sys_signal): Handle all signals defined by the
2765 MS-Windows runtime, not just SIGCHLD. Actually install the signal
2766 handlers for signals supported by Windows. Don't override
2767 term_ntproc as the handler for SIGABRT.
2768 (sigaction): Rewrite to call sys_signal instead of duplicating its
2770 (sys_kill): Improve commentary.
2772 * w32.c (term_ntproc): Accept (and ignore) one argument, for
2773 consistency with a signature of a signal handler. All callers
2775 (init_ntproc): Accept an argument DUMPING. If dumping, don't
2776 install term_ntproc as a signal handler for SIGABRT, as that
2777 should be done by the dumped Emacs.
2779 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
2781 * w32select.c (term_w32select): Protect against repeated
2782 invocation by setting clipboard_owner to NULL after calling
2785 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
2786 and term_ntproc to their modified signatures.
2788 * character.c (char_string, string_char): Remove calls to
2789 MAYBE_UNIFY_CHAR. See the discussion starting at
2790 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
2793 2012-09-25 Chong Yidong <cyd@gnu.org>
2795 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
2797 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
2799 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
2800 when encountering an unknown bytecode.
2802 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
2804 image.c, indent.c: Use bool for booleans.
2805 * dispextern.h (struct image_type): Members valid_p, load, init
2806 now return bool, not int. All uses changed.
2807 * image.c: Omit unnecessary static decls.
2808 (x_create_bitmap_mask, x_build_heuristic_mask):
2809 Return void, not int, since callers don't care about the return value.
2810 (x_create_bitmap_mask, define_image_type, valid_image_p)
2811 (struct image_keyword, parse_image_spec, image_spec_value)
2812 (check_image_size, image_background)
2813 (image_background_transparent, x_clear_image_1)
2814 (postprocess_image, lookup_image, x_check_image_size)
2815 (x_create_x_image_and_pixmap, xbm_image_p)
2816 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
2817 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
2818 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
2819 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
2820 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
2821 (png_image_p, init_png_functions, png_load_body, png_load)
2822 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
2823 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
2824 (init_gif_functions, gif_load, imagemagick_image_p)
2825 (imagemagick_load_image, imagemagick_load, svg_image_p)
2826 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
2828 * nsimage.m (ns_load_image):
2829 * nsterm.m (ns_defined_color):
2830 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
2831 * xfns.c (x_defined_color):
2832 * xterm.c (x_alloc_lighter_color_for_widget)
2833 (x_alloc_nearest_color_1, x_alloc_nearest_color)
2834 (x_alloc_lighter_color):
2835 * indent.c (disptab_matches_widthtab, current_column)
2836 (scan_for_column, string_display_width, indented_beyond_p)
2837 (compute_motion, vmotion, Fvertical_motion):
2838 Use bool for booleans.
2840 2012-09-24 Chong Yidong <cyd@gnu.org>
2842 * chartab.c (Fset_char_table_default): Obsolete function removed.
2844 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
2846 Move pid_t related decls out of lisp.h.
2847 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
2848 (interruptible_wait_for_termination):
2849 Move these decls from lisp.h to syswait.h, since they use pid_t.
2850 Needed on FreeBSD; see Herbert J. Skuhra in
2851 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
2852 * callproc.c: Include syswait.h.
2854 gnutls.c, gtkutil.c: Use bool for boolean.
2855 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
2856 (emacs_gnutls_handle_error):
2857 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
2858 (xg_hide_tooltip, xg_create_frame_widgets)
2859 (create_dialog, xg_uses_old_file_dialog)
2860 (xg_get_file_with_chooser, xg_get_file_with_selection)
2861 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
2862 (xg_item_label_same_p, xg_update_menubar)
2863 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
2864 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
2865 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
2866 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
2867 (update_frame_tool_bar, free_frame_tool_bar):
2868 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
2869 * nsmenu.m (ns_update_menubar):
2870 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
2871 * xfns.c (Fx_show_tip) [USE_GTK]:
2872 Use bool for boolean.
2873 * gtkutil.c (xg_update_frame_menubar):
2874 * xmenu.c (update_frame_menubar):
2875 Return void, not int, since caller ignores return value.
2876 * gtkutil.c (xg_change_toolbar_position):
2879 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
2881 * makefile.w32-in (BLOCKINPUT_H): Remove.
2882 (SYSSIGNAL_H): New macro.
2883 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
2884 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
2885 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
2886 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
2887 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
2888 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
2889 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
2890 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
2891 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
2892 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
2893 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
2894 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
2895 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
2896 ($(BLD)/w32xfns.$(O)): Update dependencies.
2898 2012-09-23 Eli Zaretskii <eliz@gnu.org>
2900 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
2901 fatal_error_backtrace.
2903 * w32proc.c (sys_kill): Undo last change: don't do anything when
2904 invoked to deliver SIGABRT to our own process. This is now
2905 handled by emacs_raise.
2907 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
2909 * w32term.c (w32_read_socket): Remove leftover reference to
2910 interrupt_input_pending.
2912 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
2914 Do not use SA_NODEFER.
2915 Problem reported by Dani Moncayo in
2916 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
2918 * sysdep.c (emacs_abort): Do not reset signal handler.
2919 * emacs.c (terminate_due_to_signal): Reset signal handler here.
2920 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
2921 wanted even on POSIXish hosts, and it doesn't work on Windows.
2923 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
2925 * xterm.c (x_term_init): Call fixup_locale before and after calling
2926 gtk_init (Bug#12392).
2928 2012-09-23 Chong Yidong <cyd@gnu.org>
2930 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
2931 Vdynamic_library_alist.
2933 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
2934 (Fgnutls_available_p): Caller changed.
2936 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
2937 (Flibxml_parse_xml_region): Likewise.
2939 * dispextern.h (struct image_type): Remove arg from init function.
2941 * image.c (Finit_image_library, lookup_image_type)
2942 (define_image_type): Remove now-unneeded second arg.
2943 (init_xpm_functions, init_png_functions, init_jpeg_functions)
2944 (init_tiff_functions, init_gif_functions, init_svg_functions):
2945 Arglist and w32_delayed_load calling convention changed.
2946 (gs_type): Remove init_gs_functions; there is no such function.
2947 (valid_image_p, make_image): Fix caller to lookup_image_type.
2949 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
2951 Simplify and avoid signal-handling races (Bug#12471).
2953 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
2954 Avoid recursive loop if there's a fatal error in the function itself.
2955 * atimer.c (pending_atimers):
2956 * blockinput.h: Don't include "atimer.h"; no longer needed.
2957 (interrupt_input_pending): Remove. All uses removed.
2958 pending_signals now counts both atimers and ordinary interrupts.
2959 This is less racy than having three separate pending-signal flags.
2960 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
2962 Rename from their upper-case counterparts BLOCK_INPUT,
2963 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
2964 INPUT_BLOCKED_P, and turn into functions. All uses changed.
2965 This makes it easier to access volatile variables more accurately.
2966 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
2967 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
2968 that's more reliable if the code is buggy and sets
2969 interrupt_input_blocked to a negative value. All uses changed.
2970 * atimer.c (deliver_alarm_signal):
2971 Remove. No need to deliver this to the parent; any thread can
2972 handle this signal now. All uses replaced by underlying handler.
2973 * atimer.c (turn_on_atimers):
2974 * dispnew.c (handle_window_change_signal):
2975 * emacs.c (handle_danger_signal):
2976 * keyboard.c (kbd_buffer_get_event):
2977 Don't reestablish signal handler; not needed with sigaction.
2978 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
2980 Rework to avoid unnecessary accesses to volatile variables.
2981 (UNBLOCK_INPUT_TO): Now a function.
2982 (totally_unblock_input, unblock_input): New decls.
2983 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
2984 (init_data): Remove. Necessary stuff now done in init_signal.
2985 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
2986 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
2987 (fatal_error_code): Remove; no longer needed.
2988 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
2989 it doesn't always backtrace. All uses changed. No need to reset
2990 signal to default, since sigaction and/or die does that for us now.
2991 Use emacs_raise (FOO), not kill (getpid (), FOO).
2992 (main): Check more-accurately whether we're dumping.
2993 Move fatal-error setup to sysdep.c
2994 * floatfns.c: Do not include "syssignal.h"; no longer needed.
2995 * gtkutil.c (xg_get_file_name, xg_get_font):
2996 Remove no-longer-needed signal-mask manipulation.
2997 * keyboard.c, process.c (POLL_FOR_INPUT):
2998 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
2999 * keyboard.c (read_avail_input): Remove.
3000 All uses replaced by gobble_input.
3001 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
3002 (kbd_buffer_store_event_hold, gobble_input):
3003 (record_asynch_buffer_change) [USABLE_SIGIO]:
3004 (store_user_signal_events):
3005 No need to mess with signal mask.
3006 (gobble_input): If blocking input and there are terminals, simply
3007 set pending_signals to 1 and return. All hooks changed to not
3008 worry about whether input is blocked.
3009 (process_pending_signals): Clear pending_signals before processing
3010 them, in case a signal comes in while we're processing.
3011 By convention callers now test pending_signals before calling us.
3012 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
3013 New functions, to support changes to blockinput.h.
3014 (handle_input_available_signal): Now extern.
3015 (reinvoke_input_signal): Remove. All uses replaced by
3017 (quit_count): Now volatile, since a signal handler uses it.
3018 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
3019 All callers changed. Block SIGINT only if not already blocked.
3020 Clear sigmask reliably, even if Fsignal returns, which it can.
3021 Omit unnecessary accesses to volatile var.
3022 (quit_throw_to_read_char): No need to restore sigmask.
3023 * keyboard.c (gobble_input, handle_user_signal):
3024 * process.c (wait_reading_process_output):
3025 Call signal-handling code rather than killing ourselves.
3026 * lisp.h: Include <float.h>, for...
3027 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
3028 (pending_signals): Now volatile.
3029 (syms_of_data): Now const if IEEE floating point.
3030 (handle_input_available_signal) [USABLE_SIGIO]:
3031 (terminate_due_to_signal, record_child_status_change): New decls.
3032 * process.c (create_process): Avoid disaster if memory is exhausted
3033 while we're processing a vfork, by tightening the critical section
3035 (send_process_frame, process_sent_to, handle_pipe_signal)
3036 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
3038 (send_process): No need for setjmp/longjmp any more, since the
3039 SIGPIPE stuff is now gone. Instead, report an error if errno
3041 (record_child_status_change): Now extern. PID and W are now args.
3042 Return void, not bool. All callers changed.
3043 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
3044 Remove. All uses removed. This bug should be fixed now in a
3046 (wait_for_termination_1): Use waitpid rather than sigsuspend,
3047 and record the child status change directly. This avoids the
3048 need to futz with the signal mask.
3049 (process_fatal_action): Move here from emacs.c.
3050 (emacs_sigaction_flags): New function, containing
3051 much of what used to be in emacs_sigaction_init.
3052 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
3053 caught by emacs, to make races less likely.
3054 (deliver_process_signal): Rename from handle_on_main_thread.
3056 (BACKTRACE_LIMIT_MAX): Now at top level.
3057 (thread_backtrace_buffer, threadback_backtrace_pointers):
3059 (deliver_thread_signal, deliver_fatal_thread_signal):
3060 New functions, for more-accurate delivery of thread-specific signals.
3061 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
3062 (deliver_arith_signal): Handle in this thread, not
3063 in the main thread, since it's triggered by this thread.
3064 (maybe_fatal_sig): New function.
3065 (init_signals): New arg DUMPING so that we can be more accurate
3066 about whether we're dumping. Caller changed.
3067 Treat thread-specific signals differently from process-general signals.
3068 Block all signals while handling fatal error; that's safer.
3069 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
3071 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
3072 Ignore SIGPIPE unless batch.
3073 (emacs_backtrace): Output backtrace for the appropriate thread,
3074 which is not necessarily the main thread.
3075 * syssignal.h: Include <stdbool.h>.
3076 (emacs_raise): New macro.
3077 * xterm.c (x_connection_signal): Remove; no longer needed
3078 now that we use sigaction.
3079 (x_connection_closed): No need to mess with sigmask now.
3080 (x_initialize): No need to reset SIGPIPE handler here, since
3081 init_signals does this for us now.
3083 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3085 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
3086 background rect may be larger (Bug#12245).
3088 2012-09-23 Chong Yidong <cyd@gnu.org>
3090 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
3092 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3094 * .gdbinit: Just stop at fatal_error_backtrace.
3095 See Stefan Monnier's request in
3096 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
3097 Remove no-longer-used query of system type.
3099 2012-09-22 Chong Yidong <cyd@gnu.org>
3101 * search.c (Freplace_match): Doc fix (Bug#12325).
3103 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
3105 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
3106 (Fline_end_position): Doc fix.
3108 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
3110 2012-09-22 Chong Yidong <cyd@gnu.org>
3112 * dispextern.h (struct image_type): Add new slot, storing a type
3113 initialization function.
3115 * image.c (define_image_type): Call the image initializer function
3116 if it is defined. Arguments and return value changed.
3117 (valid_image_p, make_image): Callers changed.
3118 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3119 (gif_type, imagemagick_type, svg_type, gs_type):
3120 Add initialization functions.
3121 (Finit_image_library): Call lookup_image_type.
3122 (CHECK_LIB_AVAILABLE): Macro deleted.
3123 (lookup_image_type): Call define_image_type here, rather than via
3124 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
3125 (syms_of_image): Move define_image_type calls for xbm_type and
3126 pbm_type to lookup_image_type.
3128 2012-09-22 Eli Zaretskii <eliz@gnu.org>
3130 * keyboard.c (timer_check_2): Move calculation of 'timers' and
3131 'idle_timers' from here ...
3132 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
3133 lists, to avoid infloops when the timer does something stupid,
3134 like reinvoke itself with the same or smaller time-out.
3137 2012-09-22 Martin Rudalics <rudalics@gmx.at>
3139 * window.c (Fsplit_window_internal): Handle only Qt value of
3140 Vwindow_combination_limit separately.
3141 (Qtemp_buffer_resize): New symbol.
3142 (Vwindow_combination_limit): New default value.
3145 2012-09-22 Eli Zaretskii <eliz@gnu.org>
3147 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
3148 the new overlay string. (Bug#10159)
3150 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3152 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
3153 or that fprintf is async-signal-safe. POSIX doesn't require
3156 2012-09-22 Chong Yidong <cyd@gnu.org>
3158 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
3161 2012-09-22 Kenichi Handa <handa@gnu.org>
3163 * composite.c (composition_reseat_it): Handle the case that a
3164 grapheme cluster is not covered by a single font (Bug#12352).
3166 2012-09-21 Chong Yidong <cyd@gnu.org>
3168 * image.c (define_image_type): Avoid adding duplicate types to
3169 image_types (Bug#12463). Suggested by Jörg Walter.
3171 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3173 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
3174 (print_load_command_name): Add case LC_DATA_IN_CODE.
3175 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
3177 2012-09-21 Glenn Morris <rgm@gnu.org>
3179 * eval.c (Frun_hook_with_args_until_success)
3180 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
3182 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
3184 * fileio.c (Ffile_selinux_context): Only call freecon when
3185 lgetfilecon succeeded.
3186 (Fset_file_selinux_context): Likewise. (Bug#12444)
3188 2012-09-21 Eli Zaretskii <eliz@gnu.org>
3190 * xdisp.c (try_window_reusing_current_matrix): Under bidi
3191 reordering, locate the cursor by calling set_cursor_from_row; if
3192 that fails, clear the desired glyph matrix before returning a
3193 failure indication to the caller. Fixes leaving garbled display
3194 when fast scrolling with a down-key. (Bug#12403)
3195 (compute_stop_pos_backwards): Fix a typo that caused crashes while
3196 scrolling through multibyte text.
3198 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
3200 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
3201 calling mark_vectorlike since that's the one that marks the window.
3202 (mark_discard_killed_buffers): Mark the final cdr.
3203 * window.h (struct window): Move prev/next_buffers to the
3204 non-standard fields.
3205 * window.c (make_window): Initialize prev/next_buffers manually.
3207 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
3209 Omit unused arg EXPECTED from socket hooks.
3210 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
3211 * nsterm.m (ns_term_init):
3212 * termhooks.h (struct terminal.read_socket_hook):
3213 * w32inevt.c (w32_console_read_socket):
3214 * w32term.c (w32_read_socket):
3215 * xterm.c (XTread_socket):
3216 Omit unused arg EXPECTED. All callers changed.
3217 (store_user_signal_events): Return void, not int, since callers no
3218 longer care about the return value. All uses changed.
3220 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
3222 * w32gui.h (XParseGeometry): Do not declare.
3224 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
3226 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
3227 Ignore 'expected'. See Eli Zaretskii in
3228 <http://bugs.gnu.org/12471#8> (last line).
3230 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
3231 (XParseGeometry): Now static. Substitute extremal values for
3232 values that are out of range.
3234 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
3236 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
3238 * nsfns.m (XParseGeometry): Remove.
3239 (Fx_create_frame): Call x_set_offset to correctly interpret
3240 top_pos in geometry.
3242 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
3243 (Fx_parse_geometry): If there is a space in string, call
3244 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
3246 2012-09-17 Eli Zaretskii <eliz@gnu.org>
3248 * search.c (scan_buffer): Use character positions in calls to
3249 region_cache_forward and region_cache_backward, not byte
3250 positions. (Bug#12196)
3252 * w32term.c (w32_read_socket): Set pending_signals to 1, like
3253 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
3255 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
3256 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
3257 emacs_blocked_malloc, now deleted.
3259 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
3261 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
3262 The workaround was for improving performance on Solaris 2.4, but
3263 is getting in the way now. Emacs will still work if someone is
3264 still running Solaris 2.4 in a museum somewhere; Sun dropped
3265 support for Solaris 2.4 in 2003.
3266 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
3267 * process.c (create_process) [HAVE_WORKING_VFORK]:
3268 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
3269 since Emacs no longer uses vfork on that platform.
3271 2012-09-17 Glenn Morris <rgm@gnu.org>
3273 * emacs.c: Use COPYRIGHT.
3275 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
3277 Remove configure's --without-sync-input option (Bug#12450).
3278 When auditing signal-handling in preparation for cleaning it up,
3279 I found that SYNC_INPUT has race conditions and would be a real
3280 pain to fix. Since it's an undocumented and deprecated
3281 configure-time option, now seems like a good time to remove it.
3282 Also see <http://bugs.gnu.org/11080#16>.
3283 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
3284 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
3285 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3286 (malloc_hysteresis):
3287 (check_depth) [XMALLOC_OVERRUN_CHECK]:
3288 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
3289 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
3290 (dont_register_blocks, bytes_used_when_reconsidered)
3291 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
3292 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
3293 [!SYSTEM_MALLOC && !SYNC_INPUT]:
3294 Remove. All uses removed.
3295 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
3296 implementation, one that depends on whether the new macro
3297 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
3299 * atimer.c (run_timers, handle_alarm_signal):
3300 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
3301 (handle_async_input, process_pending_signals)
3302 (handle_input_available_signal, init_keyboard):
3303 * nsterm.m (ns_read_socket):
3304 * process.c (wait_reading_process_output):
3305 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
3306 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
3308 * xterm.c (XTread_socket):
3310 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
3311 * eval.c (handling_signal): Remove. All uses removed.
3312 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
3313 All uses replaced with the SYNC_INPUT version.
3314 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
3316 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3319 * font.c (Ffont_shape_gstring): Remove unused local.
3321 2012-09-16 Glenn Morris <rgm@gnu.org>
3323 * Makefile.in (clean): No longer run nextstep's clean.
3325 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
3327 (ns-app): Move here from ns.mk, and simplify.
3328 (clean): Simplify nextstep entry.
3329 * ns.mk: Remove file.
3331 2012-09-17 Kenichi Handa <handa@gnu.org>
3333 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
3334 not covert the last few charactes.
3336 2012-09-16 Kenichi Handa <handa@gnu.org>
3338 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
3339 here, but just check the validity of glyphs in the glyph-string.
3341 2012-09-16 Martin Rudalics <rudalics@gmx.at>
3343 * window.c (Fwindow_parameter, Fset_window_parameter):
3344 Accept any window as argument (Bug#12452).
3346 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
3348 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
3349 to ns_term_init to avoid memory leak.
3351 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
3352 explicit retain/release.
3353 (ns_term_init): Only allow one display. Initialize outerpool and
3356 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3358 Port _setjmp fix to POSIXish hosts as well as Microsoft.
3359 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
3360 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
3361 the Microsoft problem in a different way, by altering ../nt/config.nt.
3363 2012-09-15 Eli Zaretskii <eliz@gnu.org>
3378 * w16select.c: Remove inclusion of setjmp.h, as it is now included
3379 by lisp.h. This completes removal of setjmp.h inclusion
3380 erroneously announced in the previous commit. (Bug#12446)
3382 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
3385 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
3386 not defined as a macro. The latter happens on MS-Windows.
3389 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3391 Port better to POSIX hosts lacking _setjmp (Bug#12446).
3392 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
3393 Some instances of '#include <setjmp.h>' removed, if the
3394 only reason for the instance was because "lisp.h" was included.
3395 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
3396 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
3397 and _longjmp with the new symbols. Emacs already uses _setjmp if
3398 available, so this change affects only POSIXish hosts that have
3399 sigsetjmp but not _setjmp, such as some versions of Solaris and
3400 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
3401 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
3402 (png_load_body) [HAVE_PNG]:
3403 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
3404 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
3405 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
3406 since PNG requires jmp_buf. This is the only exception to the
3407 general rule that we now use sys_setjmp and sys_longjmp.
3408 This exception is OK since this code does not change the signal
3409 mask or longjmp out of a signal handler.
3411 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
3413 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3414 Include "syssignal.h", for 'main_thread'.
3416 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
3418 Avoid out-of-range marker position (Bug#12426).
3419 * insdel.c (replace_range, replace_range_2):
3420 Adjust markers before overlays, as suggested by comments.
3421 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
3422 Remove redundant check before calling offset_intervals.
3424 2012-09-14 Martin Rudalics <rudalics@gmx.at>
3426 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
3427 current buffer (Bug#12387).
3429 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
3431 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
3433 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3435 Use a more backwards-compatible timer format (Bug#12430).
3436 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
3437 vector element, not from the 4th, since PSECS is now at the end.
3438 (Fcurrent_idle_time): Doc fix.
3440 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3442 Function to mark objects and remove killed buffers at once.
3443 * alloc.c (discard_killed_buffers): Rename to ...
3444 (mark_discard_killed buffers) ... new name. Add marking
3445 of remaining objects. Fix comment. Adjust users.
3446 (mark_object): Do not touch frame buffer lists here.
3447 * frame.c (delete_frame): Reset frame buffer lists here.
3449 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3451 Better workaround for GNOME bug when --enable-gcc-warnings.
3452 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
3453 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
3454 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
3456 Simplify SIGIO usage (Bug#12408).
3457 The code that dealt with SIGIO was crufty and confusing, e.g., it
3458 played tricks like "#undef SIGIO" but these tricks were not used
3459 consistently. Simplify mostly by not #undeffing standard symbols,
3460 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
3461 or not as we please) rather than "defined SIGIO" (standard symbol
3462 that we probably shouldn't #undef).
3463 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
3464 Modules that need it can include it.
3465 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
3466 * dispextern.h (ignore_sigio): New decl.
3467 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
3468 unconditionally, since it's now a no-op if !USABLE_SIGIO.
3469 * emacs.c (shut_down_emacs):
3470 * keyboard.c (kbd_buffer_store_event_hold):
3471 Use ignore_sigio rather than invoking 'signal' directly.
3472 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
3474 (FIONREAD, SIGIO): Do not #undef.
3475 (tty_read_avail_input): Use #error rather than a syntax error.
3476 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
3477 for I_PIPE, used by SETUP_SLAVE_PTY.
3478 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
3479 * sysdep.c (croak): Remove; no longer needed. This bit of
3480 temporary code, with Fred N. Fish's comment that it's temporary,
3481 has been in Emacs since at least 1992!
3482 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
3483 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
3484 * syssignal.h (croak): Remove decl.
3485 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
3486 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
3487 now that we're termios-only.
3488 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
3489 * term.c (dissociate_if_controlling_tty): Use #error rather than
3492 Work around GCC and GNOME bugs when --enable-gcc-warnings.
3493 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
3494 to work around GNOME bug 683906.
3495 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
3496 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
3497 This works around GCC bug 54561.
3499 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3501 More fixes for 'volatile' and setjmp/longjmp.
3502 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
3503 * image.c (struct png_load_context) [HAVE_PNG]: New type.
3504 (png_load_body) [HAVE_PNG]:
3505 (jpeg_load_body) [HAVE_JPEG]:
3506 New function, with most of the old parent function's body.
3507 (png_load) [HAVE_PNG]:
3508 (jpeg_load) [HAVE_JPEG]:
3509 Invoke the new function, to avoid longjmp munging our locals.
3510 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
3511 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
3512 longjmp is passed 2, as the C standard doesn't guarantee this.
3513 Instead, store the failure code into mgr->failure_code.
3515 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3517 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
3518 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
3519 (syms_of_keyboard): Remove support for unread-command-char.
3521 2012-09-12 Eli Zaretskii <eliz@gnu.org>
3523 * w32proc.c (sys_kill): If PID is our process ID and the signal is
3524 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
3525 violation. (Bug#12426)
3527 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3529 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
3531 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3533 * eval.c: Add `inhibit-debugger'.
3534 (Qinhibit_debugger): New symbol.
3535 (call_debugger): Bind it instead of Qdebug_on_error.
3536 (maybe_call_debugger): Test Vinhibit_debugger.
3537 (syms_of_eval): Define inhibit-debugger.
3538 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
3539 (syms_of_xdisp): Remove inhibit-debug-on-message.
3541 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3543 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
3544 If a nonvolatile local variable is written before a _longjmp to
3545 the frame containing the variable, and is read after the _longjmp,
3546 the value read is indeterminate. Some local variables of type
3547 'struct handler' and 'struct catchtag' are used in this way, so
3548 mark each of their slots as volatile if the slot can be set before
3549 _longjmp and read afterwards.
3550 * lisp.h (struct handler): var and chosen_clause are now volatile.
3551 (struct catchtag): val, next, and pdlcount are now volatile.
3553 * bidi.c (bidi_push_it, bidi_pop_it):
3554 * fns.c (copy_hash_table):
3555 * image.c (define_image_type):
3556 * keyboard.c (kbd_buffer_store_event_hold):
3557 * process.c (Fprocess_send_eof):
3558 * xfaces.c (x_create_gc) [HAVE_NS]:
3559 * xgselect.c (xg_select):
3560 Prefer assignment to memcpy when either will do.
3562 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
3563 Use pointer-to-a-pointer to simplify and avoid a NILP check each
3564 time an item is removed. No need to mark this function 'inline';
3565 the compiler knows better than we do.
3567 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
3569 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
3570 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
3571 to change_frame_size (Bug#12388).
3572 (windowDidResize:): Pass YES to updateFrameSize.
3574 * nsterm.h: Add delay parameter to updateFrameSize.
3576 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3578 Discard killed buffers from deleted window and frame objects.
3579 This reduces an amount of references to killed buffers and
3580 helps GC to reclaim them faster.
3581 * alloc.c (discard_killed_buffers): New function.
3582 (mark_object): Use it for deleted windows and frames.
3583 (mark_object): If symbol's value is set up for a killed buffer
3584 or deleted frame, restore its global binding.
3585 * data.c (swap_in_global_binding): Add GC notice.
3586 (swap_in_symval_forwarding): Use convenient set_blv_where.
3587 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
3588 * window.h: ... to here.
3590 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3592 Convenient macro to check whether the buffer is live.
3593 * buffer.h (BUFFER_LIVE_P): New macro.
3594 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
3595 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
3597 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3599 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
3600 composition cases (Bug#12364).
3602 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
3603 overhang of succeeding glyphs overlapping box cursor.
3605 * w32term.c (x_draw_glyph_string): Likewise.
3607 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3609 Simplify, document, and port floating-point (Bug#12381).
3610 The porting part of this patch fixes bugs on non-IEEE platforms
3611 with frexp, ldexp, logb.
3612 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
3614 * floatfns.c: Simplify discussion of functions that Emacs doesn't
3615 support, by removing commented-out code and briefly listing the
3616 C89 functions excluded. The commented-out stuff was confusing
3617 maintenance, e.g., we thought we needed cbrt but it was commented out.
3618 (logb): Remove decl; no longer needed.
3619 (isfinite): New macro, if not already supplied.
3620 (isnan): Don't replace any existing macro.
3621 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
3622 are present on all C89 platforms.
3623 (Ffrexp): Do not special-case zero, as frexp does the right thing
3625 (Flogb): Do not use logb, as it doesn't have the desired meaning
3626 on hosts that use non-base-2 floating point. Instead, stick with
3627 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
3628 frexp, to avoid getting an unspecified result.
3630 * xdisp.c (Qinhibit_debug_on_message): Now static.
3632 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
3634 * nsterm.m (ns_update_begin): Set clip path to whole view by using
3635 NSBezierPath (Bug#12131).
3637 2012-09-10 Chong Yidong <cyd@gnu.org>
3639 * fns.c (Fdelq, Fdelete): Doc fix.
3641 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
3643 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
3644 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
3646 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
3648 * lisp.h (make_lisp_ptr): New macro to replace XSET.
3649 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
3652 2012-09-09 Eli Zaretskii <eliz@gnu.org>
3654 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
3655 left fringe if the window has a left margin. This avoids leaving
3656 traces of the cursor because its leftmost pixel is not drawn over.
3658 * dispnew.c (update_window_line): When the left margin area of a
3659 screen line is updated, set the redraw_fringe_bitmaps_p flag of
3660 that screen line. (Bug#12277)
3662 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
3664 Assume C89 or later for math functions (Bug#12381).
3665 This simplifies the code, and makes it a bit smaller and faster,
3666 and (most important) makes it easier to clean up signal handling
3667 since we can stop worring about floating-point exceptions in
3668 library code. That was a problem before C89, but the problem
3669 went away many years ago on all practical Emacs targets.
3670 * data.c, image.c, lread.c, print.c:
3671 Don't include <math.h>; no longer needed.
3672 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
3673 might be autoconfigured, as that never happens.
3675 * doprnt.c (DBL_MAX_10_EXP):
3676 * print.c (DBL_DIG):
3677 Remove. C89 or later always defines these.
3678 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
3679 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
3680 (arith_error, domain_error, domain_error2):
3681 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
3682 no longer needed -- we simply return what C returns. All uses removed.
3683 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
3685 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
3686 Remove. All uses expanded, as these macros are no longer used
3687 more than once and are now more trouble than they're worth.
3688 (Ftan): Use tan, not sin / cos.
3689 (Flogb): Assume C89 frexp.
3690 (fmod_float): Assume C89 fmod.
3691 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
3692 (init_floatfns): Remove. All uses removed.
3694 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3696 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
3697 compositeToPoint for OSX < 10.6 (Bug#12390).
3699 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
3701 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
3702 This produces more-accurate results.
3704 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3706 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
3707 changes (Bug#12088).
3709 2012-09-08 Chong Yidong <cyd@gnu.org>
3711 * syntax.c (Fstring_to_syntax): Doc fix.
3713 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
3715 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
3716 in the internal border.
3717 (x_set_window_size): Remove static variables and their usage.
3718 (ns_redraw_scroll_bars): Fix NSTRACE arg.
3719 (ns_after_update_window_line, ns_draw_fringe_bitmap):
3720 Remove fringe/internal border adjustment (Bug#11052).
3721 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
3722 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
3723 (ns_fix_rect_ibw): Remove.
3724 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
3725 (ns_dumpglyphs_box_or_relief): Ditto.
3726 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
3728 (ns_dumpglyphs_image): Ditto.
3729 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
3731 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
3732 their usage. Add fringe_extended_p and its use as in other terms.
3733 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
3734 scroll bar was removed.
3735 (updateFrameSize): New function.
3736 (windowDidResize): Move code to updateFrameSize and call it.
3738 * nsterm.h (EmacsView): Add updateFrameSize.
3740 2012-09-07 Chong Yidong <cyd@gnu.org>
3742 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
3744 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
3746 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
3748 More signal-handler cleanup (Bug#12327).
3749 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
3750 Problem introduced when merging patches. Noted by Eli Zaretskii in
3751 <http://bugs.gnu.org/12327#67>.
3752 * floatfns.c: Comment fix.
3753 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
3754 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
3755 and anyway the declaration is harmless even if SIGDANGER is not defined.
3756 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
3757 defined BROKEN_FIONREAD). systty.h formerly did this, but other
3758 source files not surprisingly expected syssignal.h to define, or
3759 not define, SIGIO, and it's cleaner to do it that way, for consistency.
3760 Include <sys/ioctl.h>, for FIONREAD.
3761 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
3762 This eliminates a problem whereby other files mysteriously had
3763 to include "syssignal.h" before including "systty.h" if they
3764 wanted to use "#ifdef SIGIO".
3766 2012-09-07 Eli Zaretskii <eliz@gnu.org>
3768 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
3770 * w32.c (sigemptyset): Empty the set.
3771 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
3773 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
3775 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
3777 * alloc.c (mark_buffer): Revert unsafe marking optimization.
3778 (mark_object): Likewise for frame objects.
3780 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
3782 * syssignal.h (handle_on_main_thread): Always declare,
3783 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
3784 This ports to platforms without HAVE_PTHREAD.
3786 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
3788 Signal-handler cleanup (Bug#12327).
3789 Emacs's signal handlers were written in the old 4.2BSD style with
3790 sigblock and sigmask and so forth, and this led to some
3791 inefficiencies and confusion. Rewrite these to use
3792 pthread_sigmask etc. without copying signal sets around. Also,
3793 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
3794 'signal', and instead use functions that do not attempt to take
3795 over the system name space. This patch causes Emacs's text
3796 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
3797 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
3798 Do not include <signal.h> or "syssignal.h", as these
3799 modules do not use signals.
3800 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
3801 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
3802 Do not include <signal.h>, as "syssignal.h" does that for us now.
3803 * atimer.c (sigmask_atimers): New function.
3804 (block_atimers, unblock_atimers): New functions,
3805 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
3807 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
3808 no longer needed here.
3809 * emacs.c (main): Inspect existing signal handler with sigaction,
3810 so that there's no need to block and unblock SIGHUP.
3811 * sysdep.c (struct save_signal): New member 'action', replacing
3812 old member 'handler'.
3813 (save_signal_handlers, restore_signal_handlers):
3814 Use sigaction instead of 'signal' to save and restore.
3815 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
3816 New function. All users of 'signal' modified to use set_sighandler
3817 if they're writeonly, and to use sys_signal if they're read+write.
3818 (emacs_sigaction_init, forwarded_signal): New functions.
3819 (sys_signal): Remove. All uses replaced by calls to sigaction
3820 and emacs_sigaction_init, or by direct calls to 'signal'.
3821 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
3822 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
3823 all uses replaced by pthread_sigmask etc. calls.
3824 * syssignal.h: Include <signal.h>.
3825 (emacs_sigaction_init, forwarded_signal): New decls.
3826 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
3827 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
3828 (sigmask, sys_sigmask): Remove; no longer needed.
3829 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
3830 (sigblock, sigunblock, sigfree):
3831 (sigsetmask) [!defined sigsetmask]:
3832 Remove. All uses replaced by pthread_sigmask.
3833 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
3834 no longer need to be replaced, and its typical old uses
3835 are now done via emacs_sigaction_init and sigaction.
3836 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
3837 (sys_sigdel): Remove; unused.
3838 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
3840 2012-09-06 Eli Zaretskii <eliz@gnu.org>
3842 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
3843 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
3845 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
3847 Explicitly mark buffer_defaults and buffer_local_symbols.
3848 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
3849 mark_local_symbols here.
3850 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
3851 since special buffers aren't marked here any more.
3852 (allocate_buffer): Chain new buffer with all_buffers here...
3853 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
3855 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
3856 (syms_of_buffer): Remove staticpro of the above.
3857 (init_buffer_once): Set names for buffer_defaults and
3858 buffer_local_symbols.
3860 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
3862 Use bool for booleans in font-related modules.
3863 * font.c (font_intern_prop, font_style_to_value)
3864 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
3865 (generate_otf_features, font_check_otf_features, font_check_otf)
3866 (font_match_p, font_list_entities, font_at):
3867 * fontset.c (fontset_id_valid_p, reorder_font_vector
3868 (fontset_find_font, Fset_fontset_font)
3869 (face_suitable_for_char_p) [0]:
3870 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
3871 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
3872 (m17n_flt_initialized, ftfont_shape_by_flt):
3873 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
3874 * nsfont.m (nsfont_draw):
3875 * w32font.c (w32font_draw):
3876 * w32term.c (x_draw_glyphless_glyph_string_foreground):
3877 Use bool for booleans.
3878 * font.h: Adjust to above API changes.
3879 (struct font, struct font_driver, struct font_driver_list):
3880 Use bool for booleans.
3881 (struct font): Remove useless member encoding_type.
3883 * fontset.c, xftfont.c: Omit unnecessary static decls.
3885 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
3887 * alloc.c (mark_object): Revert window marking code
3888 since it's unsafe for the Fset_window_configuration.
3890 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
3892 Fix race conditions with signal handlers and errno (Bug#12327).
3893 Be more systematic about preserving errno whenever a signal
3894 handler returns, even if it's not in the main thread. Do this by
3895 renaming signal handlers to distinguish between signal delivery
3896 and signal handling. All uses changed.
3897 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
3898 * data.c (deliver_arith_signal): Rename from arith_error.
3899 * dispnew.c (deliver_window_change_signal): Rename from
3900 window_change_signal.
3901 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
3902 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
3903 * keyboard.c (deliver_input_available_signal): Rename from
3904 input_available_signal.
3905 (deliver_user_signal): Rename from handle_user_signal.
3906 (deliver_interrupt_signal): Rename from interrupt_signal.
3907 * process.c (deliver_pipe_signal): Rename from send_process_trap.
3908 (deliver_child_signal): Rename from sigchld_handler.
3909 * atimer.c (handle_alarm_signal):
3910 * data.c (handle_arith_signal):
3911 * dispnew.c (handle_window_change_signal):
3912 * emacs.c (handle_fatal_signal, handle_danger_signal):
3913 * keyboard.c (handle_input_available_signal):
3914 * keyboard.c (handle_user_signal, handle_interrupt_signal):
3915 * process.c (handle_pipe_signal, handle_child_signal):
3916 New functions, with the actual signal-handling code taken from the
3917 original respective signal handlers, sans the sporadic attempts to
3918 preserve errno, since that's now done by handle_on_main_thread.
3919 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
3920 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
3921 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3923 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3924 Move initialization of main_thread to sysdep.c's init_signals.
3925 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
3926 our usage, and simplifies the mainline code.
3927 (record_child_status_change): New static function, as a helper
3928 for handle_child_signal, and with most of the old child handler's
3930 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
3931 (handle_child_signal): Use the above.
3932 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3933 Moved here from emacs.c.
3934 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
3935 code moved here from emacs.c's main function.
3936 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
3937 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
3938 This lets callers save and restore errno properly.
3940 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
3942 Remove redundant or unused things here and there.
3943 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
3944 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
3945 * editfns.c (Fcompare_buffer_substrings): Likewise.
3946 * frame.h (struct terminal, struct font_driver_list):
3947 Remove redundant declarations.
3948 * window.h (Qleft, Qright): Likewise.
3950 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
3952 Do not mark objects from deleted buffers, windows and frames.
3953 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
3954 (mark_object): Likewise for windows and frames.
3956 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
3958 * alloc.c (valid_lisp_object_p): Treat killed buffers,
3959 buffer_defaults and buffer_local_symbols as valid objects.
3960 Return special value to denote them.
3962 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
3964 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
3965 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
3966 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
3967 (file_name_absolute_p, Fsubstitute_in_file_name):
3968 (check_executable, check_writable, Ffile_accessible_directory_p)
3969 (Fset_file_selinux_context, Fdefault_file_modes)
3970 (Finsert_file_contents, choose_write_coding_system)
3971 (Fwrite_region, build_annotations, a_write, e_write)
3973 * filelock.c (boot_time_initialized, get_boot_time)
3974 (get_boot_time_1, lock_file_1, within_one_second):
3975 * floatfns.c (in_float):
3976 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
3977 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
3978 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
3979 * lisp.h (struct Lisp_Hash_Table.cmpfn):
3980 * window.c (compare_window_configurations):
3981 Use bool for booleans.
3982 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
3983 (Fdefault_file_modes): Now mode_t, not int, for modes.
3984 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
3985 (internal_delete_file): Now returns void, not a (boolean) int,
3986 since nobody was looking at the return value.
3987 * lisp.h, window.h: Adjust to above API changes.
3989 * xdisp.c (set_message): Simplify and reindent last change.
3991 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
3993 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
3995 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
3997 * eval.c (call_debugger): Make the function non-static so that we
3998 can call it from set_message.
4000 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
4001 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
4003 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4005 Give more-useful info on a fatal error (Bug#12328).
4006 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
4007 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
4008 of doing the work ourselves.
4009 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
4010 do most of the work.
4011 (fatal_error_backtrace): New function, taken from the guts
4012 of the old fatal_error_signal, but with a new option to output
4014 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
4015 info about the signal than just its number.
4016 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
4017 * sysdep.c: Include <execinfo.h>
4018 (emacs_backtrace): New function, taken partly from the previous
4019 code of the 'die' function.
4020 (emacs_abort): Call fatal_error_backtrace rather than abort.
4022 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
4024 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
4025 eager (load-time) macro-expansion.
4026 * lisp.mk (lisp): Add macroexp.
4028 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4030 Simplify redefinition of 'abort' (Bug#12316).
4031 Do not try to redefine the 'abort' function. Instead, redo
4032 the code so that it calls 'emacs_abort' rather than 'abort'.
4033 This removes the need for the NO_ABORT configure-time macro
4034 and makes it easier to change the abort code to do a backtrace.
4035 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
4036 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
4037 Remove; sysdep.c's emacs_abort now takes its place.
4038 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
4039 'abort' changed to use 'emacs_abort'.
4040 * msdos.c (dos_abort) [defined abort]: Remove; not used.
4041 (abort) [!defined abort]: Rename to ...
4042 (emacs_abort): ... new name.
4043 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
4044 the place of the old 'abort' in emacs.c.
4045 * w32.c, w32fns.c (abort): Do not #undef.
4046 * w32.c (emacs_abort): Rename from w32_abort.
4048 2012-09-04 Eli Zaretskii <eliz@gnu.org>
4050 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
4051 offsets[j].dv, since the y axis of the screen coordinates points
4052 down, while the y axis of the font definition coordinates points
4053 up. This fixes display of Arabic diacritics such as KASRA and
4054 KASRATAN. (Bug#11860)
4056 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4058 Be more systematic about _setjmp vs setjmp.
4059 * alloc.c (test_setjmp, mark_stack):
4060 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
4061 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
4062 (png_load, my_error_exit, jpeg_load):
4063 * process.c (send_process_trap, send_process):
4064 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
4065 The underscored versions are up to 30x faster on some hosts.
4066 Formerly, the code used setjmp+longjmp sometimes and
4067 _setjmp+_longjmp at other times, with no particular reason to
4068 prefer setjmp+longjmp.
4070 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
4072 Fix minor problem found by static checking.
4073 * buffer.c (Fdelete_all_overlays): Return nil.
4075 2012-09-03 Martin Rudalics <rudalics@gmx.at>
4077 * buffer.c (Fdelete_all_overlays): New function.
4079 2012-09-03 Chong Yidong <cyd@gnu.org>
4081 * gtkutil.c: Add extern decl for Qxft.
4083 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4085 * emacs.c, eval.c: Use bool for boolean.
4086 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
4087 (malloc_using_checking) [DOUG_LEA_MALLOC]:
4088 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
4089 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
4090 (main, decode_env_path, Fdaemon_initialized):
4091 * eval.c (call_debugger, Finteractive_p, interactive_p):
4092 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
4093 (maybe_call_debugger, Fbacktrace):
4094 * process.c (read_process_output, exec_sentinel):
4095 Use bool for booleans.
4096 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
4097 All callers changed.
4098 * eval.c (interactive_p): Omit always-true boolean argument
4099 EXCLUDE_SUBRS_P. All callers changed.
4100 * dispextern.h, lisp.h: Reflect above API changes.
4101 * firstfile.c (dummy): Use the address of 'main', whose signature
4102 won't change, instead of the address of 'initialize', whose
4103 signature just changed from int to bool.
4104 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
4105 * msdos.c (fatal_error_in_progress): ... from here.
4106 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
4108 (redisplay_internal, unwind_redisplay): Simply clear
4109 REDISPLAYING_P when unwinding, instead of saving its previous,
4110 always-false value and then restoring it.
4112 Clean up some extern decls.
4113 Mostly, this hoists extern decls out of .c files and into .h files.
4114 That way, we're more likely to catch errors if the interfaces change.
4115 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
4116 declare xg_mark_data.
4117 * dispextern.h (x_frame_parm_handlers):
4119 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
4120 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
4121 (Qultra_bold, Qoblique, Qitalic):
4122 Move extern decl here from .c file.
4123 * alloc.c (xg_mark_data) [USE_GTK]:
4125 * eval.c (Qlexical_binding):
4126 * fns.c (time) [!HAVE_UNISTD_H]:
4127 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
4128 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
4129 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
4130 * lread.c (Qinternal_interpreter_environment):
4131 * minibuf.c (Qbuffer):
4132 * process.c (QCfamily, QCfilter):
4133 * widget.c (free_frame_faces):
4134 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
4135 * xfont.c (x_clear_errors):
4136 * xterm.c (x_frame_parm_handlers):
4137 Remove now-redundant extern decls.
4138 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
4139 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
4141 * xfaces.c: Remove unnecessary static decls.
4142 * xterm.c (updating_frame): Remove decl of nonexistent object.
4144 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
4145 when building globals.h, as the objects that are not built on
4146 this host are not needed to compile C files on this host.
4148 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
4150 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
4152 * frame.h: Add missing prototype for x_wm_set_size_hint.
4154 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
4156 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
4157 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
4158 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
4159 (Fsubstitute_command_keys):
4160 * editfns.c (region_limit, find_field, Fconstrain_to_field)
4161 (save_excursion_save, save_excursion_restore)
4162 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
4163 (format_time_string, general_insert_function)
4164 (make_buffer_string, make_buffer_string_both)
4165 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
4166 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
4167 (copy_text, insert_1, insert_1_both, insert_from_string)
4168 (insert_from_string_before_markers, insert_from_string_1)
4169 (insert_from_buffer, insert_from_buffer_1, replace_range)
4170 (replace_range_2, del_range_1, del_range_byte, del_range_both)
4171 (del_range_2, modify_region):
4172 * intervals.c (intervals_equal, balance_possible_root_interval)
4173 (adjust_intervals_for_insertion, merge_properties_sticky)
4174 (graft_intervals_into_buffer, lookup_char_property)
4175 (adjust_for_invis_intang, set_point_both)
4176 (get_property_and_range, compare_string_intervals)
4177 (set_intervals_multibyte_1, set_intervals_multibyte):
4178 * keyboard.c (decode_timer):
4179 Use bool for boolean.
4180 * intervals.h, lisp.h, systime.h: Reflect above API changes.
4181 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
4183 2012-09-02 Chong Yidong <cyd@gnu.org>
4185 * keymap.c (push_key_description): Print M-TAB as C-M-i
4188 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
4190 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
4191 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
4192 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
4193 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
4194 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
4195 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
4196 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
4198 2012-09-01 Eli Zaretskii <eliz@gnu.org>
4200 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
4201 more than one grapheme cluster passed to the shaper: compute the
4202 offset adjustment values separately for each cluster. (Bug#11860)
4204 * image.c: Restore mistakenly removed inclusion of w32.h. Without
4205 it, GCC doesn't see prototypes of w32_delayed_load, and complains
4206 about implicit conversions from integer to pointer.
4208 2012-09-01 Daniel Colascione <dancol@dancol.org>
4210 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
4211 system used too early.
4213 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
4215 Better seed support for (random).
4216 * emacs.c (main): Call init_random.
4217 * fns.c (Frandom): Set the seed from a string argument, if given.
4218 Remove long-obsolete Gentzel cruft.
4219 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
4220 (init_random): New function.
4222 2012-09-01 Daniel Colascione <dancol@dancol.org>
4224 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
4225 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
4226 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
4227 x_wm_set_size_hint, x_query_colors, x_real_positions,
4228 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
4229 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
4230 all of which have been moved to common code.
4232 * xfaces.c: Include TERM_HEADER instead of listing all possible
4233 window-system headers.
4235 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
4238 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
4239 directly accessing frame internals.
4241 * w32font.h: Include font.h. Define syms_of_w32font and
4244 * process.c: Include TERM_HEADER instead of listing all possible
4245 window-system headers.
4247 * nsterm.h: Remove declarations now in frame.h.
4248 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
4250 * menu.c: Include TERM_HEADER instead of listing all possible
4251 window-system headers.
4253 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
4256 * keyboard.c: Include TERM_HEADER instead of listing all possible
4257 window-system headers.
4259 * image.c: Include TERM_HEADER instead of listing all possible
4260 window-system headers. Declare Vlibrary_cache when compiling for
4263 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
4264 window system declarations.
4266 * frame.h: Move common functions here: set_frame_menubar,
4267 x_set_window_size, x_sync, x_get_focus_frame,
4268 x_set_mouse_position, x_set_mouse_pixel_position,
4269 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
4270 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
4271 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
4272 x_activate_menubar, x_real_positions, x_bitmap_icon,
4273 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
4276 * frame.c: Include TERM_HEADER instead of listing all possible
4277 window-system headers.
4279 * font.c: Include TERM_HEADER instead of listing all possible
4280 window-system headers.
4282 * emacs.c: Include TERM_HEADER.
4284 * dispnew.c: Include TERM_HEADER instead of listing all possible
4285 window-system headers.
4287 * ccl.h: Include character.h.
4289 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
4290 the current window system; include in list of objects to link into
4293 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4295 Remove mark_ttys function and fix tty_display_info initialization.
4296 * lisp.h (mark_ttys): Remove prototype.
4297 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
4298 to mark_ttys because all possible values of 'top_frame' slot are
4299 the frames which are reachable from Vframe_list.
4300 * term.c (mark_ttys): Remove.
4301 (init_tty): Safely initialize 'top_frame' slot with Qnil.
4303 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4305 Change struct frame bitfields from unsigned char to unsigned.
4306 * frame.h (struct frame): Change type of 'display_preempted',
4307 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
4308 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
4309 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
4310 bitfields from unsigned char to unsigned.
4312 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
4314 Remove unused member of struct x_output and struct w32_output.
4315 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
4316 * w32term.h (struct w32_output): Likewise.
4318 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
4320 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
4321 does not become zero (Bug#12234).
4323 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
4325 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
4326 for GCC 4.7.1 x86-64.
4328 2012-08-30 Glenn Morris <rgm@gnu.org>
4330 * lread.c (init_lread): For out-of-tree builds, only add the
4331 source directory's site-lisp dir to the load-path if it exists,
4332 consistent with in-tree builds. (Bug#12302)
4334 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
4336 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
4337 button_values to NULL. Call setStykeMask so dialogs get a close button.
4338 (windowShouldClose:): Set window_closed.
4339 (dealloc): New member, free button_values.
4340 (process_dialog:): Make member function. Remove window argument,
4341 replace window with self. Count buttons and allocate and store values
4343 (addButton:value:row:): value is int with the name tag. Call setTag
4344 with tag. Remove return self, declare return value as void.
4345 (addString:row:): Remove return self, declare return value as void.
4346 (addSplit): Remove return self, declare return value as void.
4347 (clicked:): Remove return self, declare return value as void.
4348 Set dialog_return to button_values[seltag]. Code formatting change.
4349 (initFromContents:isQuestion:): Adjust call to process_dialog.
4350 Code formatting change.
4351 (timeout_handler:): Set timer_fired to YES.
4352 (runDialogAt:): Set timer_fired to NO.
4353 Handle click on close button as quit.
4355 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
4356 Add window_closed and button_values. Add void as return value for
4357 add(Button|String|Split). addButton takes int instead of Lisp_Object.
4358 Add process_dialog as new member.
4360 2012-08-28 Eli Zaretskii <eliz@gnu.org>
4362 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
4363 is not one of the heaps we manage. (Bug#12242)
4365 2012-08-28 Glenn Morris <rgm@gnu.org>
4367 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
4369 2012-08-28 Martin Rudalics <rudalics@gmx.at>
4371 * window.c (Fset_window_configuration): Remove handling of
4372 auto-buffer-name window parameter. Install revision of reverted
4375 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4377 Do not allow to set major mode for a dead buffer.
4378 * buffer.c (Fset_buffer_major_mode): Signal an error
4379 if the buffer is dead.
4380 (Fother_buffer, other_buffer_safely): Remove redundant
4383 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4385 Always use set_buffer_if_live to restore original buffer at unwind.
4386 * buffer.h (record_unwind_current_buffer): New function.
4387 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
4388 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
4389 * undo.c, window.c: Adjust users.
4390 * buffer.c (set_buffer_if_live): Fix comment.
4392 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
4394 Fix usage of set_buffer_internal.
4395 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
4396 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
4397 * coding.c (decode_coding): Omit redundant test.
4398 * fileio.c (decide_coding_unwind): Likewise.
4399 * fns.c (secure_hash): Likewise.
4400 * insdel.c (modify_region): Likewise.
4401 * keyboard.c (command_loop_1): Likewise.
4402 * print.c (PRINTFINISH): Likewise.
4403 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
4405 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
4407 * dispnew.c: Use bool for boolean.
4408 (frame_garbaged, display_completed, delayed_size_change)
4409 (fonts_changed_p, add_window_display_history)
4410 (add_frame_display_history, verify_row_hash)
4411 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
4412 (row_equal_p, realloc_glyph_pool)
4413 (allocate_matrices_for_frame_redisplay)
4414 (showing_window_margins_p)
4415 (adjust_frame_glyphs_for_frame_redisplay)
4416 (build_frame_matrix_from_leaf_window, make_current)
4417 (mirrored_line_dance, mirror_line_dance, update_frame)
4418 (update_window_tree, update_single_window)
4419 (check_current_matrix_flags, update_window, update_text_area)
4420 (update_window_line, set_window_update_flags, scrolling_window)
4421 (update_frame_1, scrolling, buffer_posn_from_coords)
4422 (do_pending_window_change, change_frame_size)
4423 (change_frame_size_1, sit_for):
4424 Use bool for boolean.
4425 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
4426 and remove last int (actually boolean) argument, which was always 0.
4427 All callers changed.
4428 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
4429 * dispextern.h (struct composition_it): Use bool for boolean.
4430 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
4431 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
4432 * dired.c (file_name_completion):
4433 Use bool for boolean. (This was missed in an earlier change.)
4435 2012-08-27 Martin Rudalics <rudalics@gmx.at>
4437 * window.c (Fset_window_configuration): Revert first part of
4440 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
4442 * nsterm.h (NSPanel): New class variable dialog_return.
4444 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
4445 Initialize dialog_return.
4446 (windowShouldClose:): Use stop instead of stopModalWithCode.
4447 (clicked:): Ditto, and also set dialog_return (Bug#12258).
4448 (timeout_handler:): Use stop instead of abortModal. Send a dummy
4450 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
4453 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
4455 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
4456 * composite.c (find_composition, composition_gstring_p)
4457 (composition_reseat_it, find_automatic_composition):
4458 * data.c (let_shadows_buffer_binding_p)
4459 (let_shadows_global_binding_p, set_internal, make_blv)
4460 (Fmake_variable_buffer_local, Fmake_local_variable)
4461 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
4462 (cons_to_signed, arith_driver):
4463 * dbusbind.c (xd_in_read_queued_messages):
4464 * dired.c (directory_files_internal, file_name_completion):
4465 Use bool for booleans.
4466 * dired.c (file_name_completion):
4467 * process.h (fd_callback):
4468 Omit int (actually boolean) argument. It wasn't being used.
4470 * composite.h, lisp.h: Reflect above API changes.
4472 * cmds.c, coding.c: Use bool for booleans.
4473 * cmds.c (move_point, Fself_insert_command):
4474 * coding.h (struct composition status, struct coding_system):
4475 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
4476 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
4477 (emacs_mule_char, decode_coding_emacs_mule)
4478 (encode_coding_emacs_mule, detect_coding_iso_2022)
4479 (decode_coding_iso_2022, encode_invocation_designation)
4480 (encode_designation_at_bol, encode_coding_iso_2022)
4481 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
4482 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
4483 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
4484 (encode_coding_raw_text, detect_coding_charset)
4485 (decode_coding_charset, encode_coding_charset, detect_eol)
4486 (detect_coding, get_translation_table, produce_chars)
4487 (consume_chars, reused_workbuf_in_use)
4488 (make_conversion_work_buffer, code_conversion_save)
4489 (decode_coding_object, encode_coding_object)
4490 (detect_coding_system, char_encodable_p)
4491 (Funencodable_char_position, code_convert_region)
4492 (code_convert_string, code_convert_string_norecord)
4493 (Fset_coding_system_priority):
4494 * fileio.c (Finsert_file_contents):
4495 Use bool for booleans.
4496 * coding.h, lisp.h: Reflect above API changes.
4497 * coding.c: Remove unnecessary static function decls.
4498 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
4499 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
4500 not a boolean 'int', since callers never look at the return value.
4501 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
4502 * coding.h (decoding_buffer_size, encoding_buffer_size)
4503 (emacs_mule_string_char): Remove unused extern decls.
4504 (struct iso_2022_spec, struct coding_system):
4505 Use 'unsigned int : 1' for boolean fields, since there's more than one.
4506 (struct emacs_mule_spec): Remove unused field 'full_support'.
4507 All initializations removed.
4508 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
4510 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
4512 Fix spare memory change (Bug#12286).
4513 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
4514 (valid_lisp_object_p): Likewise.
4516 2012-08-27 Martin Rudalics <rudalics@gmx.at>
4518 * window.c (Fset_window_configuration): Record any window's old
4519 buffer if it's replaced (see Bug#8789). If the new current
4520 buffer doesn't appear in the selected window, go to its old
4523 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
4525 Special MEM_TYPE_SPARE to denote reserved memory.
4526 * alloc.c (enum mem_type): New memory type.
4527 (refill_memory_reserve): Use new type for spare memory.
4528 This prevents live_cons_p and live_string_p from incorrect
4529 detection of uninitialized objects from spare memory as live.
4531 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
4534 * Makefile.in (.PHONY): versioclean -> versionclean.
4536 Remove unused external symbols.
4537 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
4538 * window.c (Qwindow_valid_p, decode_valid_window):
4539 Now static, not extern.
4540 * data.c (Qinterval): Remove; unused.
4541 (syms_of_data): Do not define 'interval'.
4542 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
4543 * window.h (decode_valid_window):
4546 * character.c, charset.c, chartab.c: Use bool for booleans.
4547 * character.c (lisp_string_width, string_count_byte8)
4548 (string_escape_byte8):
4549 * charset.c (charset_map_loaded, load_charset_map, read_hex):
4550 (load_charset_map_from_file, map_charset_chars)
4551 (Fdefine_charset_internal, define_charset_internal)
4552 (Fdeclare_equiv_charset, find_charsets_in_text)
4553 (Ffind_charset_region, char_charset, Fiso_charset):
4554 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
4555 (sub_char_table_set, sub_char_table_set_range)
4556 (char_table_set_range, optimize_sub_char_table)
4557 (map_sub_char_table):
4558 Use bool for boolean.
4559 * character.c (str_to_unibyte): Omit last boolean argument; it was
4560 always 0. All callers changed.
4561 * character.h, charset.h: Adjust to match previous changes.
4562 * character.h (char_printable_p): Remove decl of nonexistent function.
4563 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
4564 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
4565 are all boolean, so make them single-bit bitfields.
4567 * lisp.h (ASET): Remove attempt to detect side effects.
4568 It was meant to be temporary and it often doesn't work,
4569 because when IDX has side effects the behavior of IDX==IDX
4570 is undefined. See Stefan Monnier in
4571 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
4573 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4575 * lisp.h (functionp): New function (extracted from Ffunctionp).
4576 (FUNCTIONP): Use it.
4577 * eval.c (Ffunctionp): Use it.
4579 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
4581 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
4582 as that's faster and simpler than static storage. Don't bother
4583 with the g_main_context_query overhead if g_main_context_pending
4584 says no events are pending.
4585 (gfds, gfds_size): Remove these static vars.
4586 (xgselect_initialize): Remove; no longer needed.
4587 All uses and decls removed.
4589 * emacs.c (fatal_error_signal_hook): Remove.
4590 All uses removed. This leftover from old code was always 0.
4592 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
4593 * casefiddle.c (casify_object, casify_region):
4594 * casetab.c (set_case_table):
4595 * category.c, category.h (word_boundary_p):
4596 * category.h (CHAR_HAS_CATEGORY):
4597 Use bool for booleans, instead of int.
4599 2012-08-25 Eli Zaretskii <eliz@gnu.org>
4601 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
4603 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
4605 On assertion failure, print backtrace if available.
4606 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
4607 (die) [ENABLE_CHECKING]: Print a backtrace if available.
4608 * Makefile.in (LIB_EXECINFO): New macro.
4611 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
4612 * bytecode.c (exec_byte_code):
4613 * callint.c (check_mark, Fcall_interactively):
4614 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
4615 (getenv_internal, sync_process_alive, call_process_exited):
4616 * lisp.h (USE_SAFE_ALLOCA):
4617 Use bool for booleans, instead of int.
4618 * lisp.h, process.h: Adjust prototypes to match above changes.
4619 * callint.c (Fcall_interactively): Don't assume the mark's
4620 offset fits in 'int'.
4622 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
4624 * buffer.c, buffer.h: Use bool for boolean.
4625 * buffer.c (reset_buffer_local_variables)
4626 (buffer_lisp_local_variables, Fset_buffer_modified_p)
4627 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
4628 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
4629 (overlay_touches_p, overlay_strings, Foverlay_put)
4630 (report_overlay_modification, call_overlay_mod_hooks):
4631 (mmap_enlarge, mmap_set_vars):
4632 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
4633 Use bool for booleans, instead of int.
4634 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
4635 since the 1-or-0 return value is always ignored anyway.
4636 (mmap_initialized_p):
4637 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
4638 * buffer.h, lisp.h: Adjust prototypes to match above changes.
4640 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
4642 * bidi.c: Use bool for boolean.
4643 This is a bit more readable, and makes the text segment of bidi.o
4644 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
4645 Presumably it's faster too.
4646 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
4648 (bidi_cache_find_level_change, bidi_cache_iterator_state)
4649 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
4650 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
4651 (bidi_explicit_dir_char, bidi_level_of_next_char)
4652 (bidi_find_other_level_edge, bidi_move_to_visually_next):
4653 Use bool for booleans, instead of int.
4654 * dispextern.h (bidi_init_it, bidi_paragraph_init)
4655 (bidi_unshelve_cache): Adjust decls to match code.
4657 2012-08-23 Martin Rudalics <rudalics@gmx.at>
4659 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
4662 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
4664 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
4665 * atimer.h: Include <stdbool.h>.
4667 2012-08-22 Dan Nicolaescu <dann@gnu.org>
4669 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
4670 compile time tests instead of run time tests on systems that do
4672 (FRAME_MAC_P): Remove leftover from deleted code.
4673 * frame.c (syms_of_frame): Remove leftover from deleted code.
4675 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
4677 * nsterm.m (insertText:): Don't clear modifiers if code is space.
4679 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
4681 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
4682 Otherwise, the compiler complains about (A?B:C) where B is void
4683 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
4684 (fontset_add): Return void, for FONTSET_ADD.
4686 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4688 * alloc.c: Use bool for booleans.
4689 (gc_in_progress, abort_on_gc)
4690 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
4691 (dont_register_blocks) [GC_MALLOC_CHECK]:
4692 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
4693 (check_string_bytes, make_specified_string, memory_full)
4694 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
4695 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
4696 (mark_stack, valid_pointer_p, make_pure_string)
4697 (Fgarbage_collect, survives_gc_p, gc_sweep):
4698 Use bool for booleans, instead of int.
4699 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
4700 Remove unused local.
4701 * alloc.c (PURE_POINTER_P):
4702 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
4703 * editfns.c (Fformat):
4704 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
4706 * fns.c (sweep_weak_table):
4707 * lisp.h (suppress_checking, push_message, survives_gc_p)
4708 (make_pure_string, gc_in_progress, abort_on_gc):
4709 * lread.c (readchar, read1):
4710 * print.c (Fprin1_to_string):
4711 * xdisp.c (push_message):
4712 Use bool for booleans affected directly or indirectly by
4715 Make recently-introduced setters macros.
4716 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
4717 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
4718 (set_fontset_default, set_fontset_fallback): Rename from their
4719 upper-case counterparts, and make them functions rather than macros.
4720 This is more consistent with the other recently-introduced setters.
4721 These don't need to be inline, since they're local.
4723 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
4725 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
4726 the loop (Bug#12247).
4728 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4730 * lisp.h (vcopy): Use memcpy rather than our own loop.
4731 This fixes a performance regression introduced by the recent
4732 addition of vcopy. This means 'vcopy' will need to be modified
4733 for a copying collector, but that's OK. Also, tighten the
4734 checking in the assertion.
4736 2012-08-21 Eli Zaretskii <eliz@gnu.org>
4738 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
4739 components for RTL text (Bug#11860). Adjust X-OFFSET of each
4740 non-base glyph for the width of the base character, according to
4741 what x_draw_composite_glyph_string_foreground expects.
4742 Generate WADJUST value according to composition_gstring_width's
4743 expectations, to produce correct width of the composed character.
4744 Reverse the sign of the DU offset produced by ScriptPlace.
4746 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
4748 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
4750 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
4752 Avoid direct writes to contents member of struct Lisp_Vector.
4753 * lisp.h (vcopy): New function to copy data into vector.
4754 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
4755 * fns.c (Ffillarray): Use ASET.
4756 * keyboard.c (timer_check_2): Use AREF and ASET.
4757 (append_tool_bar_item, Frecent_keys): Use vcopy.
4758 * lread.c (read_vector): Use ASET.
4759 * msdos.c (Frecent_doskeys): Use vcopy.
4760 * xface.c (Finternal_copy_lisp_face): Use vcopy.
4761 (Finternal_merge_in_global_face): Use ASET and vcopy.
4762 * xfont.c (xfont_list_pattern): Likewise.
4764 2012-08-21 Martin Rudalics <rudalics@gmx.at>
4766 * window.c (Fwindow_point): For the selected window always return
4767 the position of its buffer's point.
4768 (Fset_window_point): For the selected window always go in its
4769 buffer to the specified position.
4771 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
4773 Setter macros for fontsets.
4774 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
4775 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
4776 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
4779 2012-08-20 Glenn Morris <rgm@gnu.org>
4781 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
4782 Don't assume that `ln -f' works.
4784 2012-08-20 Eli Zaretskii <eliz@gnu.org>
4786 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
4787 and later about non-assignments with no effect. See discussion at
4788 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
4791 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4793 Inline setter functions for Lisp_Objects slots of struct specbinding.
4794 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
4797 2012-08-20 Martin Rudalics <rudalics@gmx.at>
4799 * window.c (select_window): Always make selected window's buffer
4802 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4804 Use AREF and ASET for docstrings of category tables.
4805 * category.h (CATEGORY_DOCSTRING): Use AREF.
4806 (SET_CATEGORY_DOCSTRING): Use ASET.
4807 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
4809 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4811 Inline setter functions for hash table members.
4812 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
4813 (set_hash_hash, set_hash_index): Rename with _slot suffix.
4814 (set_hash_key_and_value, set_hash_index, set_hash_next)
4815 (set_hash_hash): New functions.
4816 * charset.c, fns.c: Adjust users.
4818 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
4820 Inline getter and setter functions for per-buffer values.
4821 * buffer.h (per_buffer_default, set_per_buffer_default)
4822 (per_buffer_value, set_per_buffer_value): New functions.
4823 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
4824 * buffer.c, data.c: Adjust users.
4826 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
4828 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
4830 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
4832 Rely on <config.h> + <unistd.h> to declare 'environ',
4833 as gnulib does this if the system doesn't.
4834 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
4835 Remove declaration. MS-Windows declares it on stdlib.h which is
4836 included by conf_post.h.
4837 * emacs.c (environ) [DOUG_LEA_MALLOC]:
4838 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
4839 * vm-limit.c: Include <unistd.h>, for 'environ'.
4841 * unexaix.c, unexcoff.c: Include "mem-limits.h".
4842 (start_of_data): Remove decl; mem-limits.h provides it.
4844 * xdisp.c (handle_invisible_prop): Make it a bit faster
4845 and avoid a gcc -Wmaybe-uninitialized diagnostic.
4847 2012-08-19 Chong Yidong <cyd@gnu.org>
4849 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
4852 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
4854 * .gdbinit: Use call instead of set when calling a function in the
4857 * data.c (set_internal): Don't use set_blv_found.
4858 (Fkill_local_variable): Likewise.
4860 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
4862 * nsfont.m (ns_ascii_average_width): Ensure the string
4863 ascii_printable is initialized with a null-terminated character
4864 array. Otherwise, it can contain undesired extra characters.
4866 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
4868 port new setting code to Sun C 5.8 2005/10/13
4869 * chartab.c, lisp.h (char_table_set, char_table_set_range):
4870 Return void, not Lisp_Object. Otherwise, the compiler
4871 complains about (A?B:C) where B is void and C is Lisp_Object
4872 when compiling CHAR_TABLE_SET, due to the recent change to
4873 the API of sub_char_table_set_contents.
4875 2012-08-18 Chong Yidong <cyd@gnu.org>
4877 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
4878 for the string case (Bug#3874).
4880 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
4882 * buffer.h (BSET): Remove (Bug#12215).
4883 Replace all uses with calls to new setter functions.
4884 (bset_bidi_paragraph_direction, bset_case_canon_table)
4885 (bset_case_eqv_table, bset_directory, bset_display_count)
4886 (bset_display_time, bset_downcase_table)
4887 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
4888 (bset_last_selected_window, bset_local_var_alist)
4889 (bset_mark_active, bset_point_before_scroll, bset_read_only)
4890 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
4892 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
4893 (bset_auto_fill_function, bset_auto_save_file_format)
4894 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
4895 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
4896 (bset_cache_long_line_scans, bset_case_fold_search)
4897 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
4898 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
4899 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
4900 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
4901 (bset_header_line_format, bset_indicate_buffer_boundaries)
4902 (bset_indicate_empty_lines, bset_invisibility_spec)
4903 (bset_left_fringe_width, bset_major_mode, bset_mark)
4904 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
4905 (bset_name, bset_overwrite_mode, bset_pt_marker)
4906 (bset_right_fringe_width, bset_save_length)
4907 (bset_scroll_bar_width, bset_scroll_down_aggressively)
4908 (bset_scroll_up_aggressively, bset_selective_display)
4909 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
4910 (bset_word_wrap, bset_zv_marker):
4911 * category.c (bset_category_table):
4912 * syntax.c (bset_syntax_table):
4913 New setter functions.
4915 * process.h (PSET): Remove (Bug#12215).
4916 Replace all uses with calls to new setter functions.
4917 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4918 (PROCESS_INLINE): New macro.
4919 (pset_childp): New setter function.
4920 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
4921 * process.c (PROCESS_INLINE):
4922 Define to EXTERN_INLINE, so that the corresponding functions
4923 are compiled into code.
4924 (pset_buffer, pset_command, pset_decode_coding_system)
4925 (pset_decoding_buf, pset_encode_coding_system)
4926 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
4927 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
4928 (pset_type, pset_write_queue): New setter functions.
4930 * window.h (WSET): Remove (Bug#12215).
4931 Replace all uses with calls to new setter functions.
4932 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4933 (WINDOW_INLINE): New macro.
4934 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
4935 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
4936 (wset_total_lines, wset_vertical_scroll_bar)
4937 (wset_window_end_pos, wset_window_end_valid)
4938 (wset_window_end_vpos): New setter functions.
4939 * window.c (WINDOW_INLINE):
4940 Define to EXTERN_INLINE, so that the corresponding functions
4941 are compiled into code.
4942 (wset_combination_limit, wset_dedicated, wset_display_table)
4943 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
4944 (wset_new_normal, wset_new_total, wset_next_buffers)
4945 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
4946 (wset_prev_buffers, wset_right_fringe_width)
4947 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
4948 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
4949 (wset_window_parameters):
4950 * xdisp.c (wset_base_line_number, wset_base_line_pos)
4951 (wset_column_number_displayed, wset_region_showing):
4952 New setter functions.
4954 * termhooks.h (TSET): Remove (Bug#12215).
4955 Replace all uses with calls to new setter functions.
4956 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4957 (TERMHOOKS_INLINE): New macro.
4958 (tset_charset_list, tset_selection_alist): New setter functions.
4959 * terminal.c (TERMHOOKS_INLINE):
4960 Define to EXTERN_INLINE, so that the corresponding functions
4961 are compiled into code.
4962 (tset_param_alist): New setter function.
4964 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
4966 * keyboard.h (KSET): Remove (Bug#12215).
4967 Replace all uses with calls to new setter functions.
4968 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4969 (KEYBOARD_INLINE): New macro.
4970 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
4971 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
4972 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
4973 New setter functions.
4974 * keyboard.c (KEYBOARD_INLINE):
4975 Define to EXTERN_INLINE, so that the corresponding functions
4976 are compiled into code.
4977 (kset_echo_string, kset_kbd_queue)
4978 (kset_keyboard_translate_table, kset_last_prefix_arg)
4979 (kset_last_repeatable_command, kset_local_function_key_map)
4980 (kset_overriding_terminal_local_map, kset_real_last_command)
4981 (kset_system_key_syms): New setter functions.
4983 * frame.h (FSET): Remove (Bug#12215).
4984 Replace all uses with calls to new setter functions.
4985 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4986 (FRAME_INLINE): New macro.
4987 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
4988 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
4989 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
4990 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
4991 (fset_param_alist, fset_root_window, fset_scroll_bars)
4992 (fset_selected_window, fset_title, fset_tool_bar_items)
4993 (fset_tool_bar_position, fset_tool_bar_window): New functions.
4994 * frame.c (FRAME_INLINE):
4995 Define to EXTERN_INLINE, so that the corresponding functions
4996 are compiled into code.
4997 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
4999 A few more naming-convention fixes for getters and setters.
5000 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
5001 and rename from buffer_overlays_set_before.
5002 (set_buffer_overlays_after): Move here from buffer.h, and rename
5003 from buffer_overlays_set_after.
5004 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
5006 (set_buffer_intervals): Rename from buffer_set_intervals.
5007 * intervals.c (set_interval_object): Move here from intervals.h,
5008 and rename from interval_set_object.
5009 (set_interval_left): Move here from intervals.h, and rename from
5011 (set_interval_right): Move here from intervals.h, and rename from
5013 (copy_interval_parent): Move here from intervals.h, and rename from
5014 interval_copy_parent.
5015 * intervals.h (set_interval_parent): Rename from interval_set_parent.
5016 (set_interval_plist): Rename from interval_set_plist.
5017 Return void, not Lisp_Object, since no caller uses the result.
5018 * lisp.h (string_intervals): Rename from string_get_intervals.
5019 (set_string_intervals): Rename from string_set_intervals.
5021 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
5022 (set_char_table_contents): Rename from char_table_set_contents.
5023 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
5024 All uses changed. See the end of
5025 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
5027 * lisp.h (CSET): Remove (Bug#12215).
5028 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
5029 (set_char_table_purpose): New functions,
5030 replacing CSET. All uses changed. For example, replace
5031 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
5032 "set_char_table_parent (char_table, parent);".
5033 The old version was confusing because it used the same name
5034 'parent' for two different things.
5036 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5038 Functions to get and set Lisp_Object fields of buffer-local variables.
5039 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
5040 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
5041 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
5042 * data.c, eval.c, frame.c: Adjust users.
5044 2012-08-17 Chong Yidong <cyd@gnu.org>
5046 * xfaces.c (merge_face_vectors): If the target font specfies a
5047 font spec, make the font's attributes take precedence over
5048 directly-specified attributes.
5049 (merge_face_ref): Recognize :font.
5051 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
5053 Do not use memcpy for copying intervals.
5054 * intervals.c (reproduce_interval): New function.
5055 (reproduce_tree, reproduce_tree_obj): Use it.
5056 (reproduce_tree_obj): Remove prototype.
5058 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
5060 * lisp.h (duration_to_sec_usec): Remove unused decl.
5062 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
5064 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
5065 to an allocated instance of NSString, not to the class itself.
5067 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
5069 * makefile.w32-in (C_CTYPE_H): New macro.
5070 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
5071 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
5072 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
5074 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
5076 Use ASCII tests for character types.
5077 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
5079 Don't include <ctype.h>; was not needed.
5080 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
5081 * sysdep.c, xfaces.c:
5082 Include <c-ctype.h> instead of <ctype.h>.
5083 * nsterm.m: Include <c-ctype.h>.
5084 * charset.c (read_hex):
5085 * doc.c (Fsnarf_documentation):
5086 * fileio.c (IS_DRIVE) [WINDOWSNT]:
5087 (DRIVE_LETTER) [DOS_NT]:
5088 (Ffile_name_directory, Fexpand_file_name)
5089 (Fsubstitute_in_file_name):
5090 * font.c (font_parse_xlfd, font_parse_fcname):
5091 * frame.c (x_set_font_backend):
5092 * gtkutil.c (xg_get_font):
5093 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
5094 * nsimage.m (hexchar):
5095 * nsterm.m (ns_xlfd_to_fontname):
5096 * sysdep.c (system_process_attributes):
5097 * xfaces.c (hash_string_case_insensitive):
5098 Use C-locale tests instead of locale-specific tests for character
5099 types, since we want the ASCII interpretation here, not the
5100 interpretation suitable for whatever happens to be the current locale.
5102 2012-08-16 Martin Rudalics <rudalics@gmx.at>
5104 Consistently check windows for validity/liveness
5105 (Bug#11984, Bug#12025, Bug#12026).
5106 * lisp.h (CHECK_VALID_WINDOW): New macro.
5107 * window.c (decode_window): Rename to decode_live_window.
5108 (decode_valid_window, Fwindow_valid_p): New functions.
5109 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
5110 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
5111 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
5112 (Fwindow_prev_sibling, Fwindow_combination_limit)
5113 (Fset_window_combination_limit, Fwindow_use_time)
5114 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
5115 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
5116 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
5117 (Fwindow_hscroll, Fset_window_hscroll)
5118 (Fwindow_redisplay_end_trigger)
5119 (Fset_window_redisplay_end_trigger, Fwindow_edges)
5120 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
5121 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
5122 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
5123 (Fwindow_end, Fset_window_point, Fset_window_start)
5124 (Fpos_visible_in_window_p, Fwindow_line_height)
5125 (Fwindow_dedicated_p, Fset_window_dedicated_p)
5126 (Fwindow_prev_buffers, Fset_window_prev_buffers)
5127 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
5128 (Fset_window_parameter, Fwindow_display_table)
5129 (Fset_window_display_table, Fdelete_other_windows_internal)
5130 (Fset_window_buffer, Fset_window_new_total)
5131 (Fset_window_new_normal, Fdelete_window_internal)
5132 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
5133 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
5134 (Fwindow_scroll_bars): Check whether argument window is a valid or
5135 live window. Update doc-strings.
5136 (syms_of_window): New symbol Qwindow_valid_p.
5137 * keyboard.c (Fposn_at_x_y): Check whether argument
5138 frame_or_window denotes a valid window.
5140 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5142 Fix previous char table change.
5143 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
5144 * chartab.c (optimize_sub_char_table): Likewise.
5146 2012-08-16 Chong Yidong <cyd@gnu.org>
5148 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
5150 * xfont.c (xfont_open):
5151 * xftfont.c (xftfont_open): Set the font's max_width field.
5153 * nsfont.m (nsfont_open): Similar to the Xft backend, set
5154 min_width to space_width and average_width to the average over
5155 printable ASCII characters.
5156 (ns_char_width): Code cleanup.
5157 (ns_ascii_average_width): New utility function.
5159 * font.h (struct font): Update comments.
5161 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
5163 Simple interface to set Lisp_Object fields of character tables.
5164 * lisp.h (CSET): New macro.
5165 (char_table_set_extras, char_table_set_contents)
5166 (sub_char_table_set_contents): New function.
5167 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
5168 * syntax.c: Adjust users.
5170 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
5172 * eval.c (eval_sub): Bind lexical-binding.
5173 * lread.c (Qlexical_binding): Make non-static.
5175 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
5177 * nsmenu.m (popupSession): Remove.
5178 (pop_down_menu): Remove endModalSession.
5179 (timeout_handler:): New method.
5180 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
5181 Call runModalForWindow. Check timer_fired when it returns.
5182 If not set, cancel timer and break out of loop.
5183 Otherwise loop again, with a new timeout.
5185 * nsterm.m: Include fcntl.h if present.
5186 (fd_entry, t_readfds, inNsSelect): Remove.
5187 (select_writefds, select_valid, select_timeout, selfds)
5188 (select_mutex, apploopnr): Add.
5189 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
5190 Otherwise call kbd_buffer_store_event.
5191 (ns_send_appdefined): Remove release of fd_entry.
5192 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
5193 Increment and decrement apploopnr.
5194 (ns_select): If no file descriptors, just do a NSTimer.
5195 Otherwise copy read/write masks and start select thread (fd_handler).
5196 Start main loop and wait for application defined event.
5197 Inform select thread to stop selecting after main loop is exited.
5198 (ns_term_init): Create selfds pipe and set non-blocking.
5199 Initialize select_mutex. Start the select thread (fd_handler).
5200 (fd_handler:): Loop forever, wait for info from the main thread
5201 to either start or stop selecting. When select returns, send
5202 and appdefined event.
5203 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
5204 If not call kbd_buffer_store_event.
5206 * nsterm.h (EmacsApp): fd_handler takes id argument.
5207 (EmacsDialogPanel): Add timer_fired and timeout_handler.
5209 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
5211 2012-08-15 Eli Zaretskii <eliz@gnu.org>
5213 * region-cache.c (move_cache_gap): Update gap_len using the actual
5214 growth of the boundaries array. Do not change cache_len.
5217 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5219 Generalize and cleanup font subsystem checks.
5220 * font.h (FONT_DEBUG, font_assert): Remove.
5221 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
5222 Change font_assert to eassert. Use eassert where appropriate.
5224 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5226 * gtkutil.c (xg_get_font): Use pango_units_to_double.
5228 2012-08-15 Chong Yidong <cyd@gnu.org>
5230 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
5231 When using the new font chooser, use gtk_font_chooser_get_font_desc to
5232 extract the font descriptor instead of just the font name.
5233 In that case, return a font spec instead of a string.
5234 (x_last_font_name): Move to this file from xfns.c.
5236 * xfns.c (Fx_select_font): The return value can also be a font
5237 spec. Move x_last_font_name management to gtkutil.c.
5239 * xfaces.c: Make font weight and style symbols non-static.
5241 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
5243 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
5246 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
5248 * alloc.c (Fgarbage_collect): Use plural form consistently.
5250 2012-08-14 Eli Zaretskii <eliz@gnu.org>
5252 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
5253 iteration through the command loop. Fixes a problem whereby mouse
5254 movements are ignored until the first mouse click.
5256 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5258 Use bool, not int, for Lisp booleans.
5259 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
5260 makes Emacs a bit smaller and presumably a bit faster.
5261 * lisp.h: Include <stdbool.h>.
5262 (struct Lisp_Boolfwd, defvar_bool):
5263 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
5264 * regex.c [!emacs]: Include <stdbool.h>.
5265 (false, true): Remove; <stdbool.h> does this for us now.
5267 2012-08-14 Chong Yidong <cyd@gnu.org>
5269 * character.c (Fcharacterp): Doc fix (Bug#12076).
5271 * data.c (Findirect_variable): Doc fix (Bug#11040).
5273 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
5275 * editfns.c (Fformat): Doc fix (Bug#12059).
5276 (Fsave_current_buffer): Doc fix (Bug#11542).
5278 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
5280 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
5283 2012-08-14 Martin Rudalics <rudalics@gmx.at>
5285 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
5286 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5287 * minibuf.c (choose_minibuf_frame, read_minibuf):
5288 * w32fns.c (x_create_tip_frame):
5289 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
5290 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
5292 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5294 * intervals.c (offset_intervals): Remove obsolete comment.
5296 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
5298 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
5300 2012-08-14 Gergely Risko <gergely@risko.hu>
5302 * coding.c (decode_coding): Record buffer modification before
5303 disabling undo_list (Bug#11773).
5305 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5307 Revert and cleanup some recent overlay changes.
5308 * buffer.h (enum overlay_type): Remove.
5309 (buffer_get_overlays, buffer_set_overlays): Likewise.
5310 (buffer_set_overlays_before, buffer_set_overlays_after):
5311 New function. Adjust users.
5312 (unchain_both): Add eassert.
5314 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5316 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
5318 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
5320 * gtkutil.c (xg_mark_data): Don't assume C99.
5322 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
5324 * gtkutil.c (xg_frame_tb_info): New struct.
5325 (TB_INFO_KEY): New define.
5326 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
5327 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
5328 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
5330 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
5331 is up to date. Otherwise store new data.
5332 (free_frame_tool_bar): Free xg_frame_tb_info if present.
5334 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5336 Use KSET for write access to Lisp_Object members of struct kboard.
5337 * keyboard.h (KSET): New macro.
5338 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
5339 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
5340 * xterm.c: Adjust users.
5342 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5344 Use BSET for write access to Lisp_Object members of struct buffer.
5345 * buffer.h (BSET): New macro.
5346 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
5347 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
5348 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
5349 * window.c, xdisp.c, xfns.c: Adjust users.
5351 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
5353 * lread.c (syms_of_lread): Initialize Vlexical_binding.
5355 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
5357 * nsterm.m (not_in_argv): New function.
5358 (application:openFile, application:openTempFile:):
5359 (application:openFileWithoutUI:, application:openFiles:): Open file
5360 if not_in_argv returns non-zero (bug#12171).
5362 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
5363 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
5364 Define for Gtk+ versions less than 3.2.
5365 (xg_get_font_name): Use those functions/macros here.
5366 Reported by Frans Oilinki <moilinki@gmail.com>.
5368 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5370 * unexmacosx.c (copy_data_segment): Copy initialized data in
5371 statically linked libraries from input file rather than memory.
5373 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
5374 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
5375 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
5377 2012-08-10 Glenn Morris <rgm@gnu.org>
5379 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
5380 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
5382 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5384 Fix last change to allow compilation with low optimization levels.
5385 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
5386 Reported by Jan Djärv <jan.h.d@swipnet.se>.
5388 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5390 Use common inline syntax in intervals.h.
5391 * intervals.h (INTERVALS_INLINE): New macro.
5392 Change all users from LISP_INLINE.
5394 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5396 Define Qnone once for all platforms.
5397 * frame.c (Qnone): Define here.
5398 (syms_of_frame): DEFSYM it.
5399 * lisp.h (Qnone): New declaration.
5400 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
5401 * xfns.c: Remove duplication. Adjust users.
5403 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
5405 Remove unused macros from intervals.h.
5406 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
5407 * intervals.c: Adjust comment.
5409 2012-08-10 Eli Zaretskii <eliz@gnu.org>
5411 * w32fns.c <w32_unicode_gui>: New static variable.
5412 (globals_of_w32fns): Initialize it according to os_subtype.
5413 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
5416 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
5417 Eli Zaretskii <eliz@gnu.org>
5419 Fix bug #10299 with Unicode characters sent by customized
5420 keyboards created by MSKLC.
5421 * w32fns.c (INIT_WINDOW_CLASS): New macro.
5422 (w32_init_class): Use it to initialize the Emacs class with either
5423 ANSI or Unicode API calls.
5424 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
5426 (w32_wnd_proc): If the character code sent by WM_CHAR or
5427 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
5428 original message. Call DefWindowProcW on NT and later.
5430 2012-08-10 Glenn Morris <rgm@gnu.org>
5432 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
5434 * lisp.h (DIRECTORY_SEP): Let configure set it.
5436 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
5438 Use TSET for write access to Lisp_Object slots of struct terminal.
5439 * termhooks.h (TSET): New macro.
5440 * coding.c, terminal.c, xselect.c: Adjust users.
5442 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
5444 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
5445 the failing expression, include them in the error message.
5446 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
5447 * lisp.h (internal_condition_case_n): Update declaration.
5449 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5451 Inline functions to examine and change buffer overlays.
5452 * buffer.c (unchain_both): New function.
5453 * buffer.h (buffer_get_overlays, buffer_set_overlays):
5454 (buffer_has_overlays): New function.
5455 (enum overlay_type): New enum.
5456 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
5457 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
5459 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5461 Inline functions to examine and change buffer intervals.
5462 * alloc.c (mark_interval_tree): Remove.
5463 (MARK_INTERVAL_TREE): Simplify.
5464 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
5465 * intervals.c (buffer_balance_intervals): New function.
5466 (graft_intervals_into_buffer): Adjust indentation.
5467 (set_intervals_multibyte): Simplify.
5468 * buffer.h (BUF_INTERVALS): Remove.
5469 (buffer_get_intervals, buffer_set_intervals): New function.
5470 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
5471 * intervals.c, textprop.c: Adjust users.
5473 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5475 Inline functions to examine and change string intervals.
5476 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
5477 (string_get_intervals, string_set_intervals): New function.
5478 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
5479 * lread.c, print.c, textprop.c: Adjust users.
5481 2012-08-08 Glenn Morris <rgm@gnu.org>
5483 * lisp.mk (lisp): Remove language/persian.elc.
5485 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5488 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
5489 (NULL_INTERVAL_P): Likewise. Adjust users.
5490 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
5491 Adjust comment. Move under #if 0.
5492 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
5493 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
5495 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
5497 Check total length of intervals with eassert.
5498 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
5499 * intervals.c: Change all users to eassert.
5501 2012-08-07 Eli Zaretskii <eliz@gnu.org>
5503 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
5504 Rename fields to match removal of FGET and WGET and disuse of
5505 INTERNAL_FIELD in Lisp_Cons.
5507 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5509 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
5510 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
5511 name since all xname users are fixed long time ago. Do not
5513 (set_symbol_name, set_symbol_function, set_symbol_plist):
5514 (set_symbol_next, set_overlay_plist): New function.
5515 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
5516 (struct Lisp_Overlay): Likewise.
5517 (CVAR, MVAR, SVAR): Remove.
5518 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
5519 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
5520 * xterm.c: Adjust users.
5521 * .gdbinit: Change to use name field of struct Lisp_Symbol
5524 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5526 Basic functions to set Lisp_Object and pointer slots of intervals.
5527 * intervals.h (interval_set_parent, interval_set_object):
5528 (interval_set_left, interval_set_right, interval_set_plist):
5529 (interval_copy_parent): New function.
5530 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
5531 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
5533 (INTERVAL_SIZE): Remove. Adjust users.
5534 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
5536 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5538 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
5539 * process.h (PGET): Remove.
5540 (struct Lisp_Process): Do not use INTERNAL_FIELD.
5541 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
5543 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5545 Drop WGET and revert read access to Lisp_Objects slots of struct window.
5546 * window.h (WGET): Remove.
5547 (struct window): Do not use INTERNAL_FIELD.
5548 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
5549 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
5550 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
5551 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
5552 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
5555 2012-08-07 Chong Yidong <cyd@gnu.org>
5557 * window.c (Fwindow_edges, Fwindow_pixel_edges)
5558 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
5559 (Fdelete_window_internal): Signal an error if the window is not on
5560 a live frame (Bug#12025).
5562 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
5564 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
5565 * frame.h (FGET): Remove.
5566 (struct frame): Do not use INTERNAL_FIELD.
5567 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
5568 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
5569 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
5570 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
5572 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
5574 * w32.c: Silence compiler warnings.
5575 (map_w32_filename): Remove unused variable `is_fat'.
5576 (chase_symlinks): Add parentheses around expression.
5578 2012-08-06 Glenn Morris <rgm@gnu.org>
5580 * sysdep.c: Respect BROKEN_GETWD.
5582 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
5583 Let configure handle it.
5584 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
5586 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5588 Use GCALIGNMENT where appropriate.
5589 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
5590 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
5591 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
5593 2012-08-06 Eli Zaretskii <eliz@gnu.org>
5595 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
5596 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5598 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
5600 * buffer.h (struct buffer): Revert `indirections' to a simple int;
5601 that should be sufficient for everyone.
5603 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
5605 * keyboard.c (timer_check_2): Add break so timer_check returns next
5608 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5610 Fix Windows build errors introduced after converting to WGET and WSET.
5611 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
5612 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
5614 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
5616 * nsterm.m (ns_frame_rehighlight): Use FSET.
5618 * nsmenu.m (ns_update_menubar): Use FSET.
5620 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5622 Separate read and write access to Lisp_Object slots of Lisp_Process.
5623 * process.h (PGET, PSET): New macros similar to AREF and ASET.
5624 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
5626 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5628 Separate read and write access to Lisp_Object slots of struct window.
5629 * window.h (WGET, WSET): New macros similar to AREF and ASET.
5630 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
5631 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
5632 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
5633 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
5634 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
5637 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5639 Fix Windows build errors introduced after converting to FGET and FSET.
5640 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
5641 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
5642 (w32_judge_scroll_bars): Change to use FSET.
5643 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
5645 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5647 Fix replacement typo.
5648 * window.c (replace_window): Set root_window instead of
5649 selected_window. This fixes a total window subsystem
5650 malfunction reported by Bastien Guerry <bzg@gnu.org>.
5652 2012-08-06 Glenn Morris <rgm@gnu.org>
5654 * lisp.mk (lisp): Add language/persian.elc.
5656 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
5658 Separate read and write access to Lisp_Object slots of struct frame.
5659 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
5660 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
5661 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
5662 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
5663 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
5665 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
5667 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
5669 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
5671 Generalize common compile-time constants.
5672 * lisp.h (header_size, bool_header_size, word_size): Now here.
5673 (struct Lisp_Vector): Add comment.
5674 (struct Lisp_Bool_Vector): Move up to define handy constants.
5675 (VECSIZE, PSEUDOVECSIZE): Simplify.
5676 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
5677 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
5678 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
5679 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
5680 * xfont.c, xmenu.c: Use word_size where appropriate.
5682 2012-08-05 Lawrence Mitchell <wence@gmx.li>
5684 * search.c (Freplace_match): Treat \? in the replacement text
5685 literally (Bug#8161).
5687 2012-08-05 Chong Yidong <cyd@gnu.org>
5689 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
5690 * frame.c (Vdelete_frame_functions):
5691 * emacs.c (Vkill_emacs_hook): Doc fix.
5693 2012-08-04 Eli Zaretskii <eliz@gnu.org>
5695 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
5696 --with-x-toolkit=no builds.
5697 Reported by Carsten Mattner <carstenmattner@gmail.com>.
5699 2012-08-04 Chong Yidong <cyd@gnu.org>
5701 * syntax.c (Fmodify_syntax_entry): Doc fix.
5703 2012-08-04 Eli Zaretskii <eliz@gnu.org>
5705 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
5706 * w32.c (init_environment): Change the default values of many
5707 environment variables in dflt_envvars[] to NULL, to avoid pushing
5708 them into environment when they were not already defined.
5709 Remove the code that deletes site-lisp subdirectories from the default
5710 value of EMACSLOADPATH, as it is no longer needed.
5711 (check_windows_init_file): Now external, not static.
5712 Use Vload_path as is, without adding anything, as this function is now
5713 called when Vload_path is already set up.
5715 * w32.h (check_windows_init_file): Add prototype.
5717 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
5718 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
5719 compatibility with Posix platforms.
5720 (main): Move the call to check_windows_init_file to here from
5722 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
5723 any, in the DEFALT argument into the root of the Emacs build or
5724 installation tree, as appropriate.
5726 * callproc.c (init_callproc_1): Call decode_env_path instead of
5727 doing its equivalent by hand.
5728 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
5729 the code that sets Vexec_path run on MS-Windows.
5731 * lread.c (init_lread): Add comments to #ifdef's.
5733 * msdos.c (dos_set_window_size, IT_update_begin)
5734 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
5735 instead of direct references.
5737 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
5739 Export DEFAULT_REHASH_* to GDB.
5740 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
5741 Now constants, not macros.
5743 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
5745 Remove unnecessary casts involving pointers.
5746 These casts are no longer needed now that we assume C89 or later,
5747 since they involve casting to or from void *.
5748 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
5749 (make_pure_float, make_pure_vector):
5750 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
5751 * macros.c (Fstart_kbd_macro):
5752 * menu.c (find_and_return_menu_selection):
5753 * minibuf.c (read_minibuf_noninteractive):
5754 * sysdep.c (closedir):
5755 * xdisp.c (x_produce_glyphs):
5756 * xfaces.c (compare_fonts_by_sort_order):
5757 * xfns.c (x_real_positions, select_visual):
5758 * xselect.c (x_stop_queuing_selection_requests)
5759 (x_get_window_property, x_get_window_property_as_lisp_data):
5760 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
5761 Remove unnecessary pointer casts.
5762 * alloc.c (record_xmalloc): New function.
5763 * lisp.h (record_xmalloc): New decl.
5764 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
5765 more like a function. This is because the pointer cast is not
5766 needed. All uses changed.
5767 * print.c (print_string, print_error_message): Avoid length recalc.
5769 Improve fix for macroexp crash with debugging (Bug#12118).
5770 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
5771 ARRAY_MARK_FLAG when checking subscripts, because ASET is
5772 not supposed to be invoked from the garbage collector.
5773 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
5774 (gc_aset): New function, which is like ASET but can be
5775 used in the garbage collector.
5776 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
5777 (set_hash_index): Use it instead of ASET.
5779 2012-08-03 Eli Zaretskii <eliz@gnu.org>
5781 Support symlinks on latest versions of MS-Windows.
5782 * w32.c: Include winioctl.h and aclapi.h.
5783 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
5784 (revert_to_self): Forward declarations of static functions.
5785 <static BOOL g_b_init_get_security_info>:
5786 <g_b_init_create_symbolic_link>: New static flags.
5787 (globals_of_w32): Initialize them to zero.
5788 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
5789 (map_w32_filename): Improve commentary. Simplify switch.
5790 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
5791 headers (most versions of MinGW w32api don't).
5792 (get_security_info, create_symbolic_link)
5793 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
5795 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
5796 in the argument file name.
5797 (sys_access): Call unc_volume_file_attributes only if
5798 GetFileAttributes fails with network-related error codes.
5799 (sys_rename): Diagnose renaming of a symlink when the user doesn't
5800 have the required privileges.
5801 (get_file_security_desc_by_name): Rename from
5802 get_file_security_desc.
5803 (stat_worker): New function, with most of the guts of 'stat', and
5804 with addition of handling of symlinks and support for 'lstat'.
5805 If possible, get file's attributes and security information by
5806 handle, not by name. Produce S_IFLNK bit for symlinks, when
5807 called from 'lstat'.
5808 (stat, lstat): New functions, call 'stat_worker'.
5809 (symlink, readlink, careadlinkat): Rewritten to create and resolve
5810 symlinks when the underlying filesystem supports them.
5812 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
5814 Fix macroexp crash on Windows with debugging (Bug#12118).
5815 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
5816 checking subscripts; problem introduced with the recent
5817 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
5818 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
5819 since it's used in non-static inline functions now.
5821 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
5822 Don't assume buffer size fits in 'int'. Remove unused local.
5824 Use C99-style 'extern inline' if available.
5825 * buffer.h (BUFFER_INLINE):
5826 * category.h (CATEGORY_INLINE):
5827 * character.h (CHARACTER_INLINE):
5828 * charset.h (CHARSET_INLINE):
5829 * composite.h (COMPOSITE_INLINE):
5830 * dispextern.h (DISPEXTERN_INLINE):
5831 * lisp.h (LISP_INLINE):
5832 * systime.h (SYSTIME_INLINE):
5833 New macro, replacing 'static inline' in this header.
5834 * buffer.h, category.h, character.h, charset.h, composite.h:
5835 * dispextern.h, lisp.h, systime.h:
5836 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5837 * alloc.c (LISP_INLINE):
5838 * buffer.c (BUFFER_INLINE):
5839 * category.c (CATEGORY_INLINE):
5840 * character.c (CHARACTER_INLINE):
5841 * charset.c (CHARSET_INLINE):
5842 * composite.c (COMPOSITE_INLINE):
5843 * dispnew.c (DISPEXTERN_INLINE):
5844 * sysdep.c (SYSTIME_INLINE):
5845 Define to EXTERN_INLINE, so that the corresponding functions
5846 are compiled into code.
5847 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
5848 (INLINE_HEADER_END): New macros.
5849 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
5850 since it's used in non-static inline functions now.
5851 (VALMASK) [!USE_LSB_TAG]: Likewise.
5853 2012-08-02 Glenn Morris <rgm@gnu.org>
5855 * s/: Remove empty directory.
5857 * s/ms-w32.h: Move to ../nt/inc.
5858 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
5859 Update for new ms-w32.h location.
5861 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
5864 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
5866 2012-08-02 Glenn Morris <rgm@gnu.org>
5868 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
5869 hard-coding the path separator.
5871 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
5873 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
5874 This how ASET and AREF are supposed to work, and makes
5875 it easier to think about future improvements. See
5876 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
5877 * charset.h (set_charset_attr): New function.
5878 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
5879 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
5880 (aref_addr): New function. All uses of &AREF(...) changed.
5881 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
5882 (set_hash_index): New functions. All lvalue-style uses of
5883 HASH_KEY etc. changed.
5884 * keyboard.c (set_prop): New function. All lvalue-style uses
5887 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
5889 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
5890 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
5891 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
5892 * nsfns.m (ns_set_name_as_filename): Likewise.
5893 * nsmenu.m (ns_update_menubar): Likewise.
5894 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
5896 2012-08-01 Eli Zaretskii <eliz@gnu.org>
5898 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
5899 Adapt to latest changes in field names of the corresponding Lisp
5902 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
5904 2012-08-01 Glenn Morris <rgm@gnu.org>
5906 * s/msdos.h: Remove file.
5907 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
5908 * Makefile.in (S_FILE): Remove.
5909 (config_h): Remove S_FILE.
5911 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
5913 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
5914 Remove; moved to nt/config.nt.
5916 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
5918 Use INTERNAL_FIELD for conses and overlays.
5919 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
5920 Remove obsolete comment.
5922 (struct Lisp_Overlay): Use INTERNAL_FIELD.
5923 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
5925 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
5927 Use INTERNAL_FIELD for symbols.
5928 * lisp.h (SVAR): New macro. Adjust users.
5929 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
5930 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
5932 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
5934 Use INTERNAL_FIELD for processes.
5935 * process.h (PVAR): New macro. Adjust style.
5936 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
5937 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
5939 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
5941 Use INTERNAL_FIELD for windows.
5942 * window.h (WVAR): New macro.
5943 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
5944 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
5945 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
5946 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
5947 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
5948 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
5950 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
5952 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
5954 2012-08-01 Glenn Morris <rgm@gnu.org>
5956 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
5957 Move to configure.ac.
5959 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
5961 * makefile.w32-in (CONFIG_H): Update dependencies.
5962 (CONF_POST_H): New macro.
5964 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
5966 2012-07-31 Glenn Morris <rgm@gnu.org>
5968 * Makefile.in (S_FILE): No longer set by configure.
5970 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
5972 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
5974 * process.h (NULL_DEVICE):
5975 * emacs.c (SEPCHAR):
5976 * editfns.c (USER_FULL_NAME): Let configure set them.
5978 * s/README, s/template.h: Remove files.
5980 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
5982 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
5983 Move to configure.ac.
5985 2012-07-31 Eli Zaretskii <eliz@gnu.org>
5987 * .gdbinit (xframe): Adapt to introduction of FVAR and the
5988 resulting renaming of 'struct frame' members.
5990 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
5992 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
5993 after introduction of FVAR.
5995 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
5997 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
5999 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
6000 instead of compositeToPoint.
6001 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
6003 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
6005 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6007 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
6008 * lisp.h (INTERNAL_FIELD): New macro.
6009 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
6010 (BVAR): Change to use INTERNAL_FIELD.
6011 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
6012 (KVAR): Change to use INTERNAL_FIELD.
6013 * frame.h (FVAR): New macro.
6014 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
6015 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
6016 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
6017 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
6018 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
6020 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6022 Miscellaneous fixes for non-default X toolkits.
6023 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
6024 * xterm.c (x_frame_of_widget): Remove redundant prototype.
6025 Move under #ifdef USE_LUCID.
6026 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
6027 definition and usage to avoid warnings.
6029 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
6031 * nsterm.m (openFiles): Fix previous checkin.
6033 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
6035 * indent.c (compute_motion): Remove unused local.
6037 2012-07-31 Glenn Morris <rgm@gnu.org>
6039 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
6041 * conf_post.h [USG5_4]:
6042 Move remaining contents of s/usg5-4-common.h here.
6043 * s/usg5-4-common.h: Remove file.
6045 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
6046 * s/irix6-5.h: Remove file.
6048 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
6049 * s/darwin.h: Remove file.
6051 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
6052 * s/hpux10-20.h: Remove file, which is now empty.
6054 2012-07-30 Glenn Morris <rgm@gnu.org>
6056 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
6057 * Makefile.in (config_h): Add conf_post.h.
6058 * makefile.w32-in (CONFIG_H): Add conf_post.h.
6060 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
6062 * nsterm.m (ns_do_open_file): New variable.
6063 (ns_term_init): Set ns_do_open_file to YES after run returns.
6064 (openFile, openTempFile, openFileWithoutUI, openFiles):
6065 Open files only if ns_do_open_file.
6067 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6069 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
6070 This no-op macro hasn't been needed for many years.
6071 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
6073 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
6074 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
6075 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
6076 gdb_make_enums_visible.
6077 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
6078 (DIRECTORY_SEP): Now a constant, not a macro.
6080 2012-07-30 Eli Zaretskii <eliz@gnu.org>
6082 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
6083 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
6085 * w32term.c <w32_keyboard_codepage>: Renamed from
6086 keyboard_codepage and now external. All users changed.
6088 * w32term.h: Add declaration of w32_keyboard_codepage.
6090 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
6091 the codepage to translate keys to Unicode. If this argument is
6092 -1, use the value returned by GetConsoleCP. All callers changed.
6094 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6096 Update .PHONY listings in makefiles.
6097 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
6098 bootstrap-clean, distclean, maintainer-clean, versioclean,
6101 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
6102 This is a bit clearer. Fix some commentary typos.
6104 2012-07-30 Glenn Morris <rgm@gnu.org>
6106 * s/netbsd.h: Let configure include signal.h if needed.
6107 Remove file, which is now empty.
6109 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
6110 Let configure set them.
6111 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
6112 No more need to undefine.
6114 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
6116 * keymap.c (Fkey_description): Don't remove 0x80 bit from
6117 non-single-byte char when adding meta modifier. (Bug#12090)
6119 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6121 Convert safe_call to use variable number of arguments.
6122 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
6123 (safe_call2): Fix comment.
6124 * lisp.h (safe_call): Adjust prototype.
6125 * coding.c (encode_coding_object): Change to use safe_call2.
6126 * xfaces.c (merge_face_heights): Change to use safe_call1.
6128 2012-07-30 Glenn Morris <rgm@gnu.org>
6130 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
6131 does that unconditionally. Remove file, which is now empty.
6133 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
6136 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
6138 Export to GDB most of lisp.h's remaining object-like macros.
6139 * lisp.h (min, max): Move earlier, because they're used earlier now.
6140 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
6141 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
6142 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
6143 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
6144 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
6145 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
6146 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
6147 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
6148 Now constants, for GDB. They need not be macros.
6149 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
6150 Now constants, for GDB, as well as macros, for static initializers.
6151 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
6152 Move to after the definition of struct Lisp_Char_Table,
6153 since the former now needs that type defined.
6154 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
6155 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
6156 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
6157 New enums, for gdb_make_enums_visible.
6158 (GLYPH_MODE_LINE_FACE): Remove; unused.
6159 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
6160 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
6161 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
6162 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
6163 enum maxargs, enum MAX_ALLOCA.
6164 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
6165 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
6166 no longer needed, now that they are done in lisp.h.
6168 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6170 Cleanup string bytes checking.
6171 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
6172 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
6173 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
6174 (check_sblock, compact_small_strings): Simplify.
6176 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6178 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
6179 These macros are confusing and no longer need to be defined, as
6180 the enum values now suffice. All uses replaced with definiens.
6181 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
6183 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
6185 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
6186 ($(BLD)/w32console.$(O)): Update dependencies.
6188 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6190 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
6191 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
6193 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
6195 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
6197 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
6198 setting sitelisp (Bug#12010).
6200 2012-07-29 Eli Zaretskii <eliz@gnu.org>
6202 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
6204 * w32heap.c (cache_system_info):
6205 * w32.c (sys_rename):
6206 * w32proc.c (find_child_console, sys_kill): All users changed.
6208 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6210 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
6212 2012-07-29 Eli Zaretskii <eliz@gnu.org>
6214 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
6216 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6218 Cleanup statistics calculation in Fgarbage_collect.
6219 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
6220 Fix zombies percentage calculation. Simplify elapsed time calculation.
6222 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6224 Generalize marker debugging code under MARKER_DEBUG and use eassert.
6225 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
6226 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
6227 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
6228 (replace_range, replace_range_2, del_range_2): Change to eassert.
6229 * marker.c (byte_char_debug_check): Adjust style.
6231 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
6233 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
6234 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
6235 long-ago-commented-out code that talks about "WIN32".
6236 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
6239 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
6241 Use Gnulib stdalign module (Bug#9772, Bug#9960).
6242 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
6243 Simplify by using alignof.
6244 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
6245 * lisp.h: Include <stdalign.h>.
6246 (GCALIGNMENT): New macro and constant.
6247 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
6248 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
6249 (stdalign): New macro, if not already defined.
6251 2012-07-28 Eli Zaretskii <eliz@gnu.org>
6253 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
6254 * w32inevt.c: Include w32inevt.h.
6255 (w32_read_console_input): New inline function, calls either
6256 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
6257 w32_console_unicode_input.
6258 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
6259 (w32_kbd_patch_key, key_event): Use the codepage returned by
6260 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
6261 (key_event): use uChar.UnicodeChar only if
6262 w32_console_unicode_input is non-zero.
6264 * w32console.c: Include w32heap.h.
6265 <w32_console_unicode_input>: New global variable.
6266 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
6267 family of Windows, zero otherwise.
6269 * w32inevt.h: Declare w32_console_unicode_input.
6271 * xdisp.c (init_iterator): Don't reference tip_frame in a build
6272 --without-x. (Bug#11742)
6274 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6276 Adjust GDB to reflect pvec_type changes (Bug#12036).
6277 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
6278 2012-07-04 changes to pseudovector representation.
6279 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
6281 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
6283 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
6285 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
6287 2012-07-27 Eli Zaretskii <eliz@gnu.org>
6289 * alloc.c (listn): Fix the order the arguments are consed onto the
6292 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
6293 enumeration constants, as PURE and HEAP are too general, and clash
6294 with other headers and sources, such as gmalloc.c and the
6295 MS-Windows system headers. All users changed.
6297 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6299 Revert last save_excursion_save and save_excursion_restore changes.
6300 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
6301 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
6303 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6305 Fix recently-introduced typos in Windows port.
6306 Reported by Martin Rudalics <rudalics@gmx.at>.
6307 * w32.c (init_environment): Replace comma with semicolon.
6308 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
6310 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
6312 Improve GDB symbol export (Bug#12036).
6313 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
6314 arms of an 'if', not using conditional expressions; otherwise GDB
6315 complains about the types in the unevaluated arm when the argument
6316 is an integer literal.
6317 (xgetint): Simplify expression.
6318 * alloc.c (gdb_make_enums_visible): New constant. This ports to
6319 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
6320 Zaretskii in <http://bugs.gnu.org/12036#13>.
6321 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
6322 needed now that we have gdb_make_enums_visible.
6323 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
6324 (enum enum_USE_LSB_TAG):
6325 New enum types, packaging up enums that need to be exported to GDB.
6327 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6329 Utility function to make a list from specified amount of objects.
6330 * lisp.h (enum constype): New datatype.
6331 (listn): New prototype.
6332 * alloc.c (listn): New function.
6333 (Fmemory_use_count, syms_of_alloc): Use it.
6334 * buffer.c (syms_of_buffer): Likewise.
6335 * callint.c (syms_of_callint): Likewise.
6336 * charset.c (define_charset_internal): Likewise.
6337 * coding.c (syms_of_coding): Likewise.
6338 * keymap.c (syms_of_keymap): Likewise.
6339 * search.c (syms_of_search): Likewise.
6340 * syntax.c (syms_of_syntax): Likewise.
6341 * w32.c (init_environment): Likewise.
6342 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
6343 * xdisp.c (syms_of_xdisp): Likewise.
6344 * xfns.c (syms_of_xfns): Likewise.
6346 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
6348 Fast save_excursion_save and save_excursion_restore.
6349 * lisp.h (struct Lisp_Excursion): New data type.
6350 (PVEC_EXCURSION): New pseudovector type.
6351 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
6352 to deal with it. Adjust comments.
6353 (init_marker, attach_marker): New prototype.
6354 (unchain_marker): Adjust prototype.
6355 * marker.c (attach_marker): Change to global.
6356 (init_marker): New function.
6357 * alloc.c (Fmake_marker, build_marker): Use it.
6358 (build_marker): More easserts.
6359 (mark_object): Handle struct Lisp_Excursion.
6360 * editfns.c (save_excursion_save, save_excursion_restore):
6361 Reimplement to use struct Lisp_Excursion. Add comments.
6363 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6365 Fix export of symbols to GDB (Bug#12036).
6366 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
6367 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
6368 emacs.c, as this is a more-suitable home. Had this been done earlier
6369 the fix for 12036 would have avoided some of the problems noted in
6370 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
6371 would have been more obvious.
6372 * emacs.c: Do not include <verify.h>; no longer needed.
6373 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
6374 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
6375 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6376 Remove; now done in lisp.h.
6377 * lisp.h (PUBLISH_TO_GDB): New macro.
6378 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
6379 (DATA_SEG_BITS): Use it.
6380 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
6381 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
6382 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
6383 not be usable in #if. This simplifies things.
6385 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
6387 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
6389 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
6391 Simplify export of symbols to GDB (Bug#12036).
6392 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
6393 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
6394 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
6395 Adjust to changes in lisp.h and emacs.c, by using
6396 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
6397 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
6398 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
6399 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
6400 instead of gdb_valbits.
6401 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
6402 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
6403 instead of gdb_array_mark_flag.
6404 (xboolvector): Get size from $->size, not $->header.size.
6405 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
6406 (xreload, hook-run, hookpost-run): Remove.
6407 * emacs.c: Include <verify.h>.
6408 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
6409 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
6411 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
6412 (gdb_USE_LSB_TAG): New enum constants.
6413 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
6414 Also define these as enum constants, so they're visible to GDB.
6415 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
6416 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
6417 as constants, so they're visible to GDB.
6418 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
6419 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
6420 Now enum constants, not macros, so they're visible to GDB.
6421 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
6422 more convenient now. All uses changed.
6423 (VALMASK) [USE_LSB_TAG]: Also define in this case.
6424 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
6426 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
6428 Explicitly free restriction data that are not needed anymore.
6429 * editfns.c (save_restriction_restore): Free restriction data.
6431 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
6433 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
6434 add argument, tune behavior, and adjust all callers.
6436 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
6438 Use typedef for EMACS_INT, EMACS_UINT.
6439 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
6440 than macros. This simplifies debugging in the usual case, since
6441 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
6442 and it allows expressions involving EMACS_INT casts.
6443 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
6445 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
6447 * nsterm.m (ns_read_socket): Return early if there is a modal
6450 2012-07-25 Martin Rudalics <rudalics@gmx.at>
6452 * frame.c (Fredirect_frame_focus): In doc-string don't mention
6453 that FOCUS-FRAME can be omitted.
6455 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
6457 Adjust buffer text indirection counters at the end of Fkill_buffer.
6458 * buffer.c (Fkill_buffer): Adjust indirection counters when the
6459 buffer is definitely dead. This should really fix an issue reported
6460 by Christoph Scholtes again. (Bug#12007).
6461 (init_buffer_once): Initialize indirection counters of
6462 buffer_defaults and buffer_local_symbols (for sanity and safety).
6464 2012-07-24 Eli Zaretskii <eliz@gnu.org>
6466 * xdisp.c (init_iterator): Don't compute dimensions of truncation
6467 and continuation glyphs on tooltip frames, leave them at zero.
6468 Avoids continued lines in tooltips. (Bug#11832)
6470 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
6472 Simplify copy_overlay.
6473 * buffer.c (copy_overlay): Simplify. Use build_marker.
6474 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
6476 2012-07-23 Eli Zaretskii <eliz@gnu.org>
6478 * print.c (print_object): Don't crash when a frame's name is nil
6479 or invalid. (Bug#12025)
6481 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
6482 it signals an error when a tooltip frame is being created.
6484 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
6486 Cleanup miscellaneous objects allocation and initialization.
6487 * alloc.c (allocate_misc): Change to static. Add argument to
6488 specify the subtype. Adjust comment and users.
6489 (build_overlay): New function.
6490 * buffer.c (copy_overlays, Fmake_overlay): Use it.
6491 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
6492 (allocate_misc): Remove prototype.
6493 (build_overlay): Add prototype.
6495 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
6497 Swap buffer text indirection counters in Fbuffer_swap_text.
6498 * buffer.c (Fbuffer_swap_text): Swap indirections too.
6499 This avoids crash reported by Christoph Scholtes at
6500 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
6502 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
6504 * nsmenu.m (Popdown_data): New struct.
6505 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
6507 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
6508 (initWithContentRect): Make imgView and contentView non-static
6509 and autorelease them. Also autorelease img and matrix (Bug#12005).
6510 (dealloc): Remove (Bug#12005).
6512 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
6514 Adjust consing_since_gc when objects are explicitly freed.
6515 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
6516 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
6517 (free_cons, free_misc): Subtract object size from consing_since_gc.
6519 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
6521 Simplify and cleanup markers positioning code.
6522 * marker.c (attach_marker): More useful eassert.
6523 (live_buffer, set_marker_internal): New function.
6524 (Fset_marker, set_marker_restricted): Use set_marker_internal.
6525 (set_marker_both, set_marker_restricted_both): Use live_buffer.
6527 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
6529 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
6530 as it's limited by the amount of memory, not by INT_MAX.
6532 2012-07-21 Eli Zaretskii <eliz@gnu.org>
6534 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
6535 in special-event-map. See the discussion at
6536 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
6539 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
6540 info.dwItemData. Fixes crashes on 64-bit Windows.
6541 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
6543 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
6545 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
6546 (conversationIdentifier): Return value is NSInteger.
6547 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
6549 2012-07-21 Chong Yidong <cyd@gnu.org>
6551 * window.c (decode_any_window): Signal an error if the window is
6552 on a dead frame (Bug#11984).
6554 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6556 Add indirection counting to speed up Fkill_buffer.
6557 * buffer.h (struct buffer): New member.
6558 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
6559 (Fmake_indirect_buffer): Set indirection counter to -1, increment
6560 base buffer indirection counter.
6561 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
6562 (Fkill_buffer): Adjust indirection counters as needed, don't walk
6563 through buffer list if indirection counter is 0.
6565 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6567 Extend the value returned by Fgarbage_collect with heap statistics.
6568 * alloc.c (Qheap): New symbol.
6569 (syms_of_alloc): DEFSYM it.
6570 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
6571 (Fmemory_free): Remove.
6572 (syms_of_alloc): Don't defsubr it.
6573 * buffer.c (Fcompact_buffer): Remove.
6574 (syms_of_buffer): Don't defsubr it.
6576 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6578 Make maybe_gc inline.
6579 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
6580 * lisp.h (consing_since_gc, gc_relative_threshold)
6581 (memory_full_cons_threshold): Revert declaration.
6582 (maybe_gc): Remove prototype, define as inline.
6583 * alloc.c: Remove old commented-out code.
6584 (consing_since_gc, gc_relative_threshold)
6585 (memory_full_cons_threshold): Revert to global.
6588 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6590 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
6591 * lisp.h (build_unibyte_string): New function.
6592 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
6593 * sysdep.c, w32fns.c, xfns.c: Use it.
6594 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
6595 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
6596 Adjust users accordingly.
6597 * font.h (font_open_by_name): Adjust prototype.
6599 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
6601 Cleanup calls to Fgarbage_collect.
6602 * lisp.h (maybe_gc): New prototype.
6603 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
6604 Remove declarations.
6605 * alloc.c (maybe_gc): New function.
6606 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
6608 * bytecode.c (MAYBE_GC): Use maybe_gc.
6609 * eval.c (eval_sub, Ffuncall): Likewise.
6610 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
6611 to avoid dependency from auto-save feature.
6613 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
6615 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
6616 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
6617 'for_each_per_buffer_object_at'.
6618 All uses changed. It's better to use upper-case for macros that
6619 cannot be implemented as functions, to give the reader a clue
6620 that they're special.
6622 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
6624 * alloc.c (Fgarbage_collect): Tweak docstring.
6626 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6628 Tweak the value returned from Fgarbage_collect again.
6629 * alloc.c (Fgarbage_collect): New return value, as confirmed in
6630 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
6631 Adjust documentation.
6632 (total_vector_bytes): Rename to total_vector_slots, adjust
6634 (total_free_vector_bytes): Rename to total_free_vector_slots,
6636 (Qstring_bytes, Qvector_slots): New symbols.
6637 (syms_of_alloc): DEFSYM them.
6639 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6641 Buffer compaction primitive which may be used from Lisp.
6642 * buffer.c (compact_buffer, Fcompact_buffer): New function.
6643 (syms_of_buffer): Register Fcompact_buffer.
6644 * alloc.c (Fgarbage_collect): Use compact_buffer.
6645 * buffer.h (compact_buffer): New prototype.
6646 (struct buffer_text): New member.
6648 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
6650 New macro to iterate over all buffers, miscellaneous cleanups.
6651 * lisp.h (all_buffers): Remove declaration.
6652 * buffer.h (all_buffers): Add declaration, with comment.
6653 (for_each_buffer): New macro.
6654 * alloc.c (Fgarbage_collect, mark_object): Use it.
6655 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
6656 (init_buffer): Likewise.
6657 * data.c (Fset_default): Likewise.
6658 * coding.c (code_conversion_restore): Remove redundant check
6660 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
6662 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
6664 Fix bug that created negative-length intervals.
6665 * intervals.c (merge_interval_right, merge_interval_left):
6666 Do not zero out this interval if it is absorbed by its children,
6667 as this interval's total length doesn't change in that case. See
6668 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
6670 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
6672 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
6673 when invoking (make-bool-vector N t) and N is a positive
6674 multiple of 8 -- the last 8 bits were mistakenly cleared.
6676 Remove some struct layout assumptions in bool vectors.
6677 * alloc.c (bool_header_size): New constant.
6678 (header_size, word_size): Move earlier, as they're now used earlier.
6679 Use 'word_size' in a few more places, where it's appropriate.
6680 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
6681 padding before the data member of a bool vector.
6682 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
6683 than doing the check by hand with an abort ().
6685 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
6687 * eval.c (Fdefvar): Don't check constants since we only set the var if
6688 it's not yet defined anyway (bug#11904).
6690 * lisp.h (last_undo_boundary): Declare new var.
6691 * keyboard.c (command_loop_1): Set it.
6692 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
6693 were auto-added by the command loop (bug#11774).
6695 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
6697 * w32font.c (Qsymbol): Remove local definition.
6698 (syms_of_w32font): Don't DEFSYM it.
6700 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
6702 Fix sweep_vectors to handle large bool vectors correctly.
6703 * alloc.c (sweep_vectors): Account total_vector_bytes for
6704 bool vectors larger than VBLOCK_BYTES_MAX.
6706 2012-07-18 Chong Yidong <cyd@gnu.org>
6708 * frame.c (x_set_frame_parameters): Revert bogus change introduced
6709 in 2012-05-25 commit by Paul Eggert (Bug#11738).
6711 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
6713 Return more descriptive data from Fgarbage_collect.
6714 Suggested by Stefan Monnier in
6715 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
6716 * alloc.c (bounded_number): New function.
6717 (total_buffers, total_vectors): New variable.
6718 (total_string_size): Rename to total_string_bytes, adjust users.
6719 (total_vector_size): Rename to total_vector_bytes, adjust users.
6720 (sweep_vectors): Account total_vectors and total_vector_bytes.
6721 (Fgarbage_collect): New return value. Adjust documentation.
6722 (gc_sweep): Account total_buffers.
6723 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
6724 (VECTOR_SIZE): Remove.
6725 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
6726 (Qinterval, Qmisc): New symbols.
6727 (syms_of_data): Initialize them.
6728 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
6729 (Qcons, Qbuffer): New declarations.
6731 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
6733 * alloc.c (Fmemory_free): Account for memory-free's own storage.
6734 Round up, not down. Improve doc.
6736 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6738 Restore old code in allocate_string_data to avoid Faset breakage.
6739 Reported by Julien Danjou <julien@danjou.info> in
6740 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
6741 * alloc.c (allocate_string_data): Restore old code with minor
6742 adjustments, fix comment to explain this subtle issue.
6744 2012-07-17 Eli Zaretskii <eliz@gnu.org>
6746 Remove FILE_SYSTEM_CASE.
6747 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
6749 * fileio.c (FILE_SYSTEM_CASE): Don't define.
6750 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
6751 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
6752 call-process-region passes it through expand-file-name.
6754 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
6756 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6758 Fix crash when creating indirect buffer (Bug#11917)
6759 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
6760 Don't handle unbound variables specially if non-zero.
6761 (Fbuffer_local_variables): Pass zero.
6762 (clone_per_buffer_values): Pass non-zero.
6764 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6766 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
6767 to make the loop interruptible.
6769 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
6771 * gnutls.c (emacs_gnutls_handshake): Only retry if
6772 GNUTLS_E_INTERRUPTED.
6774 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6776 Cleanup and convert miscellaneous checks to eassert.
6777 * alloc.c (mark_interval): Fix comment, partially rephrase
6778 old comment from intervals.h (see below).
6779 * intervals.c (find_interval, adjust_intervals_for_insertion)
6780 (delete_interval, adjust_intervals_for_deletion)
6781 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
6783 (adjust_intervals_for_insertion, make_new_interval):
6784 Remove obsolete and unused code.
6785 * intervals.h (struct interval): Remove obsolete comment.
6786 * textprotp.c (erase_properties): Remove unused code.
6787 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
6788 (Fremove_list_of_text_properties): Convert to eassert.
6790 2012-07-17 Chong Yidong <cyd@gnu.org>
6792 * editfns.c (Finsert_char): Doc fix.
6794 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6796 Fix previous change to make Fmemory_free always accurate.
6797 * alloc.c (make_interval): Update total_free_intervals.
6798 (make_float): Likewise for total_free_floats.
6799 (free_cons, Fcons): Likewise for total_free_conses.
6800 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
6801 Likewise for total_free_vector_bytes.
6802 (Fmake_symbol): Likewise for total_free_symbols.
6803 (bytes_free): Remove.
6805 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6807 Simple free memory accounting feature.
6808 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
6809 (sweep_vectors): Accumulate size of free vectors.
6810 (Fgarbage_collect): Setup bytes_free.
6811 (Fmemory_free): New function.
6812 (syms_of_alloc): Register it.
6814 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
6816 Cleanup overlays checking.
6817 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
6818 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
6819 eassert and OVERLAYP.
6820 (sort_overlays): Change to use OVERLAYP.
6822 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
6824 * editfns.c (Finsert_char): Make it interactive, and make the
6825 second arg optional. Copy interactive spec and docstring from
6828 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
6830 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
6831 Unlike the other wrapped functions, fabs has an unspecified
6834 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
6836 * nsterm.m (keyDown): Interpret flags without left/right bits
6837 as the left key (Bug#11670).
6839 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
6841 Remove empty and useless init functions.
6842 * lisp.h (init_character_once, init_fns, init_image)
6843 (init_filelock, init_sound): Remove prototype.
6844 * character.c (init_character_once): Remove.
6845 * filelock.c (init_filelock): Likewise.
6846 * fns.c (init_fns): Likewise.
6847 * image.c (init_image): Likewise.
6848 * sound.c (init_sound): Likewise.
6849 * emacs.c (main): Adjust accordingly.
6851 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
6853 * gtkutil.h: Tiny cleanups.
6854 (use_old_gtk_file_dialog): Remove useless declaration.
6855 (xg_uses_old_file_dialog): Add suggested const attribute.
6857 2012-07-15 Eli Zaretskii <eliz@gnu.org>
6859 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
6860 (bidi_paragraph_init): Use it to limit search forward for a strong
6861 directional character in abnormally large paragraphs full of
6862 neutral or weak characters. (Bug#11943)
6864 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
6866 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
6867 the toolbar (Bug#9451).
6868 (xg_make_tool_item): Give the widget event box a transparent
6871 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
6873 Cleanup basic allocation variables and functions.
6874 * alloc.c (ignore_warnings, init_intervals, init_float)
6875 (init_cons, init_symbol, init_marker): Remove.
6876 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
6877 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
6878 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
6879 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
6880 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
6881 (staticidx, init_alloc_once, init_strings, free_ablock):
6882 Remove redundant initialization.
6883 * fns.c (init_weak_hash_tables): Remove.
6884 * lisp.h (init_weak_hash_tables): Remove prototype.
6886 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
6888 Use zero_vector where appropriate.
6889 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
6891 * lisp.h (zero_vector): New declaration.
6892 * font.c (null_vector): Remove.
6893 (syms_of_font): Remove initialization and staticpro.
6894 (font_list_entities, font_find_for_lface): Change to use zero_vector.
6895 * keymap.c (Faccessible_keymaps): Likewise.
6897 2012-07-15 Leo Liu <sdl.web@gmail.com>
6899 * fringe.c: Fix typo in comments.
6901 2012-07-14 Leo Liu <sdl.web@gmail.com>
6903 * fringe.c: Add a new bitmap exclamation-mark.
6905 2012-07-14 Eli Zaretskii <eliz@gnu.org>
6907 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
6909 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
6910 (HAVE_MENUS): Don't define, defined by editing config.in with
6912 (GMALLOC_INHIBIT_VALLOC): Don't define.
6913 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
6915 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
6917 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
6919 2012-07-14 Glenn Morris <rgm@gnu.org>
6921 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
6922 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
6923 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
6925 2012-07-13 Glenn Morris <rgm@gnu.org>
6927 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
6929 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
6930 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
6932 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
6934 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
6935 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
6936 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
6937 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
6939 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
6940 as boolean expression.
6941 (x_set_window_size): Remove unused variable toolbar.
6942 (ns_get_color_default, ns_mod_to_lisp): Remove.
6943 (ns_mouse_position): Remove unused variables xchar and ychar.
6944 (ns_compute_glyph_string_overhangs): Remove unused variable face.
6945 (ns_set_vertical_scroll_bar): Remove unused variable count.
6946 (ns_delete_terminal): Remove unused variable i.
6947 (ns_term_init): Remove unused variables r, g and b.
6948 (mouseDown): Remove unused variable window.
6949 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
6950 (initFrameFromEmacs): Remove unused variable vbextra.
6951 (mouseEntered): Remove unused variables p and dpyinfo.
6952 (mouseExited): Remove unused variables p and r.
6953 (ns_define_frame_cursor, ns_clear_frame_area)
6954 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
6955 (menuDown): Assign [sender tag] to variable and cast the variable.
6957 * nsterm.h (menuDown): Add id as type to argument sender.
6958 (ns_display_info_for_name): Add Lisp_Object argument.
6959 (ns_term_init): Add Lisp_Object argument.
6960 (ns_map_event_to_object): Add void argument.
6961 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
6962 prototype with arguments and only declare if __OBJC__.
6963 (nxatoms_of_nsselect): Add void argument.
6964 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
6965 (ns_alloc_autorelease_pool): Add void argument.
6966 (ns_release_autorelease_pool): Add void* argument.
6967 (ns_get_defaults_value): Add const char* argument.
6969 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
6970 (initFromContents): Use SSDATA where appropriate.
6971 (ns_update_menubar): Add braces to ambigous if-else.
6972 (initWithTitle): Put () around assignment in if statement.
6973 (ns_menu_show): Remove unused variables window and keymap.
6974 (update_frame_tool_bar): Remove unused variable selected_p.
6975 (initWithContentRect): Remove unused variable this_cmd_name.
6977 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
6979 (setXBMColor): Remove unused variable len.
6980 (setPixmapData): Put () around assignment in loop statement.
6982 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
6983 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
6985 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
6986 around assignment in loop statement.
6987 (nsfont_open): Remove unused variable i.
6988 (nsfont_open): Remove unused variable len.
6989 (nsfont_draw): Remove unused variable cs.
6991 * nsfns.m (x_set_icon_name, ns_set_name_internal)
6992 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
6993 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
6994 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
6995 (Fns_font_name, Fns_perform_service)
6996 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
6997 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
6998 (ns_set_name): Remove unused variable view.
6999 (x_set_menu_bar_lines): Remove unused variable olines.
7000 (x_set_tool_bar_lines): Remove unused variable root_window.
7001 (Fns_list_colors): Put () around assignment in while statement.
7002 (Fns_perform_service): Remove unused variable len.
7003 (Fns_display_usable_bounds): Remove unused variable top.
7004 (syms_of_nsfns): Remove unused variable i.
7006 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
7009 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
7011 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
7012 and free it with DestroyExceptionInfo (Bug#11558).
7014 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
7016 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
7017 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
7018 Set here, not in nt/config.nt.
7020 2012-07-13 Eli Zaretskii <eliz@gnu.org>
7022 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
7023 cursor overflow into the last glyph on display line when the right
7024 fringe is off. (Bug#11832)
7026 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
7028 * xdisp.c (produce_special_glyphs): Now static.
7029 * dispextern.h (produce_special_glyphs): Remove decl.
7031 2012-07-13 Glenn Morris <rgm@gnu.org>
7033 * s/bsd-common.h, s/cygwin.h: Remove empty files.
7034 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
7036 * s/usg5-4-common.h (USG, USG5):
7037 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
7038 * s/sol2-6.h (SOLARIS2):
7039 * s/irix6-5.h (IRIX6_5):
7040 * s/hpux10-20.h (USG, USG5, HPUX):
7041 * s/gnu-linux.h (USG, GNU_LINUX):
7042 * s/freebsd.h (BSD_SYSTEM):
7043 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
7044 * s/cygwin.h (CYGWIN):
7045 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
7046 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
7048 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
7050 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
7052 2012-07-13 Glenn Morris <rgm@gnu.org>
7054 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
7056 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
7058 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
7059 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
7061 2012-07-12 Glenn Morris <rgm@gnu.org>
7063 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
7065 * process.c (init_process_emacs): Rename from init_process.
7066 The old name is also the name of a Mach system call.
7067 * lisp.h, emacs.c: Update for this name change.
7068 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
7071 2012-07-12 Eli Zaretskii <eliz@gnu.org>
7073 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
7074 memmove call that removes glyphs covered by the left truncation
7075 glyph. Improve commentary.
7076 (display_line): Fix display of continuation glyphs on GUI frames
7077 when the right fringe is turned off and variable-size fonts are
7078 used in the window. Move the code that appends a stretch glyph to
7079 produce_special_glyphs, so that it could be used for truncation
7080 and continuation glyphs alike.
7081 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
7082 glyph of a suitably computed width, to align the special glyphs at
7083 the window margin. Code moved from display_line. (Bug#11832)
7085 2012-07-12 Glenn Morris <rgm@gnu.org>
7087 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
7089 * s/gnu-linux.h, s/hpux10-20.h:
7090 Do not unconditionally define HAVE_XRMSETDATABASE.
7092 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
7094 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
7096 Fix typos that broke OS X build.
7097 Reported by Randal L. Schwartz in
7098 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
7099 * nsterm.m (ns_timeout): Add missing local decl.
7100 (ns_get_color): snprintf -> sprintf, to fix typo.
7102 2012-07-12 Glenn Morris <rgm@gnu.org>
7104 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
7105 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
7106 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
7107 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
7109 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
7110 Move PTY_OPEN to configure.
7112 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7113 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
7114 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
7116 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
7118 Use empty_unibyte_string where applicable.
7119 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
7120 * lread.c (read1): Likewise.
7121 * xsettings.c (syms_of_xsettings): Likewise.
7123 2012-07-12 Glenn Morris <rgm@gnu.org>
7125 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
7126 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7127 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
7128 * s/hpux10-20.h (RUN_TIME_REMAP):
7129 * s/bsd-common.h (TABDLY): Move to configure.
7131 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
7133 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
7135 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
7136 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
7138 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
7140 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
7141 * s/template.h: Move NARROWPROTO to configure.
7143 2012-07-11 Glenn Morris <rgm@gnu.org>
7145 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
7146 unused since 2011-01-17 change to systty.h.
7148 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
7149 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7150 Move HAVE_PTYS and HAVE_SOCKETS to configure.
7152 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7154 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
7156 2012-07-11 Glenn Morris <rgm@gnu.org>
7158 * s/darwin.h, s/gnu-linux.h, s/template.h:
7159 Move INTERRUPT_INPUT to configure.
7161 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7163 Minor adjustments to interning code.
7164 * lisp.h (intern, intern_c_string): Redefine as static inline
7165 wrappers for intern_1 and intern_c_string_1, respectively.
7166 (intern_1, intern_c_string_1): Rename prototypes.
7167 * lread.c (intern_1, intern_c_string_1, oblookup):
7168 Simplify Vobarray checking.
7169 * font.c (font_intern_prop): Likewise. Adjust comment.
7170 * w32font.c (intern_font_name): Likewise.
7172 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
7174 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
7176 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
7177 of Fcar/Fcdr if possible.
7178 * font.c (check_otf_features): Likewise.
7179 * fontset.c (Fnew_fontset): Likewise.
7180 * gnutls.c (Fgnutls_boot): Likewise.
7181 * minibuf.c (read_minibuf): Likewise.
7182 * msdos.c (IT_set_frame_parameters): Likewise.
7183 * xmenu.c (Fx_popup_dialog): Likewise.
7184 * w32menu.c (Fx_popup_dialog): Likewise.
7186 2012-07-11 Glenn Morris <rgm@gnu.org>
7188 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
7189 since nothing has defined it on these platforms.
7191 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
7192 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
7194 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7195 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
7196 Move CLASH_DETECTION to configure.
7198 * s/gnu.h: Remove file, which is now empty.
7200 * s/gnu.h, s/gnu-linux.h:
7201 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
7203 2012-07-11 John Wiegley <johnw@newartisans.com>
7205 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
7206 function attribute, so we only use it if it exists in the
7209 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7211 Avoid call to strlen in fast_c_string_match_ignore_case.
7212 * search.c (fast_c_string_match_ignore_case): Change to use
7213 length argument. Adjust users accordingly.
7214 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
7216 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
7218 Assume mkdir, rmdir.
7219 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
7220 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
7223 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
7226 * s/hpux10-20.h (HAVE_PERROR): Remove.
7227 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
7228 Remove dummy definition, as this problem was obsolete long ago.
7231 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
7233 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
7235 Avoid calls to strlen in font processing functions.
7236 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
7237 (font_open_by_name): Change to use length argument.
7238 Adjust users accordingly.
7239 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
7241 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
7242 Change to return ptrdiff_t.
7243 (xfont_list_pattern, xfont_match): Use length returned by
7244 xfont_decode_coding_xlfd.
7245 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
7247 2012-07-11 Glenn Morris <rgm@gnu.org>
7249 * s/darwin.h, s/freebsd.h, s/netbsd.h:
7250 Move DONT_REOPEN_PTY to configure.
7252 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
7253 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
7255 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
7257 Remove "#define unix" that is no longer needed (Bug#11905).
7258 * s/aix4-2.h (unix): Remove; no longer needed.
7260 EMACS_TIME simplification (Bug#11875).
7261 This replaces macros (which typically do not work in GDB)
7262 with functions, typedefs and enums, making the code easier to debug.
7263 The functional style also makes code easier to read and maintain.
7264 * systime.h: Include <sys/time.h> on all hosts, not just if
7265 WINDOWSNT, since 'struct timeval' is needed in general.
7266 (EMACS_TIME): Now a typedef, not a macro.
7267 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
7269 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
7270 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
7271 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
7272 (EMACS_TIME_LE): Now functions, not macros.
7273 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
7274 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
7275 which are not functions. All uses rewritten to use:
7276 (make_emacs_time): New function.
7277 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
7278 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
7279 not functions. All uses rewritten to use the following, respectively:
7280 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
7281 (add_emacs_time, sub_emacs_time): New functions.
7282 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
7283 * fileio.c (Fcopy_file):
7284 * xterm.c (XTflash): Get the current time closer to when it's used.
7285 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
7287 * bytecode.c (targets): Suppress -Woverride-init warnings.
7289 Simplify by avoiding confusing use of strncpy etc.
7290 * doc.c (Fsnarf_documentation):
7291 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
7292 * frame.c (Fmake_terminal_frame):
7293 * gtkutil.c (get_utf8_string):
7295 * nsmenu.m (ns_update_menubar):
7296 * regex.c (regerror):
7297 Prefer memcpy to strncpy and strncat when either will do.
7298 * fileio.c (Fsubstitute_in_file_name):
7299 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
7300 (menu_separator_name_p):
7301 * nsmenu.m (ns_update_menubar):
7302 Prefer memcmp to strncmp when either will do.
7303 * nsterm.m: Include <ftoastr.h>.
7305 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
7306 Prefer snprintf to strncpy.
7307 * nsterm.m (ns_term_init):
7308 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
7309 * nsterm.m (ns_term_init):
7310 Avoid the need for strncpy, by using build_string or
7311 make_unibyte_string directly. Use dtoastr, not snprintf.
7312 * process.c (Fmake_network_process): Diagnose service names that
7313 are too long, rather than silently truncating them or creating
7314 non-null-terminated names.
7315 (Fnetwork_interface_info): Likewise, for interface names.
7316 * sysdep.c (system_process_attributes) [GNU_LINUX]:
7317 Prefer sprintf to strncat.
7318 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
7319 Prefer vsnprintf to vsprintf + strncpy.
7321 2012-07-10 Glenn Morris <rgm@gnu.org>
7323 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
7324 Clarify fallback case.
7326 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7328 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
7329 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
7330 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
7331 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7332 where argument type is known to be a Lisp_Cons.
7334 2012-07-10 Tom Tromey <tromey@redhat.com>
7336 * bytecode.c (BYTE_CODE_THREADED): New macro.
7337 (BYTE_CODES): New macro. Replaces all old byte-code defines.
7338 (enum byte_code_op): New type.
7339 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
7340 (exec_byte_code): Use them. Use token threading when applicable.
7342 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7344 Optimize pure C strings initialization.
7345 * lisp.h (make_pure_string): Fix prototype.
7346 (build_pure_c_string): New function, defined as static inline. This
7347 provides a better opportunity to optimize away calls to strlen when
7348 the function is called with compile-time constant argument.
7349 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
7350 argument, adjust users accordingly. Use build_pure_c_string where
7352 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
7353 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
7354 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
7356 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7358 Avoid calls to strlen in miscellaneous functions.
7359 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
7360 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
7361 * lread.c (openp): Likewise.
7363 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
7365 Avoid calls to strlen in path processing functions.
7366 * fileio.c (file_name_as_directory): Add comment. Change to add
7367 srclen argument and return the length of result. Adjust users
7369 (directory_file_name): Fix comment. Change to add srclen argument,
7370 swap 1st and 2nd arguments to obey the common convention.
7371 Adjust users accordingly.
7372 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
7374 2012-07-10 Glenn Morris <rgm@gnu.org>
7376 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
7377 Move PENDING_OUTPUT_COUNT definition to configure.
7379 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
7380 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
7381 * s/gnu.h (DATA_START): Move definitions to configure.
7383 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
7384 We include usg5-4-common.h, which defines them both.
7386 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
7387 O_RDONLY already includes it).
7389 Stop ns builds setting the EMACSLOADPATH environment variable.
7390 * nsterm.m (ns_load_path): Rename from ns_init_paths.
7391 Now it does not set EMACSLOADPATH, just returns the load-path string.
7392 * nsterm.h: Update accordingly.
7393 * lread.c [HAVE_NS]: Include nsterm.h.
7394 (init_lread) [HAVE_NS]: Use ns_load_path.
7395 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
7397 2012-07-09 Glenn Morris <rgm@gnu.org>
7399 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
7400 since the included bsd-common.h does so.
7402 Stop ns builds setting the EMACSPATH environment variable.
7403 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
7404 (ns_init_paths): Do not set EMACSPATH.
7405 * nsterm.h (ns_exec_path): Add it.
7406 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
7409 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
7411 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
7413 * process.c (wait_reading_process_output): 'waitchannels' was unset
7414 when read_kbd || !NILP (wait_for_cell); fix this.
7416 Add GCC-style 'const' attribute to functions that can use it.
7417 * character.h (char_resolve_modifier_mask):
7418 * keyboard.h (make_ctrl_char):
7419 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
7420 (init_character_once, next_almost_prime, init_fns, init_image)
7421 (flush_pending_output, init_sound):
7422 * mem-limits.h (start_of_data):
7423 * menu.h (finish_menu_items):
7424 Add ATTRIBUTE_CONST.
7425 * emacs.c (DEFINE_DUMMY_FUNCTION):
7426 Declare the dummy function with ATTRIBUTE_CONST.
7427 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
7428 Add decls with ATTRIBUTE_CONST.
7430 Minor improvements to make_formatted_string.
7431 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
7432 where int is good enough, as vsprintf returns an int.
7433 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
7435 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
7437 Use make_formatted_string to avoid double length calculation.
7438 * lisp.h (make_formatted_string): New prototype.
7439 * alloc.c (make_formatted_string): New function.
7440 * buffer.c (Fgenerate_new_buffer_name): Use it.
7441 * dbusbind.c (syms_of_dbusbind): Likewise.
7442 * editfns.c (Fcurrent_time_zone): Likewise.
7443 * filelock.c (get_boot_time): Likewise.
7444 * frame.c (make_terminal_frame, set_term_frame_name)
7445 (x_report_frame_params): Likewise.
7446 * image.c (gs_load): Likewise.
7447 * minibuf.c (get_minibuffer): Likewise.
7448 * msdos.c (dos_set_window_size): Likewise.
7449 * process.c (make_process): Likewise.
7450 * xdisp.c (ensure_echo_area_buffers): Likewise.
7451 * xsettings.c (apply_xft_settings): Likewise.
7453 2012-07-09 Glenn Morris <rgm@gnu.org>
7455 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
7456 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
7457 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
7458 * nsterm.h (ns_etc_directory): Add it.
7459 * callproc.c [HAVE_NS]: Include nsterm.h.
7460 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
7462 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
7464 Move marker debugging code under MARKER_DEBUG.
7465 * marker.c (MARKER_DEBUG): Move marker debugging code under
7466 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
7467 for bootstrap with --enable-checking (~3x slowdown reported
7468 by Juanma Barranquero <lekktu@gmail.com>).
7469 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
7471 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
7473 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
7474 See <http://bugs.gnu.org/11825#29>.
7476 2012-07-08 Eli Zaretskii <eliz@gnu.org>
7478 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
7479 has no font, use the frame's font. (Bug#11813)
7480 (display_line): Add commentary about displaying truncation glyphs
7482 (produce_special_glyphs): Move here from term.c.
7484 * term.c (produce_special_glyphs): Move to xdisp.c.
7486 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
7489 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
7491 * xdisp.c (display_line): Avoid warning about implicit declaration
7494 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
7496 * lisp.h: Remove empty conditional.
7498 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
7500 * lread.c (load_path_check): Now static.
7502 Fix some minor --with-ns problems found by static checking.
7503 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
7504 (x_set_font) [!HAVE_X_WINDOWS]:
7505 * image.c (xpm_load_image) [HAVE_NS]:
7506 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
7507 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
7508 Remove unused local.
7509 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
7510 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
7511 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
7512 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
7513 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
7514 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
7515 Fix pointer signedness problem.
7516 * xfaces.c (FRAME_X_FONT_TABLE):
7517 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
7519 2012-07-07 Glenn Morris <rgm@gnu.org>
7521 * lread.c (load_path_check): New function, split from init_lread.
7522 (init_lread): Reorganize. Motivation:
7523 If EMACSLOADPATH is set, check/warn about that rather than the
7524 defaults, which we are not going to use. Hence we can remove
7525 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
7526 Don't warn if site-lisp directories are missing.
7527 If not installed, start from a blank load-path, since
7528 PATH_LOADSEARCH refers to the eventual installation directories.
7530 2012-07-07 Eli Zaretskii <eliz@gnu.org>
7532 Support truncation and continuation glyphs on GUI frames, when
7533 fringes are disabled. (Bug#11832)
7534 * xdisp.c (init_iterator): Get dimensions of truncation and
7535 continuation glyphs even if on GUI frames.
7536 Adjust it->last_visible_x on GUI frames when the left or right fringes,
7537 or both, are absent.
7538 (start_display, move_it_in_display_line_to): Handle the case of a
7539 GUI frame without a fringe to display continuation or truncation
7541 (insert_left_trunc_glyphs): Support GUI frames: make sure
7542 truncation glyphs overwrite enough glyphs from the current line to
7543 have sufficient space in pixels.
7544 (display_line): Support truncation and continuation glyphs on GUI
7545 frames. If some spare pixels are left on the line after inserting
7546 the truncation glyphs, fill that space with a stretch glyph of a
7547 suitably computed width.
7549 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
7550 produce_glyphs, to support GUI sessions.
7552 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
7554 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
7556 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
7558 Do not require float-time's arg to fit in time_t (Bug#11825).
7559 This works better on hosts where time_t is unsigned, and where
7560 float-time is applied to the (negative) difference between two times.
7561 * editfns.c (decode_time_components): Last arg is now double *,
7562 not int *, and means to store all the result as a double, without
7563 worrying about whether the seconds part fits in time_t.
7564 All callers changed.
7565 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
7566 All callers changed.
7567 (Ffloat_time): Do not fail merely because the specified time falls
7568 outside of time_t range.
7570 2012-07-07 Glenn Morris <rgm@gnu.org>
7572 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
7573 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
7574 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
7576 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
7578 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
7579 Update dependencies.
7581 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
7583 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7585 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
7586 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
7587 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
7588 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
7589 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
7590 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
7592 * xfont.c (compare_font_names): Redo to omit the need for casts.
7594 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
7596 * xfns.c (Fx_change_window_property): Doc fix.
7597 * w32fns.c (Fx_change_window_property): Doc fix.
7599 * w32fns.c (Fx_window_property): Accept the same arguments as the
7600 X Windows version. Doc fix.
7601 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
7603 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
7604 Eli Zaretskii <eliz@gnu.org>
7606 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
7607 Windows-specific code from nt/config.nt moved here.
7608 Obsolete settings removed.
7610 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7612 * process.c: Avoid unnecessary calls to gettime.
7613 (wait_reading_process_output): Don't get the time of day
7614 when gobbling data immediately and not waiting, as there's no need
7615 for it in that case. This removes a FIXME.
7617 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
7619 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
7620 is defined (Bug#11768).
7622 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7624 Fix marker debugging code.
7625 * marker.c (byte_char_debug_check): Do not perform the check
7626 if buffer is not multibyte.
7627 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
7628 Call byte_char_debug_check with correct arguments.
7630 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7632 Compile marker debugging code only if ENABLE_CHECKING is defined.
7633 * marker.c (byte_char_debug_check, count_markers):
7634 Use only if ENABLE_CHECKING is defined.
7635 (byte_debug_flag): Remove.
7636 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
7637 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
7639 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7641 Avoid code repetition in marker-related functions.
7642 * marker.c (attach_marker): New function.
7643 (Fset_marker, set_marker_restricted, set_marker_both)
7644 (set_marker_restricted_both): Use it.
7645 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
7646 Consistently rename charno to charpos.
7647 (marker_position): Add eassert.
7648 (marker_byte_position): Convert to eassert.
7650 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7652 Simplify list operations in unchain_overlay and unchain_marker.
7653 * buffer.c (unchain_overlay): Simplify. Add comment.
7654 * marker.c (unchain_marker): Simplify. Fix comments.
7656 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7658 Introduce fast path for the widely used marker operation.
7659 * alloc.c (build_marker): New function.
7660 * lisp.h (build_marker): New prototype.
7661 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
7662 * composite.c (autocmp_chars): Likewise.
7663 * editfns.c (buildmark): Remove.
7664 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
7665 (save_restriction_save): Use build_marker.
7666 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
7667 * window.c (save_window_save): Likewise.
7669 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
7671 Do not use Fdelete_overlay in delete_all_overlays
7672 to avoid redundant calls to unchain_overlay.
7673 * buffer.c (drop_overlay): New function.
7674 (delete_all_overlays, Fdelete_overlay): Use it.
7675 * minibuf.c (get_minibuffer): Fix comment.
7677 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
7679 Port to OpenBSD 5.1 amd64.
7680 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
7681 This is needed for OpenBSD, and should be harmless on all BSD systems.
7682 Also, include <sys/sysctl.h>, as it should be available on all
7683 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
7684 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
7685 use p_pid member, not kp_proc.pid.
7687 2012-07-06 Glenn Morris <rgm@gnu.org>
7689 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
7691 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7693 More xmalloc and related cleanup.
7694 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
7695 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
7696 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
7697 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
7698 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
7699 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
7700 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
7701 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
7702 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
7704 Omit needless casts involving void * pointers and allocation.
7705 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
7706 as the former is more robust if P's type is changed.
7707 Prefer xzalloc to xmalloc + memset 0.
7708 Simplify malloc-or-realloc to realloc.
7709 Don't worry about xmalloc returning a null pointer.
7710 Prefer xstrdup to xmalloc + strcpy.
7711 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
7713 * keyboard.c (apply_modifiers_uncached): Prefer local array to
7714 alloca of a constant.
7716 2012-07-05 Eli Zaretskii <eliz@gnu.org>
7718 * xdisp.c (display_line): Fix horizontal pixel coordinates when
7719 hscroll is larger than the line width. Fixes long and futile
7720 looping inside extend_face_to_end_of_line (on a TTY) producing
7721 glyphs that are not needed and thrown away.
7723 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
7725 * marker.c (set_marker_restricted_both): Simplify by using
7728 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7730 * editfns.c (region_limit): Simplify by using clip_to_bounds.
7732 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
7734 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
7735 not defined (Bug#11768).
7736 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
7737 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
7738 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
7739 followed by gtk_box_set_homogeneous (Bug#11768).
7740 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
7741 (update_theme_scrollbar_width, xg_create_scroll_bar):
7742 Use gtk_scrollbar_new (Bug#11768).
7743 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
7744 (is_box_type): New function (Bug#11768).
7745 (xg_tool_item_stale_p): Call is_box_type.
7746 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
7747 with default display (Bug#11768).
7749 2012-07-05 Eli Zaretskii <eliz@gnu.org>
7751 * xdisp.c (window_hscroll_limited): New function.
7752 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
7753 coordinates when window's hscroll is set to insanely large
7756 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
7758 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
7759 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
7761 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
7764 * lisp.h (xzalloc): New prototype. Omit needless casts.
7765 * alloc.c (xzalloc): New function. Omit needless casts.
7766 * charset.c: Omit needless casts. Convert all calls to
7767 xmalloc with following memset to xzalloc.
7768 * dispnew.c: Likewise.
7769 * fringe.c: Likewise.
7770 * image.c: Likewise.
7771 * sound.c: Likewise.
7773 * w32fns.c: Likewise.
7774 * w32font.c: Likewise.
7775 * w32term.c: Likewise.
7776 * xfaces.c: Likewise.
7778 * xterm.c: Likewise.
7779 * atimer.c: Omit needless casts.
7780 * buffer.c: Likewise.
7781 * callproc.c: Likewise.
7783 * coding.c: Likewise.
7784 * composite.c: Likewise.
7786 * doprnt.c: Likewise.
7787 * editfns.c: Likewise.
7788 * emacs.c: Likewise.
7790 * filelock.c: Likewise.
7792 * gtkutil.c: Likewise.
7793 * keyboard.c: Likewise.
7795 * lread.c: Likewise.
7796 * minibuf.c: Likewise.
7797 * msdos.c: Likewise.
7798 * print.c: Likewise.
7799 * process.c: Likewise.
7800 * region-cache.c: Likewise.
7801 * search.c: Likewise.
7802 * sysdep.c: Likewise.
7803 * termcap.c: Likewise.
7804 * terminal.c: Likewise.
7805 * tparam.c: Likewise.
7806 * w16select.c: Likewise.
7808 * w32reg.c: Likewise.
7809 * w32select.c: Likewise.
7810 * w32uniscribe.c: Likewise.
7811 * widget.c: Likewise.
7812 * xdisp.c: Likewise.
7813 * xmenu.c: Likewise.
7815 * xselect.c: Likewise.
7817 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
7819 * fileio.c (time_error_value): Check the right error number.
7820 Problem reported by Troels Nielsen in
7821 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
7823 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
7825 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
7826 This should be fixed in a better way; see Eli Zaretskii in
7827 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
7828 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
7830 * fileio.c (time_error_value): Rename from special_mtime.
7831 The old name's problems were noted by Eli Zaretskii in
7832 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
7834 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
7835 This variable's comment says Emacs needs at least one GDB-visible
7836 symbol of type enum pvec_type, to work around GDB problems.
7837 The symbol's value doesn't matter.
7839 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
7840 that causes compilation to fail on pre-C99 compilers.
7842 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
7844 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
7845 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
7847 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
7849 * buffer.c (init_buffer_once): Fix initialization of
7850 headers for buffer_defaults and buffer_local_symbols.
7851 Reported by Juanma Barranquero <lekktu@gmail.com>.
7853 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
7855 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
7856 * lisp.h (enum pvec_type): Use fewer bits.
7857 (PSEUDOVECTOR_SIZE_BITS): New constant.
7858 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
7859 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
7860 change in pvec_type.
7861 (PSEUDOVECTOR_TYPEP): New macro.
7862 (TYPED_PSEUDOVECTORP): Use it.
7863 * fns.c (internal_equal): Adapt code to extract pvectype.
7864 * emacs.c (gdb_pvec_type): Update type.
7865 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
7866 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
7867 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
7868 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
7869 (sweep_vectors): Use it. Use local var `total_bytes' instead of
7870 abusing vector->header.next.nbytes.
7871 (live_vector_p): Use PVEC_TYPE.
7872 (mark_object): Adapt code to extract pvectype. Use switch.
7874 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
7876 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
7877 Tighten new eassert a bit.
7879 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
7881 Fix compilation with --enable-gcc-warnings and -O1
7883 * doprnt.c (doprnt): Change type of tem to int, initialize
7884 to avoid compiler warning. Add eassert.
7885 * search.c (simple_search): Initialize match_byte to avoid
7886 compiler warning. Add eassert.
7888 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
7890 Avoid weird behavior with large horizontal scrolls.
7891 Without this change, for example, large hscroll values would
7892 mess up Emacs's display on Fedora 15 x86, presumably due to
7893 overflows in int calculations in the display code.
7894 Also, if buffers had long lines, Emacs would freeze.
7895 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
7896 (set_window_hscroll): New function, containing the old guts of
7897 Fset_window_hscroll. Return the clipped value.
7898 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
7899 This avoids the need to check against PTRDIFF_MAX.
7901 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
7903 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
7905 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
7907 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
7909 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
7910 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
7911 since GCC 4.4.6 issues a bogus warning for them.
7913 Fix bugs in file timestamp newness comparisons.
7914 * fileio.c (Ffile_newer_than_file_p):
7915 * lread.c (Fload): Use full timestamp resolution of files,
7916 not just the 1-second resolution, so that files that are only
7917 slightly newer still count as newer.
7918 * fileio.c (Ffile_newer_than_file_p): Don't assume file
7919 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
7921 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
7923 * fileio.c: Improve handling of file time marker. (Bug#11852)
7924 (special_mtime): New function.
7925 (Finsert_file_contents, Fverify_visited_file_modtime):
7926 Use it to set special mtime values consistently.
7928 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
7930 * fileio.c (Finsert_file_contents): Properly handle st_mtime
7931 marker for non-existing file. (Bug#11852)
7933 2012-07-03 Glenn Morris <rgm@gnu.org>
7935 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
7936 and did not make it into globals.h).
7938 2012-07-03 Tom Tromey <tromey@redhat.com>
7940 * window.c (Fset_window_margins, Fset_window_fringes)
7941 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
7942 * textprop.c (Fprevious_property_change): No longer static.
7943 * syntax.c (Fsyntax_table_p): No longer static.
7944 * process.c (Fget_process, Fprocess_datagram_address): No longer
7946 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
7947 * keyboard.c (Fcommand_execute): No longer static.
7949 * insdel.c (Fcombine_after_change_execute): No longer static.
7950 * image.c (Finit_image_library): No longer static.
7951 * fileio.c (Fmake_symbolic_link): No longer static.
7952 * eval.c (Ffetch_bytecode): No longer static.
7953 * editfns.c (Fuser_full_name): No longer static.
7954 * doc.c (Fdocumentation_property, Fsnarf_documentation):
7956 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
7958 * dired.c (Ffile_attributes): No longer static.
7959 * composite.c (Fcomposition_get_gstring): No longer static.
7960 * callproc.c (Fgetenv_internal): No longer static.
7962 * ccl.h: Remove EXFUNs.
7963 * buffer.h: Remove EXFUNs.
7964 * dispextern.h: Remove EXFUNs.
7965 * intervals.h: Remove EXFUNs.
7966 * fontset.h: Remove EXFUN.
7967 * font.h: Remove EXFUNs.
7968 * dosfns.c (system_process_attributes): Remove EXFUN.
7969 * keymap.h: Remove EXFUNs.
7970 * lisp.h: Remove EXFUNs.
7971 * w32term.h: Remove EXFUNs.
7972 * window.h: Remove EXFUNs.
7973 * xsettings.h: Remove EXFUN.
7974 * xterm.h: Remove EXFUN.
7976 2012-07-03 Glenn Morris <rgm@gnu.org>
7978 * lisp.h (Frandom): Make it visible to C.
7979 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
7980 buffer for invisible buffers. (Bug#1229)
7982 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
7984 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
7985 values which aren't power of 2.
7986 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
7987 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
7990 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
7992 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
7994 * alloc.c (mark_object): Revert part of last patch to use `switch'.
7996 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
7998 * alloc.c (allocate_vector_block): Remove redundant
7999 calls to mallopt if DOUG_LEA_MALLOC is defined.
8000 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
8001 avoid calls to mallopt if zero_vector is returned.
8003 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8005 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
8006 is enabled, avoid dereferencing NULL current_sblock if
8009 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
8011 Cleanup basic buffer management.
8012 * buffer.h (struct buffer): Change layout to use generic vector
8013 marking code. Fix some comments. Change type of 'clip_changed'
8014 to bitfield. Remove unused #ifndef old.
8015 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
8016 (GET_OVERLAYS_AT): Fix indentation.
8017 (for_each_per_buffer_object_at): New macro.
8018 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
8019 (Fbuffer_local_variables): Use it.
8020 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
8021 * alloc.c (allocate_buffer): Adjust to match new layout of
8022 struct buffer. Fix comment.
8023 (mark_overlay): New function.
8024 (mark_buffer): Use it. Use mark_vectorlike to mark normal
8025 Lisp area of struct buffer.
8026 (mark_object): Use it. Adjust marking of misc objects
8027 and related comments.
8029 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
8031 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
8032 wrapper that is not needed because the wrapped code is a no-op (zero
8033 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
8034 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
8036 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
8038 * alloc.c (mark_buffer): Simplify. Remove prototype.
8039 (mark_object): Add comment. Reorganize marking of vector-like
8040 objects. Use CHECK_LIVE for all vector-like objects except buffers
8041 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
8042 Avoid redundant calls to mark_vectorlike for bool vectors.
8044 2012-06-30 Glenn Morris <rgm@gnu.org>
8046 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
8048 * epaths.in (PATH_SITELOADSEARCH): New.
8049 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
8050 This is rather than relying on --enable-locallisppath elements
8051 having "site-lisp" in their names. (Bug#10208#25, 11658)
8053 2012-06-30 Eli Zaretskii <eliz@gnu.org>
8055 * w32proc.c (sys_select): Accept and ignore one more argument.
8057 * w32.c (emacs_gnutls_pull): Call select with one more argument.
8059 * sysselect.h [DOS_NT]: Don't include sys/select.h.
8060 (pselect) [!MS_DOS]: Redirect to sys_select.
8062 * sysdep.c: Don't include dos.h and dosfns.h.
8064 * process.c (sys_select):
8065 * msdos.c (sys_select): Accept one more argument and ignore it.
8067 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
8068 adapt data types and code to that.
8071 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
8072 which clashes with the gnulib function of the same name.
8074 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
8076 * font.c (font_style_to_value, font_style_symbolic)
8077 (font_prop_validate_style): Add type checks for values in
8080 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
8082 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
8085 2012-06-29 Eli Zaretskii <eliz@gnu.org>
8087 * xdisp.c (try_window_id): Undo last change.
8089 * w32.c (getwd): Adjust commentary about startup_dir.
8090 (init_environment): Always call sys_access, even in non-MSVC
8091 builds. Don't chdir to the directory of the Emacs executable.
8092 This undoes code from 1997 which was justified by the need to
8093 "avoid conflicts when removing and renaming directories". But its
8094 downside was that every relative file name was being interpreted
8095 relative to the directory of the Emacs executable, which can never
8096 be TRT. In particular, it broke sys_access when called with
8097 relative file names.
8098 (sys_access): Map GetLastError to errno.
8100 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8102 * window.h (struct window): Change type of 'fringes_outside_margins'
8103 to bitfield. Fix comment. Adjust users accordingly.
8104 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
8106 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
8109 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
8111 * gnutls.c (emacs_gnutls_handshake):
8112 Add QUIT to make the loop interruptible.
8114 2012-06-29 Glenn Morris <rgm@gnu.org>
8116 * charset.c (init_charset): Make lack of etc/charsets fatal.
8118 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8120 * editfns.c (region_limit): Fix type mismatch.
8122 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
8124 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
8125 undefined. Convert from xassert to eassert.
8126 * nsmenu.m: Convert from xassert to eassert.
8127 * nsterm.m: Likewise.
8129 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
8131 * editfns.c (region_limit): Clip to narrowing (bug#11770).
8133 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
8135 Avoid integer overflow on scroll-left and scroll-right.
8136 * window.c (HSCROLL_MAX): New macro.
8137 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
8138 overflow when requested scroll falls outside ptrdiff_t range.
8140 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8142 * window.h (struct window): Change type of 'hscroll',
8143 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
8144 'last_modified' and 'last_overlay_modified' to EMACS_INT.
8145 Adjust users accordingly.
8146 * xdisp.c (try_cursor_movement): Replace type check with eassert.
8147 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
8148 from EMACS_INT to ptrdiff_t.
8149 (make_window): Omit redundant initialization.
8151 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
8153 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
8155 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8157 * window.h (struct window): Change type of 'use_time' and
8158 'sequence_number' from Lisp_Object to int.
8159 * frame.c (make_frame): Adjust users accordingly.
8160 * print.c (print_object): Likewise.
8161 * window.c (select_window, Fwindow_use_time, make_parent_window)
8162 (make_window): Likewise.
8164 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8166 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
8167 enabled with --enable-checking=[all,glyphs] configure option.
8168 Fix GLYPH_DEBUG usage assuming that it may be undefined,
8169 adjust comments accordingly.
8170 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
8171 undefined, adjust comments accordingly.
8172 * image.c: Likewise.
8173 * scroll.c: Likewise.
8174 * w32fns.c: Likewise.
8175 * w32term.c: Likewise.
8176 * xdisp.c: Likewise.
8177 * xfaces.c: Likewise.
8179 * xterm.c: Likewise.
8181 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
8183 Generalize run-time debugging checks.
8184 * dispextern.h (XASSERTS): Remove.
8185 * fontset.c (xassert): Remove.
8186 Convert from xassert to eassert.
8187 * alloc.c: Convert from xassert to eassert.
8189 * dispnew.c: Likewise.
8191 * fringe.c: Likewise.
8192 * ftfont.c: Likewise.
8193 * gtkutil.c: Likewise.
8194 * image.c: Likewise.
8195 * keyboard.c: Likewise.
8197 * process.c: Likewise.
8198 * scroll.c: Likewise.
8199 * sound.c: Likewise.
8201 * w32console.c: Likewise.
8202 * w32fns.c: Likewise.
8203 * w32term.c: Likewise.
8204 * window.c: Likewise.
8205 * xdisp.c: Likewise.
8206 * xfaces.c: Likewise.
8208 * xselect.c: Likewise.
8209 * xterm.c: Likewise.
8211 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
8213 * fns.c (maybe_resize_hash_table): Output message when growing the
8216 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8218 * alloc.c (allocate_string_data): Remove dead code.
8219 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
8220 avoid GCC warning about unused macro.
8222 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8224 * alloc.c (allocate_string): Omit intervals initialization.
8225 * alloc.c (make_uninit_multibyte_string): Initialize intervals
8226 as in make_pure_string and make_pure_c_string.
8228 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8230 * alloc.c (allocate_string): Fix last change.
8232 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8234 * alloc.c (allocate_string): Remove two redundant calls
8235 to memset, add explicit initialization where appropriate.
8237 2012-06-27 Glenn Morris <rgm@gnu.org>
8239 * lisp.mk (lisp): Remove paths.elc.
8241 2012-06-27 Chong Yidong <cyd@gnu.org>
8243 * doc.c (Fsubstitute_command_keys): Fix punctuation.
8245 2012-06-26 John Wiegley <johnw@newartisans.com>
8247 * unexmacosx.c (copy_data_segment): Add two section names used
8248 on Mac OS X Lion: __mod_init_func and __mod_term_func.
8250 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
8251 when building with Clang.
8253 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
8255 * eval.c (Fapply): Allow calling it with a single argument.
8257 2012-06-26 Eli Zaretskii <eliz@gnu.org>
8259 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
8260 _stricmp and _strnicmp.
8261 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
8263 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8265 * alloc.c (allocate_window): Zero out non-Lisp part of newly
8267 (allocate_process): Likewise for new process.
8268 (allocate_terminal): Change to use offsetof.
8269 (allocate_frame): Likewise.
8270 * frame.c (make_frame): Omit redundant initialization.
8271 * window.c (make_parent_window): Use memset.
8272 (make_window): Omit redundant initialization.
8273 * process.c (make_process): Omit redundant initialization.
8274 * terminal.c (create_terminal): Likewise.
8276 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8278 * term.c (delete_tty): Remove redundant call to memset.
8280 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
8282 * alloc.c: Remove build_string.
8283 * lisp.h: Define build_string as static inline. This provides
8284 a better opportunity to optimize away calls to strlen when the
8285 function is called with compile-time constant argument.
8286 * image.c (imagemagick_error): Convert to build_string.
8287 * w32proc.c (sys_spawnve): Likewise.
8288 * xterm.c (x_term_init): Likewise.
8290 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
8292 Use sprintf return value instead of invoking strlen on result.
8293 In the old days this wasn't portable, since some sprintf
8294 implementations returned char *. But they died out years ago and
8295 Emacs already assumes sprintf returns int.
8296 Similarly for float_to_string.
8297 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
8298 * ccl.c (ccl_driver):
8299 * character.c (string_escape_byte8):
8300 * data.c (Fnumber_to_string):
8301 * doprnt.c (doprnt):
8302 * print.c (print_object):
8303 * xdisp.c (message_dolog):
8304 * xfns.c (syms_of_xfns):
8305 Use sprintf or float_to_string result to avoid need to call strlen.
8306 * data.c (Fnumber_to_string):
8307 Use make_unibyte_string, since the string must be ASCII.
8308 * lisp.h, print.c (float_to_string): Now returns int length.
8309 * term.c (produce_glyphless_glyph):
8310 Use sprintf result rather than recomputing it.
8312 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
8313 * Makefile.in (ALL_CFLAGS):
8314 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
8315 * gmalloc.c, regex.c: Include <config.h> unconditionally.
8317 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8319 * dispextern.h (xstrcasecmp): Define to library function
8320 strcasecmp if available.
8321 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
8323 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
8325 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
8326 Avoid comma operator.
8327 * menu.c (push_submenu_start, push_submenu_end)
8328 (push_left_right_boundary, push_menu_pane): Likewise.
8329 * msdos.c (dos_rawgetc): Likewise.
8331 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8333 * xfns.c (xic_create_fontsetname): Remove redundant calls
8336 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
8338 * gtkutil.c (get_utf8_string): Remove redundant assignment.
8339 sprintf already null-terminates its output.
8341 * xfns.c (x_window): Remove redundant cast.
8343 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
8345 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
8346 `const char *' to `char *' to avoid compiler warning.
8348 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8350 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
8351 instead of truncating it to 63 (admittedly a generous limit).
8353 * process.c: Fix spelling and caps in comments.
8355 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
8357 * emacs.c (setpgrp): Remove definition, unused.
8358 * sysdep.c (setpgrp): Remove definition, not used in this file.
8360 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
8362 * makefile.w32-in: Update dependencies.
8364 2012-06-24 Eli Zaretskii <eliz@gnu.org>
8366 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
8367 (SYSTIME_H): Add nt/inc/sys/time.h.
8369 * systime.h [WINDOWSNT]: Include sys/time.h.
8371 * s/ms-w32.h (struct timespec): Definition moved from
8372 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
8374 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8376 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
8377 * buffer.h (buffer_slot_type_mismatch):
8378 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8379 * eval.c (unwind_to_catch):
8380 * image.c (my_png_error, my_error_exit):
8381 * keyboard.c (quit_throw_to_read_char, user_error)
8382 (Fexit_recursive_edit, Fabort_recursive_edit):
8383 * lisp.h (die, args_out_of_range, args_out_of_range_3)
8384 (wrong_type_argument, buffer_overflow, __executable_start)
8385 (memory_full, buffer_memory_full, string_overflow, Fthrow)
8386 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
8387 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
8389 (child_setup) [!DOS_NT]:
8390 * lread.c (end_of_file_error, invalid_syntax):
8391 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
8392 * puresize.h (pure_write_error):
8393 * search.c (matcher_overflow):
8394 * sound.c (sound_perror, alsa_sound_perror):
8395 * sysdep.c, syssignal.h (croak):
8396 * term.c (maybe_fatal, vfatal):
8397 * textprop.c (text_read_only):
8398 * undo.c (user_error):
8399 * unexmacosx.c (unexec_error):
8400 * xterm.c (x_ins_del_lines, x_delete_glyphs):
8401 Use _Noreturn rather than NO_RETURN.
8402 No need for separate decl merely because of _Noreturn.
8403 * sound.c (sound_warning, parse_sound):
8404 Remove unnecessary forward decls.
8406 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
8408 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
8409 * lisp.h (WAIT_READING_MAX): New macro.
8410 * dispnew.c (Fsleep_for, sit_for):
8411 * keyboard.c (kbd_buffer_get_event):
8412 * process.c (Faccept_process_output):
8413 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
8414 This improves on the previous patch, which introduced a bug
8415 when time_t is unsigned and as wide as intmax_t.
8416 See <http://bugs.gnu.org/9000#51>.
8418 2012-06-23 Eli Zaretskii <eliz@gnu.org>
8420 * dispnew.c (sit_for, Fsleep_for):
8421 * keyboard.c (kbd_buffer_get_event):
8422 * process.c (Faccept_process_output): Avoid compiler warnings when
8423 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
8425 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
8427 * makefile.w32-in: Update dependencies.
8429 * w32.c (ltime): Add return type and declare static.
8430 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
8432 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
8434 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
8435 Privately reported by Herbert J. Skuhra.
8436 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
8438 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
8439 not make_lisp_timeval, when the argument is of type EMACS_TIME.
8441 2012-06-23 Eli Zaretskii <eliz@gnu.org>
8443 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
8444 last argument of make_unibyte_string.
8446 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
8447 language ID in the event parameters.
8449 * w32term.c (w32_read_socket): Put the new keyboard codepage into
8450 event.code, not the obscure "character set ID".
8452 2012-06-23 Chong Yidong <cyd@gnu.org>
8454 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
8456 2012-06-23 Eli Zaretskii <eliz@gnu.org>
8458 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
8459 * w32.c (fdutimens): New function.
8461 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
8463 * s/ms-w32.h (pselect): Redirect to sys_select.
8465 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
8467 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
8468 in the logic of incrementing and decrementing the value of
8469 use_relocatable_buffers.
8471 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
8473 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
8474 Privately reported by Herbert J. Skuhra.
8475 [__FreeBSD__]: Remove "*/" typo after "#include".
8476 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
8477 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
8478 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
8479 Don't assume EMACS_TIME and struct timeval are the same type.
8481 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
8483 Support higher-resolution time stamps (Bug#9000).
8484 The time stamps are only nanosecond-resolution at the C level,
8485 since that's the best that any real-world system supports now.
8486 But they are picosecond-resolution at the Lisp level, as that's
8487 easy, and leaves room for future OS improvements.
8489 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
8492 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
8493 Don't get current time unless it's needed.
8495 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
8496 now provides it if it's absent.
8497 (start_atimer): Port to higher-res time stamps.
8498 Check for time stamp overflow. Don't get current time more
8499 often than is needed.
8501 * buffer.h (struct buffer): Buffer modtime now has high resolution.
8502 Include systime.h, not time.h.
8503 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
8505 * dired.c: Include stat-time.h.
8506 (Ffile-attributes): File times now have higher resolution.
8508 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
8509 (struct image): Timestamp now has higher resolution.
8511 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
8512 has at least microseconds now. All uses removed.
8513 (update_frame, update_single_window, update_window, update_frame_1)
8514 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
8515 (duration_to_sec_usec): Remove; no longer needed.
8517 * editfns.c (time_overflow): Now extern.
8518 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
8519 (float-time, Fformat_time_string, Fcurrent_time_string)
8520 (Fcurrent_time_zone): Accept and generate higher-resolution
8522 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
8523 (decode_time_components, lisp_seconds_argument): New functions.
8524 (make_time): Now static.
8525 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
8526 Report an error if the time is invalid, rather than having the caller
8529 * fileio.c: Include <stat-time.h>
8530 (Fcopy_file): Copy higher-resolution time stamps.
8531 Prefer to set the time stamp via a file descriptor if that works.
8532 (Fset_file_times, Finsert_file_contents, Fwrite_region)
8533 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
8534 (Fvisited_file_modtime, Fset_visited_file_modtime):
8535 Support higher-resolution time stamps.
8537 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
8539 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
8541 * image.c (prepare_image_for_display, clear_image_cache)
8542 (lookup_image): Port to higer-resolution time stamps.
8544 * keyboard.c (start_polling, bind_polling_period):
8545 Check for time stamp overflow.
8546 (read_char, kbd_buffer_get_event, timer_start_idle)
8547 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
8548 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
8549 Port to higher-resolution time stamps. Do not assume time_t is signed.
8550 (decode_timer): New function. Timers are now vectors of length 9,
8551 not 8, to accommodate the picosecond component.
8552 (timer_check_2): Use it.
8554 * nsterm.m (select_timeout, timeval_subtract): Remove.
8555 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
8556 as they're a bit more accurate and handle overflow better.
8557 (ns_select): Change prototype to be compatible with pselect.
8558 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
8559 * nsterm.h (ns_select): Adjust prototype.
8561 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
8562 us-resolution time stamps.
8563 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
8565 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
8567 * lisp.h (time_overflow): New decl.
8568 (wait_reading_process_output): First arg is now intmax_t, not int,
8569 to accommodate larger waits.
8571 * process.h (struct Lisp_Process.read_output_delay):
8572 Now counts nanoseconds, not microseconds.
8573 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
8575 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
8576 (wait_reading_process_output):
8577 Port to ns-resolution time stamps.
8578 (Faccept_process_output, wait_reading_process_output):
8579 Check for time stamp overflow. Do not assume time_t is signed.
8580 (select_wrapper): Remove; we now use pselect.
8581 (Fprocess_attributes): Now generates ns-resolution time stamps.
8583 * sysdep.c: Include utimens.h. Don't include utime.h
8584 or worry about struct utimbuf; gnulib does that for us now.
8585 (gettimeofday): Remove; gnulib provides a substitute.
8586 (make_timeval): New function.
8587 (set_file_times): Now sets ns-resolution time stamps.
8588 New arg FD; all uses changed.
8589 (time_from_jiffies, ltime_from_jiffies, get_up_time)
8590 (system_process_attributes):
8591 Now returns ns-resolution time stamp. All uses changed.
8592 Check for time stamp overflow.
8594 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
8595 provides a substitute now.
8597 * systime.h: Include timespec.h rather than sys/time.h and time.h,
8598 since it guarantees struct timespec.
8599 (EMACS_TIME): Now struct timespec, so that we can support
8600 ns-resolution time stamps.
8601 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
8602 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
8603 (EMACS_USECS): Remove.
8604 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
8605 so multiply the arg by 1000 before storing it.
8606 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
8608 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
8609 Port to ns-resolution time stamps.
8610 (EMACS_TIME_NEG_P): Remove; replaced by....
8611 (EMACS_TIME_SIGN): New macro.
8612 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
8613 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
8614 (set_file_times, make_time, lisp_time_argument): Adjust signature.
8615 (make_timeval, make_lisp_time, decode_time_components): New decls.
8616 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
8617 that it mishandled time_t overflow. You can't compare by subtracting!
8618 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
8619 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
8621 * term.c: Include <sys/time.h>.
8622 (timeval_to_Time): New function, for proper overflow wraparound.
8623 (term_mouse_position, term_mouse_click): Use it.
8625 * undo.c (record_first_change): Support higher-resolution time stamps
8627 (Fprimitive_undo): Use them when restoring time stamps.
8629 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
8630 (w32_get_internal_run_time):
8631 Port to higher-resolution Emacs time stamps.
8632 (ltime): Now accepts single 64-bit integer, as that's more convenient
8635 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
8637 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
8638 for compatibility with pselect. Support ns-resolution time stamps.
8640 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
8642 * xselect.c (wait_for_property_change, x_get_foreign_selection):
8643 Check for time stamp overflow, and support ns-resolution time stamps.
8645 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
8646 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
8647 (timeval_subtract): Remove; no longer needed.
8648 (XTflash, XTring_bell, x_wait_for_event):
8649 Port to ns-resolution time stamps. Don't assume time_t is signed.
8651 2012-06-22 Chong Yidong <cyd@gnu.org>
8653 * xdisp.c (x_consider_frame_title): Revert last change.
8655 2012-06-22 Eli Zaretskii <eliz@gnu.org>
8657 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
8658 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
8659 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
8660 staticidx goes up to 1597 out of 1600 = 0x640.)
8662 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
8664 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
8665 Otherwise, the umask might be mistakenly 0 while handling input signals.
8667 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
8669 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
8671 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
8673 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
8674 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
8675 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
8676 access to `contents' member of Lisp_Vector objects with AREF and ASET
8679 2012-06-19 Chong Yidong <cyd@gnu.org>
8681 * frame.c (delete_frame): When selecting a frame on a different
8682 text terminal, do not alter the terminal's top-frame.
8684 * xdisp.c (format_mode_line_unwind_data): Record the target
8685 frame's selected window and its terminal's top-frame.
8686 (unwind_format_mode_line): Restore them.
8687 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
8689 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
8690 since tty frames can be explicitly named.
8691 (prepare_menu_bars): Likewise.
8693 * term.c (Ftty_top_frame): New function.
8695 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
8697 Port byte-code-meter to modern targets.
8698 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
8699 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8700 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
8701 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
8702 (METER_1, METER_2): Simplify.
8704 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
8706 * data.c (Fdefalias): Return `symbol' (bug#11686).
8708 2012-06-18 Martin Rudalics <rudalics@gmx.at>
8710 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
8711 gets killed during executing of this function (Bug#11665).
8712 Try to always return Qt when the buffer has been actually killed.
8713 (Vkill_buffer_query_functions): In doc-string say that functions
8714 run by this hook should not change the current buffer.
8716 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
8718 Fix recently-introduced process.c problems found by static checking.
8719 * process.c (write_queue_push, write_queue_pop, send_process):
8720 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
8721 (write_queue_pop): Fix pointer signedness problem.
8722 (send_process): Remove unused local.
8724 2012-06-17 Chong Yidong <cyd@gnu.org>
8726 * xdisp.c (redisplay_internal): No need to redisplay terminal
8727 frames that are not on top.
8729 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
8731 * process.c (make_process): Initialize write_queue.
8732 (write_queue_push, write_queue_pop): New functions.
8733 (send_process): Use them to maintain correct ordering of process
8736 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
8738 * lisp.h (eassert): Assume C89 or later.
8739 This removes the need for CHECK.
8740 (CHECK): Remove. Its comments about always evaluating its
8741 argument were confusing, as 'eassert' typically does not evaluate
8744 * coding.c (produce_chars): Use ptrdiff_t, not int.
8746 * xterm.c (x_draw_underwave): Check for integer overflow.
8747 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
8749 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
8751 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
8752 referenced (Bug#11583).
8754 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
8756 Implement wave-style variant of underlining.
8757 * dispextern.h (face_underline_type): New enum.
8758 (face): Add field for underline type.
8759 * nsterm.m (ns_draw_underwave): New function.
8760 (ns_draw_text_decoration): Use it.
8761 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
8763 (x_draw_glyph_string): Use them.
8764 * xfaces.c (Qline, Qwave): New Lisp objects.
8765 (check_lface_attrs, merge_face_ref)
8766 (Finternal_set_lisp_face_attribute, realize_x_face):
8767 Handle wave-style underline face attributes.
8768 * xterm.c (x_draw_underwave): New function.
8769 (x_draw_glyph_string): Use it.
8771 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
8773 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
8774 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
8775 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
8776 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
8777 ($(BLD)/w32select.$(O)): Update dependencies.
8779 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
8781 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
8782 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
8783 * character.c (_fetch_multibyte_char_p): Remove.
8784 * alloc.c: Include "character.h" before "buffer.h".
8786 * buffer.c: Likewise.
8787 * bytecode.c: Likewise.
8788 * callint.c: Likewise.
8789 * callproc.c: Likewise.
8790 * casefiddle.c: Likewise.
8791 * casetab.c: Likewise.
8792 * category.c: Likewise.
8794 * coding.c: Likewise.
8795 * composite.c: Likewise.
8796 * dired.c: Likewise.
8797 * dispnew.c: Likewise.
8799 * dosfns.c: Likewise.
8800 * editfns.c: Likewise.
8801 * emacs.c: Likewise.
8802 * fileio.c: Likewise.
8803 * filelock.c: Likewise.
8805 * fontset.c: Likewise.
8806 * fringe.c: Likewise.
8807 * indent.c: Likewise.
8808 * insdel.c: Likewise.
8809 * intervals.c: Likewise.
8810 * keyboard.c: Likewise.
8811 * keymap.c: Likewise.
8812 * lread.c: Likewise.
8813 * macros.c: Likewise.
8814 * marker.c: Likewise.
8815 * minibuf.c: Likewise.
8816 * nsfns.m: Likewise.
8817 * nsmenu.m: Likewise.
8818 * print.c: Likewise.
8819 * process.c: Likewise.
8820 * regex.c: Likewise.
8821 * region-cache.c: Likewise.
8822 * search.c: Likewise.
8823 * syntax.c: Likewise.
8825 * textprop.c: Likewise.
8827 * unexsol.c: Likewise.
8828 * w16select.c: Likewise.
8829 * w32fns.c: Likewise.
8830 * w32menu.c: Likewise.
8831 * window.c: Likewise.
8832 * xdisp.c: Likewise.
8834 * xmenu.c: Likewise.
8836 * xselect.c: Likewise.
8838 2012-06-16 Eli Zaretskii <eliz@gnu.org>
8840 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
8841 If all the glyphs of the glyph row came from strings, and we have no
8842 cursor positioning clues, put the cursor on the first glyph of the
8844 (handle_face_prop): Use chunk-relative overlay string index when
8845 indexing into it->string_overlays array. (Bug#11653)
8846 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
8847 the rightmost. (Bug#11720)
8849 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
8851 * category.h (CHAR_HAS_CATEGORY): Define as inline.
8852 (CATEGORY_MEMBER): Enforce 1/0 value.
8853 * category.c (_temp_category_set): Remove.
8855 2012-06-16 Eli Zaretskii <eliz@gnu.org>
8857 * window.c (Fdelete_other_windows_internal)
8858 (Fdelete_window_internal): Don't access frame's mouse highlight
8859 info of the initial frame. (Bug#11677)
8861 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
8863 * .gdbinit (xgetint): Fix recently-introduced paren typo.
8864 Assume USE_2_TAGS_FOR_INTS.
8865 (xreload): Adjust $tagmask width to match recent lisp.h change.
8867 Simplify lisp.h in minor ways that should not affect code.
8868 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
8869 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
8870 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
8871 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
8872 (INTTYPEBITS): New macro, for clarity.
8873 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
8874 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
8875 Simplify now that USE_LSB_TAG is always defined.
8876 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
8877 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
8879 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
8881 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
8883 2012-06-13 Glenn Morris <rgm@gnu.org>
8885 * s/bsd-common.h (BSD4_3):
8886 * s/usg5-4-common.h (USG5_4): No longer define; unused.
8888 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
8890 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
8893 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
8895 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
8896 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
8897 * alloc.c (widen_to_Lisp_Object): Remove.
8898 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
8899 * frame.c (delete_frame): Remove outdated comment.
8900 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
8901 USE_LISP_UNION_TYPE.
8902 (Fw32_unregister_hot_key): Likewise.
8903 (Fw32_toggle_lock_key): Likewise.
8904 * w32menu.c (add_menu_item): Likewise.
8905 (w32_menu_display_help): Use XIL instead of checking
8906 USE_LISP_UNION_TYPE.
8907 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
8908 (init_heap): Likewise.
8909 * w32term.c (w32_read_socket): Update comment.
8911 2012-06-13 Glenn Morris <rgm@gnu.org>
8913 * s/usg5-4-common.h, src/s/unixware.h:
8914 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
8916 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
8918 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
8920 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
8921 * alloc.c (make_number) [!defined make_number]:
8922 Remove, as lisp.h always defines this now.
8923 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
8924 (roundup_size): Verify that it is a power of 2.
8925 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
8926 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
8927 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
8928 -DUSE_LSB_TAG=0, to override the automatically-selected default.
8929 USE_LSB_TAG now is always defined to be either 0 or 1.
8931 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
8932 code works fine either way, and efficiency is not a concern here,
8933 as the union type is for debugging, not for production.
8934 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
8935 Use an inline function on all platforms when using the union type,
8936 since this is simpler and 'static inline' can be used portably
8938 (LISP_INITIALLY_ZERO): New macro.
8939 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
8940 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
8942 2012-06-12 Glenn Morris <rgm@gnu.org>
8944 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
8946 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
8948 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
8949 Move BROKEN_SIGIO to configure.
8951 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
8952 Move NO_TERMIO to configure.
8954 2012-06-12 Chong Yidong <cyd@gnu.org>
8956 * image.c (imagemagick_load_image): Use MagickFlattenImage if
8957 MagickMergeImageLayers is undefined. Use pixel pusher loop if
8958 MagickExportImagePixels is undefined.
8960 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
8962 * image.c (imagemagick_load_image): Remove unused label.
8964 2012-06-11 Glenn Morris <rgm@gnu.org>
8966 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
8967 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
8968 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
8969 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
8971 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
8973 * alloc.c (make_byte_code): New function.
8974 (Fmake_byte_code): Use it. Don't purify here.
8975 * lread.c (read1): Use it as well to avoid extra allocation.
8977 2012-06-11 Chong Yidong <cyd@gnu.org>
8979 * image.c (imagemagick_load_image): Implement transparency.
8981 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
8983 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
8984 account for preceding backslashes. (Bug#11663)
8986 2012-06-09 Chong Yidong <cyd@gnu.org>
8988 * term.c: Support italics in capable terminals (Bug#9652).
8989 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
8990 (turn_on_face): Output using TS_enter_italic_mode if available.
8991 Don't handle unused blinking and alt-charset cases.
8992 (turn_off_face): Handle italic case; discard unused tty_blinking_p
8993 and tty_alt_charset_p cases.
8994 (tty_capable_p, init_tty): Support italics.
8996 * termchar.h (struct tty_display_info): Add field for italics.
8997 Remove unused blink field.
8999 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
9002 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
9003 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
9004 tty_alt_charset_p. Add tty_italic_p.
9006 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
9008 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
9009 dbus_type_is_basic if available.
9010 (xd_extract_signed, xd_extract_unsigned): Rename from
9011 extract_signed and extract_unsigned, respectively. Adapt callers.
9013 2012-06-09 Chong Yidong <cyd@gnu.org>
9015 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
9017 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
9020 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
9022 * xdisp.c (vmessage): Treat frame message as multibyte.
9023 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
9024 would generate the diagnostic "Making \302\247 buffer-local while
9027 2012-06-08 Eli Zaretskii <eliz@gnu.org>
9029 * dispnew.c (showing_window_margins_p): Undo last change, which
9030 was done due to an inadvertent commit.
9031 (adjust_frame_glyphs_for_frame_redisplay): Do call
9032 showing_window_margins_p.
9034 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9036 * eval.c (Fmake_var_non_special): New primitive.
9037 (syms_of_eval): Defsubr it.
9038 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
9040 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
9042 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
9043 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
9045 2012-06-08 Eli Zaretskii <eliz@gnu.org>
9047 * alloc.c (allocate_vectorlike): Fix last change.
9049 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
9051 Block-based vector allocation of small vectors.
9052 * lisp.h (struct vectorlike_header): New field `nbytes',
9053 adjust comment accordingly.
9054 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
9055 to denote vector blocks. Adjust users (live_vector_p,
9056 mark_maybe_pointer, valid_lisp_object_p) accordingly.
9057 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
9058 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
9059 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
9060 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
9061 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
9062 (roundup_size): New constant.
9063 (struct vector_block): New data type.
9064 (vector_blocks, vector_free_lists, zero_vector): New variables.
9065 (all_vectors): Rename to `large_vectors'.
9066 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
9067 (sweep_vectors): New functions.
9068 (allocate_vectorlike): Return `zero_vector' as the only vector of
9069 0 items. Allocate new vector from block if vector size is less than
9070 or equal to VBLOCK_BYTES_MAX.
9071 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
9072 (init_alloc_once): Add call to init_vectors.
9074 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
9076 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
9078 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
9080 * doprnt.c (doprnt): Truncate multibyte char correctly.
9081 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
9082 would mishandle a string argument "Xc" if X was a multibyte
9083 character of length 2: it would truncate after X's first byte
9084 rather than including all of X.
9086 2012-06-06 Chong Yidong <cyd@gnu.org>
9088 * buffer.c (word_wrap): Doc fix.
9090 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
9092 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
9094 2012-06-03 Glenn Morris <rgm@gnu.org>
9096 * xdisp.c (tool-bar-style): Doc fix.
9098 2012-06-03 Ulrich Müller <ulm@gentoo.org>
9100 * Makefile.in (PAXCTL): Define.
9101 (temacs$(EXEEXT)): Disable memory randomization for the temacs
9102 binary via PaX flags if the paxctl utility is available.
9103 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
9104 Restore PaX flags to their default. (Bug#11398)
9106 2012-06-03 Chong Yidong <cyd@gnu.org>
9108 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
9111 2012-06-03 Chong Yidong <cyd@gnu.org>
9113 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
9114 (note_mode_line_or_margin_highlight): If there is no help echo,
9115 use mode-line-default-help-echo. Handle the case where the mouse
9116 position is past the end of the mode line string.
9118 * buffer.c (buffer_local_value_1): New function, split from
9119 Fbuffer_local_value; can return Qunbound.
9120 (Fbuffer_local_value): Use it.
9121 (Vmode_line_format): Docstring tweaks.
9123 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9125 * sysdep.c (system_process_attributes): Improve comment.
9127 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
9129 * keyboard.c: Export real-this-command to Elisp.
9130 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
9131 and DEFVAR it. Update all users.
9133 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
9135 * minibuf.c (Fassoc_string): Remove duplicate declaration.
9137 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
9138 Convert pctcpu and pctmem to Lisp float properly.
9139 Let the compiler fold better, as 100.0/0x8000 is exact.
9141 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
9143 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
9146 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
9148 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
9150 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
9152 For a 'struct window', replace some Lisp_Object fields to
9153 bitfields where appropriate, remove unused fields.
9154 * window.h (struct window): Remove unused 'last_mark_x' and
9155 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
9156 change its type from Lisp_Object to bitfield.
9157 Change type of 'force_start', 'optional_new_start',
9158 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
9159 fields from Lisp_Object to bitfield. Adjust users accordingly.
9161 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9163 Pacify gcc -Wdouble-precision when using Xaw.
9164 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
9165 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
9166 Use 'float' consistently, rather than 'float' in most places
9167 and 'double' in a couple of places.
9169 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9171 * xdisp.c (handle_stop): Detect whether we have overlay strings
9172 loaded by testing it->current.overlay_string_index to be
9173 non-negative, instead of checking whether n_overlay_strings is
9174 positive. (Bug#11587)
9176 2012-05-31 Chong Yidong <cyd@gnu.org>
9178 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
9180 * doc.c (Fsubstitute_command_keys): Doc fix.
9182 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9184 * search.c (search_buffer): Remove calls to
9185 r_alloc_inhibit_buffer_relocation, as it is now called by
9186 maybe_unify_char, which was the cause of relocation of buffer text
9189 2012-05-31 Eli Zaretskii <eliz@gnu.org>
9191 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
9192 for the duration of call to load_charset, to avoid problems with
9193 callers of maybe_unify_char that access buffer text through C
9196 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
9197 decrement the inhibition flag, instead of just setting or
9200 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
9202 Remove obsolete '#define static' cruft.
9203 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
9204 This #undef was "temporary" in 2000; it is no longer needed
9205 now that '#define static' has gone away.
9206 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
9207 (gray_bitmap_bits): Remove; no longer needed.
9208 All uses replaced with definiens.
9209 * xterm.c: Include "bitmaps/gray.xbm".
9211 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9213 Clean up __executable_start, monstartup when --enable-profiling.
9214 The following changes affect the code only when profiling.
9215 * dispnew.c (__executable_start): Rename from safe_bcopy.
9216 Define only on platforms that need it.
9217 * emacs.c: Include <sys/gmon.h> when profiling.
9218 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
9219 (__executable_start): Remove decl, since lisp.h does it now.
9220 (safe_bcopy): Remove decl; no longer has that name.
9221 (main): Coalesce #if into single bit of code, for simplicity.
9222 Cast pointers to uintptr_t, since standard libraries want integers
9224 * lisp.h (__executable_start): New decl.
9226 2012-05-31 Glenn Morris <rgm@gnu.org>
9228 * image.c (Fimagemagick_types): Doc fix.
9230 2012-05-30 Jim Meyering <meyering@redhat.com>
9232 * callproc.c (Fcall_process_region): Include directory component
9233 in mkstemp error message (Bug#11586).
9235 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
9237 * alloc.c, lisp.h (make_pure_vector): Now static.
9239 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
9241 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
9242 Move to byte-run.el.
9243 (Fautoload): Do the hash-doc more carefully.
9244 * data.c (Fdefalias): Purify definition, except for keymaps.
9245 (Qdefun): Move from eval.c.
9246 * lisp.h (Qdefun): Remove.
9247 * lread.c (read1): Tiny simplification.
9249 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
9251 Do not create empty overlays with the evaporate property (Bug#9642).
9252 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
9253 Bug#9642, but explicitly check that the buffer the overlay would
9254 be moved to is live and rearrange lines to make sure that errors
9255 will not put the overlay in an inconsistent state.
9256 (Fdelete_overlay): Cosmetics.
9258 2012-05-28 Eli Zaretskii <eliz@gnu.org>
9260 * w32term.c (my_bring_window_to_top): New function.
9261 (x_raise_frame): Use handle returned by DeferWindowPos, which
9262 could be different from the original one.
9263 Call my_bring_window_to_top instead of my_set_foreground_window.
9266 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
9267 by calling BringWindowToTop.
9269 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
9270 (WM_EMACS_END): Increase by one.
9272 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
9274 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
9275 This avoids undefined behavior that might cause the eassert
9276 to not catch an out-of-range value.
9278 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
9280 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
9281 Update dependencies.
9283 2012-05-27 Eli Zaretskii <eliz@gnu.org>
9285 * bidi.c (bidi_mirror_char): Fix last change.
9287 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
9289 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
9290 when referring to sectname field in printf format.
9292 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
9294 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
9295 Only r_alloc_inhibit_buffer_relocation needed to be added;
9296 the others were already declared.
9298 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
9299 before checking whether it's out of range. Put the check inside
9301 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
9303 2012-05-27 Ken Brown <kbrown@cornell.edu>
9305 * callproc.c (Fcall_process): Restore a line that was accidentally
9306 commented out in the 2011-02-13 change (bug#11547).
9308 2012-05-27 Eli Zaretskii <eliz@gnu.org>
9310 * lisp.h [REL_ALLOC]: Add prototypes for external functions
9311 defined on ralloc.c.
9313 * buffer.c [REL_ALLOC]: Remove prototypes of
9314 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
9315 they are now on lisp.h.
9317 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
9319 * search.c (search_buffer): Use it to inhibit relocation of buffer
9320 text while re_search_2 is doing its job, because re_search_2 is
9321 passed C pointers to buffer text. (Bug#11519)
9323 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
9326 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
9327 state after an additional call to move_it_in_display_line_to, keep
9328 the values of it->max_ascent and it->max_descent found for the
9330 (pos_visible_p): Revert the comparison against bottom_y to what it
9331 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
9334 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9336 Fix coding-related core dumps with gcc -ftrapv.
9337 The code was computing A - B, where A and B are pointers, and B is
9338 random garbage. This can lead to core dumps on platforms that
9339 have special pointer registers, and it also leads to core dumps on
9340 x86-64 when compiled with gcc -ftrapv. The fix is to compute
9341 A - B only when B is initialized properly.
9342 * coding.c (coding_set_source, coding_set_destination): Return void.
9343 (coding_change_source, coding_change_destinations): New functions,
9344 with the old behaviors of coding_set_source and coding_set_destination.
9345 All callers that need an offset changed to use these new functions.
9347 2012-05-26 Glenn Morris <rgm@gnu.org>
9349 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
9351 2012-05-26 Eli Zaretskii <eliz@gnu.org>
9353 Extend mouse support on W32 text-mode console.
9354 * xdisp.c (draw_row_with_mouse_face):
9355 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
9357 * w32console.c: Include window.h.
9358 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
9360 (initialize_w32_display): Initialize mouse-highlight data.
9362 * w32inevt.c: Include termchar.h and window.h.
9363 (do_mouse_event): Support mouse-autoselect-window. When the mouse
9364 moves, call note_mouse_highlight. If help_echo changed, call
9365 gen_help_event to produce help-echo message in the echo area.
9366 Call clear_mouse_face if mouse_face_hidden is set in the mouse
9369 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
9371 * lread.c (read1): Simplify slightly to avoid an overflow warning
9372 with GCC 4.7.0 on x86-64.
9374 2012-05-26 Eli Zaretskii <eliz@gnu.org>
9376 * bidi.c (bidi_mirror_char): Revert last change: an int is
9377 definitely wide enough here.
9379 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
9381 Fix integer width and related bugs (Bug#9874).
9382 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
9383 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
9384 (string_bytes, check_sblock, allocate_string_data):
9385 (compact_small_strings, Fmake_bool_vector, make_string)
9386 (make_unibyte_string, make_multibyte_string)
9387 (make_string_from_bytes, make_specified_string)
9388 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
9389 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
9391 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9392 (allocate_pseudovector):
9393 Use int, not EMACS_INT, where int is wide enough.
9394 (inhibit_garbage_collection, Fgarbage_collect):
9395 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9396 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
9397 int might not be wide enough.
9398 (bidi_cache_search, bidi_cache_find, bidi_init_it)
9399 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
9400 (bidi_at_paragraph_end, bidi_find_paragraph_start)
9401 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
9402 (bidi_level_of_next_char, bidi_move_to_visually_next):
9403 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9404 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
9405 (Fkill_buffer, Fset_buffer_major_mode)
9406 (advance_to_char_boundary, Fbuffer_swap_text)
9407 (Fset_buffer_multibyte, overlays_at, overlays_in)
9408 (overlay_touches_p, struct sortvec, record_overlay_string)
9409 (overlay_strings, recenter_overlay_lists)
9410 (adjust_overlays_for_insert, adjust_overlays_for_delete)
9411 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
9412 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
9413 (Foverlay_recenter, last_overlay_modification_hooks_used)
9414 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
9415 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9416 (validate_region): Omit unnecessary test for b <= e,
9417 since that's guaranteed by the previous test.
9418 (adjust_overlays_for_delete): Avoid pos + length overflow.
9419 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
9420 (report_overlay_modification):
9421 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9422 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
9423 Omit pointer cast, which isn't needed anyway, and doesn't work
9424 after the EMACS_INT -> ptrdiff_t change.
9425 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
9426 * buffer.h: Adjust decls to match defn changes elsewhere.
9427 (struct buffer_text, struct buffer):
9428 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9429 Use EMACS_INT, not int, where int might not be wide enough.
9430 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
9431 not int, to avoid needless 32-bit limit on 64-bit hosts.
9432 (exec_byte_code): Use tighter memory-full test, one that checks
9433 for alloca overflow. Don't compute the address of the object just
9434 before an array, as that's not portable. Use EMACS_INT, not
9435 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
9436 * callint.c (Fcall_interactively):
9437 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9438 * callproc.c (call_process_kill, Fcall_process):
9439 Don't assume pid_t fits into an Emacs fixnum.
9440 (call_process_cleanup, Fcall_process, child_setup):
9441 Don't assume pid_t fits into int.
9442 (call_process_cleanup, Fcall_process, delete_temp_file)
9443 (Fcall_process_region):
9444 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9445 (Fcall_process): Simplify handling of volatile integers.
9446 Use int, not EMACS_INT, where int will do.
9447 * casefiddle.c (casify_object, casify_region, operate_on_word)
9448 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
9449 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9450 (casify_object): Avoid integer overflow when overallocating buffer.
9451 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
9452 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
9453 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
9454 * category.h (CATEGORYP): Don't assume arg is nonnegative.
9455 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
9456 integers are now checked earlier. All uses replaced with XINT.
9458 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9459 For CCL_MapSingle, check that content and value are in int range.
9460 (ccl_driver, Fregister_code_conversion_map):
9461 Check that Vcode_version_map_vector is a vector.
9462 (resolve_symbol_ccl_program): Check that vector header is in range.
9463 Always copy the vector, so that we can check its contents reliably
9464 now rather than having to recheck each instruction as it's being
9465 executed. Check that vector words fit in 'int'.
9466 (ccl_get_compiled_code, Fregister_ccl_program)
9467 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
9468 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
9469 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
9470 contents are in range.
9471 (Fccl_execute_on_string): Check that status is in range.
9472 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
9473 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
9474 Accept and return EMACS_INT, not int, because callers can pass values
9476 (c_string_width, strwidth, lisp_string_width, chars_in_text)
9477 (multibyte_chars_in_text, parse_str_as_multibyte)
9478 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
9479 (str_as_unibyte, str_to_unibyte, string_count_byte8)
9480 (string_escape_byte8, Fget_byte):
9481 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9482 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
9483 avoid mishandling large integers.
9484 * character.h: Adjust decls to match defn changes elsewhere.
9485 * charset.c (load_charset_map_from_file, find_charsets_in_text)
9486 (Ffind_charset_region):
9487 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9488 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
9489 (load_charset_map_from_vector, Fdefine_charset_internal):
9490 Don't assume fixnum fits in int.
9491 (load_charset_map_from_vector, Fmap_charset_chars):
9492 Remove now-unnecessary CHECK_NATNUMs.
9493 (Fdefine_charset_internal): Check ranges here, more carefully.
9494 Don't rely on undefined behavior with signed left shift overflow.
9495 Don't assume unsigned int fits into fixnum, or that fixnum fits
9496 into unsigned int. Don't require max_code to be a valid fixnum;
9497 that's not true for gb10830 4-byte on a 32-bit host. Allow
9498 invalid_code to be a cons, for the same reason. Require code_offset
9499 to be a character. Avoid int overflow if max_char is close
9501 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
9502 this is intended anyway and avoids some undefined behavior.
9503 (load_charset_map): Pass unsigned, not int, as 2nd arg of
9504 INDEX_TO_CODE_POINT, as that's what it expects.
9505 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
9506 * charset.h (DECODE_CHAR): Return int, not unsigned;
9507 this is what was intended anyway, and it avoids undefined behavior.
9508 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
9509 integer-overflow issues.
9510 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
9511 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
9512 where the argument is EMACS_INT, and this behavior is not intended.
9513 * chartab.c (Fmake_char_table, Fset_char_table_range)
9514 (uniprop_get_decoder, uniprop_get_encoder):
9515 Don't assume fixnum fits in int.
9516 * cmds.c (move_point): New function, that does the gist of
9517 Fforward_char and Fbackward_char, but does so while checking
9518 for integer overflow more accurately.
9519 (Fforward_char, Fbackward_char): Use it.
9520 (Fforward_line, Fend_of_line, internal_self_insert)
9521 (internal_self_insert):
9522 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9523 Fix a FIXME, by checking for integer overflow when calculating
9524 target_clm and actual_clm.
9525 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
9526 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
9527 (ASSURE_DESTINATION, coding_alloc_by_realloc)
9528 (coding_alloc_by_making_gap, alloc_destination)
9529 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
9530 (encode_coding_utf_16, detect_coding_emacs_mule)
9531 (decode_coding_emacs_mule, encode_coding_emacs_mule)
9532 (detect_coding_iso_2022, decode_coding_iso_2022)
9533 (encode_invocation_designation, encode_designation_at_bol)
9534 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
9535 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
9536 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
9537 (encode_coding_ccl, encode_coding_raw_text)
9538 (detect_coding_charset, decode_coding_charset)
9539 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
9540 (produce_composition, produce_charset, produce_annotation)
9541 (decode_coding, handle_composition_annotation)
9542 (handle_charset_annotation, consume_chars, decode_coding_gap)
9543 (decode_coding_object, encode_coding_object, detect_coding_system)
9544 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
9545 (code_convert_region, code_convert_string)
9546 (Fdefine_coding_system_internal)
9547 (coding_set_source, coding_set_destination):
9548 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9549 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
9550 (Fdefine_coding_system_internal):
9551 Don't assume fixnums fit in int.
9552 (decode_coding_gap, decode_coding_object, encode_coding_object)
9553 (Fread_coding_system, Fdetect_coding_region)
9554 (Funencodable_char_position, Fcheck_coding_systems_region)
9555 (get_translation, handle_composition_annotation, consume_chars):
9556 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9557 (consume_chars): Rewrite to not calculate an address outside buffer.
9558 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
9559 Don't access memory outside of the args array.
9560 (Fdefine_coding_system_internal): Check for charset-id overflow.
9561 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
9562 result of ENCODE_CHAR.
9563 * coding.h: Adjust decls to match defn changes elsewhere.
9564 (struct coding_system):
9565 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9566 * composite.c (get_composition_id, find_composition)
9567 (run_composition_function, update_compositions)
9568 (compose_text, composition_gstring_put_cache)
9569 (composition_gstring_p, composition_gstring_width)
9570 (fill_gstring_header, fill_gstring_body, autocmp_chars)
9571 (composition_compute_stop_pos, composition_reseat_it)
9572 (composition_update_it, struct position_record)
9573 (find_automatic_composition, composition_adjust_point)
9574 (Fcomposition_get_gstring, Ffind_composition_internal):
9575 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9576 (update_compositions):
9577 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9578 * composite.h: Adjust decls to match defn changes elsewhere.
9579 (struct composition):
9580 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9581 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
9582 Do not attempt to compute the address of the object just before a
9583 buffer; this is not portable.
9585 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9586 (Faset): Use int, not EMACS_INT, where int is wide enough.
9587 (Fstring_to_number): Don't assume fixnums fit in int.
9588 (Frem): Don't assume arg is nonnegative.
9589 * dbusbind.c (xd_append_arg): Check for integers out of range.
9590 (Fdbus_call_method): Don't overflow the timeout int.
9591 (extract_signed, extract_unsigned): New functions.
9592 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
9593 (xd_get_connection_references): Return ptrdiff_t, not int.
9595 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
9596 (xd_read_message_1):
9597 Use int, not unsigned, where the dbus API uses int.
9598 (Fdbus_message_internal): Don't overflow mtype.
9599 (syms_of_dbusbind): Allocate right-sized buffer for integers.
9600 * dired.c (directory_files_internal, file_name_completion, scmp)
9601 (file_name_completion_stat):
9602 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9603 (file_name_completion): Don't overflow matchcount.
9604 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
9605 * dispextern.h: Adjust decls to match defn changes elsewhere.
9606 (struct text_pos, struct glyph, struct bidi_saved_info)
9607 (struct bidi_string_data, struct bidi_it, struct composition_it)
9609 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9610 (struct display_pos, struct composition_it, struct it):
9611 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9612 * dispnew.c (increment_matrix_positions)
9613 (increment_row_positions, mode_line_string)
9614 (marginal_area_string):
9615 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9616 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
9617 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9618 (duration_to_sec_usec): New function, to check for overflow better.
9619 (Fsleep_for, sit_for): Use it.
9620 * doc.c (get_doc_string, store_function_docstring):
9621 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9622 (get_doc_string, Fsnarf_documentation):
9623 Use int, not EMACS_INT, where int is wide enough.
9625 Use SAFE_ALLOCA, not alloca.
9626 Check for overflow when converting EMACS_INT to off_t.
9627 * doprnt.c (doprnt):
9628 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9629 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
9630 Don't assume uid_t fits into fixnum.
9631 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
9632 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
9633 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
9634 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
9635 (general_insert_function)
9636 (Finsert_char, make_buffer_string, make_buffer_string_both)
9637 (update_buffer_properties, Fbuffer_substring)
9638 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
9639 (Fsubst_char_in_region, check_translation)
9640 (Ftranslate_region_internal, save_restriction_restore, Fformat)
9641 (transpose_markers, Ftranspose_regions):
9642 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9643 (clip_to_bounds): Move to lisp.h as an inline function).
9644 (Fconstrain_to_field): Don't assume integers are nonnegative.
9645 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
9646 (Fsubst_char_in_region, Fsave_restriction):
9647 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9648 (Femacs_pid): Don't assume pid_t fits into fixnum.
9649 (lo_time): Use int, not EMACS_INT, when int suffices.
9650 (lisp_time_argument): Check for usec out of range.
9651 (Fencode_time): Don't assume fixnum fits in int.
9652 (Fuser_login_name, Fuser_full_name): Signal an error
9653 if a uid argument is out of range, rather than relying on
9655 (Fformat_time_string): Remove now-unnecessary check.
9656 lisp_time_argument checks for out-of-range usec now.
9657 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
9658 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
9659 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
9660 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
9661 (init_cmdargs, Fdump_emacs):
9662 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9663 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
9664 the bottom (typically) 32 bits of the fixnum.
9665 * eval.c (specpdl_size, call_debugger):
9666 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9667 (when_entered_debugger, Fbacktrace_debug):
9668 Don't assume fixnum can fit in int.
9669 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
9670 the object just before a buffer; this is not portable.
9671 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
9672 (grow_specpdl, unbind_to):
9673 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9674 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
9675 (grow_specpdl): Simplify allocation by using xpalloc.
9676 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
9677 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
9678 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
9679 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9680 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
9682 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9683 (Fcopy_file, non_regular_nbytes, read_non_regular)
9684 (Finsert_file_contents):
9685 Use int, not EMACS_INT, where int is wide enough.
9686 (READ_BUF_SIZE): Verify that it fits in int.
9687 (Finsert_file_contents): Check that counts are in proper range,
9688 rather than assuming fixnums fit into ptrdiff_t etc.
9689 Don't assume fixnums fit into int.
9690 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
9691 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
9692 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
9693 (string_char_to_byte, string_byte_to_char)
9694 (string_make_multibyte, string_to_multibyte)
9695 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
9696 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
9697 (substring_both, Fdelete, internal_equal, Ffillarray)
9698 (Fclear_string, mapcar1)
9699 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
9700 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
9701 (larger_vector, make_hash_table, maybe_resize_hash_table)
9702 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
9703 (Fmaphash, secure_hash):
9704 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9705 (concat): Check for string index and length overflow.
9706 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
9708 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9709 (larger_vector): New API (vec, incr_min, size_max) replaces old
9710 one (vec, new_size, init). This catches size overflow.
9711 INIT was removed because it was always Qnil.
9712 All callers changed.
9713 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
9714 the upper bound on a hash table index size.
9715 (make_hash_table, maybe_resize_hash_table): Use it.
9716 (secure_hash): Computer start_byte and end_byte only after
9717 they're known to be in ptrdiff_t range.
9718 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
9719 (Ffont_get_glyphs, Ffont_at):
9720 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9721 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
9722 (Flist_fonts, Fopen_font):
9723 Don't assume fixnum can fit in int.
9724 (check_gstring): Don't assume index can fit in int.
9725 (font_match_p): Check that fixnum is a character, not a nonnegative
9726 fixnum, since the later code needs to stuff it into an int.
9727 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
9728 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
9729 conversion overflow issues.
9730 (Fopen_font): Check for integer out of range.
9731 (Ffont_get_glyphs): Don't assume index can fit in int.
9732 * font.h: Adjust decls to match defn changes elsewhere.
9733 * fontset.c (reorder_font_vector): Redo score calculation to avoid
9735 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
9736 printmax_t, where ptrdiff_t is wide enough.
9737 (Finternal_char_font):
9738 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9739 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
9740 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
9741 (Fset_frame_position, x_set_frame_parameters)
9742 (x_set_line_spacing, x_set_border_width)
9743 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
9744 Check that fixnums are in proper range for system types.
9745 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
9746 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9747 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
9748 Use SAFE_ALLOCA_LISP, not alloca.
9749 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
9750 intptr_t is wide enough.
9751 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
9752 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
9753 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
9754 Check for fixnum out of range.
9755 * ftfont.c (ftfont_list): Don't assume index fits in int.
9756 Check that fixnums are in proper range for system types.
9757 (ftfont_shape_by_flt):
9758 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9759 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
9760 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9761 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
9762 Check that fixnums are in proper range for system types.
9763 * gnutls.h: Adjust decls to match defn changes elsewhere.
9764 * gtkutil.c (xg_dialog_run):
9765 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9766 (update_frame_tool_bar):
9767 Check that fixnums are in proper range for system types.
9768 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
9769 (lookup_image): Check that fixnums are in range for system types.
9770 * indent.c (last_known_column, last_known_column_point):
9771 (current_column_bol_cache):
9772 (skip_invisible, current_column, check_display_width):
9773 (check_display_width, scan_for_column, current_column_1)
9774 (Findent_to, Fcurrent_indentation, position_indentation)
9775 (indented_beyond_p, Fmove_to_column, compute_motion):
9776 (Fcompute_motion, Fvertical_motion):
9777 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9778 (last_known_column_modified): Use EMACS_INT, not int.
9779 (check_display_width):
9781 Check that fixnums and floats are in proper range for system types.
9782 (compute_motion): Don't assume index or fixnum fits in int.
9783 (compute_motion, Fcompute_motion):
9784 Use int, not EMACS_INT, when it is wide enough.
9785 (vmotion): Omit local var start_hpos that is always 0; that way
9786 we don't need to worry about overflow in expressions involving it.
9787 * indent.h: Adjust decls to match defn changes elsewhere.
9789 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9790 Use int, not EMACS_INT, where int is wide enough.
9791 Remove unused members ovstring_chars_done and tab_offset;
9793 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
9794 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
9795 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
9796 (make_gap, copy_text, insert, insert_and_inherit)
9797 (insert_before_markers, insert_before_markers_and_inherit)
9798 (insert_1, count_combining_before, count_combining_after)
9799 (insert_1_both, insert_from_string)
9800 (insert_from_string_before_markers, insert_from_string_1)
9801 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
9802 (adjust_after_replace, adjust_after_insert, replace_range)
9803 (replace_range_2, del_range, del_range_1, del_range_byte)
9804 (del_range_both, del_range_2, modify_region)
9805 (prepare_to_modify_buffer, signal_before_change)
9806 (signal_after_change, Fcombine_after_change_execute):
9807 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9808 * intervals.c (traverse_intervals, rotate_right, rotate_left)
9809 (balance_an_interval, split_interval_right, split_interval_left)
9810 (find_interval, next_interval, update_interval)
9811 (adjust_intervals_for_insertion, delete_node, delete_interval)
9812 (interval_deletion_adjustment, adjust_intervals_for_deletion)
9813 (static_offset_intervals, offset_intervals)
9814 (merge_interval_right, merge_interval_left, make_new_interval)
9815 (graft_intervals_into_buffer, temp_set_point_both)
9816 (temp_set_point, set_point, adjust_for_invis_intang)
9817 (set_point_both, move_if_not_intangible, get_property_and_range)
9818 (get_local_map, copy_intervals, copy_intervals_to_string)
9819 (compare_string_intervals, set_intervals_multibyte_1):
9820 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9821 * intervals.h: Adjust decls to match defn changes elsewhere.
9823 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9824 * keyboard.c (this_command_key_count, this_single_command_key_start)
9825 (before_command_key_count, before_command_echo_length, echo_now)
9826 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
9827 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
9828 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
9829 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
9830 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9831 (last_non_minibuf_size, last_point_position, echo_truncate)
9832 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
9833 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
9834 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
9835 (stuff_buffered_input):
9836 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9837 (last_auto_save, command_loop_1, read_char):
9838 Use EMACS_INT, not int, to avoid integer overflow.
9839 (record_char): Avoid overflow in total_keys computation.
9840 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
9841 * keyboard.h: Adjust decls to match defn changes elsewhere.
9842 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
9843 (Fkey_description, Fdescribe_vector, Flookup_key):
9844 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9845 (click_position): New function, to check that positions are in range.
9846 (Fcurrent_active_maps):
9848 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9849 (Faccessible_keymaps, Fkey_description):
9850 (preferred_sequence_p):
9851 Don't assume fixnum can fit into int.
9852 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
9853 Check for integer overflow in size calculations.
9854 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
9855 avoid mishandling large integers.
9856 * lisp.h: Adjust decls to match defn changes elsewhere.
9857 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
9858 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
9859 (struct Lisp_Marker):
9860 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9861 (clip_to_bounds): Now an inline function, moved here from editfns.c.
9862 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
9863 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
9864 All callers changed.
9865 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
9866 Assume the arg has valid form, since it always does.
9867 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
9868 unsigned integer system type.
9869 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
9870 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
9871 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9872 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
9873 (duration_to_sec_usec): New decl.
9874 * lread.c (read_from_string_index, read_from_string_index_byte)
9875 (read_from_string_limit, readchar, unreadchar, openp)
9876 (read_internal_start, read1, oblookup):
9877 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9878 (Fload, readevalloop, Feval_buffer, Feval_region):
9879 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9880 (openp): Check for out-of-range argument to 'access'.
9881 (read1): Use int, not EMACS_INT, where int is wide enough.
9882 Don't assume fixnum fits into int.
9883 Fix off-by-one error that can read outside a buffer.
9884 (read_filtered_event): Use duration_to_sec_usec
9885 to do proper overflow checking on durations.
9886 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
9887 in size calculation.
9888 (Fexecute_kbd_macro):
9889 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9890 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
9891 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
9892 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
9893 (set_marker_both, set_marker_restricted_both, marker_position)
9894 (marker_byte_position, Fbuffer_has_markers_at):
9895 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9896 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
9897 * menu.c (ensure_menu_items): Rename from grow_menu_items.
9898 It now merely ensures that the menu is large enough, without
9899 necessarily growing it, as this avoids some integer overflow issues.
9900 All callers changed.
9901 (keymap_panes, parse_single_submenu, Fx_popup_menu):
9902 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9903 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
9904 Use SAFE_ALLOCA_LISP, not alloca.
9905 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
9906 to EMACS_INT. Check that fixnums are in proper range for system types.
9907 * minibuf.c (minibuf_prompt_width, string_to_object)
9908 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
9909 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
9910 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9911 (get_minibuffer, read_minibuf_unwind):
9912 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9913 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
9914 this simplifies overflow checking. All callers changed.
9915 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
9917 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9918 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
9919 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
9920 Check that fixnums are in proper range for system types.
9921 (Fx_create_frame, Fx_show_tip):
9922 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9923 * nsfont.m (ns_findfonts, nsfont_list_family):
9924 Don't assume fixnum fits in long.
9925 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
9926 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9927 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
9929 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
9930 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9931 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
9932 (PRINTDECLARE, PRINTPREPARE):
9933 (strout, print_string):
9934 (print, print_preprocess, print_check_string_charset_prop)
9936 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9938 (temp_output_buffer_setup, Fprin1_to_string, print_object):
9939 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9940 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
9941 (printchar, strout): Use xpalloc to catch size calculation overflow.
9942 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
9943 (print_error_message): Use SAFE_ALLOCA, not alloca.
9944 (print_object): Use int, not EMACS_INT, where int is wide enough.
9945 (print_depth, new_backquote_output, print_number_index):
9946 Use ptrdiff_t, not int, where int might not be wide enough.
9947 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
9948 (Fset_process_window_size, Fformat_network_address)
9949 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
9951 Check that fixnums are in proper range for system types.
9952 (Fsignal_process): Simplify by avoiding a goto.
9953 Check for process-ids out of pid_t range rather than relying on
9955 (process_tick, update_tick): Use EMACS_INT, not int.
9956 (Fformat_network_address, read_process_output, send_process)
9957 (Fprocess_send_region, status_notify):
9958 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9959 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
9960 (wait_reading_process_output, read_process_output, exec_sentinel):
9961 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9962 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
9963 (Faccept_process_output): Use duration_to_sec_usec to do proper
9964 overflow checking on durations.
9965 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
9966 Don't assume pid_t fits in int.
9967 * process.h (struct Lisp_Process): Members tick and update_tick
9968 are now of type EMACS_INT, not int.
9969 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
9970 configured --with-wide-int.
9971 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
9972 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
9973 * search.c (looking_at_1, string_match_1):
9974 (fast_string_match, fast_c_string_match_ignore_case)
9975 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
9976 (scan_newline, find_before_next_newline, search_command)
9977 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
9978 (set_search_regs, wordify):
9981 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9982 (string_match_1, search_buffer, set_search_regs):
9984 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9985 (wordify): Check for overflow in size calculation.
9986 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
9987 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
9988 Check that fixnums are in proper range for system types.
9989 * sound.c (struct sound_device)
9990 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
9991 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9992 (Fplay_sound_internal):
9993 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9994 * syntax.c (struct lisp_parse_state, find_start_modiff)
9995 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
9996 (Fparse_partial_sexp):
9997 Don't assume fixnums can fit in int.
9998 (struct lisp_parse_state, find_start_pos, find_start_value)
9999 (find_start_value_byte, find_start_begv)
10000 (update_syntax_table, char_quoted, dec_bytepos)
10001 (find_defun_start, prev_char_comend_first, back_comment):
10002 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
10003 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
10004 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10005 (Finternal_describe_syntax_value): Check that match_lisp is a
10006 character, not an integer, since the code stuffs it into int.
10007 (scan_words, scan_sexps_forward):
10008 Check that fixnums are in proper range for system types.
10010 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10011 (scan_sexps_forward):
10012 Use CHARACTERP, not INTEGERP, since the value must fit into int.
10013 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
10014 * syntax.h: Adjust decls to match defn changes elsewhere.
10015 (struct gl_state_s):
10016 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10017 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
10018 MOST_POSITIVE_FIXNUM.
10019 * sysdep.c (wait_for_termination_1, wait_for_termination)
10020 (interruptible_wait_for_termination, mkdir):
10021 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
10022 (emacs_read, emacs_write):
10023 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10024 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
10025 and double all fit in int.
10026 * term.c (set_tty_color_mode):
10027 Check that fixnums are in proper range for system types.
10028 * termhooks.h (struct input_event):
10029 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10030 * textprop.c (validate_interval_range, interval_of)
10031 (Fadd_text_properties, set_text_properties_1)
10032 (Fremove_text_properties, Fremove_list_of_text_properties)
10033 (Ftext_property_any, Ftext_property_not_all)
10034 (copy_text_properties, text_property_list, extend_property_ranges)
10035 (verify_interval_modification):
10036 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10037 (Fnext_single_char_property_change)
10038 (Fprevious_single_char_property_change):
10039 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10040 (copy_text_properties):
10041 Check for integer overflow in index calculation.
10042 * undo.c (last_boundary_position, record_point, record_insert)
10043 (record_delete, record_marker_adjustment, record_change)
10044 (record_property_change):
10045 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10046 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
10047 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10048 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10049 (Fx_hide_tip, Fx_file_dialog):
10050 * w32menu.c (set_frame_menubar):
10051 Use ptrdiff_t, not int, for consistency with rest of code.
10052 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
10053 (select_window, Fdelete_other_windows_internal)
10054 (window_scroll_pixel_based, window_scroll_line_based)
10055 (Frecenter, Fset_window_configuration):
10056 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10057 (Fset_window_hscroll, run_window_configuration_change_hook)
10058 (set_window_buffer, temp_output_buffer_show, scroll_command)
10059 (Fscroll_other_window, Frecenter):
10060 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10061 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
10062 Don't assume fixnum fits in int.
10063 (Fset_window_scroll_bars):
10064 Check that fixnums are in proper range for system types.
10065 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
10066 (string_pos, c_string_pos, number_of_chars, init_iterator)
10067 (in_ellipses_for_invisible_text_p, init_from_display_pos)
10068 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
10069 (compute_display_string_end, handle_face_prop)
10070 (face_before_or_after_it_pos, handle_invisible_prop)
10071 (handle_display_prop, handle_display_spec, handle_single_display_spec)
10072 (display_prop_intangible_p, string_buffer_position_lim)
10073 (string_buffer_position, handle_composition_prop, load_overlay_strings)
10074 (get_overlay_strings_1, get_overlay_strings)
10075 (iterate_out_of_display_property, forward_to_next_line_start)
10076 (back_to_previous_visible_line_start, reseat, reseat_to_string)
10077 (get_next_display_element, set_iterator_to_next)
10078 (get_visually_first_element, compute_stop_pos_backwards)
10079 (handle_stop_backwards, next_element_from_buffer)
10080 (move_it_in_display_line_to, move_it_in_display_line)
10081 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10082 (add_to_log, message_dolog, message_log_check_duplicate)
10083 (message2, message2_nolog, message3, message3_nolog
10084 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
10085 (current_message_1, truncate_echo_area, truncate_message_1)
10086 (set_message, set_message_1, store_mode_line_noprop)
10087 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
10088 (text_outside_line_unchanged_p, check_point_in_composition)
10089 (reconsider_clip_changes)
10090 (redisplay_internal, set_cursor_from_row, try_scrolling)
10091 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
10092 (redisplay_window, find_last_unchanged_at_beg_row)
10093 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
10094 (trailing_whitespace_p, find_row_edges, display_line)
10095 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
10096 (display_mode_element, store_mode_line_string)
10097 (pint2str, pint2hrstr, decode_mode_spec)
10098 (display_count_lines, display_string, draw_glyphs)
10099 (x_produce_glyphs, x_insert_glyphs)
10100 (rows_from_pos_range, mouse_face_from_buffer_pos)
10101 (fast_find_string_pos, mouse_face_from_string_pos)
10102 (note_mode_line_or_margin_highlight, note_mouse_highlight):
10103 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10104 (safe_call, init_from_display_pos, handle_fontified_prop)
10105 (handle_single_display_spec, load_overlay_strings)
10106 (with_echo_area_buffer, setup_echo_area_for_printing)
10107 (display_echo_area, echo_area_display)
10108 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
10109 (update_tool_bar, hscroll_window_tree, redisplay_internal)
10110 (redisplay_window, dump_glyph_row, display_mode_line)
10111 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
10112 (handle_display_spec, display_prop_string_p):
10113 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10114 (handle_single_display_spec, build_desired_tool_bar_string)
10115 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
10116 (get_specified_cursor_type):
10117 Check that fixnums are in proper range for system types.
10118 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
10119 (Flookup_image_map):
10120 Don't assume fixnums fit in int.
10121 (compare_overlay_entries):
10122 Avoid mishandling comparisons due to subtraction overflow.
10123 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
10124 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
10125 (handle_tool_bar_click):
10126 Use int, not unsigned, since we prefer signed and the signedness
10127 doesn't matter here.
10128 (get_next_display_element, next_element_from_display_vector):
10129 Use int, not EMACS_INT, when int is wide enough.
10130 (start_hourglass): Use duration_to_sec_usec to do proper
10131 overflow checking on durations.
10132 * xfaces.c (Fbitmap_spec_p):
10133 Check that fixnums are in proper range for system types.
10134 (compare_fonts_by_sort_order):
10135 Avoid mishandling comparisons due to subtraction overflow.
10136 (Fx_family_fonts, realize_basic_faces):
10137 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10139 Don't assume fixnum fits in int.
10140 Use SAFE_ALLOCA_LISP, not alloca.
10141 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
10142 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
10143 (face_at_buffer_position, face_for_overlay_string)
10144 (face_at_string_position):
10145 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10146 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
10147 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
10149 Check that fixnums are in proper range for system types.
10150 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
10151 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
10152 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10153 (Fx_change_window_property): Don't assume fixnums fit in int.
10154 * xfont.c (xfont_chars_supported):
10155 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10156 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
10157 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
10158 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10159 * xml.c (parse_region):
10160 * xrdb.c (magic_file_p):
10161 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
10162 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
10163 (x_get_local_selection, x_reply_selection_request)
10164 (x_handle_selection_request, wait_for_property_change):
10165 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10166 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
10167 short is wide enough.
10168 (x_send_client_event): Don't assume fixnum fits in int.
10169 * xterm.c (x_x_to_emacs_modifiers):
10170 Don't assume EMACS_INT overflows nicely into int.
10171 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
10172 may come from Lisp.
10173 (handle_one_xevent): NATNUMP can eval its arg twice.
10174 (x_connection_closed):
10175 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
10176 * xterm.h: Adjust decls to match defn changes elsewhere.
10177 (struct scroll_bar): Use struct vectorlike_header
10178 rather than rolling our own approximation.
10179 (SCROLL_BAR_VEC_SIZE): Remove; not used.
10181 2012-05-25 Glenn Morris <rgm@gnu.org>
10183 * lisp.mk (lisp): Update for more files being compiled now.
10185 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
10187 * lread.c: Remove `read_pure' which makes no difference.
10188 (read_pure): Remove var.
10189 (unreadpure): Remove function.
10190 (readevalloop): Don't call read_list with -1 flag.
10191 (read1, read_vector): Don't test read_pure any more.
10192 (read_list): Simplify.
10194 * fileio.c, character.h: Minor style tweaks.
10196 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
10198 * window.h (clip_changed): Remove useless declaration.
10200 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
10202 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
10203 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
10205 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
10208 This directory predates autoconf and is no longer needed nowadays.
10209 Move its few remaining bits of functionality to where they're needed.
10210 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
10211 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
10212 * m/template.h: Remove.
10213 * Makefile.in (M_FILE): Remove. All uses removed.
10214 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
10215 * lisp.h (USE_LSB_TAG):
10216 * mem-limits.h (EXCEEDS_LISP_PTR):
10217 Use VAL_MAX, not VALBITS, in #if.
10218 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
10219 (EMACS_UINT): Define unconditionally now.
10220 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
10221 (BITS_PER_EMACS_INT): New constants, replacing
10222 what used to be in config.h, but not useful in #if.
10223 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
10224 define them any more.
10225 (VAL_MAX): New macro.
10227 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
10228 BITS_PER_EMACS_INT, in #if.
10229 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
10230 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
10231 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
10232 * s/ms-w32.h (DATA_START):
10233 Move here from removed file m/intel386.h.
10234 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
10235 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
10237 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
10239 Assume C89 or later.
10240 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
10241 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
10243 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
10244 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
10245 * textprop.c, tparam.c (NULL): Remove.
10246 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
10247 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
10248 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
10249 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
10250 * xterm.c (input_signal_count): Assume volatile works.
10252 2012-05-21 Ken Brown <kbrown@cornell.edu>
10254 * xgselect.c (xg_select): Fix first argument in call to 'select'
10257 2012-05-20 Ken Brown <kbrown@cornell.edu>
10259 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
10260 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
10262 2012-05-19 Ken Brown <kbrown@cornell.edu>
10264 * xfns.c (x_in_use): Remove `static' qualifier.
10265 * xterm.h (x_in_use): Declare.
10266 * xgselect.c: Include xterm.h.
10267 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
10268 and `display_arg' (bug#9754).
10270 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
10272 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
10274 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
10275 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
10277 2012-05-18 Eli Zaretskii <eliz@gnu.org>
10279 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
10281 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
10282 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
10284 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
10285 reference to image_cache->refcount.
10286 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
10288 2012-05-17 Juri Linkov <juri@jurta.org>
10290 * search.c (Fword_search_regexp, Fword_search_backward)
10291 (Fword_search_forward, Fword_search_backward_lax)
10292 (Fword_search_forward_lax): Move functions to isearch.el
10293 (bug#10145, bug#11381).
10295 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
10297 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
10299 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
10301 * lread.c (init_obarray): Declare Qt and Qnil as special.
10303 2012-05-14 Glenn Morris <rgm@gnu.org>
10305 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
10306 Put "libexec" before "bin", for the sake of init_callproc_1.
10308 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
10310 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
10312 * unexaix.c: Port to more-recent AIX compilers.
10313 (report_error, report_error_1, make_hdr, copy_sym)
10314 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
10315 Make arguments const char *, not char *, to avoid violations of C
10316 standard and to fix some AIX warnings reported by Gilles Pion.
10318 2012-05-14 Eli Zaretskii <eliz@gnu.org>
10320 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
10321 already have overlays loaded.
10322 (handle_single_display_spec): Before returning without displaying
10323 fringe bitmap, synchronize the bidi iterator with the main display
10324 iterator, by calling iterate_out_of_display_property.
10325 (iterate_out_of_display_property): Detect buffer iteration by
10326 testing that it->string is a Lisp string.
10327 (get_next_display_element): When the current object is exhausted,
10328 and there's something on it->stack, call set_iterator_to_next to
10329 proceed with what's on the stack, instead of returning zero.
10330 (set_iterator_to_next): If called at the end of a Lisp string,
10331 proceed to consider_string_end without incrementing string
10332 position. Don't increment display vector index past the end of
10333 the display vector. (Bug#11417)
10334 (pos_visible_p): Don't report a position visible when move_it_to
10335 stopped at the last line of window, which happens to be scanned
10336 backwards by the bidi iteration. (Bug#11464)
10338 2012-05-14 Eli Zaretskii <eliz@gnu.org>
10340 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
10341 and right-margin display specs even if the spec is invalid or we
10342 are on a TTY, and thus unable to display on the fringes.
10343 That's because the text with the property will not be displayed anyway,
10344 so we need to signal to the caller that this is a "replacing"
10345 display spec. This fixes display when the spec is invalid or we
10348 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
10350 * unexaix.c (make_hdr): Fix typo in prototype.
10351 This bug broke the build on AIX. Problem reported by Gilles Pion.
10353 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
10355 * keyboard.c (kbd_buffer_get_event): Read special events also in
10356 batch mode. (Bug#11415)
10358 2012-05-12 Glenn Morris <rgm@gnu.org>
10360 * ns.mk: Update for ns_appbindir no longer having trailing "/".
10362 2012-05-12 Eli Zaretskii <eliz@gnu.org>
10364 * lisp.mk (lisp): Add newcomment.elc.
10366 2012-05-12 Glenn Morris <rgm@gnu.org>
10368 * Makefile.in (MKDIR_P): New, set by configure.
10369 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
10371 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
10373 Remove unused function hourglass_started.
10374 * dispextern.h (hourglass_started):
10375 * w32fns.c (hourglass_started):
10376 * xdisp.c (hourglass_started): Remove.
10378 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
10380 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
10381 Update dependencies.
10383 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
10385 * xgselect.c (xg_select): Put maxfds+1 into a var.
10386 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
10388 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
10390 2012-05-10 Dave Abrahams <dave@boostpro.com>
10392 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
10393 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
10395 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
10397 * dbusbind.c (xd_registered_buses): New internal Lisp object.
10398 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
10399 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
10400 Initialize xd_registered_buses.
10402 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
10404 Untag more efficiently if USE_LSB_TAG.
10405 This is based on a proposal by YAMAMOTO Mitsuharu in
10406 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
10407 For an admittedly artificial (nth 8000 longlist) benchmark on
10408 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
10409 Emacs's overall text size by 1%.
10410 * lisp.h (XUNTAG): New macro.
10411 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
10412 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
10413 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
10414 * eval.c (Fautoload):
10415 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
10416 * frame.h (XFRAME): Use XUNTAG.
10418 Port recent dbusbind.c changes to 32-bit --with-wide-int.
10419 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
10420 Remove unportable assumptions about print widths of types like
10422 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
10423 intptr_t when converting between pointer and integer, to avoid GCC
10424 warnings about wrong width.
10426 2012-05-09 Eli Zaretskii <eliz@gnu.org>
10428 * w32proc.c (new_child): Force Windows to reserve only 64KB of
10429 stack for each reader_thread, instead of defaulting to 8MB
10430 determined by the linker. This avoids failures in creating
10431 subprocesses on Windows 7, see the discussion in this thread:
10432 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
10434 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
10436 Fix up display of the *Minibuf-0* buffer in the mini window.
10437 * keyboard.c (read_char): Don't clear the echo area if there's no
10439 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
10440 contents of *Minibuf-0*) if there's no message displayed in its stead.
10442 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
10444 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
10447 2012-05-06 Chong Yidong <cyd@gnu.org>
10449 * lisp.mk (lisp): Update.
10451 2012-05-05 Jim Meyering <meyering@redhat.com>
10453 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
10455 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
10457 * data.c (PUT_ERROR): New macro.
10458 (syms_of_data): Use it. Add new error type `user-error'.
10459 * undo.c (user_error): New function.
10460 (Fprimitive_undo): Use it.
10461 * print.c (print_error_message): Adjust print style for `user-error'.
10462 * keyboard.c (user_error): New function.
10463 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
10465 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
10467 Do not limit current-time-string to years 1000..9999.
10468 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
10469 (Fcurrent_time_string): Support any year that is supported by the
10470 underlying localtime representation. Don't use asctime, as it
10471 has undefined behavior for years outside the range -999..9999.
10473 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
10475 Fix race conditions involving setenv, gmtime, localtime, asctime.
10476 Without this fix, interrupts could mess up code that uses these
10477 nonreentrant functions, since setting TZ invalidates existing
10478 tm_zone or tzname values, and since most of these functions return
10479 pointers to static storage.
10480 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
10481 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
10482 Grow the critical sections to include not just invoking
10483 localtime/gmtime, but also accessing these functions' results
10484 including their tm_zone values if any, and any related TZ setting.
10485 (format_time_string): Last arg is now struct tm *, not struct tm **,
10486 so that the struct tm is saved in the critical section.
10487 All callers changed. Simplify allocation of initial buffer, partly
10488 motivated by the fact that memory allocation needs to be outside
10489 the critical section.
10491 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
10493 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
10494 with RESET_INTERVAL.
10496 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
10497 Remove duplicated buffer name initialization.
10499 2012-05-02 Jim Meyering <jim@meyering.net>
10501 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
10503 * xfns.c (x_window): Use xstrdup (Bug#11375).
10505 2012-05-02 Eli Zaretskii <eliz@gnu.org>
10507 * xdisp.c (pos_visible_p): If already at a newline from the
10508 display string before the 'while' loop, don't walk back the glyphs
10509 from it3.glyph_row. Solves assertion violation when the display
10510 string begins with a newline (egg.el). (Bug#11367)
10512 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
10514 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
10517 2012-05-01 Glenn Morris <rgm@gnu.org>
10519 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
10520 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
10521 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
10522 All were removed before 23.1.
10524 * dispnew.c: Remove HAVE_LIBNCURSES test;
10525 it is always true on relevant platforms.
10527 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
10528 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
10530 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
10532 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
10534 * .gdbinit (xpr): Remove checks for no longer existing misc types.
10535 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
10538 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
10540 Do not avoid creating empty evaporating overlays (Bug#9642).
10541 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
10542 That is, do not delete an evaporating overlay if it becomes
10543 empty after its bounds are adjusted to fit within its buffer.
10544 This fix caused other problems, and I'm reverting it until we get
10545 to the bottom of them.
10547 2012-04-27 Chong Yidong <cyd@gnu.org>
10549 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
10551 2012-04-27 Eli Zaretskii <eliz@gnu.org>
10553 * xdisp.c (pos_visible_p): If the window start position is beyond
10554 ZV, start the display from buffer beginning. Prevents assertion
10555 violation in init_iterator when the minibuffer window is scrolled
10556 via the scroll bar.
10558 * window.c (window_scroll_pixel_based): Likewise.
10560 2012-04-27 Chong Yidong <cyd@gnu.org>
10562 * keymap.c (where_is_internal): Doc fix (Bug#10872).
10564 2012-04-27 Glenn Morris <rgm@gnu.org>
10566 * fileio.c (Fcopy_file, Fset_file_selinux_context):
10567 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
10569 2012-04-27 Eli Zaretskii <eliz@gnu.org>
10571 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
10572 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
10574 2012-04-26 Eli Zaretskii <eliz@gnu.org>
10576 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
10577 display element, check also the underlying string or buffer
10578 character. (Bug#11341)
10580 * w32menu.c: Include w32heap.h.
10581 (add_menu_item): If the call to AppendMenuW (via
10582 unicode_append_menu) fails, disable Unicode menus only if we are
10583 running on Windows 9X/Me.
10585 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
10587 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
10588 (xgetint): Add missing shift for LSB tags.
10590 2012-04-24 Martin Rudalics <rudalics@gmx.at>
10592 * keyboard.c (read_char): Don't wipe echo area for select window
10593 events: These might get delayed via `mouse-autoselect-window'
10596 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
10598 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
10599 manipulation of :loaded-from data.
10601 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
10603 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
10604 now a cons (bug#11311).
10606 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
10608 Do not create empty overlays with the evaporate property (Bug#9642).
10609 * buffer.c (Fmove_overlay): Delete an evaporating overlay
10610 if it becomes empty after its bounds are adjusted to fit within
10611 its buffer. Without this fix, in a nonempty buffer (let ((o
10612 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
10613 yields an empty overlay that has the evaporate property, which is
10614 not supposed to happen.
10616 Fix minor GTK3 problems found by static checking.
10617 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
10618 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
10619 (struct _EmacsFixedClass, emacs_fixed_get_type):
10620 Move decls here from emacsgtkfixed.h, since they needn't be public.
10621 (emacs_fixed_get_type): Now static.
10622 (emacs_fixed_class_init): Omit unused local.
10623 (emacs_fixed_child_type): Remove; unused.
10624 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
10625 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
10626 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
10627 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
10628 (EMACS_FIXED_GET_CLASS): Remove; unused.
10629 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
10631 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
10632 Problem reported by Juanma Barranquero for Windows -Wunused-function.
10634 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10636 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
10637 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
10638 (__malloc_size_t, __malloc_ptrdiff_t):
10639 Remove. All uses removed, replaced by the definiens if needed,
10640 since we can assume C89 or better now.
10641 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
10642 (protect_malloc_state, align, get_contiguous_space)
10643 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
10644 (malloc_atfork_handler_child, malloc_enable_thread)
10645 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
10646 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
10647 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
10648 (special_realloc, _realloc_internal_nolock, _realloc_internal)
10649 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
10650 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
10651 Define using prototypes, not old style.
10652 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
10653 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
10654 (align): Don't assume that signed integer overflow wraps around.
10655 Omit unused local var.
10656 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
10657 (_free_internal_nolock, memalign, mallochook, reallochook):
10658 Omit no-longer-needed casts.
10659 (valloc): Use getpagesize, not __getpagesize.
10660 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
10661 (struct hdr): The 'magic' member is now size_t, not unsigned long.
10663 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
10665 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
10667 Move functions from C to Lisp. Make non-blocking method calls
10668 the default. Implement further D-Bus standard interfaces.
10670 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
10671 (QCdbus_request_name_allow_replacement)
10672 (QCdbus_request_name_replace_existing)
10673 (QCdbus_request_name_do_not_queue)
10674 (QCdbus_request_name_reply_primary_owner)
10675 (QCdbus_request_name_reply_in_queue)
10676 (QCdbus_request_name_reply_exists)
10677 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
10678 (QCdbus_registered_serial, QCdbus_registered_method)
10679 (QCdbus_registered_signal): New Lisp objects.
10680 (XD_DEBUG_MESSAGE): Use sizeof.
10681 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
10682 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
10683 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
10684 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
10685 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
10686 (xd_signature, xd_append_arg): Allow float for integer types.
10687 (xd_get_connection_references): New function.
10688 (xd_get_connection_address): Rename from xd_initialize.
10689 Return cached address.
10690 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
10691 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
10693 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
10694 Return number of refcounts.
10695 (Fdbus_get_unique_name): Make stronger parameter check.
10696 (Fdbus_message_internal): New defun.
10697 (Fdbus_call_method, Fdbus_call_method_asynchronously)
10698 (Fdbus_method_return_internal, Fdbus_method_error_internal)
10699 (Fdbus_send_signal, Fdbus_register_service)
10700 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
10701 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
10702 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
10703 (Vdbus_compiled_version, Vdbus_runtime_version)
10704 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
10705 (Vdbus_message_type_method_return, Vdbus_message_type_error)
10706 (Vdbus_message_type_signal): New defvars.
10707 (Vdbus_registered_buses, Vdbus_registered_objects_table):
10710 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10712 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
10713 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
10714 Do not assume ptrdiff_t is the same width as 'int'.
10716 * alloc.c: Handle unusual debugging option combinations.
10717 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
10718 since the two debugging options are incompatible.
10719 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
10721 (mem_init, mem_insert, mem_insert_fixup):
10722 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
10723 (NEED_MEM_INSERT): Remove; no longer needed.
10725 2012-04-22 Leo Liu <sdl.web@gmail.com>
10727 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
10729 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
10731 * sysdep.c [__FreeBSD__]: Minor cleanups.
10732 (list_system_processes, system_process_attributes) [__FreeBSD__]:
10733 Use Emacs indenting style more consistently. Avoid some casts.
10734 Use 'double' consistently rather than mixing 'float' and 'double'.
10736 2012-04-21 Eduard Wiebe <usenet@pusto.de>
10738 * sysdep.c (list_system_processes, system_process_attributes):
10739 Add implementation for FreeBSD (Bug#5243).
10741 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
10743 * lisp.mk (lisp): Update.
10745 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
10747 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
10748 It is never used otherwise.
10750 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
10752 * print.c (print_preprocess): Only check print_depth if print-circle
10754 (print_object): Check for cycles even when print-circle is nil and
10755 print-gensym is t, but only check print_depth if print-circle is nil.
10757 2012-04-20 Chong Yidong <cyd@gnu.org>
10759 * process.c (wait_reading_process_output): If EIO occurs on a pty,
10760 set the status to "failed" and ensure that sentinel is run.
10762 2012-04-20 Glenn Morris <rgm@gnu.org>
10764 * process.c (Fset_process_inherit_coding_system_flag)
10765 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
10766 (Fmake_network_process, Fmake_serial_process): Doc fix.
10768 2012-04-20 Eli Zaretskii <eliz@gnu.org>
10770 * xdisp.c (string_buffer_position_lim): Limit starting position to
10772 (set_cursor_from_row): If called for a mode-line or header-line
10773 row, return zero immediately.
10774 (try_cursor_movement): If inside continuation line, don't back up
10775 farther than the first row after the header line, if any.
10776 Don't consider the header-line row as "partially visible", even if
10777 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
10779 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
10781 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
10784 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
10785 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
10787 configure: new option --enable-gcc-warnings (Bug#11207)
10788 * Makefile.in (C_WARNINGS_SWITCH): Remove.
10789 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
10790 (ALL_CFLAGS): Use new macros rather than old.
10791 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
10792 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
10793 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
10794 -Wunused-result, -Wunused-variable. This should go away once
10795 the Emacs and Gnulib regex code is merged.
10796 (xmalloc, xrealloc): Now static.
10798 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
10800 * dired.c (Fsystem_groups): Remove unused local.
10802 2012-04-17 Glenn Morris <rgm@gnu.org>
10804 * dired.c (Fsystem_users): Doc fix.
10806 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
10808 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
10809 (syms_of_dired): Add them.
10811 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
10813 Fix minor alloc.c problems found by static checking.
10814 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
10815 New extern decls, to avoid calling undeclared functions.
10816 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
10817 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
10818 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
10819 (NEED_MEM_INSERT): New macro.
10820 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
10821 Remove one incorrect comment and fix another.
10823 Fix minor ralloc.c problems found by static checking.
10824 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
10825 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
10826 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
10827 (r_alloc_sbrk): Now static.
10829 Improve ralloc.c interface checking.
10830 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
10831 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
10832 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
10833 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
10834 [REL_ALLOC]: ... to here, to check interface.
10835 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
10836 Remove decls. This fixes an "It stinks!".
10838 * alloc.c (which_symbols): Fix alignment issue / type clash.
10840 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
10842 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
10843 (struct Lisp_Misc_Any): Likewise.
10844 (struct Lisp_Free): Likewise.
10845 * alloc.c (union aligned_Lisp_Symbol): Define.
10846 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
10847 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
10848 (union aligned_Lisp_Misc): Define.
10849 (MARKER_BLOCK_SIZE, struct marker_block): Use union
10850 aligned_Lisp_Misc instead of union Lisp_Misc.
10851 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
10853 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
10855 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
10856 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
10857 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
10858 * s/netbsd.h, s/sol2-6.h:
10859 Remove definition of GC_MARK_STACK, since the default now works.
10860 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
10861 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
10862 no longer the default.
10863 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
10865 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
10867 * lread.c (lisp_file_lexically_bound_p):
10868 Fix hang at ";-*-\n" (bug#11238).
10870 2012-04-14 Eli Zaretskii <eliz@gnu.org>
10872 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
10873 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
10875 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
10877 * nsterm.m (constrainFrameRect): Always constrain when there is only
10878 one screen (Bug#10962).
10880 2012-04-13 Ken Brown <kbrown@cornell.edu>
10882 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
10884 2012-04-13 Reuben Thomas <rrt@sc3d.org>
10886 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
10888 2012-04-11 Daniel Colascione <dancol@dancol.org>
10890 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
10891 against is gone. It's better to use vfork now so that when Cygwin
10892 gains a new, working vfork, we use it automatically (bug#10398).
10894 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
10896 * window.c (save_window_save): Obey window-point-insertion-type.
10898 2012-04-11 Glenn Morris <rgm@gnu.org>
10900 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
10902 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
10904 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
10906 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
10908 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
10909 (force_quit_count): New var.
10910 (handle_interrupt): Use it.
10912 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
10914 * w32.c (w32_delayed_load): Record the full path of the library
10915 being loaded (bug#10424).
10917 2012-04-09 Glenn Morris <rgm@gnu.org>
10919 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
10920 not just in the obarray, before snarfing them. (Bug#11036)
10922 * Makefile.in ($(leimdir)/leim-list.el):
10923 Pass EMACS rather than BUILT_EMACS.
10925 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
10927 * process.c (make_process):
10928 * process.h: Add integer `gnutls_handshakes_tried' member to
10931 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
10932 Add convenience `GNUTLS_LOG2i' macro.
10934 * gnutls.c (gnutls_log_function2i): Convenience log function.
10935 (emacs_gnutls_read): Use new log functions,
10936 `gnutls_handshakes_tried' process member, and
10937 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
10938 attempts per process (connection).
10940 2012-04-09 Chong Yidong <cyd@gnu.org>
10942 * eval.c (Fuser_variable_p, user_variable_p_eh)
10943 (lisp_indirect_variable): Functions deleted.
10944 (Fdefvar): Caller changed.
10946 * callint.c (Finteractive, Fcall_interactively):
10947 * minibuf.c (Fread_variable): Callers changed.
10949 2012-04-09 Eli Zaretskii <eliz@gnu.org>
10951 * xdisp.c (set_cursor_from_row): If the display string appears in
10952 the buffer at position that is closer to point than the position
10953 after the display string, display the cursor on the first glyph of
10954 the display string. Fixes cursor display when a 'display' text
10955 property immediately follows invisible text. (Bug#11094)
10957 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
10959 composite.c: use 'double' consistently
10960 * composite.c (get_composition_id): Use 'double' consistently
10961 instead of converting 'float' to 'double' and vice versa; this is
10962 easier to understand and avoids a GCC warning.
10964 2012-04-09 Glenn Morris <rgm@gnu.org>
10966 * Makefile.in: Generate leim-list with bootstrap-emacs, in
10967 preparation for dumping it with emacs. (Bug#4789)
10968 (leimdir): New variable.
10969 ($(leimdir)/leim-list.el): New rule.
10970 (emacs$(EXEEXT)): Depend on leim-list.el.
10972 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
10973 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
10974 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
10976 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
10978 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
10981 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
10983 * xml.c (init_libxml2_functions) [WINDOWSNT]:
10984 Remove unused local variable.
10986 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
10988 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
10989 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
10990 (mark_memory): Mark Lisp_Objects only if pointers might hide in
10991 objects, as mark_maybe_pointer will catch them otherwise.
10992 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
10993 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
10995 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
10997 Fix typo that broke non-Windows builds.
10998 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
11000 2012-04-07 Eli Zaretskii <eliz@gnu.org>
11002 Support building on MS-Windows with libxml2.
11004 * makefile.w32-in (OBJ2): Add xml.$(O).
11005 (GLOBAL_SOURCES): Add xml.c.
11006 ($(BLD)/xml.$(O)): New dependency list.
11008 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
11009 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
11010 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
11011 [!WINDOWSNT]: New macros.
11012 (init_libxml2_functions, libxml2_loaded_p): New functions.
11013 (parse_region): Call fn_xmlCheckVersion instead of using the macro
11014 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
11015 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
11016 Calls xmlCleanupParser only if libxml2 was loaded (or statically
11018 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
11019 Call init_libxml2_functions before calling libxml2 functions.
11020 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
11022 * emacs.c: Don't include libxml/parser.h.
11023 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
11024 xmlCleanupParser directly.
11026 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
11028 2012-04-07 Eli Zaretskii <eliz@gnu.org>
11030 * indent.c (Fvertical_motion): If there is a display string at
11031 point, use it.vpos to compute how many lines to backtrack after
11032 move_it_to point. (Bug#11133)
11034 2012-04-06 Eli Zaretskii <eliz@gnu.org>
11036 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
11037 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
11038 about subtle differences between FETCH_CHAR* and STRING_CHAR*
11039 macros related to unification of CJK characters. For the details,
11040 see the discussion following the message here:
11041 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
11043 2012-04-04 Chong Yidong <cyd@gnu.org>
11045 * keyboard.c (Vdelayed_warnings_list): Doc fix.
11047 2012-04-01 Eli Zaretskii <eliz@gnu.org>
11049 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
11050 instead of alloca. (Bug#11138)
11052 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
11054 * w32menu.c (is_simple_dialog): Properly check lisp types.
11057 2012-03-31 Eli Zaretskii <eliz@gnu.org>
11059 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
11060 position we get to after a call to move_it_to fails the
11061 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
11062 only if we wind up in a string from display property. (Bug#11063)
11064 * window.c (Fdelete_other_windows_internal): Invalidate the row
11065 and column information about mouse highlight, so that redisplay
11066 restores it after reallocating the glyph matrices. (Bug#7464)
11068 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
11069 string comes from a `display' text property, use the buffer
11070 position of that property as if we actually saw that position in
11072 (move_it_by_lines): Remove the assertion that
11073 "it->current_x == 0 && it->hpos == 0" which can be legitimately
11074 violated when there's a before-string at the beginning of a line.
11077 2012-03-30 Eli Zaretskii <eliz@gnu.org>
11079 * xdisp.c (append_space_for_newline): If the default face was
11080 remapped, use the remapped face for the appended newline.
11081 (extend_face_to_end_of_line): Use the remapped default face for
11082 extending the face to the end of the line.
11083 (display_line): Call extend_face_to_end_of_line when the default
11084 face was remapped. (Bug#11068)
11086 2012-03-29 Eli Zaretskii <eliz@gnu.org>
11088 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
11090 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
11092 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
11094 2012-03-27 Glenn Morris <rgm@gnu.org>
11096 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
11099 2012-03-26 Kenichi Handa <handa@m17n.org>
11101 * dispextern.h (struct glyph): Fix previous change. Change the
11102 bit length of glyphless.ch to 25 (Bug#11082).
11104 2012-03-26 Chong Yidong <cyd@gnu.org>
11106 * keyboard.c (Vselection_inhibit_update_commands): New variable.
11107 (command_loop_1): Use it; inhibit selection update for
11108 handle-select-window too (Bug#8996).
11110 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
11112 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
11114 2012-03-25 Kenichi Handa <handa@m17n.org>
11116 * dispextern.h (struct glyph): Change the bit length of
11117 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
11119 2012-03-24 Eli Zaretskii <eliz@gnu.org>
11121 * s/ms-w32.h (tzname): Include time.h before redirecting to
11122 _tzname. Fixes the MSVC build. (Bug#9960)
11124 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
11126 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
11129 * xterm.c (XTread_socket): Only modify handling_signal if
11130 !SYNC_INPUT. (Bug#11080)
11132 2012-03-23 Eli Zaretskii <eliz@gnu.org>
11134 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
11135 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
11136 when fetching a multibyte character consumes more bytes than
11137 CHAR_BYTES returns, due to unification of CJK characters in
11138 string_char. (Bug#11073)
11140 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
11142 * process.c (wait_reading_process_output): Handle pty disconnect
11143 by refraining from sending oneself a SIGCHLD (bug#10933).
11145 2012-03-22 Chong Yidong <cyd@gnu.org>
11147 * dispextern.h (struct it): New member string_from_prefix_prop_p.
11149 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
11150 Mark string as coming from a prefix property.
11151 (handle_face_prop): Use default face for prefix strings (Bug#4281).
11152 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
11154 2012-03-21 Chong Yidong <cyd@gnu.org>
11156 * xfaces.c (Vface_remapping_alist): Doc fix.
11158 2012-03-20 Eli Zaretskii <eliz@gnu.org>
11160 * w32proc.c (Fw32_set_console_codepage)
11161 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
11164 2012-03-20 Chong Yidong <cyd@gnu.org>
11166 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
11167 to reflect default non-nil value of redisplay-dont-pause.
11169 2012-03-19 Kenichi Handa <handa@m17n.org>
11171 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
11172 it fit in a valid range (Bug#11003).
11174 2012-03-18 Eli Zaretskii <eliz@gnu.org>
11176 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
11177 that is not from display property, accept the row as a "cursor
11178 row" if one of the string's character has a non-nil `cursor'
11179 property. Fixes cursor positioning when there are newlines in
11180 overlay strings, e.g. in icomplete.el. (Bug#11035)
11182 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
11184 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
11186 2012-03-12 Chong Yidong <cyd@gnu.org>
11188 * eval.c (inhibit_lisp_code): Rename from
11189 inhibit_window_configuration_change_hook; move from window.c.
11191 * xfns.c (unwind_create_frame_1, Fx_create_frame):
11192 * window.c (run_window_configuration_change_hook)
11193 (syms_of_window): Callers changed.
11195 2012-03-11 Chong Yidong <cyd@gnu.org>
11197 * keymap.c (Fkey_description): Doc fix (Bug#9700).
11199 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
11201 2012-03-10 Chong Yidong <cyd@gnu.org>
11203 * frame.c (other_visible_frames): Don't assume the selected frame
11204 is visible (Bug#10955).
11206 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
11208 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
11210 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
11212 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
11213 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
11216 2012-03-03 Glenn Morris <rgm@gnu.org>
11218 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
11220 2012-03-02 Eli Zaretskii <eliz@gnu.org>
11222 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
11223 position past the first glyph_row that ends at ZV. (Bug#10902)
11224 (redisplay_window, next_element_from_string): Fix typos in
11226 (redisplay_window): Pass to move_it_vertically the margin in
11227 pixels, not in screen lines.
11229 2012-03-02 Glenn Morris <rgm@gnu.org>
11231 * buffer.c (buffer-list-update-hook): Doc fix.
11233 2012-02-29 Eli Zaretskii <eliz@gnu.org>
11235 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
11236 push_it before setting up the iterator for the first overlay
11237 string, even if we have an empty string loaded.
11238 (next_overlay_string): If there's an empty string on the iterator
11239 stack, pop the stack. (Bug#10903)
11241 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
11243 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
11244 Suggested by Stefan Monnier in
11245 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
11246 * alloc.c (widen_to_Lisp_Object): New static function.
11247 (mark_memory): Also mark Lisp_Objects by fetching pointer words
11248 and widening them to Lisp_Objects. This would work even if
11249 USE_LSB_TAG is defined and wide integers are used, which might
11250 happen in a future version of Emacs.
11252 2012-02-25 Chong Yidong <cyd@gnu.org>
11254 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
11257 * xselect.c (Fx_selection_exists_p): Doc fix.
11258 (x_clipboard_manager_save_all): Print an informative message
11259 before saving to clipboard manager.
11261 2012-02-24 Chong Yidong <cyd@gnu.org>
11263 * keyboard.c (process_special_events): Handle all X selection
11264 requests in kbd_buffer, not just the next one (Bug#8869).
11266 2012-02-23 Chong Yidong <cyd@gnu.org>
11268 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
11269 call when setting menu-bar-lines and tool-bar-lines parameters.
11270 (unwind_create_frame_1): New helper function.
11272 * window.c (inhibit_window_configuration_change_hook): New var.
11273 (run_window_configuration_change_hook): Obey it.
11274 (syms_of_window): Initialize it.
11276 2012-02-22 Chong Yidong <cyd@gnu.org>
11278 * xterm.c (x_draw_image_relief): Add missing type check for
11279 Vtool_bar_button_margin (Bug#10743).
11281 2012-02-21 Chong Yidong <cyd@gnu.org>
11283 * fileio.c (Vfile_name_handler_alist): Doc fix.
11285 * buffer.c (Fget_file_buffer): Protect against invalid file
11286 handler return value.
11288 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
11290 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
11291 when computing $valmask.
11293 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
11294 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
11295 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
11296 It's useless in that case, and it can cause problems on hosts
11297 that allocate halves of EMACS_INT values separately.
11298 Reported by Dan Horák. Diagnosed by Andreas Schwab in
11299 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
11300 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
11301 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
11302 it avoids undefined behavior on hosts where shifting right by more
11303 than the word width has undefined behavior.
11305 2012-02-19 Chong Yidong <cyd@gnu.org>
11307 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
11308 (Funhandled_file_name_directory, Ffile_name_as_directory)
11309 (Fdirectory_file_name, Fexpand_file_name)
11310 (Fsubstitute_in_file_name): Protect against invalid file handler
11311 return values (Bug#10845).
11313 2012-02-18 Eli Zaretskii <eliz@gnu.org>
11315 * .gdbinit (pitx): Fix incorrect references to fields of the
11318 2012-02-17 Chong Yidong <cyd@gnu.org>
11320 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
11322 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
11324 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
11325 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
11327 2012-02-15 Chong Yidong <cyd@gnu.org>
11329 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
11330 marked as special. Also, starting docstrings with * is obsolete.
11332 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
11334 * gnutls.c (emacs_gnutls_write): Fix last change.
11336 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
11338 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
11341 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
11343 * keymap.c (Fsingle_key_description): Handle char ranges.
11345 2012-02-12 Chong Yidong <cyd@gnu.org>
11347 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
11348 as that creates a dangerous corner case.
11350 * window.c (Fdelete_window_internal): Invalidate the mouse
11351 highlight (Bug#9904).
11353 2012-02-12 Glenn Morris <rgm@gnu.org>
11355 * xselect.c (Fx_own_selection_internal)
11356 (Fx_get_selection_internal, Fx_disown_selection_internal)
11357 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
11358 * nsselect.m (Fx_own_selection_internal)
11359 (Fx_disown_selection_internal, Fx_selection_exists_p)
11360 (Fx_selection_owner_p, Fx_get_selection_internal):
11361 Sync docs and argument specs with the xselect.c versions.
11363 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
11365 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
11367 2012-02-11 Eli Zaretskii <eliz@gnu.org>
11369 * w32select.c (Fx_selection_exists_p): Sync doc string and
11370 argument list with xselect.c. (Bug#10783)
11372 * w16select.c (Fx_selection_exists_p): Sync doc string and
11373 argument list with xselect.c. (Bug#10783)
11375 2012-02-10 Glenn Morris <rgm@gnu.org>
11377 * fns.c (Fsecure_hash): Doc fix.
11379 2012-02-09 Kenichi Handa <handa@m17n.org>
11381 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
11383 2012-02-07 Chong Yidong <cyd@gnu.org>
11385 * buffer.c (Fbuffer_local_variables)
11386 (buffer_lisp_local_variables): Handle unbound vars correctly;
11387 don't let Qunbound leak into Lisp.
11389 2012-02-07 Glenn Morris <rgm@gnu.org>
11391 * image.c (Fimagemagick_types): Doc fix.
11393 * image.c (imagemagick-render-type): Change it from a lisp object
11394 to an integer. Move the doc here from the lisp manual.
11395 Treat all values not equal to 0 the same.
11397 2012-02-06 Chong Yidong <cyd@gnu.org>
11399 * doc.c (store_function_docstring): Avoid applying docstring of
11400 alias to base function (Bug#2603).
11402 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
11404 * .gdbinit (pp1, pv1): Remove redundant defines.
11407 2012-02-04 Chong Yidong <cyd@gnu.org>
11409 * nsterm.m: Declare a global (Bug#10694).
11411 2012-02-04 Eli Zaretskii <eliz@gnu.org>
11413 * w32.c (get_emacs_configuration_options):
11414 Include --enable-checking, if specified, in the return value.
11416 2012-02-04 Martin Rudalics <rudalics@gmx.at>
11418 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
11419 after rounding frame sizes. (Bug#9723)
11421 2012-02-04 Eli Zaretskii <eliz@gnu.org>
11423 * keyboard.c (adjust_point_for_property): Don't position point
11424 before BEGV. (Bug#10696)
11426 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
11428 Handle overflow when computing char display width (Bug#9496).
11429 * character.c (char_width): Return EMACS_INT, not int.
11430 (char_width, c_string_width): Check for overflow when
11431 computing the width; this is possible now that individual
11432 characters can have unbounded width. Problem introduced
11433 by merge from Emacs 23 on 2012-01-19.
11435 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
11437 * dbusbind.c (Fdbus_register_method): Mention the return value
11438 :ignore in the docstring.
11440 2012-02-02 Glenn Morris <rgm@gnu.org>
11442 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
11444 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11445 Unconditionally set to t. (Bug#10673)
11446 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11447 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
11448 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
11450 2012-02-02 Kenichi Handa <handa@m17n.org>
11452 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
11453 0, do not call append_composite_glyph.
11455 2012-02-02 Kenichi Handa <handa@m17n.org>
11457 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
11459 (x_produce_glyphs): If the component of a composition is a null
11460 string, set it->pixel_width to 1 to avoid zero-width glyph.
11462 2012-02-01 Eli Zaretskii <eliz@gnu.org>
11464 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
11465 first 2 arguments are identical. This makes inserting large
11466 output from a subprocess an order of magnitude faster on
11467 MS-Windows, where all sbrk'ed memory is always contiguous.
11469 2012-01-31 Glenn Morris <rgm@gnu.org>
11471 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
11472 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
11473 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
11475 2012-01-29 Glenn Morris <rgm@gnu.org>
11477 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
11479 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
11481 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
11483 2012-01-28 Chong Yidong <cyd@gnu.org>
11485 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
11487 2012-01-26 Chong Yidong <cyd@gnu.org>
11489 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
11491 * search.c (Fsearch_forward, Fsearch_backward): Document negative
11492 repeat counts (Bug#10507).
11494 2012-01-26 Glenn Morris <rgm@gnu.org>
11496 * lread.c (syms_of_lread): Doc fix.
11498 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
11500 * coding.c (encode_designation_at_bol): Change return value to
11503 2012-01-25 Chong Yidong <cyd@gnu.org>
11505 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
11507 2012-01-21 Chong Yidong <cyd@gnu.org>
11509 * floatfns.c (Fcopysign): Make the second argument non-optional,
11510 since nil is not allowed anyway.
11512 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
11514 * process.c (read_process_output): Use p instead of XPROCESS (proc).
11515 (send_process): Likewise.
11517 2012-01-19 Martin Rudalics <rudalics@gmx.at>
11519 * window.c (save_window_save, Fcurrent_window_configuration)
11520 (Vwindow_persistent_parameters): Do not use Qstate.
11521 Rewrite doc-strings.
11523 2012-01-19 Kenichi Handa <handa@m17n.org>
11525 * character.c (char_width): New function.
11526 (Fchar_width, c_string_width, lisp_string_width):
11527 Use char_width (Bug#9496).
11529 2012-01-16 Martin Rudalics <rudalics@gmx.at>
11531 * window.c (Vwindow_persistent_parameters): New variable.
11532 (Fset_window_configuration, save_window_save): Handle persistent
11535 2012-01-14 Eli Zaretskii <eliz@gnu.org>
11537 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
11538 thrashing the stack of the thread. (Bug#9087)
11540 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
11542 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
11544 2012-01-11 Eli Zaretskii <eliz@gnu.org>
11546 * xdisp.c (rows_from_pos_range): Handle the case where the
11547 highlight ends on a newline. (Bug#10464)
11548 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
11549 he end column for display of highlight that ends on a newline
11552 2012-01-11 Glenn Morris <rgm@gnu.org>
11554 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
11555 from load-path also when installation-directory is nil. (Bug#10208)
11557 2012-01-10 Glenn Morris <rgm@gnu.org>
11559 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
11561 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
11562 Update template values to be closer to their typical values these days.
11564 2012-01-09 Eli Zaretskii <eliz@gnu.org>
11566 * xdisp.c (rows_from_pos_range): Accept additional argument
11567 DISP_STRING, and accept any glyph in a row whose object is that
11568 string as eligible for mouse highlight. Fixes mouse highlight of
11569 display strings from overlays. (Bug#10464)
11571 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
11573 emacs: fix an auto-save permissions race condition (Bug#10400)
11574 * fileio.c (auto_saving_dir_umask): New static var.
11575 (Fmake_directory_internal): Use it.
11576 (do_auto_save_make_dir): Set it, instead of invoking chmod after
11577 creating the directory. The old code temporarily assigns
11578 too-generous permissions to the directory.
11579 (do_auto_save_eh): Clear it.
11580 (Fdo_auto_save): Catch all errors, not just file errors, so
11581 that the var is always cleared.
11583 2012-01-07 Eli Zaretskii <eliz@gnu.org>
11585 * search.c (scan_buffer): Pass character positions to
11586 know_region_cache, not byte positions. (Bug#6540)
11588 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
11590 * w32.c (sys_rename): Report EXDEV when rename of a directory
11591 fails because the target is on another logical disk. (Bug#10284)
11593 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
11595 * xterm.c (x_embed_request_focus): New function.
11597 * xterm.h: Add prototype.
11599 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
11601 2012-01-05 Glenn Morris <rgm@gnu.org>
11603 * emacs.c (emacs_copyright): Update short copyright year to 2012.
11605 2012-01-01 Eli Zaretskii <eliz@gnu.org>
11607 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
11608 Load gnutls_transport_set_lowat only if GnuTLS version is below
11610 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
11611 GnuTLS versions below 2.11.1.
11613 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
11615 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
11616 to the doc string advising against its use for altering the way
11617 windows are scrolled.
11619 2011-12-28 Kenichi Handa <handa@m17n.org>
11621 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
11622 coding-system ASCII compatible only when it does not produce BOM
11623 on encoding (Bug#10383).
11625 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
11627 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
11629 (create_and_show_popup_menu): Always use menu_position_func for
11632 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
11634 * callint.c (Fcall_interactively): Don't truncate prompt string.
11636 2011-12-23 Eli Zaretskii <eliz@gnu.org>
11638 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
11639 property that ends at ZV, so that the bidi iteration could be
11640 resumed from there (after widening). (Bug#10360)
11642 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
11644 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
11646 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
11648 * nsterm.m (x_free_frame_resources):
11649 Release f->output_data.ns->miniimage.
11650 (ns_index_color): Fix indentation. Do not retain
11651 color_table->colors[i].
11653 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
11656 * nsfns.m (x_set_background_color): Assign return value from
11657 ns_index_color to face-background instead of NSColor*.
11658 (ns_implicitly_set_icon_type): Fix indentation.
11659 Change assignment in for loop to comparison.
11661 * emacs.c (ns_pool): New variable.
11662 (main): Assign ns_pool.
11663 (Fkill_emacs): Call ns_release_autorelease_pool.
11665 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
11666 autorelease fdesc, release fdAttrs and tdict.
11667 (ns_get_covering_families): Release charset.
11668 (ns_findfonts): Release NSFontDescriptor created with new.
11669 (ns_uni_to_glyphs): Fix indentation.
11670 (setString): Release attrStr before assigning new value.
11672 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
11674 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
11676 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
11677 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
11679 2011-12-18 David Reitter <reitter@cmu.edu>
11681 * nsterm.m (ns_term_init): Subscribe for notifications
11682 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
11683 to method trackingNotification in EmacsMenu.
11685 * nsmenu.m (trackingMenu): New variable.
11686 (trackingNotification): New method (from Aquamacs).
11687 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
11688 from Aquamacs (Bug#7030).
11690 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
11692 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
11693 (symbol_to_nsstring): Fix indentation.
11694 (ns_symbol_to_pb): New function.
11695 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
11696 (Fns_rotate_cut_buffers_internal): Remove.
11697 (Fns_store_selection_internal): Rename from
11698 Fns_store_cut_buffer_internal.
11699 (ns_get_foreign_selection, Fx_own_selection_internal)
11700 (Fx_disown_selection_internal, Fx_selection_exists_p)
11701 (Fns_get_selection_internal, Fns_store_selection_internal):
11702 Use ns_symbol_to_pb and check if return value is nil.
11703 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
11704 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
11705 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
11706 renamed to Sns_store_selection_internal.
11707 (ns_handle_selection_request): Move code to Fx_own_selection_internal
11708 and remove this function.
11709 (ns_handle_selection_clear): Remove, never used.
11710 (Fx_own_selection_internal): Move code from ns_handle_selection_request
11713 2011-12-17 Ken Brown <kbrown@cornell.edu>
11715 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
11716 GID is unknown (Bug#10257).
11718 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
11720 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
11721 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
11722 which caused a build failure on GNU/Linux IA-64. This problem was
11723 introduced by my 2011-10-07 patch.
11725 2011-12-15 Juri Linkov <juri@jurta.org>
11727 * image.c (imagemagick_error): New function. (Bug#10112)
11728 (imagemagick_load_image): Comment out `MagickSetResolution' call.
11729 Use `imagemagick_error' where ImageMagick functions return
11731 (Fimagemagick_types): Add `Fnreverse' to return the list in the
11734 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11736 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
11737 fill background (Bug#8992).
11739 2011-12-13 Martin Rudalics <rudalics@gmx.at>
11741 * window.c (Vwindow_combination_resize)
11742 (Vwindow_combination_limit): Use t instead of non-nil in
11744 (Vrecenter_redisplay): Add first sentence of doc-string on
11746 (Frecenter): Fix doc-string typo.
11748 2011-12-11 Kenichi Handa <handa@m17n.org>
11750 * coding.c (Funencodable_char_position): Pay attention to the
11751 buffer text relocation (Bug#9389).
11753 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
11755 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
11756 gtk_init (Bug#10100).
11758 2011-12-10 Eli Zaretskii <eliz@gnu.org>
11760 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
11761 IT->string is nil. (Bug#10263)
11763 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
11765 * nsterm.h (x_free_frame_resources): Declare.
11767 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
11768 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
11770 * nsterm.h (ns_get_defaults_value): Declare.
11772 * nsterm.m (ns_default): Call ns_get_defaults_value.
11774 2011-12-09 Eli Zaretskii <eliz@gnu.org>
11776 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
11779 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11781 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
11782 that where the value of an _OBJC_* symbol points to is in the .bss
11783 section (Bug#10240).
11785 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
11787 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
11788 after the loop to call ccl_driver at least once (Bug#8619).
11790 2011-12-08 Kenichi Handa <handa@m17n.org>
11792 * ftfont.c (get_adstyle_property): Fix previous change
11795 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
11797 * w32.c (init_environment): If no_site_lisp, remove site-lisp
11798 dirs from the default value of EMACSLOADPATH (bug#10208).
11800 2011-12-07 Glenn Morris <rgm@gnu.org>
11802 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
11803 installation and source directories as well. (Bug#10208)
11805 2011-12-06 Chong Yidong <cyd@gnu.org>
11807 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
11809 2011-12-06 Glenn Morris <rgm@gnu.org>
11811 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
11812 as an error, not just -1. (Bug#10217)
11814 2011-12-05 Chong Yidong <cyd@gnu.org>
11816 * keyboard.c (process_special_events): New function.
11817 (swallow_events, Finput_pending_p): Use it (Bug#10195).
11819 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
11821 * coding.c (encode_designation_at_bol): Don't use uninitialized
11822 local variable (Bug#9318).
11824 2011-12-05 Kenichi Handa <handa@m17n.org>
11826 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
11827 return Qnil (Bug#8046, Bug#10193).
11829 2011-12-05 Kenichi Handa <handa@m17n.org>
11831 * coding.c (encode_designation_at_bol): New args charbuf_end and
11832 dst. Return the number of produced bytes. Callers changed.
11833 (coding_set_source): Return how many bytes coding->source was
11835 (coding_set_destination): Return how many bytes
11836 coding->destination was relocated.
11837 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
11838 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
11840 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
11842 * coding.c (CODING_CHAR_CHARSET_P): New macro.
11843 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
11846 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
11848 The following changes are to fix Bug#9318.
11850 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
11851 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
11852 (encode_coding_iso_2022, encode_coding_sjis)
11853 (encode_coding_big5, encode_coding_charset): Use the above macros.
11855 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
11857 * lisp.h (process_quit_flag): Fix external declaration.
11859 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
11861 Don't macro-inline non-performance-critical code.
11862 * eval.c (process_quit_flag): New function.
11863 * lisp.h (QUIT): Use it.
11865 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
11867 * nsfns.m (get_geometry_from_preferences): New function.
11868 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
11870 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
11872 * emacs.c (Qkill_emacs): Define.
11873 (syms_of_emacs): Initialize it.
11874 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
11875 Qquit_flag to `kill-emacs' instead.
11876 (quit_throw_to_read_char): Add parameter `from_signal'.
11877 All callers changed. Call Fkill_emacs if requested and safe.
11878 * lisp.h (QUIT): Call Fkill_emacs if requested.
11880 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
11882 * widget.c (update_wm_hints): Return if wmshell is null.
11883 (widget_update_wm_size_hints): New function.
11885 * widget.h (widget_update_wm_size_hints): Declare.
11887 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
11888 widget_update_wm_size_hints (Bug#10104).
11890 2011-12-03 Eli Zaretskii <eliz@gnu.org>
11892 * xdisp.c (handle_invisible_prop): If the invisible text ends just
11893 before a newline, prepare the bidi iterator for consuming the
11894 newline, and keep the current paragraph direction. (Bug#10183)
11895 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
11897 2011-12-02 Juri Linkov <juri@jurta.org>
11899 * search.c (Fword_search_regexp): New Lisp function created from
11900 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
11901 (Fword_search_backward, Fword_search_forward)
11902 (Fword_search_backward_lax, Fword_search_forward_lax):
11903 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
11904 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
11906 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
11908 * fileio.c (Finsert_file_contents): Move after-change-function call
11909 to before the "handled:" label, since all "goto handled" appear in
11910 cases where the *-change-functions have already been properly called
11913 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
11915 * keyboard.c (interrupt_signal): Don't call kill-emacs when
11916 waiting for input. (Bug#10169)
11918 2011-11-30 Eli Zaretskii <eliz@gnu.org>
11920 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
11921 verifies glyph row's hash code--we have just reallocated the
11922 glyphs, so their contents can be complete garbage. (Bug#10164)
11924 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
11926 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
11928 2011-11-30 Eli Zaretskii <eliz@gnu.org>
11930 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
11931 attributes are tested _before_ calling verify_row_hash, to protect
11932 against GCC re-ordering of the tests. (Bug#10164)
11934 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
11936 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
11938 * xterm.c (handle_one_xevent): Only set async_visible and friends
11939 if net_wm_state_hidden_seen is non-zero (Bug#10002)
11940 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
11941 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
11943 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
11945 Remove GCPRO-related macros that exist only to avoid shadowing locals.
11946 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
11947 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
11948 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
11949 All uses changed to use GCPRO1 etc.
11950 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
11951 Revert to old implementation (i.e., before 2011-03-11).
11953 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11955 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
11956 of scroll runs so as to avoid assigning disabled bogus rows and
11957 unnecessary graphics copy operations.
11959 2011-11-27 Eli Zaretskii <eliz@gnu.org>
11961 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
11962 (snprintf) [_MSC_VER]: Redirect to _snprintf.
11963 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
11964 (malloc, free, realloc, calloc): Redirect to e_* only when
11967 * lisp.h (GCTYPEBITS): Move before first use.
11968 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
11969 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
11970 this macro definition.
11972 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
11975 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
11977 * gtkutil.c (xg_create_frame_widgets):
11978 Call gtk_window_set_has_resize_grip (FALSE) if that function is
11979 present with Gtk+ 2.0.
11981 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
11983 * fileio.c (Finsert_file_contents): Undo previous change; see
11984 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
11986 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
11988 Rename locals to avoid shadowing.
11989 * fileio.c (Finsert_file_contents):
11990 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
11991 * process.c (wait_reading_process_output):
11992 Rename inner 'proc' to 'p' to avoid shadowing.
11993 Indent for consistency with usual Emacs style.
11995 2011-11-25 Eli Zaretskii <eliz@gnu.org>
11997 * xdisp.c (redisplay_window): If cursor row is not fully visible
11998 after recentering, and scroll-conservatively is set to a large
11999 number, scroll window by a few more lines to make the cursor fully
12000 visible and out of scroll-margin. (Bug#10105)
12001 (start_display): Don't move to the next line if the display should
12002 start at a newline that is part of a display vector or an overlay
12003 string. (Bug#10119)
12005 2011-11-24 Juri Linkov <juri@jurta.org>
12007 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
12008 after the `MagickPingImage' call. (Bug#10112)
12010 2011-11-23 Chong Yidong <cyd@gnu.org>
12012 * window.c (Fcoordinates_in_window_p): Accept only live windows.
12014 2011-11-23 Martin Rudalics <rudalics@gmx.at>
12016 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
12017 making another buffer current. (Bug#10114)
12019 2011-11-23 Glenn Morris <rgm@gnu.org>
12021 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
12023 2011-11-23 Chong Yidong <cyd@gnu.org>
12025 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
12026 using it (Bug#5984).
12028 2011-11-22 Eli Zaretskii <eliz@gnu.org>
12030 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
12031 and header-lines, as they don't have one computed for them.
12034 * .gdbinit (prow): Make displayed values more self-explaining.
12035 Add row's hash code.
12037 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
12039 * process.c (wait_reading_process_output): Fix asynchrounous
12040 GnuTLS socket handling on some versions of the GnuTLS library.
12041 (wait_reading_process_output): Add comment and URL.
12043 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
12045 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
12047 2011-11-21 Chong Yidong <cyd@gnu.org>
12049 * window.c (Fnext_window, Fprevious_window): Doc fix.
12051 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12053 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
12055 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
12057 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
12059 2011-11-20 Martin Rudalics <rudalics@gmx.at>
12061 * window.c (Fset_window_combination_limit): Rename argument
12063 (Vwindow_combination_limit): Remove "status" from doc-string.
12065 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
12067 * m/ibms390.h: Remove.
12068 * m/ibms390x.h: Don't include "ibms390.h".
12070 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
12072 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
12073 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
12075 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
12077 * casetab.c (Fset_case_table):
12078 * charset.c (Fcharset_after): Fix typos.
12080 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
12082 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
12083 Otherwise, valgrind does not work on some platforms.
12084 Problem reported by Andreas Schwab in
12085 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
12086 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
12087 is set, removing the need for VIRT_ADDRESS_VARIES.
12088 (PURE_P): Use a more-efficient implementation that needs just one
12089 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
12090 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
12091 to 4 (xorl, subq, cmpq, setbe).
12092 * alloc.c (pure): Always extern now, since that's the
12093 VIRT_ADDR_VARIES behavior.
12094 (PURE_POINTER_P): Use a single comparison, not two, for
12095 consistency with the new puresize.h.
12096 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
12097 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
12098 Remove VIRT_ADDR_VARIES no longer needed.
12100 2011-11-19 Eli Zaretskii <eliz@gnu.org>
12102 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
12103 (erase_phys_cursor, update_window_cursor, show_mouse_face)
12104 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
12105 behave as if the cursor position were at the window margin.
12107 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
12108 and the cursor position is out of bounds, behave as if the cursor
12109 position were at the window margin. (Bug#10075)
12111 2011-11-18 Chong Yidong <cyd@gnu.org>
12113 * window.c (Fwindow_combination_limit): Make first argument
12114 non-optional, since it is meaningless for live windows like the
12117 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
12119 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
12121 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
12123 * intervals.c: Fix grafting over the whole buffer (bug#10071).
12124 (graft_intervals_into_buffer): Simplify.
12126 2011-11-18 Eli Zaretskii <eliz@gnu.org>
12128 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
12129 hash values of the two rows.
12130 (copy_row_except_pointers): Preserve the used[] arrays and the
12131 hash values of the two rows. (Bug#10035)
12132 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
12134 * xdisp.c (row_hash): New function, body extracted from
12135 compute_line_metrics.
12136 (compute_line_metrics): Call row_hash, instead of computing the
12139 * dispnew.c (verify_row_hash): Call row_hash for computing the
12140 hash code of a row, instead of duplicating code from xdisp.c.
12142 * dispextern.h (row_hash): Add prototype.
12144 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
12146 * frame.c (delete_frame): Don't delete the terminal when the last
12147 X frame is closed if emacs is built with GTK toolkit.
12149 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
12151 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
12153 2011-11-17 Martin Rudalics <rudalics@gmx.at>
12155 * window.c (Vwindow_splits): Rename to
12156 Vwindow_combination_resize. Suggested by Juri Linkov.
12157 (Fsplit_window_internal): Use Vwindow_combination_resize instead
12160 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
12162 * nsfns.m (Fns_font_name):
12163 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
12165 2011-11-16 Martin Rudalics <rudalics@gmx.at>
12167 * window.h (window): Rename slot "nest" to "combination_limit".
12168 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
12169 (Fset_window_nest): Rename to Fset_window_combination_limit.
12170 (Vwindow_nest): Rename to Vwindow_combination_limit.
12171 (recombine_windows, make_parent_window, make_window)
12172 (Fsplit_window_internal, saved_window)
12173 (Fset_window_configuration, save_window_save): Rename all
12174 occurrences of window_nest to window_combination_limit.
12176 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
12178 * image.c (imagemagick_load_image): Fix typo.
12180 2011-11-14 Eli Zaretskii <eliz@gnu.org>
12182 * xdisp.c (display_line): Move the call to
12183 highlight_trailing_whitespace before the call to
12184 compute_line_metrics, since the latter needs to see the final
12185 faces of all the glyphs to compute ROW's hash value.
12186 Fixes assertion violations in row_equal_p. (Bug#10035)
12188 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
12190 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
12191 just return (bug#10044).
12193 2011-11-12 Eli Zaretskii <eliz@gnu.org>
12195 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
12196 with user-defined heap size. Bump the default size of the temacs
12197 heap to 27MB, to avoid memory warning when running temacs.
12198 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
12200 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
12201 current_matrix and desired_matrix. (Bug#9990)
12202 (verify_row_hash) [XASSERTS]: New function.
12203 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
12204 that the hash value of glyph rows is correct.
12206 2011-11-12 Martin Rudalics <rudalics@gmx.at>
12208 * window.h (window): Remove splits slot.
12209 * window.c (Fwindow_splits, Fset_window_splits): Remove.
12210 (Fdelete_other_windows_internal, make_parent_window)
12211 (make_window, Fsplit_window_internal, Fdelete_window_internal)
12212 (Fset_window_configuration, save_window_save): Don't deal with
12213 split status of windows.
12214 (saved_window): Remove splits slot.
12215 (Vwindow_splits): Rewrite doc-string.
12217 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
12219 * xfns.c (unwind_create_frame):
12220 * nsfns.m (unwind_create_frame):
12221 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
12222 Vframe_list (Bug#9999).
12224 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
12226 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
12228 2011-11-11 Kenichi Handa <handa@m17n.org>
12230 * callproc.c (Fcall_process): Set the member dst_multibyte of
12233 2011-11-11 Johan Bockgård <bojohan@gnu.org>
12235 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
12236 avoid a crash (bug#9496).
12238 2011-11-09 Chong Yidong <cyd@gnu.org>
12240 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
12241 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
12243 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12245 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
12247 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
12249 Avoid some portability problems by eschewing 'extern inline' functions.
12250 The trivial performance wins aren't worth the portability hassles; see
12251 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
12253 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12254 (window_box_width, window_box_left, window_box_left_offset)
12255 (window_box_right, window_box_right_offset): Undo previous change,
12256 by removing the "extern"s.
12257 * intervals.c (adjust_intervals_for_insertion)
12258 (adjust_intervals_for_deletion): Undo previous change,
12259 making these static again.
12260 (offset_intervals, temp_set_point_both, temp_set_point)
12261 (copy_intervals_to_string): No longer inline.
12262 * xdisp.c (window_text_bottom_y, window_box_width)
12263 (window_box_height, window_box_left_offset)
12264 (window_box_right_offset, window_box_left, window_box_right)
12265 (window_box): No longer inline.
12267 2011-11-08 Chong Yidong <cyd@gnu.org>
12269 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
12270 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
12271 Signal an error if not a live window.
12272 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
12273 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
12275 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
12277 * lisp.h (syms_of_abbrev): Remove declaration.
12278 Reported by CHENG Gao <chenggao@royau.me>.
12280 2011-11-07 Eli Zaretskii <eliz@gnu.org>
12282 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
12283 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
12284 of temacs in GUI mode.
12286 2011-11-07 Martin Rudalics <rudalics@gmx.at>
12288 * window.h: Declare delete_all_child_windows instead of
12289 delete_all_subwindows.
12290 * window.c (Fwindow_nest, Fset_window_nest)
12291 (Fset_window_new_total, Fset_window_new_normal)
12292 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
12293 (delete_all_subwindows): Rename to delete_all_child_windows.
12294 (Fdelete_other_windows_internal, Fset_window_configuration):
12295 Call delete_all_child_windows instead of delete_all_subwindows.
12296 * frame.c (delete_frame): Call delete_all_child_windows instead
12297 of delete_all_subwindows.
12299 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
12301 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
12302 This is also needed for porting to any host where GC_MARK_STACK is
12303 not GC_MAKE_GCPROS_NOOPS.
12304 (which_symbols): Use it.
12306 2011-11-07 Kenichi Handa <handa@m17n.org>
12308 * coding.c (coding_set_destination): Check coding->src_pos only
12309 when coding->src_object is a buffer (bug#9910).
12311 * process.c (send_process): Set the member src_multibyte of coding
12312 to 0 (bug#9911) when sending a unibyte text.
12314 * callproc.c (Fcall_process): Set the member src_multibyte of
12315 process_coding to 0 (bug#9912).
12317 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12319 * xmenu.c (cleanup_widget_value_tree): New function.
12320 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
12321 calling free_menubar_widget_value_tree directly (Bug#9830).
12323 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
12325 Fix some portability problems with 'inline'.
12326 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12327 (window_box_width, window_box_left, window_box_left_offset)
12328 (window_box_right, window_box_right_offset): Declare extern.
12329 Otherwise, these inline functions do not conform to C99 and
12330 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
12331 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
12332 * intervals.c (adjust_intervals_for_insertion)
12333 (adjust_intervals_for_deletion): Now extern, because otherwise the
12334 extern inline functions 'offset_intervals' couldn't refer to it.
12335 (static_offset_intervals): Remove.
12336 (offset_intervals): Rewrite using the old contents of
12337 static_offset_intervals. The old version didn't conform to C99
12338 because an extern inline function contained a reference to an
12339 identifier with static linkage.
12341 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
12343 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
12346 2011-11-06 Eli Zaretskii <eliz@gnu.org>
12348 * xdisp.c (init_iterator, reseat_to_string): Don't set the
12349 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
12350 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
12351 return Qleft_to_right.
12353 2011-11-06 Chong Yidong <cyd@gnu.org>
12355 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
12356 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
12357 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
12358 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
12359 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
12360 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
12361 (Fwindow_vscroll): Doc fix.
12362 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
12363 argument, since it makes no sense to pass a live window and for
12364 consistency with window-child.
12366 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
12368 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
12371 2011-11-05 Jason Rumney <jasonr@gnu.org>
12373 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
12374 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
12376 (add_font_entity_to_list): Fix logic errors in mixed boolean and
12377 bitwise arithmetic preventing use of unicode-sip and non-truetype
12380 2011-11-05 Eli Zaretskii <eliz@gnu.org>
12382 * s/ms-w32.h (fstat, stat, utime): Move redirections to
12385 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
12386 initialization code to keep similarity to xfns.c after changes
12389 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
12391 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
12392 (unwind_create_frame): New function (Bug#9943).
12393 (Fx_create_frame): Restructure code to be more similar to the one in
12394 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
12395 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
12396 Move terminal->reference_count++ just before making the frame official
12399 * nsterm.m (x_free_frame_resources): New function.
12400 (x_destroy_window): Move code to x_free_frame_resources.
12402 * xfns.c (unwind_create_frame): Fix comment.
12403 (Fx_create_frame, x_create_tip_frame):
12404 Move terminal->reference_count++ just before making the frame
12405 official. Move initialization of image_cache_refcount and
12406 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
12408 2011-11-05 Eli Zaretskii <eliz@gnu.org>
12410 Support MSVC build with newer versions of Visual Studio.
12411 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
12412 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
12415 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
12416 which are not supported by MSVC.
12417 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
12418 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
12420 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
12421 types in bitfields.
12422 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
12424 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
12426 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
12428 Support MSVC build with newer versions of Visual Studio.
12429 * w32.c: Don't include w32api.h for MSVC.
12430 (init_environment) [_MSC_VER]: Call sys_access, not _access.
12432 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
12433 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
12434 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
12435 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
12437 (alloca) [_MSC_VER]: Define to _alloca.
12439 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
12441 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
12443 2011-11-04 Eli Zaretskii <eliz@gnu.org>
12445 * xdisp.c (note_mouse_highlight): If either of
12446 previous/next-single-property-change returns nil, treat that as
12447 the beginning or the end of the buffer. (Bug#9955)
12449 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
12451 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
12452 label is not null (Bug#9951).
12453 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
12456 2011-11-04 Eli Zaretskii <eliz@gnu.org>
12458 * window.c (Fwindow_body_size): Mention in the doc string that the
12459 return value is in frame's canonical units. (Bug#9949)
12461 2011-11-03 Eli Zaretskii <eliz@gnu.org>
12463 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
12465 * w32fns.c (unwind_create_frame): If needed, free the glyph
12466 matrices of the partially constructed frame. (Bug#9943)
12467 * xfns.c (unwind_create_frame): Likewise.
12469 2011-11-01 Eli Zaretskii <eliz@gnu.org>
12471 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
12472 Don't stop backward scan on the continuation glyph, even though
12473 its CHARPOS is positive.
12474 (mouse_face_from_buffer_pos, note_mouse_highlight):
12475 Rename cover_string to disp_string.
12477 2011-11-01 Martin Rudalics <rudalics@gmx.at>
12479 * window.c (temp_output_buffer_show): Don't use
12480 Vtemp_buffer_show_specifiers.
12481 (Vtemp_buffer_show_specifiers): Remove unused variable.
12483 2011-10-30 Eli Zaretskii <eliz@gnu.org>
12485 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
12486 past the beginning of the current glyph matrix.
12488 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
12490 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
12491 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
12492 HAVE_GTK3 (Bug#9869).
12494 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
12495 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
12497 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
12499 * xterm.c: Declare x_handle_net_wm_state to return int.
12500 (handle_one_xevent): Check if we are iconified but don't have
12501 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
12502 (get_current_wm_state): Return non-zero if not hidden,
12503 check for _NET_WM_STATE_HIDDEN (Bug#9893).
12504 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
12505 (x_handle_net_wm_state): Return what get_current_wm_state returns.
12506 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
12508 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
12510 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
12511 so that this new function doesn't get optimized away by a
12512 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
12514 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
12516 * frame.h (MOUSE_HL_INFO): Remove excess parens.
12518 2011-10-29 Eli Zaretskii <eliz@gnu.org>
12520 Fix the `xbytecode' command.
12521 * .gdbinit (xprintbytestr): New command.
12522 (xwhichsymbols): Rename from `which'; all callers changed.
12523 (xbytecode): Print the byte-code string as well.
12525 2011-10-29 Kim Storm <storm@cua.dk>
12527 * alloc.c (which_symbols): New function.
12529 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
12531 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
12534 2011-10-29 Glenn Morris <rgm@gnu.org>
12536 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
12537 Not clear what it was for, and it causes various bugs. (Bug#9839)
12539 2011-10-28 Eli Zaretskii <eliz@gnu.org>
12541 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
12542 possible random value that matches one of those tested as
12543 condition to clear the mouse face.
12545 2011-10-28 Chong Yidong <cyd@gnu.org>
12547 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
12549 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
12551 * window.c (make_window): Initialize phys_cursor_on_p.
12553 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
12555 * lisp.h (struct Lisp_Symbol): Update comments.
12557 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
12559 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
12561 2011-10-28 Eli Zaretskii <eliz@gnu.org>
12563 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
12564 <oslsachem@gmail.com> for helping to debug this.
12566 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
12567 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
12568 (g_b_init_get_glyph_outline_w): New static variables.
12569 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
12570 (GetGlyphOutlineW_Proc): New typedefs.
12571 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
12572 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
12574 (w32font_open_internal, compute_metrics):
12575 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
12576 instead of calling the "wide" APIs directly.
12578 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
12580 * w32.h (syms_of_w32font): Add prototype.
12582 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
12584 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
12585 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
12586 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
12587 (Fmove_to_window_line): Doc fix.
12589 2011-10-27 Chong Yidong <cyd@gnu.org>
12591 * process.c (make_process): Set gnutls_state to NULL.
12593 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
12594 non-NULL, regardless of GNUTLS_INITSTAGE.
12595 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
12596 an error. Set process slots as soon as we allocate them.
12598 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
12600 2011-10-27 Chong Yidong <cyd@gnu.org>
12602 * gnutls.c (emacs_gnutls_deinit): New function.
12603 Deallocate credentials structures as well as calling gnutls_deinit.
12604 (Fgnutls_deinit, Fgnutls_boot): Use it.
12606 * process.c (make_process): Initialize GnuTLS credentials to NULL.
12607 (deactivate_process): Call emacs_gnutls_deinit.
12609 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
12611 * image.c (x_create_x_image_and_pixmap):
12612 * w32.c (sys_rename, w32_delayed_load):
12613 * w32font.c (fill_in_logfont):
12614 * w32reg.c (x_get_string_resource): Silence compiler warnings.
12616 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
12618 * w32fns.c (w32_default_color_map): New function,
12619 extracted from Fw32_default_color_map.
12620 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
12622 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
12624 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
12626 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
12628 * keyboard.c (test_undefined): New function (bug#9751).
12629 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
12631 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
12633 * sysdep.c (init_sys_modes): Fix the check for the controlling
12634 terminal (Bug#6649).
12636 2011-10-20 Eli Zaretskii <eliz@gnu.org>
12638 * dispextern.h (struct bidi_it): New member next_en_type.
12640 * bidi.c (bidi_line_init): Initialize the next_en_type member.
12641 (bidi_resolve_explicit_1): When next_en_pos is valid for the
12642 current character, check also for next_en_type being WEAK_EN.
12643 (bidi_resolve_weak): Don't enter the expensive loop if the current
12644 position is before next_en_pos. Record the bidi type of the first
12645 non-ET, non-BN character we find, in addition to its position.
12646 (bidi_level_of_next_char): Invalidate next_en_type when
12647 next_en_pos is over-stepped.
12649 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
12651 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
12652 * editfns.c: Rewrite current-time-zone so that it invokes
12653 the equivalent of (format-time-string "%Z") to get the time zone name.
12654 This fixes a bug when the time zone name contains characters that
12655 need converting from the system time locale to Emacs internal format.
12656 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
12657 that patch fixed format-time-string to do the conversion, but
12658 I forgot to fix current-time-zone.
12659 (format_time_string): New function, containing most of
12660 what Fformat_time_string used to contain.
12661 (Fformat_time_string): Rewrite in terms of format_time_string.
12662 This doesn't change this function's behavior.
12663 (current-time-zone): Rewrite to use format_time_string.
12664 This fixes the bug reported by Michael Schierl in
12665 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
12666 Jason Rumney's 2007-06-07 change worked around this bug, but
12668 * systime.h (tzname, timezone): Remove no-longer-used declarations.
12670 2011-10-19 Eli Zaretskii <eliz@gnu.org>
12672 * xdisp.c (start_display): If the character at POS is displayed
12673 via a display vector, reset IT->current.dpvec_index to zero.
12674 (try_window_reusing_current_matrix): If a line ends in a display
12675 vector or the next line starts in a display vector, continue
12676 redrawing the window even though the character position of
12677 start_row was reached.
12680 2011-10-18 Chong Yidong <cyd@gnu.org>
12682 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
12683 with nobreak-char-display too.
12685 2011-10-18 Eli Zaretskii <eliz@gnu.org>
12687 Fix part 3 of bug#9771.
12688 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
12689 (bidi_resolve_neutral): Don't enter the expensive loop looking for
12690 non-neutral characters if the current character is a paragraph
12691 separator (a.k.a. Newline). This avoids running the same
12692 expensive loop twice, once when we consume the preceding newline
12693 and the other time when the line actually needs to be displayed.
12694 Avoid the loop when we see neutrals on the base embedding level
12695 following a character whose directionality is the same as the
12696 paragraph's. This avoids running the expensive loop when a line
12697 ends in a long sequence of neutrals, like control characters.
12698 Add assertion against STRONG_AL type. Slightly rearrange code
12699 that determines the type of a neutral given the first non-neutral
12701 (bidi_level_of_next_char): Set next_en_pos to zero when
12702 invalidating its info.
12704 2011-10-17 Eli Zaretskii <eliz@gnu.org>
12706 * xdisp.c (push_display_prop): Determine whether to record string
12707 or buffer position by IT->string, not by IT->method. Allow
12708 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
12709 (move_it_vertically_backward): Don't look for character position
12710 immediately after the newline when in a continuation line.
12713 2011-10-15 Martin Rudalics <rudalics@gmx.at>
12715 * window.c (coordinates_in_window): Rewrite and delabelize
12716 vertical border check. (Bug#5357) (Bug#9618)
12718 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
12720 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
12721 errors in XSetWindowBorder (bug#9310).
12723 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
12725 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
12726 avoid crash when xmalloc overrun checking is enabled.
12728 2011-10-13 Eli Zaretskii <eliz@gnu.org>
12730 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
12731 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
12732 cursor motion with <left> and <right> arrow keys.
12734 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
12735 some callers set that themselves.
12737 2011-10-12 Eli Zaretskii <eliz@gnu.org>
12739 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
12740 display string and the previous row comes from the same string and
12741 is empty. (Bug#9739) (Bug#9738)
12743 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
12745 * doc.c (get_doc_string): Encode file name (bug#9735).
12747 2011-10-12 Eli Zaretskii <eliz@gnu.org>
12749 * bidi.c (bidi_level_of_next_char):
12750 * xdisp.c (get_visually_first_element): Remove old incorrect
12751 comments regarding the Unicode Line Separator character.
12753 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
12755 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
12757 * alloc.c (Fgc_status): Do not access beyond zombies array
12758 boundary if nzombies > MAX_ZOMBIES.
12759 * alloc.c (dump_zombies): Add missing format specifier.
12761 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
12763 * xdisp.c (set_cursor_from_row): Simplify conditionals,
12764 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
12766 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
12767 Some packages use them to denote characters with modifiers.
12769 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
12771 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
12772 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
12773 matching a pp-number. Rename parameter var to var1.
12775 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
12777 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
12779 2011-10-08 Glenn Morris <rgm@gnu.org>
12781 * callint.c (Fcall_interactively): Give a more explicit error for the
12782 'c' case with a non-character input. (Bug#8479)
12784 2011-10-08 Eli Zaretskii <eliz@gnu.org>
12786 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
12788 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
12789 lines that are hscrolled on the left.
12791 * dispnew.c (buffer_posn_from_coords): Account for a possible
12792 presence of header-line. (Bug#4426)
12794 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
12796 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
12797 Don't advertise functionality which we discourage or doesn't work.
12799 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
12801 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
12802 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
12803 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
12804 this makes Emacs dump core during garbage collection on rare
12805 occasions. sizeof is obviously inferior to offsetof here, so
12806 stick with offsetof.
12807 (GC_POINTER_ALIGNMENT): New macro.
12808 (mark_memory): Omit 3rd (offset) arg; caller changed.
12809 Don't assume EMACS_INT alignment is the same as pointer alignment.
12811 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
12813 * keyboard.c (read_key_sequence_remapped): New var.
12814 (read_key_sequence): Compute remapping in the right buffer.
12815 (command_loop_1): Use read_key_sequence's remapping directly.
12817 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
12819 * dired.c (file_name_completion): Don't expand file name.
12820 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
12821 before checking file name handler.
12823 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
12824 they've been requested explicitly (bug#9591).
12826 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
12828 * keymap.c (Fsingle_key_description): Use make_specified_string
12829 instead of build_string to build string from push_key_description.
12832 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
12834 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
12835 This fixes a Y2038 bug on 64-bit hosts.
12836 * buffer.c (reset_buffer):
12837 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
12838 (Fclear_buffer_auto_save_failure):
12839 Use 0, not -1, to represent an unset failure time, since time_t
12840 might not be signed.
12842 Remove dependency on glibc malloc internals.
12843 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
12844 Move back here from lisp.h, but with their new implementations.
12845 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
12846 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
12847 * charset.c (charset_table_init): New static var.
12848 (syms_of_charset): Use it instead of xmalloc. This removes a
12849 dependency on glibc malloc internals. See Eli Zaretskii's comment in
12850 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
12851 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
12852 Move back to alloc.c.
12853 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
12854 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
12856 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
12858 * nsterm.m (windowDidResize): Call x_set_window_size only when
12859 ns_in_resize is true. Otherwise set pixelwidth/height and
12860 call change_frame_size (Bug#9628).
12862 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
12864 Port --enable-checking=all to Fedora 14 x86-64.
12865 * charset.c (syms_of_charset): Also account for glibc malloc's
12866 internal overhead when calculating the initial malloc maximum.
12868 Port --enable-checking=all to Fedora 14 x86.
12869 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
12871 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
12872 (overrun_check_realloc, overrun_check_free):
12873 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
12874 That way, xmalloc returns a properly-aligned pointer even if
12875 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
12876 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
12877 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
12878 into account when calculating the initial malloc maximum.
12879 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
12880 Move here from alloc.c, so that charset.c can use it too.
12881 Properly align; the old code wasn't right for common 32-bit hosts
12882 when configured with --enable-checking=all.
12883 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
12884 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
12886 2011-09-29 Eli Zaretskii <eliz@gnu.org>
12888 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
12891 2011-09-28 Eli Zaretskii <eliz@gnu.org>
12893 * xdisp.c (compute_display_string_end): If there's no display
12894 string at CHARPOS, return -1.
12896 * bidi.c (bidi_fetch_char): When compute_display_string_end
12897 returns a negative value, treat the character as a normal
12898 character not covered by a display string. (Bug#9624)
12900 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
12902 * lread.c (Fread_from_string): Fix typo in docstring.
12904 2011-09-27 Eli Zaretskii <eliz@gnu.org>
12906 * xdisp.c (handle_invisible_prop): If invisible text ends on a
12907 newline, reseat the iterator instead of bidi-iterating there one
12908 character at a time. (Bug#9610)
12909 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
12910 TO_CHARPOS if the bidi iterator is at base embedding level.
12912 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
12914 * lread.c (readevalloop): Use correct code for NBSP.
12915 (read1): Likewise. (Bug#9608)
12917 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
12919 * dbusbind.c (Fdbus_register_signal): When service is not
12920 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
12922 2011-09-25 Glenn Morris <rgm@gnu.org>
12924 * buffer.c (truncate-lines): Doc fix.
12926 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
12928 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
12929 (Fset_window_next_buffers): Doc fix.
12931 2011-09-24 Glenn Morris <rgm@gnu.org>
12933 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
12935 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
12937 Fix minor problems found by static checking.
12938 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
12939 * indent.c (Fvertical_motion): Fix == vs = typo.
12941 2011-09-24 Eli Zaretskii <eliz@gnu.org>
12943 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
12944 Default value is now t. Doc fix.
12946 * indent.c (Fvertical_motion): Compute and apply the overshoot
12947 logic when moving up, not only when moving down. Fix the
12948 confusing name and values of the it_overshoot_expected variable;
12949 logic changes accordingly. (Bug#9254) (Bug#9549)
12951 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
12952 CHARPOS is covered by a display string which includes newlines.
12953 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
12954 is covered by a display string with embedded newlines.
12956 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
12958 * dbusbind.c (Fdbus_register_signal): Add match rule to
12959 Vdbus_registered_objects_table. (Bug#9581)
12960 (Fdbus_register_method, Vdbus_registered_objects_table):
12963 2011-09-24 Jim Meyering <meyering@redhat.com>
12965 do not ignore write error for any output size
12966 The previous change was incomplete.
12967 While it makes emacs --batch detect the vast majority of stdout
12968 write failures, errors were still ignored whenever the output size is
12969 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
12970 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
12971 && echo FAIL: ignored write error
12972 FAIL: ignored write error
12973 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
12974 && echo FAIL: ignored write error
12975 FAIL: ignored write error
12976 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
12978 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
12980 * emacs.c (Fkill_emacs): In noninteractive mode exit
12981 non-successfully if a write error occurred on stdout. (Bug#9574)
12983 2011-09-21 Eli Zaretskii <eliz@gnu.org>
12985 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
12988 * dispextern.h (struct it): Update the comment documenting what
12991 2011-09-20 Eli Zaretskii <eliz@gnu.org>
12993 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
12994 a display string, extend search for cursor position to end of row.
12995 (find_row_edges): If the row ends in a newline from a display
12996 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
12997 Handle the case of a display string with multiple newlines.
12998 (Fcurrent_bidi_paragraph_direction): Fix search for previous
12999 non-empty line. Fixes confusing cursor motion with arrow keys at
13000 the beginning of a line that starts with whitespace.
13002 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13004 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
13007 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
13009 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
13010 boolean (Bug#9154).
13012 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13014 * xdisp.c (display_line): Record maximum and minimum buffer
13015 positions even if no glyphs were produced (e.g., by a zero-width
13016 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
13017 buffer positions that will be removed from the glyph row because
13019 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
13020 column is beyond frame width: don't subtract 1 "pixel" when
13021 computing width of the stretch.
13022 (reseat_at_next_visible_line_start): Undo the change made on
13023 2011-09-17 that saved paragraph information and restored it after
13024 the call to `reseat'. (Bug#9545)
13026 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13028 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
13029 and turn window cursor on if cleared (Bug#9415).
13031 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
13033 * search.c (boyer_moore): Take unibyte characters from pattern
13034 literally. (Bug#9458)
13036 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13038 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
13040 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
13042 Fix minor problem found by static checking.
13043 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
13044 initialized, to pacify gcc -Wuninitialized.
13046 * fileio.c: Report proper errno when syscall falls.
13047 (Finsert_file_contents): Save and restore errno,
13048 so that report_file_error outputs the correct diagnostic.
13049 (Fwrite_region) [CLASH_DETECTION]: Likewise.
13051 2011-09-18 Eli Zaretskii <eliz@gnu.org>
13053 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
13055 2011-09-17 Eli Zaretskii <eliz@gnu.org>
13057 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
13058 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
13060 2011-09-17 Eli Zaretskii <eliz@gnu.org>
13062 * xdisp.c (reseat_at_next_visible_line_start): Keep information
13063 about the current paragraph and restore it after the call to reseat.
13065 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
13066 (bidi_find_paragraph_start): Search back for paragraph beginning
13067 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
13068 (bidi_move_to_visually_next): Only trigger paragraph-related
13069 computations when the last character is a newline or at EOB, not
13070 just any NEUTRAL_B. (Bug#9470)
13072 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
13073 truncated lines if point is covered by a display string. (Bug#9524)
13075 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
13077 * xselect.c: Relax test for outgoing X longs (Bug#9498).
13078 (cons_to_x_long): New function.
13079 (lisp_data_to_selection_data): Use it. Correct the test for
13080 short-versus-long data; it was negated. Break out of vector
13081 loop, for efficiency, when a long datum is discovered.
13083 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
13085 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
13087 2011-09-16 Eli Zaretskii <eliz@gnu.org>
13089 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
13090 GCC PR/17406) by declaring this function with external scope.
13092 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13094 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
13095 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
13097 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
13099 * editfns.c (Fformat): Correctly handle text properties on "%%".
13101 2011-09-15 Eli Zaretskii <eliz@gnu.org>
13103 * xterm.c (x_draw_composite_glyph_string_foreground):
13104 * w32term.c (x_draw_composite_glyph_string_foreground):
13105 * term.c (encode_terminal_code):
13106 * composite.c (composition_update_it, get_composition_id):
13107 * xdisp.c (get_next_display_element)
13108 (fill_composite_glyph_string): Add comments about special meaning
13109 of TAB characters in a composition.
13111 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
13113 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
13114 This occurs when processing a multibyte format.
13115 Problem reported by Wolfgang Jenker.
13117 2011-09-15 Johan Bockgård <bojohan@gnu.org>
13119 * xdisp.c (try_cursor_movement): Only check for exact match if
13120 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
13122 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13124 Remove unused external symbols.
13125 * dispextern.h (calc_pixel_width_or_height): Remove decl.
13126 * xdisp.c (calc_pixel_width_or_height): Now static.
13127 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
13128 * indent.c (check_display_width):
13129 * w32term.c: Fix comment to match code.
13130 * xterm.c, xterm.h (x_catching_errors): Remove.
13132 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
13134 * xselect.c: Use signed conversions more consistently (Bug#9498).
13135 (selection_data_to_lisp_data): Assume incoming selection data are
13136 signed integers, not unsigned. This is to be consistent with
13137 outgoing selection data, which was modified to use signed integers
13138 in as part of the fix to Bug#9196 in response to Jan D.'s comment
13139 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
13140 expects long, not unsigned long.
13142 2011-09-14 Eli Zaretskii <eliz@gnu.org>
13144 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
13145 computation of loop end. Reported by Johan Bockgård
13148 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
13150 * frame.c (Fother_visible_frames_p): Function deleted.
13152 2011-09-12 Eli Zaretskii <eliz@gnu.org>
13154 * indent.c (compute_motion): Process display vector front to back
13155 rather than the other way around. (Bug#2496)
13157 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
13159 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
13161 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
13163 * minibuf.c (Fread_from_minibuffer): Doc fix.
13165 2011-09-11 Eli Zaretskii <eliz@gnu.org>
13167 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
13168 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
13170 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13172 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
13173 value for non-existent files.
13175 2011-09-11 Eli Zaretskii <eliz@gnu.org>
13177 * fileio.c (Finsert_file_contents): If the file cannot be opened,
13178 set its "size" to -1. This will set the modtime_size field of
13179 the corresponding buffer to -1, which is what
13180 verify-visited-file-modtime expects for files that do not exist.
13183 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
13185 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
13187 * lisp.h: ... from here. push_key_description is no longer
13188 defined in keyboard.c, so its declaration should not be in
13189 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
13190 logically belongs with push_key_description.
13192 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
13194 * buffer.h: Include <sys/types.h> instead of <time.h>.
13195 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
13196 Problem reported by Herbert J. Skuhra.
13198 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
13200 * xml.c (parse_region): Make the parsing work for
13201 non-comment-starting XML files again (bug#9144).
13203 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
13205 * image.c (gif_load): Fix calculation of bottom and right corner.
13208 2011-09-10 Eli Zaretskii <eliz@gnu.org>
13210 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
13211 redisplay in small windows.
13213 2011-09-09 Eli Zaretskii <eliz@gnu.org>
13215 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
13217 2011-09-08 Martin Rudalics <rudalics@gmx.at>
13219 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
13220 Operate on live windows only.
13222 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
13224 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
13226 2011-09-07 Eli Zaretskii <eliz@gnu.org>
13228 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
13229 only under bidi iteration.
13231 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
13233 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
13235 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13237 isnan: Fix porting problem to Solaris 10 with bundled gcc.
13238 Without this fix, the command to link temacs failed due to an
13239 undefined symbol __builtin_isnan. This is because
13240 /usr/include/iso/math_c99.h #defines isnan(x) to
13241 __builtin_isnan(x), but the bundled gcc, which identifies itself
13242 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
13244 * floatfns.c (isnan): #undef, and then #define to a clone of
13246 (Fisnan): Always define, since it's always available now.
13247 (syms_of_floatfns): Always define isnan at the Lisp level.
13249 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13251 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
13253 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
13255 * fileio.c: Fix bugs with large file offsets (Bug#9428).
13256 The previous code assumed that file offsets (off_t values) fit in
13257 EMACS_INT variables, which is not true on typical 32-bit hosts.
13258 The code messed up by falsely reporting buffer overflow in cases
13259 such as (insert-file-contents "big" nil 1 2) into an empty buffer
13260 when "big" contains more than 2**29 bytes, even though this
13261 inserts just one byte and does not overflow the buffer.
13262 (Finsert_file_contents): Store file offsets as off_t
13263 values, not as EMACS_INT values. Check for overflow when
13264 converting between EMACS_INT and off_t. When checking for
13265 buffer overflow or for overlap, take the offsets into account.
13266 Don't use EMACS_INT for small values where int suffices.
13267 When checking for overlap, fix a typo: ZV was used where
13268 ZV_BYTE was intended.
13269 (Fwrite_region): Don't assume off_t fits into 'long'.
13270 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
13272 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
13274 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
13276 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
13278 sprintf-related integer and memory overflow issues (Bug#9412).
13280 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
13281 (esprintf, exprintf, evxprintf): New functions.
13282 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
13283 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
13284 (modify_event_symbol): Do not assume that the length of
13285 name_alist_or_stem is safe to alloca and fits in int.
13286 (Fexecute_extended_command): Likewise for function name and binding.
13287 (Frecursion_depth): Wrap around reliably on integer overflow.
13288 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
13289 since some callers pass EMACS_INT values.
13290 (Fsingle_key_description): Don't crash if symbol name contains more
13291 than MAX_ALLOCA bytes.
13292 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
13293 (get_minibuffer): Arg is now EMACS_INT, not int.
13294 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
13295 (esprintf, exprintf, evxprintf): New decls.
13296 * window.h (command_loop_level, minibuf_level): Reflect API changes.
13298 * dbusbind.c (signature_cat): New function.
13299 (xd_signature, Fdbus_register_signal):
13300 Do not overrun buffer; instead, report string overflow.
13302 * dispnew.c (add_window_display_history): Don't overrun buffer.
13303 Truncate instead; this is OK since it's just a log.
13305 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
13306 even if the time zone offset is outlandishly large.
13307 Don't mishandle offset == INT_MIN.
13309 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
13310 when creating daemon; the previous buffer-overflow check was incorrect.
13312 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
13313 which has the guts of the old verror function.
13315 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
13316 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
13318 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
13319 (font_unparse_xlfd): Don't blindly alloca long strings.
13320 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
13321 fits in int, when using sprintf. Use single snprintf to count
13322 length of string rather than counting it via multiple sprintfs;
13323 that's simpler and more reliable.
13324 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
13325 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
13326 sprintf, in case result does not fit in int.
13328 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
13329 (fontset_from_font): Print it.
13331 * frame.c (tty_frame_count): Now printmax_t, not int.
13332 (make_terminal_frame, set_term_frame_name): Print it.
13333 (x_report_frame_params): In X, window IDs are unsigned long,
13334 not signed long, so print them as unsigned.
13335 (validate_x_resource_name): Check for implausibly long names,
13336 and don't assume name length fits in 'int'.
13337 (x_get_resource_string): Don't blindly alloca invocation name;
13338 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
13341 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
13342 (xg_check_special_colors, xg_set_geometry):
13343 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
13345 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
13346 Use esprintf, not sprintf, in case result does not fit in int.
13348 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13349 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
13350 it as a large positive number.
13351 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
13352 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
13354 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
13355 in case result does not fit in int.
13357 * print.c (float_to_string): Detect width overflow more reliably.
13358 (print_object): Make sprintf buffer a bit bigger, to avoid potential
13359 buffer overrun. Don't assume list length fits in 'int'. Treat
13360 print length of 0 as 0, not as infinity; to be consistent with other
13361 uses of print length in this function. Don't overflow print length
13362 index. Don't assume hash table size fits in 'long', or that
13363 vectorlike size fits in 'unsigned long'.
13365 * process.c (make_process): Use printmax_t, not int, to format
13366 process-name gensyms.
13368 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
13370 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
13371 to avoid potential buffer overrun.
13373 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
13374 if X resource line is longer than 512 bytes.
13376 * xfns.c (x_window): Make sprintf buffer a bit bigger
13377 to avoid potential buffer overrun.
13379 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
13381 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
13383 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
13385 Integer overflow fixes for scrolling, etc.
13386 Without these, Emacs silently mishandles large integers sometimes.
13387 For example, "C-u 4294967297 M-x recenter" was treated as if
13388 it were "C-u 1 M-x recenter" on a typical 64-bit host.
13390 * xdisp.c (try_window_id): Check Emacs fixnum range before
13391 converting to 'int'.
13393 * window.c (window_scroll_line_based, Frecenter):
13394 Check that an Emacs fixnum is in range before assigning it to 'int'.
13395 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
13396 values converted from Emacs fixnums.
13397 (Frecenter): Don't wrap around a line count if it is out of 'int'
13398 range; instead, treat it as an extreme value.
13399 (Fset_window_configuration, compare_window_configurations):
13400 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
13402 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
13403 that can exceed INT_MAX. Check that EMACS_INT value is in range
13404 before assigning it to the (possibly-narrower) index.
13405 (match_limit): Don't assume that a fixnum can fit in 'int'.
13407 * print.c (print_object): Use ptrdiff_t, not int, for index that can
13410 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
13411 (Fvertical_motion): Don't wrap around LINES values that don't fit
13412 in 'int'. Instead, treat them as extreme values. This is good
13413 enough for windows, which can't have more than INT_MAX lines anyway.
13415 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13417 * Require libxml/parser.h to avoid compilation warning.
13419 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
13421 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
13422 since this reportedly can destroy thread storage.
13424 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
13426 * syntax.c (find_defun_start): Update all cache variables if
13427 exiting early (Bug#9401).
13429 2011-08-30 Eli Zaretskii <eliz@gnu.org>
13431 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
13433 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
13434 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
13435 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
13437 * term.c (tty_append_glyph): New function.
13438 (produce_stretch_glyph): Static function and its prototype deleted.
13440 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
13443 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
13445 * image.c (parse_image_spec): Check for nonnegative, not for positive,
13446 when checking :margin (Bug#9390).
13447 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
13448 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
13449 so that the name doesn't mislead. All uses changed.
13451 2011-08-28 Johan Bockgård <bojohan@gnu.org>
13453 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
13456 2011-08-27 Eli Zaretskii <eliz@gnu.org>
13458 * xdisp.c (move_it_to): Don't bail out early when reaching
13459 position beyond to_charpos, if we are scanning backwards.
13460 (move_it_vertically_backward): When DY == 0, make sure we get to
13461 the first character in the line after the newline.
13463 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
13465 * ccl.c: Improve and simplify overflow checking (Bug#9196).
13466 (ccl_driver): Do not generate an out-of-range pointer.
13467 (Fccl_execute_on_string): Remove unnecessary check for
13468 integer overflow, noted by Stefan Monnier in
13469 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
13470 Remove a FIXME that didn't need fixing.
13471 Simplify the newly-introduced buffer reallocation code.
13473 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
13475 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
13477 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
13479 Integer and memory overflow issues (Bug#9196).
13481 * doc.c (get_doc_string): Rework so that
13482 get_doc_string_buffer_size is the actual buffer size, rather than
13483 being 1 less than the actual buffer size; this makes xpalloc more
13486 * image.c (x_allocate_bitmap_record, cache_image):
13487 * xselect.c (Fx_register_dnd_atom):
13488 Simplify previous changes by using xpalloc.
13490 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
13491 since either will do and ptrdiff_t is convenient with xpalloc.
13493 * charset.c (charset_table_size)
13494 (struct charset_sort_data.priority): Now ptrdiff_t.
13495 (charset_compare): Don't overflow if priorities differ greatly.
13496 (Fsort_charsets): Don't assume list length fits in int.
13497 Check for size-calculation overflow when allocating sort data.
13498 (syms_of_charset): Allocate an initial charset table that is
13499 just under 64 KiB, to avoid problems with glibc malloc and mmap.
13501 * cmds.c (internal_self_insert): Check for size-calculation overflow.
13503 * composite.h (struct composition.glyph_len): Now int, not unsigned.
13504 The actual value is always <= INT_MAX, and leaving it unsigned made
13505 overflow checking harder.
13507 * dispextern.h (struct glyph_matrix.rows_allocated)
13508 (struct face_cache.size): Now ptrdiff_t, for convenience in use
13509 with xpalloc. The values are still always <= INT_MAX.
13511 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
13513 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
13514 (SAFE_NALLOCA): New macro.
13516 * region-cache.c (struct boundary.pos, find_cache_boundary)
13517 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
13518 (set_cache_region, invalidate_region_cache)
13519 (revalidate_region_cache, know_region_cache, region_cache_forward)
13520 (region_cache_backward, pp_cache):
13521 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
13522 so that ptrdiff_t * can be passed to xpalloc.
13523 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
13524 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
13525 (pp_cache): Don't assume cache_len fits in int.
13526 * region-cache.h: Adjust extern decls to match.
13528 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
13529 EMACS_INT, since either will do, for xpalloc.
13531 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
13532 (xnmalloc, xnrealloc, xpalloc): New functions.
13534 * bidi.c (bidi_shelve_header_size): New constant.
13535 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
13536 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
13538 * bidi.c (bidi_cache_shrink):
13539 * buffer.c (overlays_at, overlays_in, record_overlay_string)
13541 Don't update size of array until after memory allocation succeeds,
13542 because xmalloc/xrealloc may not return.
13543 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
13544 now that we have proper integer overflow checking.
13545 (record_overlay_string, overlay_strings): Catch overflows when
13546 calculating size of overlay_str_buf.
13548 * callproc.c (Fcall_process): Check for size overflow when
13549 calculating size of args2.
13550 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
13551 Normally we prefer signed values, but sticking with ptrdiff_t would
13552 require adding more-complicated checks.
13554 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
13555 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
13556 Redo buffer-overflow calculations to avoid integer overflow.
13557 Add a FIXME comment where memory seems to be over-allocated.
13559 * character.c (Fstring): Check for size-calculation overflow.
13561 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
13562 unnecessary integer overflow. Check for size overflow.
13563 (encode_coding_object): Don't update size until xmalloc succeeds.
13565 * composite.c (get_composition_id): Check for overflow in glyph
13566 length calculations.
13568 Integer and memory overflow fixes for display code.
13569 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
13570 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
13571 (scrolling_window): Check for overflow in size calculations.
13572 (line_draw_cost, realloc_glyph_pool, add_row_entry):
13573 Don't assume glyph table len fits in int.
13574 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
13575 (row_table_size): Now ptrdiff_t, not int.
13576 (scrolling_window): Avoid overflow in size calculations.
13577 Don't update size until allocation succeeds.
13578 * fns.c (concat): Check for overflow in size calculations.
13579 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
13580 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
13581 (NEXT_ALMOST_PRIME_LIMIT): New constant.
13583 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
13584 (get_doc_string): Check for size calculation overflow.
13585 Don't update size until allocation succeeds.
13586 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
13587 EMACS_INT, where ptrdiff_t will do.
13588 (Fsubstitute_command_keys): Check for string overflow.
13590 * editfns.c (set_time_zone_rule): Don't assume environment length
13592 (message_length): Now ptrdiff_t, not int.
13593 (Fmessage_box): Don't update size until allocation succeeds.
13594 Don't assume message length fits in int.
13595 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
13597 * emacs.c (main): Do not reallocate argv, since there is a null at
13598 the end that can be overwritten, and this way there's no need to
13599 worry about size-calculation overflow.
13600 (sort_args): Check for size-calculation overflow.
13602 * eval.c (init_eval_once, grow_specpdl): Don't update size until
13604 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
13606 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
13607 (x_set_scroll_bar_width, x_figure_window_size):
13608 Check for integer overflow.
13609 (x_set_alpha): Do not assume XINT fits in int.
13611 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
13612 This is for the members text_lines, text_cols, total_lines, total_cols,
13613 where the system imposes an 'int' limit.
13615 * fringe.c (Fdefine_fringe_bitmap):
13616 Don't update size until alloc works.
13618 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
13619 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
13621 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
13622 Check for size-calculation overflow.
13623 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
13624 do, as we prefer signed integers.
13625 (id_to_widget.max_size, id_to_widget.used)
13626 (xg_store_widget_in_map, xg_remove_widget_from_map)
13627 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
13628 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
13629 Use and return ptrdiff_t, not int.
13630 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
13631 * gtkutil.h: Change prototypes to match the above.
13633 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
13634 are duplicate now that they've been promoted to lisp.h.
13635 (x_allocate_bitmap_record, x_alloc_image_color)
13636 (make_image_cache, cache_image, xpm_load):
13637 Don't update size until alloc is done.
13638 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
13640 Check for size calculation overflow.
13641 (ct_colors_allocated_max): New constant.
13642 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
13645 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
13646 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
13647 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
13648 Use ptrdiff_t, not int, to count maps.
13649 (read_char_minibuf_menu_prompt): Check for overflow in size
13650 calculations. Don't update size until allocation succeeds.
13651 Redo calculations to avoid overflow.
13652 * keyboard.h: Change prototypes to match the above.
13654 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
13656 (current_minor_maps): Check for size calculation overflow.
13657 * keymap.h: Change prototypes to match the above.
13659 * lread.c (read1, init_obarray): Don't update size until alloc done.
13661 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
13662 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
13664 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
13665 Now ptrdiff_t, not int.
13666 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
13667 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
13669 * process.c (Fnetwork_interface_list): Check for overflow
13670 in size calculation.
13672 * region-cache.c (move_cache_gap): Check for size calculation overflow.
13674 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
13675 overflow. Don't bother calling xmalloc when xrealloc will do.
13677 * search.c (Freplace_match): Check for size calculation overflow.
13678 (Fset_match_data): Don't assume list lengths fit in 'int'.
13680 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
13681 for command line length. Do not attempt to address one before the
13682 beginning of an array, as that's not portable.
13684 * term.c (max_frame_lines): Remove; unused.
13685 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
13687 (encode_terminal_code, calculate_costs): Check for size
13688 calculation overflow.
13689 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
13690 table lengths and related sizes. Don't update size until alloc
13691 done. Redo calculations to avoid overflow.
13692 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
13694 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
13695 subtracting pointers.
13696 (gobble_line): Check for overflow more carefully. Don't update size
13699 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
13700 Don't update size until alloc done.
13701 Redo size calculations to avoid overflow.
13702 Check for size calculation overflow.
13703 (main) [DEBUG]: Fix typo in invoking tparam1.
13705 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
13706 Use ptrdiff_t, not int, for sizes.
13707 (store_mode_line_noprop_char): Don't update size until alloc done.
13709 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
13710 Use ptrdiff_t, not int, for sizes.
13711 (Finternal_make_lisp_face, cache_face):
13712 Check for size calculation overflow.
13713 (cache_face): Treat size calculation overflows as if they were
13714 memory exhaustion (the usual treatment), rather than aborting.
13716 * xfns.c (x_encode_text, x_set_name_internal)
13717 (Fx_change_window_property): Use ptrdiff_t, not int, to count
13718 sizes, since they can exceed INT_MAX in size. Check for size
13719 calculation overflow.
13721 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
13722 (xg_select): Check for size calculation overflow.
13723 Don't update size until alloc done.
13725 * xrdb.c (get_environ_db): Don't assume path length fits in int,
13726 as sprintf is limited to int lengths.
13728 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
13729 (X_LONG_MIN): New macros.
13730 Use them to make the following changes clearer.
13731 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
13732 This change doesn't affect the value now, but it may help remind
13733 future maintainers not to raise the value too much later.
13734 (SELECTION_QUANTUM): Remove, replacing with ...
13735 (selection_quantum): ... new function, which avoids overflow.
13737 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
13738 assumption that selection length fits in 'int'.
13739 (x_reply_selection_request, x_handle_selection_request)
13740 (x_get_window_property, receive_incremental_selection)
13741 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
13742 (lisp_data_to_selection_data, clean_local_selection_data):
13743 Use ptrdiff_t, not int, to record length of selection.
13744 (x_reply_selection_request, x_get_window_property)
13745 (receive_incremental_selection, x_property_data_to_lisp):
13746 Redo calculations to avoid overflow.
13747 (x_reply_selection_request): When sending hint, ceiling it at
13748 X_LONG_MAX rather than relying on wraparound overflow to send
13750 (x_get_window_property, receive_incremental_selection)
13751 (lisp_data_to_selection_data, x_property_data_to_lisp):
13752 Check for size-calculation overflow.
13753 (x_get_window_property, receive_incremental_selection)
13754 (lisp_data_to_selection_data, Fx_register_dnd_atom):
13755 Don't store size until memory allocation succeeds.
13756 (x_get_window_property): Plug memory leak on memory exhaustion.
13757 Don't double-block input; malloc is safe here. Don't assume 2**34
13758 - 4 fits in unsigned long. Add an xassert to check
13759 XGetWindowProperty overflow. Be more careful about overflow
13760 calculations, and distinguish size from memory overflow better.
13761 (receive_incremental_selection): When tracing, don't assume
13762 unsigned int is less than INT_MAX.
13763 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
13764 harmful) conversions of unsigned short to int.
13765 (lisp_data_to_selection_data): Don't assume that integers
13766 in the range -65535 through -1 fit in an X unsigned short.
13767 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
13768 result parameters unless successful. Rely on cons_to_unsigned
13769 to report problems with elements; the old code wasn't right anyway.
13770 (x_check_property_data): Check for int overflow; we cannot use
13771 a wider type due to X limits.
13772 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
13774 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
13776 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
13777 (x_term_init): Check for size calculation overflow.
13778 (x_color_cells): Don't store size until memory allocation succeeds.
13779 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
13780 Don't assume alloca size is less than MAX_ALLOCA.
13781 (x_term_init): Don't assume length fits in int (sprintf is limited
13784 Use ptrdiff_t for composition IDs.
13785 * character.c (lisp_string_width):
13786 * composite.c (composition_table_size, n_compositions)
13787 (get_composition_id, composition_gstring_from_id):
13788 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
13789 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
13790 * window.c (Frecenter):
13791 Use ptrdiff_t, not int, for composition IDs.
13792 * composite.c (get_composition_id): Check for integer overflow.
13793 * composite.h: Adjust prototypes to match the above changes.
13795 Use ptrdiff_t for hash table indexes.
13796 * category.c (hash_get_category_set):
13797 * ccl.c (ccl_driver):
13798 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
13799 * coding.c (coding_system_charset_list, detect_coding_system):
13800 * coding.h (struct coding_system.id):
13801 * composite.c (get_composition_id, gstring_lookup_cache):
13802 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
13803 * image.c (xpm_get_color_table_h):
13804 * lisp.h (hash_lookup, hash_put):
13805 * minibuf.c (Ftest_completion):
13806 Use ptrdiff_t for hash table indexes, not int (which is too
13807 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
13808 32-bit --with-wide-int hosts).
13810 * charset.c (Fdefine_charset_internal): Check for integer overflow.
13811 Add a FIXME comment about memory leaks.
13812 (syms_of_charset): Don't assume xmalloc returns.
13814 Don't assume that stated character widths fit in int.
13815 * character.c (Fchar_width, c_string_width, lisp_string_width):
13816 * character.h (CHAR_WIDTH):
13817 * indent.c (MULTIBYTE_BYTES_WIDTH):
13818 Use sanitize_char_width to avoid undefined and/or bad behavior
13819 with outlandish widths.
13820 * character.h (sanitize_tab_width): Rename from sanitize_width,
13821 now that we have two such functions. All uses changed.
13822 (sanitize_char_width): New inline function.
13824 Don't assume that tab-width fits in int.
13825 * character.h (sanitize_width): New inline function.
13826 (SANE_TAB_WIDTH): New macro.
13827 (ASCII_CHAR_WIDTH): Use it.
13828 * indent.c (sane_tab_width): Remove. All uses replaced by
13829 SANE_TAB_WIDTH (current_buffer).
13830 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
13832 * fileio.c: Integer overflow issues with file modes.
13833 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
13835 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
13836 Remove unreachable code.
13837 (read_hex, load_charset_map_from_file): Check for integer overflow.
13839 * xterm.c: Don't go over XClientMessageEvent limit.
13840 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
13841 (x_send_scroll_bar_event): Likewise. Check that the size does not
13842 exceed limits imposed by XClientMessageEvent, as well as the usual
13843 ptrdiff_t and size_t limits.
13845 * keyboard.c: Overflow, signedness and related fixes.
13846 (make_lispy_movement): Use same integer type in forward decl
13847 that is used in the definition.
13848 (read_key_sequence, keyremap_step):
13849 Change bufsize argument back to int, undoing my 2011-03-30 change.
13850 We prefer signed types, and int is wide enough here.
13851 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
13852 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
13853 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
13854 length, not size_t. Use ptrdiff_t for index, not int.
13855 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
13856 possibility of integer overflow.
13858 Overflow, signedness and related fixes for images.
13860 * dispextern.h (struct it.stack[0].u.image.image_id)
13861 (struct_it.image_id, struct image.id, struct image_cache.size)
13862 (struct image_cache.used, struct image_cache.ref_count):
13863 * gtkutil.c (update_frame_tool_bar):
13864 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
13865 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
13866 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
13867 * nsmenu.m (update_frame_tool_bar):
13868 * xdisp.c (calc_pixel_width_or_height):
13869 * xfns.c (image_cache_refcount):
13870 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
13871 on typical 64-bit hosts.
13873 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
13874 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
13875 Omit unnecessary casts to int.
13876 (parse_image_spec): Check that integers fall into 'int' range
13877 when the callers expect that.
13878 (image_ascent): Redo ascent calculation to avoid int overflow.
13879 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
13880 (lookup_image): Remove unnecessary tests.
13881 (xbm_image_p): Locals are now of int, not EMACS_INT,
13882 since parse_image_check makes sure they fit into int.
13883 (png_load, gif_load, svg_load_image):
13884 Prefer int to unsigned where either will do.
13885 (tiff_handler): New function, combining the cores of the
13886 old tiff_error_handler and tiff_warning_handler.
13887 This function is rewritten to use vsnprintf and thereby avoid
13888 stack buffer overflows. It uses only the features of vsnprintf
13889 that are common to both POSIX and native Microsoft.
13890 (tiff_error_handler, tiff_warning_handler): Use it.
13891 (tiff_load, gif_load, imagemagick_load_image):
13892 Don't assume :index value fits in 'int'.
13893 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
13894 (imagemagick_load_image): Check that crop parameters fit into
13895 the integer types that MagickCropImage accepts. Don't assume
13896 Vimagemagick_render_type has a nonnegative value. Don't assume
13897 size_t fits in 'long'.
13898 (gs_load): Use printmax_t to print the widest integers possible.
13899 Check for integer overflow when computing image height and width.
13901 2011-08-26 Eli Zaretskii <eliz@gnu.org>
13903 * xdisp.c (redisplay_window): Don't force window start if point
13904 will be invisible in the resulting window. (Bug#9324)
13906 2011-08-25 Eli Zaretskii <eliz@gnu.org>
13908 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
13909 the display spec is of the form `(space ...)'.
13910 (handle_display_spec): Return the value returned by
13911 handle_single_display_spec, not just 1 or zero.
13912 (handle_single_display_spec): If the display spec is of the form
13913 `(space ...)', and specifies display in the text area, return 2
13915 (try_cursor_movement): Check for the need to scroll more
13916 accurately, and prefer exact match for point under bidi.
13917 Don't advance `row' beyond the last row of the window.
13919 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
13920 into disp_prop; all users changed.
13922 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
13923 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
13924 for the text covered by the display property.
13926 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
13928 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
13929 Change return value to nil.
13930 (Frecord_buffer): Delete unused function.
13932 2011-08-24 Eli Zaretskii <eliz@gnu.org>
13934 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
13935 buffers, return left-to-right.
13936 (set_cursor_from_row): Consider candidate row a win if its glyph
13937 represents a newline and point is on that newline. Fixes cursor
13938 positioning on the newline at EOL of R2L text within L2R
13939 paragraph, and vice versa.
13940 (try_cursor_movement): Check continued rows, in addition to
13941 continuation rows. Fixes unwarranted scroll when point enters a
13942 continued line of R2L text within an L2R paragraph, or vice versa.
13943 (cursor_row_p): Consider the case of point being equal to
13944 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
13945 from the end of a short line to the beginning of a continued line
13946 of R2L text within L2R paragraph.
13947 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
13948 composed characters.
13950 * bidi.c (bidi_check_type): Use xassert.
13951 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
13954 2011-08-23 Eli Zaretskii <eliz@gnu.org>
13956 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
13959 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
13961 * nsfont.m (ns_otf_to_script): Fix typo.
13963 2011-08-22 Kenichi Handa <handa@m17n.org>
13965 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
13966 extra slot even if the purpose is char-code-property-table.
13968 2011-08-23 Eli Zaretskii <eliz@gnu.org>
13970 * xdisp.c (redisplay_window): When computing centering_position,
13971 account for the height of the header line. (Bug#8874)
13973 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
13974 instead of CHAR_TO_BYTE. Fixes a crash when a completion
13975 candidate is selected by the mouse, and that candidate has a
13976 composed character under the mouse.
13978 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
13979 coordinates reported by pos-visible-in-window-p for a composed
13980 character in column zero.
13982 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
13984 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
13986 2011-08-22 Eli Zaretskii <eliz@gnu.org>
13988 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
13989 consider it a hit if to_charpos is anywhere in the range of the
13990 composed buffer positions.
13992 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
13994 * image.c (gif_load): Don't assume that each subimage has the same
13995 dimensions as the base image. Handle disposal method that is
13996 "undefined" by the gif spec (Bug#9335).
13998 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
14000 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
14001 (Fcondition_case): Document `debug' symbol in error handler.
14003 2011-08-19 Eli Zaretskii <eliz@gnu.org>
14005 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
14006 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
14007 from an Org mode buffer to a Speedbar frame.
14009 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
14010 a composition, take its buffer position from IT->cmp_it.charpos.
14011 Fixes cursor positioning at the beginning of a line that begins
14012 with a composed character.
14014 2011-08-18 Eli Zaretskii <eliz@gnu.org>
14016 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
14017 character bidirectional type, use STRONG_L instead. Fixes crashes
14018 in a buffer produced by `describe-categories'.
14020 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
14021 members before the level stack, so they would be saved and
14022 restored when copying iterator state. Fixes incorrect reordering
14023 around TABs covered by display properties.
14025 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
14027 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
14029 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
14031 * eval.c (internal_condition_case, internal_condition_case_1)
14032 (internal_condition_case_2, internal_condition_case_n):
14033 Remove unnecessary aborts (Bug#9081).
14035 2011-08-17 Eli Zaretskii <eliz@gnu.org>
14037 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
14038 has no `load' handler, try opening the file locally. (Bug#9311)
14040 2011-08-16 Ken Brown <kbrown@cornell.edu>
14042 * gmalloc.c: Expand comment.
14044 2011-08-16 Eli Zaretskii <eliz@gnu.org>
14046 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
14047 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
14049 2011-08-16 Ken Brown <kbrown@cornell.edu>
14051 Fix memory allocation problems in Cygwin build (Bug#9273).
14053 * unexcw.c ( __malloc_initialized): Declare external variable.
14054 (fixup_executable): Force the dumped emacs to reinitialize malloc.
14056 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
14058 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
14060 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
14061 in the static heap.
14062 [CYGWIN] (special_realloc): New function.
14063 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
14064 requests to realloc storage in the static heap.
14066 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
14068 * bidi.c (bidi_initialize): Remove unused local.
14070 2011-08-15 Eli Zaretskii <eliz@gnu.org>
14073 * biditype.h: Remove file.
14074 * makefile.w32-in ($(BLD)/bidi.$(O)):
14075 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
14077 * dispextern.h: Fix a typo in the comment to bidi_type_t.
14079 * chartab.c: Improve commentary for the uniprop_table API.
14081 * bidi.c (bidi_paragraph_init): Support zero value of
14082 bidi_ignore_explicit_marks_for_paragraph_level.
14083 (bidi_initialize): Use uniprop_table instead of including
14084 biditype.h and bidimirror.h.
14086 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
14087 coordinates of the iterator when restoring from ppos_it.
14090 2011-08-14 Kenichi Handa <handa@m17n.org>
14092 * process.c (create_process): Call setup_process_coding_systems
14093 after the pid of the process is set to -1 (Bug#8162).
14095 2011-08-14 Eli Zaretskii <eliz@gnu.org>
14097 * xdisp.c (move_it_in_display_line_to): Don't invoke
14098 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
14099 ppos_it. Fixes vertical cursor motion when line beginning is
14100 covered by an image. (Bug#9296)
14102 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
14104 * nsterm.h (ns_run_ascript): Declare.
14105 (NSAPP_DATA2_RUNASSCRIPT): Define.
14107 * nsfns.m (as_script, as_result, as_status): New static variables.
14108 (ns_run_ascript): New function.
14109 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
14110 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
14111 the event loop. Get status from as_status (Bug#7276).
14113 * nsterm.m (sendEvent): If event is NSApplicationDefined and
14114 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
14115 the event loop (Bug#7276).
14117 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
14119 * gnutls.c (QCgnutls_bootprop_priority)
14120 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
14121 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
14122 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
14123 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
14124 (QCgnutls_bootprop_verify_hostname_error)
14125 (QCgnutls_bootprop_callbacks_verify): Rename from
14126 Qgnutls_bootprop_..., all uses changed.
14128 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
14131 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
14133 * xfaces.c (Qframe_set_background_mode): Now static.
14134 * dispextern.h (Qframe_set_background_mode): Remove decl.
14136 * process.c (Fnetwork_interface_info): Declare local only if needed.
14138 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
14140 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
14141 (Fnetwork_interface_list): Allocate in increments of bytes instead
14142 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
14143 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
14145 (struct ifflag_def): notrailers is smart on OSX.
14146 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
14147 Get hardware address with getifaddrs if available.
14149 2011-08-12 Eli Zaretskii <eliz@gnu.org>
14151 * xdisp.c (iterate_out_of_display_property): xassert that
14152 IT->position is set to within IT->object's boundaries. Break from
14153 the loop as soon as EOB is reached; avoids infloops in redisplay
14154 when IT->position is set up wrongly due to some bug.
14155 Set IT->current to match the bidi iterator unconditionally.
14156 (push_display_prop): Allow GET_FROM_STRING as IT->method on
14157 entry. Force push_it to save on the stack the current
14158 buffer/string position, to be restored by pop_it. Fix flags in
14159 the iterator structure wrt the object coming from a display
14160 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
14161 properties. (Bug#9284)
14163 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
14165 * fontset.c (fontset_get_font_group): Add proper type checks.
14168 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14170 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
14171 and LC_VERSION_MIN_MACOSX.
14172 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
14173 (dump_it) [LC_FUNCTION_STARTS]: Use it.
14175 2011-08-08 Eli Zaretskii <eliz@gnu.org>
14177 * xdisp.c (forward_to_next_line_start): Allow to use the
14178 no-display-properties-and-no-overlays under bidi display.
14179 Set disp_pos in the bidi iterator to avoid searches for display
14180 properties and overlays.
14182 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
14184 * editfns.c (Fset_time_zone_rule): Document relationship with the
14187 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
14188 the font entity extracted from the cache (Bug#8109).
14190 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
14192 * composite.c (autocmp_chars): Don't reset point. That is done by
14193 restore_point_unwind (Bug#5984).
14195 2011-08-07 Juri Linkov <juri@jurta.org>
14197 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
14198 to show the arg `TIME' instead of `TIMEVAL'.
14200 2011-08-06 Eli Zaretskii <eliz@gnu.org>
14202 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
14203 display property strides EOL and includes a newline, as in
14204 longlines-mode. (Bug#9254)
14205 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
14206 word-wrap under bidirectional display. (Bug#9224)
14208 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
14209 is non-zero, even if the data buffer is NULL. Fixes a crash in
14210 vertical-motion with longlines-mode. (Bug#9254)
14212 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14214 * bidi.c <bidi_cache_total_alloc>: Now static.
14215 (bidi_initialize): Initialize bidi_cache_total_alloc.
14217 * xdisp.c (display_line): Release buffer allocated for shelved bidi
14220 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
14221 amount allocated this far in `bidi_cache_total_alloc'.
14222 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
14223 non-zero, only free the data buffer without restoring the cache
14224 contents. All callers changed.
14226 * dispextern.h (bidi_unshelve_cache): Update prototype.
14228 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
14229 (move_it_in_display_line, move_it_to)
14230 (move_it_vertically_backward, move_it_by_lines): Replace the call
14231 to xfree to an equivalent call to bidi_unshelve_cache.
14232 (move_it_in_display_line_to): Fix logic of returning
14233 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
14235 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14237 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
14238 came from a string character with a `cursor' property. (Bug#9229)
14240 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14242 * Makefile.in (LIB_PTHREAD): New variable.
14243 (LIBES): Add LIB_PTHREAD (Bug#9216).
14245 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
14246 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
14248 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
14250 * regex.c (re_iswctype): Remove some redundant boolean conversions.
14252 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
14254 * xterm.c (x_find_topmost_parent): New function.
14255 (x_set_frame_alpha): Find topmost parent window with
14256 x_find_topmost_parent and set the property there also (bug#9181).
14257 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
14259 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
14261 * callproc.c (Fcall_process): Avoid vfork clobbering
14262 the local vars buffer, coding_systems, current_dir.
14264 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
14266 * keymap.c (Fmake_composed_keymap): Move to subr.el.
14268 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
14270 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
14271 so that it is not optimized away.
14273 * xdisp.c (compute_display_string_pos): Remove unused local.
14275 2011-08-02 Eli Zaretskii <eliz@gnu.org>
14277 Fix slow cursor motion and scrolling in large buffers with
14278 selective display, like Org Mode buffers. (Bug#9218)
14280 * dispextern.h (struct bidi_it): New member disp_prop_p.
14282 * xdisp.c: Remove one-slot cache of display string positions.
14283 (compute_display_string_pos): Accept an additional argument
14284 DISP_PROP_P; callers changed. Scan at most 5K characters forward
14285 for a display string or property. If found, set DISP_PROP_P
14288 * bidi.c (bidi_fetch_char): Accept an additional argument
14289 DISP_PROP_P, and pass it to compute_display_string_pos.
14290 Only handle text covered by a display string if DISP_PROP_P is returned
14291 non-zero. All callers of bidi_fetch_char changed.
14293 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
14295 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
14297 2010-12-03 Don March <don@ohspite.net>
14299 * keymap.c (Fdefine_key): Fix non-prefix key error message when
14300 last character M-[char] is translated to ESC [char] (bug#7541).
14302 2011-08-02 Kenichi Handa <handa@m17n.org>
14304 * lisp.h (uniprop_table): Extern it.
14306 * chartab.c (uniprop_table): Make it non-static.
14308 2011-08-01 Eli Zaretskii <eliz@gnu.org>
14310 * xdisp.c (forward_to_next_line_start): Accept additional argument
14311 BIDI_IT_PREV, and store into it the state of the bidi iterator had
14313 (reseat_at_next_visible_line_start): Use the bidi iterator state
14314 returned by forward_to_next_line_start to restore the state of
14315 it->bidi_it after backing up to previous newline. (Bug#9212)
14317 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
14319 * regex.c (re_comp): Protoize.
14320 (re_exec): Fix return type.
14321 (regexec): Fix type of `ret'. (Bug#9203)
14323 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14325 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
14326 This is needed if max-image-size is a floating-point number.
14328 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14330 * print.c (print_object): Print empty symbol as ##.
14332 * lread.c (read1): Read ## as empty symbol.
14334 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
14336 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
14337 setting frame foreground color (Bug#9175).
14338 (x_set_background_color): Likewise.
14340 * nsmenu.m (-setText): Size tooltip dimensions precisely to
14341 contents (Bug#9176).
14342 (EmacsTooltip -init): Remove bezels and add shadows to
14345 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
14346 or scroll bar (Bug#8470).
14348 * nsfont.m (nsfont_open): Remove assignment to voffset and
14349 unnecessary vars hshink, expand, hd, full_height, min_height.
14350 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
14352 * nsterm.h (nsfont_info): Remove voffset field.
14354 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
14356 Implement strike-through and overline on NextStep (Bug#8863).
14358 * nsfont.m (nsfont_open): Use underline position provided by font,
14359 instead of hard-coded value of 2.
14360 (nsfont_draw): Call ns_draw_text_decoration instead.
14362 * nsterm.h: Add declaration for ns_draw_text_decoration.
14364 * nsterm.m (ns_draw_text_decoration): New function for drawing
14365 underline, overline, and strike-through.
14366 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
14367 ns_draw_text_decoration. Change treatment of cursor drawing to
14368 accommodate underlining, etc.
14370 2011-07-28 Eli Zaretskii <eliz@gnu.org>
14372 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
14375 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14377 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
14378 Without this fix, if a signal arrives just after memory fills up,
14379 'malloc' might be invoked reentrantly.
14381 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
14382 In other words, assume that every image size is allowed, on non-X
14383 hosts. This assumption is probably wrong, but it lets Emacs compile.
14385 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
14387 * regex.c (re_iswctype): Convert return values to boolean.
14389 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
14391 * xdisp.c (compute_display_string_pos): Don't use cached display
14392 string position if the buffer had its restriction changed.
14395 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14397 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14399 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
14401 Integer signedness and overflow and related fixes. (Bug#9079)
14403 * bidi.c: Integer size and overflow fixes.
14404 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
14405 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
14406 (bidi_cache_find_level_change, bidi_cache_ensure_space)
14407 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
14408 (bidi_find_other_level_edge):
14409 Use ptrdiff_t instead of EMACS_INT where either will do.
14410 This works better on 32-bit hosts configured --with-wide-int.
14411 (bidi_cache_ensure_space): Check for size-calculation overflow.
14412 Use % rather than repeated addition, for better worst-case speed.
14413 Don't set bidi_cache_size until after xrealloc returns, because it
14415 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
14416 (bidi_cache_ensure_space): Also check that the bidi cache size
14417 does not exceed that of the largest Lisp string or buffer. See Eli
14418 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
14420 * alloc.c (__malloc_size_t): Remove.
14421 All uses replaced by size_t. See Andreas Schwab's note
14422 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
14424 * image.c: Improve checking for integer overflow.
14425 (check_image_size): Assume that f is nonnull, since
14426 it is always nonnull in practice. This is one less thing to
14427 worry about when checking for integer overflow later.
14428 (x_check_image_size): New function, which checks for integer
14429 overflow issues inside X.
14430 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
14431 This removes the need for a memory_full check.
14432 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
14433 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
14434 (xbm_read_bitmap_data): Change locals back to 'int', since
14435 their values must fit in 'int'.
14436 (xpm_load_image, png_load, tiff_load):
14437 Invoke x_create_x_image_and_pixmap earlier,
14438 to avoid much needless work if the image is too large.
14439 (tiff_load): Treat overly large images as if
14440 x_create_x_image_and_pixmap failed, not as malloc failures.
14441 (gs_load): Use x_check_image_size.
14443 * gtkutil.c: Omit integer casts.
14444 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
14445 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
14447 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
14449 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
14450 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
14451 would wrongly return t on a 64-bit host.
14453 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
14454 The plain *_OVERFLOW macros run afoul of GCC bug 49705
14455 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
14456 and therefore cause GCC to emit a bogus diagnostic in some cases.
14458 * image.c: Integer signedness and overflow and related fixes.
14459 This is not an exhaustive set of fixes, but it's time to
14460 record what I've got.
14461 (lookup_pixel_color, check_image_size): Remove redundant decls.
14462 (check_image_size): Don't assume that arbitrary EMACS_INT values
14463 fit in 'int', or that arbitrary 'double' values fit in 'int'.
14464 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
14465 (tiff_load, imagemagick_load_image):
14466 Check for overflow in size calculations.
14467 (x_create_x_image_and_pixmap): Remove unnecessary test for
14468 xmalloc returning NULL; that can't happen.
14469 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
14470 (xpm_color_bucket): Use better integer hashing function.
14471 (xpm_cache_color): Don't possibly over-allocate memory.
14472 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
14473 (gif_memory_source):
14474 Use ptrdiff_t, not int or size_t, to record sizes.
14475 (png_load): Don't assume values greater than 2**31 fit in 'int'.
14476 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
14477 either works, as we prefer signed integers.
14478 (tiff_read_from_memory, tiff_write_from_memory):
14479 Return tsize_t, not size_t, since that's what the TIFF API wants.
14480 (tiff_read_from_memory): Don't fail simply because the read would
14481 go past EOF; instead, return a short read.
14482 (tiff_load): Omit no-longer-needed casts.
14483 (Fimagemagick_types): Don't assume size fits into 'int'.
14485 Improve hashing quality when configured --with-wide-int.
14486 * fns.c (hash_string): New function, taken from sxhash_string.
14487 Do not discard information about ASCII character case; this
14488 discarding is no longer needed.
14489 (sxhash-string): Use it. Change sig to match it. Caller changed.
14490 * lisp.h: Declare it.
14491 * lread.c (hash_string): Remove, since we now use fns.c's version.
14492 The fns.c version returns a wider integer if --with-wide-int is
14493 specified, so this should help the quality of the hashing a bit.
14495 * emacs.c: Integer overflow minor fix.
14496 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
14497 Define only if GNU_LINUX.
14498 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
14500 * dispnew.c: Integer signedness and overflow fixes.
14501 Remove unnecessary forward decls, that were a maintenance hassle.
14502 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
14504 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
14505 (scrolling_window): Use ptrdiff_t, not int, for byte count.
14506 (prepare_desired_row, line_draw_cost):
14507 Use int, not unsigned, where either works.
14508 (save_current_matrix, restore_current_matrix):
14509 Use ptrdiff_t, not size_t, where either works.
14510 (init_display): Check for overflow more accurately, and without
14511 relying on undefined behavior.
14513 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
14514 Remove, replacing with the new symbols in lisp.h. All uses changed.
14515 * fileio.c (make_temp_name):
14516 * filelock.c (lock_file_1, lock_file):
14517 * xdisp.c (message_dolog):
14518 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
14519 Use pMd etc. instead.
14520 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
14521 replacing the pWIDE etc. symbols removed from editfns.c.
14523 * keyboard.h (num_input_events): Now uintmax_t.
14524 This is (very slightly) less likely to mess up due to wraparound.
14527 * buffer.c: Integer signedness fixes.
14528 (alloc_buffer_text, enlarge_buffer_text):
14529 Use ptrdiff_t rather than size_t when either will do, as we prefer
14532 * alloc.c: Integer signedness and overflow fixes.
14533 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
14534 (__malloc_size_t): Default to size_t, not to int.
14535 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
14536 (Fgarbage_collect, mark_object_loop_halt, mark_object):
14537 Prefer ptrdiff_t to size_t when either would do, as we prefer
14539 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
14540 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
14541 Now const. Initialize with values that are in range even if char
14543 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
14544 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
14545 These functions do the right thing with sizes > 2**32.
14546 (check_depth): Now ptrdiff_t, not int.
14547 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
14548 Adjust to new way of storing sizes. Check for size overflow bugs
14550 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
14551 slightly wrong anyway, as it missed one instance of
14552 XMALLOC_OVERRUN_CHECK_OVERHEAD.
14553 (refill_memory_reserve): Omit needless cast to size_t.
14554 (mark_object_loop_halt): Mark as externally visible.
14556 * xselect.c: Integer signedness and overflow fixes.
14557 (Fx_register_dnd_atom, x_handle_dnd_message):
14558 Use ptrdiff_t, not size_t, since we prefer signed.
14559 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
14560 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
14561 x_dnd_atoms_size and x_dnd_atoms_length.
14563 * doprnt.c: Prefer signed to unsigned when either works.
14565 * doprnt.c (doprnt):
14567 * xdisp.c (vmessage):
14568 Use ptrdiff_t, not size_t, when using or implementing doprnt,
14569 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
14570 prefer signed arithmetic to avoid comparison confusion.
14571 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
14572 but is a bit tricky.
14574 Assume freestanding C89 headers, string.h, stdlib.h.
14575 * data.c, doprnt.c, floatfns.c, print.c:
14576 Include float.h unconditionally.
14577 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
14578 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
14579 * regex.c: Likewise for stddef.h, string.h.
14580 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
14581 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
14582 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
14583 (STDC_HEADERS): Remove obsolete defines.
14584 * sysdep.c: Include limits.h unconditionally.
14586 Assume support for memcmp, memcpy, memmove, memset.
14587 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
14588 * regex.c (memcmp, memcpy):
14589 Remove; we assume C89 now.
14591 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
14592 (__malloc_safe_bcopy): Remove; no longer needed.
14594 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
14595 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
14596 well either way, and we prefer signed to unsigned.
14598 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
14600 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
14601 closes the connection while we're reading (bug#9182).
14603 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
14605 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
14606 are specified (Bug#9168).
14608 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
14610 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
14611 Found by GCC static checking and --with-wide-int on a 32-bit host.
14613 2011-07-25 Eli Zaretskii <eliz@gnu.org>
14615 * xdisp.c (compute_display_string_pos): Fix logic of caching
14616 previous display string position. Initialize cached_prev_pos to
14617 -1. Fixes slow-down at the beginning of a buffer.
14619 2011-07-24 Eli Zaretskii <eliz@gnu.org>
14621 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
14622 for attrs[LFACE_FONTSET_INDEX].
14624 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
14626 * xml.c (parse_region): Remove unused local
14627 that was recently introduced.
14629 2011-07-23 Eli Zaretskii <eliz@gnu.org>
14631 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
14632 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
14634 * xdisp.c (move_it_in_display_line_to): Record the best matching
14635 position for TO_CHARPOS while scanning the line, and restore it on
14636 exit if none of the characters scanned was an exact match.
14637 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
14638 when exact match is impossible due to invisible text, and the
14639 lines are truncated.
14641 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
14643 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
14646 2011-07-22 Eli Zaretskii <eliz@gnu.org>
14648 Fix a significant slow-down of cursor motion with C-n, C-p,
14649 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
14650 auto-repeat under bidi redisplay in fontified buffers.
14651 * xdisp.c (compute_stop_pos_backwards): New function.
14652 (next_element_from_buffer): Call compute_stop_pos_backwards to
14653 find a suitable prev_stop when we find ourselves before
14655 (reseat): Don't look for prev_stop, as that could mean a very long
14657 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
14658 <cached_disp_overlay_modiff>: Cache for last found display string
14660 (compute_display_string_pos): Return the cached position if asked
14661 about the same buffer in the same area of character positions, and
14662 the buffer wasn't changed since the time the display string
14663 position was cached.
14665 2011-07-22 Eli Zaretskii <eliz@gnu.org>
14667 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
14668 is an integer, which is important for empty lines. (Bug#9149)
14670 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
14672 * frame.c (Fmodify_frame_parameters): In tty case, update the
14673 default face if necessary (Bug#4238).
14675 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
14677 * editfns.c (Fstring_to_char): No need to explain what a character
14678 is in the docstring (Bug#6576).
14680 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
14682 * xml.c (parse_region): Make sure we always return a tree.
14684 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
14686 * xml.c (parse_region): If a document contains only comments,
14689 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
14691 * xml.c (make_dom): Return comments, too.
14693 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
14696 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
14697 and the surrounding thread.
14698 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
14699 rather than fgets, and retry after EINTR. Otherwise, 'emacs
14700 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
14702 * s/openbsd.h (BROKEN_SIGIO): Define.
14703 * unexelf.c (unexec) [__OpenBSD__]:
14704 Don't update the .mdebug section of the Alpha COFF symbol table.
14706 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
14708 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
14711 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
14713 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
14714 This fixes some race conditions on the permissions of any newly
14717 * alloc.c (valid_pointer_p): Use pipe, not open.
14718 This fixes some permissions issues when debugging.
14720 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
14721 If fchown fails to set both uid and gid, try to set just gid,
14722 as that is sometimes allowed. Adjust the file's mode to eliminate
14723 setuid or setgid bits that are inappropriate if fchown fails.
14725 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
14727 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
14728 to compare Lisp_Objects.
14729 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
14730 global_gnutls_log_level, don't mistake it for a Lisp_Object.
14731 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
14733 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
14735 * lread.c (read_integer): Unread even EOF character.
14736 (read1): Likewise. Properly record start position of symbol.
14738 * lread.c (read1): Read `#:' as empty uninterned symbol if no
14739 symbol character follows.
14741 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
14743 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
14744 This works around a problem with the previous change to Fcopy_file.
14745 Recent glibc declares fchown with __attribute__((warn_unused_result)),
14746 and without this change, GCC might complain about discarding
14747 fchown's return value.
14749 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
14751 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
14753 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
14755 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
14757 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
14759 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
14760 it's used from the C level.
14762 * process.c: Use the same condition for POLL_FOR_INPUT in both
14763 keyboard.c and process.c (bug#1858).
14765 2011-07-09 Lawrence Mitchell <wence@gmx.li>
14767 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
14768 (Fgnutls_boot): Use it.
14770 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
14772 * doc.c (Fsubstitute_command_keys): Revert last change.
14774 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
14776 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
14777 quotes the next character, and doesn't affect other longer
14778 sequences (bug#8935).
14780 * lread.c (syms_of_lread): Clarify that is isn't only
14781 `eval-buffer' and `eval-defun' that's affected by
14782 `lexical-binding' (bug#8460).
14784 2011-07-15 Eli Zaretskii <eliz@gnu.org>
14786 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
14787 bidi redisplay when a line includes both an image and is truncated.
14789 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
14791 Fix minor problems found by static checking.
14792 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
14793 (elsz): Now a signed constant, not a size_t var. We prefer signed
14794 types to unsigned, to avoid integer comparison confusion. Without
14795 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
14796 "cannot optimize loop, the loop counter may overflow", a symptom
14798 * indent.c (Fvertical_motion): Mark locals as initialized.
14799 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
14801 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
14803 * search.c (Fre_search_backward): Mention `case-fold-search' in
14804 all the re_search_* functions (bug#8138).
14806 * keyboard.c (Fopen_dribble_file): Document when the file is
14809 2011-07-14 Eli Zaretskii <eliz@gnu.org>
14811 * bidi.c (bidi_dump_cached_states): Fix format of displaying
14814 Support bidi reordering of display and overlay strings.
14815 * xdisp.c (compute_display_string_pos)
14816 (compute_display_string_end): Accept additional argument STRING.
14817 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
14818 (reseat_to_string): Initialize bidi_it->string.s and
14819 bidi_it->string.schars.
14820 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
14821 NULL (avoids a crash in bidi_paragraph_init).
14822 Initialize itb.string.lstring.
14823 (init_iterator): Call bidi_init_it only of a valid
14824 buffer position was specified. Initialize paragraph_embedding to
14826 (reseat_to_string): Initialize the bidi iterator.
14827 (display_string): If we need to ignore text properties of
14828 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
14829 original value of -1 will not work with bidi.)
14830 (compute_display_string_pos): First arg is now struct
14831 `text_pos *'; all callers changed. Support display properties on
14833 (compute_display_string_end): Support display properties on Lisp
14835 (init_iterator, reseat_1, reseat_to_string): Initialize the
14836 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
14837 when iterating on a string not from display properties).
14838 (compute_display_string_pos, compute_display_string_end):
14839 Fix calculation of the object to scan. Fixes an error when using
14841 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
14842 base_level_stop; instead, set base_level_stop to BEGV.
14843 Fixes crashes in vertical-motion.
14844 (next_element_from_buffer): Improve commentary for when
14845 the iterator is before prev_stop.
14846 (init_iterator): Initialize bidi_p from the default value of
14847 bidi-display-reordering, not from buffer-local value. Use the
14848 buffer-local value only if initializing for buffer iteration.
14849 (handle_invisible_prop): Support invisible properties on strings
14850 that are being bidi-reordered.
14851 (set_iterator_to_next): Support bidi reordering of C strings and
14853 (next_element_from_string): Support bidi reordering of Lisp
14855 (handle_stop_backwards): Support Lisp strings as well.
14856 (display_string): Support display of R2L glyph rows.
14857 Use IT_STRING_CHARPOS when displaying from a Lisp string.
14858 (init_iterator): Don't initialize it->bidi_p for strings
14860 (reseat_to_string): Initialize it->bidi_p for strings here.
14861 (next_element_from_string, next_element_from_c_string)
14862 (next_element_from_buffer): Add xassert's for correspondence
14863 between IT's object being iterated and it->bidi_it.string
14865 (face_before_or_after_it_pos): Support bidi iteration.
14866 (next_element_from_c_string): Handle the case of the first string
14867 character that is not the first one in the visual order.
14868 (get_visually_first_element): New function, refactored from common
14869 parts of next_element_from_buffer, next_element_from_string, and
14870 next_element_from_c_string.
14871 (tool_bar_lines_needed, redisplay_tool_bar)
14872 (display_menu_bar): Force left-to-right direction. Add a FIXME
14873 comment for making that be controlled by a user option.
14874 (push_it, pop_it): Save and restore the state of the
14875 bidi iterator. Save and restore the bidi_p flag.
14876 (pop_it): Iterate out of display property for string iteration as
14878 (iterate_out_of_display_property): Support iteration over strings.
14879 (handle_single_display_spec): Set up it->bidi_it for iteration
14880 over a display string, and call bidi_init_it.
14881 (handle_single_display_spec, next_overlay_string)
14882 (get_overlay_strings_1, push_display_prop): Set up the bidi
14883 iterator for displaying display or overlay strings.
14884 (forward_to_next_line_start): Don't use the shortcut if
14886 (back_to_previous_visible_line_start): If handle_display_prop
14887 pushed the iterator stack, restore the internal state of the bidi
14888 iterator by calling bidi_pop_it same number of times.
14889 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
14890 and we are bidi-iterating, don't decrement the iterator position;
14891 instead, set the first_elt flag in the bidi iterator, to produce
14893 (reseat_1): Remove redundant setting of string_from_display_prop_p.
14894 (push_display_prop): xassert that we are iterating a buffer.
14895 (push_it, pop_it): Save and restore paragraph_embedding member.
14896 (handle_single_display_spec, next_overlay_string)
14897 (get_overlay_strings_1, reseat_1, reseat_to_string)
14898 (push_display_prop): Set up the `unibyte' member of bidi_it.string
14899 correctly. Don't assume unibyte strings are not bidi-reordered.
14900 (compute_display_string_pos)
14901 (compute_display_string_end): Fix handling the case of C string.
14902 (push_it, pop_it): Save and restore from_disp_prop_p.
14903 (handle_single_display_spec, push_display_prop): Set the
14904 from_disp_prop_p flag.
14905 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
14906 (pop_it): Call iterate_out_of_display_property only if we are
14907 popping after iteration over a string that came from a display
14908 property. Fix a typo in popping stretch info. Add an assertion
14909 for verifying that the iterator position is in sync with the bidi
14911 (handle_single_display_spec, get_overlay_strings_1)
14912 (push_display_prop): Fix initialization of paragraph direction for
14913 string when that of the parent object is not yet determined.
14914 (reseat_1): Call bidi_init_it to resync the bidi
14915 iterator with IT's position. (Bug#7616)
14916 (find_row_edges): If ROW->start.pos gives position
14917 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
14918 (handle_stop, back_to_previous_visible_line_start, reseat_1):
14919 Reset the from_disp_prop_p flag.
14920 (SAVE_IT, RESTORE_IT): New macros.
14921 (pos_visible_p, face_before_or_after_it_pos)
14922 (back_to_previous_visible_line_start)
14923 (move_it_in_display_line_to, move_it_in_display_line)
14924 (move_it_to, move_it_vertically_backward, move_it_by_lines)
14925 (try_scrolling, redisplay_window, display_line): Use them when
14926 saving a temporary copy of the iterator and restoring it back.
14927 (back_to_previous_visible_line_start, reseat_1)
14928 (init_iterator): Empty the bidi cache "stack".
14929 (move_it_in_display_line_to): If iterator ended up at
14930 EOL, but we never saw any buffer positions smaller than
14931 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
14932 motion in bidi-reordered lines.
14933 (move_it_in_display_line_to): Record prev_method and prev_pos
14934 immediately before the call to set_iterator_to_next. Fixes cursor
14935 motion in bidi-reordered lines with stretch glyphs and strings
14936 displayed in margins. (Bug#8133) (Bug#8867)
14937 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
14939 (pos_visible_p): Support positions in bidi-reordered lines.
14940 Save and restore bidi cache.
14942 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
14943 (bidi_paragraph_info): Delete unused struct.
14944 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
14945 (bidi_cache_start): New variable.
14946 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
14948 (bidi_cache_fetch_state, bidi_cache_search)
14949 (bidi_cache_find_level_change, bidi_cache_iterator_state)
14950 (bidi_cache_find, bidi_peek_at_next_level)
14951 (bidi_level_of_next_char, bidi_find_other_level_edge)
14952 (bidi_move_to_visually_next): Compare cache index with
14953 bidi_cache_start rather than with zero.
14954 (bidi_fetch_char): Accept new argument STRING; all callers
14955 changed. Support iteration over a string. Support strings with
14956 display properties. Support unibyte strings. Fix the type of
14957 `len' according to what STRING_CHAR_AND_LENGTH expects.
14958 (bidi_paragraph_init, bidi_resolve_explicit_1)
14959 (bidi_resolve_explicit, bidi_resolve_weak)
14960 (bidi_level_of_next_char, bidi_move_to_visually_next):
14961 Support iteration over a string.
14962 (bidi_set_sor_type, bidi_resolve_explicit_1)
14963 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
14964 can now be zero (for strings); special values 0 and -1 were
14965 changed to -1 and -2, respectively.
14966 (bidi_char_at_pos): New function.
14967 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
14968 Call it instead of FETCH_MULTIBYTE_CHAR.
14969 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
14970 initialized to valid values.
14971 (bidi_init_it): Don't initialize charpos and bytepos with invalid
14973 (bidi_level_of_next_char): Allow the sentinel "position" to pass
14974 the test for valid cached positions. Fix the logic for looking up
14975 the sentinel state in the cache. GCPRO the Lisp string we are
14977 (bidi_push_it, bidi_pop_it): New functions.
14978 (bidi_initialize): Initialize the bidi cache start stack pointer.
14979 (bidi_cache_ensure_space): New function, refactored from part of
14980 bidi_cache_iterator_state. Don't assume the required size is just
14981 one BIDI_CACHE_CHUNK away.
14982 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
14983 (bidi_count_bytes, bidi_char_at_pos): New functions.
14984 (bidi_cache_search): Don't assume bidi_cache_last_idx is
14985 always valid if bidi_cache_idx is valid.
14986 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
14987 is valid if it's going to be used.
14988 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
14989 (bidi_cache_fetch_state, bidi_cache_search)
14990 (bidi_cache_find_level_change, bidi_cache_ensure_space)
14991 (bidi_cache_iterator_state, bidi_cache_find)
14992 (bidi_find_other_level_edge, bidi_cache_start_stack):
14993 All variables related to cache indices are now EMACS_INT.
14995 * dispextern.h (struct bidi_string_data): New structure.
14996 (struct bidi_it): New member `string'. Make flag members be 1-bit
14997 fields, and put them last in the struct.
14998 (compute_display_string_pos, compute_display_string_end):
15000 (bidi_push_it, bidi_pop_it): Add prototypes.
15001 (struct iterator_stack_entry): New members bidi_p,
15002 paragraph_embedding, and from_disp_prop_p.
15003 (struct it): Member bidi_p is now a bit field 1 bit wide.
15004 (bidi_shelve_cache, bidi_unshelve_cache):
15005 Declare prototypes.
15007 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
15008 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
15009 and vector-like objects.
15011 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
15012 cache around display iteration.
15014 * window.c (Fwindow_end, window_scroll_pixel_based)
15015 (displayed_window_lines, Frecenter): Save and restore the bidi
15016 cache around display iteration.
15018 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
15020 * editfns.c (Fdelete_region): Clarify the use of the named
15021 parameters (bug#6788).
15023 2011-07-14 Martin Rudalics <rudalics@gmx.at>
15025 * indent.c (Fvertical_motion): Set and restore w->pointm when
15026 saving and restoring the window's buffer (Bug#9006).
15028 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
15030 * editfns.c (Fstring_to_char): Clarify just what is returned
15031 (bug#6576). Text by Eli Zaretskii.
15033 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
15035 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
15037 2011-07-13 Eli Zaretskii <eliz@gnu.org>
15039 * buffer.c (mmap_find): Fix a typo.
15041 2011-07-13 Johan Bockgård <bojohan@gnu.org>
15043 Fix execution of x selection hooks.
15044 * xselect.c (Qx_lost_selection_functions)
15045 (Qx_sent_selection_functions): New vars.
15046 (syms_of_xselect): DEFSYM them.
15047 (x_handle_selection_request): Pass Qx_sent_selection_functions
15048 rather than Vx_sent_selection_functions to Frun_hook_with_args.
15049 (x_handle_selection_clear,x_clear_frame_selections):
15050 Pass Qx_lost_selection_functions rather than
15051 Vx_lost_selection_functions to Frun_hook_with_args.
15053 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
15055 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
15056 The old code sometimes used this field without initializing it.
15058 * alloc.c (gc_sweep): Don't read past end of array.
15059 In theory, the old code could also have corrupted Emacs internals,
15060 though it'd be very unlikely.
15062 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
15064 * character.c (Fcharacterp): Don't advertise optional ignored
15065 argument. (Bug#4026)
15067 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
15069 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
15072 * window.c (Fset_window_start): Doc fix (bug#4199).
15073 (Fset_window_hscroll): Ditto.
15075 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
15077 Fix minor new problems caught by GCC 4.6.1.
15078 * term.c (init_tty): Remove unused local.
15079 * xsettings.c (store_monospaced_changed): Define this function only
15080 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
15081 not used otherwise.
15083 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
15085 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
15087 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
15089 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
15090 are the mini-buffer and the echo area (bug#3320).
15092 * term.c (init_tty): Remove support for supdup, c10 and perq
15093 terminals, which are no longer supported (bug#1482).
15095 2011-07-10 Johan Bockgård <bojohan@gnu.org>
15097 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
15099 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
15101 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
15102 for non-popups (Bug#3642).
15104 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
15106 * alloc.c (reset_malloc_hooks): Protoize.
15107 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
15108 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
15109 * cm.c (losecursor): Likewise.
15110 * data.c (fmod): Likewise.
15111 * dispnew.c (swap_glyphs_in_rows): Likewise.
15112 * emacs.c (memory_warning_signal): Likewise.
15113 * floatfns.c (float_error): Likewise.
15114 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
15115 (otf_open, font_otf_capability, generate_otf_features)
15116 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
15118 * image.c (pbm_read_file): Likewise.
15119 * indent.c (string_display_width): Likewise.
15120 * intervals.c (check_for_interval, search_for_interval)
15121 (inc_interval_count, count_intervals, root_interval)
15122 (adjust_intervals_for_insertion, make_new_interval): Likewise.
15123 * lread.c (defalias): Likewise.
15124 * ralloc.c (r_alloc_check): Likewise.
15125 * regex.c (set_image_of_range_1, set_image_of_range)
15126 (regex_grow_registers): Likewise.
15127 * sysdep.c (strerror): Likewise.
15128 * termcap.c (valid_filename_p, tprint, main): Likewise.
15129 * tparam.c (main): Likewise.
15130 * unexhp9k800.c (run_time_remap, save_data_space)
15131 (update_file_ptrs, read_header, write_header, calculate_checksum)
15132 (copy_file, copy_rest, display_header): Likewise.
15133 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
15135 * xdisp.c (check_it): Likewise.
15136 * xfaces.c (register_color, unregister_color, unregister_colors):
15138 * xfns.c (print_fontset_result): Likewise.
15139 * xrdb.c (member, fatal, main): Likewise.
15141 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
15143 Fix minor problems found by static checking (Bug#9031).
15144 * chartab.c (char_table_set_range, map_sub_char_table):
15145 Remove unused locals.
15146 (uniprop_table): Now static.
15147 * composite.c (_work_char): Remove unused static var.
15149 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
15151 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
15153 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
15155 * gtkutil.c (qttip_cb): Remove code without function.
15157 2011-07-09 Eli Zaretskii <eliz@gnu.org>
15159 * w32.c (pthread_sigmask): New stub.
15161 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
15163 Use pthread_sigmask, not sigprocmask (Bug#9010).
15164 sigprocmask is portable only for single-threaded applications, and
15165 Emacs can be multi-threaded when it uses GTK.
15166 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
15168 * callproc.c (Fcall_process):
15169 * process.c (create_process):
15170 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
15171 Use pthread_sigmask, not sigprocmask.
15173 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15175 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
15176 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
15179 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15181 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
15182 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
15183 (xg_hide_tooltip): Fix comment.
15185 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
15186 in registerServicesMenuSendTypes.
15187 (validRequestorForSendType): Don't check ns_return_types.
15189 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
15192 2011-07-08 Jason Rumney <jasonr@gnu.org>
15194 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
15195 SH_SHOW for hidden windows (Bug#5482).
15197 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
15198 frame struct members of non-existent frames (Bug#6284).
15200 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
15202 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
15203 variable firstTime not needed on OSX >= 10.6.
15204 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
15205 >= 10.5. Use setKnobProportion, setDoubleValue.
15207 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
15208 (MAC_OS_X_VERSION_10_5): Define if not defined.
15209 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
15210 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
15211 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
15213 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
15214 cString and lossyCString on OSX >= 10.4.
15216 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
15217 sizeToFit on OSX >= 10.2.
15219 * nsimage.m (allocInitFromFile): Don't use deprecated method
15220 bestRepresentationForDevice on OSX >= 10.6.
15222 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
15225 * emacs.c: Declare unexec_init_emacs_zone.
15227 * nsgui.h: Fix compiler warning about gnulib redefining verify.
15229 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
15231 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
15232 on svcsMenu (Bug#8842).
15234 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
15236 (Fns_list_services): Just return Qnil on 10.6, code not working there.
15238 * nsterm.m (QUTF8_STRING): Declare.
15239 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
15240 (validRequestorForSendType): Return type is (id).
15241 Change indexOfObjectIdenticalTo to indexOfObject.
15242 Check if we have local selection before returning self (Bug#8842).
15243 (writeSelectionToPasteboard): Put local selection into paste board
15244 if we have a local selection (Bug#8842).
15245 (syms_of_nsterm): DEFSYM QUTF8_STRING.
15247 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
15248 (ns_get_local_selection): Declare.
15250 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
15252 * keymap.c (describe_map_tree): Don't insert a double newline at
15253 the end of the buffer (bug#1169) and return whether we inserted
15256 * callint.c (Fcall_interactively): Change "reading args" to
15257 "providing args" to try to clarify what it does (bug#1010).
15259 2011-07-07 Kenichi Handa <handa@m17n.org>
15261 * composite.c (composition_compute_stop_pos): Ignore a static
15262 composition starting before CHARPOS (Bug#8915).
15264 * xdisp.c (handle_composition_prop): Likewise.
15266 2011-07-07 Eli Zaretskii <eliz@gnu.org>
15268 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
15271 2011-07-07 Kenichi Handa <handa@m17n.org>
15273 * character.h (unicode_category_t): New enum type.
15275 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
15276 (Qchar_code_property_table): New variable.
15277 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
15278 (UNIPROP_COMPRESSED_FORM_P): New macros.
15279 (char_table_ascii): Uncompress the compressed values.
15280 (sub_char_table_ref): New arg is_uniprop. Callers changed.
15281 Uncompress the compressed values.
15282 (sub_char_table_ref_and_range): Likewise.
15283 (char_table_ref_and_range): Uncompress the compressed values.
15284 (sub_char_table_set): New arg is_uniprop. Callers changed.
15285 Uncompress the compressed values.
15286 (sub_char_table_set_range): Args changed. Callers changed.
15287 (char_table_set_range): Adjuted for the above change.
15288 (map_sub_char_table): Delete args default_val and parent. Add arg
15289 top. Give decoded values to a Lisp function.
15290 (map_char_table): Adjust for the above change. Give decoded
15291 values to a Lisp function. Gcpro more variables.
15292 (uniprop_table_uncompress)
15293 (uniprop_decode_value_run_length): New functions.
15294 (uniprop_decoder, uniprop_decoder_count): New variables.
15295 (uniprop_get_decoder, uniprop_encode_value_character)
15296 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
15298 (uniprop_encoder, uniprop_encoder_count): New variables.
15299 (uniprop_get_encoder, uniprop_table)
15300 (Funicode_property_table_internal, Fget_unicode_property_internal)
15301 (Fput_unicode_property_internal): New functions.
15302 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
15303 Sunicode_property_table_internal, Sget_unicode_property_internal,
15304 and Sput_unicode_property_internal. Defvar_lisp
15305 char-code-property-alist.
15307 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
15308 Vunicode_category_table.
15310 * font.c (font_range): Adjust for the change of
15311 Vunicode_category_table.
15313 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
15315 * m/iris4d.h: Remove file, move contents ...
15316 * s/irix6-5.h: ... here.
15318 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
15320 Remove unportable assumption about struct layout (Bug#8884).
15321 * alloc.c (mark_buffer):
15322 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
15323 (clone_per_buffer_values): Don't assume that
15324 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
15325 This isn't true in general, and it's particularly not true
15326 if Emacs is configured with --with-wide-int.
15327 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
15328 New macros, used in the buffer.c change.
15330 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
15332 * xsettings.c: Use both GConf and GSettings if both are available.
15333 (store_config_changed_event): Add comment.
15334 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
15335 (store_tool_bar_style_changed): New functions.
15336 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
15337 (struct xsettings): Move font inside HAVE_XFT.
15338 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
15339 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
15340 Move inside HAVE_XFT.
15341 (something_changed_gsettingsCB): Rename from something_changedCB.
15342 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
15344 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
15345 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
15346 (something_changed_gconfCB): Rename from something_changedCB.
15347 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
15348 (parse_settings): Move check for font inside HAVE_XFT.
15349 (read_settings, apply_xft_settings): Add comment.
15350 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
15351 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
15352 call store_font_name_changed.
15353 (xft_settings_event): Add comment.
15354 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
15355 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
15356 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
15357 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
15358 (xsettings_initialize): Call init_gsettings last.
15359 (xsettings_get_system_font, xsettings_get_system_normal_font):
15362 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
15364 Random fixes. E.g., (random) never returned negative values.
15365 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
15366 subseconds part to the entropy, as that's a bit more random.
15367 Prefer signed to unsigned, since the signedness doesn't matter and
15368 in general we prefer signed. When given a limit, use a
15369 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
15370 latter isn't right if USE_2_TAGS_FOR_INTS.
15371 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
15372 not 0..VALMASK. Don't discard "excess" bits that random () returns.
15374 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
15376 * textprop.c (text_property_stickiness):
15377 Obey Vtext_property_default_nonsticky.
15378 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
15379 * w32fns.c (syms_of_w32fns):
15380 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
15382 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15384 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
15385 This is more efficient than Ffile_directory_p and avoids a minor race.
15387 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
15389 * buffer.c (Foverlay_put): Say what the return value is
15392 * fileio.c (barf_or_query_if_file_exists): Check first if the file
15393 is a directory before asking whether to use the file name
15395 (barf_or_query_if_file_exists): Make the "File is a directory"
15396 error be more correct.
15398 * fns.c (Frequire): Remove the mention of the .gz files, since
15399 that's installation-specific, but keep the mention of
15400 `get-load-suffixes'.
15402 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
15404 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
15405 Report string overflow if the output is too long.
15407 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
15409 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
15410 (syms_of_gnutls): Remove duplicate DEFSYM for
15411 Qgnutls_bootprop_verify_hostname_error, an error for
15412 Qgnutls_bootprop_verify_error (which is no longer used).
15414 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
15415 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
15416 Also (re)move comments that are misplaced or no longer relevant.
15418 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15420 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
15422 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
15424 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
15425 and background color parameters if they have been changed.
15427 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15429 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
15431 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
15433 * xsettings.c (SYSTEM_FONT): Define only when used.
15434 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
15436 * keymap.c (access_keymap_1): Now static.
15438 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
15440 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
15441 leave any prefix arg for the up event (Bug#1586).
15443 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
15445 * lread.c (syms_of_lread): Mention single symbols defined by
15446 `defvar' or `defconst' (bug#7154).
15448 * fns.c (Frequire): Mention .el.gz files (bug#7314).
15449 (Frequire): Mention get-load-suffixes.
15451 2011-07-02 Martin Rudalics <rudalics@gmx.at>
15453 * window.h (window): Remove clone_number slot.
15454 * window.c (Fwindow_clone_number, Fset_window_clone_number):
15456 (make_parent_window, make_window, saved_window)
15457 (Fset_window_configuration, save_window_save): Don't deal with
15459 * buffer.c (Qclone_number): Remove declaration.
15460 (sort_overlays, overlay_strings): Don't deal with clone numbers.
15462 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
15464 Add multiple inheritance to keymaps.
15465 * keymap.c (Fmake_composed_keymap): New function.
15466 (Fset_keymap_parent): Simplify.
15467 (fix_submap_inheritance): Remove.
15468 (access_keymap_1): New function extracted from access_keymap to handle
15469 embedded parents and handle lists of maps.
15470 (access_keymap): Use it.
15471 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
15472 (Fcopy_keymap): Handle embedded parents.
15473 (Fcommand_remapping, define_as_prefix): Simplify.
15474 (Fkey_binding): Simplify.
15475 (syms_of_keymap): Move minibuffer-local-completion-map,
15476 minibuffer-local-filename-completion-map,
15477 minibuffer-local-must-match-map, and
15478 minibuffer-local-filename-must-match-map to Elisp.
15479 (syms_of_keymap): Defsubr make-composed-keymap.
15480 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
15481 (parse_menu_item): Trivial simplification.
15483 2011-07-01 Glenn Morris <rgm@gnu.org>
15485 * Makefile.in (SETTINGS_LIBS): Fix typo.
15487 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15489 * coding.c (Fencode_coding_string): Record the last coding system
15490 used, as the function doc string says (bug#8738).
15492 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
15494 * xsettings.c (store_monospaced_changed): Take new font as arg and
15495 check for change against current_mono_font.
15496 (EMACS_TYPE_SETTINGS): Remove this and related defines.
15497 (emacs_settings_constructor, emacs_settings_get_property)
15498 (emacs_settings_set_property, emacs_settings_class_init)
15499 (emacs_settings_init, gsettings_obj): Remove.
15500 (something_changedCB): New function for HAVE_GSETTINGS.
15501 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
15502 with value as argument.
15503 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
15504 g_settings_new (Bug#8967). Do not create gsettings_obj.
15505 Remove calls to g_settings_bind. Connect something_changedCB to
15508 * xgselect.c: Add defined (HAVE_GSETTINGS).
15509 (xgselect_initialize): Ditto.
15511 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
15512 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
15515 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
15517 * eval.c (struct backtrace): Simplify and port the data structure.
15518 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
15519 signed bit field, as this assumption is not portable and it makes
15520 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
15521 "char debug_on_exit : 1" as this is not portable either; instead,
15522 use the portable "unsigned int debug_on_exit : 1". Remove unused
15523 member evalargs. Remove obsolete comments about cc bombing out.
15525 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
15527 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
15528 Let HAVE_GSETTINGS override HAVE_GCONF.
15529 (store_monospaced_changed): New function.
15530 (EMACS_SETTINGS): A new type derived from GObject to handle
15531 GSettings notifications.
15532 (emacs_settings_constructor, emacs_settings_get_property)
15533 (emacs_settings_set_property, emacs_settings_class_init):
15535 (gsettings_client, gsettings_obj): New variables.
15536 (GSETTINGS_SCHEMA): New define.
15537 (something_changedCB): Call store_monospaced_changed.
15538 (init_gsettings): New function.
15539 (xsettings_initialize): Call init_gsettings.
15540 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
15543 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
15546 2011-06-29 Martin Rudalics <rudalics@gmx.at>
15548 * window.c (resize_root_window, grow_mini_window)
15549 (shrink_mini_window): Rename Qresize_root_window to
15550 Qwindow_resize_root_window and Qresize_root_window_vertically to
15551 Qwindow_resize_root_window_vertically.
15553 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
15555 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
15557 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
15559 * makefile.w32-in: Redesign dependencies so they reflect more
15560 clearly which files are directly included by each source file,
15561 and not through other includes.
15563 2011-06-27 Martin Rudalics <rudalics@gmx.at>
15565 * buffer.c (Qclone_number): Declare static and DEFSYM it.
15566 (sort_overlays, overlay_strings): When an overlay's clone number
15567 matches the window's clone number process the overlay even if
15568 the overlay's window property doesn't match the current window.
15570 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
15571 (Fwindow_hchild): Rename to Fwindow_left_child.
15572 (Fwindow_next): Rename to Fwindow_next_sibling.
15573 (Fwindow_prev): Rename to Fwindow_prev_sibling.
15574 (resize_window_check): Rename to window_resize_check.
15575 (resize_window_apply): Rename to window_resize_apply.
15576 (Fresize_window_apply): Rename to Fwindow_resize_apply.
15577 (Fdelete_other_windows_internal, resize_frame_windows)
15578 (Fsplit_window_internal, Fdelete_window_internal)
15579 (grow_mini_window, shrink_mini_window)
15580 (Fresize_mini_window_internal): Fix callers accordingly.
15582 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
15584 * emacsgtkfixed.h: State that this is only used with Gtk+3.
15585 (emacs_fixed_set_min_size): Remove.
15586 (emacs_fixed_new): Take frame as argument.
15588 * emacsgtkfixed.c: State that this is only used with Gtk+3.
15589 (_EmacsFixedPrivate): Remove minwidth/height.
15590 Add struct frame *f.
15591 (emacs_fixed_init): Initialize priv->f.
15592 (get_parent_class, emacs_fixed_set_min_size): Remove.
15593 (emacs_fixed_new): Set priv->f to argument.
15594 (emacs_fixed_get_preferred_width)
15595 (emacs_fixed_get_preferred_height): Use min_width/height from
15596 frames size_hint to set minimum and natural (Bug#8919).
15597 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
15598 and use min_width/height from frames size_hint to set
15599 min_width/height (Bug#8919).
15601 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
15602 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
15605 2011-06-26 Eli Zaretskii <eliz@gnu.org>
15607 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
15608 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
15611 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
15613 * process.c (wait_reading_process_output): Bypass select if
15614 waiting for a cell while ignoring keyboard input, and input is
15615 pending. Suggested by Jan Djärv (Bug#8869).
15617 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
15619 Use gnulib's dup2 module instead of rolling our own.
15620 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
15622 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15624 * dispnew.c (scrolling_window): Before scrolling, turn off a
15625 mouse-highlight in the window being scrolled.
15627 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
15629 Move DEFSYM to lisp.h and use everywhere.
15631 * character.h (DEFSYM): Move declaration...
15632 * lisp.h (DEFSYM): ...here.
15638 * w32select.c: Don't include character.h.
15640 * alloc.c (syms_of_alloc):
15641 * buffer.c (syms_of_buffer):
15642 * bytecode.c (syms_of_bytecode):
15643 * callint.c (syms_of_callint):
15644 * casefiddle.c (syms_of_casefiddle):
15645 * casetab.c (init_casetab_once):
15646 * category.c (init_category_once, syms_of_category):
15647 * ccl.c (syms_of_ccl):
15648 * cmds.c (syms_of_cmds):
15649 * composite.c (syms_of_composite):
15650 * dbusbind.c (syms_of_dbusbind):
15651 * dired.c (syms_of_dired):
15652 * dispnew.c (syms_of_display):
15653 * doc.c (syms_of_doc):
15654 * editfns.c (syms_of_editfns):
15655 * emacs.c (syms_of_emacs):
15656 * eval.c (syms_of_eval):
15657 * fileio.c (syms_of_fileio):
15658 * fns.c (syms_of_fns):
15659 * frame.c (syms_of_frame):
15660 * fringe.c (syms_of_fringe):
15661 * insdel.c (syms_of_insdel):
15662 * keymap.c (syms_of_keymap):
15663 * lread.c (init_obarray, syms_of_lread):
15664 * macros.c (syms_of_macros):
15665 * msdos.c (syms_of_msdos):
15666 * print.c (syms_of_print):
15667 * process.c (syms_of_process):
15668 * search.c (syms_of_search):
15669 * sound.c (syms_of_sound):
15670 * syntax.c (init_syntax_once, syms_of_syntax):
15671 * terminal.c (syms_of_terminal):
15672 * textprop.c (syms_of_textprop):
15673 * undo.c (syms_of_undo):
15674 * w32.c (globals_of_w32):
15675 * window.c (syms_of_window):
15676 * xdisp.c (syms_of_xdisp):
15677 * xfaces.c (syms_of_xfaces):
15678 * xfns.c (syms_of_xfns):
15679 * xmenu.c (syms_of_xmenu):
15680 * xsettings.c (syms_of_xsettings):
15681 * xterm.c (syms_of_xterm): Use DEFSYM.
15683 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
15685 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
15687 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
15689 Integer and buffer overflow fixes (Bug#8873).
15691 * print.c (printchar, strout): Check for string overflow.
15692 (PRINTPREPARE, printchar, strout):
15693 Don't set size unless allocation succeeds.
15695 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
15696 for sizes. Check for string overflow more accurately.
15697 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
15699 * macros.c: Integer and buffer overflow fixes.
15700 * keyboard.h (struct keyboard.kbd_macro_bufsize):
15701 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
15702 Use ptrdiff_t, not int, for sizes.
15703 Don't increment bufsize until after realloc succeeds.
15704 Check for size-calculation overflow.
15705 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
15707 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
15709 * lread.c: Integer overflow fixes.
15710 (read_integer): Radix is now EMACS_INT, not int,
15711 to improve quality of diagnostics for out-of-range radices.
15712 Calculate buffer size correctly for out-of-range radices.
15713 (read1): Check for integer overflow in radices, and in
15714 read-circle numbers.
15715 (read_escape): Avoid int overflow.
15716 (Fload, openp, read_buffer_size, read1)
15717 (substitute_object_recurse, read_vector, read_list, map_obarray):
15718 Use ptrdiff_t, not int, for sizes.
15719 (read1): Use EMACS_INT, not int, for sizes.
15720 Check for size overflow.
15722 * image.c (cache_image): Check for size arithmetic overflow.
15724 * lread.c: Integer overflow issues.
15725 (saved_doc_string_size, saved_doc_string_length)
15726 (prev_saved_doc_string_size, prev_saved_doc_string_length):
15727 Now ptrdiff_t, not int.
15728 (read1): Don't assume doc string length fits in int. Check for
15729 out-of-range doc string lengths.
15730 (read_list): Don't assume file position fits in int.
15731 (read_escape): Check for hex character overflow.
15733 2011-06-22 Leo Liu <sdl.web@gmail.com>
15735 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
15736 Move to minibuffer.el.
15738 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
15740 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
15741 The following patches are for when GLYPH_DEBUG && !XASSERT.
15742 * dispextern.h (trace_redisplay_p, dump_glyph_string):
15743 * dispnew.c (flush_stdout):
15744 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
15745 Mark as externally visible.
15746 * dispnew.c (check_window_matrix_pointers): Now static.
15747 * dispnew.c (window_to_frame_vpos):
15748 * xfns.c (unwind_create_frame):
15749 * xterm.c (x_check_font): Remove unused local.
15750 * scroll.c (CHECK_BOUNDS):
15751 * xfaces.c (cache_fache): Rename local to avoid shadowing.
15752 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
15753 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
15754 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
15755 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
15757 (debug_method_add): Use va_list and vsprintf rather than relying
15758 on undefined behavior with wrong number of arguments.
15759 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
15760 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
15761 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
15762 since we're not interested in debugging glyphs with old libraries.
15763 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
15764 GCC 4.6.0's static checking.
15766 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
15768 Integer overflow and signedness fixes (Bug#8873).
15769 A few related buffer overrun fixes, too.
15771 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
15773 * dispextern.h (struct face.stipple):
15774 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
15775 (x_bitmap_mask, x_allocate_bitmap_record)
15776 (x_create_bitmap_from_data, x_create_bitmap_from_file)
15777 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
15778 (x_create_bitmap_from_xpm_data):
15779 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
15780 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
15782 * xfaces.c (load_pixmap):
15783 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
15784 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
15785 (.bitmaps_last, struct x_output.icon_bitmap):
15786 Use ptrdiff_t, not int, for bitmap indexes.
15787 (x_allocate_bitmap_record): Check for size overflow.
15788 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
15790 Use ptrdiff_t, not int, for overlay counts.
15791 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
15792 * editfns.c (overlays_around, get_pos_property):
15793 * textprop.c (get_char_property_and_overlay):
15794 * xdisp.c (next_overlay_change, note_mouse_highlight):
15795 * xfaces.c (face_at_buffer_position):
15796 * buffer.c (OVERLAY_COUNT_MAX): New macro.
15797 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
15798 (Fnext_overlay_change, Fprevious_overlay_change)
15799 (mouse_face_overlay_overlaps, Foverlays_in):
15800 Use ptrdiff_t, not int, for sizes.
15801 (overlays_at, overlays_in): Check for size-calculation overflow.
15803 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
15805 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
15806 (x_session_initialize): Do not assume string length fits in int.
15808 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
15809 This is unlikely, but can occur if DPI is outlandish.
15811 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
15812 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
15814 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
15815 * xrdb.c (magic_file_p, search_magic_path):
15816 Omit last arg SUFFIX; it was always 0. All callers changed.
15817 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
15819 * xfont.c (xfont_match): Avoid need for strlen.
15821 * xfns.c: Don't assume strlen fits in int.
15822 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
15824 * xdisp.c (message_log_check_duplicate): Return intmax_t,
15825 not unsigned long, as we prefer signed integers. All callers changed.
15826 Detect integer overflow in repeat count.
15827 (message_dolog): Don't assume print length fits in 39 bytes.
15828 (display_mode_element): Don't assume strlen fits in int.
15830 * termcap.c: Don't assume sizes fit in int and never overflow.
15831 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
15832 (gobble_line): Check for size-calculation overflow.
15834 * minibuf.c (Fread_buffer):
15835 * lread.c (intern, intern_c_string):
15836 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
15837 Don't assume string length fits in int.
15839 * keyboard.c (parse_tool_bar_item):
15840 * gtkutil.c (style_changed_cb): Avoid need for strlen.
15842 * font.c: Don't assume string length fits in int.
15843 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
15844 Use ptrdiff_t, not int.
15845 (font_intern_prop): Don't assume string length fits in int.
15846 Don't assume integer property fits in fixnum.
15847 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
15849 * filelock.c: Fix some buffer overrun and integer overflow issues.
15850 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
15851 Reformulate so as not to need the command string.
15852 Invoke gzip -cd rather than gunzip, as it's more portable.
15853 (lock_info_type, lock_file_1, lock_file):
15854 Don't assume pid_t and time_t fit in unsigned long.
15855 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
15856 (current_lock_owner): Prefer signed type for sizes.
15857 Use memcpy, not strncpy, where memcpy is what is really wanted.
15858 Don't assume (via atoi) that time_t and pid_t fit in int.
15859 Check for time_t and/or pid_t out of range, e.g., via a network share.
15860 Don't alloca where an auto var works fine.
15862 * fileio.c: Fix some integer overflow issues.
15863 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
15864 Don't assume string length fits in int.
15865 (directory_file_name): Don't assume string length fits in long.
15866 (make_temp_name): Don't assume pid fits in int, or that its print
15867 length is less than 20.
15869 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
15871 * coding.c (make_subsidiaries): Don't assume string length fits in int.
15873 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
15875 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
15876 We prefer signed integers, even for size calculations.
15878 * emacs.c: Don't assume string length fits in 'int'.
15879 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
15880 (main): Don't invoke strlen when not needed.
15882 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
15883 (XD_DEBUG_MESSAGE): Don't waste a byte.
15885 * callproc.c (getenv_internal_1, getenv_internal)
15886 (Fgetenv_internal):
15887 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
15889 * lread.c (invalid_syntax): Omit length argument.
15890 All uses changed. This doesn't fix a bug, but it simplifies the
15891 code away from its former Hollerith-constant appearance, and it's
15892 one less 'int' to worry about when looking at integer-overflow issues.
15893 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
15895 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
15896 This didn't break anything, but it didn't help either.
15897 It's confusing to put a bogus integer in a place where the actual
15898 value does not matter.
15899 (LIST_END_P): Remove unused macro and its bogus comment.
15900 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
15902 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
15903 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
15905 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
15906 We prefer signed types, and the value cannot exceed the EMACS_INT
15907 range anyway (because otherwise the length would not be representable).
15908 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
15909 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
15910 This avoids a GCC warning when WIDE_EMACS_INT.
15912 * indent.c (sane_tab_width): New function.
15913 (current_column, scan_for_column, Findent_to, position_indentation)
15914 (compute_motion): Use it. This is just for clarity.
15915 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
15917 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
15919 * lisp.h (lint_assume): New macro.
15920 * composite.c (composition_gstring_put_cache):
15921 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
15923 * editfns.c, insdel.c:
15924 Omit unnecessary forward decls, to simplify future changes.
15926 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
15928 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
15930 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
15931 Use much-faster test for byte-length change.
15932 Don't assume string byte-length fits in 'int'.
15933 Check that character arg fits in 'int'.
15934 (mapcar1): Declare byte as byte, for clarity.
15936 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
15938 * fns.c (concat): Catch string overflow earlier.
15939 Do not rely on integer wraparound.
15941 * dispextern.h (struct it.overlay_strings_charpos)
15942 (struct it.selective): Now EMACS_INT, not int.
15943 * xdisp.c (forward_to_next_line_start)
15944 (back_to_previous_visible_line_start)
15945 (reseat_at_next_visible_line_start, next_element_from_buffer):
15946 Don't arbitrarily truncate the value of 'selective' to int.
15948 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
15950 * composite.c: Don't truncate sizes to 'int'.
15951 (composition_gstring_p, composition_reseat_it)
15952 (composition_adjust_point): Use EMACS_INT, not int.
15953 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
15954 not EMACS_UINT, for indexes.
15956 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
15958 * buffer.c: Include <verify.h>.
15959 (struct sortvec.priority, struct sortstr.priority):
15960 Now EMACS_INT, not int.
15961 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
15962 (struct sortstr.size, record_overlay_string)
15963 (struct sortstrlist.size, struct sortlist.used):
15964 Don't truncate size to int.
15965 (record_overlay_string): Check for size-calculation overflow.
15966 (init_buffer_once): Check at compile-time, not run-time.
15968 2011-06-22 Jim Meyering <meyering@redhat.com>
15970 Don't leak an XBM-image-sized buffer
15971 * image.c (xbm_load): Free the image buffer after using it.
15973 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
15976 * composite.c (find_automatic_composition): Omit needless 'return 0;'
15977 that Sun C diagnosed.
15978 * fns.c (secure_hash): Fix pointer signedness issue.
15979 * intervals.c (static_offset_intervals): New function.
15980 (offset_intervals): Use it.
15982 2011-06-21 Leo Liu <sdl.web@gmail.com>
15985 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
15988 * fns.c (secure_hash): Rename from crypto_hash_function and change
15989 the first arg to accept symbols.
15990 (Fsecure_hash): New primitive.
15991 (syms_of_fns): New symbols.
15993 2011-06-20 Deniz Dogan <deniz@dogan.se>
15995 * process.c (Fset_process_buffer): Clarify return value in
15998 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
16000 * dispnew.c (add_window_display_history): Use BVAR.
16002 * xdisp.c (debug_method_add): Use BVAR.
16003 (check_window_end, dump_glyph_matrix, dump_glyph)
16004 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
16006 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
16009 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
16010 check till after the cache is created in init_frame_faces.
16012 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
16014 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
16016 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
16018 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
16019 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
16020 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
16022 Improve buffer-overflow checking (Bug#8873).
16023 * fileio.c (Finsert_file_contents):
16024 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
16025 Remove the old (too-loose) buffer overflow checks.
16026 They weren't needed, since make_gap checks for buffer overflow.
16027 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
16028 The old code merely checked for Emacs fixnum overflow, and relied
16029 on undefined (wraparound) behavior. The new code avoids undefined
16030 behavior, and also checks for ptrdiff_t and/or size_t overflow.
16032 * editfns.c (Finsert_char): Don't dump core with very negative counts.
16033 Tune. Don't use wider integers than needed. Don't use alloca.
16034 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
16036 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
16038 * insdel.c, lisp.h (buffer_overflow): New function.
16039 (insert_from_buffer_1, replace_range, replace_range_2):
16040 * insdel.c (make_gap_larger):
16041 * editfns.c (Finsert_char):
16042 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
16044 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
16046 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
16048 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
16050 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
16051 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
16053 * fileio.c: Don't assume EMACS_INT fits in off_t.
16054 (emacs_lseek): New static function.
16055 (Finsert_file_contents, Fwrite_region): Use it.
16056 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
16058 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
16060 * fns.c: Don't overflow int when computing a list length.
16061 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
16062 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
16063 truncation on 64-bit hosts. Check for QUIT every
16064 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
16065 faster and is responsive enough.
16066 (Flength): Report an error instead of overflowing an integer.
16067 (Fsafe_length): Return a float if the value is not representable
16068 as a fixnum. This shouldn't happen except in contrived situations.
16069 (Fnthcdr, Fsort): Don't assume list length fits in int.
16070 (Fcopy_sequence): Don't assume vector length fits in int.
16072 * alloc.c: Check that resized vectors' lengths fit in fixnums.
16073 (header_size, word_size): New constants.
16074 (allocate_vectorlike): Don't check size overflow here.
16075 (allocate_vector): Check it here instead, since this is the only
16076 caller of allocate_vectorlike that could cause overflow.
16077 Check that the new vector's length is representable as a fixnum.
16079 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
16080 The previous code was bogus. For example, next_almost_prime (32)
16081 returned 39, which is undesirable as it is a multiple of 3; and
16082 next_almost_prime (24) returned 25, which is a multiple of 5 so
16083 why was the code bothering to check for multiples of 7?
16085 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
16087 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
16089 Variadic C functions now count arguments with ptrdiff_t.
16090 This partly undoes my 2011-03-30 change, which replaced int with size_t.
16091 Back then I didn't know that the Emacs coding style prefers signed int.
16092 Also, in the meantime I found a few more instances where arguments
16093 were being counted with int, which may truncate counts on 64-bit
16094 machines, or EMACS_INT, which may be unnecessarily wide.
16095 * lisp.h (struct Lisp_Subr.function.aMANY)
16096 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
16097 Arg counts are now ptrdiff_t, not size_t.
16098 All variadic functions and their callers changed accordingly.
16099 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
16100 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
16101 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
16102 * callint.c (Fcall_interactively): Check arg count for overflow,
16103 to avoid potential buffer overrun. Use signed char, not 'int',
16104 for 'varies' array, so that we needn't bother to check its size
16105 calculation for overflow.
16106 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
16107 * eval.c (apply_lambda):
16108 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
16109 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
16110 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
16112 * callint.c (Fcall_interactively): Don't use index var as event count.
16114 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
16115 * mem-limits.h (SIZE): Remove; no longer used.
16117 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
16119 Remove unnecessary casts.
16120 * xterm.c (x_term_init):
16121 * xfns.c (x_set_border_pixel):
16122 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
16123 These aren't needed now that we assume ANSI C.
16125 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
16126 It's more likely to cause problems (due to unsigned overflow)
16129 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
16131 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
16133 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
16135 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
16137 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
16139 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
16141 GLYPH_CODE_FACE returns EMACS_INT, not int.
16142 * dispextern.h (merge_faces):
16143 * xfaces.c (merge_faces):
16144 * xdisp.c (get_next_display_element, next_element_from_display_vector):
16145 Don't assume EMACS_INT fits in int.
16147 * character.h (CHAR_VALID_P): Remove unused parameter.
16148 * fontset.c, lisp.h, xdisp.c: All uses changed.
16150 * editfns.c (Ftranslate_region_internal): Omit redundant test.
16152 * fns.c (concat): Minor tuning based on overflow analysis.
16153 This doesn't fix any bugs. Use int to hold character, instead
16154 of constantly refetching from Emacs object. Use XFASTINT, not
16155 XINT, for value known to be a character. Don't bother comparing
16156 a single byte to 0400, as it's always less.
16158 * floatfns.c (Fexpt):
16159 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
16161 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
16164 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
16166 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
16167 Without this fix, on a 64-bit host (aset S 0 4294967386) would
16168 incorrectly succeed when S was a string, because 4294967386 was
16169 truncated before it was used.
16171 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
16172 Otherwise, an out-of-range integer could cause undefined behavior
16175 * composite.c: Use int, not EMACS_INT, for characters.
16176 (fill_gstring_body, composition_compute_stop_pos): Use int, not
16177 EMACS_INT, for values that are known to be in character range.
16178 This doesn't fix any bugs but is the usual style inside Emacs and
16179 may generate better code on 32-bit machines.
16181 Make sure a 64-bit char is never passed to ENCODE_CHAR.
16182 This is for reasons similar to the recent CHAR_STRING fix.
16183 * charset.c (Fencode_char): Check that character arg is actually
16184 a character. Pass an int to ENCODE_CHAR.
16185 * charset.h (ENCODE_CHAR): Verify that the character argument is no
16186 wider than 'int', as a compile-time check to prevent future regressions
16189 * character.c (char_string): Remove unnecessary casts.
16191 Make sure a 64-bit char is never passed to CHAR_STRING.
16192 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
16193 by silently ignoring the top 32 bits, allowing some values
16194 that were far too large to be valid characters.
16195 * character.h: Include <verify.h>.
16196 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
16197 arguments are no wider than unsigned, as a compile-time check
16198 to prevent future regressions in this area.
16200 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
16201 (Fsubst_char_in_region):
16203 * xdisp.c (decode_mode_spec_coding):
16204 Adjust to CHAR_STRING's new requirement.
16205 * editfns.c (Finsert_char, Fsubst_char_in_region):
16206 * fns.c (concat): Check that character args are actually
16207 characters. Without this test, these functions did the wrong
16208 thing with wildly out-of-range values on 64-bit hosts.
16210 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
16211 These casts should not be needed on 32-bit hosts, either.
16212 * keyboard.c (read_char):
16213 * lread.c (Fload): Remove casts to unsigned.
16215 * lisp.h (UNSIGNED_CMP): New macro.
16216 This fixes comparison bugs on 64-bit hosts.
16217 (ASCII_CHAR_P): Use it.
16218 * casefiddle.c (casify_object):
16219 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
16220 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
16221 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
16222 * dispextern.h (FACE_FROM_ID):
16223 * keyboard.c (read_char): Use UNSIGNED_CMP.
16225 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
16226 not to EMACS_INT, to avoid GCC warning.
16228 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
16230 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
16231 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
16232 isn't needed on 32-bit machines.
16234 * buffer.c (Fgenerate_new_buffer_name):
16235 Use EMACS_INT for count, not int.
16236 (advance_to_char_boundary): Return EMACS_INT, not int.
16238 * data.c (Qcompiled_function): Now static.
16240 * window.c (window_body_lines): Now static.
16242 * image.c (gif_load): Rename local to avoid shadowing.
16244 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
16245 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
16246 * alloc.c (make_save_value): Integer argument is now of type
16247 ptrdiff_t, not int.
16248 (mark_object): Use ptrdiff_t, not int.
16249 * lisp.h (pD): New macro.
16250 * print.c (print_object): Use it.
16252 * alloc.c: Use EMACS_INT, not int, to count objects.
16253 (total_conses, total_markers, total_symbols, total_vector_size)
16254 (total_free_conses, total_free_markers, total_free_symbols)
16255 (total_free_floats, total_floats, total_free_intervals)
16256 (total_intervals, total_strings, total_free_strings):
16257 Now EMACS_INT, not int. All uses changed.
16258 (Fgarbage_collect): Compute overall total using a double, so that
16259 integer overflow is less likely to be a problem. Check for overflow
16260 when converting back to an integer.
16261 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
16262 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
16263 These were 'int' variables that could overflow on 64-bit hosts;
16264 they were never used, so remove them instead of repairing them.
16265 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
16266 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
16267 Previously, this ceilinged at INT_MAX, but that doesn't work on
16269 (allocate_pseudovector): Don't use EMACS_INT when int would do.
16271 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
16272 (allocate_vectorlike): Check for ptrdiff_t overflow.
16273 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
16274 when a (possibly-narrower) signed value would do just as well.
16275 We prefer using signed arithmetic, to avoid comparison confusion.
16277 * alloc.c: Catch some string size overflows that we were missing.
16278 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
16279 for convenience in STRING_BYTES_MAX.
16280 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
16281 The definition here is exact; the one in lisp.h was approximate.
16282 (allocate_string_data): Check for string overflow. This catches
16283 some instances we weren't catching before. Also, it catches
16284 size_t overflow on (unusual) hosts where SIZE_MAX <= min
16285 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
16286 and ptrdiff_t and EMACS_INT are both 64 bits.
16288 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
16289 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
16290 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
16292 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
16294 * alloc.c (Fmake_string): Check for out-of-range init.
16296 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
16298 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
16300 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
16302 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
16303 xg_get_default_scrollbar_width.
16305 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
16306 (int_gtk_range_get_value): Move to the scroll bar part of the file.
16307 (style_changed_cb): Call update_theme_scrollbar_width and call
16308 x_set_scroll_bar_default_width and xg_frame_set_char_size for
16309 all frames (Bug#8505).
16310 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
16311 Call gtk_window_set_resizable if HAVE_GTK3.
16312 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
16313 and height if HAVE_GTK3 (Bug#8505).
16314 (scroll_bar_width_for_theme): New variable.
16315 (update_theme_scrollbar_width): New function.
16316 (xg_get_default_scrollbar_width): Move code to
16317 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
16318 (xg_initialize): Call update_theme_scrollbar_width.
16320 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
16322 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
16324 2011-06-12 Martin Rudalics <rudalics@gmx.at>
16326 * frame.c (make_frame): Call other_buffer_safely instead of
16329 * window.c (temp_output_buffer_show): Call display_buffer with
16330 second argument Vtemp_buffer_show_specifiers and reset latter
16331 immediately after the call.
16332 (Vtemp_buffer_show_specifiers): New variable.
16333 (auto_window_vscroll_p, next_screen_context_lines)
16334 (Vscroll_preserve_screen_position): Remove leading asterisks from
16337 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
16339 Fix minor problems found by GCC 4.6.0 static checking.
16340 * buffer.c (Qclone_number): Remove for now, as it's unused.
16341 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
16342 (record_buffer): Remove unused local.
16343 * frame.c (other_visible_frames, frame_buffer_list): Now static.
16344 (set_frame_buffer_list): Remove; unused.
16345 * frame.h (other_visible_frames): Remove decl.
16346 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
16347 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
16348 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
16350 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
16351 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
16352 Define only if HAVE_GPM.
16353 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
16354 (update_hints_inhibit): Remove; never set. All uses removed.
16355 * widgetprv.h (emacsFrameClassRec): Remove decl.
16356 * window.c (delete_deletable_window): Now returns void, since it
16357 wasn't returning anything.
16358 (compare_window_configurations): Remove unused locals.
16359 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
16360 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
16361 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
16362 the same widths as pointers. This follows up on the 2011-05-06 patch.
16363 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
16364 * xterm.h: Likewise.
16365 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
16367 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
16369 * makefile.w32-in: Update dependencies.
16370 (LISP_H): Add lib/intprops.h.
16372 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
16374 * image.c (gif_load): Add animation frame delay to the metadata.
16375 (syms_of_image): Use DEFSYM. New symbol `delay'.
16377 2011-06-11 Martin Rudalics <rudalics@gmx.at>
16379 * window.c (delete_deletable_window): Re-add.
16380 (Fset_window_configuration): Rewrite to handle dead buffers and
16381 consequently deletable windows.
16382 (window_tree, Fwindow_tree): Remove. Supply functionality in
16384 (compare_window_configurations): Simplify code.
16386 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
16388 * image.c (imagemagick_load_image): Fix type mismatch.
16389 (Fimagemagick_types): Likewise.
16391 * window.h (replace_buffer_in_windows): Declare.
16393 2011-06-11 Martin Rudalics <rudalics@gmx.at>
16395 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
16396 Qclone_number. Remove external declaration of Qdelete_window.
16397 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
16399 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
16400 Run Qbuffer_list_update_hook if allowed.
16401 (Fother_buffer): Rewrite doc-string. Major rewrite for new
16402 buffer list implementation.
16403 (other_buffer_safely): New function.
16404 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
16405 calls to replace_buffer_in_windows and
16406 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
16408 (record_buffer): Inhibit quitting and rewrite using quittable
16409 functions. Run Qbuffer_list_update_hook if allowed.
16410 (Frecord_buffer, Funrecord_buffer): New functions.
16411 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
16412 Move switch-to-buffer to window.el.
16413 (bury-buffer): Move to window.el.
16414 (Vbuffer_list_update_hook): New variable.
16416 * lisp.h (other_buffer_safely): Add prototype in buffer.c
16419 * window.h (resize_frame_windows): Move up in code.
16420 (Fwindow_frame): Remove EXFUN.
16421 (replace_buffer_in_all_windows): Remove prototype.
16422 (replace_buffer_in_windows_safely): Add prototype.
16424 * window.c: Declare Qdelete_window static again. Move down
16425 declaration of select_count.
16426 (Fnext_window, Fprevious_window): Rewrite doc-strings.
16427 (Fother_window): Move to window.el.
16428 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
16429 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
16430 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
16432 (replace_buffer_in_windows): Implement by calling
16433 Qreplace_buffer_in_windows.
16434 (replace_buffer_in_all_windows): Remove with some functionality
16435 moved into replace_buffer_in_windows_safely.
16436 (replace_buffer_in_windows_safely): New function.
16437 (select_window_norecord, select_frame_norecord): Move in front
16438 of run_window_configuration_change_hook. Remove now obsolete
16440 (Fset_window_buffer): Rewrite doc-string.
16441 Call Qrecord_window_buffer.
16442 (keys_of_window): Move binding for other-window to window.el.
16444 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
16446 * dispextern.h (struct image): Replace data member, whose int_val
16447 and ptr_val fields were not used by anything, with a single
16450 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
16451 (gif_clear_image, gif_load, imagemagick_load_image)
16452 (gs_clear_image, gs_load): Callers changed.
16454 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
16456 * buffer.h: Include <time.h>, for time_t.
16457 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
16459 Fix minor problems found by static checking.
16461 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
16463 Make identifiers static if they are not used in other modules.
16464 * data.c (Qcompiled_function, Qframe, Qvector):
16465 * image.c (QimageMagick, Qsvg):
16466 * minibuf.c (Qmetadata):
16467 * window.c (resize_window_check, resize_root_window): Now static.
16468 * window.h (resize_window_check, resize_root_window): Remove decls.
16470 * window.c (window_deletion_count, delete_deletable_window):
16472 (window_body_lines): Now static.
16473 (Fdelete_other_windows_internal): Mark vars as initialized.
16474 Make sure 'resize_failed' is initialized.
16475 (run_window_configuration_change_hook): Rename local to avoid shadowing.
16476 (resize_window_apply): Remove unused local.
16477 * window.h (delete_deletable_window): Remove decl.
16479 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
16480 (imagemagick_load_image): Fix pointer signedness problem by changing
16481 last arg from unsigned char * to char *. All uses changed.
16482 Also, fix a local for similar reasons.
16483 Remove unused locals. Remove locals to avoid shadowing.
16484 (fn_rsvg_handle_free): Remove; unused.
16485 (svg_load, svg_load_image): Fix pointer signedness problem.
16486 (imagemagick_load_image): Don't use garbage pointer image_wand.
16488 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
16490 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
16492 * image.c (gif_load): Fix omitted cast error introduced by
16495 2011-06-10 Martin Rudalics <rudalics@gmx.at>
16497 * window.h (resize_proportionally, orig_total_lines)
16498 (orig_top_line): Remove from window structure.
16499 (set_window_height, set_window_width, change_window_heights)
16500 (Fdelete_window): Remove prototypes.
16501 (resize_frame_windows): Remove duplicate declaration.
16503 2011-06-10 Eli Zaretskii <eliz@gnu.org>
16505 * window.h (resize_frame_windows, resize_window_check)
16506 (delete_deletable_window, resize_root_window)
16507 (resize_frame_windows): Declare prototypes.
16509 * window.c (resize_window_apply): Make definition be "static" to
16510 match the prototype.
16512 2011-06-10 Martin Rudalics <rudalics@gmx.at>
16514 * window.c: Remove declarations of Qwindow_size_fixed,
16515 window_min_size_1, window_min_size_2, window_min_size,
16516 size_window, window_fixed_size_p, enlarge_window, delete_window.
16517 Remove static from declaration of Qdelete_window, it's
16518 temporarily needed by Fbury_buffer.
16519 (replace_window): Don't assign orig_top_line and
16521 (Fdelete_window, delete_window): Remove. Window deletion is
16522 handled by window.el.
16523 (window_loop): Remove DELETE_OTHER_WINDOWS case.
16524 Replace Fdelete_window calls with calls to Qdelete_window.
16525 (Fdelete_other_windows): Remove. Deleting other windows is
16526 handled by window.el.
16527 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
16528 handled in window.el.
16529 (window_min_size_2, window_min_size_1, window_min_size): Remove.
16530 Window minimum sizes are handled in window.el.
16531 (shrink_windows, size_window, set_window_height)
16532 (set_window_width, change_window_heights, window_height)
16533 (window_width, CURBEG, CURSIZE, enlarge_window)
16534 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
16535 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
16536 handled in window.el.
16537 (make_dummy_parent): Rename to make_parent_window and give it a
16538 second argument horflag.
16539 (make_window): Don't set resize_proportionally any more.
16540 (Fsplit_window): Remove. Windows are split in window.el.
16541 (save_restore_action, save_restore_orig_size)
16542 (shrink_window_lowest_first, save_restore_orig_size): Remove.
16543 Resize mini windows in window.el.
16544 (grow_mini_window, shrink_mini_window): Implement by calling
16545 Qresize_root_window_vertically, resize_window_check and
16546 resize_window_apply.
16547 (saved_window, Fset_window_configuration, save_window_save):
16548 Do not handle orig_top_line, orig_total_lines, and
16549 resize_proportionally.
16550 (window_min_height, window_min_width): Move to window.el.
16551 (keys_of_window): Move bindings for delete-other-windows,
16552 split-window, delete-window and enlarge-window to window.el.
16554 * buffer.c: Temporarily extern Qdelete_window.
16555 (Fbury_buffer): Temporarily call Qdelete_window instead of
16556 Fdelete_window (Fbury_buffer will move to window.el soon).
16558 * frame.c (set_menu_bar_lines_1): Remove code handling
16559 orig_top_line and orig_total_lines.
16561 * dispnew.c (adjust_frame_glyphs_initially): Don't use
16562 set_window_height but set heights directly.
16563 (change_frame_size_1): Use resize_frame_windows.
16565 * xdisp.c (init_xdisp): Don't use set_window_height but set
16568 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
16569 Use resize_frame_windows instead of change_window_heights and run
16570 run_window_configuration_change_hook.
16572 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
16573 instead of change_window_heights and run
16574 run_window_configuration_change_hook.
16576 2011-06-09 Martin Rudalics <rudalics@gmx.at>
16578 * window.c (replace_window): Rename second argument REPLACEMENT to
16579 NEW. New third argument SETFLAG. Rewrite.
16580 (delete_window, make_dummy_parent): Call replace_window with
16582 (window_list_1): Move down in code.
16583 (run_window_configuration_change_hook): Move set_buffer part
16584 before select_frame_norecord part in order to unwind correctly.
16585 Rename count1 to count.
16586 (recombine_windows, delete_deletable_window, resize_root_window)
16587 (Fdelete_other_windows_internal)
16588 (Frun_window_configuration_change_hook, make_parent_window)
16589 (resize_window_check, resize_window_apply, Fresize_window_apply)
16590 (resize_frame_windows, Fsplit_window_internal)
16591 (Fdelete_window_internal, Fresize_mini_window_internal):
16593 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
16595 2011-06-08 Martin Rudalics <rudalics@gmx.at>
16597 * window.h (window): Add some new members to window structure -
16598 normal_lines, normal_cols, new_total, new_normal, clone_number,
16599 splits, nest, prev_buffers, next_buffers.
16600 (WINDOW_TOTAL_SIZE): Move here from window.c.
16601 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
16603 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
16605 (make_dummy_parent): Set new members of windows structure.
16606 (make_window): Move down in code. Handle new members of window
16608 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
16609 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
16610 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
16611 (Fset_window_prev_buffers, Fwindow_next_buffers)
16612 (Fset_window_next_buffers, Fset_window_clone_number):
16614 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
16615 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
16617 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
16618 Argument WINDOW can be now internal window too.
16619 (Fwindow_use_time): Move up in code.
16620 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
16621 Rewrite doc-string.
16622 (Fset_window_configuration, saved_window)
16623 (Fcurrent_window_configuration, save_window_save): Handle new
16624 members of window structure.
16625 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
16626 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
16627 (syms_of_window): New Lisp objects Qrecord_window_buffer,
16628 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
16629 Qget_mru_window, Qresize_root_window,
16630 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
16631 Qauto_buffer_name; staticpro them.
16633 2011-06-07 Martin Rudalics <rudalics@gmx.at>
16635 * window.c (Fwindow_total_size, Fwindow_left_column)
16636 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
16637 (Fwindow_list_1): New functions.
16638 (window_box_text_cols): Replace with window_body_cols.
16639 (Fwindow_width, Fscroll_left, Fscroll_right):
16640 Use window_body_cols instead of window_box_text_cols.
16641 (delete_window, Fset_window_configuration):
16642 Call delete_all_subwindows with window as argument.
16643 (delete_all_subwindows): Take a window as argument and not a
16644 structure. Rewrite.
16645 (window_loop): Remove handling of GET_LRU_WINDOW and
16646 GET_LARGEST_WINDOW.
16647 (Fget_lru_window, Fget_largest_window): Move to window.el.
16649 * window.h: Extern window_body_cols instead of
16650 window_box_text_cols. delete_all_subwindows now takes a
16651 Lisp_Object as argument.
16653 * indent.c (compute_motion, Fcompute_motion):
16654 Use window_body_cols instead of window_box_text_cols.
16656 * frame.c (delete_frame): Call delete_all_subwindows with root
16657 window as argument.
16659 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
16661 * fns.c (Fputhash): Document return value.
16663 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
16665 * image.c (gif_load): Implement gif89a spec "no disposal" method.
16667 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
16669 Cons<->int and similar integer overflow fixes (Bug#8794).
16671 Check for overflow when converting integer to cons and back.
16672 * charset.c (Fdefine_charset_internal, Fdecode_char):
16673 Use cons_to_unsigned to catch overflow.
16674 (Fencode_char): Use INTEGER_TO_CONS.
16675 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
16676 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
16677 * data.c (long_to_cons, cons_to_long): Remove.
16678 (cons_to_unsigned, cons_to_signed): New functions.
16679 These signal an error for invalid or out-of-range values.
16680 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
16681 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
16682 * font.c (Ffont_variation_glyphs):
16683 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
16684 * lisp.h: Include <intprops.h>.
16685 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
16686 (cons_to_signed, cons_to_unsigned): New decls.
16687 (long_to_cons, cons_to_long): Remove decls.
16688 * undo.c (record_first_change): Use INTEGER_TO_CONS.
16689 (Fprimitive_undo): Use CONS_TO_INTEGER.
16690 * xfns.c (Fx_window_property): Likewise.
16691 * xselect.c: Include <limits.h>.
16692 (x_own_selection, selection_data_to_lisp_data):
16693 Use INTEGER_TO_CONS.
16694 (x_handle_selection_request, x_handle_selection_clear)
16695 (x_get_foreign_selection, Fx_disown_selection_internal)
16696 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
16697 (lisp_data_to_selection_data): Use cons_to_unsigned.
16698 (x_fill_property_data): Use cons_to_signed.
16699 Report values out of range.
16701 Check for buffer and string overflow more precisely.
16702 * buffer.h (BUF_BYTES_MAX): New macro.
16703 * lisp.h (STRING_BYTES_MAX): New macro.
16704 * alloc.c (Fmake_string):
16705 * character.c (string_escape_byte8):
16706 * coding.c (coding_alloc_by_realloc):
16707 * doprnt.c (doprnt):
16708 * editfns.c (Fformat):
16710 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
16711 since they may not be the same number.
16712 * editfns.c (Finsert_char):
16713 * fileio.c (Finsert_file_contents):
16714 Likewise for BUF_BYTES_MAX.
16716 * image.c: Use ptrdiff_t, not int, for sizes.
16717 (slurp_file): Switch from int to ptrdiff_t.
16719 (slurp_file): Check that file size fits in both size_t (for
16720 malloc) and ptrdiff_t (for sanity and safety).
16722 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
16723 if b->modtime has its maximal value.
16725 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
16727 Don't assume time_t can fit into int.
16728 * buffer.h (struct buffer.modtime): Now time_t, not int.
16729 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
16730 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
16732 Minor fixes for signed vs unsigned integers.
16733 * character.h (MAYBE_UNIFY_CHAR):
16734 * charset.c (maybe_unify_char):
16735 * keyboard.c (read_char, reorder_modifiers):
16736 XINT -> XFASTINT, since the integer must be nonnegative.
16737 * ftfont.c (ftfont_spec_pattern):
16738 * keymap.c (access_keymap, silly_event_symbol_error):
16739 XUINT -> XFASTINT, since the integer must be nonnegative.
16740 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
16741 since it makes no difference and we prefer signed.
16742 * keyboard.c (record_char): Use XUINT when all the neighbors do.
16743 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
16746 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
16748 * window.h (Fwindow_frame): Declare.
16750 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
16752 * alloc.c: Simplify handling of large-request failures (Bug#8800).
16753 (SPARE_MEMORY): Always define.
16754 (LARGE_REQUEST): Remove.
16755 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
16757 2011-06-06 Martin Rudalics <rudalics@gmx.at>
16759 * lisp.h: Move EXFUNS for Fframe_root_window,
16760 Fframe_first_window and Fset_frame_selected_window to window.h.
16762 * window.h: Move EXFUNS for Fframe_root_window,
16763 Fframe_first_window and Fset_frame_selected_window here from
16766 * frame.c (Fwindow_frame, Fframe_first_window)
16767 (Fframe_root_window, Fframe_selected_window)
16768 (Fset_frame_selected_window): Move to window.c.
16769 (Factive_minibuffer_window): Move to minibuf.c.
16770 (Fother_visible_frames_p): New function.
16772 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
16774 * window.c (decode_window, decode_any_window): Move up in code.
16775 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
16776 (inhibit_frame_unsplittable): Remove unused variable.
16777 (Fwindow_buffer): Move up and rewrite doc-string.
16778 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
16779 (Fwindow_prev): New functions.
16780 (Fwindow_frame): Move here from frame.c. Accept any window as
16782 (Fframe_root_window, Fframe_first_window)
16783 (Fframe_selected_window): Move here from frame.c. Accept frame
16784 or arbitrary window as argument. Update doc-strings.
16785 (Fminibuffer_window): Move up in code.
16786 (Fwindow_minibuffer_p): Move up in code and simplify.
16787 (Fset_frame_selected_window): Move here from frame.c.
16789 (Fselected_window, select_window, Fselect_window): Move up in
16790 code. Minor doc-string fixes.
16792 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
16794 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
16795 Do not assume that spare memory exists; that assumption is valid
16796 only if SYSTEM_MALLOC.
16797 (LARGE_REQUEST): New macro, so that the issue of large requests
16798 is separated from the issue of spare memory.
16800 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
16802 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
16805 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
16807 * xfns.c (x_set_scroll_bar_default_width): Move declarations
16810 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
16812 * gtkutil.c (xg_get_default_scrollbar_width): New function.
16814 * gtkutil.h: Declare xg_get_default_scrollbar_width.
16816 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
16817 min width by calling x_set_scroll_bar_default_width (Bug#8505).
16819 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
16821 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
16823 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
16825 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
16826 (x_clipboard_manager_save): Add return value.
16827 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
16828 New error handlers.
16829 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
16830 Obey Vx_select_enable_clipboard_manager. Catch errors in
16831 x_clipboard_manager_save (Bug#8779).
16832 (Vx_select_enable_clipboard_manager): New variable.
16833 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
16835 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
16837 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
16839 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16841 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
16842 in the current matrix if keep_current_p is non-zero.
16844 2011-06-04 Eli Zaretskii <eliz@gnu.org>
16846 * bidi.c (bidi_level_of_next_char): Fix last change.
16848 2011-06-03 Eli Zaretskii <eliz@gnu.org>
16850 Support bidi reordering of text covered by display properties.
16852 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
16853 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
16854 (bidi_cache_search, bidi_cache_iterator_state)
16855 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
16856 (bidi_level_of_next_char, bidi_move_to_visually_next):
16857 Support character positions inside a run of characters covered by a
16859 (bidi_paragraph_init, bidi_resolve_explicit_1)
16860 (bidi_level_of_next_char): Call bidi_fetch_char and
16861 bidi_fetch_char_advance instead of FETCH_CHAR and
16862 FETCH_CHAR_ADVANCE.
16863 (bidi_init_it): Initialize new members.
16864 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
16866 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
16867 instead of using explicit *_CHAR codes.
16868 (bidi_resolve_explicit, bidi_resolve_weak):
16869 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
16870 bidirectional text is supported only in multibyte buffers.
16871 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
16872 it to initialize the frame_window_p member of struct bidi_it.
16873 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
16874 (bidi_resolve_explicit, bidi_resolve_weak)
16875 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
16876 bidi_it->nchars is non-positive.
16877 (bidi_level_of_next_char): Don't try to lookup the cache for the
16878 next/previous character if nothing is cached there yet, or if we
16879 were just reseat()'ed to a new position.
16881 * xdisp.c (set_cursor_from_row): Set start and stop points
16882 according to the row's direction when priming the loop that looks
16883 for the glyph on which to display cursor.
16884 (single_display_spec_intangible_p): Function deleted.
16885 (display_prop_intangible_p): Reimplement to call
16886 handle_display_spec instead of single_display_spec_intangible_p.
16887 Accept 3 additional arguments needed by handle_display_spec.
16888 This fixes incorrect cursor motion across display property with complex
16889 values: lists, `(when COND...)' forms, etc.
16890 (single_display_spec_string_p): Support property values that are
16891 lists with the argument STRING its top-level element.
16892 (display_prop_string_p): Fix the condition for processing a
16893 property that is a list to be consistent with handle_display_spec.
16894 (handle_display_spec): New function, refactored from the
16895 last portion of handle_display_prop.
16896 (compute_display_string_pos): Accept additional argument
16897 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
16898 value of a `display' property is a "replacing spec".
16899 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
16900 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
16901 the display property, but just return a value indicating whether
16902 the display property will replace the characters it covers.
16903 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
16904 frame_window_p members of struct bidi_it.
16905 (compute_display_string_pos, compute_display_string_end):
16907 (push_it): Accept second argument POSITION, where pop_it should
16908 jump to continue iteration.
16909 (reseat_1): Initialize bidi_it.disp_pos.
16911 * keyboard.c (adjust_point_for_property): Adjust the call to
16912 display_prop_intangible_p to its new signature.
16914 * dispextern.h (struct bidi_it): New member frame_window_p.
16915 (bidi_init_it): Update prototypes.
16916 (display_prop_intangible_p): Update prototype.
16917 (compute_display_string_pos, compute_display_string_end):
16918 Declare prototypes.
16919 (struct bidi_it): New members nchars and disp_pos. ch_len is now
16922 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
16924 Malloc failure behavior now depends on size of allocation.
16925 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
16926 * lisp.h: Change signatures accordingly.
16927 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
16928 All callers changed. (Bug#8762)
16930 * gnutls.c: Use Emacs's memory allocators.
16931 Without this change, the gnutls library would invoke malloc etc.
16932 directly, which causes problems on non-SYNC_INPUT hosts, and which
16933 runs afoul of improving memory_full behavior. (Bug#8761)
16934 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
16935 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
16936 xfree instead of the default malloc, realloc, free.
16937 (Fgnutls_boot): No need to check for memory allocation failure,
16938 since xmalloc does that for us.
16940 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
16941 * category.c (hash_get_category_set):
16942 * ccl.c (ccl_driver):
16943 * charset.c (Fdefine_charset_internal):
16944 * charset.h (struct charset.hash_index):
16945 * composite.c (get_composition_id, gstring_lookup_cache)
16946 (composition_gstring_put_cache):
16947 * composite.h (struct composition.hash_index):
16948 * dispextern.h (struct image.hash):
16949 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
16950 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
16951 (hashfn_equal, hashfn_user_defined, make_hash_table)
16952 (maybe_resize_hash_table, hash_lookup, hash_put)
16953 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
16954 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
16955 (Fsxhash, Fgethash, Fputhash, Fmaphash):
16956 * image.c (make_image, search_image_cache, lookup_image)
16957 (xpm_put_color_table_h):
16958 * lisp.h (struct Lisp_Hash_Table):
16959 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
16960 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
16961 for hashes and hash indexes, instead of 'unsigned' and 'int'.
16962 * alloc.c (allocate_vectorlike):
16963 Check for overflow in vector size calculations.
16964 * ccl.c (ccl_driver):
16965 Check for overflow when converting EMACS_INT to int.
16966 * fns.c, image.c: Remove unnecessary static decls that would otherwise
16967 need to be updated by these changes.
16968 * fns.c (make_hash_table, maybe_resize_hash_table):
16969 Check for integer overflow with large hash tables.
16970 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
16971 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
16972 (SXHASH_REDUCE): New macro.
16973 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
16974 Use it instead of discarding useful hash info with large hash values.
16975 (sxhash_float): New function.
16976 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
16977 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
16978 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
16979 Rewrite to use FIXNUM_BITS, as this simplifies things.
16980 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
16981 Adjust signatures to match updated version of code.
16982 (consing_since_gc): Now EMACS_INT, since a single hash table can
16983 use more than INT_MAX bytes.
16985 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
16987 Make it possible to build with GCC-4.6+ -O2 -flto.
16989 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
16991 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
16993 * minibuf.c (get_minibuffer, read_minibuf_unwind):
16994 Call minibuffer-inactive-mode.
16996 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
16998 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
16999 Update dependencies.
17001 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17003 * data.c (init_data): Remove code for UTS, this system is not
17006 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17008 Don't force ./temacs to start in terminal mode.
17010 * frame.c (make_initial_frame): Initialize faces in all cases, not
17011 only when CANNOT_DUMP is defined.
17012 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
17014 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17016 * dispnew.c (add_window_display_history): Use const for the string
17017 pointer. Remove declaration, not needed.
17019 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
17021 Use 'inline', not 'INLINE'.
17022 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
17023 * alloc.c, fontset.c (INLINE): Remove.
17024 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
17025 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
17026 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
17027 * gmalloc.c (register_heapinfo): Use inline unconditionally.
17028 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
17030 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
17032 Make it possible to run ./temacs.
17034 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
17035 syms_of_callproc does the same thing. Remove test for
17036 "initialized", do it in the caller.
17037 * emacs.c (main): Avoid calling set_initial_environment when dumping.
17039 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
17041 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
17042 (read_minibuf): Use get_minibuffer.
17043 (syms_of_minibuf): Use DEFSYM.
17044 (Qmetadata): New var.
17045 * data.c (Qbuffer): Don't make it static.
17046 (syms_of_data): Use DEFSYM.
17048 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
17050 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
17051 (CCL_CODE_MIN): New macro.
17053 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
17055 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
17057 * eval.c (Qdebug): Now static.
17058 * lisp.h (Qdebug): Remove decl. This reverts a part of the
17059 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
17060 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
17062 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
17064 * image.c: Various fixes to ImageMagick code comments.
17065 (Fimagemagick_types): Doc fix.
17067 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
17069 Minor fixes prompted by GCC 4.6.0 warnings.
17071 * xselect.c (converted_selections, conversion_fail_tag): Now static.
17073 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
17074 (x_clipboard_manager_save_all): Move extern decl to ...
17075 * xterm.h: ... here, so that it can be checked for consistency.
17077 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
17079 * xselect.c (x_clipboard_manager_save_frame)
17080 (x_clipboard_manager_save_all): New functions.
17081 (Fx_clipboard_manager_save): Lisp function deleted.
17083 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
17084 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
17086 * xterm.h: Update prototype.
17088 2011-05-28 William Xu <william.xwl@gmail.com>
17090 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
17091 exiting (Bug#8239).
17093 2011-05-28 Jim Meyering <meyering@redhat.com>
17095 Avoid a sign-extension bug in crypto_hash_function.
17096 * fns.c (to_uchar): Define.
17097 (crypto_hash_function): Use it to convert some newly-signed
17098 variables to unsigned, to avoid sign-extension bugs. For example,
17099 without this change, (md5 "truc") would evaluate to
17100 45723a2aff78ff4fff7fff1114760e62 rather than the expected
17101 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
17102 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
17104 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17106 Integer overflow fixes.
17108 * dbusbind.c: Serial number integer overflow fixes.
17109 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
17110 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
17111 to hold a serial number that is too large for a fixnum.
17112 (Fdbus_method_return_internal, Fdbus_method_error_internal):
17113 Check for serial numbers out of range. Decode any serial number
17114 that was so large that it became a float. (Bug#8722)
17116 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
17117 (Fdbus_call_method, Fdbus_call_method_asynchronously):
17118 Use XFASTINT rather than XUINT when numbers are nonnegative.
17119 (xd_append_arg, Fdbus_method_return_internal):
17120 (Fdbus_method_error_internal): Likewise. Also, for unsigned
17121 arguments, check that Lisp number is nonnegative, rather than
17122 silently wrapping negative numbers around. (Bug#8722)
17123 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
17126 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
17128 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
17130 ccl: Add integer overflow checks.
17131 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
17132 (IN_INT_RANGE): New macros.
17133 (ccl_driver): Use them to check for integer overflow when
17134 decoding a CCL program. Many of the new checks are whether XINT (x)
17135 fits in int; it doesn't always, on 64-bit hosts. The new version
17136 doesn't catch all possible integer overflows, but it's an
17137 improvement. (Bug#8719)
17139 * alloc.c (make_event_array): Use XINT, not XUINT.
17140 There's no need for unsigned here.
17142 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
17143 This follows up to the 2011-05-06 change that substituted uintptr_t
17144 for EMACS_INT. This case wasn't caught back then.
17146 Rework Fformat to avoid integer overflow issues.
17147 * editfns.c: Include <float.h> unconditionally, as it's everywhere
17148 now (part of C89). Include <verify.h>.
17149 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
17150 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
17151 (Fformat): Avoid the prepass trying to compute sizes; it was only
17152 approximate and thus did not catch overflow reliably. Instead, walk
17153 through the format just once, formatting and computing sizes as we go,
17154 checking for integer overflow at every step, and allocating a larger
17155 buffer as needed. Keep track separately whether the format is
17156 multibyte. Keep only the most-recently calculated precision, rather
17157 than them all. Record whether each argument has been converted to
17158 string. Use EMACS_INT, not int, for byte and char and arg counts.
17159 Support field widths and precisions larger than INT_MAX. Avoid
17160 sprintf's undefined behavior with conversion specifications such as %#d
17161 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
17162 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
17163 formatting out-of-range floating point numbers with int
17164 formats. (Bug#8668)
17166 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
17168 * data.c: Avoid integer truncation in expressions involving floats.
17169 * data.c: Include <intprops.h>.
17170 (arith_driver): When there's an integer overflow in an expression
17171 involving floating point, convert the integers to floating point
17172 so that the resulting value does not suffer from catastrophic
17173 integer truncation. For example, on a 64-bit host (* 4
17174 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
17175 Do not rely on undefined behavior after integer overflow.
17177 merge count_size_as_multibyte, parse_str_to_multibyte
17178 * character.c, character.h (count_size_as_multibyte):
17179 Rename from parse_str_to_multibyte; all uses changed.
17180 Check for integer overflow.
17181 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
17182 since it's now a duplicate of the other. This is more of
17183 a character than a buffer op, so better that it's in character.c.
17184 * fns.c, print.c: Adjust to above changes.
17186 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
17188 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
17190 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
17192 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17193 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
17194 (x_clipboard_manager_save): Now static.
17195 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
17197 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
17198 (crypto_hash_function): Now static.
17199 Fix pointer signedness problems. Avoid unnecessary initializations.
17201 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
17203 * termhooks.h (Vselection_alist): Make it terminal-local.
17205 * terminal.c (create_terminal): Initialize it.
17207 * xselect.c: Support for clipboard managers.
17208 (Vselection_alist): Move to termhooks.h as terminal-local var.
17209 (LOCAL_SELECTION): New macro.
17210 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
17211 (symbol_to_x_atom): Remove gratuitous arg.
17212 (x_handle_selection_request, lisp_data_to_selection_data)
17213 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
17214 (x_own_selection, x_get_local_selection, x_convert_selection):
17215 New arg, specifying work frame. Use terminal-local Vselection_alist.
17216 (some_frame_on_display): Delete unused function.
17217 (Fx_own_selection_internal, Fx_get_selection_internal)
17218 (Fx_disown_selection_internal, Fx_selection_owner_p)
17219 (Fx_selection_exists_p): New optional frame arg.
17220 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
17221 (x_handle_selection_clear): Don't treat other terminals with the
17222 same keyboard specially. Use the terminal-local Vselection_alist.
17223 (x_clear_frame_selections): Use Frun_hook_with_args.
17225 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
17227 * xterm.h: Add support for those atoms.
17229 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
17231 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
17232 (converted_selections, conversion_fail_tag): New global variables.
17233 (x_selection_request_lisp_error): Free the above.
17234 (x_get_local_selection): Remove unnecessary code.
17235 (x_reply_selection_request): Args changed; handle arbitrary array
17236 of converted selections stored in converted_selections.
17237 Separate the XChangeProperty and SelectionNotify steps.
17238 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
17239 (x_convert_selection): New function.
17240 (x_handle_selection_event): Simplify.
17241 (x_get_foreign_selection): Don't ignore incoming requests while
17242 waiting for an answer; this will fail when we implement
17243 SAVE_TARGETS, and seems unnecessary anyway.
17244 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
17245 (Vx_sent_selection_functions): Doc fix.
17247 2011-05-26 Leo Liu <sdl.web@gmail.com>
17249 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
17251 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17253 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
17255 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
17256 for fringe update if it has periodic bitmap.
17257 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
17258 and fringe_bitmap_periodic_p.
17260 * fringe.c (get_fringe_bitmap_data): New function.
17261 (draw_fringe_bitmap_1, update_window_fringes): Use it.
17262 (update_window_fringes): Record periodicity of fringe bitmap in glyph
17263 row. Mark glyph row for fringe update if periodicity changed.
17265 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
17266 for fringe update unless it has periodic bitmap.
17268 2011-05-25 Kenichi Handa <handa@m17n.org>
17270 * xdisp.c (get_next_display_element): Set correct it->face_id for
17271 a static composition.
17273 2011-05-24 Leo Liu <sdl.web@gmail.com>
17276 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
17278 * fns.c (crypto_hash_function, Fsha1): New function.
17279 (Fmd5): Use crypto_hash_function.
17280 (syms_of_fns): Add Ssha1.
17282 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17284 * gnutls.c: Remove unused macros.
17285 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
17286 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
17287 Remove macros that are defined and never used.
17288 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
17290 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
17292 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
17293 (Fx_get_selection_internal): Minor cleanup.
17294 (Fx_own_selection_internal): Rename arguments for consistency with
17297 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
17299 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
17301 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
17303 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
17305 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17307 * dispnew.c (scrolling_window): Don't exclude the case that the
17308 last enabled row in the desired matrix touches the bottom boundary.
17310 2011-05-21 Glenn Morris <rgm@gnu.org>
17312 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
17313 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
17314 and add some more files.
17316 2011-05-20 Eli Zaretskii <eliz@gnu.org>
17318 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
17319 report_file_error introduced by the change from 2011-05-07.
17321 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
17323 * systime.h (Time): Define only if emacs is defined.
17324 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
17325 where the include path doesn't have X11/X.h by default. See
17326 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
17328 2011-05-20 Kenichi Handa <handa@m17n.org>
17330 * composite.c (find_automatic_composition): Fix previous change.
17332 2011-05-20 Glenn Morris <rgm@gnu.org>
17334 * lisp.mk: New file, split from Makefile.in.
17335 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
17336 (shortlisp): Remove.
17337 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
17339 2011-05-19 Glenn Morris <rgm@gnu.org>
17341 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
17342 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
17343 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
17344 (lisp): Set the order to that of loadup.el.
17345 (shortlisp): Make it a copy of $lisp.
17346 (SOME_MACHINE_LISP): Remove.
17347 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
17348 Use just $shortlisp, not $SOME_MACHINE_LISP too.
17350 2011-05-18 Kenichi Handa <handa@m17n.org>
17352 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
17353 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
17354 (find_automatic_composition): Mostly rewrite for efficiency.
17356 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
17358 * makefile.w32-in: Update dependencies.
17360 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
17362 * menu.c: Include limits.h (fixes the MS-Windows build broken by
17363 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
17365 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
17367 Fix some integer overflow issues, such as string length overflow.
17369 * insdel.c (count_size_as_multibyte): Check for string overflow.
17371 * character.c (lisp_string_width): Check for string overflow.
17372 Use EMACS_INT, not int, for string indexes and lengths; in
17373 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
17374 the resulting string length overflows an EMACS_INT; instead,
17375 report a string overflow if no precision given. When checking for
17376 precision exhaustion, use a check that cannot possibly have
17377 integer overflow. (Bug#8675)
17378 * character.h (lisp_string_width): Adjust to new signature.
17380 * alloc.c (string_overflow): New function.
17381 (Fmake_string): Use it. This doesn't change behavior, but saves
17382 a few bytes and will simplify future changes.
17383 * character.c (string_escape_byte8): Likewise.
17384 * lisp.h (string_overflow): New decl.
17386 Fixups, following up to the user-interface timestamp change.
17387 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
17388 for UI timestamps, instead of unsigned long.
17389 * msdos.c (mouse_get_pos): Likewise.
17390 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
17391 * w32gui.h (Time): Define by including "systime.h" rather than by
17392 declaring it ourselves. (Bug#8664)
17394 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
17395 * image.c (clear_image_cache): Likewise.
17397 * term.c (term_mouse_position): Don't assume time_t wraparound.
17399 Be more systematic about user-interface timestamps.
17400 Before, the code sometimes used 'Time', sometimes 'unsigned long',
17401 and sometimes 'EMACS_UINT', to represent these timestamps.
17402 This change causes it to use 'Time' uniformly, as that's what X uses.
17403 This makes the code easier to follow, and makes it easier to catch
17404 integer overflow bugs such as Bug#8664.
17405 * frame.c (Fmouse_position, Fmouse_pixel_position):
17406 Use Time, not unsigned long, for user-interface timestamps.
17407 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
17408 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
17409 * keyboard.h (last_event_timestamp): Likewise.
17410 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
17411 * menu.h (xmenu_show): Likewise.
17412 * term.c (term_mouse_position): Likewise.
17413 * termhooks.h (struct input_event.timestamp): Likewise.
17414 (struct terminal.mouse_position_hook): Likewise.
17415 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
17416 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
17417 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
17418 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
17419 what it was before.
17420 * menu.h, termhooks.h: Include "systime.h", for Time.
17422 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
17423 Don't assume that the difference between two unsigned long values
17424 can fit into an integer. At this point, we know button_down_time
17425 <= event->timestamp, so the difference must be nonnegative, so
17426 there's no need to cast the result if double-click-time is
17427 nonnegative, as it should be; check that it's nonnegative, just in
17428 case. This bug is triggered when events are more than 2**31 ms
17429 apart (about 25 days). (Bug#8664)
17431 * xselect.c (last_event_timestamp): Remove duplicate decl.
17432 (x_own_selection): Remove needless cast to unsigned long.
17434 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
17435 that always fit in int. Use a sentinel instead of a counter, to
17436 avoid a temp and to allay GCC's concerns about possible int overflow.
17437 * frame.h (struct frame): Use int for menu_bar_items_used
17438 instead of EMACS_INT, since it always fits in int.
17440 * menu.c (grow_menu_items): Check for int overflow.
17442 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
17444 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
17445 Before, the code was not consistent. These values cannot exceed
17446 2**31 - 1 so there's no need to make them unsigned.
17447 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
17448 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
17449 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
17451 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
17453 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
17454 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
17455 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
17456 presumably because the widths might not match.
17458 * window.c (size_window): Avoid needless test at loop start.
17460 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
17462 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
17464 2011-05-12 Drew Adams <drew.adams@oracle.com>
17466 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
17468 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17470 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
17471 `width' to `bar_area_x' and `bar_area_width', respectively.
17472 (x_scroll_run): Take account of fringe background extension.
17474 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
17475 Rename local vars `left' and `width' to `bar_area_x' and
17476 `bar_area_width', respectively.
17477 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
17478 background extension.
17480 2011-05-10 Jim Meyering <meyering@redhat.com>
17482 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
17484 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
17486 * image.c (Finit_image_library): Return t for built-in image types,
17487 like pbm and xbm. (Bug#8640)
17489 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
17491 * w32menu.c (set_frame_menubar): Fix submenu allocation.
17493 2011-05-07 Eli Zaretskii <eliz@gnu.org>
17495 * w32console.c (Fset_screen_color): Doc fix.
17496 (Fget_screen_color): New function.
17497 (syms_of_ntterm): Defsubr it.
17499 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
17500 unlink the temporary file if Fcall_process didn't create it in the
17502 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
17503 child process will be redirected to a file specified with `:file'.
17504 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
17505 cue to call_process_cleanup not to close that handle.
17507 2011-05-07 Ben Key <bkey76@gmail.com>
17509 * makefile.w32-in: The bootstrap-temacs rule now makes use of
17510 one of two shell specific rules, either bootstrap-temacs-CMD or
17511 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
17512 to the previous implementation of the bootstrap-temacs rule.
17513 The bootstrap-temacs-CMD rule is similar to the previous
17514 implementation of the bootstrap-temacs rule except that it
17515 makes use of the ESC_CFLAGS variable instead of the CFLAGS
17518 These changes, along with some changes to nt/configure.bat,
17519 nt/gmake.defs, and nt/nmake.defs, are required to extend my
17520 earlier fix to add support for --cflags and --ldflags options
17521 that include quotes so that it works whether make uses cmd or
17524 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
17526 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
17527 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
17529 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
17530 a string. Handle both cases.
17531 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
17532 (Fdbus_register_method): Use Qinvalid_function.
17534 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
17536 * makefile.w32-in: Update dependencies.
17537 (LISP_H): Add inttypes.h and stdin.h.
17538 (PROCESS_H): Add unistd.h.
17540 2011-05-06 Eli Zaretskii <eliz@gnu.org>
17542 * lread.c: Include limits.h (fixes the MS-Windows build broken by
17543 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
17545 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
17547 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
17549 * term.c (vfatal): Remove stray call to va_end.
17550 It's not needed and the C Standard doesn't allow it here anyway.
17552 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
17553 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
17555 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
17558 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
17560 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
17562 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
17564 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
17566 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
17568 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
17569 * charset.c (Fdefine_charset_internal): Don't initialize
17570 charset.code_space[15]. The value was garbage, on hosts with
17571 32-bit int (Bug#8600).
17573 * lread.c (read_integer): Be more consistent with string-to-number.
17574 Use string_to_number to do the actual conversion; this avoids
17575 rounding errors and fixes some other screwups. Without this fix,
17576 for example, #x1fffffffffffffff was misread as -2305843009213693952.
17577 (digit_to_number): Move earlier, for benefit of read_integer.
17578 Return -1 if the digit is out of range for the base, -2 if it is
17579 not a digit in any supported base. (Bug#8602)
17581 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
17583 * dispnew.c (scrolling_window): Return 1 if we scrolled,
17584 to match comment at start of function. This also removes a
17585 GCC warning about overflow in a 32+64-bit port.
17587 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
17589 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
17590 Reported by Stefan Monnier in
17591 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
17592 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
17593 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
17595 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
17596 (EMACS_UINTPTR): Likewise, with uintptr_t.
17598 * lisp.h: Prefer 64-bit EMACS_INT if available.
17599 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
17600 on 32-bit hosts that have 64-bit int, so that they can access
17602 However, temporarily disable this change unless the temporary
17603 symbol WIDE_EMACS_INT is defined.
17605 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
17607 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
17608 This removes an assumption that EMACS_INT and long are the same
17609 width as pointers. The assumption is true for Emacs porting targets
17610 now, but we want to make other targets possible.
17611 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
17612 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
17613 In the rest of the code, change types of integers that hold casted
17614 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
17615 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
17616 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
17617 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
17618 No need to cast type when ORing.
17619 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
17620 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
17621 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
17622 assume EMACS_INT is the same width as char *.
17623 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
17624 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
17625 Remove no-longer-needed casts.
17626 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
17627 (xg_tool_bar_help_callback, xg_make_tool_item):
17628 Use EMACS_INTPTR to hold an integer
17629 that will be cast to void *; this can avoid a GCC warning
17630 if EMACS_INT is not the same width as void *.
17631 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
17632 * xdisp.c (display_echo_area_1, resize_mini_window_1):
17633 (current_message_1, set_message_1):
17634 Use a local to convert to proper width without a cast.
17635 * xmenu.c (dialog_selection_callback): Likewise.
17637 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
17638 Also, don't assume VALBITS / RAND_BITS is less than 5,
17639 and don't rely on undefined behavior when shifting a 1 left into
17641 * lisp.h (get_random): Change signature to match.
17643 * lread.c (hash_string): Use size_t, not int, for hash computation.
17644 Normally we prefer signed values; but hashing is special, because
17645 it's better to use unsigned division on hash table sizes so that
17646 the remainder is nonnegative. Also, size_t is the natural width
17647 for hashing into memory. The previous code used 'int', which doesn't
17648 retain enough info to hash well into very large tables.
17649 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
17651 * dbusbind.c: Don't possibly lose pointer info when converting.
17652 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
17653 Use XPNTR rather than XHASH, so that the high-order bits of
17654 the pointer aren't lost when converting through void *.
17656 * eval.c (Fautoload): Don't double-shift a pointer.
17658 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
17660 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
17662 * gnutls.c (DEF_GNUTLS_FN):
17663 * image.c (DEF_IMGLIB_FN): Make function pointers static.
17665 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
17667 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
17670 2011-05-05 Eli Zaretskii <eliz@gnu.org>
17672 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
17673 New version that can reserve upto 2GB of heap space.
17675 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
17677 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
17679 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
17681 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
17682 `gnutls_certificate_set_x509_key_file'.
17684 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
17686 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
17687 Update dependencies.
17689 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
17691 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
17692 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
17693 Remove unused parameter `fildes'.
17694 * process.c (read_process_output, send_process): Don't pass it.
17696 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
17698 Fix previous change: the library cache is defined in w32.c.
17699 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
17700 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
17702 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
17704 Implement dynamic loading of GnuTLS on Windows.
17706 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
17707 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
17708 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
17711 * gnutls.c (Qgnutls_dll): Define.
17712 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
17713 (gnutls_*): Declare function pointers.
17714 (init_gnutls_functions): New function to initialize function pointers.
17715 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
17716 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
17717 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
17718 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
17719 (emacs_gnutls_write, emacs_gnutls_read)
17720 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
17721 (Fgnutls_available_p): New function.
17722 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
17723 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
17724 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
17726 * image.c: Include w32.h.
17727 (Vimage_type_cache): Delete.
17728 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
17729 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
17730 (w32_delayed_load): Move to w32.c.
17732 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
17734 * w32.c (QCloaded_from, Vlibrary_cache): Define.
17735 (w32_delayed_load): Move from image.c. When loading a library, record
17736 its filename in the :loaded-from property of the library id.
17737 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
17738 Initialize and staticpro them.
17739 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
17741 * process.c: Include lisp.h before w32.h, not after.
17742 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
17743 instead of gnutls_record_check_pending.
17745 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
17747 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
17749 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
17750 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
17753 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
17755 * xterm.c (x_set_frame_alpha): Do not set property on anything
17756 else than FRAME_X_OUTER_WINDOW (Bug#8608).
17758 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
17760 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
17762 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
17764 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
17765 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
17766 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
17767 (gnutls_global_initialized, Qgnutls_bootprop_priority)
17768 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
17769 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
17770 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
17771 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
17772 (Qgnutls_bootprop_callbacks_verify): Make static.
17774 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
17776 * callproc.c: Indentation fixup.
17778 * sysdep.c (wait_for_termination_1): Make static.
17779 (wait_for_termination, interruptible_wait_for_termination):
17780 Move after wait_for_termination_1.
17782 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
17784 * sysdep.c (interruptible_wait_for_termination): New function
17785 which is like wait_for_termination, but allows keyboard
17788 * callproc.c (Fcall_process): Add (:file "file") as an option for
17790 (Fcall_process_region): Ditto.
17792 2011-04-30 Eli Zaretskii <eliz@gnu.org>
17794 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
17795 rather than `XVECTOR (FOO)->size'.
17797 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
17798 inttypes.h, as a gnulib replacement is used if it not available in
17801 2011-04-21 Eli Zaretskii <eliz@gnu.org>
17803 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
17804 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
17805 of MOST_POSITIVE_FIXNUM. (Bug#8528)
17807 * coding.c (coding_alloc_by_realloc): Error out if destination
17808 will grow beyond MOST_POSITIVE_FIXNUM.
17809 (decode_coding_emacs_mule): Abort if there isn't enough place in
17810 charbuf for the composition carryover bytes. Reserve an extra
17811 space for up to 2 characters produced in a loop.
17812 (decode_coding_iso_2022): Abort if there isn't enough place in
17813 charbuf for the composition carryover bytes.
17815 2011-04-21 Eli Zaretskii <eliz@gnu.org>
17817 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
17818 aborting when %lld or %lll format is passed.
17819 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
17820 %llo or %llx format is passed. (Bug#8545)
17822 * window.c (window_scroll_line_based): Use a marker instead of
17823 simple variables to record original value of point. (Bug#7952)
17825 * doprnt.c (doprnt): Fix the case where a multibyte sequence
17826 produced by %s or %c overflows available buffer space. (Bug#8545)
17828 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
17830 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
17831 (SIZE_MAX): Move defn after all includes, as they might #define it.
17833 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
17835 * w32.c (init_environment): Warn about defaulting HOME to C:\.
17837 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
17839 * keyboard.c (Qdelayed_warnings_hook): Define.
17840 (command_loop_1): Run `delayed-warnings-hook'
17841 if Vdelayed_warnings_list is non-nil.
17842 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
17843 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
17845 2011-04-28 Eli Zaretskii <eliz@gnu.org>
17847 * doprnt.c (doprnt): Don't return value smaller than the buffer
17848 size if the message was truncated. (Bug#8545).
17850 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
17852 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
17853 (Fx_window_property): #if-0 the whole functions, not just the bodies.
17855 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
17857 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
17859 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
17861 * makefile.w32-in: Update dependencies.
17863 2011-04-27 Eli Zaretskii <eliz@gnu.org>
17865 Improve `doprnt' and its usage. (Bug#8545)
17866 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
17867 `format_end'. Remove support for %l as a conversion specifier.
17868 Don't use xrealloc. Improve diagnostics when the %l size modifier
17869 is used. Update the commentary.
17871 * eval.c (verror): Simplify calculation of size_t.
17873 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
17876 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
17878 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
17881 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
17883 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
17884 This makes this file independent of the recent pseudovector change.
17886 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
17888 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
17890 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
17891 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
17892 Remove unused local.
17893 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
17895 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
17896 GCC 4.6.0 optimizes based on type-based alias analysis.
17897 For example, if b is of type struct buffer * and v of type struct
17898 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
17899 != &v->size, and therefore "v->size = 1; b->size = 2; return
17900 v->size;" must therefore return 1. This assumption is incorrect
17901 for Emacs, since it type-puns struct Lisp_Vector * with many other
17902 types. To fix this problem, this patch adds a new type struct
17903 vectorlike_header that documents the constraints on layout of vectors
17904 and pseudovectors, and helps optimizing compilers not get fooled
17905 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
17906 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
17907 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
17909 (XSETPVECTYPE): Rewrite in terms of new macro.
17910 (XSETPVECTYPESIZE): New macro, specifying both type and size.
17911 This is a bit clearer, and further avoids the possibility of
17912 undesirable aliasing.
17913 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
17914 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
17915 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
17916 since Lisp_Subr is a special case (no "next" field).
17917 (ASIZE): Now uses header.size rather than size.
17918 All previous uses of XVECTOR (foo)->size replaced to use this macro,
17919 to avoid the hassle of writing XVECTOR (foo)->header.size.
17920 (struct vectorlike_header): New type.
17921 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
17922 object, to help avoid aliasing.
17923 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
17924 (SUBRP): Likewise, since Lisp_Subr is a special case.
17925 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
17926 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
17927 (struct Lisp_Hash_Table): Combine first two members into a single
17928 struct vectorlike_header member. All uses of "size" and "next" members
17929 changed to be "header.size" and "header.next".
17930 * buffer.h (struct buffer): Likewise.
17931 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
17932 * frame.h (struct frame): Likewise.
17933 * process.h (struct Lisp_Process): Likewise.
17934 * termhooks.h (struct terminal): Likewise.
17935 * window.c (struct save_window_data, struct saved_window): Likewise.
17936 * window.h (struct window): Likewise.
17937 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
17938 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
17939 * buffer.c (init_buffer_once): Likewise.
17940 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
17942 * process.c (Fformat_network_address): Use local var for size,
17945 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
17947 Make the Lisp reader and string-to-float more consistent (Bug#8525)
17948 * data.c (atof): Remove decl; no longer used or needed.
17949 (digit_to_number): Move to lread.c.
17950 (Fstring_to_number): Use new string_to_number function, to be
17951 consistent with how the Lisp reader treats infinities and NaNs.
17952 Do not assume that floating-point numbers represent EMACS_INT
17953 without losing information; this is not true on most 64-bit hosts.
17954 Avoid double-rounding errors, by insisting on integers when
17955 parsing non-base-10 numbers, as the documentation specifies.
17956 * lisp.h (string_to_number): New decl, replacing ...
17957 (isfloat_string): Remove.
17958 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
17959 (read1): Do not accept +. and -. as integers; this
17960 appears to have been a coding error. Similarly, do not accept
17961 strings like +-1e0 as floating point numbers. Do not report
17962 overflow for integer overflows unless the base is not 10 which
17963 means we have no simple and reliable way to continue.
17964 Break out the floating-point parsing into a new
17965 function string_to_number, so that Fstring_to_number parses
17966 floating point numbers consistently with the Lisp reader.
17967 (digit_to_number): Move here from data.c. Make it static inline.
17968 (E_CHAR, EXP_INT): Remove, replacing with ...
17969 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
17970 (string_to_number): New function, replacing isfloat_string.
17971 This function checks for valid syntax and produces the resulting
17972 Lisp float number too. Rework it so that string-to-number
17973 no longer mishandles examples like "1.0e+". Use strtoumax,
17974 so that overflow for non-base-10 numbers is reported only when
17975 there's no portable and simple way to convert to floating point.
17977 * textprop.c (set_text_properties_1): Rewrite for clarity,
17978 and to avoid GCC warning about integer overflow.
17980 * intervals.h (struct interval): Use EMACS_INT for members
17981 where EMACS_UINT might cause problems. See
17982 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
17983 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
17984 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
17986 (offset_intervals): Tell GCC not to worry about length overflow
17987 when negating a negative length.
17989 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
17990 (overrun_check_free): Likewise.
17992 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
17993 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
17996 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
17997 (gnutls_make_error): Rename local to avoid shadowing.
17998 (gnutls_emacs_global_deinit): ifdef out; not used.
17999 (Fgnutls_boot): Use const for pointer to readonly storage.
18000 Comment out unused local. Fix pointer signedness problems.
18002 * lread.c (openp): Don't stuff size_t into an 'int'.
18003 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
18004 about possible signed overflow.
18006 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
18007 (GDK_KEY_g): Don't define if already defined.
18008 (xg_prepare_tooltip): Avoid pointer signedness problem.
18009 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
18011 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
18012 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
18014 * xfns.c (Fx_window_property): Simplify a bit,
18015 to make a bit faster and to avoid GCC 4.6.0 warning.
18016 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
18018 * fns.c (internal_equal): Don't assume size_t fits in int.
18020 * alloc.c (compact_small_strings): Tighten assertion a little.
18022 Replace pEd with more-general pI, and fix some printf arg casts.
18023 * lisp.h (pI): New macro, generalizing old pEd macro to other
18024 conversion specifiers. For example, use "...%"pI"d..." rather
18025 than "...%"pEd"...".
18026 (pEd): Remove. All uses replaced with similar uses of pI.
18027 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
18028 * alloc.c (check_pure_size): Don't overflow by converting size to int.
18029 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
18030 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
18031 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
18032 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
18033 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
18035 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
18036 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
18037 * print.c (safe_debug_print, print_object): Likewise.
18038 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
18040 Use pI instead of if-then-else-abort. Use %p to avoid casts,
18041 avoiding the 0 flag, which is not portable.
18042 * process.c (Fmake_network_process): Use pI to avoid cast.
18043 * region-cache.c (pp_cache): Likewise.
18044 * xdisp.c (decode_mode_spec): Likewise.
18045 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
18046 behavior on 64-bit hosts with printf arg.
18047 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
18048 (x_stop_queuing_selection_requests): Likewise.
18049 (x_get_window_property): Don't truncate byte count to an 'int'
18052 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
18053 here, since it parses constructs like leading '-' and spaces,
18054 which are not wanted; and it overflows with large numbers.
18055 Instead, simply match F[0-9]+, which is what is wanted anyway.
18057 * alloc.c: Remove unportable assumptions about struct layout.
18058 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
18059 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
18060 (allocate_vectorlike, make_pure_vector): Use the new macros,
18061 plus offsetof, to remove unportable assumptions about struct layout.
18062 These assumptions hold on all porting targets that I know of, but
18063 they are not guaranteed, they're easy to remove, and removing them
18064 makes further changes easier.
18066 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
18067 This doesn't fix a bug but makes the code clearer.
18068 (string_overrun_cookie): Now const. Use initializers that
18069 don't formally overflow signed char, to avoid warnings.
18070 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
18071 can cause Emacs to crash when string overrun checking is enabled.
18072 (allocate_buffer): Don't assume sizeof (struct buffer) is a
18073 multiple of sizeof (EMACS_INT); it need not be, if
18074 alignof(EMACS_INT) < sizeof (EMACS_INT).
18075 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
18077 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
18079 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
18081 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
18083 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
18084 supposed to be handshaking. (Bug#8556)
18085 Reported by Paul Eggert <eggert@cs.ucla.edu>.
18087 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
18089 * lisp.h (Qdebug): List symbol.
18090 * eval.c (Qdebug): Restore global linkage.
18091 * keyboard.c (debug-on-event): New variable.
18092 (handle_user_signal): Break into debugger when debug-on-event
18093 matches the current signal symbol.
18095 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
18097 * alloc.c (check_sblock, check_string_bytes)
18098 (check_string_free_list): Convert to standard C.
18100 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
18102 * w32.c (emacs_gnutls_push): Fix typo.
18104 2011-04-25 Eli Zaretskii <eliz@gnu.org>
18106 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
18107 "cast to pointer from integer of different size".
18109 Improve doprnt and its use in verror. (Bug#8545)
18110 * doprnt.c (doprnt): Document the set of format control sequences
18111 supported by the function. Use SAFE_ALLOCA instead of always
18114 * eval.c (verror): Don't limit the buffer size at size_max-1, that
18115 is one byte too soon. Don't use xrealloc; instead xfree and
18118 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
18120 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
18123 * gnutls.c: Renamed global_initialized to
18124 gnutls_global_initialized. Added internals for the
18125 :verify-hostname-error, :verify-error, and :verify-flags
18126 parameters of `gnutls-boot' and documented those parameters in the
18127 docstring. Start callback support.
18128 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
18129 unless a fatal error occurred. Call gnutls_alert_send_appropriate
18130 on error. Return error code.
18131 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
18132 (emacs_gnutls_read): Likewise.
18133 (Fgnutls_boot): Return handshake error code.
18134 (emacs_gnutls_handle_error): New function.
18135 (wsaerror_to_errno): Likewise.
18137 * w32.h (emacs_gnutls_pull): Add prototype.
18138 (emacs_gnutls_push): Likewise.
18140 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
18141 (emacs_gnutls_push): Likewise.
18143 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
18145 * process.c (wait_reading_process_output): Check if GnuTLS
18146 buffered some data internally if no FDs are set for TLS
18149 * makefile.w32-in (OBJ2): Add gnutls.$(O).
18150 (LIBS): Link to USER_LIBS.
18151 ($(BLD)/gnutls.$(0)): New target.
18153 2011-04-24 Eli Zaretskii <eliz@gnu.org>
18155 * xdisp.c (handle_single_display_spec): Rename the
18156 display_replaced_before_p argument into display_replaced_p, to
18157 make it consistent with the commentary. Fix typos in the
18160 * textprop.c (syms_of_textprop): Remove dead code.
18161 (copy_text_properties): Delete obsolete commentary about an
18162 interface that was deleted long ago. Fix typos in the description
18165 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
18166 to changes in oldXMenu/XMenu.h from 2011-04-16.
18167 <menu_help_message, prev_menu_help_message>: Constify.
18168 (IT_menu_make_room): menu->help_text is now `const char **';
18171 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
18172 to changes in oldXMenu/XMenu.h from 2011-04-16.
18173 (struct XMenu): Declare `help_text' `const char **'.
18175 * xfaces.c <Qunspecified>: Make extern again.
18177 * syntax.c: Include sys/types.h before including regex.h, as
18180 * doc.c (get_doc_string): Improve the format passed to `error'.
18182 * doprnt.c (doprnt): Improve commentary.
18184 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
18186 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
18189 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
18190 changes in globals.h immediately force recompilation.
18191 (TAGS): Depend on $(CURDIR)/m/intel386.h and
18192 $(CURDIR)/s/ms-w32.h.
18193 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
18195 * character.c (Fchar_direction): Function deleted.
18196 (syms_of_character): Don't defsubr it.
18197 <char-direction-table>: Deleted.
18199 2011-04-23 Eli Zaretskii <eliz@gnu.org>
18201 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
18202 * doprnt.c: Include limits.h.
18203 (SIZE_MAX): New macro.
18204 (doprnt): Return a size_t value. 2nd arg is now size_t.
18205 Many local variables are now size_t instead of int or unsigned.
18206 Improve overflow protection. Support `l' modifier for integer
18207 conversions. Support %l conversion. Don't assume an EMACS_INT
18208 argument for integer conversions and for %c.
18210 * lisp.h (doprnt): Restore prototype.
18212 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
18213 $(SRC)/character.h.
18215 * Makefile.in (base_obj): Add back doprnt.o.
18217 * deps.mk (doprnt.o): Add back prerequisites.
18218 (callint.o): Depend on character.h.
18220 * eval.c (internal_lisp_condition_case): Include the handler
18221 representation in the error message.
18222 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
18223 when breaking from the loop.
18225 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
18227 * callint.c (Fcall_interactively): When displaying error message
18228 about invalid control letter, pass the character's codepoint, not
18229 a pointer to its multibyte form. Improve display of the character
18230 in octal and display also its hex code.
18232 * character.c (char_string): Use %x to display the (unsigned)
18233 codepoint of an invalid character, to avoid displaying a bogus
18236 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
18237 `error', not SYMBOL_NAME itself.
18239 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
18240 character arguments to `error'.
18242 * charset.c (check_iso_charset_parameter): Fix incorrect argument
18243 to `error' in error message about FINAL_CHAR argument. Make sure
18244 FINAL_CHAR is a character, and use %c when it is passed as
18245 argument to `error'.
18247 2011-04-23 Eli Zaretskii <eliz@gnu.org>
18249 * s/ms-w32.h (localtime): Redirect to sys_localtime.
18251 * w32.c: Include <time.h>.
18252 (sys_localtime): New function.
18254 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
18256 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
18258 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
18260 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
18262 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
18263 zombies (Bug#8467).
18265 2011-04-19 Eli Zaretskii <eliz@gnu.org>
18267 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
18268 gl_state.e_property when gl_state.object is Qt.
18270 * insdel.c (make_gap_larger): Remove limitation of buffer size
18273 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
18275 * xdisp.c (lookup_glyphless_char_display)
18276 (produce_glyphless_glyph): Handle cons cell entry in
18277 glyphless-char-display.
18278 (Vglyphless_char_display): Document it.
18280 * term.c (produce_glyphless_glyph): Handle cons cell entry in
18281 glyphless-char-display.
18283 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
18285 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
18287 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
18289 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
18290 definition for no-X builds.
18292 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
18294 Static checks with GCC 4.6.0 and non-default toolkits.
18296 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
18298 * process.c (keyboard_bit_set): Define only if SIGIO.
18299 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
18300 (send_process): Repair possible setjmp clobbering.
18302 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
18304 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
18306 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
18308 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
18309 Define only if needed.
18311 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
18312 by pacifying GCC about it. Maybe it's time to retire it?
18313 * xfaces.c (USG, __TIMEVAL__): Likewise.
18315 * dispextern.h (struct redisplay_interface): Rename param
18316 to avoid shadowing.
18317 * termhooks.h (struct terminal): Likewise.
18318 * xterm.c (xembed_send_message): Likewise.
18320 * insdel.c (make_gap_smaller): Define only if
18321 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
18323 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
18326 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
18327 so that we aren't warned about unused symbols.
18329 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
18331 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
18333 * xfns.c (x_real_positions): Mark locals as initialized.
18335 * xmenu.c (xmenu_show): Don't use uninitialized vars.
18337 * xterm.c: Fix problems found by static analysis with other toolkits.
18338 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
18339 (x_dispatch_event): Declare static if USE_GTK, and
18340 define if USE_GTK || USE_X_TOOLKIT.
18341 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
18342 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
18343 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
18344 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
18346 * xmenu.c (menu_help_callback): Pointer type fixes.
18347 Use const pointers when pointing at readonly data. Avoid pointer
18348 signedness clashes.
18349 (FALSE): Remove unused macro.
18350 (update_frame_menubar): Remove unused decl.
18352 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
18354 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
18355 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
18356 (single_menu_item): Rename local to avoid shadowing.
18358 * keyboard.c (make_lispy_event): Remove unused local var.
18360 * frame.c, frame.h (x_get_resource_string): Bring this back, but
18361 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
18363 * bitmaps: Change bitmaps from unsigned char back to the X11
18364 compatible char. Avoid the old compiler warnings about
18365 out-of-range initializers by using, for example, '\xab' rather
18368 * xgselect.c (xgselect_initialize): Check vs interface
18369 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
18371 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
18373 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
18374 to read-only memory.
18376 * fns.c (vector): Remove; this old hack is no longer needed.
18378 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
18380 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
18382 * xrdb.c (x_load_resources): Omit unused local.
18384 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
18385 (x_window): Rename locals to avoid shadowing.
18386 (USG): Use the kludged USG macro, to pacify gcc.
18388 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
18389 (x_term_init): Remove local to avoid shadowing.
18391 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
18393 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
18394 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
18396 2011-04-16 Eli Zaretskii <eliz@gnu.org>
18398 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
18400 Fix regex.c, syntax.c and friends for buffers > 2GB.
18401 * syntax.h (struct gl_state_s): Declare character position members
18404 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
18406 * textprop.c (verify_interval_modification, interval_of):
18407 Declare arguments EMACS_INT.
18409 * intervals.c (adjust_intervals_for_insertion): Declare arguments
18412 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
18414 * indent.c (Fvertical_motion): Local variable it_start is now
18417 * regex.c (re_match, re_match_2, re_match_2_internal)
18418 (bcmp_translate, regcomp, regexec, print_double_string)
18419 (group_in_compile_stack, re_search, re_search_2, regex_compile)
18420 (re_compile_pattern, re_exec): Declare arguments and local
18421 variables `size_t' and `ssize_t' and return values `regoff_t', as
18423 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
18424 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
18425 <compile_stack_type>: `size' and `avail' are now `size_t'.
18427 * regex.h <regoff_t>: Use ssize_t, not int.
18428 (re_search, re_search_2, re_match, re_match_2): Arguments that
18429 specify buffer/string position and length are now ssize_t and
18430 size_t. Return type is regoff_t.
18432 2011-04-16 Ben Key <bkey76@gmail.com>
18434 * nsfont.m: Fixed bugs in ns_get_family and
18435 ns_descriptor_to_entity that were caused by using free to
18436 deallocate memory blocks that were allocated by xmalloc (via
18437 xstrdup). This caused Emacs to crash when compiled with
18438 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
18439 --enable-checking=xmallocoverrun). xfree is now used to
18440 deallocate these memory blocks.
18442 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
18444 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
18446 emacs_write: Accept and return EMACS_INT for sizes.
18447 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
18449 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
18450 Accept and return EMACS_INT.
18451 (emacs_gnutls_write): Return the number of bytes written on
18453 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
18454 (emacs_read, emacs_write): Remove check for negative size, as the
18455 Emacs source code has been audited now.
18456 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
18457 (emacs_read, emacs_write): Use it.
18458 * process.c (send_process): Adjust to the new signatures of
18459 emacs_write and emacs_gnutls_write. Do not attempt to store
18460 a byte offset into an 'int'; it might overflow.
18461 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
18463 * sound.c: Don't assume sizes fit in 'int'.
18464 (struct sound_device.period_size, alsa_period_size):
18465 Return EMACS_INT, not int.
18466 (struct sound_device.write, vox_write, alsa_write):
18467 Accept EMACS_INT, not int.
18468 (wav_play, au_play): Use EMACS_INT to store sizes and to
18469 record read return values.
18471 2011-04-15 Ben Key <bkey76@gmail.com>
18473 * keyboard.c (Qundefined): Don't declare static since it is used
18475 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
18476 static since they are used in nsfont.m.
18478 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
18480 * process.c (Qprocessp): Don't declare static.
18481 * lisp.h (Qprocessp): Declare again.
18483 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
18485 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
18487 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
18489 Improve C-level modularity by making more things 'static'.
18491 Don't publish debugger-only interfaces to other modules.
18492 * lisp.h (safe_debug_print, debug_output_compilation_hack):
18493 (verify_bytepos, count_markers): Move decls to the only modules
18495 * region-cache.h (pp_cache): Likewise.
18496 * window.h (check_all_windows): Likewise.
18497 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
18499 * sysdep.c (croak): Now static, if
18500 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
18501 * syssignal.h (croak): Declare only if not static.
18503 * alloc.c (refill_memory_reserve): Now static if
18504 !defined REL_ALLOC || defined SYSTEM_MALLOC.
18505 * lisp.h (refill_memory_reserve): Declare only if not static.
18507 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
18508 Define only if USE_LUCID.
18510 * xrdb.c (x_customization_string, x_rm_string): Now static.
18512 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
18513 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
18515 * xdisp.c (draw_row_with_mouse_face): Now static.
18516 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
18518 * window.h (check_all_windows): Mark externally visible.
18520 * window.c (window_deletion_count): Now static.
18522 * undo.c: Make symbols static if they're not exported.
18523 (last_undo_buffer, last_boundary_position, pending_boundary):
18526 * textprop.c (interval_insert_behind_hooks): Now static.
18527 (interval_insert_in_front_hooks): Likewise.
18529 * term.c: Make symbols static if they're not exported.
18530 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
18531 (max_frame_lines, tty_set_terminal_modes):
18532 (tty_reset_terminal_modes, tty_turn_off_highlight):
18533 (get_tty_terminal): Now static.
18534 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
18535 * termhooks.h (term_mouse_moveto): Do not declare if
18536 HAVE_WINDOW_SYSTEM.
18537 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
18538 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
18540 * sysdep.c: Make symbols static if they're not exported.
18541 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
18543 (sigprocmask_set, full_mask): Remove; unused.
18544 (wait_debugging): Mark as visible.
18545 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
18546 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
18548 * syntax.c (syntax_temp): Define only if !__GNUC__.
18550 * sound.c (current_sound_device, current_sound): Now static.
18552 * search.c (searchbufs, searchbuf_head): Now static.
18554 * scroll.c (scroll_cost): Remove; unused.
18555 * dispextern.h (scroll_cost): Remove decl.
18557 * region-cache.h (pp_cache): Mark as externally visible.
18559 * process.c: Make symbols static if they're not exported.
18560 (process_tick, update_tick, create_process, chan_process):
18561 (Vprocess_alist, proc_buffered_char, datagram_access):
18562 (fd_callback_data, send_process_frame, process_sent_to): Now static.
18563 (deactivate_process): Mark defn as static, as well as decl.
18564 * lisp.h (create_process): Remove decl.
18565 * process.h (chan_process, Vprocess_alist): Remove decls.
18567 * print.c: Make symbols static if they're not exported.
18568 (print_depth, new_backquote_output, being_printed, print_buffer):
18569 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
18570 (print_interval, print_number_index, initial_stderr_stream):
18572 * lisp.h (Fprinc): Remove decl.
18573 (debug_output_compilation_hack): Mark as externally visible.
18575 * sysdep.c (croak): Move decl from here to syssignal.h.
18576 * syssignal.h (croak): Put it here, so the API can be checked when
18577 'croak' is called from dissociate_if_controlling_tty.
18579 * minibuf.c: Make symbols static if they're not exported.
18580 (minibuf_save_list, choose_minibuf_frame): Now static.
18581 * lisp.h (choose_minibuf_frame): Remove decl.
18583 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
18585 * lread.c: Make symbols static if they're not exported.
18586 (read_objects, initial_obarray, oblookup_last_bucket_number):
18588 (make_symbol): Remove; unused.
18589 * lisp.h (initial_obarray, make_symbol): Remove decls.
18591 * keyboard.c: Make symbols static if they're not exported.
18592 (single_kboard, recent_keys_index, total_keys, recent_keys):
18593 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
18594 (this_single_command_key_start, echoing, last_auto_save):
18595 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
18596 (command_loop, echo_now, keyboard_init_hook, help_char_p):
18597 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
18598 (Vlispy_mouse_stem, double_click_count):
18600 (force_auto_save_soon): Define only if SIGDANGER.
18601 (ignore_mouse_drag_p): Now static if
18602 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
18603 (print_help): Remove; unused.
18604 (stop_character, last_timer_event): Mark as externally visible.
18605 * keyboard.h (ignore_mouse_drag_p): Declare only if
18606 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
18607 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
18608 * lisp.h (echoing): Remove decl.
18609 (force_auto_save_soon): Declare only if SIGDANGER.
18610 * xdisp.c (redisplay_window): Simplify code, to make it more
18611 obvious that ignore_mouse_drag_p is not accessed if !defined
18612 USE_GTK && !defined HAVE_NS.
18614 * intervals.c: Make symbols static if they're not exported.
18615 (merge_properties_sticky, merge_interval_right, delete_interval):
18617 * intervals.h (merge_interval_right, delete_interval): Remove decls.
18619 * insdel.c: Make symbols static if they're not exported.
18620 However, leave prepare_to_modify_buffer alone. It's never
18621 called from outside this function, but that appears to be a bug.
18622 (combine_after_change_list, combine_after_change_buffer):
18623 (adjust_after_replace, signal_before_change): Now static.
18624 (adjust_after_replace_noundo): Remove; unused.
18625 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
18626 (signal_before_change): Remove decls.
18628 * indent.c (val_compute_motion, val_vmotion): Now static.
18630 * image.c: Make symbols static if they're not exported.
18631 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
18633 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
18634 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
18636 * fringe.c (standard_bitmaps): Now static.
18637 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
18639 * frame.c: Make symbols static if they're not exported.
18640 (x_report_frame_params, make_terminal_frame): Now static.
18641 (get_frame_param): Now static, unless HAVE_NS.
18642 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
18643 (x_get_resource_string): Remove; not used.
18644 * frame.h (make_terminal_frame, x_report_frame_params):
18645 (x_get_resource_string); Remove decls.
18646 (x_fullscreen_adjust): Declare only if WINDOWSNT.
18647 * lisp.h (get_frame_param): Declare only if HAVE_NS.
18649 * font.c, fontset.c: Make symbols static if they're not exported.
18650 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
18651 (FACE_SUITABLE_FOR_CHAR_P): Use it.
18652 * font.c (font_close_object): Now static.
18653 * font.h (font_close_object): Remove.
18654 * fontset.c (FONTSET_OBJLIST): Remove.
18655 (free_realized_fontset) #if-0 the body, which does nothing.
18656 (face_suitable_for_char_p): #if-0, as it's never called.
18657 * fontset.h (face_suitable_for_char_p): Remove decl.
18658 * xfaces.c (face_at_string_position):
18659 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
18660 since 0 is always ASCII.
18662 * fns.c (weak_hash_tables): Now static.
18664 * fileio.c: Make symbols static if they're not exported.
18665 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
18666 (Vwrite_region_annotation_buffers): Now static.
18668 * eval.c: Make symbols static if they're not exported.
18669 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
18670 * lisp.h (backtrace_list): Remove decl.
18672 * emacs.c: Make symbols static if they're not exported.
18673 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
18674 (fatal_error_code, fatal_error_signal_hook, standard_args):
18676 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
18677 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
18678 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
18679 * lisp.h (fatal_error_signal_hook): Remove decl.
18680 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
18682 * editfns.c: Move a (normally-unused) function to its only use.
18683 * editfns.c, lisp.h (get_operating_system_release): Remove.
18684 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
18685 worth the hassle of breaking this out.
18687 * xterm.c: Make symbols static if they're not exported.
18688 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
18689 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
18690 (x_destroy_window, x_delete_display):
18692 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
18693 (x_mouse_leave): Remove; unused.
18694 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
18695 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
18696 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
18698 (x_mouse_leave): Declare only if WINDOWSNT.
18699 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
18700 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
18703 * ftxfont.c: Make symbols static if they're not exported.
18704 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
18706 * font.h (ftxfont_driver): Likewise.
18708 * xfns.c: Make symbols static if they're not exported.
18709 (x_last_font_name, x_display_info_for_name):
18710 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
18711 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
18712 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
18713 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
18714 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
18715 (last_show_tip_args): Now static.
18716 (xic_defaut_fontset, xic_create_fontsetname): Define only if
18717 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
18718 (x_screen_planes): Remove; unused.
18719 * dispextern.h (x_screen_planes): Remove decl.
18721 * dispnew.c: Make symbols static if they're not exported.
18722 * dispextern.h (redraw_garbaged_frames, scrolling):
18723 (increment_row_positions): Remove.
18724 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
18725 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
18727 (redraw_garbaged_frames): Remove; unused.
18729 * xfaces.c: Make symbols static if they're not exported.
18730 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
18732 * xterm.h (defined_color): Remove decls.
18733 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
18734 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
18735 (menu_face_changed_default, defined_color, free_realized_face):
18736 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
18737 (ascii_face_of_lisp_face): Remove; unused.
18739 * xdisp.c: Make symbols static if they're not exported.
18740 * dispextern.h (scratch_glyph_row, window_box_edges):
18741 (glyph_to_pixel_coords, set_cursor_from_row):
18742 (get_next_display_element, set_iterator_to_next):
18743 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
18744 (show_mouse_face): Remove decls
18745 * frame.h (message_buf_print): Likewise.
18746 * lisp.h (pop_message, set_message, check_point_in_composition):
18748 * xterm.h (set_vertical_scroll_bar): Likewise.
18749 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
18750 (message_buf_print, scratch_glyph_row, displayed_buffer):
18751 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
18752 (get_next_display_element, show_mouse_face, window_box_edges):
18753 (frame_to_window_pixel_xy, check_point_in_composition):
18754 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
18755 (glyph_to_pixel_coords): Remove; unused.
18757 * dired.c (file_name_completion): Now static.
18759 * dbusbind.c (xd_in_read_queued_messages): Now static.
18761 * lisp.h (circular_list_error, FOREACH): Remove; unused.
18762 * data.c (circular_list_error): Remove.
18764 * commands.h (last_point_position, last_point_position_buffer):
18765 (last_point_position_window): Remove decls.
18766 * keyboard.c: Make these variables static.
18768 * coding.h (coding, code_convert_region, encode_coding_gap):
18770 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
18771 (iso_code_class, detect_coding, code_convert_region): Now static.
18772 (encode_coding_gap): Remove; unused.
18774 * chartab.c (chartab_chars, chartab_bits): Now static.
18776 * charset.h (charset_iso_8859_1): Remove decl.
18777 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
18780 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
18781 * ccl.c (Vccl_program_table): Now static.
18782 (check_ccl_update): Remove; unused.
18784 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
18785 * category.h: ... from here.
18786 * category.c (check_category_table, set_category_set): Now static.
18788 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
18789 * lisp.h: Remove these decls.
18791 * buffer.c (buffer_count): Remove unused var.
18793 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
18794 so that it's not optimized away.
18795 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
18796 * dispextern.h (bidi_dump_cached_states): Remove, since it's
18797 exported only to the debugger.
18799 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
18800 * atimer.h (run_all_atimers): Remove; not exported.
18802 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
18803 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
18804 was inaccessible from Lisp.
18805 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
18806 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
18808 alloc.c: Import and export fewer symbols, and remove unused items.
18809 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
18811 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
18812 it's not optimized away by whole-program optimization.
18813 (message_enable_multibyte, free_misc): Remove.
18814 (catchlist, handlerlist, mark_backtrace):
18815 Declare only if BYTE_MARK_STACK.
18816 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
18817 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
18818 (message_enable_multibyte): Remove decl.
18819 (free_misc, interval_free_list, float_block, float_block_index):
18820 (n_float_blocks, float_free_list, cons_block, cons_block_index):
18821 (cons_free_list, last_marked_index):
18823 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
18824 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
18825 (mark_backtrace): Define only if BYTE_MARK_STACK.
18826 * xdisp.c (message_enable_multibyte): Now static.
18828 Declare Lisp_Object Q* variables to be 'static' if not exported.
18829 This makes it easier for human readers (and static analyzers)
18830 to see whether these variables are used from other modules.
18831 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
18832 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
18833 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
18834 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
18835 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
18836 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
18837 * xmenu.c, xselect.c:
18838 Declare Q* vars static if they are not used in other modules.
18839 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
18840 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
18841 Remove decls of unexported vars.
18842 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
18844 * lisp.h (DEFINE_FUNC): Make sname 'static'.
18846 Make Emacs functions such as Fatom 'static' by default.
18847 This makes it easier for human readers (and static analyzers)
18848 to see whether these functions can be called from other modules.
18849 DEFUN now defines a static function. To make the function external
18850 so that it can be used in other C modules, use the new macro DEFUE.
18851 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
18852 (Finit_image_library):
18853 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
18854 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
18855 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
18856 Remove decls, since these functions are now static.
18857 (Funintern, Fget_internal_run_time): New decls, since these functions
18858 were already external.
18860 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
18861 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
18862 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
18863 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
18864 * keyboard.c, keymap.c, lread.c:
18865 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
18866 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
18867 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
18868 Mark functions with DEFUE instead of DEFUN,
18869 if they are used in other modules.
18870 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
18871 decls for now-static functions.
18872 * buffer.h (Fdelete_overlay): Remove decl.
18873 * callproc.c (Fgetenv_internal): Mark as internal.
18874 * composite.c (Fremove_list_of_text_properties): Remove decl.
18875 (Fcomposition_get_gstring): New forward static decl.
18876 * composite.h (Fcomposite_get_gstring): Remove decl.
18877 * dired.c (Ffile_attributes): New forward static decl.
18878 * doc.c (Fdocumntation_property): New forward static decl.
18879 * eval.c (Ffetch_bytecode): New forward static decl.
18880 (Funintern): Remove extern decl; now in .h file where it belongs.
18881 * fileio.c (Fmake_symbolic_link): New forward static decl.
18882 * image.c (Finit_image_library): New forward static decl.
18883 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
18884 * intervals.h (Fprevious_property_change):
18885 (Fremove_list_of_text_properties): Remove decls.
18886 * keyboard.c (Fthis_command_keys): Remove decl.
18887 (Fcommand_execute): New forward static decl.
18888 * keymap.c (Flookup_key): New forward static decl.
18889 (Fcopy_keymap): Now static.
18890 * keymap.h (Flookup_key): Remove decl.
18891 * process.c (Fget_process): New forward static decl.
18892 (Fprocess_datagram_address): Mark as internal.
18893 * syntax.c (Fsyntax_table_p): New forward static decl.
18894 (skip_chars): Remove duplicate decl.
18895 * textprop.c (Fprevious_property_change): New forward static decl.
18896 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
18898 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
18899 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
18901 * editfns.c (Fformat): Remove unreachable code.
18903 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
18905 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
18908 2011-04-13 Eli Zaretskii <eliz@gnu.org>
18910 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
18911 when at ZV. (Bug#8487)
18913 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
18915 * charset.c (Fclear_charset_maps): Use xfree instead of free.
18917 * keyboard.c (parse_tool_bar_item): Likewise.
18918 * sound.c (sound_cleanup, alsa_close): Likewise.
18919 * termcap.c (tgetent): Likewise.
18920 * xfns.c (x_default_font_parameter): Likewise.
18921 * xsettings.c (read_and_apply_settings): Likewise.
18923 * alloc.c (overrun_check_malloc, overrun_check_realloc)
18924 (overrun_check_free): Protoize.
18926 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
18928 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
18929 since callers should never pass a negative size.
18930 Change the signature to match that of plain 'read' and 'write'; see
18931 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
18932 * lisp.h: Update prototypes of emacs_write and emacs_read.
18934 2011-04-11 Eli Zaretskii <eliz@gnu.org>
18936 * xdisp.c (redisplay_window): Don't try to determine the character
18937 position of the scroll margin if the window start point w->startp
18938 is outside the buffer's accessible region. (Bug#8468)
18940 2011-04-10 Eli Zaretskii <eliz@gnu.org>
18942 Fix write-region and its subroutines for buffers > 2GB.
18943 * fileio.c (a_write, e_write): Modify declaration of arguments and
18944 local variables to support buffers larger than 2GB.
18945 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
18947 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
18948 argument, local variables, and return value.
18950 * lisp.h: Update prototypes of emacs_write and emacs_read.
18952 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
18954 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
18956 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
18958 Fix more problems found by GCC 4.6.0's static checks.
18960 * xdisp.c (vmessage): Use a better test for character truncation.
18962 * charset.c (load_charset_map): <, not <=, for optimization,
18963 and to avoid potential problems with integer overflow.
18964 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
18965 * casetab.c (set_identity, shuffle): Likewise.
18966 * editfns.c (Fformat): Likewise.
18967 * syntax.c (skip_chars): Likewise.
18969 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
18970 This also lets GCC 4.6.0 generate slightly better loop code.
18972 * callint.c (Fcall_interactively): <, not <=, for optimization.
18973 (Fcall_interactively): Count the number of arguments produced,
18974 not the number of arguments given. This is simpler and lets GCC
18975 4.6.0 generate slightly better code.
18977 * ftfont.c: Distingish more carefully between FcChar8 and char.
18978 The previous code passed unsigned char * to a functions like
18979 strlen and xstrcasecmp that expect char *, which does not
18980 conform to the C standard.
18981 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
18982 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
18983 char * when the C standard requires it.
18985 * keyboard.c (read_char): Remove unused var.
18987 * eval.c: Port to Windows vsnprintf (Bug#8435).
18988 Include <limits.h>.
18989 (SIZE_MAX): Define if the headers do not.
18990 (verror): Do not give up if vsnprintf returns a negative count.
18991 Instead, grow the buffer. This ports to Windows vsnprintf, which
18992 does not conform to C99. Problem reported by Eli Zaretskii.
18993 Also, simplify the allocation scheme, by avoiding the need for
18994 calling realloc, and removing the ALLOCATED variable.
18996 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
18998 Remove invocations of doprnt, as Emacs now uses vsnprintf.
18999 But keep the doprint source code for now, as we might revamp it
19000 and use it again (Bug#8435).
19001 * lisp.h (doprnt): Remove.
19002 * Makefile.in (base_obj): Remove doprnt.o.
19003 * deps.mk (doprnt.o): Remove.
19005 error: Print 32- and 64-bit integers portably (Bug#8435).
19006 Without this change, on typical 64-bit hosts error ("...%d...", N)
19007 was used to print both 32- and 64-bit integers N, which relied on
19008 undefined behavior.
19009 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
19010 * lisp.h (error, verror): Mark as printf-like functions.
19011 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
19012 Report overflow in size calculations when allocating printf buffer.
19013 Do not truncate output string at its first null byte.
19014 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
19015 Truncate the output at a character boundary, since vsnprintf does not
19017 * charset.c (check_iso_charset_parameter): Convert internal
19018 character to string before calling 'error', since %c now has the
19020 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
19021 overflow when computing char to be passed to 'error'. Do not
19022 pass Lisp_Object to 'error'; pass the integer instead.
19023 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
19024 formatted with plain %d.
19026 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
19028 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
19030 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
19032 * xterm.c (x_catch_errors): Remove duplicate declaration.
19034 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
19036 * xdisp.c, lisp.h (message_nolog): Remove; unused.
19038 2011-04-10 Jim Meyering <meyering@redhat.com>
19040 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
19041 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
19042 return ssize_t not "int", and use size_t as the buffer length.
19043 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
19044 * gnutls.h: Update declarations.
19045 * process.c (read_process_output): Use ssize_t, to match.
19046 (send_process): Likewise.
19048 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
19050 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
19052 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
19054 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
19055 Use unsigned char, to match FcChar8 type definition.
19057 * xterm.c (handle_one_xevent):
19058 * xmenu.c (create_and_show_popup_menu):
19059 * xselect.c (x_decline_selection_request)
19060 (x_reply_selection_request): Avoid type-punned deref of X events.
19062 2011-04-09 Eli Zaretskii <eliz@gnu.org>
19064 Fix some uses of `int' instead of EMACS_INT.
19065 * search.c (string_match_1, fast_string_match)
19066 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
19067 (scan_buffer, find_next_newline_no_quit)
19068 (find_before_next_newline, search_command, Freplace_match)
19069 (Fmatch_data): Make some `int' variables be EMACS_INT.
19071 * xdisp.c (display_count_lines): 3rd argument and return value now
19072 EMACS_INT. All callers changed.
19073 (pint2hrstr): Last argument is now EMACS_INT.
19075 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
19076 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
19077 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
19078 (decode_coding_utf_16, decode_coding_emacs_mule)
19079 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
19080 (decode_coding_ccl, decode_coding_charset)
19081 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
19082 (decode_coding_iso_2022, decode_coding_emacs_mule)
19083 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
19084 <char_offset, last_offset>: Declare EMACS_INT.
19085 (encode_coding_utf_8, encode_coding_utf_16)
19086 (encode_coding_emacs_mule, encode_invocation_designation)
19087 (encode_designation_at_bol, encode_coding_iso_2022)
19088 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
19089 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
19091 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
19092 (encode_invocation_designation): Last argument P_NCHARS is now
19094 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
19095 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
19097 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
19100 * ccl.c (Fccl_execute_on_string): Declare some variables
19103 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
19105 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
19107 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
19109 * process.c (Fformat_network_address): Doc fix.
19111 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
19113 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
19115 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
19117 * keyboard.c (read_char): Call Lisp function help-form-show,
19118 instead of using internal_with_output_to_temp_buffer.
19119 (Qhelp_form_show): New var.
19120 (syms_of_keyboard): Use DEFSYM macro.
19122 * print.c (internal_with_output_to_temp_buffer): Function deleted.
19124 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
19126 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
19128 * process.c (Flist_processes): Remove to Lisp.
19129 (list_processes_1): Delete.
19131 2011-04-06 Eli Zaretskii <eliz@gnu.org>
19133 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
19135 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
19137 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
19139 Fix more problems found by GCC 4.6.0's static checks.
19141 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
19143 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
19145 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
19147 * xdisp.c (vmessage): Mark as a printf-like function.
19149 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
19151 * sound.c (sound_warning): Don't crash if arg contains a printf format.
19153 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
19154 printf-like functions.
19155 (tiff_load): Add casts to remove these marks before passing them
19156 to system-supplied API.
19158 * eval.c (Fsignal): Remove excess argument to 'fatal'.
19160 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
19161 This avoids several warnings with gcc -Wstrict-overflow.
19162 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
19163 directly, rather than having caller test rule sign. This avoids
19164 some unnecessary tests.
19165 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
19166 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
19167 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
19169 * xfont.c (xfont_text_extents): Remove var that was set but not used.
19170 (xfont_open): Avoid unnecessary tests.
19172 * composite.c (composition_gstring_put_cache): Use unsigned integer.
19174 * composite.h, composite.c (composition_gstring_put_cache):
19175 Use EMACS_INT, not int, for length.
19177 * composite.h (COMPOSITION_DECODE_REFS): New macro,
19178 breaking out part of COMPOSITION_DECODE_RULE.
19179 (COMPOSITION_DECODE_RULE): Use it.
19180 * composite.c (get_composition_id): Remove unused local vars,
19181 by using the new macro.
19183 * textprop.c (set_text_properties_1): Change while to do-while,
19184 since the condition is always true at first.
19186 * intervals.c (graft_intervals_into_buffer): Mark var as used.
19187 (interval_deletion_adjustment): Return unsigned value.
19190 * process.c (list_processes_1, create_pty, read_process_output):
19191 (exec_sentinel): Remove vars that were set but not used.
19192 (create_pty): Remove unnecessary "volatile"s.
19193 (Fnetwork_interface_info): Avoid possibility of int overflow.
19194 (read_process_output): Do adaptive read buffering even if carryover.
19195 (read_process_output): Simplify nbytes computation if buffered.
19197 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
19199 * syntax.c (scan_words): Remove var that was set but not used.
19200 (update_syntax_table): Use unsigned instead of int.
19202 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
19203 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
19204 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
19206 * print.c (print_error_message): Avoid int overflow.
19208 * font.c (font_list_entities): Redo for clarity,
19209 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
19211 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
19212 (font_score): Avoid potential overflow in diff calculation.
19214 * fns.c (substring_both): Remove var that is set but not used.
19215 (sxhash): Redo loop for clarity and to avoid wraparound warning.
19217 * eval.c (funcall_lambda): Rename local to avoid shadowing.
19219 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
19220 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
19221 can always succeed if overflow has undefined behavior.
19223 * search.c (boyer_moore, wordify): Remove vars set but not used.
19224 (wordify): Omit three unnecessary tests.
19226 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
19227 All callers changed. This avoids the need for an unused var.
19229 * casefiddle.c (casify_region): Remove var that is set but not used.
19231 * dired.c (file_name_completion): Remove var that is set but not used.
19233 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
19235 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
19236 (Finsert_file_contents): Remove unnecessary code checking fd.
19238 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
19239 Check for integer overflow on size calculations.
19241 * buffer.c (Fprevious_overlay_change): Remove var that is set
19244 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
19245 Remove vars that are set but not used.
19246 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
19247 (timer_check_2): Mark vars as initialized.
19249 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
19251 * image.c (lookup_image): Remove var that is set but not used.
19252 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
19254 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
19255 that are set but not used.
19257 * xfns.c (make_invisible_cursor): Don't return garbage
19258 if XCreateBitmapFromData fails (Bug#8410).
19260 * xselect.c (x_get_local_selection, x_handle_property_notify):
19261 Remove vars that are set but not used.
19263 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
19264 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
19266 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
19267 Remove var that is set but not used.
19268 (scroll_bar_windows_size): Now size_t, not int.
19269 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
19270 Check for overflow.
19272 * xfaces.c (realize_named_face): Remove vars that are set but not used.
19273 (map_tty_color) [!defined MSDOS]: Likewise.
19275 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
19277 * coding.c: Remove vars that are set but not used.
19278 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
19279 All callers changed.
19280 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
19281 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
19282 (decode_coding_charset): Remove vars that are set but not used.
19284 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
19285 that is set but not used.
19287 * print.c (print_object): Remove var that is set but not used.
19289 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
19290 The gnulib version avoids calling malloc in the usual case,
19291 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
19292 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
19293 * filelock.c (current_lock_owner): Likewise.
19294 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
19295 * sysdep.c: Include allocator.h, careadlinkat.h.
19296 (emacs_no_realloc_allocator): New static constant.
19297 (emacs_readlink): New function.
19298 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
19299 ../lib/careadlinkat.h.
19301 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
19303 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
19304 first non-nil return value).
19306 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
19308 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
19309 if not defined (Bug#8403).
19311 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
19313 * xdisp.c (display_count_lines): Remove parameter `start',
19314 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19315 (get_char_face_and_encoding): Remove parameter `multibyte_p',
19316 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19317 (fill_stretch_glyph_string): Remove parameters `row' and `area',
19318 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
19319 and thereabouts. All callers changed.
19320 (get_per_char_metric): Remove parameter `f', unused since
19321 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
19323 2011-04-02 Jim Meyering <meyering@redhat.com>
19325 do not dereference NULL upon failed strdup
19326 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
19327 (ns_get_family): Likewise.
19329 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
19331 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
19333 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
19335 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
19338 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
19340 Add lexical binding.
19342 * window.c (Ftemp_output_buffer_show): New fun.
19343 (Fsave_window_excursion):
19344 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
19346 * lread.c (lisp_file_lexically_bound_p): New function.
19347 (Fload): Bind Qlexical_binding.
19348 (readevalloop): Remove `evalfun' arg.
19349 Bind Qinternal_interpreter_environment.
19350 (Feval_buffer): Bind Qlexical_binding.
19351 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
19353 (syms_of_lread): Declare `lexical-binding'.
19355 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
19357 * keyboard.c (eval_dyn): New fun.
19358 (menu_item_eval_property): Use it.
19360 * image.c (parse_image_spec): Use Ffunctionp.
19362 * fns.c (concat, mapcar1): Accept byte-code-functions.
19364 * eval.c (Fsetq): Handle lexical vars.
19365 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
19366 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
19367 (FletX, Flet): Obey lexical binding.
19368 (Fcommandp): Handle closures.
19369 (Feval): New `lexical' arg.
19370 (eval_sub): New function extracted from Feval. Use it almost
19371 everywhere where Feval was used. Look up vars in lexical env.
19373 (Ffunctionp): Move from subr.el.
19374 (Ffuncall): Handle closures.
19375 (apply_lambda): Remove `eval_flags'.
19376 (funcall_lambda): Handle closures and new byte-code-functions.
19377 (Fspecial_variable_p): New function.
19378 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
19379 but without exporting it to Lisp.
19381 * doc.c (Fdocumentation, store_function_docstring):
19382 * data.c (Finteractive_form): Handle closures.
19384 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
19387 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
19389 (exec_byte_code): New function extracted from Fbyte_code to handle new
19390 calling convention for byte-code-functions. Add new byte-codes.
19392 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
19394 * alloc.c (Fmake_symbol): Init new `declared_special' field.
19396 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
19398 * xdisp.c (redisplay_internal): Fix prototype.
19400 2011-03-31 Eli Zaretskii <eliz@gnu.org>
19402 * xdisp.c (SCROLL_LIMIT): New macro.
19403 (try_scrolling): Use it when setting scroll_limit.
19404 Limit scrolling to 100 screen lines.
19405 (redisplay_window): Even when falling back on "recentering",
19406 position point in the window according to scroll-conservatively,
19407 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
19409 (try_scrolling): When point is above the window, allow searching
19410 as far as scroll_max, or one screenful, to compute vertical
19411 distance from PT to the scroll margin position. This prevents
19412 try_scrolling from unnecessarily failing when
19413 scroll-conservatively is set to a value slightly larger than the
19414 window height. Clean up the case of PT below the margin at bottom
19415 of window: scroll_max can no longer be INT_MAX. When aggressive
19416 scrolling is in use, don't let point enter the opposite scroll
19417 margin as result of the scroll.
19418 (syms_of_xdisp) <scroll-conservatively>: Document the
19419 threshold of 100 lines for never-recentering scrolling.
19421 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
19423 * dispextern.h (move_it_by_lines):
19424 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
19425 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
19426 (message_log_check_duplicate): Remove parameters `prev_bol' and
19427 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
19428 (redisplay_internal): Remove parameter `preserve_echo_area',
19429 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
19431 * indent.c (Fvertical_motion):
19432 * window.c (window_scroll_pixel_based, Frecenter):
19433 Don't pass `need_y_p' to `move_it_by_lines'.
19435 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
19437 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
19438 steal a few bits to be more compact.
19439 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
19440 Remove unneeded casts.
19442 * bytecode.c (Fbyte_code): CAR and CDR can GC.
19444 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
19446 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
19447 binding" message (bug#7967).
19449 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
19451 Fix more problems found by GCC 4.6.0's static checks.
19453 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
19454 Remove unused local var.
19456 * editfns.c (Fmessage_box): Remove unused local var.
19458 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
19459 (note_mode_line_or_margin_highlight, note_mouse_highlight):
19460 Omit unused local vars.
19461 * window.c (shrink_windows): Omit unused local var.
19462 * menu.c (digest_single_submenu): Omit unused local var.
19463 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
19464 Omit unused local var.
19466 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
19467 Don't assume string length fits in int.
19468 (keyremap_step, read_key_sequence): Use size_t for sizes.
19469 (read_key_sequence): Don't check last_real_key_start redundantly.
19471 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
19472 instead of alloca (Bug#8344).
19474 * eval.c (Fbacktrace): Don't assume nargs fits in int.
19475 (Fbacktrace_frame): Don't assume nframes fits in int.
19477 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
19479 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
19482 * term.c (produce_glyphless_glyph): Remove unnecessary test.
19484 * cm.c (calccost): Turn while-do into do-while, for clarity.
19486 * keyboard.c (syms_of_keyboard): Use the same style as later
19487 in this function when indexing through an array. This also
19488 works around GCC bug 48267.
19490 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
19492 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
19494 * chartab.c (sub_char_table_ref_and_range): Redo for slight
19495 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
19497 * keyboard.c, keyboard.h (num_input_events): Now size_t.
19498 This avoids undefined behavior on integer overflow, and is a bit
19499 more convenient anyway since it is compared to a size_t variable.
19501 Variadic C functions now count arguments with size_t, not int.
19502 This avoids an unnecessary limitation on 64-bit machines, which
19503 caused (substring ...) to crash on large vectors (Bug#8344).
19504 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
19505 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
19506 All variadic functions and their callers changed accordingly.
19507 (struct gcpro.nvars): Now size_t, not int. All uses changed.
19508 * data.c (arith_driver, float_arith_driver): Likewise.
19509 * editfns.c (general_insert_function): Likewise.
19510 * eval.c (struct backtrace.nargs, interactive_p)
19511 (internal_condition_case_n, run_hook_with_args, apply_lambda)
19512 (funcall_lambda, mark_backtrace): Likewise.
19513 * fns.c (concat): Likewise.
19514 * frame.c (x_set_frame_parameters): Likewise.
19515 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
19516 0 if not found, not -1. All callers changed.
19518 * alloc.c (garbage_collect): Don't assume stack size fits in int.
19519 (stack_copy_size): Now size_t, not int.
19520 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
19522 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
19524 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
19525 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
19526 All callers changed.
19528 * lisp.h (multibyte_char_to_unibyte):
19529 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
19530 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
19531 * character.h (CHAR_TO_BYTE8):
19532 * cmds.c (internal_self_insert):
19533 * editfns.c (general_insert_function):
19534 * keymap.c (push_key_description):
19535 * search.c (Freplace_match):
19536 * xdisp.c (message_dolog, set_message_1): All callers changed.
19538 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
19540 * keyboard.c (safe_run_hook_funcall): New function.
19541 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
19542 don't set the hook to nil, but remove the offending function instead.
19543 (Qcommand_hook_internal): Remove, unused.
19544 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
19545 Vcommand_hook_internal.
19547 * eval.c (enum run_hooks_condition): Remove.
19548 (funcall_nil, funcall_not): New functions.
19549 (run_hook_with_args): Call each function through a `funcall' argument.
19550 Remove `cond' argument, now redundant.
19551 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
19552 (Frun_hook_with_args_until_failure): Adjust accordingly.
19553 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
19555 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
19557 * dispextern.h (string_buffer_position): Remove declaration.
19559 * print.c (strout): Remove parameter `multibyte', unused since
19560 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
19562 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
19563 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
19564 All callers changed.
19566 * w32.c (_wsa_errlist): Use braces for struct initializers.
19568 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
19569 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
19570 All callers changed.
19571 (string_buffer_position): Likewise. Also, make static (it's never
19572 used outside xdisp.c).
19573 (cursor_row_p): Remove parameter `w', unused since
19574 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
19575 (decode_mode_spec): Remove parameter `precision', introduced during
19576 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
19577 All callers changed.
19579 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
19581 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
19583 2011-03-27 Anders Lindgren <andlind@gmail.com>
19585 * nsterm.m (ns_menu_bar_is_hidden): New variable.
19586 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
19587 (ns_update_auto_hide_menu_bar): New functions.
19588 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
19589 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
19590 ns_constrain_all_frames.
19591 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
19592 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
19594 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
19596 * nsmenu.m (runDialogAt): Remove argument to timer_check.
19598 2011-03-27 Glenn Morris <rgm@gnu.org>
19600 * syssignal.h: Replace RETSIGTYPE with void.
19601 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
19602 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
19603 Replace SIGTYPE with void everywhere.
19604 * s/usg5-4-common.h (SIGTYPE): Remove definition.
19605 * s/template.h (SIGTYPE): Remove commented out definition.
19607 2011-03-26 Eli Zaretskii <eliz@gnu.org>
19609 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
19610 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
19612 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
19614 * w32.c (read_unc_volume): Use parameter `henum', instead of
19615 global variable `wget_enum_handle'.
19617 * keymap.c (describe_vector): Remove parameters `indices' and
19618 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
19619 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
19621 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
19623 * keyboard.c (timer_check): Remove parameter `do_it_now',
19624 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
19625 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
19626 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
19628 * keyboard.c (read_char):
19629 * w32menu.c (w32_menu_display_help):
19630 * xmenu.c (show_help_event, menu_help_callback):
19631 Adjust calls to `show_help_echo'.
19633 * gtkutil.c (xg_maybe_add_timer):
19634 * keyboard.c (readable_events):
19635 * process.c (wait_reading_process_output):
19636 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
19638 * insdel.c (adjust_markers_gap_motion):
19639 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
19640 (gap_left, gap_right): Don't call it.
19642 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
19644 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
19645 incurred during fontification.
19647 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
19649 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
19650 (DEFVAR_PER_BUFFER): Don't pass it.
19652 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
19653 (scrolling_window): Don't pass it.
19655 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
19657 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
19659 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
19661 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
19662 of variables specific to SELinux and computation of `encoded_absname'.
19664 * image.c (XPutPixel): Remove unused variable `height'.
19666 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
19668 * unexw32.c (get_section_info): Remove unused variable `section'.
19670 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
19671 (system_process_attributes): Remove unused variable `sess'.
19672 (sys_read): Remove unused variable `err'.
19674 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
19675 (w32_wnd_proc): Remove unused variable `isdead'.
19676 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
19677 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
19678 (x_create_tip_frame): Remove unused variable `tem'.
19680 * w32inevt.c (w32_console_read_socket):
19681 Remove unused variable `no_events'.
19683 * w32term.c (x_draw_composite_glyph_string_foreground):
19684 Remove unused variable `width'.
19686 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
19688 * w32term.c (x_set_glyph_string_clipping):
19689 Don't pass uninitialized region to CombineRgn.
19691 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
19693 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
19694 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
19695 (Fx_close_connection): Remove unused variable `i'.
19697 * w32font.c (w32font_draw): Return number of glyphs.
19698 (w32font_open_internal): Remove unused variable `i'.
19699 (w32font_driver): Add missing initializer.
19701 * w32menu.c (utf8to16): Remove unused variable `utf16'.
19702 (fill_in_menu): Remove unused variable `items_added'.
19704 * w32term.c (last_mouse_press_frame): Remove static global variable.
19705 (w32_clip_to_row): Remove unused variable `f'.
19706 (x_delete_terminal): Remove unused variable `i'.
19708 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
19709 (NOTHING): Remove unused static global variable.
19710 (uniscribe_check_otf): Remove unused variable `table'.
19711 (uniscribe_font_driver): Add missing initializers.
19713 2011-03-23 Julien Danjou <julien@danjou.info>
19715 * term.c (Fsuspend_tty, Fresume_tty):
19716 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
19717 * window.c (temp_output_buffer_show):
19718 * insdel.c (signal_before_change):
19719 * frame.c (Fhandle_switch_frame):
19720 * fileio.c (Fdo_auto_save):
19721 * emacs.c (Fkill_emacs):
19722 * editfns.c (save_excursion_restore):
19723 * cmds.c (internal_self_insert):
19724 * callint.c (Fcall_interactively):
19725 * buffer.c (Fkill_all_local_variables):
19726 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
19728 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
19729 unconditionally since it does the check itself.
19731 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
19733 Fix more problems found by GCC 4.5.2's static checks.
19735 * coding.c (encode_coding_raw_text): Avoid unnecessary test
19736 the first time through the loop, since we know p0 < p1 then.
19737 This also avoids a gcc -Wstrict-overflow warning.
19739 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
19740 leading to a memory leak, possible in functions like
19741 load_charset_map_from_file that can allocate an unbounded number
19742 of objects (Bug#8318).
19744 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
19745 that could (at least in theory) be that large.
19747 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
19748 This is less likely to overflow, and avoids undefined behavior if
19749 overflow does occur. All callers changed. Use strtoul to scan
19750 for the unsigned long integer.
19751 (pint2hrstr): Simplify and tune code slightly.
19752 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19754 * scroll.c (do_scrolling): Work around GCC bug 48228.
19755 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
19757 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
19758 This also avoids a warning with gcc -Wstrict-overflow.
19759 (validate_x_resource_name): Simplify count usage.
19760 This also avoids a warning with gcc -Wstrict-overflow.
19762 * fileio.c (Fcopy_file): Report error if fchown or fchmod
19765 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
19767 * process.c (Fmake_network_process): Use socklen_t, not int,
19768 where POSIX says socklen_t is required in portable programs.
19769 This fixes a porting bug on hosts like 64-bit HP-UX, where
19770 socklen_t is wider than int (Bug#8277).
19771 (Fmake_network_process, server_accept_connection):
19772 (wait_reading_process_output, read_process_output):
19775 * process.c: Rename or move locals to avoid shadowing.
19776 (list_processes_1, Fmake_network_process):
19777 (read_process_output_error_handler, exec_sentinel_error_handler):
19778 Rename or move locals.
19779 (Fmake_network_process): Define label "retry_connect" only if needed.
19780 (Fnetwork_interface_info): Fix pointer signedness.
19781 (process_send_signal): Add cast to avoid pointer signedness problem.
19782 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
19783 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
19785 Make tparam.h and terminfo.c consistent.
19786 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
19787 Include tparam.h instead, since it declares them.
19788 * cm.h (PC): Remove extern decl; tparam.h now does this.
19789 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
19790 * terminfo.c: Include tparam.h, to check interfaces.
19791 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
19792 (tparam): Adjust signature to match interface in tparam.h;
19793 this removes some undefined behavior. Check that outstring and len
19794 are zero, which they always are with Emacs.
19795 * tparam.h (PC, BC, UP): New extern decls.
19797 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
19798 (xftfont_open): Rename locals to avoid shadowing.
19800 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
19801 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
19802 (OTF_TAG_SYM): Omit macro if not needed.
19803 (ftfont_list): Remove unused local.
19804 (get_adstyle_property, ftfont_pattern_entity):
19805 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
19806 Rename locals to avoid shadowing.
19808 * xfont.c (xfont_list_family): Mark var as initialized.
19810 * xml.c (make_dom): Now static.
19812 * composite.c (composition_compute_stop_pos): Rename local to
19814 (composition_reseat_it): Remove unused locals.
19815 (find_automatic_composition, composition_adjust_point): Likewise.
19816 (composition_update_it): Mark var as initialized.
19817 (find_automatic_composition): Mark vars as initialized,
19818 with a FIXME (Bug#8290).
19820 character.h: Rename locals to avoid shadowing.
19821 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
19822 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
19823 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
19824 (BUF_DEC_POS): Be more systematic about renaming local temporaries
19825 to avoid shadowing.
19827 * textprop.c (property_change_between_p): Remove; unused.
19829 * intervals.c (interval_start_pos): Now static.
19831 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
19833 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
19834 Rename locals to avoid shadowing.
19836 * sound.c (wav_play, au_play, Fplay_sound_internal):
19837 Fix pointer signedness.
19838 (alsa_choose_format): Remove unused local var.
19839 (wav_play): Initialize a variable to 0, to prevent undefined
19840 behavior (Bug#8278).
19842 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
19844 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
19846 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
19847 clobbering (Bug#8298).
19848 * sysdep.c (sys_subshell): Likewise.
19849 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
19851 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
19852 This should get cleaned up, so that child_setup has the
19853 same signature on all platforms.
19855 * callproc.c (call_process_cleanup): Now static.
19856 (relocate_fd): Rename locals to avoid shadowing.
19858 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
19860 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
19861 not to be necessary, and produces flickering.
19863 2011-03-20 Glenn Morris <rgm@gnu.org>
19865 * config.in: Remove file.
19867 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
19869 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
19870 are now in src/globals.h.
19871 (syms_of_minibuf): Remove spurious & from previous change.
19873 2011-03-20 Leo Liu <sdl.web@gmail.com>
19875 * minibuf.c (completing-read-function): New variable.
19876 (completing-read-default): Rename from completing-read.
19877 (completing-read): Call completing-read-function.
19879 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
19881 * xfaces.c (Fx_load_color_file):
19882 Read color file from absolute filename (bug#8250).
19884 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
19886 * makefile.w32-in: Update dependencies.
19888 2011-03-17 Eli Zaretskii <eliz@gnu.org>
19890 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
19892 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
19894 Fix more problems found by GCC 4.5.2's static checks.
19896 * process.c (make_serial_process_unwind, send_process_trap):
19897 (sigchld_handler): Now static.
19899 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
19900 That way, the code declares only the vars that it needs.
19901 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
19902 * s/cygwin.h (PTY_ITERATION): Likewise.
19903 * s/darwin.h (PTY_ITERATION): Likewise.
19904 * s/gnu-linux.h (PTY_ITERATION): Likewise.
19906 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
19907 * process.c (allocate_pty): Don't declare stb unless it's needed.
19909 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
19910 (CONSTANTLIM): Remove; unused.
19911 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
19912 Define only if needed.
19914 * unexelf.c (unexec): Name an expression,
19915 to avoid gcc -Wbad-function-cast warning.
19916 Use a different way to cause a compilation error if anyone uses
19917 n rather than nn, a way that does not involve shadowing.
19918 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
19920 * deps.mk (unexalpha.o): Remove; unused.
19922 New file unexec.h, the (simple) interface for unexec (Bug#8267).
19923 * unexec.h: New file.
19924 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
19925 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
19926 Depend on unexec.h.
19927 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
19928 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
19929 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
19930 Change as necessary to match prototype in unexec.h.
19932 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
19934 (back_comment, skip_chars): Mark vars as initialized.
19936 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
19937 Rename locals to avoid shadowing.
19939 * lread.c (read1): Rewrite so as not to use empty "else".
19940 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
19942 * print.c (Fredirect_debugging_output): Fix pointer signedess.
19944 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
19945 warning when compiling print.c.
19947 * font.c (font_unparse_fcname): Abort in an "impossible" situation
19948 instead of using an uninitialized var.
19949 (font_sort_entities): Mark var as initialized.
19951 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
19953 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
19954 pointers to constants.
19955 (font_parse_fcname): Remove unused vars.
19956 (font_delete_unmatched): Now static.
19957 (font_get_spec): Remove; unused.
19958 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
19959 (font_update_drivers, Ffont_get_glyphs, font_add_log):
19960 Rename or move locals to avoid shadowing.
19962 * fns.c (require_nesting_list, require_unwind): Now static.
19963 (Ffillarray): Rename locals to avoid shadowing.
19965 * floatfns.c (domain_error2): Define only if needed.
19966 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
19968 * alloc.c (mark_backtrace): Move decl from here ...
19969 * lisp.h: ... to here, so that it can be checked.
19971 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
19972 (Fdefvar): Rewrite so as not to use empty "else".
19973 (lisp_indirect_variable): Name an expression,
19974 to avoid gcc -Wbad-function-cast warning.
19975 (Fdefvar): Rename locals to avoid shadowing.
19977 * callint.c (quotify_arg, quotify_args): Now static.
19978 (Fcall_interactively): Rename locals to avoid shadowing.
19979 Use const pointer when appropriate.
19981 * lisp.h (get_system_name, get_operating_system_release):
19982 Move decls here, to check interfaces.
19983 * process.c (get_operating_system_release): Move decl to lisp.h.
19984 * xrdb.c (get_system_name): Likewise.
19985 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
19986 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
19987 some of which prompt warnings from gcc -Wbad-function-cast.
19988 (Fformat_time_string, Fencode_time, Finsert_char):
19989 (Ftranslate_region_internal, Fformat):
19990 Rename or remove local vars to avoid shadowing.
19991 (Ftranslate_region_internal): Mark var as initialized.
19993 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
19996 * lisp.h (eassert): Check that the argument compiles, even if
19997 ENABLE_CHECKING is not defined.
19999 * data.c (Findirect_variable): Name an expression, to avoid
20000 gcc -Wbad-function-cast warning.
20001 (default_value, arithcompare, arith_driver, arith_error): Now static.
20002 (store_symval_forwarding): Rename local to avoid shadowing.
20003 (Fmake_variable_buffer_local, Fmake_local_variable):
20004 Mark variables as initialized.
20005 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
20007 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
20008 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
20009 Rename locals to avoid shadowing.
20010 (mark_stack): Move local variables into the #ifdef region where
20012 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
20013 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
20015 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
20016 (GC_STRING_CHARS): Remove; not used.
20017 (Fmemory_limit): Cast sbrk's returned value to char *.
20019 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
20020 avoids undefined behavior in theory.
20022 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
20024 Use functions, not macros, for up- and down-casing (Bug#8254).
20025 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20026 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
20027 to use the following functions instead of these macros.
20028 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
20029 EMACS_INT, since callers assume the returned value fits in int.
20030 (upcase1): Likewise, for UPCASE_TABLE.
20031 (uppercasep, lowercasep, upcase): New static inline functions.
20032 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
20033 the race-condition problem in the old DOWNCASE.
20035 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
20036 Rename locals to avoid shadowing.
20037 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
20038 (regex_compile, re_search_2, re_match_2_internal):
20039 Remove unused local vars.
20040 (FREE_VAR): Rewrite so as not to use empty "else",
20041 which gcc can warn about.
20042 (regex_compile, re_match_2_internal): Mark locals as initialized.
20043 (RETALLOC_IF): Define only if needed.
20044 (WORDCHAR_P): Likewise. This one is never needed, but is used
20045 only in a comment talking about a compiler bug, so put inside
20046 the #if 0 of that comment.
20047 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
20048 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
20051 * search.c (boyer_moore): Rename locals to avoid shadowing.
20052 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
20053 (PREV_CHAR_BOUNDARY): Likewise.
20055 * search.c (simple_search): Remove unused var.
20057 * dired.c (compile_pattern): Move decl from here ...
20058 * lisp.h: ... to here, so that it can be checked.
20059 (struct re_registers): New forward decl.
20061 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
20063 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
20065 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
20066 Rename locals to avoid shadowing.
20067 (Fvertical_motion): Mark locals as initialized.
20069 * casefiddle.c (casify_object, casify_region): Now static.
20070 (casify_region): Mark local as initialized.
20072 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
20074 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
20075 New macros, so that the caller can use some names other than
20076 gcpro1, gcpro2, etc.
20077 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
20079 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
20080 argument, for consistency with GCPRO2_VAR, etc: it is now the
20081 prefix of the variable, not the variable itself. All uses
20083 * dired.c (directory_files_internal, file_name_completion):
20084 Rename locals to avoid shadowing.
20086 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
20087 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
20088 dired.c's scmp function, had undefined behavior.
20089 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
20090 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
20091 * buffer.h: ... to here, because these macros use current_buffer,
20092 and the new implementation with inline functions needs to have
20093 current_buffer in scope now, rather than later when the macros
20095 (downcase, upcase1): New static inline functions.
20096 (DOWNCASE, UPCASE1): Reimplement using these functions.
20097 This avoids undefined behavior in expressions like
20098 DOWNCASE (x) == DOWNCASE (y), which previously suffered
20099 from race conditions in accessing the global variables
20100 case_temp1 and case_temp2.
20101 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
20102 * lisp.h (case_temp1, case_temp2): Remove their decls.
20103 * character.h (ASCII_CHAR_P): Move from here ...
20104 * lisp.h: ... to here, so that the inline functions mentioned
20105 above can use them.
20107 * dired.c (directory_files_internal_unwind): Now static.
20109 * fileio.c (file_name_as_directory, directory_file_name):
20110 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
20112 (file_name_as_directory): Use const pointers when appropriate.
20113 (Fexpand_file_name): Likewise. In particular, newdir might
20114 point at constant storage, so make it a const pointer.
20115 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
20116 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
20118 (Fset_file_times, Finsert_file_contents, auto_save_error):
20119 Rename locals to avoid shadowing.
20121 * minibuf.c (choose_minibuf_frame_1): Now static.
20122 (Ftry_completion, Fall_completions): Rename or remove locals
20123 to avoid shadowing.
20125 * marker.c (bytepos_to_charpos): Remove; unused.
20127 * lisp.h (verify_bytepos, count_markers): New decls,
20128 so that gcc does not warn that these functions aren't declared.
20130 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
20131 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
20132 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
20133 (copy_text): Remove unused local var.
20135 * filelock.c (within_one_second): Now static.
20136 (lock_file_1): Rename local to avoid shadowing.
20138 * buffer.c (fix_overlays_before): Mark locals as initialized.
20139 (fix_start_end_in_overlays): Likewise. This function should be
20140 simplified by using pointers-to-pointers, but that's a different
20142 (switch_to_buffer_1): Now static.
20143 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
20144 (report_overlay_modification): Rename locals to avoid shadowing.
20146 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
20147 Fix pointer signedness issue.
20148 (sys_subshell): Mark local as volatile if checking for lint,
20149 to suppress a gcc -Wclobbered warning that does not seem to be right.
20150 (MAXPATHLEN): Define only if needed.
20152 * process.c (serial_open, serial_configure): Move decls from here ...
20153 * systty.h: ... to here, so that they can be checked.
20155 * fns.c (get_random, seed_random): Move extern decls from here ...
20156 * lisp.h: ... to here, so that they can be checked.
20158 * sysdep.c (reset_io): Now static.
20159 (wait_for_termination_signal): Remove; unused.
20161 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
20162 (copy_keymap_item, append_key, push_text_char_description):
20164 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
20165 (DENSE_TABLE_SIZE): Remove; unused.
20166 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
20167 (describe_map_tree):
20168 Rename locals to avoid shadowing.
20170 * keyboard.c: Declare functions static if they are not used elsewhere.
20171 (echo_char, echo_dash, cmd_error, top_level_2):
20172 (poll_for_input, handle_async_input): Now static.
20173 (read_char, kbd_buffer_get_event, make_lispy_position):
20174 (make_lispy_event, make_lispy_movement, apply_modifiers):
20175 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
20176 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
20177 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
20178 (read_key_sequence, read_char): Mark locals as initialized.
20179 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
20181 * keyboard.h (make_ctrl_char): New decl.
20182 (mark_kboards): Move decl here ...
20183 * alloc.c (mark_kboards): ... from here.
20185 * lisp.h (force_auto_save_soon): New decl.
20187 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
20188 (DEFINE_DUMMY_FUNCTION): New macro.
20189 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
20191 (main): Add casts to avoid warnings
20192 if GCC considers string literals to be constants.
20194 * lisp.h (fatal_error_signal): Add decl, since it's exported.
20196 * dbusbind.c: Pointer signedness fixes.
20197 (xd_signature, xd_append_arg, xd_initialize):
20198 (Fdbus_call_method, Fdbus_call_method_asynchronously):
20199 (Fdbus_method_return_internal, Fdbus_method_error_internal):
20200 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
20201 (Fdbus_register_signal): Use SSDATA when the context wants char *.
20203 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
20204 if GCC considers string literals to be constants.
20205 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
20207 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
20209 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
20210 (print_preprocess, print_object): New macro to fix last change.
20212 * print.c (print_preprocess): Don't forget font objects.
20214 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
20216 * emacs.c (USAGE3): Doc fixes.
20218 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
20220 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
20223 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
20225 * lisp.h (VWindow_system, Qfile_name_history):
20226 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
20227 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
20228 (w32_system_caret_x, w32_system_caret_y): Declare extern.
20230 * w32select.c: Don't #include "keyboard.h".
20231 (run_protected): Add extern declaration for waiting_for_input.
20233 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
20234 * w32console.c (detect_input_pending, read_input_pending)
20235 (encode_terminal_code):
20236 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
20237 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
20238 (w32_system_caret_y, Qfile_name_history):
20239 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
20240 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
20241 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
20242 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
20243 * w32proc.c (Qlocal, report_file_error):
20244 * w32term.c (Vwindow_system, updating_frame):
20245 * w32uniscribe.c (initialized, uniscribe_font_driver):
20246 Remove unneeded extern declarations.
20248 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
20250 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
20252 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
20254 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
20255 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
20256 These macros can no longer be used for assignment.
20258 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
20259 Assign struct members directly, instead of using BUF_BEGV etc.
20260 (record_buffer_markers, fetch_buffer_markers): New functions for
20261 recording and fetching special buffer markers.
20262 (set_buffer_internal_1, set_buffer_temp): Use them.
20264 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
20266 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
20268 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
20269 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
20271 * xdisp.c (hscroll_window_tree):
20272 (reconsider_clip_changes): Use PT instead of BUF_PT.
20274 2011-03-13 Eli Zaretskii <eliz@gnu.org>
20276 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
20277 $(EMACS_ROOT)/lib/intprops.h.
20279 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
20281 Fix more problems found by GCC 4.5.2's static checks.
20283 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
20284 to unsigned char * to avoid compiler diagnostic.
20285 (xg_free_frame_widgets): Make it clear that a local variable is
20286 needed only if USE_GTK_TOOLTIP.
20287 (gdk_window_get_screen): Make it clear that this macro is needed
20288 only if USE_GTK_TOOLTIP.
20289 (int_gtk_range_get_value): New function, which avoids a diagnostic
20290 from gcc -Wbad-function-cast.
20291 (xg_set_toolkit_scroll_bar_thumb): Use it.
20292 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
20293 diagnostic from gcc -Wbad-function-cast.
20294 (get_utf8_string, xg_get_file_with_chooser):
20295 Rename locals to avoid shadowing.
20296 (create_dialog): Move locals to avoid shadowing.
20298 * xgselect.c (xg_select): Remove unused var.
20300 * image.c (four_corners_best): Mark locals as initialized.
20301 (gif_load): Initialize transparent_p to zero (Bug#8238).
20302 Mark another local as initialized.
20303 (my_png_error, my_error_exit): Mark with NO_RETURN.
20305 * image.c (clear_image_cache): Now static.
20306 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
20307 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
20308 (x_edge_detection): Remove unnecessary cast that
20309 gcc -Wbad-function-cast diagnoses.
20310 (gif_load): Fix pointer signedness.
20311 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
20312 (jpeg_load, gif_load): Rename locals to avoid shadowing.
20314 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
20316 Improve quality of tests for time stamp overflow.
20317 For example, without this patch (encode-time 0 0 0 1 1
20318 1152921504606846976) returns the obviously-bogus value (-948597
20319 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
20320 reports time overflow. See
20321 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
20322 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
20323 * editfns.c: Include limits.h and intprops.h.
20324 (TIME_T_MIN, TIME_T_MAX): New macros.
20325 (time_overflow): Move earlier, to before first use.
20326 (hi_time, lo_time): New functions, for an accurate test for
20327 out-of-range times.
20328 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
20329 (Fget_internal_run_time): Don't assume time_t fits in int.
20330 (make_time): Use list2 instead of Fcons twice.
20331 (Fdecode_time): More accurate test for out-of-range times.
20332 (check_tm_member): New function.
20333 (Fencode_time): Use it, to test for out-of-range times.
20334 (lisp_time_argument): Don't rely on undefined left-shift and
20335 right-shift behavior when checking for time stamp overflow.
20337 * editfns.c (time_overflow): New function, refactoring common code.
20338 (Fformat_time_string, Fdecode_time, Fencode_time):
20339 (Fcurrent_time_string): Use it.
20341 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
20342 * dired.c (make_time): Move to ...
20343 * editfns.c (make_time): ... here.
20344 * systime.h: Note the move.
20346 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20348 * fringe.c (update_window_fringes): Remove unused variables.
20350 * unexmacosx.c (copy_data_segment): Also copy __got section.
20353 2011-03-12 Eli Zaretskii <eliz@gnu.org>
20355 * termcap.c [MSDOS]: Include "msdos.h".
20356 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
20357 Constify `char *' arguments and their references according to
20358 prototypes in tparam.h.
20360 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
20362 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
20363 Adapt all references accordingly.
20365 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
20367 2011-03-11 Tom Tromey <tromey@redhat.com>
20369 * buffer.c (syms_of_buffer): Remove obsolete comment.
20371 2011-03-11 Eli Zaretskii <eliz@gnu.org>
20373 * termhooks.h (encode_terminal_code): Declare prototype.
20375 * msdos.c (encode_terminal_code): Don't declare prototype.
20377 * term.c (encode_terminal_code): Now external again, used by
20378 w32console.c and msdos.c.
20380 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
20381 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
20383 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
20385 Fix some minor problems found by GCC 4.5.2's static checks.
20387 * fringe.c (update_window_fringes): Mark locals as initialized
20389 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
20391 * alloc.c (mark_fringe_data): Move decl from here ...
20392 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
20393 to check its interface.
20394 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
20396 * fontset.c (free_realized_fontset): Now static.
20397 (Fset_fontset_font): Rename local to avoid shadowing.
20398 (fontset_font): Mark local as initialized.
20399 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
20401 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
20403 * xselect.c (x_disown_buffer_selections): Remove; not used.
20404 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
20405 (x_own_selection, Fx_disown_selection_internal): Rename locals
20406 to avoid shadowing.
20407 (x_handle_dnd_message): Remove local to avoid shadowing.
20409 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
20410 so that the caller can use some name other than gcpro1.
20411 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
20412 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20413 (Fx_backspace_delete_keys_p):
20414 Use them to avoid shadowing, and rename vars to avoid shadowing.
20415 (x_decode_color, x_set_name, x_window): Now static.
20416 (Fx_create_frame): Add braces to silence GCC warning.
20417 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
20418 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
20419 Remove unused locals.
20420 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
20421 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
20422 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
20425 * xterm.h (x_mouse_leave): New decl.
20427 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
20428 Remove unused functions.
20429 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
20430 (x_calc_absolute_position): Now static.
20431 (XTread_socket): Don't define label "out" unless it's used.
20432 Don't declare local "event" unless it's used.
20433 (x_iconify_frame, x_free_frame_resources): Don't declare locals
20434 unless they are used.
20435 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
20436 (x_fatal_error_signal): Remove; not used.
20437 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
20438 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
20439 (x_error_catcher, x_connection_closed, x_error_handler):
20440 (x_error_quitter, xembed_send_message, x_iconify_frame):
20441 (my_log_handler): Rename locals to avoid shadowing.
20442 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
20443 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
20445 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
20446 Rename or move locals to avoid shadowing.
20447 (tty_defined_color, merge_face_heights): Now static.
20448 (free_realized_faces_for_fontset): Remove; not used.
20449 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
20450 does not deduce is never used uninitialized.
20451 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
20452 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
20454 * terminal.c (store_terminal_param): Now static.
20456 * xmenu.c (menu_highlight_callback): Now static.
20457 (set_frame_menubar): Remove unused local.
20458 (xmenu_show): Rename parameter to avoid shadowing.
20459 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
20460 since they might point to immutable storage.
20461 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
20462 since it's unused otherwise.
20464 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
20465 Add a FIXME, since the code still doesn't look right. (Bug#8215)
20466 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
20467 avoids a gcc -Wuninitialized diagnostic.
20468 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
20469 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
20470 does not deduce are never used uninitialized.
20472 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
20474 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
20475 * window.c (window_loop, size_window):
20476 (run_window_configuration_change_hook, enlarge_window): Likewise.
20478 * window.c (display_buffer): Now static.
20479 (size_window): Mark variables that gcc -Wuninitialized
20480 does not deduce are never used uninitialized.
20481 * window.h (check_all_windows): New decl, to forestall
20482 gcc -Wmissing-prototypes diagnostic.
20483 * dispextern.h (bidi_dump_cached_states): Likewise.
20485 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
20487 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
20488 Include <limits.h>.
20489 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
20490 and to avoid gcc -Wuninitialized warning.
20491 (load_charset_map): Mark variables that gcc -Wuninitialized
20492 does not deduce are never used uninitialized.
20493 (load_charset): Abort instead of using uninitialized var (Bug#8229).
20495 * coding.c (coding_set_source, coding_set_destination):
20496 Use "else { /* comment */ }" rather than "else /* comment */;"
20497 for clarity, and to avoid gcc -Wempty-body warning.
20498 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
20499 a block, when the outer 'i' will do.
20500 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
20501 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
20502 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
20503 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
20504 (Fdecode_sjis_char, Fdefine_coding_system_internal):
20505 Rename locals to avoid shadowing.
20506 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
20507 * coding.c (emacs_mule_char, encode_invocation_designation):
20508 Now static, since they're not used elsewhere.
20509 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
20510 (decode_coding_object, encode_coding_object, detect_coding_system):
20511 (decode_coding_emacs_mule): Mark variables that gcc
20512 -Wuninitialized does not deduce are never used uninitialized.
20513 (detect_coding_iso_2022): Initialize a local variable that might
20514 be used uninitialized. Leave a FIXME because it's not clear that
20515 this initialization is needed. (Bug#8211)
20516 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
20517 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
20518 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
20519 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
20520 Remove unused macros.
20522 * category.c (hash_get_category_set): Remove unused local var.
20523 (copy_category_table): Now static, since it's not used elsewhere.
20524 * character.c (string_count_byte8): Likewise.
20526 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
20527 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
20529 * chartab.c (copy_sub_char_table): Now static, since it's not used
20531 (sub_char_table_ref_and_range, char_table_ref_and_range):
20532 Rename locals to avoid shadowing.
20533 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
20535 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
20536 (BIDI_BOB): Remove unused macro.
20538 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
20539 deduce are never used uninitialized.
20540 * term.c (encode_terminal_code): Likewise.
20542 * term.c (encode_terminal_code): Now static. Remove unused local.
20544 * tparam.h: New file.
20545 * term.c, tparam.h: Include it.
20546 * deps.mk (term.o, tparam.o): Depend on tparam.h.
20547 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
20548 Move these decls to tparam.h, and make them agree with what
20549 is actually in tparam.c. The previous trick of using incompatible
20550 decls in different modules does not conform to the C standard.
20551 All callers of tparam changed to use tparam's actual API.
20552 * tparam.c (tparam1, tparam, tgoto):
20553 Use const pointers where appropriate.
20555 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
20556 * cm.h (struct cm): Likewise.
20557 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
20558 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
20559 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
20560 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
20561 (turn_on_face, init_tty): Likewise.
20562 * termchar.h (struct tty_display_info): Likewise.
20564 * term.c (term_mouse_position): Rename local to avoid shadowing.
20566 * alloc.c (mark_ttys): Move decl from here ...
20567 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
20569 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
20571 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
20573 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
20575 * search.c (compile_pattern_1): Remove argument regp, unused since
20576 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
20577 (compile_pattern): Don't pass it.
20579 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
20581 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
20582 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
20584 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
20586 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
20588 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
20589 gdk_window_get_screen, gdk_window_get_geometry,
20590 gdk_x11_window_lookup_for_display and GDK_KEY_g.
20591 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
20592 (xg_get_pixbuf_from_pixmap): New function.
20593 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
20594 to Pixmap, take frame as parameter, remove GdkColormap parameter.
20595 Call xg_get_pixbuf_from_pixmap instead of
20596 gdk_pixbuf_get_from_drawable.
20597 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
20598 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
20599 (xg_check_special_colors): Use GtkStyleContext and its functions
20601 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
20602 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
20603 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
20604 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
20605 Call gtk_widget_get_preferred_size.
20606 (xg_frame_resized): gdk_window_get_geometry only takes 5
20608 (xg_win_to_widget, xg_event_is_for_menubar):
20609 Call gdk_x11_window_lookup_for_display.
20610 (xg_set_widget_bg): New function.
20611 (delete_cb): New function.
20612 (xg_create_frame_widgets): Connect delete-event to delete_cb.
20613 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
20614 (xg_set_background_color): Call xg_set_widget_bg.
20615 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
20616 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
20617 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
20618 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
20620 (update_frame_tool_bar): Call gtk_widget_hide.
20621 (xg_initialize): Use GDK_KEY_g.
20623 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
20625 (x_session_initialize): Call gdk_x11_set_sm_client_id.
20627 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
20628 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
20629 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
20631 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
20633 * w32xfns.c (select_palette): Check success of RealizePalette against
20634 GDI_ERROR, not zero.
20636 See ChangeLog.11 for earlier changes.
20638 ;; Local Variables:
20642 Copyright (C) 2011-2012 Free Software Foundation, Inc.
20644 This file is part of GNU Emacs.
20646 GNU Emacs is free software: you can redistribute it and/or modify
20647 it under the terms of the GNU General Public License as published by
20648 the Free Software Foundation, either version 3 of the License, or
20649 (at your option) any later version.
20651 GNU Emacs is distributed in the hope that it will be useful,
20652 but WITHOUT ANY WARRANTY; without even the implied warranty of
20653 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20654 GNU General Public License for more details.
20656 You should have received a copy of the GNU General Public License
20657 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.