1 2013-05-22 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3 * casetab.c (init_casetab_once): Fix last change (bug#14424).
5 2013-05-22 Kenichi Handa <handa@gnu.org>
7 The following changes are to fix the setting of
8 buffer-file-coding-system on, for instance, C-x RET c unix RET
9 _FILE_OF_DOS_EOL_TYPE_ RET.
11 * coding.h (struct coding_system): New member detected_utf8_chars.
13 * coding.c (detect_coding_utf_8): Count characters and check EOL
14 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
16 (setup_coding_system): Do not initialize coding->head_ascii.
17 (check_ascii): Do not set coding->eol_seen but update it. Do not
18 call adjust_coding_eol_type here.
19 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
20 If the eol-type of CODING is already specified, adjust the eol type
21 of the found coding-system.
22 (decode_coding_gap): Cancel previous change. Utilize the
23 character numbers counted by detect_coding_utf_8. Fix detection
26 2013-05-21 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
28 * search.c (looking_at_1): Only set last_thing_searched if the match
29 changed the match-data (bug#14281).
31 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
33 * xdisp.c (reseat_at_previous_visible_line_start):
34 Already declared in dispextern.h, so remove it here.
35 (move_it_vertically_backward): Likewise.
37 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
39 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
40 (Fx_display_pixel_width, Fx_display_pixel_height)
41 (Fx_display_mm_width, Fx_display_mm_height):
42 Mention `display-monitor-attributes-list' in docstrings.
44 * nsfns.m (ns_get_screen): Remove function. All uses removed.
45 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
46 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
47 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
48 (Fx_display_backing_store, Fx_display_visual_class)
49 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
50 (Fx_display_grayscale_p, Fx_display_pixel_width)
51 (Fx_display_pixel_height, Fx_display_planes)
52 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
53 (Fx_display_screens): Don't confuse X11 screens with NS screens.
54 (Fx_display_mm_width, Fx_display_mm_height)
55 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
56 height for all physical monitors as in X11.
58 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
59 Return pixel width or height for all physical monitors as in X11.
61 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
63 Port --enable-gcc-warnings to clang.
64 * bytecode.c (exec_byte_code):
66 Redo diagnostic pragmas to pacify clang, too.
67 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
68 * editfns.c (Fencode_time):
69 * fileio.c (file_accessible_directory_p):
70 * font.c (font_unparse_xlfd):
71 Use '&"string"[index]' instead of '"string" + (index)'.
72 * undo.c (user_error): Remove; unused.
74 2013-05-16 Eli Zaretskii <eliz@gnu.org>
76 * insdel.c (insert_1_both): Document the arguments, instead of
77 referring to insert_1, which no longer exists.
79 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
80 some window, increment windows_or_buffers_changed, so that
81 *Messages* display in that window is updated. (Bug#14408)
83 * w32.c: Include epaths.h.
84 (init_environment): Use cmdproxy.exe without leading directories.
85 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
87 (gettimeofday): Adjust signature and return value to Posix
90 * unexw32.c (open_output_file): Delete the existing emacs.exe
91 before creating it, to break the hard link to the versioned
94 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
95 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
96 (FIRSTFILE_OBJ): New variables.
97 (W32_RES): Rename to EMACSRES. All users changed.
98 (base_obj): Use $(CM_OBJ).
99 (ALLOBJS): Use $(FIRSTFILE_OBJ).
100 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
101 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
102 $(W32_RES_LINK) before $(LIBES).
103 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
105 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
107 * makefile.w32-in (DOC): Use just "DOC".
109 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
111 * process.c: Export default filters and sentinels to Elisp.
112 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
114 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
115 (Fset_process_sentinel, Fformat_network_address):
116 Default to them instead of nil.
117 (server_accept_connection): Sentinels can't be nil any more.
118 (read_and_dispose_of_process_output): New function, extracted from
120 (read_process_output): Use it; filters can't be nil.
121 (Finternal_default_process_filter): New function, extracted from
123 (exec_sentinel_unwind): Remove function.
124 (exec_sentinel): Don't zilch sentinel while running.
125 (status_notify): Sentinels can't be nil.
126 (Finternal_default_process_sentinel): New function extracted from
128 (setup_process_coding_systems): Default filter is not nil any more.
129 (syms_of_process): Export new Elisp functions and initialize
131 * lisp.h (make_lisp_proc): New function.
133 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
135 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
137 2013-05-14 Eli Zaretskii <eliz@gnu.org>
139 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
140 unless we know that the window w is a leaf window.
141 Another attempt at solving bug#14062.
143 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
145 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
148 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
150 * image.c (gif_load): Check that subimages fit (Bug#14345).
152 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
154 * lread.c (skip_dyn_eof): New function.
155 (read1): Use it to skip the end of a file in response to #@00.
157 * doc.c (get_doc_string): Slightly relax the sanity checking.
159 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
161 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
162 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
163 (MonitorInfo): New struct.
164 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
165 (Fns_display_monitor_attributes_list): New functions.
166 (display-usable-bounds): Remove.
167 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
170 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
172 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
173 (GTK_CHECK_VERSION): New macro, if not already defined.
174 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
175 replaced by GTK_CHECK_VERSION.
177 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
179 * xterm.h (GTK_PREREQ): New macro.
180 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
181 to use this macro instead, for consistency and clarity.
183 2013-05-08 Eli Zaretskii <eliz@gnu.org>
185 * xdisp.c (row_for_charpos_p): New function, with code of
186 cursor_row_p, but accepts an additional argument CHARPOS instead
187 of using a hardcoded PT.
188 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
189 (row_containing_pos): Call row_for_charpos_p instead of partially
190 doing the same. Fixes cursor positioning under longlines-mode
191 when longlines-show-effect includes more than one newline, when
192 moving the cursor vertically up.
194 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
196 * makefile.w32-in (ACL_H): New macro.
197 ($(BLD)/fileio.$(O)): Update dependencies.
199 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
201 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
202 * Makefile.in (LIB_ACL): New macro.
203 (LIBACL_LIBS): Remove.
204 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
205 * fileio.c: Include <acl.h>.
206 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
207 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
209 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
212 * unexelf.c: Don't assume ElfW (Half) fits in int.
213 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
214 when dealing with ElfW (Half) values, since they can exceed 2**31
215 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
216 (entry_address): Omit unused NUM arg. All uses changed.
218 2013-05-07 Juri Linkov <juri@jurta.org>
220 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
221 to the string converted from number with `Fnumber_to_string'.
224 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
226 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
227 This fixes a problem introduced by my previous change.
229 2013-05-07 Glenn Morris <rgm@gnu.org>
231 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
233 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
235 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
237 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
239 Static checking by GCC 4.8.0.
240 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
241 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
242 (x_get_monitor_attributes_fallback)
243 (x_get_monitor_attributes_xinerama)
244 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
245 Define only if USE_GTK.
246 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
247 (x_get_monitor_attributes_fallback): Omit unused locals.
248 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
249 Use double, not float, to avoid mixed-mode floating point arithmetic.
251 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
252 Jan Djärv <jan.h.d@swipnet.se>
254 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
255 (XINERAMA_CFLAGS): New macros.
256 (ALL_CFLAGS, LIBES): Use them.
258 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
259 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
260 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
261 (syms_of_xfns): DEFSYM them.
262 (struct MonitorInfo): New struct.
263 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
264 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
265 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
266 (x_get_monitor_attributes_xinerama): New functions.
267 (Fx_display_monitor_attributes_list): New primitive.
268 (syms_of_xfns): Defsubr it.
270 * xterm.h (x_display_info): Add Xatom_net_workarea and
271 Xatom_net_current_desktop.
273 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
274 and dpyinfo->Xatom_net_current_desktop.
276 2013-05-06 Eli Zaretskii <eliz@gnu.org>
278 * xdisp.c (pos_visible_p): Use the special code for finding the
279 beginning of a display property or overlay for any "replacing"
280 display property, not just for display strings. This solves
281 incorrect reporting of position by posn-at-point. (Bug#14241)
283 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
285 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
286 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
287 Verify that ElfW (Half) fits in int.
288 (fatal): Use same signature as lisp.h.
289 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
290 configure and build with -DUNEXELF_DEBUG without worrying about
291 other modules that use DEBUG.
292 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
293 possibly-wide integers now uses it instead of plain fprintf.
294 (entry_address): New function, which avoids problems with 32-bit
295 overflow on 64-bit hosts.
296 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
297 (round_up): Don't assume the remainder fits in int.
298 (find_section): Use bool for boolean. Simplify debug code.
299 (unexec): Don't assume file sizes fit in int or size_t.
300 Omit unnecessary trailing newline in 'fatal' format.
301 Use strerror rather than outputting decimal error number.
302 Remove unused code when emacs is not defined;
303 this file relies on Emacs now.
304 Don't assume e_phnum and e_shnum are positive.
306 * regex.c: Fix problems when DEBUG is defined.
307 (extract_number, extract_number_and_incr): Define regardless of
308 whether DEBUG is defined; that's simpler and makes the code less
309 likely to go stale in the normal case when DEBUG is not defined.
310 Return int rather than taking an int * arg. All callers changed.
311 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
312 Remove, replacing with ...
313 (DEBUG_PRINT): New macro. All callers changed.
314 (DEBUG_COMPILES_ARGUMENTS): New macro.
315 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
316 (print_compiled_pattern, print_double_string) [DEBUG]:
317 Use prototype rather than old-style definition.
318 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
319 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
320 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
321 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
322 Don't assume ptrdiff_t, size_t, and long are the same width as int.
323 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
324 This matters only when DEBUG is defined.
326 2013-05-05 Eli Zaretskii <eliz@gnu.org>
328 * xdisp.c (set_iterator_to_next): Set the
329 ignore_overlay_strings_at_pos_p flag only if we are _really_
330 iterating over an overlay string, as indicated by the
331 current.overlay_string_index member. (Bug#14306)
333 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
335 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
336 to where it is used, to avoid autorelease issues (Bug#14050).
338 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
340 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
341 * fileio.c (syms_of_fileio): Implement this.
342 * filelock.c (create_lock_file): If symbolic links don't work, so
343 we use a regular file as a lock file, do not fsync the lock file;
346 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
348 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
349 (syms_of_minibuf): Adjust accodingly.
351 * callint.c (Fcall_interactively): Adjust calls accordingly.
353 2013-05-04 Eli Zaretskii <eliz@gnu.org>
355 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
356 w->contents is a buffer before computing everything else.
357 Use parentheses to disambiguate last part of the condition.
359 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
360 assertion violations. (Bug#14062)
362 2013-05-01 David Reitter <david.reitter@gmail.com>
364 * nsfns.m (ns_tooltip): Initialize.
366 2013-04-28 Eli Zaretskii <eliz@gnu.org>
368 * coding.c (decode_coding_gap): Don't remove the character before
369 a newline unless it's a CR character. (Bug#14287)
371 2013-04-28 Dan Nicolaescu <dann@gnu.org>
373 * dispextern.h (struct face): Move enum face_underline_type
374 earlier so that bitfields can be in the same word.
376 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
378 * nsfns.m (handlePanelKeys): New function.
379 (EmacsOpenPanel:performKeyEquivalent:)
380 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
381 arrows/function/control and copy/paste keys (Bug#14296).
383 2013-04-27 Juri Linkov <juri@jurta.org>
385 * callint.c (Fcall_interactively): Call `Qread_number' for
386 interactive code letter `n' instead of using duplicate code.
389 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
391 * systime.h (make_timeval): Declare as 'const'.
393 2013-04-27 Kenichi Handa <handa@gnu.org>
395 * font.c (font_open_entity): Always open a font of manageable
398 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
400 Port better to AIX (Bug#14258).
401 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
404 2013-04-24 Kenichi Handa <handa@gnu.org>
406 * coding.c (decode_coding_iso_2022): When an invalid escape
407 sequence is encountered, reset the invocation and designation
408 status to the safest one.
410 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
412 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
413 Without this fix, "make distclean" leaves stamp-h1 behind.
415 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
417 * w32fns.c (w32_fullscreen_rect): New function to compute the
418 window rectangle for the given fullscreen mode.
419 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
420 longer tunes the window size. This keeps the window's edges flush
421 with the screen and allows the taskbar to hide itself in fullboth.
423 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
424 window decorations and uses the entire screen.
426 * w32term.h (w32_fullscreen_rect) Add prototype.
427 (struct w32_output): Replace normal_width, normal_height,
428 normal_top, and normal_left members with a single normal_placement
430 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
432 (FRAME_NORMAL_PLACEMENT): New macro.
434 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
436 * minibuf.c (Ftest_completion): Silence compiler warning.
438 2013-04-15 Eli Zaretskii <eliz@gnu.org>
440 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
443 * frame.h (WINDOW_FRAME): Protect macro and its argument with
446 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
447 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
448 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
449 parentheses where appropriate.
451 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
453 * keyboard.c (timer_start_idle): Remove no-longer-used local.
455 2013-04-14 Eli Zaretskii <eliz@gnu.org>
457 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
458 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
459 Mention in the doc string that setting these variables takes
460 effect only after a call to set-window-buffer. (Bug#14200)
462 2013-04-13 Eli Zaretskii <eliz@gnu.org>
464 * indent.c (Fvertical_motion): Don't consider display strings on
465 overlay strings as display strings on the buffer position we
466 started from. This prevents vertical cursor motion from jumping
467 more than one line when there's an overlay string with a display
468 property at end of line.
469 Reported by Karl Chen <Karl.Chen@quarl.org> in
470 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
472 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
474 * window.c (select_window): `record_buffer' even if window is
475 already selected (bug#14191).
477 2013-04-11 Eli Zaretskii <eliz@gnu.org>
479 * window.c (Fwindow_end): Test more flags, including the buffer's
480 last_overlay_modified flag, to determine whether the window's
481 display is really up-to-date. Prevents the function from
482 returning a stale value. (Bug#14170)
483 (Fwindow_line_height): Fix the test for up-to-date-ness of the
486 2013-04-10 Eli Zaretskii <eliz@gnu.org>
488 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
489 garbaged only if it is not already the top frame on its TTY.
490 This prevents flickering due to constant redrawing of TTY frames when
491 there are GUI frames open in the same session. (Bug#13864)
493 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
495 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
496 of marking the idle timers directly.
498 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
500 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
503 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
505 * window.c (select_window): Don't record_buffer while the invariant is
506 temporarily broken (bug#14161).
508 * fns.c (Fdelq): Don't assume !NILP => CONSP.
510 2013-04-07 Eli Zaretskii <eliz@gnu.org>
512 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
514 2013-04-07 Romain Francoise <romain@orebokech.com>
516 Ignore additional platform-specific ACL errors (Bug#13702).
517 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
518 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
520 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
522 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
525 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
527 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
528 This bug was introduced by my 2013-02-25 change that simplified
529 data_start configuration. Without this change, on GNU/Linux
530 an Emacs configured with --enable-profiling fails immediately
531 due to a profiler signal.
532 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
533 with these flags. On platforms where special flags are needed
534 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
535 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
536 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
538 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
540 Get rid of some platform-specific functions examining window
541 system and its capabilities. This is a partial rework of the
543 * lisp.h (have_menus_p): Remove prototype. This function is
544 replaced with platform-independent window_system_available.
545 (check_window_system): Move to...
546 * frame.h (decode_window_system_frame, window_system_available):
547 ...here, add new prototypes.
548 * frame.c (window_system_available, decode_window_system_frame):
550 (check_window_system): Platform-independent now.
551 * xterm.h (x_in_use): Remove declaration.
553 * w32term.h (check_x_frame):
554 * nsterm.h (check_x_frame): Remove prototypes. This function
555 is replaced with platform-independent decode_window_system_frame.
556 * msdos.c (have_menus_p): Remove.
557 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
558 Remove platform-specific functions. Use check_window_system,
559 decode_window_system_frame and check_ns_display_info where
560 appropriate. Minor style and comment tweaks.
561 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
562 (check_x_frame): Likewise.
563 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
565 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
566 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
567 * xmenu.c, xselect.c: All related users changed.
569 2013-04-03 Kenichi Handa <handa@gnu.org>
571 The following changes is to optimize the code for reading UTF-8
574 * coding.c (check_ascii): Rename from detect_ascii. Return value
575 changed. Check EOL format. Do not call adjust_coding_eol_type
577 (check_utf_8): New function.
578 (adjust_coding_eol_type): Do nothing if already adjusted.
579 (detect_coding): Compare the return value of check_ascii with
580 coding->src_bytes. Call adjust_coding_eol_type if necessary.
581 (decode_coding_gap): Optimize for valid UTF-8.
583 2013-03-21 Kenichi Handa <handa@gnu.org>
585 * coding.c (syms_of_coding): Cancel previous change.
587 * insdel.c (insert_from_gap): Fix previous change.
589 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
591 Consistently use platform-specific function to detect window system.
592 * lisp.h (check_window_system): New prototype. This function is
593 going to replace check_x, check_w32 and check_ns.
594 (have_menus_p): Mention msdos.c in comment.
595 * fontset.c (check_window_system_func): Remove. Adjust all users.
596 * fontset.h (check_window_system_func): Remove prototype.
597 * nsterm.h (check_ns):
599 * w32term.h (check_w32): Likewise.
600 * menu.c (Fx_popup_menu): Use check_window_system.
601 * msdos.c (check_window_system): Define for MS-DOS.
602 * nsfns.m (check_window_system): Define for NS. Adjust all users.
603 * w32fns.c (check_window_system): Likewise for MS-Windows.
604 * xfns.c (check_window_system): Likewise for X.
605 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
606 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
608 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
610 Prefer < to > in range checks such as 0 <= i && i < N.
611 This makes it easier to visualize quantities on a number line.
612 This patch doesn't apply to all such range checks,
613 only to the range checks affected by the 2013-03-24 change.
614 This patch reverts most of the 2013-03-24 change.
615 * alloc.c (xpalloc, Fgarbage_collect):
616 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
617 * character.c (string_escape_byte8):
618 * charset.c (read_hex):
619 * data.c (cons_to_unsigned):
620 * dispnew.c (update_frame_1):
621 * doc.c (Fsubstitute_command_keys):
623 * editfns.c (hi_time, decode_time_components):
624 * fileio.c (file_offset):
625 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
626 * font.c (font_intern_prop):
627 * frame.c (x_set_alpha):
628 * gtkutil.c (get_utf8_string):
629 * indent.c (check_display_width):
630 * keymap.c (Fkey_description):
631 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
633 * minibuf.c (read_minibuf_noninteractive):
634 * process.c (wait_reading_process_output):
635 * search.c (Freplace_match):
636 * window.c (get_phys_cursor_glyph):
637 * xdisp.c (redisplay_internal):
638 * xsmfns.c (smc_save_yourself_CB):
639 Prefer < to > for range checks.
640 * dispnew.c (sit_for): Don't mishandle NaNs.
641 This fixes a bug introduced in the 2013-03-24 change.
642 * editfns.c (decode_time_components): Don't hoist comparison.
643 This fixes another bug introduced in the 2013-03-24 change.
645 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
647 * frame.h (struct frame): Drop scroll_bottom_vpos
648 member becaue all real users are dead long ago.
649 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
650 * xdisp.c (redisplay_internal): Adjust user.
652 2013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
654 * nsmenu.m (showAtX:Y:for:): setLevel to
655 NSPopUpMenuWindowLevel (Bug#13998).
657 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
659 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
660 (ns_check_pending_open_menu): Declare.
662 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
663 (x_activate_menubar): Update the menu with title that matches
664 ns_get_pending_menu_title, and call
665 ns_check_pending_openmenu (Bug#12698).
666 (menuWillOpen:): New method.
667 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
669 * nsterm.m (menu_will_open_state, menu_mouse_point)
670 (menu_pending_title): New varaibles.
671 (ns_get_pending_menu_title, ns_check_menu_open)
672 (ns_check_pending_open_menu): New functions.
674 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
676 * indent.c (current_column_bol_cache): Remove leftover which is not
677 used in Fmove_to_column any more.
678 (current_column, scan_for_column): Adjust users.
679 * keyboard.c (last_point_position_buffer, last_point_position_window):
680 Remove leftovers which are not used for recording undo any more.
681 (command_loop_1, syms_of_keyboard): Adjust users.
682 * xdisp.c (last_max_ascent): Remove leftover which is not used in
683 redisplay_window any more.
684 (move_it_to): Adjust user.
686 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
688 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
691 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
693 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
694 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
697 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
699 * window.h (struct window): Replace hchild, vchild and buffer slots
700 with the only contents slot. This is possible because each valid
701 window may have either the child window (in vertical or horizontal
702 combination) or buffer to display (for the leaf window). Using that,
703 a lof of operations to traverse and/or change window hierarchies may
704 be simplified. New member horizontal is used to distinguish between
705 horizontal and vertical combinations of internal windows.
706 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
707 (WINDOW_VERTICAL_COMBINATION_P): New macros.
708 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
709 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
710 Use contents slot, not buffer, where appropriate.
711 (wset_combination): New function.
712 (wset_buffer): Add eassert.
713 (Fframe_first_window): Simplify the loop reaching first window.
714 (Fwindow_buffer): Use WINDOW_LEAF_P.
715 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
716 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
717 (unshow_buffer): Convert initial debugging check to eassert.
718 (replace_window, recombine_windows, Fdelete_other_windows_internal)
719 (make_parent_window, window_resize_check, window_resize_apply)
720 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
721 (Fset_window_configuration, delete_all_child_windows, save_window_save):
722 Adjust to match struct window changes.
723 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
724 (mark_window_cursors_off, count_windows, get_leaf_windows)
725 (foreach_window_1): Simplify the loop.
726 * alloc.c (mark_object): Do not check for the leaf window because
727 internal windows has no glyph matrices anyway.
728 * dispnew.c (clear_window_matrices, showing_window_margins_p)
729 (allocate_matrices_for_window_redisplay, fake_current_matrices)
730 (allocate_matrices_for_frame_redisplay, free_window_matrices)
731 (build_frame_matrix_from_window_tree, mirror_make_current)
732 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
733 (update_window_tree, set_window_update_flags): Simplify the loop.
734 (sync_window_with_frame_matrix_rows): Enforce live window.
735 Use contents slot, not buffer, where appropriate.
736 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
737 and WINDOW_HORIZONTAL_COMBINATION_P.
738 (make_frame_visible_1): Simplify the loop.
739 Use contents slot, not buffer, where appropriate.
740 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
741 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
742 (expose_window_tree): Likewise.
743 Use contents slot, not buffer, where appropriate.
744 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
745 to avoid deleted windows. Use contents slot instead of buffer.
746 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
747 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
748 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
749 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
751 2013-03-28 Eli Zaretskii <eliz@gnu.org>
753 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
754 identify the reasons for assertion violations in bug#14062 and
756 (Fx_show_tip): Fix compilation error under
757 "--enable-check-lisp-object-type". (Bug#14073)
759 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
760 Reported by <rzl24ozi@gmail.com>.
762 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
764 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
766 (unwind_with_echo_area_buffer): ...to restore it here.
767 This is needed to ensure that...
768 (redisplay_window): ...both window markers are valid here,
769 which is verified by eassert.
770 * editfns.c (save_excursion_save): Do not assume that
771 selected_window always displays the buffer.
772 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
775 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
777 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
780 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
782 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
784 2013-03-27 Eli Zaretskii <eliz@gnu.org>
786 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
787 since MinGW's w32api headers do. This avoids compiler warnings.
789 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
792 2013-03-26 Eli Zaretskii <eliz@gnu.org>
794 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
796 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
798 * gtkutil.c (style_changed_cb): Check if frame is live and an
801 2013-03-26 Eli Zaretskii <eliz@gnu.org>
803 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
804 Define only for _WIN32_WINNT less than 0x0500.
805 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
807 Move inclusion of time.h before sys/time.h, so that MinGW64 could
808 see its own definitions of 'struct timeval' and 'struct timezone'.
810 Fix incompatibilities between MinGW.org and MinGW64 headers.
811 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
813 * w32.c (REPARSE_DATA_BUFFER): Guard with
814 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
816 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
818 * xterm.c: Include X11/XKBlib.h
819 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
821 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
823 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
825 * blockinput.h (input_blocked_p): Likewise.
826 * bytecode.c (exec_byte_code): Likewise.
827 * callproc.c (call_process_kill, call_process_cleanup)
828 (Fcall_process): Likewise.
829 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
830 (Fccl_execute_on_string): Likewise.
831 * character.c (string_escape_byte8): Likewise.
832 * charset.c (read_hex): Likewise.
833 * cm.c (calccost): Likewise.
834 * data.c (cons_to_unsigned): Likewise.
835 * dired.c (directory_files_internal, file_name_completion):
837 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
839 * doc.c (Fsubstitute_command_keys): Likewise.
840 * doprnt.c (doprnt): Likewise.
841 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
842 * emacsgtkfixed.c: Likewise.
843 * fileio.c (file_offset, Fwrite_region): Likewise.
844 * floatfns.c (Fexpt, fmod_float): Likewise.
845 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
847 * font.c (font_intern_prop): Likewise.
848 * frame.c (x_set_alpha): Likewise.
849 * gtkutil.c (get_utf8_string): Likewise.
850 * indent.c (check_display_width): Likewise.
851 * intervals.c (create_root_interval, rotate_right, rotate_left)
852 (split_interval_right, split_interval_left)
853 (adjust_intervals_for_insertion, delete_node)
854 (interval_deletion_adjustment, adjust_intervals_for_deletion)
855 (merge_interval_right, merge_interval_left, copy_intervals)
856 (set_intervals_multibyte_1): Likewise.
857 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
858 * keymap.c (Fkey_description): Likewise.
859 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
860 * lread.c (openp, read_integer, read1, string_to_number):
862 * menu.c (ensure_menu_items): Likewise.
863 * minibuf.c (read_minibuf_noninteractive): Likewise.
864 * print.c (printchar, strout): Likewise.
865 * process.c (create_process, Faccept_process_output)
866 (wait_reading_process_output, read_process_output, send_process)
867 (wait_reading_process_output): Likewise.
868 * profiler.c (make_log, handle_profiler_signal): Likewise.
869 * regex.c (re_exec): Likewise.
871 * search.c (looking_at_1, Freplace_match): Likewise.
872 * sysdep.c (get_child_status, procfs_ttyname)
873 (procfs_get_total_memory): Likewise.
874 * systime.h (EMACS_TIME_VALID_P): Likewise.
875 * term.c (dissociate_if_controlling_tty): Likewise.
876 * window.c (get_phys_cursor_glyph): Likewise.
877 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
878 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
880 * xfns.c (Fx_window_property): Likewise.
881 * xmenu.c (set_frame_menubar): Likewise.
882 * xselect.c (x_get_window_property, x_handle_dnd_message):
884 * xsmfns.c (smc_save_yourself_CB): Likewise.
885 * xterm.c (x_scroll_bar_set_handle): Likewise.
887 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
889 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
890 to be optional or nil. Adjust comment and convert it to docstring.
891 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
892 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
894 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
896 Static checking by GCC 4.8-20130319.
897 * image.c (gif_load): Assume pass < 3 to pacify GCC.
898 * process.c (Fset_process_datagram_address)
899 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
900 * xdisp.c (get_char_face_and_encoding):
901 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
902 (get_glyph_face_and_encoding): Prepare face before possibly using it.
903 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
905 2013-03-24 Ken Brown <kbrown@cornell.edu>
907 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
908 fix compilation on 64-bit Cygwin, where underscores are not
909 automatically prepended.
911 * w32term.c (w32_initialize): Silence compiler warning.
913 2013-03-23 Eli Zaretskii <eliz@gnu.org>
915 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
916 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
917 variables, to save and restore frame dimensions.
918 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
919 after returning from a 'fullscreen' configuration.
920 use SendMessage instead of PostMessage to send the SC_RESTORE message,
921 to avoid races between the main thread and the input thread.
923 * w32term.h (struct w32_output): New members normal_width,
924 normal_height, normal_top, normal_left, and prev_fsmode.
925 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
926 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
929 * w32term.c (w32fullscreen_hook): Record last value of the frame's
930 'fullscreen' parameter. Always record previous width and height
931 of the frame, except when switching out of maximized modes, so
932 that they could be restored correctly, instead of resetting to the
933 default frame dimensions. Send SC_RESTORE command to the frame,
934 unless we are going to send SC_MAXIMIZE, to restore the frame
935 resize hints in the mouse pointer shown by the window manager.
938 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
940 * lisp.h (get_frame_param): Adjust conditions for prototype
943 2013-03-22 Ken Brown <kbrown@cornell.edu>
945 * unexcw.c: Drop unneeded inclusion of w32common.h.
946 (report_sheap_usage): Declare.
947 (read_exe_header): Add magic numbers for x86_64.
948 (fixup_executable): Fix printf format specifier for unsigned long
951 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
953 * frame.h (struct frame): Put menu_bar_window under #ifdef
954 because this member is not needed when X toolkit is in use.
955 (fset_menu_bar_window):
956 * dispnew.c (clear_current_matrices, clear_desired_matrices)
957 (free_glyphs, update_frame):
958 * xdisp.c (expose_frame): Likewise.
959 (display_menu_bar): Likewise. Remove redundant eassert.
960 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
963 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
965 Use functions and constants to manipulate Lisp_Save_Value objects.
966 This replaces code that used macros and strings and token-pasting.
967 The change makes the C source a bit easier to follow,
968 and shrinks the Emacs executable a bit.
969 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
970 (make_save_value): Change 1st arg from string to enum. All callers
973 (mark_object): Use if, not #if, for GC_MARK_STACK.
974 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
975 (XSAVE_OBJECT): Now functions, not macros.
976 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
977 the constant was never used.
978 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
979 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
980 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
981 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
983 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
984 type3 with a single member save_type. All uses changed.
985 (save_type, set_save_pointer, set_save_integer): New functions.
986 * print.c (PRINTX): Remove.
988 * alloc.c: Remove redundant static declarations.
990 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
992 * window.h (struct window): Convert left_col, top_line, total_lines
993 and total_cols from Lisp_Objects to integers. Adjust comments.
994 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
996 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
997 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
998 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
999 Adjust users where appropriate.
1001 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
1003 * frame.h (struct frame): Drop resx and resy because the same data is
1004 available from window system-specific output context. Adjust users.
1005 (default_pixels_per_inch_x, default_pixels_per_inch_y):
1006 New functions to provide defaults when no window system available.
1007 (FRAME_RES_X, FRAME_RES_Y): New macros.
1008 (NUMVAL): Move from xdisp.c.
1009 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
1010 (Ffont_face_attributes, Fopen_font):
1011 * image.c (gs_load):
1012 * w32font.c (fill_in_logfont):
1013 * xdisp.c (calc_pixel_width_or_height):
1014 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
1015 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
1017 2013-03-20 Kenichi Handa <handa@gnu.org>
1019 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
1020 to 1 (temporary workaround until a bug related to ASCII
1021 optimization is fixed).
1023 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
1025 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
1026 Signal error if window is not internal. Adjust docstring.
1027 (delete_all_child_windows): Use combination_limit to save the buffer.
1028 (Fset_window_configuration): Adjust accordingly.
1029 * print.c (syms_of_print): Initialize debugging output not here...
1030 (init_print_once): ...but in a new function here.
1031 * lisp.h (init_print_once): Add prototype.
1032 * emacs.c (main): Add call to init_print_once. Adjust comments.
1034 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
1036 * window.c (window_resize_check, window_resize_apply)
1037 (window_from_coordinates, recombine_windows, set_window_buffer)
1038 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
1039 (Fsplit_window_internal, Fdelete_window_internal)
1040 (freeze_window_starts): Use bool for booleans.
1041 * window.h (window_frame_coordinates, resize_frame_windows)
1042 (freeze_window_starts, set_window_buffer): Adjust prototypes.
1044 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
1046 * dispnew.c (bitch_at_user): Use `user-error'.
1048 2013-03-17 Ken Brown <kbrown@cornell.edu>
1050 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
1051 as return type of image_background. (Bug#13981)
1052 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
1054 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
1056 * nsterm.m (updateFrameSize:): Change resize increments if needed.
1057 (ns_select): Don't return with result uninitialized.
1059 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
1062 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
1064 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
1065 directories. If filename is nil, get directory name (Bug#13932).
1066 Use getFilename and getDirectory.
1067 (getFilename, getDirectory): New methods for EmacsSavePanel and
1069 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
1071 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
1073 * coding.c (decode_coding_gap): Fix typo caught by static checking.
1075 2013-03-15 Kenichi Handa <handa@gnu.org>
1077 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
1078 (adjust_after_replace): Make it back to static. Delete the third
1079 arg text_at_gap_tail. Cancel the code for handling it.
1081 * coding.h (struct coding_system): New member eol_seen.
1083 * coding.c (detect_ascii): New function.
1084 (detect_coding): Set coding->head_ascii and coding->eol_seen only
1085 when the source bytes are actually scanned. On detecting for
1086 coding_category_utf_8_auto, call detect_ascii instead of scanning
1087 source bytes directly.
1088 (produce_chars): Call insert_from_gap with the new arg 0.
1089 (encode_coding): Likewise.
1090 (decode_coding_gap): Control ASCII optimization by the variable
1091 disable_ascii_optimization instead of #ifndef .. #endif.
1092 Deccode EOL format according to coding->eol_seen.
1093 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
1096 * lisp.h (adjust_after_replace): Cancel externing it.
1097 (insert_from_gap): Adjust prototype.
1099 2013-03-15 Eli Zaretskii <eliz@gnu.org>
1101 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
1102 FULLSCREEN_MAXIMIZED. (Bug#13935)
1104 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
1106 * region-cache.c (find_cache_boundary, move_cache_gap)
1107 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
1108 Simplify debugging check and convert to eassert. Adjust comment.
1109 (pp_cache): Put under ENABLE_CHECKING.
1111 2013-03-14 Eli Zaretskii <eliz@gnu.org>
1113 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
1114 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
1116 (w32fullscreen_hook): If the frame is visible, reset
1117 f->want_fullscreen flag after changing the frame size. If the
1118 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
1121 2013-03-13 Daniel Colascione <dancol@dancol.org>
1123 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
1124 too so that these builds can use Cygwin's file conversion
1125 functions. (We've been building and linking cygw32.o all along
1126 and just not using it.)
1128 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
1130 File synchronization fixes (Bug#13944).
1131 * Makefile.in (LIB_FDATASYNC): New macro.
1133 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
1134 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
1135 Don't worry about HAVE_FSYNC, since a substitute fsync is
1136 available if the system lacks one.
1137 (Fwrite_regin): Retry fsync if interrupted.
1139 2013-03-13 Eli Zaretskii <eliz@gnu.org>
1141 * w32term.c (w32_read_socket): If the Emacs frame is being
1142 activated, call w32fullscreen_hook, to make sure the new frame
1143 dimensions are in effect. (Bug#13937)
1145 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
1147 * xdisp.c (init_iterator): Simplify because both character and byte
1148 positions are either specified or -1. Add eassert. Adjust comment.
1149 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
1150 character and byte positions can be obtained from marker.
1152 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
1154 Static checking by Sun C 5.12.
1155 * alloc.c (buffer_memory_full) [REL_ALLOC]:
1156 * bytecode.c (exec_byte_code):
1157 * dispnew.c (init_display):
1159 * fileio.c (Fsubstitute_in_file_name):
1160 * keyboard.c (Fevent_convert_list):
1161 * keymap.c (Fsingle_key_description):
1162 * term.c (maybe_fatal, fatal):
1163 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
1164 * xsmfns.c (Fhandle_save_session):
1165 Omit unreachable code.
1166 * keymap.c (map_keymap_char_table_item): Cast void * to
1167 a function pointer type; the C Standard requires this.
1169 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
1170 Include <sys/param.h> unconditionally, as that works elsewhere and
1171 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
1172 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
1175 2013-03-11 Paul Eggert <eggert@cs.ucla.edu>
1177 * insdel.c (adjust_after_replace): Use bool for boolean.
1179 2013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
1181 * keyboard.c: Move keyboard decoding to read_key_sequence.
1182 (decode_keyboard_code): Remove.
1183 (tty_read_avail_input): Don't try to decode input.
1184 (read_decoded_char): New function.
1185 (read_key_sequence): Use it.
1187 2013-03-10 Daniel Colascione <dancol@dancol.org>
1189 * w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
1190 (GUI_SDATA, guichar_t): Macros to abstract out differences between
1191 NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
1194 * w32term.c (construct_drag_n_drop): Use the above macros to make
1195 drag-and-drop work for non-ASCII filenames in cygw32 builds.
1197 * w32fns.c (x_set_name, x_set_title): Use the above macros to
1198 properly display non-ASCII frame titles in cygw32 builds.
1200 * w32fns.c (Fw32_shell_execute): Use the above macros to properly
1201 call ShellExecute in cygw32 builds.
1203 * w32fn.c (Fx_file_dialog): Use the above macros to simplify the
1204 common file dialog code.
1206 * w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
1207 can just use du like other systems.
1209 * coding.c (from_unicode_buffer): Declare.
1210 * coding.c (from_unicode_buffer): Implement.
1212 2013-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
1214 * lread.c: Minor cleanup.
1215 (FROM_FILE_P): New macro.
1216 (skip_dyn_bytes, unreadchar, read1): Use it.
1217 (read_list): Consolidate duplicated code.
1219 * bytecode.c (struct byte_stack): Remove `constants' when unused.
1221 2013-03-10 Eli Zaretskii <eliz@gnu.org>
1223 * xdisp.c (display_tool_bar_line, redisplay_tool_bar)
1224 (redisplay_internal, set_cursor_from_row, try_window)
1225 (try_window_id, dump_glyph_row, extend_face_to_end_of_line)
1226 (display_line, notice_overwritten_cursor)
1227 (mouse_face_from_buffer_pos, note_mouse_highlight):
1228 Use MATRIX_ROW_DISPLAYS_TEXT_P.
1229 (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
1230 (mouse_face_from_string_pos, fast_find_string_pos):
1231 Use MATRIX_ROW_VPOS.
1233 * xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1235 * w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1237 * xdisp.c (try_cursor_movement): Use MATRIX_ROW and
1238 MATRIX_MODE_LINE_ROW.
1240 * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
1242 2013-03-10 handa <handa@gnu.org>
1244 * lisp.h (adjust_after_replace): Extern it.
1246 * coding.c (detect_coding): Cound the heading ASCII bytes in the
1247 case of detection for coding_category_utf_8_auto.
1248 (decode_coding_gap) [not CODING_DISABLE_ASCII_OPTIMIZATION]:
1249 Skip decoding if all bytes are ASCII.
1251 * insdel.c (adjust_after_replace): Make it public. New arg
1253 (adjust_after_insert): Call adjust_after_replace with the new arg
1256 2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
1258 * keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
1259 (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
1260 from Elisp via unread-command-events.
1262 * keyboard.c (access_keymap_keyremap): Accept nil return value from
1263 functions to mean "no change".
1265 2013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1267 region-cache.c, scroll.c, search.c: Use bool for booleans.
1268 * lisp.h (compile_pattern):
1269 * scroll.c (do_scrolling, do_direct_scrolling):
1270 * search.c (struct regexp_cache, compile_pattern_1)
1271 (compile_pattern, string_match_1, search_command)
1272 (trivial_regexp_p, search_buffer, Freplace_match, match_limit)
1273 (search_regs_saved, Fregexp_quote):
1274 Use bool for boolean.
1275 * region-cache.c (region_cache_forward, region_cache_backward):
1276 Fix comments to match code: these functions return int, not boolean.
1278 2013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1280 * search.c (find_newline): Accept start and end byte positions
1281 as arguments and allow -1 if not known.
1282 (find_newline_no_quit): Likewise for start position.
1283 * lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
1284 * bidi.c (bidi_find_paragraph_start): Pass byte position to
1285 find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
1286 * editfns.c (Fconstrain_to_field): Break long line.
1287 Adjust call to find_newline.
1288 * indent.c (vmotion): Adjust calls to find_newline_no_quit.
1289 Use DEC_BOTH to start next search from the previous buffer
1290 position, where appropriate.
1291 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
1292 (get_visually_first_element, move_it_vertically_backward): Likewise.
1293 Obtain byte position from the display iterator, where appropriate.
1295 2013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1297 print.c, process.c: Use bool for booleans.
1298 * lisp.h (wait_reading_process_output):
1299 * print.c (print_output_debug_flag, PRINTDECLARE, printchar)
1300 (strout, debug_output_compilation_hack, float_to_string, print)
1302 * process.c (kbd_is_on_hold, inhibit_sentinels, process_output_skip)
1303 (decode_status, status_message, create_process, create_pty)
1304 (Fmake_network_process, Fnetwork_interface_info)
1305 (wait_reading_process_output, read_process_output)
1306 (write_queue_push, write_queue_pop, process_send_signal)
1307 (handle_child_signal, keyboard_bit_set, kbd_on_hold_p):
1308 * process.h (struct Lisp_Process, inhibit_sentinels, kbd_on_hold_p):
1309 Use bool for booleans.
1310 * process.c (Fnetwork_interface_list): Remove unused local.
1311 (connect_counter): Now EMACS_INT, not int.
1313 2013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1315 * bidi.c (bidi_fetch_char): Swap first and second arguments
1316 to match other functions accepting character and byte positions.
1318 (bidi_resolve_explicit_1, bidi_level_of_next_char): Adjust users.
1319 (bidi_paragraph_init): Likewise. Use DEC_BOTH which is faster
1320 when you need just to move to the previous buffer position.
1321 * xdisp.c (Fcurrent_bidi_paragraph_direction): Use DEC_BOTH.
1323 2013-03-07 Eli Zaretskii <eliz@gnu.org>
1325 * .gdbinit (prowlims): Display the enabled_p flag of the row.
1327 2013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1329 Avoid character to byte conversions in motion subroutines.
1330 * indent.h (compute_motion, vmotion): Add byte position argument.
1331 * indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
1333 (Fcompute_motion): Break long line. Adjust call to compute_motion.
1334 Use list5 for return value.
1335 (vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
1336 Adjust comments, style and calls to compute_motion.
1337 (Fvertical_motion): Adjust call to vmotion.
1338 * window.c (Fdelete_other_windows_internal): Record window start
1339 byte position and adjust call to vmotion.
1340 (window_scroll_line_based): Likewise with call to compute_motion.
1342 (Frecenter): Adjust calls to vmotion.
1344 2013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1346 * lisp.h (list2i, list3i): New functions.
1347 (list4i): Move from window.c and make LISP_INLINE.
1348 * editfns.c (make_lisp_time):
1349 * fns.c (Flocale_info):
1350 * keyboard.c (parse_modifiers):
1351 * xterm.c (x_ewmh_activate_frame): Use list2i.
1352 * instel.c (signal_after_change):
1353 * nsfns.m (Fx_server_version, Fxw_color_values):
1354 * w32fns.c (Fxw_color_values, Fx_server_version):
1355 * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
1356 * fileio.c (Fvisited_file_modtime):
1357 * nsfns.m (Fns_display_usable_bounds):
1358 * w32.c (ltime): Use list4i.
1360 2013-03-06 Eli Zaretskii <eliz@gnu.org>
1362 * search.c (find_newline_no_quit): Rename from find_next_newline.
1365 * lisp.h (find_newline_no_quit): Rename prototype.
1367 * xdisp.c (back_to_previous_line_start)
1368 (forward_to_next_line_start, get_visually_first_element)
1369 (move_it_vertically_backward): Callers of find_newline_no_quit changed.
1370 * indent.c (vmotion): Callers of find_newline_no_quit changed.
1371 * bidi.c (bidi_find_paragraph_start): Callers of
1372 find_newline_no_quit changed.
1374 * msdos.c: Change encoding to cp850. (Bug#13879)
1375 (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
1377 2013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1379 Coding system support cleanup and minor refactoring.
1380 * coding.h (enum coding_result_code): Remove
1381 CODING_RESULT_INCONSISTENT_EOL and CODING_RESULT_INSUFFICIENT_MEM.
1382 (toplevel): Remove unused CODING_MODE_INHIBIT_INCONSISTENT_EOL.
1383 (CODING_MODE_LAST_BLOCK, CODING_MODE_SELECTIVE_DISPLAY)
1384 (CODING_MODE_DIRECTION, CODING_MODE_FIXED_DESTINATION)
1385 (CODING_MODE_SAFE_ENCODING): Rearrange bit values.
1386 (decode_coding_region, encode_coding_region, decode_coding_string):
1387 Remove unused compatibility macros.
1388 * coding.c (Qinconsistent_eol, Qinsufficient_memory): Remove.
1389 (record_conversion_result): Adjust user.
1390 (syms_of_coding): Likewise.
1391 (ALLOC_CONVERSION_WORK_AREA): Use SAFE_ALLOCA.
1392 (decode_coding, encode_coding): Add USE_SAFE_ALLOCA and SAFE_FREE.
1393 (decode_coding_object): Simplify since xrealloc never returns NULL.
1396 2013-03-06 Paul Eggert <eggert@cs.ucla.edu>
1398 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
1399 * sysdep.c (list_system_processes)
1400 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
1401 Make it a stub in this case; otherwise the build might fail,
1402 and this code hasn't been tested on such hosts anyway.
1403 Problem reported by Nelson H. F. Beebe in
1404 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
1405 and analyzed by Jérémie Courrèges-Anglas in
1406 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00062.html>.
1408 2013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1410 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
1411 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
1412 (get_visually_first_element, move_it_vertically_backward): Ajust users.
1413 * bidi.c (bidi_find_paragraph_start): Likewise.
1414 * indent.c (vmotion): Likewise.
1416 2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
1418 FILE's lock is now always .#FILE and may be a regular file (Bug#13807).
1419 * filelock.c: Include <c-ctype.h>.
1420 (MAX_LFINFO): New top-level constant.
1421 (lock_info_type): Remove members pid, boot_time. Add members at,
1422 dot, colon. Change user member to be the entire buffer, not a
1423 pointer. This allows us to handle the case where a foreign
1424 pid or boot time exceeds the local range. All uses changed.
1425 (LINKS_MIGHT_NOT_WORK): New constant.
1426 (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
1427 (defined_WINDOWSNT): Remove.
1428 (MAKE_LOCK_NAME, file_in_lock_file_name):
1429 Always use .#FILE (not .#-FILE) for the file lock,
1430 even if it is a regular file.
1431 (rename_lock_file): New function.
1432 (create_lock_file): Use it.
1433 (create_lock_file, read_lock_data):
1434 Prefer a symbolic link for the lock file, falling back on a
1435 regular file if symlinks don't work. Do not try to create
1436 symlinks on MS-Windows, due to security hassles. Stick with
1437 POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
1438 link, rename, unlink, mkstemp) when creating locks, as a GNUish
1439 host may be using a Windowsish file system, and cannot use
1440 MS-Windows-only system calls. Fall back on mktemp if mkstemp
1441 doesn't work. Don't fail merely because of a symlink-contents
1442 length limit in the current file system; fall back on regular
1443 files. Increase the symlink contents length limit to 8 KiB, this
1444 should be big enough for any real use and doesn't crunch the
1446 (create_lock_file, lock_file_1, read_lock_data):
1447 Simplify allocation of lock file buffers now that they fit in 8 KiB.
1448 (lock_file_1): Return error number, not bool. All callers changed.
1449 (ELOOP): New macro, if not already defined.
1450 (read_lock_data): Return size of lock file contents, not Lisp object.
1451 All callers changed. Handle a race condition if some other process
1452 replaces a regular-file lock with a symlink lock or vice versa,
1453 while we're trying to read the lock.
1454 (current_lock_owner): Parse contents more carefully, to help avoid
1455 confusing a regular-file lock with some other application's use
1456 of the file. Check for lock file contents being too long, or
1457 not parsing correctly.
1458 (current_lock_owner, lock_file):
1459 Allow foreign pid and boot times that exceed the local range.
1460 (current_lock_owner, lock_if_free, lock_file):
1461 Simplify allocation of lock file contents.
1462 * w32.c (sys_rename_replace): New function, containing most of
1463 the contents of the old sys_rename.
1464 (sys_rename): Use it.
1465 (fchmod): New dummy function.
1466 * w32.h (sys_rename_replace, fchmod): New decls.
1468 2013-03-05 Eli Zaretskii <eliz@gnu.org>
1470 * bidi.c (bidi_resolve_explicit_1): Don't call CHAR_TO_BYTE or
1471 bidi_count_bytes, as the callers now arrange for bidi_it->charpos
1472 to be in sync with bidi_it->bytepos. Suggested by Dmitry Antipov
1473 <dmantipov@yandex.ru>.
1475 2013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
1477 * composite.c (get_composition_id, fill_gstring_header):
1478 Use make_uninit_vector where appropriate.
1479 * font.c (Ffont_get_glyphs, build_style_table): Likewise.
1480 * xselect.c (clean_local_selection_data): Likewise.
1482 2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
1484 Fix misuse of ImageMagick that caused core dump (Bug#13846).
1485 * image.c (imagemagick_load_image): Calculate height and width
1486 after flattening the image, not before.
1488 2013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
1490 * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
1491 * ftfont.c (ftfont_shape_by_flt): Likewise.
1492 * w32uniscribe.c (uniscribe_shape): Likewise.
1494 2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1496 The lock for FILE is now .#FILE or .#-FILE (Bug#13807).
1497 The old approach, which fell back on DIR/.#FILE.0 through
1498 DIR/.#FILE.9, had race conditions that could not be easily fixed.
1499 If DIR/.#FILE is a non-symlink file, Emacs now does not create a
1500 lock file for DIR/FILE; that is, DIR/FILE is no longer partly
1501 protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
1502 because the locking mechanism was never reliable in that case).
1503 This patch fixes this and other bugs discovered by a code
1504 inspection that was prompted by
1505 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
1506 Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
1507 to avoid interoperability problems between the MS-Windows and
1508 non-MS-Windows implementations. MS-Windows and non-MS-Windows
1509 instances of Emacs now ignore each others' locks.
1510 * filelock.c (defined_WINDOWSNT): New constant.
1511 (MAKE_LOCK_NAME, fill_in_lock_file_name):
1512 Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create
1513 DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
1514 regular files on MS-Windows hosts.
1515 (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
1516 Use SAFE_ALLOCA to avoid problems with long file names.
1517 (MAX_LFINFO): Now a local constant, not a global macro.
1518 (IS_LOCK_FILE): Remove.
1519 (lock_file_1): Don't inspect errno if symlink call succeeds;
1520 that's not portable.
1521 (lock_file): Document that this function can return if lock
1523 (lock_file): Don't access freed storage.
1525 2013-03-02 Andreas Schwab <schwab@linux-m68k.org>
1527 * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren. (Bug#13734)
1529 2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1531 * textprop.c: Use bool for booleans.
1532 (validate_interval_range, Fadd_text_properties)
1533 (Fremove_text_properties): Prefer bool to int when either works.
1535 2013-03-02 Eli Zaretskii <eliz@gnu.org>
1537 * textprop.c (Fadd_text_properties, Fremove_text_properties):
1538 If the interval tree changes as a side effect of calling
1539 modify_region, re-do processing starting from the call to
1540 validate_interval_range. (Bug#13743)
1542 2013-02-28 Eli Zaretskii <eliz@gnu.org>
1544 * w32.c (sys_open): Don't reset the flags for FD in fd_info[].
1547 2013-02-27 Eli Zaretskii <eliz@gnu.org>
1549 * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with
1550 _SH_DENYRW flag, instead of emacs_open, to deny any other process
1551 access to the lock file until it is written and closed.
1554 2013-02-27 Paul Eggert <eggert@cs.ucla.edu>
1556 * callint.c (Qcall_interactively):
1557 * macros.c (Qexecute_kbd_macro):
1560 2013-02-26 Bastien Guerry <bzg@gnu.org>
1562 * window.c (Frecenter): Tiny docstring enhancement.
1564 2013-02-26 Paul Eggert <eggert@cs.ucla.edu>
1566 Minor textprop integer cleanup.
1567 * intervals.h, textprop.c (add_text_properties_from_list):
1568 Return void, not int, since nobody uses the return value.
1569 * textprop.c (validate_plist, add_properties, remove_properties)
1570 (Fadd_text_properties):
1571 Don't assume list length fits in int.
1572 (interval_has_all_properties, interval_has_some_properties)
1573 (interval_has_some_properties_list, add_properties, remove_properties)
1574 (Fadd_text_properties, Fremove_text_properties)
1575 (Fremove_list_of_text_properties, text_property_stickiness):
1576 Use bool for booleans.
1577 (Fadd_text_properties, Fremove_text_properties):
1578 (Fremove_list_of_text_properties):
1579 Reindent do-while as per GNU style.
1581 2013-02-25 Eli Zaretskii <eliz@gnu.org>
1583 Implement CLASH_DETECTION for MS-Windows.
1585 * filelock.c [WINDOWSNT]: Include w32.h.
1586 (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
1587 function of that name. Up-case the macro arguments.
1588 (IS_LOCK_FILE): New macro.
1589 (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
1590 (create_lock_file): New function, with body extracted from
1592 [WINDOWSNT]: Implement lock files by writing a regular file with
1593 the lock information as its contents.
1594 (read_lock_data): New function, on Posix platforms just calls
1596 [WINDOWSNT]: Read the lock info from the file.
1597 (current_lock_owner): Call read_lock_data instead of calling
1598 emacs_readlinkat directly.
1599 (lock_file) [WINDOWSNT]: Run the file name through
1602 * w32proc.c (sys_kill): Support the case of SIG = 0, in which case
1603 just check if the process by that PID exists.
1605 * w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
1606 also present, as doing so will fail to error out if the file
1609 * makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
1611 * textprop.c (Fadd_text_properties, Fremove_text_properties)
1612 (Fremove_list_of_text_properties): Skip all of the intervals in
1613 the region between START and END that already have resp. don't
1614 have the requested properties, not just the first one.
1615 Add assertions that the loop afterwards always modifies the
1616 properties. (Bug#13743)
1618 2013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
1620 * callint.c (Fcall_interactively): Use the right lexical environment
1621 for `interactive' specs (bug#13811).
1622 * eval.c (Feval): Accept a lexical environment.
1624 2013-02-25 Paul Eggert <eggert@cs.ucla.edu>
1626 Simplify data_start configuration (Bug#13783).
1627 This is a followon simplification to the fix for Bug#13650.
1628 * Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
1629 (START_FILES): Remove. All uses removed.
1630 (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
1631 (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
1632 (buildobj.h): Use it.
1633 ($(ALLOBJS)): Depend on globals.h.
1634 (temacs$(EXEEXT)): Use $(ALLOBJS).
1635 * autodeps.mk (ALLOBJS): Move to Makefile.in.
1636 * deps.mk (vm-limit.o):
1637 * makefile.w32-in ($(BLD)/vm-limit.$(O)):
1638 Do not depend on mem-limits.h.
1639 * emacs.c (__do_global_ctors, __do_global_ctors_aux)
1640 (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
1641 [__GNUC__ && !ORDINARY_LINK]: Remove.
1642 * mem-limits.h, pre-crt0.c: Remove.
1643 * unexaix.c, unexcoff.c: Don't include mem-limits.h.
1644 * unexcoff.c (etext): New decl.
1645 (make_hdr): Use DATA_START instead of start_of_data.
1646 * vm-limit.c: Move most of mem-limits.h's contents here.
1647 (data_start): New decl. It's OK if this is approximate,
1648 so simplify-away some unnecessary exactness.
1649 (POINTER): Remove; all uses removed.
1650 (data_space_start): Now char *, to avoid casts.
1651 (exceeds_lisp_ptr): New function, replacing the old
1652 EXCEEDS_LISP_PTR macro. All uses changed.
1653 (check_memory_limits): Simplify and remove casts.
1654 (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
1655 (memory_warnings): Use data_start instead of start_of_data.
1657 2013-02-24 Andreas Schwab <schwab@linux-m68k.org>
1659 * xdisp.c (set_message): Only check for debug-on-message if STRING
1660 is a string. (Bug#13797)
1662 2013-02-24 Paul Eggert <eggert@cs.ucla.edu>
1664 Fix regression introduced by July 10 filelock.c patch.
1665 * filelock.c (fill_in_lock_file_name): Fix crash caused by the
1666 2012-07-10 patch to this file. Reported by Eli Zaretskii in
1667 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
1668 and diagnosed by Andreas Schwab in
1669 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
1671 2013-02-22 Paul Eggert <eggert@cs.ucla.edu>
1673 Assume C89 or better.
1674 * ralloc.c (SIZE, POINTER, NIL):
1675 * vm-limit.c (POINTER):
1676 Remove, replacing all uses with C89 equivalents. These old
1677 symbols were present only for porting to pre-C89 platforms.
1679 2013-02-22 Claudio Bley <claudio.bley@gmail.com>
1681 * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
1682 This avoids warning messages reported as part of Bug#13546.
1684 2013-02-21 Ken Brown <kbrown@cornell.edu>
1686 * sheap.c (report_sheap_usage): Fix arguments of message1_no_log.
1688 2013-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
1690 * sheap.c (report_sheap_usage): Prefer message1_nolog.
1692 * keyboard.c (Qcommand_execute): New var.
1693 (command_loop_1, read_char): Use it.
1694 (Fcommand_execute): Remove, replace by an Elisp implementation.
1695 (syms_of_keyboard): Adjust accordingly.
1697 2013-02-19 Daniel Colascione <dancol@dancol.org>
1699 * sheap.c (report_sheap_usage): Use message, not message1, so
1700 that we don't try to create a buffer while we're in the middle
1701 of dumping Emacs. Explain why.
1703 2013-02-20 Dmitry Antipov <dmantipov@yandex.ru>
1705 * search.c (find_newline): Return byte position in bytepos.
1707 (find_next_newline_no_quit, find_before_next_newline):
1708 Add bytepos argument.
1709 * lisp.h (find_newline, find_next_newline_no_quit)
1710 (find_before_next_newline): Adjust prototypes.
1711 * bidi.c (bidi_find_paragraph_start):
1712 * editfns.c (Fconstrain_to_field, Fline_end_position):
1713 * indent.c (compute_motion, vmotion):
1714 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start):
1715 (get_visually_first_element, move_it_vertically_backward):
1716 Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
1718 2013-02-19 Eli Zaretskii <eliz@gnu.org>
1720 * w32proc.c (new_child): Avoid leaking handles if the subprocess
1721 resources were not orderly released.
1723 2013-02-17 Eli Zaretskii <eliz@gnu.org>
1725 * xdisp.c (x_draw_vertical_border): For a window that is neither
1726 the leftmost nor the rightmost, redraw both the left and the right
1727 vertical borders. (Bug#13723)
1729 2013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
1731 * xml.c (init_libxml2_functions):
1732 * sound.c (sound_warning):
1733 * sheap.c (report_sheap_usage):
1734 * process.c (wait_reading_process_output):
1735 * msdos.c (XMenuActivate):
1736 * macros.c (Fstart_kbd_macro, Fend_kbd_macro):
1737 * keyboard.c (top_level_1):
1738 * editfns.c (Fmessage, Fmessage_box):
1739 * callint.c (Fcall_interactively):
1740 * fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
1742 2013-02-17 Jan Djärv <jan.h.d@swipnet.se>
1744 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
1745 * frame.c (syms_of_frame): ... to here.
1747 2013-02-16 Eli Zaretskii <eliz@gnu.org>
1749 * w32.c (sys_chown): Remove unused function.
1751 * w32term.c <input_signal_count>: Declare 'volatile'
1752 unconditionally. (Bug#9066)
1754 * w32.c (set_errno): Reset h_errno and don't set it to any other
1755 value. Set errno instead.
1756 (check_errno): Reset h_errno.
1757 (sys_socket, socket_to_fd, sys_bind, sys_connect)
1758 (sys_gethostname, sys_getservbyname, sys_getpeername)
1759 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
1760 (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set
1762 (sys_gethostbyname): Set h_errno only errors detected.
1764 2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
1766 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
1768 2013-02-15 Eli Zaretskii <eliz@gnu.org>
1770 * keyboard.c (read_char): Fix calculation of auto-save time out
1771 when auto-save-timeout is less than 4. (Bug#13720)
1773 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
1774 time. Improve diagnostics in DebPrint. (Bug#13546)
1776 * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
1777 (sys_gethostbyname, sys_getservbyname, sys_getpeername)
1778 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
1779 (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure,
1780 make sure errno is set to an appropriate value. (Bug#13546)
1781 (socket_to_fd): Add assertion against indexing fd_info[] with a
1782 value that is out of bounds.
1783 (sys_accept): If fd is negative, do not set up the child_process
1784 structure for reading.
1786 2013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
1788 * composite.c (fill_gstring_header): Remove useless prototype.
1790 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
1791 * print.c (PRINTDECLARE, print_object):
1792 * search.c (compile_pattern, fast_looking_at, search_buffer):
1793 (simple_search, boyer_moore, Freplace_match):
1794 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
1795 (get_overlay_arrow_glyph_row, display_mode_element):
1796 (decode_mode_spec_coding, message3):
1797 * xfaces.c (face_at_string_position): Use bool for booleans.
1800 2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
1802 Fix AIX port (Bug#13650).
1803 * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
1804 Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
1805 was #undeffed earlier, so it cannot be used as a macro here.
1806 Use the constant and not the macro.
1808 2013-02-15 Eli Zaretskii <eliz@gnu.org>
1810 * w32proc.c (new_child): If no vacant slots are found in
1811 child_procs[], make another pass looking for slots whose process
1812 has exited or died. (Bug#13546)
1814 * w32.c (sys_pipe): When failing due to file descriptors above
1815 MAXDESC, set errno to EMFILE.
1816 (_sys_read_ahead): Update cp->status when failing to read serial
1817 communications input, so that the status doesn't stay at
1818 STATUS_READ_IN_PROGRESS. (Bug#13546)
1820 2013-02-14 Jan Djärv <jan.h.d@swipnet.se>
1822 * gtkutil.c (tb_size_cb): New function.
1823 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
1825 2013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
1827 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
1830 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
1832 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
1834 2013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
1836 * font.c (font_range): Add pos_byte argument. Adjust comment
1837 and break long line.
1838 * font.h (font_range): Adjust prototype.
1839 * composite.c (autocmp_chars): Pass byte position to font_range.
1840 Break long line. Remove useless prototype and format comment.
1842 2013-02-13 Glenn Morris <rgm@gnu.org>
1844 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
1846 2013-02-13 Paul Eggert <eggert@cs.ucla.edu>
1848 Improve AIX port some more (Bug#13650).
1849 With this, it should be as good as it was in 23.3, though it's
1850 still pretty bad: the dumped emacs does not run. See Mark Fleishman in
1851 http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
1852 * unexaix.c (start_of_text): Remove.
1853 (_data, _text): Declare as char[], not int, as AIX manual suggests.
1854 (bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
1855 (orig_load_scnptr, orig_data_scnptr):
1856 Now off_t, not long, since they are file offsets.
1857 (make_hdr): Use _data, not start_of_data ().
1858 This is the key part of the fix.
1859 (make_hdr, unrelocate_symbols): Use off_t for file offsets.
1860 (unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
1862 * pre-crt0.c (data_start): Initialize to 1.
1863 This ports to compilers that optimize the external declaration
1864 'int x = 0;' as if it were 'int x;' to shrink the executable.
1866 Improve AIX port (Bug#13650).
1867 This doesn't fix the bug, but it makes progress: Emacs builds now.
1868 * unexaix.c: Include inttypes.h, stdarg.h.
1869 (report_error, report_error_1): Mark as _Noreturn.
1870 (report_error): Don't report the wrong errno.
1871 (report_error_1): Now varargs. All callers changed.
1872 (make_hdr): Use uintptr_t, not unsigned, when converting pointers
1873 to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
1874 (write_ptr): Use %p to print address rather than %lx and a cast
1875 to unsigned long. Grow buffer a bit, to be safer.
1877 2013-02-13 Eli Zaretskii <eliz@gnu.org>
1879 * bidi.c (bidi_resolve_neutral): After finding the next
1880 non-neutral character, accept NEUTRAL_ON type as well, because
1881 directional control characters, such as LRE and RLE, have their
1882 type converted to that by bidi_resolve_weak. This avoids aborts
1883 when LRE/RLE follows a run of neutrals.
1884 (bidi_move_to_visually_next): Assert that return value of
1885 bidi_peek_at_next_level is non-negative. Negative values will
1888 2013-02-13 Paul Eggert <eggert@cs.ucla.edu>
1890 Minor getenv-related fixes.
1891 * callproc.c (Fcall_process_region) [!DOS_NT]:
1892 Avoid unnecessary duplicate call to getenv.
1893 * callproc.c (init_callproc):
1894 * dispnew.c (init_display):
1895 * sysdep.c (sys_subshell):
1896 Omit unnecessary cast of getenv or egetenv.
1898 2013-02-13 Juanma Barranquero <lekktu@gmail.com>
1900 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
1901 Update dependencies.
1903 2013-02-12 Eli Zaretskii <eliz@gnu.org>
1905 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
1907 (display_line): Set w->region_showing to the value of
1908 it->region_beg_charpos, not to -1. This fixes redisplay
1909 optimization when cursor is moved up after M->. (Bug#13623)
1911 (try_scrolling): Scroll text up more if point is too close to ZV
1912 and inside the scroll margin. This makes sure point is moved
1913 outside the scroll margin in these cases.
1915 * window.h (struct window): region_showing can no longer be
1918 2013-02-11 Paul Eggert <eggert@cs.ucla.edu>
1920 Tune by using memchr and memrchr.
1921 * doc.c (Fsnarf_documentation):
1922 * fileio.c (Fsubstitute_in_file_name):
1923 * search.c (find_newline, scan_newline):
1924 * xdisp.c (pos_visible_p, display_count_lines):
1925 Use memchr and memrchr rather than scanning byte-by-byte.
1926 * search.c (find_newline): Rename from scan_buffer.
1927 Omit first arg TARGET, as it's always '\n'. All callers changed.
1929 Clean up read_key_sequence a tiny bit more.
1930 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
1931 (read_key_sequence): Remove unused locals.
1933 2013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
1935 Clean up read_key_sequence a bit; reread active keymaps after first event.
1936 * keyboard.c (read_char, read_char_x_menu_prompt)
1937 (read_char_minibuf_menu_prompt):
1938 Replace nmaps+maps with a single `map' arg.
1939 (follow_key): Operate on a single map.
1940 (active_maps): New function.
1941 (test_undefined): Also return true for nil bindings.
1942 (read_key_sequence): Use active_maps to replace the arrays of keymaps with
1943 a single (composed) keymap. Remember `first_event' to choose the right
1944 set of active keymaps. Recompute the set of keymaps after receiving
1945 the first event. Remove GOBBLE_FIRST_EVENT.
1946 (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
1947 * keyboard.h (read_char): Update declaration.
1948 * lread.c (read_filtered_event): Adjust call to read_char.
1950 2013-02-11 Eli Zaretskii <eliz@gnu.org>
1952 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
1953 Don't use the limitation on backwards movement when lines are truncated
1954 in the window. (Bug#13675)
1956 2013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
1958 * marker.c (set_marker_internal): If desired position is passed
1959 as a marker, avoid call to buf_charpos_to_bytepos.
1960 * window.c (Fset_window_point): Omit redundant type checking.
1961 (Fset_window_start): Likewise. Format comment.
1962 (window_scroll_pixel_based): Use set_marker_restricted_both
1963 with character and byte positions obtained from an iterator.
1964 (Fset_window_configuration): Use set_marker_restricted_both.
1965 * xdisp.c (message_dolog): Likewise.
1967 2013-02-10 Eli Zaretskii <eliz@gnu.org>
1969 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
1970 When text lines are longer than window's screen lines, don't move back
1971 too far. This speeds up some redisplay operations. (Bug#13675)
1973 2013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
1975 * syntax.c (scan_sexps_forward): Fix byte position calculation
1976 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
1978 2013-02-10 Paul Eggert <eggert@cs.ucla.edu>
1980 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
1981 that was not needed.
1983 2013-02-09 Paul Eggert <eggert@cs.ucla.edu>
1985 Minor hashing refactoring.
1986 * fns.c (SXHASH_REDUCE): Move to lisp.h.
1987 (sxhash_float): Return EMACS_UINT, for consistency with the other
1989 * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
1990 non-static inline function and therefore can't use static vars.
1991 (SXHASH_REDUCE): Move here from fns.c, and make it inline.
1992 * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
1993 with the other hash functions.
1995 2013-02-09 Eli Zaretskii <eliz@gnu.org>
1997 * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the
1998 XXXXXX part of the temporary file pattern is not downcased even
1999 when w32-downcase-file-names is non-nil. (Bug#13661)
2001 * xdisp.c (decode_mode_spec): Remove handling of %t.
2003 * msdos.c (careadlinkatcwd): Remove.
2005 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
2007 * lread.c (skip_dyn_bytes): New function (bug#12598).
2008 (read1): Use it. Use getc instead of READCHAR to read bytes.
2009 (load_each_byte): Remove. Update users.
2011 2013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
2013 * search.c (scan_buffer): Calculate end byte position just once.
2014 (scan_newline): Do not recalculate start_byte.
2015 (search_command): Use eassert.
2016 * syntax.c (struct lisp_parse_state): New member location_byte.
2017 (scan_sexps_forward): Record from_byte and avoid redundant
2018 character to byte position calculation ...
2019 (Fparse_partial_sexp): ... here. Break too long line.
2021 2013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
2023 * lisp.h (make_uninit_vector): New function.
2024 * alloc.c (Fvector, Fmake_byte_code):
2025 * ccl.c (Fregister_ccl_program):
2026 * charset.c (Fdefine_charset_internal, define_charset_internal):
2027 * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
2028 * composite.c (syms_of_composite):
2029 * font.c (Fquery_font, Ffont_info, syms_of_font):
2030 * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
2031 * ftfont.c (ftfont_shape_by_flt):
2032 * indent.c (recompute_width_table):
2033 * nsselect.m (clean_local_selection_data):
2034 * syntax.c (init_syntax_once):
2035 * w32unsubscribe.c (uniscribe_shape):
2036 * window.c (Fcurrent_window_configuration):
2037 * xfaces.c (Fx_family_fonts):
2038 * xselect.c (selection_data_to_lisp_data): Use it.
2040 2013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
2042 * coding.c (Fdefine_coding_system_internal): Use AREF where
2043 argument is known to be a vector.
2044 * fns.c (Flocale_info): Likewise for ASET.
2045 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
2046 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
2048 2013-02-05 Jan Djärv <jan.h.d@swipnet.se>
2050 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
2053 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
2054 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
2055 updateCollectionBehaviour.
2057 * nsterm.m (NEW_STYLE_FS): Remove.
2058 (ns_last_use_native_fullscreen): New variable.
2059 (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
2060 (x_set_window_size): Do not take title bar and tool bar into account
2061 if isFullscreen returns YES.
2062 (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
2063 (check_native_fs): New function.
2064 (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
2065 (ns_term_init): Remove NEW_STYLE_FS.
2066 (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
2067 and tool bar if isFullscreen returns NO.
2068 (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
2069 (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
2070 with HAVE_NATIVE_FS.
2071 (window:willUseFullScreenPresentationOptions:): New method.
2072 (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
2073 Hide toolbar if not enabled (Bug#13444).
2074 (windowDidExitFullScreen:): Call updateCollectionBehaviour.
2075 Restore tool bar if enabled, hide it otherwise (Bug#13444).
2076 (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
2077 (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
2078 window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
2079 Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
2080 FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
2081 (syms_of_nsterm): Add ns-use-native-fullscreen.
2083 2013-02-04 Paul Eggert <eggert@cs.ucla.edu>
2085 * fileio.c (Qchoose_write_coding_system): Now static.
2087 2013-02-04 Eli Zaretskii <eliz@gnu.org>
2089 * xdisp.c (window_buffer_changed): region_showing can be negative,
2090 which still means region is being displayed.
2091 (redisplay_internal): Resurrect code that forced redisplay of the
2092 whole window when showing region and the mark has changed.
2093 Record the new mark position to allow redisplay optimizations.
2094 (display_line): If it->region_beg_charpos is non-zero, set the
2095 window's region_showing member to -1. (Bug#13623) (Bug#13626)
2097 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
2098 not bitfield of 1 bit.
2100 2013-02-03 Daniel Colascione <dancol@dancol.org>
2102 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
2103 daemon mode works on cygw32 when Emacs is installed and not just
2106 2013-02-02 Paul Eggert <eggert@cs.ucla.edu>
2108 Avoid file time stamp bug on MS-Windows (Bug#13149).
2109 * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
2110 as FAT32 doesn't update time stamps when truncating them.
2111 Also, check that a file time stamp is not a multiple of 100 ns;
2112 this should catch all instances of the problem on MS-Windows,
2113 as its native file system resolution is 100 ns or worse, and
2114 checking for a non-multiple of 100 ns should impose only a small
2115 overhead on systems with ns resolution.
2117 2013-02-02 Eli Zaretskii <eliz@gnu.org>
2119 Avoid encoding file names on MS-Windows when they need to be run
2120 through dostounix_filename.
2121 * w32.c (normalize_filename): Accept an additional argument
2122 MULTIBYTE; if non-zero, traverse the file name by bytes and don't
2123 downcase it even if w32-downcase-file-names is non-nil.
2124 (dostounix_filename): Accept an additional argument MULTIBYTE and
2125 pass it to normalize_filename.
2126 (emacs_root_dir): Adjust.
2128 * msdos.h (dostounix_filename): Adjust prototype.
2130 * w32.h (dostounix_filename): Adjust prototype.
2132 * msdos.c (dostounix_filename): Accept an additional argument and
2134 (init_environment): Adjust callers of dostounix_filename.
2136 * fileio.c (Ffile_name_directory, file_name_as_directory)
2137 (directory_file_name, Fexpand_file_name)
2138 (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
2140 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
2142 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
2143 variables, as egetenv is case-insensitive for DOS_NT.
2145 * dired.c (file_name_completion): Don't call Fdirectory_file_name
2146 with an encoded file name.
2148 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
2149 Adjust calls to dostounix_filename.
2151 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
2153 * unexw32.c (unexec): Adjust call to dostounix_filename.
2155 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
2157 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
2160 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
2163 * callproc.c (Fcall_process): Make sure program name in PATH and
2164 new_argv[0] is encoded, if needed. Otherwise, un-encoded string
2165 is passed to exec/spawnve, which fails unless the file-name
2168 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
2169 even if w32-quote-process-args is nil.
2171 2013-02-01 Paul Eggert <eggert@cs.ucla.edu>
2173 Fix timestamp bug when write-region appends nothing (Bug#13149).
2174 * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
2175 the file's time stamp doesn't change if Emacs happens to write nothing
2176 to the file, and on a buggy file system this could cause Emacs to
2177 incorrectly infer that the file system doesn't have the bug.
2178 Avoid this problem by inhibiting the inference in this case.
2180 2013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
2182 * window.h (struct window): Convert base_line_number, base_line_pos
2183 and column_number_displayed members from Lisp_Object to ptrdiff_t.
2184 Convert region_showing member from Lisp_Object to bitfield.
2185 Remove sequence_number member. Adjust comments.
2186 * window.c (sequence_number): Remove.
2187 (make_window): Initialize column_number_displayed.
2188 * print.c (print_object): Follow the printed representation of
2189 frames and print window pointer to distinguish between windows.
2190 (adjust_window_count): Invalidate base_line_pos. Adjust comment.
2191 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2192 (wset_column_number_displayed, wset_region_showing): Remove.
2193 (window_buffer_changed, mode_line_update_needed, redisplay_internal)
2194 (try_scrolling, try_cursor_movement, redisplay_window)
2195 (try_window_reusing_current_matrix, try_window_id, display_line)
2196 (display_mode_lines, decode_mode_spec): Adjust users.
2197 * .gdbinit (pwinx): Do not print sequence_number.
2199 2013-02-01 Paul Eggert <eggert@cs.ucla.edu>
2201 Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
2202 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
2203 * dired.c: Include <fcntl.h>.
2204 (open_directory): New function, which uses open and fdopendir
2205 rather than opendir. DOS_NT platforms still use opendir, though.
2206 (directory_files_internal, file_name_completion): Use it.
2207 (file_attributes): New function, with most of the old Ffile_attributes.
2208 (directory_files_internal, Ffile_attributes): Use it.
2209 (file_attributes, file_name_completion_stat): First arg is now fd,
2210 not dir name. All uses changed. Use fstatat rather than lstat +
2212 (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
2213 * fileio.c: Include <allocator.h>, <careadlinkat.h>.
2214 (emacs_readlinkat): New function, with much of the old
2215 Ffile_symlink_p, but with an fd argument for speed.
2216 It uses readlinkat rather than careadlinkatcwd, so that it
2217 need not assume the working directory.
2218 (Ffile_symlink_p): Use it.
2219 * filelock.c (current_lock_owner): Use emacs_readlinkat
2220 rather than emacs_readlink.
2221 * lisp.h (emacs_readlinkat): New decl.
2222 (READLINK_BUFSIZE, emacs_readlink): Remove.
2223 * sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
2224 (emacs_norealloc_allocator, emacs_readlink): Remove.
2225 This stuff is moved to fileio.c.
2226 * w32.c (fstatat, readlinkat): New functions.
2227 (careadlinkat): Don't check that fd == AT_FDCWD.
2228 (careadlinkatcwd): Remove; no longer needed.
2230 2013-01-31 Glenn Morris <rgm@gnu.org>
2232 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
2233 (Fwrite_region): Update for new choose_write_coding_system args.
2234 Move the last piece of choose_write_coding_system here. (Bug#13522)
2235 (syms_of_fileio): Add choose-write-coding-system.
2237 2013-01-30 Eli Zaretskii <eliz@gnu.org>
2239 * w32.c (sys_open): Zero out the flags for the new file descriptor.
2240 (sys_close): Zero out the flags for the file descriptor before
2241 closing it. (Bug#13546)
2243 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
2244 (logon_network_drive, stat_worker, symlink, chase_symlinks):
2245 Use CharNextExA and CharPrevExA to iterate over file names encoded in
2248 * w32.c (w32_get_long_filename, init_environment, readlink):
2249 Support file names encoded in DBCS codepages.
2250 (readlink): Use the current file-name-coding-system, not the ANSI
2251 codepage, to decode and handle targets of symlinks.
2253 2013-01-28 Eli Zaretskii <eliz@gnu.org>
2255 * w32.c (opendir): Now accepts a 'const char *'.
2257 2013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
2259 Remove obsolete redisplay code. See the discussion at
2260 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
2261 * dispnew.c (preemption_period, preemption_next_check): Remove.
2262 (Vredisplay_preemption_period): Likewise.
2263 (update_frame, update_single_window, update_window, update_frame_1):
2264 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
2265 used, following the 2012-06-22 change.
2267 2013-01-25 Eli Zaretskii <eliz@gnu.org>
2269 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
2271 2013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
2273 * font.c (num_fonts): Remove the leftover from old
2274 debugging code. Adjust comment style here and there.
2275 * insdel.c (insert_1): Remove.
2276 * lisp.h (insert_1): Remove prototype.
2277 * xdisp.c (message_dolog): Adjust users to call insert_1_both.
2279 2013-01-25 Eli Zaretskii <eliz@gnu.org>
2281 * w32.c (max_filename_mbslen): New function.
2282 (normalize_filename, readdir): Use it to detect locales where ANSI
2283 encoding of file names uses a double-byte character set (DBCS).
2284 If a DBCS encoding is used, advance by characters using
2285 CharNextExA, instead of incrementing a 'char *' pointer.
2286 Use _mbslwr instead of _strlwr. (Bug#13515)
2288 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
2289 request of memory reservation to 1.7GB. (Bug#13065)
2291 2013-01-25 Andreas Schwab <schwab@linux-m68k.org>
2293 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
2294 at check_extra_latin label. (Bug#13505)
2296 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2298 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
2299 Avoid redundant calls to strlen.
2301 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2303 Drop async_visible and async_iconified fields of struct frame.
2304 This is possible because async input is gone; for details, see
2305 http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
2306 * frame.h (struct frame): Remove async_visible and async_iconified
2307 members, convert garbaged to unsigned bitfield. Adjust comments.
2308 (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
2309 (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
2310 * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
2311 Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
2312 FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
2314 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
2315 properly. Likewise for obscured.
2317 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
2320 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
2322 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2324 * insdel.c (prepare_to_modify_buffer): Revert last change as suggested
2325 in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
2327 2013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
2329 * xdisp.c (message2, message2_nolog): Remove functions.
2330 (message3, message3_nolog): Extract nbytes and multibyteness directly
2331 from the string. Change all callers.
2332 (message3_nolog): Don't set message_enable_multibyte since set_message
2333 will reset it anyway.
2334 (message1, message1_nolog): Use message3.
2335 (vmessage): Use a stack allocated buffer rather than f->message_buf.
2336 (with_echo_area_buffer): Remove last two arguments. Update all callers.
2337 (set_message): Drop all but the second arg, which has to be a string.
2338 (set_message_1): Simplify now that we know that a1 is NULL and the
2339 second arg is a string.
2340 * frame.h (struct frame): Remove `message_buf' field.
2341 Use glyphs_initialized_p instead.
2342 (FRAME_MESSAGE_BUF): Remove macro.
2343 * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
2344 * lisp.h (message2, message2_nolog): Remove declarations.
2345 (message3, message3_nolog): Update declarations.
2346 * keyboard.c (read_char_minibuf_menu_text)
2347 (read_char_minibuf_menu_width): Remove vars.
2348 (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
2349 to correctly handle multibyte strings.
2350 * frame.c (delete_frame): Don't free message_buf any more.
2351 * editfns.c (message_text, message_length): Remove vars.
2352 (Fmessage_box): Don't copy the Lisp string's bytes any longer.
2353 * fileio.c (auto_save_error): Use message3 instead of message2.
2354 * dispnew.c (adjust_frame_message_buffer): Remove function.
2356 2013-01-23 Eli Zaretskii <eliz@gnu.org>
2358 * w32term.c (w32fullscreen_hook): Account correctly for the screen
2359 real estate used for the tool bar and the menu bar.
2361 2013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
2363 * insdel.c (prepare_to_modify_buffer): Force redisplay if
2364 hidden buffer is prepared to modification (Bug#13164).
2366 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2368 * window.h (struct window): Change window_end_valid member from
2369 Lisp_Object to a bitfield. Adjust comments.
2370 (wset_window_end_valid): Remove.
2371 * window.c (adjust_window_count): Clear window_end_valid.
2372 (Fwindow_end): Adjust user. Remove ancient #if 0 code.
2373 (Fwindow_line_height, set_window_buffer, Frecenter)
2374 (Fsplit_window_internal, Fdelete_other_windows_internal)
2375 (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
2376 * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
2377 * xdisp.c (check_window_end, reconsider_clip_changes)
2378 (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
2379 (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
2380 (find_first_unchanged_at_end_row, try_window_id): Likewise.
2382 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2384 * xdisp.c (mark_window_display_accurate): Simplify the loop
2385 assuming that the only one of vchild, hchild or buffer window
2386 slots is non-nil. Call mark_window_display_accurate_1 for
2387 the leaf windows only.
2388 (mark_window_display_accurate_1): Always assume leaf window.
2391 2013-01-22 Paul Eggert <eggert@cs.ucla.edu>
2393 * emacs.c (Qkill_emacs_hook): Now static.
2395 * fileio.c (Finsert_file_contents): Simplify.
2396 Remove unnecessary assignments and tests.
2398 2013-01-21 Eli Zaretskii <eliz@gnu.org>
2400 * w32.c (acl_set_file): Don't test for errors unless
2401 set_file_security returns FALSE. Avoids spurious errors when
2404 2013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
2406 * fileio.c (Finsert_file_contents): Revert code introduced at
2407 2013-01-18 in favor of the simpler and generally better fix.
2408 Save stack space by removing 'buffer' and reusing 'read_buf'
2411 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2413 * lisp.h (eabs): Define unconditionally (Bug#13419).
2414 The old "#if !defined (eabs)" was an unnecessary revenant of back
2415 when this macro was called "abs". Document 'eabs' better.
2417 2013-01-19 Glenn Morris <rgm@gnu.org>
2419 * fns.c (Frandom): Doc fix.
2421 2013-01-19 Eli Zaretskii <eliz@gnu.org>
2423 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
2424 segfault when there are lots of overlays.
2426 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
2427 when there are lots of overlays.
2428 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
2429 for the details and a way to reproduce.
2431 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2433 * fileio.c: Use O_APPEND to append.
2434 This corresponds better to the natural interpretation of "append",
2435 and avoids the need to open the output file twice, or to invoke
2436 lseek when APPEND is neither nil nor a number.
2437 This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
2438 (Fwrite_region): Simplify. Use O_APPEND instead of opening the
2439 file possibly twice, and lseeking to its end; this avoids the
2440 need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
2441 at the same time: the combination is never needed and apparently
2442 it doesn't work with DOS_NT.
2444 Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
2445 * fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
2447 Allow floating-point file offsets.
2448 Problem reported by Vitalie Spinu in
2449 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
2450 * fileio.c (emacs_lseek): Remove.
2451 (file_offset): New function.
2452 (Finsert_file_contents, Fwrite_region): Use it.
2454 2013-01-19 Chong Yidong <cyd@gnu.org>
2456 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
2457 aborting on Fsignal (Bug#13289).
2459 2013-01-19 Eli Zaretskii <eliz@gnu.org>
2461 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
2462 set_file_security as failure due to insufficient privileges.
2463 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2464 (fstat): Return owner and group like 'stat' and 'lstat' do.
2466 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2468 Work around bug in CIFS and vboxsf file systems (Bug#13149).
2469 The bug was observed on Ubuntu operating inside a virtual machine,
2470 editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
2471 The workaround introduces a race condition on non-buggy hosts,
2472 but it's an unlikely race and anyway there's a nearly identical
2473 nearby race that can't be fixed.
2474 * fileio.c (valid_timestamp_file_system, timestamp_file_system):
2476 (Fwrite_region): Test for file system time stamp bug.
2477 (init_fileio): New function.
2478 * lisp.h (init_fileio): Declare it.
2479 * emacs.c (main): Call it.
2481 * fileio.c (Finsert_file_contents): Simplify new diagnostic
2482 and make it more consistent with other stat-failure diagnostics.
2484 2013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
2486 Fix crash when inserting data from non-regular files.
2487 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
2488 for the error description produced by valgrind.
2489 * fileio.c (read_non_regular): Rename to read_contents.
2490 Free Lisp_Save_Value object used to pass parameters.
2491 (read_non_regular_quit): Rename to read_contents_quit.
2492 (Finsert_file_contents): Redesign internal file reading loop to adjust
2493 gap and end positions after each read and so help make_gap to work
2494 properly. Do not signal an I/O error too early and so do not leave
2495 not yet decoded characters in a buffer, which was the reason of
2496 redisplay crash. Use list2 to build return value. Adjust comments.
2498 2013-01-17 Paul Eggert <eggert@cs.ucla.edu>
2500 Close a race when statting and reading files (Bug#13149).
2501 * fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
2502 This avoids a race if the file is renamed between stat and open.
2503 This race is not the problem originally noted in Bug#13149;
2504 see <http://bugs.gnu.org/13149#73> and later messages in the thread.
2506 2013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2508 * lisp.h (toplevel): Add comment about using Lisp_Save_Value
2509 objects, related functions and macros.
2510 (make_save_value): Adjust prototype.
2511 (make_save_pointer): New prototype.
2512 (SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
2513 (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
2514 * alloc.c (format_save_value): Rename to make_save_value.
2515 (make_save_pointer): New function.
2516 (record_xmalloc): Use make_save_pointer.
2517 * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
2518 * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
2519 Change users of make_save_value to make_save_pointer.
2520 Likewise for format_save_value and make_save_value.
2522 2013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2524 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
2525 (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
2526 * buffer.c (toplevel, syms_of_buffer): Drop old commented-out
2529 2013-01-15 Paul Eggert <eggert@cs.ucla.edu>
2531 * alloc.c (free_save_value): Now static.
2533 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2535 * keymap.c (map_keymap_internal): Use format_save_value.
2536 (map_keymap_char_table_item): Adjust accordingly.
2537 * fileio.c (non_regular_fd, non_regular_inserted)
2538 (non_regular_nbytes): Remove.
2539 (Finsert_file_contents): Convert trytry to ptrdiff_t.
2540 Use format_save_value to pass parameters to read_non_regular.
2541 (read_non_regular): Use XSAVE_ macros to extract parameters.
2543 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
2545 (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.
2547 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2549 * lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow
2550 extraction from any Lisp_Save_Value slot. Add type checking.
2551 * alloc.c, dired.c, editfns.c, fileio.c, ftfont.c, gtkutil.c:
2552 * keymap.c, lread.c, nsterm.h, nsmenu.c, xfns.c, xmenu.c:
2553 * xselect.c: All users changed.
2555 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2557 Some convenient bits to deal with Lisp_Save_Values.
2558 * lisp.h (XSAVE_OBJECT): New macro to extract saved objects.
2559 (allocate_misc): Remove prototype.
2560 (format_save_value): New prototype.
2561 * alloc.c (allocate_misc): Revert back to static.
2562 (format_save_value): New function to build Lisp_Save_Value
2563 object with the specified internal structure.
2564 (make_save_value): Reimplement using format_save_value.
2565 * editfns.c (save_excursion_save): Use format_save_value.
2566 (save_excursion_restore): Use XSAVE_OBJECT.
2568 2013-01-14 Paul Eggert <eggert@cs.ucla.edu>
2570 Avoid needless casts with XSAVE_POINTER.
2571 * alloc.c (mark_object) [GC_MARK_STACK]:
2572 * dired.c (directory_files_internal_unwind):
2573 * fileio.c (do_auto_save_unwind):
2574 * gtkutil.c (pop_down_dialog):
2575 * keymap.c (map_keymap_char_table_item):
2576 * lread.c (load_unwind):
2577 * nsmenu.m (pop_down_menu):
2578 * print.c (print_object) [GC_MARK_STACK]:
2579 * xfns.c (clean_up_file_dialog):
2580 * xmenu.c (cleanup_widget_value_tree):
2581 Omit casts between XSAVE_POINTER and a pointer type.
2583 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2585 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
2586 * eval.c (eval_sub): Protect `form' from being GCed before its
2587 car and cdr becomes protected with the backtrace entry.
2589 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2591 Make Lisp_Save_Value more versatile storage for up to four objects.
2592 * lisp.h (toplevel): Enumeration to describe types of saved objects.
2593 (struct Lisp_Save_Value): New layout. Adjust comments.
2594 (XSAVE_POINTER): New macro.
2595 (XSAVE_INTEGER): Likewise.
2596 (allocate_misc): Add prototype.
2597 (free_misc): Likewise.
2598 * alloc.c (allocate_misc): Now global.
2599 (free_misc): Likewise. Adjust comment.
2600 (make_save_value): Use new Lisp_Save_Value layout. Adjust comment.
2601 (free_save_value): Likewise.
2602 (mark_object): Likewise.
2603 * editfns.c (save_excursion_save): Pack everything within
2604 Lisp_Save_Value and so avoid xmalloc.
2605 (save_excursion_restore): Adjust to match new layout. Use free_misc
2606 because we do not allocate extra memory any more. Add eassert.
2607 * print.c (print_object): New code to print Lisp_Save_Value. Do not
2608 rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments.
2609 * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
2610 * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
2611 Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
2613 2013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2615 * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
2616 (nsfont_draw): Remove disabling of LCD smoothing.
2617 (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
2618 Bug#11484 with LCD smoothing on.
2620 2013-01-13 Paul Eggert <eggert@cs.ucla.edu>
2622 Fix SIGDANGER handlers, for AIX (Bug#13408).
2623 * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
2624 Move handlers here from emacs.c; they were out of place.
2626 2013-01-11 Jan Djärv <jan.h.d@swipnet.se>
2628 * xterm.c (syms_of_xterm): Adjust documentation for
2629 scroll-bar-adjust-thumb-portion.
2631 2012-12-31 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
2633 * xterm.c (scroll-bar-adjust-thumb-portion): New variable to
2634 determine whether scroll bar thumb size should be adjusted or
2635 not. Use variable for MOTIF.
2637 * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
2640 2013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2642 * nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
2644 (doCommandBySelector:): Set processingCompose to NO.
2646 * nsfont.m (ns_findfonts): Add block/unblock_input calls.
2647 Remove check for fkeys count > zero, block/unblock fixes the real bug.
2648 (nsfont_list_family): Add block/unblock_input calls.
2649 (nsfont_open): Move block_input earlier. Add unblock_input before early
2651 (nsfont_draw): Add block/unblock_input calls.
2653 2013-01-12 Dmitry Antipov <dmantipov@yandex.ru>
2655 * indent.c (Fvertical_motion): Remove now-incorrect GCPROs
2656 for old_charpos and old_bytepos.
2658 2013-01-12 Paul Eggert <eggert@cs.ucla.edu>
2660 Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415).
2661 * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]:
2662 Clear tzvalbuf_in_environ if this workaround is in effect.
2663 Problem and fix reported by Kazuhiro Ito.
2665 2013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
2667 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
2668 Fix ambiguous doc string cross-reference(s).
2670 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
2671 doc string cross-reference(s).
2673 * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
2674 string cross-reference(s).
2676 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
2678 Avoid unnecessary byte position calculation for the gap movement.
2679 Since all users of move_gap do CHAR_TO_BYTE for other purposes
2680 anyway, all of them should use move_gap_both instead.
2681 * lisp.h (move_gap): Remove prototype.
2682 * insdel.c (move_gap): Remove.
2683 (move_gap_both): Add eassert.
2684 * editfns.c (Ftranspose_regions): Tweak to use move_gap_both.
2685 * xml.c (parse_region): Likewise.
2687 2013-01-11 Paul Eggert <eggert@cs.ucla.edu>
2689 emacsclient -t should not suspend Emacs server (Bug#13387)
2690 * lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
2692 * term.c (init_tty): Use them instead of rolling our own code.
2693 * sysdep.c (tcsetpgrp_without_stopping): Likewise. Here, this
2694 switches from 'signal' to 'pthread_sigmask', which is safer in
2695 multithreaded applications.
2696 * term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
2697 which has already arranged for that.
2698 (dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
2699 This is the main part of the bug fix.
2701 2013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
2703 * gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
2704 x_last_font_name (Bug#13403).
2706 2013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
2708 Omit buffer_slot_type_mismatch and use generic predicates to enforce
2709 the type of per-buffer values where appropriate.
2710 * lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
2711 predicate, which is how it's really used now. Adjust comment.
2712 * buffer.h (buffer_slot_type_mismatch): Remove prototype.
2713 * buffer.c (buffer_slot_type_mismatch): Remove.
2714 (DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
2715 predicate. Adjust comment.
2716 (syms_of_buffer): Use Qsymbolp for major-mode. Use Qintegerp for
2717 fill-column, left-margin, tab-width, buffer-saved-size,
2718 left-margin-width, right-margin-width, left-fringe-width,
2719 right-fringe-width, scroll-bar-width and buffer-display-count.
2720 Use Qstringp for default-directory, buffer-file-name,
2721 buffer-file-truename and buffer-auto-save-file-name. Use Qfloatp for
2722 scroll-up-aggressively and scroll-down-aggressively. Use Qnumberp for
2724 * data.c (store_symval_forwarding): Adjust to call the predicate.
2726 2013-01-09 Juanma Barranquero <lekktu@gmail.com>
2728 * w32.c (get_name_and_id, acl_set_file):
2729 * w32term.c (w32fullscreen_hook): Remove unused local variables.
2731 2013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
2733 * lisp.h (make_gap_1): New prototype.
2734 * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
2736 * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
2738 (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
2739 * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment.
2740 (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment.
2741 (make_gap_1): New function to adjust the gap of any buffer.
2742 * coding.c (coding_alloc_by_making_gap): Use it.
2743 * buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE,
2744 GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment.
2746 2013-01-08 Juri Linkov <juri@jurta.org>
2748 * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
2749 of (supports :underline (:style wave)). (Bug#13000)
2751 2013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
2753 * undo.c (Fprimitive_undo): Move to simple.el.
2754 (syms_of_undo): Remove declarations for Sprimitive_undo.
2756 2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
2758 * keyboard.c (echo_add_key): Rename from echo_add_char.
2760 2013-01-06 Chong Yidong <cyd@gnu.org>
2762 * keyboard.c (echo_add_char): New function, factored out from
2763 echo_char. Don't add a space if the previous echo string was
2765 (echo_char): Use it.
2766 (read_key_sequence): When echoing mock input, ensure that the
2767 trailing dash is properly added.
2769 2013-01-05 Eli Zaretskii <eliz@gnu.org>
2771 * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
2772 of a non-portable "t" to print ptrdiff_t values. Allow up to 9
2773 digits for buffer positions, before misalignment starts.
2774 Display "0" for integer "object" field.
2775 (dump_glyph_row): Adapt the header line to changes in dump_glyph.
2776 Display the newline glyph more unambiguously.
2778 2013-01-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2780 * nsterm.m (ns_draw_underwave):
2781 * w32term.c (w32_draw_underwave):
2782 * xterm.c (x_draw_underwave): Make underwave look more triangular
2783 and also degrade gracefully for small fonts. (Bug#13000)
2785 * nsterm.m (ns_draw_text_decoration):
2786 * w32term.c (x_draw_glyph_string):
2787 * xterm.c (x_draw_glyph_string): Don't use previous underline
2788 thickness and position if previous underline type is underwave.
2790 2013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
2792 * fileio.c (Ffile_acl): Undocument return format.
2794 2013-01-02 Glenn Morris <rgm@gnu.org>
2796 * keymap.c (Fkey_description): Doc fix. (Bug#13323)
2798 2013-01-02 Paul Eggert <eggert@cs.ucla.edu>
2801 * dired.c (file_name_completion):
2802 * doc.c (get_doc_string):
2803 * floatfns.c (round2):
2804 * font.c (font_score, font_delete_unmatched):
2805 * fringe.c (compute_fringe_widths):
2806 * lread.c (read_list):
2807 * minibuf.c (Ftry_completion):
2808 * term.c (tty_ins_del_lines):
2809 * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
2810 Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
2812 2012-12-31 Eli Zaretskii <eliz@gnu.org>
2814 * w32.c (unsetenv): Set up the string passed to _putenv
2816 See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
2817 for the bug this caused.
2819 2012-12-30 Paul Eggert <eggert@cs.ucla.edu>
2821 * coding.c (Qmac): Now static.
2823 2012-12-30 Jan Djärv <jan.h.d@swipnet.se>
2825 * gtkutil.c (TOOLBAR_TOP_WIDGET): New macro.
2826 (xg_pack_tool_bar): Use TOOLBAR_TOP_WIDGET, condition out use of
2827 handlebox_widget. Set toolbar_in_hbox to false/true, set
2828 toolbar_is_packed to true.
2829 (xg_update_tool_bar_sizes): Use widget returned by TOOLBAR_TOP_WIDGET.
2830 (update_frame_tool_bar): Check toolbar_is_packed for packing.
2831 Show all on TOOLBAR_TOP_WIDGET.
2832 (free_frame_tool_bar): Check toolbar_is_packed. Use widget returned
2833 by TOOLBAR_TOP_WIDGET.
2834 (xg_change_toolbar_position): Use widget returned by TOOLBAR_TOP_WIDGET.
2835 Check toolbar_is_packed.
2836 (xg_have_tear_offs, tearoff_remove, tearoff_activate): Condition on
2837 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2838 (xg_have_tear_offs): When ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW, return
2840 (create_menus): Create tearoff only if HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2841 (xg_update_menubar): Update title only if
2842 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2843 (xg_update_submenu): Skip tearoff only if
2844 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2845 (xg_initialize): Initialize xg_detached_menus only if
2846 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2848 * xterm.h (struct x_output): Surround handlebox_widget with
2849 #ifdef HAVE_GTK_HANDLE_BOX_NEW. toolbar_is_packed is new,
2850 toolbar_in_hbox is bool.
2852 2012-12-30 Andreas Schwab <schwab@linux-m68k.org>
2854 * src/Makefile.in (TEMACS_LDFLAGS2): Remove.
2855 (LIBS_GNUSTEP): Define.
2856 (LIBES): Add $(LIBS_GNUSTEP).
2857 (temacs$(EXEEXT)): Use $(LDFLAGS) instead of $(TEMACS_LDFLAGS2).
2859 2012-12-30 Eli Zaretskii <eliz@gnu.org>
2861 * xdisp.c (set_cursor_from_row): Don't confuse a truncation or
2862 continuation glyph on a TTY with an indication of an empty line.
2865 2012-12-29 Eli Zaretskii <eliz@gnu.org>
2867 * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
2868 file's SELinux context or ACLs successfully set, nil otherwise.
2870 (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
2872 * w32proc.c (reader_thread): Avoid passing NULL handles to
2873 SetEvent and WaitForSingleObject.
2875 2012-12-28 Paul Eggert <eggert@cs.ucla.edu>
2877 Port EXTERNALLY_VISIBLE to Clang 3.2.
2878 * conf_post.h (__has_attribute): New macro.
2879 (EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2.
2881 2012-12-27 Glenn Morris <rgm@gnu.org>
2883 * cygw32.c (Fcygwin_convert_file_name_to_windows)
2884 (Fcygwin_convert_file_name_from_windows): Doc fixes.
2886 2012-12-27 Eli Zaretskii <eliz@gnu.org>
2888 * fileio.c (file_name_as_directory, directory_file_name):
2889 Accept an additional argument MULTIBYTE to indicate whether the input C
2890 came from a multibyte or a unibyte Lisp string; all callers
2891 adjusted. Don't assume the input string is always multibyte.
2893 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
2894 don't ENCODE_FILE them, and return a unibyte string if the input
2896 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
2897 don't assume the input strings will always be multibyte. If the
2898 input strings are multibyte, decode strings obtained from C
2901 2012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2903 * lisp.h (toplevel): Add two notices to the comment about
2904 defining a new Lisp data type.
2905 * print.c (print_object): If Lisp_Save_Value object's pointer
2906 is the address of a memory area containing Lisp_Objects, try
2908 * alloc.c (valid_lisp_object_p): Adjust comment.
2910 2012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2912 * keyboard.c (record_asynch_buffer_change): Initialize an event
2913 only if it's really needed.
2914 * frame.h (enum output_method): Remove output_mac member since
2915 it's a leftover from the deleted code.
2916 * frame.c (Fframep): Adjust user here ...
2917 * terminal.c (Fterminal_live_p): ... and here.
2918 * coding.c (Qmac): Now here because it's only used to denote
2919 end-of-line encoding type.
2920 (syms_of_coding): DEFSYM it.
2921 * frame.h (Qmac): Remove duplicated declaration.
2923 2012-12-26 Paul Eggert <eggert@cs.ucla.edu>
2925 * window.c (select_window_1): Now static, since it's used only here.
2927 2012-12-25 Eli Zaretskii <eliz@gnu.org>
2929 * window.c (window_body_cols): Subtract display margins from the
2930 window body width on TTYs as well. See
2931 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
2932 for the original report.
2934 2012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
2936 * xdisp.c (redisplay_window): Remove inner local variable
2937 because the outer shadowed one has the same meaning.
2938 * xterm.h (struct x_output): Remove toolbar_detached member since it's
2940 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
2941 (xg_create_tool_bar): Adjust users.
2943 2012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
2945 * buffer.h (BUF_COMPACT): New macro to follow the common style.
2946 * buffer.c (Fget_buffer_create): Use it to set compact field of
2947 struct buffer_text to avoid accessing an uninitialized value
2948 when compact_buffer is called for the first time.
2949 (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
2950 (Fset_buffer_modified_p): Use buffer_window_count to check
2951 whether the buffer is displayed in some window.
2952 * xdisp.c (message_dolog): Likewise.
2954 2012-12-23 Eli Zaretskii <eliz@gnu.org>
2956 * w32.c (acl_set_file): If setting the file security descriptor
2957 fails, and the new DACL is identical to the existing one, silently
2958 return success. This fixes problems for users backing up their
2959 own files without having the necessary privileges for setting
2960 security descriptors.
2962 * w32proc.c (reader_thread): Do not index fd_info[] with negative
2964 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
2965 after WaitForSingleObject returns normally. This expedites reader
2966 thread shutdown when delete_child triggers it.
2967 (reap_subprocess): More accurate commentary for why we call
2968 delete_child only when cp->fd is negative.
2970 * w32.c (sys_close): Do not call delete_child on a subprocess
2971 whose handle is not yet closed. Instead, set its file descriptor
2972 to a negative value, so that reap_subprocess will call
2973 delete_child on that subprocess when its SIGCHLD arrives.
2974 This avoids closing handles used for communications between sys_select
2975 and reader_thread, which doesn't give sys_select a chance to
2976 notice that the process exited and invoke the SIGCHLD handler for
2979 2012-12-23 Jan Djärv <jan.h.d@swipnet.se>
2981 * nsfns.m (Fns_do_applescript): Run event loop until script has
2982 been executed (Bug#12969).
2983 (ns_run_ascript): Chech as_script for nil, set to nil after
2986 2012-12-22 Martin Rudalics <rudalics@gmx.at>
2988 * window.c (Fselect_window): Reword doc-string (Bug#13248).
2990 2012-12-22 Eli Zaretskii <eliz@gnu.org>
2992 * w32term.c (w32fullscreen_hook): New function.
2993 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
2995 2012-12-21 Eli Zaretskii <eliz@gnu.org>
2997 * fileio.c (Finsert_file_contents): Doc fix.
2999 * w32proc.c (new_child, delete_child, find_child_pid): For a
3000 subprocess, consider its slot being in use as long as its process
3001 handle (procinfo.hProcess) is not NULL. This avoids reusing the
3002 slot when a new process is started immediately after killing
3003 another one, without waiting enough time for the first process to
3004 be reaped and resources allocated for it be orderly freed.
3006 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
3008 2012-12-21 Chong Yidong <cyd@gnu.org>
3010 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
3012 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
3014 2012-12-21 Eli Zaretskii <eliz@gnu.org>
3016 * w32.c (get_name_and_id): Always pass NULL as the first argument
3017 of lookup_account_sid. Avoids crashes with UNC file names that
3018 refer to DFS domains, not to specific machine names. (Bug#12621)
3019 Remove now unused argument FNAME; all callers changed.
3020 (get_file_owner_and_group): Remove now unused argument FNAME; all
3023 2012-12-21 Chong Yidong <cyd@gnu.org>
3025 * editfns.c (Finsert_char): Since read-char-by-name now signals an
3026 error for invalid chars, don't check for a nil return value.
3028 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
3030 Avoid calls to CHAR_TO_BYTE if byte position is known.
3031 * editfns.c (make_buffer_string_both): Use move_gap_both.
3032 (Fbuffer_string): Use make_buffer_string_both.
3033 * marker.c (buf_charpos_to_bytepos): Convert to eassert.
3035 (buf_bytepos_to_charpos): Likewise.
3036 (charpos_to_bytepos): Remove.
3037 * fileio.c (Finsert_file_contents): Use move_gap_both.
3038 * search.c (Freplace_match): Likewise.
3039 * process.c (process_send_region): Likewise. Use convenient
3040 names for byte positions.
3041 * lisp.h (charpos_to_bytepos): Remove prototype.
3042 * indent.c (scan_for_column): Use CHAR_TO_BYTE.
3043 * insdel.c (move_gap): Likewise.
3045 2012-12-20 Paul Eggert <eggert@cs.ucla.edu>
3047 * xdisp.c (redisplay_internal): Remove now-unused local.
3049 2012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
3051 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
3052 (redisplay_internal): Don't bother selecting the frame to get the
3053 proper value of frame-local variables (bug#13225).
3055 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
3057 * textprop.c (set_text_properties_1): Do not allow NULL interval.
3058 Rename 4th argument since it may be buffer or string. Adjust comment.
3059 * intervals.c (graft_intervals_info_buffer): Find an interval here.
3061 2012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
3063 * coding.c (Fdetect_coding_region): Do not check start and end with
3064 CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
3065 (code_convert_region): Likewise.
3067 2012-12-18 Eli Zaretskii <eliz@gnu.org>
3069 * w32.c (acl_get_file, acl_set_file): Run the file name through
3070 map_w32_filename, and resolve any symlinks in the file name, like
3072 (acl_set_file): Call revert_to_self, if any privileges were
3075 2012-12-17 Juanma Barranquero <lekktu@gmail.com>
3077 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
3078 ($(BLD)/w32.$(O)): Update dependencies.
3080 2012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
3082 * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
3083 propagate redisplay's scrolling (if any) to the right window.
3084 (redisplay_internal): Use ensure_selected_frame.
3085 (display_mode_lines): Complete last fix.
3086 * window.c (select_window_1): New func, extracted from select_window.
3087 (select_window): Use it.
3088 * window.h (select_window_1): Declare.
3090 2012-12-17 Eli Zaretskii <eliz@gnu.org>
3092 Emulate Posix ACL APIs on MS-Windows.
3093 * w32.c: Include sddl.h and sys/acl.h.
3094 (SDDL_REVISION_1): Define if not already defined.
3095 (g_b_init_get_security_descriptor_dacl)
3096 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
3097 (g_b_init_is_valid_security_descriptor)
3098 (g_b_init_set_file_security): New static flags.
3099 (globals_of_w32): Initialize them to zero.
3100 (SetFileSecurity_Name): New string constant.
3101 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
3102 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
3103 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
3104 (IsValidSecurityDescriptor_Proc): New typedefs.
3105 (get_file_security, get_security_descriptor_owner)
3106 (get_security_descriptor_group): Set errno to ENOTSUP.
3107 (set_file_security, get_security_descriptor_dacl)
3108 (is_valid_security_descriptor, convert_sd_to_sddl)
3109 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
3110 (acl_free, acl_get_file, acl_set_file): New functions.
3112 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
3114 2012-12-17 Paul Eggert <eggert@cs.ucla.edu>
3116 Don't reraise SIGCHLD, as that can now lose (Bug#13192).
3117 With the 2012-12-03 fix for Bug#12980 in place, an old workaround
3118 for some of that bug's symptoms can now cause Emacs to abort.
3119 Remove the workaround.
3120 * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
3121 The bug that caused SIGCHLD to get lost has been fixed, and the
3122 workaround for it can now cause Emacs to abort.
3124 2012-12-16 Paul Eggert <eggert@cs.ucla.edu>
3126 * sysdep.c (emacs_abort): Bump backtrace size to 40.
3127 Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
3128 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
3130 2012-12-16 Romain Francoise <romain@orebokech.com>
3132 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
3133 (Fcopy_file): Change last arg to `preserve_extended_attributes'
3134 and copy ACL entries of file in addition to SELinux context if set.
3135 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
3137 * Makefile.in (LIBACL_LIBS): New macro.
3140 2012-12-15 Paul Eggert <eggert@cs.ucla.edu>
3142 * fileio.c (internal_delete_file): Use bool for boolean.
3144 2012-12-15 Eli Zaretskii <eliz@gnu.org>
3146 Fix bug #13079 on MS-Windows with temp files not being deleted.
3147 * w32.h (_child_process): New members input_file and
3149 (register_child): First argument is now pid_t.
3150 (record_infile, record_pending_deletion): New prototypes.
3152 * w32proc.c (new_child): Initialize input_file and
3153 pending_deletion members of the child.
3154 (delete_child): Delete the child's temporary input file, if any,
3155 that is pending deletion.
3156 (register_child): First argument is now pid_t.
3157 (record_infile, record_pending_deletion): New functions.
3158 (reap_subprocess): Fix a typo in DebPrint string.
3159 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
3161 * fileio.c (internal_delete_file): Return an int again: non-zero
3162 if delete-file succeeds, zero otherwise.
3164 * lisp.h (internal_delete_file): Adjust prototype.
3166 * callproc.c (Fcall_process): Don't overwrite infile with result
3168 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
3169 asynchronous subprocess, record the name of the input file name,
3171 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
3172 delete the file, record it as pending deletion when the subprocess
3175 2012-12-14 Eli Zaretskii <eliz@gnu.org>
3177 * editfns.c [HAVE_PWD_H]: Include grp.h.
3179 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
3181 2012-12-14 Paul Eggert <eggert@cs.ucla.edu>
3183 Fix permissions bugs with setgid directories etc. (Bug#13125)
3184 * dired.c (Ffile_attributes): Return t as the 9th attribute,
3185 to mark it as a placeholder. The old value was often wrong.
3186 The only user of this attribute has been changed to use
3187 file-ownership-preserved-p instead, with its new group arg.
3188 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
3190 2012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
3192 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
3193 Keep selected_window and selected_frame in sync.
3195 2012-12-14 Eli Zaretskii <eliz@gnu.org>
3197 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
3198 try to get accurate owner and group information from NT file
3199 security APIs. This is to make most callers of 'stat' and
3200 'lstat', which don't need that information, much faster.
3202 * dired.c (Ffile_attributes) [WINDOWSNT]:
3203 Set w32_stat_get_owner_group to a non-zero value, to request accurate
3204 owner and group information from 'lstat'.
3206 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3208 * fileio.c (Finsert_file_contents): Don't put tail into head area,
3209 as that confuses set-auto-coding, so insist on the head-read
3210 returning the full 1024 bytes. Let lseek compute the tail offset;
3211 less work for us. Do not ignore I/O errors when reading the tail.
3213 * xdisp.c: Minor style fixes.
3214 (init_iterator): Hoist assignment out of if-expression.
3215 (markpos_of_region): Callers now test for sign, not for -1.
3217 2012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
3219 Minor redisplay optimization when the region length is zero.
3220 * xdisp.c (markpos_of_region): New function.
3221 (init_iterator): Do not highlight the region of zero length.
3222 (redisplay_window): Check whether the region is of non-zero length.
3223 (try_cursor_movement): Allow if the region length is zero.
3224 (try_window_reusing_current_matrix, try_window_id): Likewise.
3226 2012-12-13 Eli Zaretskii <eliz@gnu.org>
3228 * search.c (search_buffer): Check the inverse translations of each
3229 character in pattern when the buffer being searched is unibyte.
3232 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3234 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
3235 files, fixing a regression from 24.2.
3236 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
3238 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3240 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
3241 fstat shouldn't fail, and if it does fail copy-file should not proceed.
3242 Remove unnecessary S_ISLNK test, as (contra the comments) this
3243 function can't copy symlinks. Improve quality of error message
3244 when attempting to copy files that are neither regular files nor
3247 2012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
3249 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
3250 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
3251 * window.c (Frecenter):
3252 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
3253 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
3255 2012-12-12 Daniel Colascione <dancol@dancol.org>
3257 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
3258 the dumped Emacs is not a sparse file, greatly improving Cygwin
3259 "make bootstrap" performance.
3261 2012-12-11 Michael Albinus <michael.albinus@gmx.de>
3263 * inotify.c (inotify_callback): Generate an Emacs event for every
3264 incoming inotify event.
3266 2012-12-11 Eli Zaretskii <eliz@gnu.org>
3268 * xdisp.c (handle_face_prop): Fix logic of computing
3269 it->start_of_box_run_p.
3270 (append_space_for_newline): If the glyph row is R2L, reset the
3271 iterator's end_of_box_run_p flag before prepending the space glyph.
3272 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
3273 iterator's start_of_box_run_p flag before prepending the stretch.
3274 (append_glyph, produce_image_glyph, append_composite_glyph)
3275 (append_stretch_glyph, append_glyphless_glyph): Reverse the
3276 left_box_line_p and right_box_line_p flags of the glyph for R2L
3277 glyph rows. (Bug#13011)
3279 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3281 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
3282 if changed buffer is not shown in a window.
3283 * insdel.c (prepare_to_modify_buffer): Likewise.
3284 * window.c (replace_buffer_in_windows_safely): Do nothing
3285 if buffer is not shown in a window.
3286 (Fforce_window_update): Likewise if string or buffer argument
3289 2012-12-11 Eli Zaretskii <eliz@gnu.org>
3291 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
3292 encoded_file_name, which is what it is.
3294 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3296 Consistently use marker_position and marker_byte_position.
3297 * fringe.c (Ffringe_bitmaps_at_pos):
3298 * indent.c (Fvertical_motion):
3299 * insdel.c (prepare_to_modify_buffer):
3300 * keyboard.c (make_lispy_position):
3301 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
3302 (window_scroll_pixel_based, displayed_window_lines)
3303 (Fset_window_configuration):
3304 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
3305 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
3306 Replace direct access to marker fields with calls
3307 to marker_position and/or marker_byte_position.
3309 2012-12-11 Juanma Barranquero <lekktu@gmail.com>
3311 * makefile.w32-in (SIG2STR_H): New macro.
3312 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
3313 ($(BLD)/w32notify.$(O)): Update dependencies.
3315 2012-12-10 Daniel Colascione <dancol@dancol.org>
3317 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
3318 Windows file notification functionality unless WINDOWSNT.
3320 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
3323 * w32fns.c (cache_system_info): Initialize the global hinst
3324 variable here so various initialization calls DTRT.
3326 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
3327 (hinst): Remove unneeded extern declaration.
3328 (_start): Remove initialization of above variables; remove
3329 initialization of hinst, as cache_system_info now does that.
3331 * emacs.c (main): Call cache_system_info early in startup; we
3332 previously weren't calling it in Cygwin builds.
3334 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
3335 Teach the autoconf build system how to compile a Windows resource file
3336 and link it to Emacs.
3338 2012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
3340 Per-buffer window counters.
3341 * buffer.h (struct buffer): New member window_count.
3342 (buffer_window_count): New function.
3343 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
3344 Initialize window_count.
3345 (Fkill_buffer): Verify window_count for the buffer being killed.
3346 (modify_overlay): Do not force redisplay if buffer is not shown
3348 (init_buffer_once): Initialize window_count for buffer_defaults
3349 and buffer_local_symbols.
3350 * window.h (buffer_shared): Remove declaration.
3351 (wset_buffer): Convert from inline ...
3352 * window.c (wset_buffer): ... to an ordinary function.
3353 (adjust_window_count): New function.
3354 (make_parent_window): Use it.
3355 * xdisp.c (buffer_shared): Remove.
3356 (redisplay_internal, redisplay_window): Adjust users.
3357 (buffer_shared_and_changed): Use per-buffer window counter.
3359 2012-12-10 Eli Zaretskii <eliz@gnu.org>
3361 Support for filesystem notifications on MS-Windows.
3362 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
3363 and this is a TTY frame, signal the caller that keyboard input is
3366 * w32xfns.c (drain_message_queue): Now returns an int: an
3367 indication whether any WM_EMACS_FILENOTIFY messages were found in
3370 * w32inevt.c (handle_file_notifications): New function.
3371 (w32_console_read_socket): Call it to process file notifications.
3373 * w32console.c (initialize_w32_display): Record the main thread ID
3376 * deps.mk (inotify.o): New dependency list.
3378 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
3380 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
3381 (WM_EMACS_END): Bump value by 1.
3382 (notification_buffer_in_use, file_notifications)
3383 (notifications_size, notifications_desc): Declare.
3384 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
3387 * w32term.c (lispy_file_action, queue_notifications): New functions.
3388 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
3389 <Qrenamed_to>: New symbols.
3390 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
3392 * w32notify.c: New file, implements file event notifications for
3395 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
3396 by posting it to the w32_read_socket queue.
3398 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
3400 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
3401 (GLOBAL_SOURCES): Add w32notify.c
3402 ($(BLD)/w32notify.$(O)): New set of dependencies.
3404 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
3406 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
3407 Handle FILE_NOTIFY_EVENT.
3408 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
3409 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
3410 w32notify-handle-event by default.
3412 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
3415 2012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
3417 Support for filesystem notifications on GNU/Linux via inotify.
3418 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
3420 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
3422 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
3423 (syms_of_keyboard): DEFSYM it.
3424 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
3425 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
3426 Qfile_inotify events.
3427 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
3428 special-event-map to inotify-handle-event.
3430 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
3432 * Makefile.in (base_obj): Add inotify.o.
3434 * inotify.c: New file.
3436 2012-12-10 Jan Djärv <jan.h.d@swipnet.se>
3438 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
3440 2012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
3442 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
3443 DWORD_PTR, for compatibility with 64-bit builds.
3445 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
3446 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
3447 (system_process_attributes): Use SIZE_T rather than DWORD, for
3448 compatibility with 64-bit builds.
3450 2012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
3452 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
3454 2012-12-10 Eli Zaretskii <eliz@gnu.org>
3456 * indent.c (Fvertical_motion): If a display string will be
3457 displayed on the left or the right margin, don't consider it as a
3458 factor in cursor positioning. (Bug#13108)
3460 2012-12-10 Martin Rudalics <rudalics@gmx.at>
3462 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
3464 2012-12-10 Paul Eggert <eggert@cs.ucla.edu>
3466 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
3469 2012-12-08 Eli Zaretskii <eliz@gnu.org>
3471 * w32.c (unsetenv): Return 0 if the input string is too long.
3473 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3475 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
3476 * alloc.c (xputenv): New function.
3477 * dbusbind.c (Fdbus_init_bus):
3479 * xterm.c (x_term_init):
3480 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
3481 * editfns.c (initial_tz): Move static var decl up.
3482 (tzvalbuf_in_environ): New static var.
3483 (init_editfns): Initialize these two static vars.
3484 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
3485 Save old TZ value on stack, if it's small.
3486 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
3487 instead, use xputenv+unsetenv to set and restore TZ.
3488 (environbuf): Remove static var. All uses removed.
3489 (Fset_time_zone_rule): Do not save TZ and environ;
3490 no longer needed here.
3491 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
3492 Move to inside set_time_zone_rule; they don't need file scope any more.
3493 (set_time_zone_rule): Maintain the TZ=value string separately.
3494 (syms_of_editfns): Don't initialize initial_tz;
3495 init_editfns now does it.
3496 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
3497 * lisp.h (xputenv): New decl.
3499 2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
3501 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
3503 2012-12-08 Eli Zaretskii <eliz@gnu.org>
3505 * w32.c (unsetenv, sys_putenv): New functions.
3507 2012-12-08 Chong Yidong <cyd@gnu.org>
3509 * editfns.c (Finsert_char): Make the error message more
3510 informative (Bug#12992).
3512 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3514 Simplify get_lim_data.
3515 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
3516 Remove USG and vlimit methods; no longer used these days.
3517 Add #error catchall just in case.
3519 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
3520 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
3521 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
3522 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
3523 (deleted_pid_list, Fdelete_process, create_process)
3524 (record_child_status_change, handle_child_signal, deliver_child_signal)
3525 (init_process_emacs, syms_of_process):
3526 Assume SIGCHLD is defined.
3527 (parse_signal): Remove. All uses removed.
3528 (abbr_to_signal): New static function.
3529 (Fsignal_process): Use it to convert signal names to ints.
3530 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
3531 kill (getpgrp (), ...).
3532 (emacs_sigaction_init): Assume SIGCHLD is defined.
3533 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
3534 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
3535 * syssignal.h (EMACS_KILLPG): Remove.
3536 All uses replaced by 'kill' with a negative pid.
3537 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
3538 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
3540 2012-12-07 Paul Eggert <eggert@cs.ucla.edu>
3542 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
3543 This will cause a production Emacs to dump core instead of
3546 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3548 * frame.c (make_frame): Do not set window's buffer to t.
3549 * window.c (Fsplit_window_internal): Likewise. Previously it was
3550 used to indicate that the window is being set up. Now we use
3551 set_window_buffer for all new windows, so the condition in ...
3552 (Fset_window_buffer): ... is always true and can be removed.
3554 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3556 Convenient macro to check whether the buffer is hidden.
3557 * buffer.h (BUFFER_HIDDEN_P): New macro.
3558 * frame.c (make_frame): Use it. Adjust comment.
3559 * buffer.c (candidate_buffer): New function.
3560 (Fother_buffer, other_buffer_safely): Use it.
3562 2012-12-06 Eli Zaretskii <eliz@gnu.org>
3564 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
3565 if the child process is still running. Instead, exit the wait
3566 loop and return zero. (Bug#13086)
3568 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3570 * frame.h (x_char_width, x_char_height): Remove prototypes.
3571 * w32term.h (x_char_width, x_char_height): Likewise.
3572 * xfns.c (x_char_width, x_char_height): Remove.
3573 * w32fns.c (x_char_width, x_char_height): Likewise.
3574 * nsfns.c (x_char_width, x_char_height): Likewise.
3575 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
3577 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
3578 * keyboard.c (command_loop_1): Remove prototype.
3579 (command_loop_2, top_level_1): Add static to match prototype.
3581 2012-12-06 Paul Eggert <eggert@cs.ucla.edu>
3583 Fix a recently-introduced delete-process race condition.
3584 * callproc.c, process.h (record_kill_process):
3585 New function, containing part of the old call_process_kill.
3586 (call_process_kill): Use it.
3587 This does not change call_process_kill's behavior.
3588 * process.c (Fdelete_process): Use record_kill_process to fix a
3589 race condition that could cause Emacs to lose track of a child.
3591 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3593 Avoid code duplication between prev_frame and next_frame.
3594 * frame.c (candidate_frame): New function. Add comment.
3595 (prev_frame, next_frame): Use it. Adjust comment.
3597 2012-12-06 Eli Zaretskii <eliz@gnu.org>
3599 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
3600 fails, signal an error instead of continuing with an empty
3602 Encode expanded temp file pattern before passing it to mkstemp or
3605 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
3606 Encode the file name before passing it to dostounix_filename, in
3607 case it will downcase it (under w32-downcase-file-names).
3610 2012-12-05 Paul Eggert <eggert@cs.ucla.edu>
3612 Minor call-process cleanups.
3613 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
3614 at the same time as other platforms, to simplify analysis.
3615 No need for fd0_volatile since we have synch_process_fd.
3616 Avoid needless emacs_close; arg is always negative.
3618 2012-12-04 Andreas Schwab <schwab@linux-m68k.org>
3620 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
3623 2012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
3625 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
3626 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
3627 and mouse_face_hidden members to a bitfields.
3628 * frame.h (struct frame): Remove set-but-not-used space_width member.
3629 (FRAME_SPACE_WIDTH): Remove.
3630 * nsterm.m, w32term.c, xterm.c: Adjust users.
3631 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
3632 member. Adjust users. Convert term_initted, delete_in_insert_mode,
3633 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
3634 members to a bitfields.
3636 2012-12-03 Paul Eggert <eggert@cs.ucla.edu>
3638 Don't let call-process be a zombie factory (Bug#12980).
3639 Fixing this bug required some cleanup of the signal-handling code.
3640 As a side effect, this change also fixes a longstanding rare race
3641 condition whereby Emacs could mistakenly kill unrelated processes,
3642 and it fixes a bug where a second C-g does not kill a recalcitrant
3643 synchronous process in GNU/Linux and similar platforms.
3644 The patch should also fix the last vestiges of Bug#9488,
3645 a bug which has mostly been fixed on the trunk by other changes.
3646 * callproc.c, process.h (synch_process_alive, synch_process_death)
3647 (synch_process_termsig, sync_process_retcode):
3648 Remove. All uses removed, to simplify analysis and so that
3649 less consing is done inside critical sections.
3650 * callproc.c (call_process_exited): Remove. All uses replaced
3651 with !synch_process_pid.
3652 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
3653 These take the role of what used to be in unwind-protect arg.
3655 (block_child_signal, unblock_child_signal):
3656 New functions, to avoid races that could kill innocent-victim processes.
3657 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
3658 (call_process_kill): Record killed processes as deleted, so that
3659 zombies do not clutter up the system. Do this inside a critical
3660 section, to avoid a race that would allow the clutter.
3661 (call_process_cleanup): Fix code so that the second C-g works again
3662 on common platforms such as GNU/Linux.
3663 (Fcall_process): Create the child process in a critical section,
3664 to fix a race condition. If creating an asynchronous process,
3665 record it as deleted so that zombies do not clutter up the system.
3666 Do unwind-protect for WINDOWSNT too, as that's simpler in the
3667 light of these changes. Omit unnecessary call to emacs_close
3668 before failure, as the unwind-protect code does that.
3669 * callproc.c (call_process_cleanup):
3670 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
3671 * process.c (record_deleted_pid): New function, containing
3672 code refactored out of Fdelete_process.
3673 (Fdelete_process): Use it.
3674 (process_status_retrieved): Remove. All callers changed to use
3675 child_status_change.
3676 (record_child_status_change): Remove, folding its contents into ...
3677 (handle_child_signal): ... this signal handler. Now, this
3678 function is purely a handler for SIGCHLD, and is not called after
3679 a synchronous waitpid returns; the synchronous code is moved to
3680 wait_for_termination. There is no need to worry about reaping
3681 more than one child now.
3682 * sysdep.c (get_child_status, child_status_changed): New functions.
3683 (wait_for_termination): Now takes int * status and bool
3684 interruptible arguments, too. Do not record child status change;
3685 that's now the caller's responsibility. All callers changed.
3686 Reimplement in terms of get_child_status.
3687 (wait_for_termination_1, interruptible_wait_for_termination):
3688 Remove. All callers changed to use wait_for_termination.
3689 * syswait.h: Include <stdbool.h>, for bool.
3690 (record_child_status_change, interruptible_wait_for_termination):
3692 (record_deleted_pid, child_status_changed): New decls.
3693 (wait_for_termination): Adjust to API changes noted above.
3695 * bytecode.c, lisp.h (Qbytecode): Remove.
3696 No longer needed after 2012-11-20 interactive-p changes.
3698 2012-12-03 Eli Zaretskii <eliz@gnu.org>
3700 * xdisp.c (redisplay_window): If the cursor is visible, but inside
3701 the scroll margin, move point outside the margin. (Bug#13055)
3703 2012-12-03 Jan Djärv <jan.h.d@swipnet.se>
3705 * gtkutil.c (my_log_handler): New function.
3706 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
3708 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3710 * lisp.h (modify_region): Rename to...
3711 (modify_region_1): ...new prototype.
3712 * textprop.c (modify_region): Now static. Adjust users.
3713 * insdel.c (modify_region): Rename to...
3714 (modify_region_1): ...new function to work with current buffer.
3715 Adjust comment and users. Use true and false for booleans.
3717 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3719 * alloc.c (free_save_value): New function.
3720 (safe_alloca_unwind): Use it.
3721 * lisp.h (free_save_value): New prototype.
3722 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
3724 (save_excursion_restore): Adjust to match saved data structure.
3725 Use free_save_value to offload some work from GC. Drop obsolete
3728 2012-12-03 Chong Yidong <cyd@gnu.org>
3730 * fileio.c (Vauto_save_list_file_name): Doc fix.
3732 2012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
3734 * w32fns.c: Remove prototype of atof.
3735 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
3737 (file_dialog_callback): Make it UINT_PTR.
3739 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
3742 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
3743 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
3746 2012-12-03 Glenn Morris <rgm@gnu.org>
3748 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
3750 2012-12-02 Paul Eggert <eggert@cs.ucla.edu>
3752 Fix xpalloc confusion after memory is exhausted.
3753 * alloc.c (xpalloc): Comment fix.
3754 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
3755 and signals an error, do not clear charset_table_size, as
3756 charset_table is still valid.
3757 * doprnt.c (evxprintf): Clear *BUF after freeing it.
3759 Use execve to avoid need to munge environ (Bug#13054).
3760 * callproc.c (Fcall_process):
3761 * process.c (create_process):
3762 Don't save and restore environ; no longer needed.
3763 * callproc.c (child_setup):
3764 Use execve, not execvp, to preserve environ.
3766 2012-12-01 Paul Eggert <eggert@cs.ucla.edu>
3768 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
3770 2012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3772 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
3773 display for sliced images (Bug#10500).
3775 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
3777 2012-11-30 Juanma Barranquero <lekktu@gmail.com>
3779 * doc.c (Fdocumentation): Re-add handling of function-documentation,
3780 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
3782 2012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
3784 * xdisp.c (window_outdated): Remove eassert since it hits
3785 some suspicious corner cases (see Bug#13007 and Bug#13012).
3786 (mode_line_update_needed): New function.
3787 (redisplay_internal, redisplay_window): Use it.
3788 (ensure_selected_frame): New function.
3789 (redisplay_internal, unwind_redisplay): Use it.
3790 (redisplay_internal): Move comment about buffer_shared...
3791 (buffer_shared_and_changed): ...near to its real use.
3793 2012-11-29 Paul Eggert <eggert@cs.ucla.edu>
3795 * callproc.c (Fcall_process): Don't misreport vfork failure.
3797 2012-11-28 Paul Eggert <eggert@cs.ucla.edu>
3799 * callproc.c (Fcall_process): Fix vfork portability problems.
3800 Do not assume that fd[0], count, filefd, and save_environ survive
3801 vfork. Fix bug whereby wrong errno value could be reported for
3802 pipe failure. Some minor cleanups, too, as follows. Move buf and
3803 bufsize to the context where they're needed. Change new_argv to
3804 be of type char **, as this is more convenient and avoids casts.
3805 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
3806 Now local constants, not macros.
3808 2012-11-18 Kenichi Handa <handa@gnu.org>
3810 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
3811 for the variable "f".
3813 2012-11-13 Kenichi Handa <handa@gnu.org>
3815 * font.c (font_unparse_xlfd): Exclude special characters from the
3816 generating XLFD name.
3818 2012-11-27 Paul Eggert <eggert@cs.ucla.edu>
3820 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
3821 * dired.c (stat_uname, stat_gname):
3822 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
3824 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
3825 * dired.c (directory_files_internal, file_name_completion):
3826 Assume EAGAIN and EINTR are defined.
3828 * fileio.c (Fcopy_file): Assume EISDIR is defined.
3829 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
3830 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
3831 * lread.c (readbyte_from_file): Assume EINTR is defined.
3832 * process.c (wait_reading_process_output, send_process) [subprocesses]:
3833 Assume EIO and EAGAIN are defined.
3834 * unexcoff.c (write_segment): Assume EFAULT is defined.
3836 2012-11-27 Eli Zaretskii <eliz@gnu.org>
3838 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
3841 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
3842 highlighting on the frame was cleared. Prevents assertion
3843 violations when repeatedly clicking on the "Top" link of the
3844 "bread-crumbs" in Info buffers.
3846 2012-11-25 Paul Eggert <eggert@cs.ucla.edu>
3848 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
3850 2012-11-24 Ken Brown <kbrown@cornell.edu>
3852 * keyboard.c (HAVE_MOUSE):
3853 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
3854 were always defined.
3856 2012-11-24 Eli Zaretskii <eliz@gnu.org>
3858 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
3859 between bpos_covered and bpos_max. This fixes cursor display when
3860 several display strings follow each other.
3862 * .gdbinit (pgx): If the glyph's object is a string, display the
3863 pointer to string data, rather than the value of the string object
3864 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
3866 * indent.c (Fvertical_motion): If the starting position is covered
3867 by a display string, return to one position before that, to avoid
3868 overshooting it inside move_it_to. (Bug#12930)
3870 2012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
3872 * frame.h (struct frame): Remove display_preempted member
3873 since all users are dead long ago.
3874 * nsterm.h (struct x_output): Use the only dummy member.
3875 * w32menu.c (pending_menu_activation): Remove since not
3877 (set_frame_menubar): Adjust user.
3878 * w32term.h (struct x_output): Drop outdated #if 0 code.
3879 (struct w32_output): Use bitfields for explicit_parent,
3880 asked_for_visible and menubar_active members.
3881 Drop unused pending_menu_activation member.
3882 * xterm.h (struct x_output): Drop outdated #if 0 code.
3883 Use bitfields for explicit_parent, asked_for_visible,
3884 has_been_visible and net_wm_state_hidden_seen members.
3886 2012-11-23 Eli Zaretskii <eliz@gnu.org>
3888 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
3889 of a literal "/". (Bug#12955)
3890 (gl-stamp): Invoke fc.exe directly, not through cmd.
3892 2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
3894 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
3895 * dired.c: Assume HAVE_DIRENT_H.
3896 (NAMLEN): Remove, replacing with ...
3897 (dirent_namelen): New function. All uses changed. Use the GNU macro
3898 _D_EXACT_NAMELEN if available, as it's faster than strlen.
3899 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
3900 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
3901 * makefile.w32-in (DIR_H): Remove. All uses replaced with
3903 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
3904 * ndir.h: Rename to ../nt/inc/dirent.h.
3905 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
3906 Do not include <dirent.h>; no longer needed.
3907 * w32.c: Include <dirent.h> rather than "ndir.h".
3909 2012-11-23 Chong Yidong <cyd@gnu.org>
3911 * xftfont.c (xftfont_open): Remove duplicate assignment.
3913 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3915 * alloc.c (Fgarbage_collect): Unblock input after clearing
3916 gc_in_progress to avoid note_mouse_highlight glitch with GC.
3917 * frame.h (FRAME_MOUSE_UPDATE): New macro.
3918 * msdos.c (IT_frame_up_to_date): Use it here...
3919 * w32term.c (w32_frame_up_to_date): ...here...
3920 * xterm.c (XTframe_up_to_date): ...and here...
3921 * nsterm.m (ns_frame_up_to_date): ...but not here.
3922 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
3924 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
3925 Do not check whether GC is in progress.
3927 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3929 * xdisp.c (window_buffer_changed): New function.
3930 (update_menu_bar, update_tool_bar): Use it to
3931 simplify large 'if' statements.
3932 (redisplay_internal): Generalize commonly used
3933 'tail' and 'frame' local variables.
3935 2012-11-22 Eli Zaretskii <eliz@gnu.org>
3937 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
3938 with Windows system header.
3940 2012-11-21 Paul Eggert <eggert@cs.ucla.edu>
3942 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
3943 * alloc.c: Assume unistd.h exists.
3944 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
3945 * sysdep.c (get_current_dir_name): Assume getcwd exists.
3946 (getwd) [USG]: Remove; no longer needed.
3947 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
3948 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
3949 * w32.h (getcwd): Remove decl.
3951 2012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
3953 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
3954 Make it set selected_window as well.
3955 (update_tool_bar): Use it.
3957 2012-11-21 Ken Brown <kbrown@cornell.edu>
3959 * emacs.c (main): Set the G_SLICE environment variable for all
3960 Cygwin builds, not just GTK builds. See
3961 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
3963 2012-11-21 Eli Zaretskii <eliz@gnu.org>
3965 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
3966 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
3967 Define for the MSVC compiler.
3969 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
3971 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
3972 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
3973 dostounix_filename. Prevents crashes down the road, because
3974 dostounix_filename assumes it gets a unibyte string.
3975 Reported by Michel de Ruiter <michel@sentient.nl>, see
3976 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
3978 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
3980 Conflate Qnil and Qunbound for `symbol-function'.
3981 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
3982 * lread.c (init_obarray): Set `function' fields to Qnil.
3983 * eval.c (Fcommandp): Ignore Qunbound.
3984 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
3985 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
3986 Test NILP rather than Qunbound.
3987 (Ffmakunbound): Set to Qnil.
3988 (Fsymbol_function): Never signal an error.
3989 (Finteractive_form): Ignore Qunbound.
3991 2012-11-20 Paul Eggert <eggert@cs.ucla.edu>
3993 * eval.c (interactive_p): Remove no-longer-used decl.
3995 2012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
3997 * xdisp.c (buffer_shared): Adjust comment.
3998 (buffer_shared_and_changed): New function.
3999 (prepare_menu_bars, redisplay_internal): Use it to
4000 decide whether all windows or frames should be updated.
4001 (window_outdated): New function.
4002 (text_outside_line_unchanged_p, redisplay_window): Use it.
4003 (redisplay_internal): Likewise. Fix indentation.
4005 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
4007 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
4008 (syms_of_eval): Remove corresponding defsubr.
4009 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
4011 2012-11-19 Daniel Colascione <dancol@dancol.org>
4013 * w32fns.c (Fx_file_dialog):
4014 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
4015 cygwin_convert_file_name*.
4017 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
4018 Rename cygwin_convert_path* to cygwin_convert_file_name*.
4020 2012-11-18 Paul Eggert <eggert@cs.ucla.edu>
4022 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
4024 2012-11-18 Eli Zaretskii <eliz@gnu.org>
4026 * w32select.c: Include w32common.h before w32term.h, so that
4027 windows.h gets included before w32term.h uses some of its
4028 features, see below.
4030 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
4032 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
4034 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
4036 2012-11-18 Jan Djärv <jan.h.d@swipnet.se>
4038 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
4039 (ns_select): Return at once if events are held (Bug#12834).
4041 2012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
4043 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
4044 Needed following 2012-10-20 change. (Bug#12902)
4046 2012-11-18 Juanma Barranquero <lekktu@gmail.com>
4048 * w32proc.c (waitpid): Remove unused label get_result.
4050 2012-11-17 Juanma Barranquero <lekktu@gmail.com>
4052 * makefile.w32-in (SYSWAIT_H): New macro.
4053 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
4054 ($(BLD)/sysdep.$(O)): Update dependencies.
4056 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
4058 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
4059 * callproc.c (relocate_fd): Assume F_DUPFD.
4060 * emacs.c, term.c (O_RDWR): Remove.
4061 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
4062 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
4063 * nsterm.m: Assume <fcntl.h> exists.
4064 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
4065 (create_pty, Fmake_network_process, server_accept_connection)
4066 (wait_reading_process_output, init_process_emacs):
4068 (wait_reading_process_output): Put in a special case for WINDOWSNT
4069 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
4070 It's not clear this is needed, but it's a more-conservative change.
4071 (create_process): Assume FD_CLOEXEC.
4072 (create_process, create_pty): Assume O_NOCTTY.
4073 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
4074 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
4075 Omit if not DOS_NT, since F_GETFL is not defined there.
4076 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
4077 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
4079 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
4080 lack it, since gnulib guarantees this.
4081 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
4083 2012-11-17 Eli Zaretskii <eliz@gnu.org>
4085 * w32.c (faccessat): Pretend that directories have the execute bit
4086 set. Emacs expects that, e.g., in files.el:cd-absolute.
4088 * w32proc.c (create_child): Don't clip the PID of the child
4089 process to fit into an Emacs integer, as this is no longer a
4091 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
4092 reaping only the process specified by PID argument, if that is
4093 positive. Use PID instead of dead_child to know which process to
4094 reap. Wait for the child to die only if WNOHANG is not in
4096 (sys_select): Don't set dead_child.
4098 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
4099 as it is no longer needed.
4101 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
4103 (record_child_status_change): Remove the setting of
4104 record_at_most_one_child for the !WNOHANG case.
4106 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
4108 Fix problems in ns port found by static checking.
4109 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
4110 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
4111 not to process group.
4112 (ns_select): Use emacs_write, not write, as that's more robust
4113 in the presence of signals.
4114 (fd_handler:): Check for read errors.
4116 2012-11-16 Glenn Morris <rgm@gnu.org>
4118 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
4120 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
4122 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
4124 2012-11-16 Eli Zaretskii <eliz@gnu.org>
4126 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
4127 use the same value of thread handle.
4128 (start_timer_thread): If the timer thread exited (due to error),
4129 clean up by closing the two handles it used. Duplicate the caller
4130 thread's handle here, so it gets duplicated only once, when
4131 launching the timer thread. Set priority of the timer thread, not
4133 (getitimer): Don't duplicate the caller thread's handle here.
4136 2012-11-16 Jan Djärv <jan.h.d@swipnet.se>
4138 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
4141 2012-11-16 Paul Eggert <eggert@cs.ucla.edu>
4143 Remove no-longer-used pty_max_bytes variable.
4144 * process.c (pty_max_bytes): Remove; unused.
4145 (send_process): Do not set it.
4147 2012-11-15 Juanma Barranquero <lekktu@gmail.com>
4149 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
4150 Update dependencies.
4152 2012-11-15 Paul Eggert <eggert@cs.ucla.edu>
4154 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
4155 This follows up on the 2012-09-29 patch that removed indirection
4156 for the 'function' field. Reported by Sergey Vinokurov in
4157 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
4159 2012-11-14 Eli Zaretskii <eliz@gnu.org>
4161 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
4162 different name, as the MS runtime does not have such a function,
4163 and probably never will.) All callers changed. Ignore DIRFD
4164 value if PATH is an absolute file name, to match Posix spec
4165 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
4168 2012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
4170 * xdisp.c (echo_area_display, redisplay_internal):
4171 Omit redundant check whether frame_garbaged is set.
4173 2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
4175 Use faccessat, not access, when checking file permissions (Bug#12632).
4176 This fixes a bug that has been present in Emacs since its creation.
4177 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
4178 which must set some sort of record. (Torek's bug report was against
4179 a predecessor of GNU Emacs, but GNU Emacs happened to have the
4180 same common flaw.) See Torek's Usenet posting
4181 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
4182 Posted: Fri Apr 8 14:18:56 1983.
4183 * Makefile.in (LIB_EACCESS): New macro.
4185 * callproc.c (init_callproc):
4186 * charset.c (init_charset):
4187 * fileio.c (check_existing, check_executable, check_writable)
4189 * lread.c (openp, load_path_check):
4190 * process.c (allocate_pty):
4192 Use effective UID when checking permissions, not real UID.
4193 * callproc.c (init_callproc):
4194 * charset.c (init_charset):
4195 * lread.c (load_path_check, init_lread):
4196 Test whether directories are accessible, not merely whether they exist.
4197 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
4198 * fileio.c (check_existing, check_executable, check_writable)
4200 Use symbolic names instead of integers for the flags, as they're
4202 (check_writable): New arg AMODE. All uses changed.
4203 Set errno on failure.
4204 (Ffile_readable_p): Use faccessat, not stat + open + close.
4205 (Ffile_writable_p): No need to call check_existing + check_writable.
4206 Just call check_writable and then look at errno. This saves a syscall.
4207 dir should never be nil; replace an unnecessary runtime check
4208 with an eassert. When checking the parent directory of a nonexistent
4209 file, check that the directory is searchable as well as writable, as
4210 we can't create files in unsearchable directories.
4211 (file_directory_p): New function, which uses 'stat' on most platforms
4212 but faccessat with D_OK (for efficiency) if WINDOWSNT.
4213 (Ffile_directory_p, Fset_file_times): Use it.
4214 (file_accessible_directory_p): New function, which uses a single
4215 syscall for efficiency.
4216 (Ffile_accessible_directory_p): Use it.
4217 * xrdb.c (file_p): Use file_directory_p.
4218 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
4219 * lread.c (openp): When opening a file, use fstat rather than
4220 stat, as that avoids a permissions race. When not opening a file,
4221 use file_directory_p rather than stat.
4222 (dir_warning): First arg is now a usage string, not a format.
4223 Use errno. All uses changed.
4224 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
4225 that merely introduced a race.
4226 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
4227 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
4228 and similarly for the other O_* flags.
4229 * w32.c (sys_faccessat): Rename from sys_access and switch to
4230 faccessat's API. All uses changed.
4231 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
4232 (magic_db): Rename from magic_file_p.
4233 (magic_db, search_magic_path): Return an XrmDatabase rather than a
4234 char *, so that we don't have to test for file existence
4235 separately from opening the file for reading. This removes a race
4236 fixes a permission-checking problem, and simplifies the code.
4238 (file_p): Remove; no longer needed.
4240 2012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
4242 Omit glyphs initialization at startup.
4243 * dispnew.c (glyphs_initialized_initially_p): Remove.
4244 (adjust_frame_glyphs_initially): Likewise. Adjust users.
4245 (Fredraw_frame): Move actual code from here...
4246 (redraw_frame): ...to here. Add eassert. Adjust comment.
4247 (Fredraw_display): Use redraw_frame.
4248 * xdisp.c (clear_garbaged_frames): Likewise.
4250 2012-11-13 Eli Zaretskii <eliz@gnu.org>
4252 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
4253 passed to pint2str and pint2hrstr to be at most the size of the
4254 frame's decode_mode_spec_buffer. This avoids crashes with very
4255 large values of FIELD_WIDTH argument to decode_mode_spec.
4258 2012-11-13 Paul Eggert <eggert@cs.ucla.edu>
4260 Fix a race with verify-visited-file-modtime (Bug#12863).
4261 Since at least 1991 Emacs has ignored an mtime difference of no
4262 more than one second, but my guess is that this was to work around
4263 file system bugs that were fixed long ago. Since the race is
4264 causing problems now, let's remove that code.
4265 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
4266 whose time stamp is off by no more than a second. Insist that the
4267 file time stamps match exactly.
4269 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4271 * frame.h (struct frame): Convert external_tool_bar member to
4272 1-bit unsigned bitfield.
4273 * termhooks.h (struct terminal): Remove mouse_moved member since
4274 all users are long dead. Adjust comment on mouse_position_hook.
4276 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4278 Simplify by using FOR_EACH_FRAME here and there.
4279 * frame.c (next_frame, prev_frame, other_visible_frames)
4280 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
4281 * w32term.c (x_window_to_scroll_bar): Likewise.
4282 * window.c (window_list): Likewise.
4283 * xdisp.c (x_consider_frame_title): Likewise.
4284 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
4285 * xfns.c (x_window_to_frame, x_any_window_to_frame)
4286 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
4287 * xmenu.c (menubar_id_to_frame): Likewise.
4288 * xselect.c (frame_for_x_selection): Likewise.
4289 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
4290 (x_window_to_menu_bar): Likewise.
4291 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
4293 2012-11-12 Paul Eggert <eggert@cs.ucla.edu>
4295 * data.c (Qdefalias_fset_function): Now static.
4297 Another tweak to vectorlike_header change.
4298 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
4299 Remove, and replace all uses with ...
4300 (next_in_free_list, set_next_in_free_list):
4301 New functions, which respect C's aliasing rules better.
4303 2012-11-11 Paul Eggert <eggert@cs.ucla.edu>
4305 * window.c (list4i): Rename from 'quad'. All uses changed.
4306 Needed because <sys/types.h> defines 'quad' on Solaris 10.
4308 2012-11-11 Juanma Barranquero <lekktu@gmail.com>
4310 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
4311 warning about mixing declarations and code in ISO C90.
4313 2012-11-10 Martin Rudalics <rudalics@gmx.at>
4315 * window.c (Fsplit_window_internal): Set combination limit of
4316 new parent window to t iff Vwindow_combination_limit is t;
4317 fixing a regression introduced with the change from 2012-09-22.
4318 (Fset_window_combination_limit): Fix doc-string.
4320 2012-11-10 Eli Zaretskii <eliz@gnu.org>
4322 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
4323 amount when the scroll margins are too large. When scrolling
4324 backwards in the buffer, give up if cannot reach point or the
4325 scroll margin within a reasonable number of screen lines.
4326 Fixes point position in window under scroll-up/down-aggressively when
4327 point is positioned many lines beyond the window top/bottom.
4330 * ralloc.c (relinquish): If real_morecore fails to return memory
4331 to the system, don't crash; instead, leave the last heap
4332 unchanged and return. (Bug#12774)
4334 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4336 * lisp.h (AUTOLOADP): New macro.
4337 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
4338 * data.c (Ffset): Remove special ad-advice-info handling.
4339 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
4341 (Finteractive_form): Simplify.
4342 (Fquo): Don't insist on having at least 2 arguments.
4343 (Qdefalias_fset_function): New var.
4345 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4347 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
4349 * nsfont.m (Qcondensed, Qexpanded): New variables.
4350 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
4351 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
4353 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4355 Fix recently introduced crash on MS-Windows (Bug#12839).
4356 * w32term.h (struct scroll_bar): Use convenient header.
4357 (SCROLL_BAR_VEC_SIZE): Remove.
4358 * w32term.c (x_scroll_bar_create): Use VECSIZE.
4360 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4362 Tweak last vectorlike_header change.
4363 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
4364 vectorlike object on the free list. This is introduced to avoid
4365 some (but not all) pointer casting and aliasing problems, see
4366 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
4367 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
4369 (xvectype, xvecsize): Use them to examine Lisp_Object values.
4371 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4373 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
4374 been removed, so remove them here also.
4376 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4378 * doc.c (Fdocumentation): Handle new property
4379 dynamic-docstring-function to replace the old ad-advice-info.
4381 2012-11-09 Paul Eggert <eggert@cs.ucla.edu>
4383 * fns.c (Qeql, hashtest_eq): Now static.
4385 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4387 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
4388 * fns.c (hashfn_eq, hashfn_eql, sxhash):
4389 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
4390 * buffer.c (compare_overlays): Use XLI rather than XHASH.
4392 2012-11-08 Paul Eggert <eggert@cs.ucla.edu>
4394 Use same hash function for hashfn_profiler as for hash_string etc.
4395 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
4396 * lisp.h (sxhash_combine): New inline function, with the contents
4397 of the old SXHASH_COMBINE.
4398 * profiler.c (hashfn_profiler): Use it, instead of having a
4399 special hash function containing a comparison that always yields 1.
4401 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4403 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
4404 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
4405 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
4408 2012-11-08 Jan Djärv <jan.h.d@swipnet.se>
4410 * image.c (xpm_make_color_table_h): Fix compiler error because
4411 make_hash_table changed.
4413 2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
4415 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
4417 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4419 Use ad-hoc comparison function for the profiler's hash-tables.
4420 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
4421 (make_log): Use them.
4422 (handle_profiler_signal): Don't inhibit quit any longer since we don't
4423 call Fequal any more.
4424 (Ffunction_equal): New function.
4425 (cmpfn_profiler, hashfn_profiler): New functions.
4426 (syms_of_profiler): Initialize them.
4427 * lisp.h (struct hash_table_test): New struct.
4428 (struct Lisp_Hash_Table): Use it.
4429 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
4430 * fns.c (make_hash_table): Take a struct to describe the test.
4431 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
4432 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
4433 (hash_lookup, hash_remove_from_table): Move assertion checking of
4434 hashfn result here. Check hash-equality before calling cmpfn.
4435 (Fmake_hash_table): Adjust call to make_hash_table.
4436 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
4437 (syms_of_fns): Initialize them.
4438 * emacs.c (main): Move syms_of_fns earlier.
4439 * xterm.c (syms_of_xterm):
4440 * category.c (hash_get_category_set): Adjust call to make_hash_table.
4441 * print.c (print_object): Adjust to new hash-table struct.
4442 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
4444 2012-11-08 Eli Zaretskii <eliz@gnu.org>
4446 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
4447 value of w32-scroll-lock-modifier is neither nil nor one of the
4448 known key modifiers. (Bug#12806)
4450 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4452 Shrink struct vectorlike_header to the only size field.
4453 * lisp.h (enum pvec_type): Avoid explicit enum member values.
4455 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
4456 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
4457 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
4458 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
4459 information from the vector header. Adjust comment.
4460 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
4461 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
4463 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
4464 (struct vectorlike_header): Remove next member. Adjust comment.
4465 (struct Lisp_Subr): Add convenient header. Adjust comment.
4466 (allocate_pseudovector): Adjust prototype.
4467 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
4468 (sweep_string, lisp_malloc): Remove useless prototypes.
4469 (enum mem_type): Adjust comment.
4470 (NEXT_IN_FREE_LIST): New macro.
4471 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
4472 (Fmake_bool_vector): Likewise.
4473 (struct large_vector): New type to represent allocation unit for
4474 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
4475 (large_vectors): Change type to struct large_vector.
4476 (allocate_vector_from_block): Simplify.
4477 (PSEUDOVECTOR_NBYTES): Replace with...
4478 (vector_nbytes): ...new function. Adjust users.
4479 (sweep_vectors): Adjust processing of large vectors.
4480 (allocate_vectorlike): Likewise.
4481 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
4482 Add easserts. Adjust XSETPVECTYPESIZE usage.
4483 (allocate_buffer): Use BUFFER_PVEC_INIT.
4484 (live_vector_p): Adjust to match large vector.
4485 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
4486 * buffer.h (struct buffer): Add next member.
4487 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
4489 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
4490 * fns.c (internal_equal): Adjust to match enum pvec_type change.
4491 (copy_hash_table): Adjust to match vector header change.
4492 * lread.c (defsubr): Use XSETPVECTYPE.
4493 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
4494 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
4495 (xvecsize): New command.
4497 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4499 * keyboard.c (event_to_kboard): Do not dereference
4500 frame_or_window field of SELECTION_REQUEST_EVENT
4501 and SELECTION_CLEAR_EVENT events (Bug#12814).
4502 * xterm.h (struct selection_input_event): Adjust comment.
4504 2012-11-07 Eli Zaretskii <eliz@gnu.org>
4506 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
4507 such as Scroll Lock, if the respective keys are treated as
4508 function keys, not as modifiers. This avoids destroying non-ASCII
4509 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
4511 2012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
4513 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
4515 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4517 Restore some duplicate definitions (Bug#12814).
4518 This undoes part of the 2012-11-03 changes. Some people build
4519 with plain -g rather than with -g3, and they need the duplicate
4520 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
4521 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
4522 Define as macros, as well as as enums or as constants.
4524 2012-11-06 Jan Djärv <jan.h.d@swipnet.se>
4526 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
4527 to keypad keys (Bug#12816).
4529 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4531 Minor adjustments of recently-changed frame functions.
4532 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
4533 known to be a frame (we're in the FRAMEP branch).
4534 * lisp.h (Qframep): Remove decl. frame.h declares this.
4535 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
4536 since they're meant for Lisp fixnum values.
4538 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4540 * window.c (Fwindow_combination_limit): Revert to the only
4541 required argument and adjust docstring as suggested in
4542 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
4543 by Martin Rudalics <rudalics@gmx.at>.
4545 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4547 Widely used frame validity and checking functions.
4548 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
4549 * frame.c (decode_live_frame, decode_any_frame): New functions.
4550 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
4551 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
4552 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
4553 (Fframe_pointer_visible_p): Use decode_any_frame.
4554 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
4555 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
4556 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
4557 (Fframe_focus): Likewise. Allow zero number of arguments.
4559 (frame_buffer_list, frame_buffer_predicate): Remove.
4560 * lisp.h (frame_buffer_predicate): Remove prototype.
4561 * buffer.c (Fother_buffer): Use decode_any_frame.
4562 * xdisp.c (Ftool_bar_lines_needed): Likewise.
4563 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
4564 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
4565 (Fclose_font, Ffont_info): Use decode_live_frame.
4566 * fontset.c (check_fontset_name): Likewise.
4567 * terminal.c (Fframe_terminal): Likewise.
4568 * w32fns.c (check_x_frame): Likewise.
4569 * window.c (Fminibuffer_window, Fwindow_at)
4570 (Fcurrent_window_configuration): Likewise.
4571 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
4572 Likewise. Allow zero number of arguments. Adjust docstring.
4573 * dispnew.c (Fredraw_frame): Likewise.
4574 * xfaces.c (frame_or_selected_frame): Remove.
4575 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
4576 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
4577 (Fframe_face_alist): Use decode_live_frame.
4578 * xfns.c (check_x_frame): Likewise.
4580 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4582 * window.c (quad): New function.
4583 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
4584 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
4585 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
4586 (Fwindow_line_height): Use it.
4587 (Fwindow_fringes): Use list3.
4588 (Fwindow_scroll_bars): Use list4.
4589 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
4590 (Fwindow_combination_limit): Allow zero number of arguments.
4592 2012-11-05 Eli Zaretskii <eliz@gnu.org>
4594 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
4596 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
4597 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
4598 file descriptor 2 for standard error. (Bug#12805)
4600 2012-11-05 Chong Yidong <cyd@gnu.org>
4602 * process.c (wait_reading_process_output): Revert previous change.
4604 2012-11-05 Paul Eggert <eggert@cs.ucla.edu>
4606 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
4607 This removes code that has been obsolete since around 1990.
4608 * callproc.c (Fcall_process):
4610 * process.c (create_process):
4611 * term.c (dissociate_if_controlling_tty):
4612 Assume setsid exists.
4613 * callproc.c (child_setup): Assume setpgid exists and behaves as
4614 per POSIX.1-1988 or later.
4615 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
4616 * emacs.c (shut_down_emacs):
4617 * sysdep.c (sys_suspend, init_foreground_group):
4618 Assume getpgrp behaves as per POSIX.1-1998 or later.
4619 * msdos.c (setpgrp): Remove.
4620 (tcgetpgrp, setpgid, setsid): New functions.
4621 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
4622 * term.c (no_controlling_tty): Remove; unused.
4623 * w32proc.c (setpgrp): Remove.
4624 (setsid, tcgetpgrp): New functions.
4626 Simplify by assuming __fpending.
4627 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
4628 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
4629 Do not assume that __fpending's result fits in int.
4631 2012-11-04 Paul Eggert <eggert@cs.ucla.edu>
4633 Remove EMACS_OUTQSIZE+sleep hack.
4634 * dispnew.c (update_frame_1): Remove hack for terminals slower
4635 than 2400 bps, which throttled Emacs by having it sleep.
4636 This code hasn't worked since at least 2007, when the multi-tty stuff
4637 was added, and anyway those old terminals are long dead.
4638 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
4639 without the dispnew.c change, as dispnew.c doesn't include systty.h.
4641 Fix data-loss with --version (Bug#9574).
4642 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
4643 as we can't assume that emacs_strerror is initialized, and strerror
4644 is good enough here.
4645 (main): Invoke atexit earlier, to catch earlier instances of
4646 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
4648 2012-11-04 Michael Marchionna <tralfaz@pacbell.net>
4650 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
4651 (keyDown): Remap keypad keys to X11 virtual key codes.
4653 2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
4655 Fix data-loss with --batch (Bug#9574).
4656 * emacs.c: Include <close-stream.h>.
4657 (close_output_streams): New function.
4658 (main): Pass it to atexit, so that Emacs closes stdout and stderr
4659 and handles errors appropriately.
4660 (Fkill_emacs): Don't worry about flushing, as close_output_stream
4663 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
4664 The symptom is a diagnostic "GLib-WARNING **: In call to
4665 g_spawn_sync(), exit status of a child process was requested but
4666 SIGCHLD action was set to SIG_IGN and ECHILD was received by
4667 waitpid(), so exit status can't be returned." The diagnostic
4668 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
4669 The real bug is a race condition between Emacs and glib: Emacs
4670 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
4671 so that glib can't find it. Work around the bug by invoking
4672 waitpid only on subprocesses that Emacs itself creates.
4673 * process.c (create_process, record_child_status_change):
4674 Don't use special value -1 in pid field, as the caller now must
4675 know the pid rather than having the callee infer it.
4676 The inference was sometimes incorrect anyway, due to another race.
4677 (create_process): Set new 'alive' member if child is created.
4678 (process_status_retrieved): New function.
4679 (record_child_status_change): Use it.
4680 Accept negative 1st argument, which means to wait for the
4681 processes that Emacs already knows about. Move special-case code
4682 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
4683 processes that have already been waited for, by testing and
4684 clearing new 'alive' member.
4685 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
4686 now does this internally.
4687 (handle_child_signal): Let record_child_status_change do all
4688 the work, since we do not want to reap all exited child processes,
4689 only the child processes that Emacs itself created.
4690 * process.h (Lisp_Process): New boolean member 'alive'.
4692 Omit duplicate definitions no longer needed with gcc -g3.
4693 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
4694 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
4695 Define only as macros. There's no longer any need to also define
4696 these symbols as enums or as constants, since we now assume
4697 gcc -g3 when debugging.
4699 2012-11-03 Eli Zaretskii <eliz@gnu.org>
4701 * lisp.mk: Adjust comments to the fact that term/internal is now
4702 loaded from loadup.el.
4704 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
4705 (msdos_fatal_signal): New function.
4706 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
4709 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
4710 for GCC versions before 4.
4711 (emacs_raise): Define to call msdos_fatal_signal.
4713 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
4714 iterator when starting in the middle of a display or overlay
4717 2012-11-03 Chong Yidong <cyd@gnu.org>
4719 * process.c (wait_reading_process_output): Clean up the last
4722 2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
4724 * process.c (wait_reading_process_output): Avoid a race condition
4725 with SIGIO delivery (Bug#11536).
4727 2012-11-03 Chong Yidong <cyd@gnu.org>
4729 * buffer.c (cursor_type): Untabify docstring.
4731 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4733 * frame.h (struct frame): Drop can_have_scroll_bars member
4734 which is meaningless for a long time. Adjust comments.
4735 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
4736 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
4738 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4740 * window.c (decode_next_window_args): Update window arg after
4741 calling decode_live_window and so fix crash reported at
4742 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
4743 by Juanma Barranquero <lekktu@gmail.com>.
4744 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
4745 * font.c (Ffont_at): Likewise.
4747 2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
4749 * widget.c (resize_cb): New function.
4750 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
4751 (EmacsFrameResize): Check if all is up to date before changing frame
4754 2012-11-02 Eli Zaretskii <eliz@gnu.org>
4756 Implement backtrace output for fatal errors on MS-Windows.
4757 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
4758 (BACKTRACE_LIMIT_MAX): New macro.
4759 (w32_backtrace): New function.
4760 (emacs_abort): Use w32_backtrace when the user chooses not to
4761 attach a debugger. Update the text of the abort dialog.
4763 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4765 Window-related stuff cleanup here and there.
4766 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
4767 Use decode_any_window.
4768 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
4769 * xdisp.c (Fformat_mode_line): Likewise.
4770 * font.c (Ffont_at): Use decode_live_window.
4771 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
4772 * window.c (decode_next_window_args): Likewise.
4773 (decode_any_window): Remove static.
4774 * window.h (decode_any_window): Add prototype.
4775 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
4776 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
4779 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4781 Remove pad from struct input_event.
4782 * termhooks.h (struct input_event): Remove padding field.
4784 * keyboard.c (event_to_kboard): Simplify because frame_or_window
4785 member is never cons for a long time. Adjust comment.
4786 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
4787 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
4788 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
4789 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
4791 2012-11-01 Eli Zaretskii <eliz@gnu.org>
4793 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
4795 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
4797 Fix crash when using Emacs as commit editor for git (Bug#12697).
4798 * callproc.c (setpgrp): Remove macro, as we now use setpgid
4799 and it is configured in conf_post.h.
4800 (Fcall_process): Don't invoke both setsid and setpgid; the former
4801 is enough, if it exists.
4802 * callproc.c (Fcall_process, child_setup):
4803 * process.c (create_process): Use setpgid.
4804 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
4806 * dispnew.c (init_display): Initialize the foreground group
4807 if we are running a tty display.
4808 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
4809 * lisp.h (init_foreground_group): New decl.
4810 * sysdep.c (inherited_pgroup): New static var.
4811 (init_foreground_group, tcsetpgrp_without_stopping)
4812 (narrow_foreground_group, widen_foreground_group): New functions.
4813 (init_sys_modes): Narrow foreground group.
4814 (reset_sys_modes): Widen foreground group.
4816 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
4818 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
4820 2012-10-31 Martin Rudalics <rudalics@gmx.at>
4822 * minibuf.c (read_minibuf): Restore current buffer since
4823 choose_minibuf_frame calling Fset_frame_selected_window may
4824 change it (Bug#12766).
4826 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
4828 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
4830 2012-10-30 Kenichi Handa <handa@gnu.org>
4832 * font.c (Ffont_at): If WINDOW is specified and it is not
4833 displaying the current buffer, signal an error.
4835 2012-10-29 Daniel Colascione <dancol@dancol.org>
4837 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
4838 In preparation for fixing bug#12739, move these functions from
4841 * coding.h, coding.c: ... to here, and compile them only when
4842 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
4843 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
4845 2012-10-28 Eli Zaretskii <eliz@gnu.org>
4847 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
4848 (timer_loop, getitimer, setitimer): Use it instead of
4849 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
4851 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
4854 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
4856 * nsterm.m (NO_APPDEFINED_DATA): New define.
4857 (last_appdefined_event_data): New variable
4858 (last_appdefined_event): Remove.
4859 (ns_select): Initialize t from last_appdefined_event_data instead
4860 of [last_appdefined_event data1].
4861 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
4862 remove last_appdefined_event (Bug#12698).
4864 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
4866 * frame.c (x_set_font): Catch internal error.
4868 2012-10-27 Eli Zaretskii <eliz@gnu.org>
4870 Avoid overflow in w32 implementation of interval timers.
4871 When possible, for ITIMER_PROF count only times the main thread
4873 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
4874 'volatile ULONGLONG' types. All the other data which was
4875 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
4876 (GetThreadTimes_Proc): New typedef.
4877 (w32_get_timer_time): New function, returns a suitable time value
4879 (timer_loop): Enter critical section when accessing ULONGLONG
4880 values of the itimer_data struct, as these accesses are no longer
4881 atomic. Call 'w32_get_timer_time' instead of 'clock'.
4882 Remove unused variable.
4883 (init_timers): Initialize s_pfn_Get_Thread_Times.
4884 (start_timer_thread): Don't assign itimer->caller_thread here.
4885 (getitimer): Assign itimer->caller_thread here.
4886 (setitimer): Always call getitimer to get the value of ticks_now.
4887 (sys_spawnve): Avoid compiler warning about format mismatch.
4889 2012-10-26 Eli Zaretskii <eliz@gnu.org>
4891 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
4892 mouse movement events if the menu bar is active. This avoids
4893 producing a busy "hour-glass" cursor by Windows if the mouse
4894 pointer is positioned over a tooltip shown for some menu item.
4896 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
4898 Don't assume process IDs fit in int.
4899 * emacs.c (shut_down_emacs) [!DOS_NT]:
4900 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
4901 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
4902 Use pid_t, not int, to store process IDs, as 'int'
4903 is not wide enough on a few platforms (e.g., AIX and IRIX).
4905 2012-10-23 Kenichi Handa <handa@gnu.org>
4907 The following change is to make face-font-rescale-alist work
4908 correctly for non-ASCII fonts.
4910 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
4911 (font_open_for_lface): Handle Vface_font_rescale_alist.
4913 2012-10-23 Chong Yidong <cyd@gnu.org>
4915 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
4917 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
4919 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
4921 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
4923 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
4926 2012-10-21 Glenn Morris <rgm@gnu.org>
4928 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
4930 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
4932 Port to OpenBSD 5.1.
4933 * frame.c (Fmouse_position, Fmouse_pixel_position):
4934 * xdisp.c (produce_stretch_glyph):
4935 Declare local vars only when they're needed.
4936 This is clearer and avoids a warning on OpenBSD about unused vars.
4937 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
4938 This is safer, and avoids OpenBSD warnings about unused vars.
4939 * keyboard.c (record_menu_key): Remove unnecessary decl.
4940 (poll_timer): Define only if POLL_FOR_INPUT is defined.
4941 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
4942 as our definition clashes with OpenBSD's.
4943 * xfaces.c (load_face_colors, check_lface_attrs)
4944 (get_lface_attributes_no_remap, get_lface_attributes)
4945 (lface_fully_specified_p, x_supports_face_attributes_p)
4946 (tty_supports_face_attributes_p, face_fontset, realize_face)
4947 (realize_x_face, realize_tty_face):
4948 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
4949 merely Lisp_Object *. This is more informative and avoids
4950 a warning on OpenBSD about accessing beyond an object's size.
4952 2012-10-20 Chong Yidong <cyd@gnu.org>
4954 * lread.c (Fload): Doc fix (Bug#12592).
4956 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4958 * font.c (Ffont_at): Fix previous change.
4960 2012-10-19 Eli Zaretskii <eliz@gnu.org>
4962 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
4963 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
4966 * alloc.c (NSTATICS): Decrease to 0x800.
4968 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
4970 * fns.c (Fnreverse): Include the problem element when signaling an
4973 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
4975 * nsterm.m (ns_select): Check writefds before call to
4976 FD_ISSET (Bug#12668).
4978 2012-10-18 Daniel Colascione <dancol@dancol.org>
4980 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
4981 (staticpro): If we run out of staticpro slots, die with an
4982 informative error instead of just calling emacs_abort.
4984 2012-10-18 Martin Rudalics <rudalics@gmx.at>
4986 Fix two flaws reported by Dmitry Antipov.
4987 * window.c (Ftemp_output_buffer_show): Remove.
4988 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
4989 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
4991 2012-10-17 Eli Zaretskii <eliz@gnu.org>
4993 * makefile.w32-in ($(BLD)/w32.$(O)):
4994 ($(BLD)/vm-limit.$(O)):
4996 ($(BLD)/unexw32.$(O)):
4997 ($(BLD)/fileio.$(O)):
4998 ($(BLD)/dispnew.$(O)): Update dependencies.
5000 * w32term.h (w32_initialize_display_info, initialize_w32_display):
5003 * w32proc.c: Include ctype.h.
5005 * w32.h (init_environment, check_windows_init_file)
5006 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
5007 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
5008 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
5009 (sys_link): Add prototypes.
5011 * w32.c: Include w32select.h.
5012 (sys_access, e_malloc, sys_select): Add prototypes.
5013 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
5015 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
5017 * unexw32.c: Include lisp.h and w32.h.
5019 * term.c [WINDOWSNT]: Include w32term.h.
5021 * process.c [WINDOWSNT]: Add prototype of sys_select.
5023 * fileio.c [WINDOWSNT]: Include w32.h.
5025 * dispnew.c [WINDOWSNT]: Include w32.h.
5027 * cygw32.c (Fcygwin_convert_path_to_windows)
5028 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
5029 Lisp_Object values. (Bug#12661)
5031 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
5032 to Lisp_Object. (Bug#12661)
5034 2012-10-17 Kenichi Handa <handa@gnu.org>
5036 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
5039 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
5041 * buffer.c (Fkill_buffer): When unchaining the marker,
5042 reset its buffer pointer to NULL (Bug#12652).
5044 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
5046 Do not verify indirection counters of killed buffers (Bug#12579).
5047 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
5048 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
5050 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
5052 * alloc.c (Fmake_byte_code): Fix typo in comment.
5053 * print.c (print_interval): Define as static to match prototype.
5054 * indent.c (disptab_matches_widthtab, recompute_width_table):
5057 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
5059 * editfns.c (get_system_name): Remove.
5060 * lisp.h (get_system_name): Remove prototype.
5061 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
5062 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
5064 2012-10-15 Daniel Colascione <dancol@dancol.org>
5066 * dbusbind.c: Add comment explaining reason for previous change.
5068 2012-10-15 Martin Rudalics <rudalics@gmx.at>
5070 * window.c (Fwindow_end): Rewrite check whether cached position
5071 can be used (Bug#12600).
5072 (resize_frame_windows, grow_mini_window, shrink_mini_window):
5073 Set windows_or_buffers_changed.
5075 2012-10-15 Daniel Colascione <dancol@dancol.org>
5077 * dbusbind.c: Fix cygw32 build break when compiling with dbus
5078 enabled by undefining the symbol "interface", which the platform
5079 headers define to something incompatible.
5081 2012-10-14 Daniel Colascione <dancol@dancol.org>
5083 * image.c (init_tiff_functions, init_imagemagick_functions)
5084 (init_svg_functions): Fix cygw32 build break by using these
5085 functions only when WINDOWSNT _and_ HAVE_NTGUI.
5087 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
5089 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
5091 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
5093 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
5095 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
5097 * coding.c (detect_coding): Set coding->id before calling
5100 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
5102 * fileio.c: Formatting fixes.
5104 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
5106 Fix some stat-related races.
5107 * fileio.c (Fwrite_region): Avoid race condition if a file is
5108 removed or renamed by some other process immediately after Emacs
5109 writes it but before Emacs stats it. Do not assume that stat (or
5111 * image.c (slurp_file): Resolve the file name with fopen + fstat
5112 rather than stat + fopen.
5113 (pbm_read_file) [0]: Remove unused code with stat race.
5114 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
5115 Remove ineffective code with stat race.
5117 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
5119 * doc.c (get_doc_string): Don't signal an error if the file is missing.
5121 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
5123 * nsterm.m (hold_event_q): New static variable.
5124 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
5126 (hold_event): New function.
5127 (ns_read_socket): If hold_event_q have events, store them and
5129 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
5130 is zero (Bug#12384).
5132 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
5134 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
5136 2012-10-12 Eli Zaretskii <eliz@gnu.org>
5138 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
5140 * fileio.c (check_existing): New function.
5141 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
5142 instead of calling 'stat', when what's needed is to check whether
5143 a file exists. This avoids expensive system calls on MS-Windows.
5146 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
5148 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
5149 determine whether a file exists and is not a directory.
5151 * lisp.h (check_existing): Add prototype.
5153 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
5155 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
5157 2012-10-12 Glenn Morris <rgm@gnu.org>
5159 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
5161 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
5163 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
5165 * eval.c (Fautoload): Remember previous autoload status in load-history.
5167 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
5169 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
5170 * lread.c (load_each_byte, new_backquote_flag, readchar)
5171 (read_filtered_event, lisp_file_lexically_bound_p)
5172 (safe_to_load_version, Fload, complete_filename_p, openp)
5173 (build_load_history, readevalloop, read_escape, read1)
5174 (string_to_number, read_vector, read_list):
5175 * macros.c (Fstart_kbd_macro):
5176 * marker.c (CONSIDER):
5177 * menu.c (parse_single_submenu, digest_single_submenu)
5178 (find_and_return_menu_selection, Fx_popup_menu):
5179 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
5181 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
5183 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
5184 (xmenu_show, xdialog_show):
5185 Use bool for booleans.
5186 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
5187 as it's not a predicate. All uses changed. Omit unnecessary
5190 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
5192 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
5193 (save_excursion_restore): Do not restore mark if it was not saved.
5195 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
5197 * marker.c (cached_modiff): EMACS_INT, not int.
5199 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
5200 instead of having a wrong decl.
5201 * nsmenu.m (waiting_for_input): Remove wrong decl.
5203 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5205 keyboard.c, keymap.c: Use bool for booleans.
5206 * dispnew.c (sit_for): Distinguish between 3-way display_option
5207 and boolean do_display.
5208 * keyboard.c (single_kboard, this_command_key_count_reset)
5209 (waiting_for_input, echoing, immediate_quit, input_pending)
5210 (interrupt_input, interrupts_deferred, pop_kboard)
5211 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
5212 (command_loop_1, adjust_point_for_property)
5213 (safe_run_hooks_error, input_polling_used, read_char):
5214 (help_char_p, readable_events, kbd_buffer_events_waiting)
5215 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
5216 (lucid_event_type_list_p, get_input_pending):
5217 (gobble_input, menu_separator_name_p, menu_bar_item)
5218 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
5219 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
5220 (keyremap_step, test_undefined, read_key_sequence)
5221 (detect_input_pending, detect_input_pending_ignore_squeezables)
5222 (detect_input_pending_run_timers, requeued_events_pending_p)
5223 (quit_throw_to_read_char, Fset_input_interrupt_mode):
5224 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
5225 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
5226 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
5227 (accessible_keymaps_1, Fkey_description, push_key_description):
5228 (shadow_lookup, struct where_is_internal_data)
5229 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
5230 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
5231 (describe_map, describe_vector):
5232 * menu.c (single_menu_item):
5233 * nsmenu.m (ns_update_menubar):
5234 * process.c (wait_reading_process_output):
5235 * search.c (scan_buffer, scan_newline):
5236 Use bool for boolean.
5237 * keyboard.c (timers_run, swallow_events)
5238 (detect_input_pending_run_timers):
5239 * process.c (wait_reading_process_output):
5240 Use unsigned for counter where wraparound-on-overflow is desired,
5241 since unsigned is guaranteed to have that behavior and signed is not.
5242 (read_char): Use ptrdiff_t for string length.
5243 (get_input_pending): Remove first argument, since it was always
5244 the same pointer-to-int (now pointer-to-boolean) &input_pending,
5245 and behave as if it had that value. Return new value of
5246 input_pending. All callers changed.
5247 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
5248 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
5250 * keymap.c (push_key_description): Omit last arg, which was always 1.
5251 All callers changed.
5253 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
5255 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
5257 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
5258 ($(BLD)/term.$(O)): Update dependencies.
5260 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5262 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
5263 * lisp.h (enum pvec_type): Adjust comments and omit explicit
5264 initializer for PVEC_NORMAL_VECTOR.
5266 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5268 Clean out old termopts cruft.
5269 * termopts.h (flow_control, meta_key): Remove unused decls.
5270 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
5271 Don't include termopts.h.
5273 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5275 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
5277 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5279 * commands.h (immediate_quit): Remove duplicate decl.
5281 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
5283 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
5285 (nsfont_open): Remove setting of Vfonts_in_cache.
5286 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5288 2012-10-09 Eli Zaretskii <eliz@gnu.org>
5290 * w32fns.c (w32_last_error): Change the return value to DWORD, to
5291 match what GetLastError returns. Explain why the function is
5294 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
5295 'is_tooltip_frame', to avoid confusion with its global namesake.
5297 2012-10-08 Daniel Colascione <dancol@dancol.org>
5299 * xdisp.c (start_hourglass): Call w32_note_current_window when
5300 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
5301 build that caused Emacs to display the hourglass cursor forever.
5303 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
5304 which is broken under remote desktop, calculate the number of
5305 colors available for a display based on the display's number of
5306 planes and number of bits per pixel per plane. (bug#10397).
5308 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
5310 * nsfont.m (Vfonts_in_cache): New variable.
5311 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
5312 are used. Add cached fonts to Vfonts_in_cache.
5313 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
5315 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
5317 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
5319 (FONT_H): Define after FRAME_H.
5320 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
5321 Update dependencies.
5323 * w32term.c: Remove leftover declaration of keyboard_codepage.
5325 2012-10-08 Eli Zaretskii <eliz@gnu.org>
5327 * makefile.w32-in (FONT_H): Add $(FRAME_H).
5328 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
5329 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
5330 (GLOBAL_SOURCES): Add cygw32.c.
5331 ($(BLD)/unexw32.$(O)):
5333 ($(BLD)/w32console.$(O)):
5334 ($(BLD)/w32fns.$(O)):
5335 ($(BLD)/w32heap.$(O)):
5336 ($(BLD)/w32menu.$(O)):
5337 ($(BLD)/w32proc.$(O)): Add w32common.h.
5339 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
5341 (x_to_w32_color): Don't modify the argument, modify a copy instead.
5343 2012-10-08 Daniel Colascione <dancol@dancol.org>
5345 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
5346 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
5347 accidental message numbering hole. Change other messages to
5350 * w32select.h (HAVE_W32SELECT): Remove.
5352 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
5353 w32common.h instead of w32heap.h.
5355 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
5356 (get_allocation_unit, get_processor_type, get_w32_major_version)
5357 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
5358 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
5359 (OS_NT, os_subtype, cache_system_info): Move declarations to
5362 * w32heap.c: Include w32common.h.
5363 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
5364 (w32_minor_version, w32_build_number, w32_subtype):
5365 Remove duplicate definitions.
5367 * w32fns.c: Include w32common.h; include w32heap.h only in
5370 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
5371 Use `report_file_error' instead of `error' in order to better
5372 inform users of what went wrong. Increase NTGUI_UNICODE file
5373 dialog box file name length to 32k, the maximum allowed by the NT
5376 * w32common.h: New file.
5377 (ROUND_UP, ROUND_DOWN, get_page_size)
5378 (get_allocation_unit, get_processor_type, get_w32_major_version)
5379 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
5380 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
5381 (OS_NT, os_subtype, cache_system_info): Move here.
5383 * unexw32.c, unexcw.c: Include w32common.h.
5385 * emacs.c (main): Use (defined (WINDOWSNT) || defined
5386 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
5387 to call syms_of_w32select.
5389 * cygw32.h: Remove obsolete EXFUN declarations.
5391 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
5393 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
5394 of w32inevt.o from SOME_MACHINE_OBJECTS.
5396 2012-10-08 Daniel Colascione <dancol@dancol.org>
5398 * image.c: Permanent fix for JPEG compilation issue --- limit
5399 jpeglib `boolean' redefinition to Cygwin builds.
5401 2012-10-08 Eli Zaretskii <eliz@gnu.org>
5403 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
5405 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
5408 2012-10-08 Daniel Colascione <dancol@dancol.org>
5410 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
5411 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
5412 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
5413 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
5414 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
5415 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
5416 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
5417 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
5418 now a supported configuration.
5420 * Makefile.in: consolidate image variables into LIBIMAGE; add
5421 W32_OBJ and W32_LIBS. Compile new files.
5424 (_DebPrint) declare tracing facility for W32 debugging. We need
5425 to unify tracing later.
5427 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
5428 unconditional use of W32 Unicode functions. Cygwin runs only on
5429 100% Unicode operating systems.
5431 * cygw32.c: New file. Define Cygwin-specific facilities.
5432 (Fcygwin_convert_path_to_windows)
5433 (Fcygwin_convert_path_from_windows): New user functions for
5434 accessing Cygwin path-munging routines.
5436 * cygw32.h: New file.
5437 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
5438 UTF-16LE strings temporarily inside non-Lisp-visible string
5441 (w32_strerror): Just what it says on the tin.
5443 * emacs.c: Make the NS fork-then-exec code for daemon-launching
5444 also run for Cygwin; both systems have the same problem with using
5445 GUI facilities in a forked child. Also call syms_of_cygw32,
5446 syms_of_w32select in correct places.
5448 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
5449 needs fork-then-exec for daemon launching.
5451 * font.h: Include frame.h.
5453 * image.c: Use the image library cache machinery only when we're
5454 compiling for native WINDOWSNT; Cygwin can use shared libraries
5455 like any other Unixlike system.
5457 * keyboard.c: Clarify a comment regarding the input loop.
5459 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
5460 functions directly instead of trying to detect at runtime that our
5461 host operating system supports them. We make this change for two
5462 reasons: Cygwin lacks support for the multibyte character
5463 conversion functions used by the legacy menu code, and Cygwin
5464 never needs to rely on non-Unicode APIs.
5466 * unexw32.c (hinst): Declare extern.
5468 * w32.c: Change header order;
5469 (w32_strerror): Move to w32fns.c because we need it for
5470 non-WINDOWSNT builds.
5472 * w32.h: Add #error macro to make sure we don't include w32.h for
5473 Cygwin builds. Remove w32select declarations.
5475 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
5476 w32fns.c. w32console.c is WINDOWSNT-only.
5478 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
5479 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
5481 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
5482 (w32_major_version, w32_minor_version, w32_build_number)
5483 (os_subtype, sound_type): Define here
5484 (w32_defined_color): Make color parameter const for consistency
5485 with other _defined_color functions.
5486 (w32_createwindow): Unconditionally call w32_init_class instead of
5487 doing so only when hprevinst is non-NULL. Plumbing hprevinst
5488 through the code is complex and unnecessary because class
5489 registration is practically free.
5490 (w32_name_of_message): New EMACSDEBUG-only function.
5491 (Fset_message_beep): Move here
5492 (Fx_open_connection): Require that the display name for Windows be
5493 "w32" for consistency, emacsclient disambiguation, and maybe, one
5494 day, multi-window-system support.
5495 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
5496 Cygwin files for W32 GUI facilities, since these clearly don't
5497 expect Cygwin names.
5498 (_DebPrint): Define.
5499 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
5500 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
5501 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
5502 (w32_last_error): Remove.
5504 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
5506 * w32heap.c (syspage_mask): Declare here.
5507 (cache_system_info): Remove.
5509 * w32inevt.c (faked_key): Define globally, not statically.
5510 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
5511 (w32_console_toggle_lock_key): Move to w32fns.c.
5513 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
5515 * w32proc.c (_DebPrint): Move to w32fns.c.
5516 * w32select.c: Include string.h, stdio.h for Cygwin.
5517 * w32select.h: New File.
5519 * w32term.c: Include io.h for non-CYGWIN builds; needed for
5521 (w32_message_fd): New variable. Under Cygwin, holds the file
5522 descriptor the system used to tell us about pending thread
5525 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
5526 that prevented compilation under non-WINDOWSNT systems.
5528 (w32_initialize): Open /dev/windows and assign it to
5529 w32_message_fd. Provide w32 feature.
5531 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
5532 (WM_EMACS_INPUT_READY): add.
5533 (prepend_msg, w32_message_fd): Declare globally.
5536 (keyboard_handle): Use only when WINDOWSNT.
5537 (notify_msg_ready): New function. Posts a message to the main
5538 thread's message queue under CYGWIN, which wakes up the main
5539 thread from select(2) by making the /dev/windows file descriptor
5540 ready. Under WINDOWSNT, it sets an event the same way the old
5543 (post, prepend_msg): Actually call notify_msg_ready instead of
5544 setting the input event directly.
5546 2012-10-07 Eli Zaretskii <eliz@gnu.org>
5548 * ralloc.c (relinquish): If a heap is ready to be relinquished,
5549 but it still has blocs in it, don't return it to the system,
5550 instead of aborting. (Bug#12402)
5552 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
5554 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
5556 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
5557 MAC_OS_X_VERSION_10_6.
5558 (syms_of_nsterm): Remove comment about Panther and above for
5560 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
5561 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
5562 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
5564 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
5565 MAC_OS_X_VERSION_10_4.
5567 * nsmenu.m (fillWithWidgetValue:): Remove code for <
5568 MAC_OS_X_VERSION_10_2.
5570 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
5572 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
5573 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
5575 * nsterm.m (ns_in_resize): Remove (Bug#12479).
5576 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
5577 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
5578 Remove ns_in_resize check.
5579 (ns_clear_frame_area): Remove resize handle code.
5581 * nsfns.m (ns_in_resize): Remove.
5582 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
5583 Remove ns_in_resize check.
5585 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
5587 Improve sys_siglist detection.
5588 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
5589 defined as a macro, as is done in Solaris.
5590 (sys_siglist_entries): New macro.
5591 (save_strsignal): Use it.
5592 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
5593 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
5595 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
5597 * nsfns.m (Fx_create_frame): Call x_default_parameter with
5598 fullscreen/Fullscreen.
5600 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
5601 tobar_height is new.
5603 * nsterm.m (x_make_frame_visible): Check for fullscreen.
5604 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
5605 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
5606 (windowDidResize:): Check for correct window if old style fullscreen.
5607 Capitalize word in comment. Remove incorrect comment.
5608 (initFrameFromEmacs:): tbar_height renamed tibar_height.
5609 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
5610 error in drawing background.
5611 (toggleFullScreen:): Remove comment. Rearrange calls.
5612 Set toolbar values to zero, save old height in tobar_height.
5613 Restore tool bar height when leaving fullscreen.
5614 (canBecomeMainWindow): New function.
5616 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
5618 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
5620 2012-10-05 Eli Zaretskii <eliz@gnu.org>
5622 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
5624 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
5625 that time stamps of directories could also be changed.
5626 Don't request the too broad GENERIC_WRITE, only the more restrictive
5627 FILE_WRITE_ATTRIBUTES access rights.
5629 * fileio.c (Fset_file_times): Special-case ignoring errors for
5630 directories only on MSDOS, not on MS-Windows.
5632 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
5634 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
5636 2012-10-04 Eli Zaretskii <eliz@gnu.org>
5638 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
5639 see whether CreateFile failed.
5641 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
5643 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
5644 to avoid similar races.
5645 * keyboard.c (pending_signals): Now bool, not int.
5647 Port timers to OpenBSD, plus check for timer failures.
5648 OpenBSD problem reported by Han Boetes.
5649 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
5651 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
5652 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
5653 like OpenBSD, which has timer_settime but does not declare it.
5654 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
5655 whether to use itimerspec-related primitives. All uses of
5656 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
5658 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5660 * profiler.c (handle_profiler_signal): Fix a malloc race
5661 that caused Emacs to hang on Fedora 17 when profiling Lisp.
5663 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
5665 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
5667 2012-10-02 Eli Zaretskii <eliz@gnu.org>
5669 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
5670 consistent with the change in return value of 'safe_strsignal'.
5672 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5674 Prefer plain 'static' to 'static inline' (Bug#12541).
5675 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
5676 (bidi_set_sor_type, bidi_push_embedding_level)
5677 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
5678 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
5679 (bidi_cache_search, bidi_cache_ensure_space)
5680 (bidi_cache_iterator_state, bidi_cache_find)
5681 (bidi_peek_at_next_level, bidi_set_paragraph_end)
5682 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
5683 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
5684 Now 'static', not 'static inline'.
5686 Count overruns when profiling; change units to ns.
5687 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
5688 Give extra weight to samples after overruns, to attempt to count
5689 the time more accurately.
5690 (setup_cpu_timer): Change sampling interval units from ms to ns, since
5691 the underlying primitives nominally do ns.
5692 (Fprofiler_cpu_start): Document the change. Mention that
5693 the sampling intervals are only approximate.
5695 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
5697 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
5699 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
5700 case for the special 0 coding-system.
5702 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
5703 (Fmake_overlay): Remove redundant tests.
5704 (fix_start_end_in_overlays): Remove redundant recentering.
5706 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
5708 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
5709 Update dependencies.
5711 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5713 Fix a malloc race condition involving strsignal.
5714 A signal can arrive in the middle of a malloc, and Emacs's signal
5715 handler can invoke strsignal, which can invoke malloc, which is
5716 not portable. This race condition bug makes Emacs hang on GNU/Linux.
5717 Fix it by altering the signal handler so that it does not invoke
5719 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
5720 * process.c (status_message): Use const pointer, in case strsignal
5721 is #defined to safe_strsignal.
5722 * sysdep.c (sys_siglist, init_signals): Always define and
5723 initialize a substitute sys_siglist if the system does not define
5724 one, even if HAVE_STRSIGNAL.
5725 (safe_strsignal): Rename from strsignal. Always define,
5726 using sys_siglist. Return a const pointer.
5727 * syssignal.h (safe_strsignal): New decl.
5728 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
5730 2012-10-01 Eli Zaretskii <eliz@gnu.org>
5732 * w32proc.c (timer_loop): Fix code that waits for timer
5733 expiration, to avoid high CPU usage.
5735 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
5737 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
5738 (sweep_weak_table): Remove redundant prototypes.
5740 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
5742 * emacs.c: Move the inclusion of TERM_HEADER after including
5743 windows.h on WINDOWSNT. This avoids compilation problems with
5746 2012-10-01 Eli Zaretskii <eliz@gnu.org>
5748 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
5749 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
5750 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
5751 as the previous version used 'void *'.
5753 * ralloc.c (ROUNDUP): Fix last change.
5754 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
5757 * w32proc.c <disable_itimers>: New static flag.
5758 (init_timers): Initialize it to zero, after creating the critical
5759 sections used by the timer threads.
5760 (term_timers): Set to 1 before deleting the critical sections.
5761 (getitimer, setitimer): If disable_itimers is non-zero, return an
5762 error indication without doing anything. Reported by Fabrice
5763 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
5764 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
5766 [!HAVE_SETITIMER]: Behave as the previous version that didn't
5769 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
5770 term_ntproc after all the other bookkeeping, to get timers working
5771 as long as possible.
5773 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5775 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
5776 Suggested by Juri Linkov in
5777 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
5779 Prefer plain 'static' to 'static inline' (Bug#12541).
5780 With static functions, modern compilers inline pretty well by
5781 themselves; advice from programmers often hurts as much as it helps.
5782 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
5783 this change shrinks the text size of the Emacs executable by 1.1%
5784 without affecting CPU significantly in my benchmark.
5785 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
5786 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
5787 (mark_maybe_object, mark_maybe_pointer, bounded_number):
5788 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
5789 (bset_auto_fill_function, bset_auto_save_file_format)
5790 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
5791 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
5792 (bset_cache_long_line_scans, bset_case_fold_search)
5793 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
5794 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
5795 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
5796 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
5797 (bset_header_line_format, bset_indicate_buffer_boundaries)
5798 (bset_indicate_empty_lines, bset_invisibility_spec)
5799 (bset_left_fringe_width, bset_major_mode, bset_mark)
5800 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
5801 (bset_name, bset_overwrite_mode, bset_pt_marker)
5802 (bset_right_fringe_width, bset_save_length)
5803 (bset_scroll_bar_width, bset_scroll_down_aggressively)
5804 (bset_scroll_up_aggressively, bset_selective_display)
5805 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
5806 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
5807 (set_buffer_overlays_after):
5808 * category.c (bset_category_table):
5809 * charset.c (read_hex):
5810 * coding.c (produce_composition, produce_charset)
5811 (handle_composition_annotation, handle_charset_annotation)
5813 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
5814 (assign_row, set_frame_matrix_frame, make_current)
5816 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
5817 * fns.c (maybe_resize_hash_table):
5818 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
5819 * gmalloc.c (register_heapinfo):
5820 * image.c (lookup_image_type):
5821 * intervals.c (set_interval_object, set_interval_left)
5822 (set_interval_right, copy_interval_parent, rotate_right)
5823 (rotate_left, balance_possible_root_interval):
5824 * keyboard.c (kset_echo_string, kset_kbd_queue)
5825 (kset_keyboard_translate_table, kset_last_prefix_arg)
5826 (kset_last_repeatable_command, kset_local_function_key_map)
5827 (kset_overriding_terminal_local_map, kset_real_last_command)
5828 (kset_system_key_syms, clear_event, set_prop):
5829 * lread.c (digit_to_number):
5830 * marker.c (attach_marker, live_buffer, set_marker_internal):
5831 * nsterm.m (ns_compute_glyph_string_overhangs):
5832 * process.c (pset_buffer, pset_command)
5833 (pset_decode_coding_system, pset_decoding_buf)
5834 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
5835 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
5836 (pset_status, pset_tty_name, pset_type, pset_write_queue):
5837 * syntax.c (bset_syntax_table, dec_bytepos):
5838 * terminal.c (tset_param_alist):
5839 * textprop.c (interval_has_some_properties)
5840 (interval_has_some_properties_list):
5841 * window.c (wset_combination_limit, wset_dedicated)
5842 (wset_display_table, wset_hchild, wset_left_fringe_width)
5843 (wset_left_margin_cols, wset_new_normal, wset_new_total)
5844 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
5845 (wset_right_fringe_width, wset_right_margin_cols)
5846 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
5847 (wset_vertical_scroll_bar_type, wset_window_parameters):
5848 * xdisp.c (wset_base_line_number, wset_base_line_pos)
5849 (wset_column_number_displayed, wset_region_showing)
5850 (window_box_edges, run_window_scroll_functions)
5851 (append_glyph_string_lists, prepend_glyph_string_lists)
5852 (append_glyph_string, set_glyph_string_background_width)
5853 (append_glyph, append_composite_glyph)
5854 (take_vertical_position_into_account):
5855 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
5856 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
5857 (lface_hash, lface_same_font_attributes_p, lookup_face):
5858 * xml.c (libxml2_loaded_p):
5859 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
5860 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
5861 Now 'static', not 'static inline'.
5864 (bidi_copy_it): Do the whole copy with a single memcpy.
5865 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
5867 Revert the FOLLOW-SYMLINKS change for file-attributes.
5868 Doing it right would require several changes to Tramp, and there's
5869 not enough time to get that tested before the freeze today.
5870 * dired.c (directory_files_internal, Ffile_attributes):
5873 * frame.c (x_report_frame_params): Port better to wider ints.
5874 Do not assume that EMACS_UINT is the same width as uprintmax_t,
5875 or that pointers can be printed in 15 decimal digits.
5876 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
5878 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
5880 Support x64 build on MS-Windows.
5881 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
5882 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
5883 compatibility with x64.
5884 (x_get_focus_frame): Add prototype.
5886 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
5887 defining an XRectangle structure.
5889 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
5890 arithmetics for compatibility with x64.
5892 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
5893 compatibility with x64.
5895 * w32heap.h: Adjust prototypes and declarations.
5897 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
5898 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
5899 DWORD, long, and unsigned long, for compatibility with x64.
5900 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
5901 (sbrk): Argument is now of type ptrdiff_t.
5903 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
5905 (w32_msg_pump): Use WPARAM type for 'result'.
5907 * w32.c (init_environment, get_emacs_configuration): Support AMD64
5909 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
5910 compatibility with x64.
5912 * vm-limit.c (lim_data): Now size_t.
5913 (check_memory_limits): Adjust prototypes of real_morecore and
5914 __morecore to receive argument of type ptrdiff_t. Use size_t for
5915 five_percent and data_size.
5917 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
5918 variables, for compatibility with x64.
5919 (rva_to_section, offset_to_section, relocate_offset)
5920 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
5921 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
5922 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
5923 for compatibility with x64.
5925 * sysdep.c (STDERR_FILENO): Define if not already defined.
5927 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
5928 (__morecore): Argument type is now ptrdiff_t.
5929 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
5930 (relinquish): Use ptrdiff_t type for 'excess'.
5931 (r_alloc_sbrk): Argument type is now ptrdiff_t.
5933 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
5934 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
5935 instead of a literal number.
5937 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
5938 (min): Define only if not already defined.
5940 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
5941 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
5944 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
5945 'bitmaps' is a pointer.
5947 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
5949 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
5951 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
5953 file-attributes has a new optional arg FOLLOW-SYMLINKS.
5954 * dired.c (directory_files_internal, Ffile_attributes):
5955 New arg follow_symlinks. All uses changed.
5957 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
5959 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
5961 2012-09-30 Eli Zaretskii <eliz@gnu.org>
5963 Support atimers and CPU profiler via profile.c on MS-Windows.
5964 * w32proc.c (sig_mask, crit_sig): New static variables.
5965 (sys_signal): Support SIGALRM and SIGPROF.
5966 (sigemptyset, sigaddset, sigfillset, sigprocmask)
5967 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
5968 sigfillset, and sigprocmask are no longer no-ops.
5969 (sigismember): New function.
5970 (struct itimer_data): New definition.
5971 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
5972 (crit_prof): New static variables.
5973 (MAX_SINGLE_SLEEP): New definition.
5974 (timer_loop, stop_timer_thread, term_timers, init_timers)
5975 (start_timer_thread, getitimer, setitimer): New functions.
5976 (alarm): No longer a no-op, calls setitimer.
5978 * w32.c (term_ntproc): Call term_timers.
5979 (init_ntproc): Make sure all signals are unblocked at startup, to
5980 erase any traces of dumping. Call init_timers.
5982 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
5983 Windows-specific code to display the hourglass mouse pointer is no
5985 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
5986 to hourglass timer expiration.
5987 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
5988 Remove, no longer used.
5989 (w32_note_current_window, show_hourglass, hide_hourglass):
5990 New functions, in support of hourglass cursor display similar to other
5992 (syms_of_w32fns): Don't initialize hourglass_timer.
5994 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
5996 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
5998 * w32.h (init_timers, term_timers): Add prototypes.
6000 2012-09-30 Kenichi Handa <handa@gnu.org>
6002 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
6003 to the buffer relocation which may be caused by ccl_driver.
6005 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
6007 * xfns.c (Fx_file_dialog): Update comment.
6009 * w32fns.c (Fx_file_dialog): Update comment.
6011 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
6012 Initialize panel name field if OSX >= 10.6.
6014 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
6016 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
6018 * nsterm.m (NEW_STYLE_FS): New define.
6019 (ns_fullscreen_hook, windowWillEnterFullScreen)
6020 (windowDidEnterFullScreen, windowWillExitFullScreen)
6021 (windowDidExitFullScreen, toggleFullScreen, handleFS)
6022 (setFSValue): New functions.
6023 (EmacsFSWindow): New implementation.
6024 (canBecomeKeyWindow): New function for EmacsFSWindow.
6025 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
6026 (dealloc): Release nonfs_window if in fullscreen.
6027 (updateFrameSize:): Call windowDidMove to update top/left.
6028 (windowWillResize:toSize:): Check if frame is still maximized.
6029 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
6030 next_maximized, maximized_width, maximized_height and nonfs_window.
6031 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
6033 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
6034 fullscreen. Set maximized_width/height. Act on next_maximized.
6036 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
6037 (EmacsView): Add variables for fullscreen.
6038 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
6039 (EmacsFSWindow): New interface for fullscreen.
6041 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
6043 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6045 2012-09-30 Chong Yidong <cyd@gnu.org>
6047 * fns.c (Frandom): Doc fix.
6049 2012-09-30 Martin Rudalics <rudalics@gmx.at>
6051 * window.c (Vwindow_combination_limit): New default value.
6052 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
6054 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
6056 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
6057 Suggested by Eli Zaretskii in
6058 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
6060 2012-09-30 Eli Zaretskii <eliz@gnu.org>
6062 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
6063 HAVE_TIMER_SETTIME is defined.
6065 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
6067 Profiler improvements: more-accurate timers, overflow checks.
6068 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
6069 signal.h, setjmp.h. Include systime.h instead.
6070 (saturated_add): New function.
6071 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
6072 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
6073 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
6075 (enum profiler_cpu_running): New enum.
6076 (profiler_cpu_running): Now of that enum type, not bool.
6077 All uses changed to store the new value.
6078 (handle_profiler_signal): Rename from sigprof_handler_1,
6079 for consistency with other handlers. Do not check whether
6080 cpu_log is a hash-table if garbage collecting, since it
6081 doesn't matter in that case.
6082 (deliver_profiler_signal): Rename from sigprof_handler,
6083 for consistency with other handlers.
6084 (setup_cpu_timer): New function, with much of what used to be in
6085 Fprofiler_cpu_start. Check for out-of-range argument.
6086 Prefer timer_settime if available, and prefer
6087 thread cputime clocks, then process cputime clocks, then
6088 monotonic clocks, to the old realtime clock. Use make_timeval
6089 to round more-correctly when falling back to setitimer.
6090 (Fprofiler_cpu_start): Use it.
6091 (Fprofiler_cpu_stop): Prefer timer_settime if available.
6092 Don't assume that passing NULL as the 2nd argument of setitimer
6093 is the same as passing a pointer to all-zero storage.
6094 Ignore SIGPROF afterwards.
6095 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
6096 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
6097 non-fatal signal handlers. Ignore SIGPROF on startup.
6098 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
6099 in profiler.c, since sysdep.c now uses it.
6101 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
6102 Suggested by Eli Zaretskii in
6103 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
6105 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
6107 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6109 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
6111 * lisp.h (struct backtrace): Remove indirection for `function' field.
6112 * xdisp.c (redisplay_internal):
6113 * profiler.c (record_backtrace, sigprof_handler_1):
6114 * alloc.c (Fgarbage_collect):
6115 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
6116 (Fbacktrace_frame): Adjust accordingly.
6118 2012-09-28 Glenn Morris <rgm@gnu.org>
6120 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
6121 (Frun_hook_with_args_until_failure): Doc fixes.
6123 2012-09-28 Eli Zaretskii <eliz@gnu.org>
6125 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
6126 Qautomatic_redisplay and change the symbol name. All users changed.
6128 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
6130 * profiler.c (sigprof_handler): Fix race condition.
6132 2012-09-28 Glenn Morris <rgm@gnu.org>
6134 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
6136 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
6138 Check more robustly for timer_settime.
6139 * Makefile.in (LIB_TIMER_TIME): New macro.
6141 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
6142 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
6145 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
6147 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
6149 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
6151 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6153 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
6155 * character.h (MAYBE_UNIFY_CHAR): Remove.
6156 * charset.c, charset.h (maybe_unify_char): Now static.
6157 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
6158 Since this stuff is now private to charset.c, there's no need for
6159 a public macro and no need to inline by hand.
6161 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
6162 Stefan Monnier <monnier@iro.umontreal.ca>
6163 Juanma Barranquero <lekktu@gmail.com>
6165 * profiler.c: New file.
6166 * Makefile.in (base_obj): Add profiler.o.
6167 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
6168 ($(BLD)/profiler.$(O)): New target.
6169 * emacs.c (main): Call syms_of_profiler.
6170 * alloc.c (Qautomatic_gc): New constant.
6171 (MALLOC_PROBE): New macro.
6172 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
6173 (total_bytes_of_live_objects): New function.
6174 (Fgarbage_collect): Use it. Record itself in backtrace_list.
6175 Call malloc_probe for the memory profiler.
6176 (syms_of_alloc): Define Qautomatic_gc.
6177 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
6179 (struct backtrace): Move definition...
6180 * lisp.h (struct backtrace): ..here.
6181 (Qautomatic_gc, profiler_memory_running): Declare vars.
6182 (malloc_probe, syms_of_profiler): Declare functions.
6183 * xdisp.c (Qautomatic_redisplay): New constant.
6184 (redisplay_internal): Record itself in backtrace_list.
6185 (syms_of_xdisp): Define Qautomatic_redisplay.
6187 2012-09-25 Eli Zaretskii <eliz@gnu.org>
6188 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
6190 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
6192 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
6194 Prefer POSIX timers if available.
6195 They avoid a race if the timer is too close to the current time.
6196 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
6197 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
6198 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
6200 2012-09-25 Eli Zaretskii <eliz@gnu.org>
6202 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
6203 CHAR_STRING_ADVANCE.
6204 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
6205 STRING_CHAR_ADVANCE.
6207 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
6209 Move Vlibrary_cache to emacs.c and reset before dumping.
6211 * lisp.h (reset_image_types): Declare.
6212 [WINDOWSNT] (Vlibrary_cache): Declare.
6214 * image.c (reset_image_types): New function.
6216 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
6217 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
6218 (Fdump_emacs): Reset Vlibrary_cache and image_types.
6220 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
6221 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
6223 * w32.h (Vlibrary_cache): Do not declare.
6225 2012-09-25 Eli Zaretskii <eliz@gnu.org>
6227 * w32proc.c (sys_signal): Handle all signals defined by the
6228 MS-Windows runtime, not just SIGCHLD. Actually install the signal
6229 handlers for signals supported by Windows. Don't override
6230 term_ntproc as the handler for SIGABRT.
6231 (sigaction): Rewrite to call sys_signal instead of duplicating its
6233 (sys_kill): Improve commentary.
6235 * w32.c (term_ntproc): Accept (and ignore) one argument, for
6236 consistency with a signature of a signal handler. All callers
6238 (init_ntproc): Accept an argument DUMPING. If dumping, don't
6239 install term_ntproc as a signal handler for SIGABRT, as that
6240 should be done by the dumped Emacs.
6242 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
6244 * w32select.c (term_w32select): Protect against repeated
6245 invocation by setting clipboard_owner to NULL after calling
6248 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
6249 and term_ntproc to their modified signatures.
6251 * character.c (char_string, string_char): Remove calls to
6252 MAYBE_UNIFY_CHAR. See the discussion starting at
6253 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
6256 2012-09-25 Chong Yidong <cyd@gnu.org>
6258 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
6260 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
6262 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
6263 when encountering an unknown bytecode.
6265 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
6267 image.c, indent.c: Use bool for booleans.
6268 * dispextern.h (struct image_type): Members valid_p, load, init
6269 now return bool, not int. All uses changed.
6270 * image.c: Omit unnecessary static decls.
6271 (x_create_bitmap_mask, x_build_heuristic_mask):
6272 Return void, not int, since callers don't care about the return value.
6273 (x_create_bitmap_mask, define_image_type, valid_image_p)
6274 (struct image_keyword, parse_image_spec, image_spec_value)
6275 (check_image_size, image_background)
6276 (image_background_transparent, x_clear_image_1)
6277 (postprocess_image, lookup_image, x_check_image_size)
6278 (x_create_x_image_and_pixmap, xbm_image_p)
6279 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
6280 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
6281 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
6282 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
6283 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
6284 (png_image_p, init_png_functions, png_load_body, png_load)
6285 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
6286 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
6287 (init_gif_functions, gif_load, imagemagick_image_p)
6288 (imagemagick_load_image, imagemagick_load, svg_image_p)
6289 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
6291 * nsimage.m (ns_load_image):
6292 * nsterm.m (ns_defined_color):
6293 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
6294 * xfns.c (x_defined_color):
6295 * xterm.c (x_alloc_lighter_color_for_widget)
6296 (x_alloc_nearest_color_1, x_alloc_nearest_color)
6297 (x_alloc_lighter_color):
6298 * indent.c (disptab_matches_widthtab, current_column)
6299 (scan_for_column, string_display_width, indented_beyond_p)
6300 (compute_motion, vmotion, Fvertical_motion):
6301 Use bool for booleans.
6303 2012-09-24 Chong Yidong <cyd@gnu.org>
6305 * chartab.c (Fset_char_table_default): Obsolete function removed.
6307 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6309 Move pid_t related decls out of lisp.h.
6310 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
6311 (interruptible_wait_for_termination):
6312 Move these decls from lisp.h to syswait.h, since they use pid_t.
6313 Needed on FreeBSD; see Herbert J. Skuhra in
6314 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
6315 * callproc.c: Include syswait.h.
6317 gnutls.c, gtkutil.c: Use bool for boolean.
6318 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
6319 (emacs_gnutls_handle_error):
6320 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
6321 (xg_hide_tooltip, xg_create_frame_widgets)
6322 (create_dialog, xg_uses_old_file_dialog)
6323 (xg_get_file_with_chooser, xg_get_file_with_selection)
6324 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
6325 (xg_item_label_same_p, xg_update_menubar)
6326 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
6327 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
6328 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
6329 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
6330 (update_frame_tool_bar, free_frame_tool_bar):
6331 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
6332 * nsmenu.m (ns_update_menubar):
6333 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
6334 * xfns.c (Fx_show_tip) [USE_GTK]:
6335 Use bool for boolean.
6336 * gtkutil.c (xg_update_frame_menubar):
6337 * xmenu.c (update_frame_menubar):
6338 Return void, not int, since caller ignores return value.
6339 * gtkutil.c (xg_change_toolbar_position):
6342 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
6344 * makefile.w32-in (BLOCKINPUT_H): Remove.
6345 (SYSSIGNAL_H): New macro.
6346 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
6347 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
6348 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
6349 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
6350 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
6351 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
6352 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
6353 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
6354 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
6355 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
6356 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
6357 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
6358 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
6359 ($(BLD)/w32xfns.$(O)): Update dependencies.
6361 2012-09-23 Eli Zaretskii <eliz@gnu.org>
6363 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
6364 fatal_error_backtrace.
6366 * w32proc.c (sys_kill): Undo last change: don't do anything when
6367 invoked to deliver SIGABRT to our own process. This is now
6368 handled by emacs_raise.
6370 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
6372 * w32term.c (w32_read_socket): Remove leftover reference to
6373 interrupt_input_pending.
6375 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6377 Do not use SA_NODEFER.
6378 Problem reported by Dani Moncayo in
6379 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
6381 * sysdep.c (emacs_abort): Do not reset signal handler.
6382 * emacs.c (terminate_due_to_signal): Reset signal handler here.
6383 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
6384 wanted even on POSIXish hosts, and it doesn't work on Windows.
6386 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6388 * xterm.c (x_term_init): Call fixup_locale before and after calling
6389 gtk_init (Bug#12392).
6391 2012-09-23 Chong Yidong <cyd@gnu.org>
6393 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
6394 Vdynamic_library_alist.
6396 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
6397 (Fgnutls_available_p): Caller changed.
6399 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
6400 (Flibxml_parse_xml_region): Likewise.
6402 * dispextern.h (struct image_type): Remove arg from init function.
6404 * image.c (Finit_image_library, lookup_image_type)
6405 (define_image_type): Remove now-unneeded second arg.
6406 (init_xpm_functions, init_png_functions, init_jpeg_functions)
6407 (init_tiff_functions, init_gif_functions, init_svg_functions):
6408 Arglist and w32_delayed_load calling convention changed.
6409 (gs_type): Remove init_gs_functions; there is no such function.
6410 (valid_image_p, make_image): Fix caller to lookup_image_type.
6412 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6414 Simplify and avoid signal-handling races (Bug#12471).
6416 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
6417 Avoid recursive loop if there's a fatal error in the function itself.
6418 * atimer.c (pending_atimers):
6419 * blockinput.h: Don't include "atimer.h"; no longer needed.
6420 (interrupt_input_pending): Remove. All uses removed.
6421 pending_signals now counts both atimers and ordinary interrupts.
6422 This is less racy than having three separate pending-signal flags.
6423 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
6425 Rename from their upper-case counterparts BLOCK_INPUT,
6426 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
6427 INPUT_BLOCKED_P, and turn into functions. All uses changed.
6428 This makes it easier to access volatile variables more accurately.
6429 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
6430 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
6431 that's more reliable if the code is buggy and sets
6432 interrupt_input_blocked to a negative value. All uses changed.
6433 * atimer.c (deliver_alarm_signal):
6434 Remove. No need to deliver this to the parent; any thread can
6435 handle this signal now. All uses replaced by underlying handler.
6436 * atimer.c (turn_on_atimers):
6437 * dispnew.c (handle_window_change_signal):
6438 * emacs.c (handle_danger_signal):
6439 * keyboard.c (kbd_buffer_get_event):
6440 Don't reestablish signal handler; not needed with sigaction.
6441 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
6443 Rework to avoid unnecessary accesses to volatile variables.
6444 (UNBLOCK_INPUT_TO): Now a function.
6445 (totally_unblock_input, unblock_input): New decls.
6446 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
6447 (init_data): Remove. Necessary stuff now done in init_signal.
6448 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
6449 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
6450 (fatal_error_code): Remove; no longer needed.
6451 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
6452 it doesn't always backtrace. All uses changed. No need to reset
6453 signal to default, since sigaction and/or die does that for us now.
6454 Use emacs_raise (FOO), not kill (getpid (), FOO).
6455 (main): Check more-accurately whether we're dumping.
6456 Move fatal-error setup to sysdep.c
6457 * floatfns.c: Do not include "syssignal.h"; no longer needed.
6458 * gtkutil.c (xg_get_file_name, xg_get_font):
6459 Remove no-longer-needed signal-mask manipulation.
6460 * keyboard.c, process.c (POLL_FOR_INPUT):
6461 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
6462 * keyboard.c (read_avail_input): Remove.
6463 All uses replaced by gobble_input.
6464 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
6465 (kbd_buffer_store_event_hold, gobble_input):
6466 (record_asynch_buffer_change) [USABLE_SIGIO]:
6467 (store_user_signal_events):
6468 No need to mess with signal mask.
6469 (gobble_input): If blocking input and there are terminals, simply
6470 set pending_signals to 1 and return. All hooks changed to not
6471 worry about whether input is blocked.
6472 (process_pending_signals): Clear pending_signals before processing
6473 them, in case a signal comes in while we're processing.
6474 By convention callers now test pending_signals before calling us.
6475 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
6476 New functions, to support changes to blockinput.h.
6477 (handle_input_available_signal): Now extern.
6478 (reinvoke_input_signal): Remove. All uses replaced by
6480 (quit_count): Now volatile, since a signal handler uses it.
6481 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
6482 All callers changed. Block SIGINT only if not already blocked.
6483 Clear sigmask reliably, even if Fsignal returns, which it can.
6484 Omit unnecessary accesses to volatile var.
6485 (quit_throw_to_read_char): No need to restore sigmask.
6486 * keyboard.c (gobble_input, handle_user_signal):
6487 * process.c (wait_reading_process_output):
6488 Call signal-handling code rather than killing ourselves.
6489 * lisp.h: Include <float.h>, for...
6490 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
6491 (pending_signals): Now volatile.
6492 (syms_of_data): Now const if IEEE floating point.
6493 (handle_input_available_signal) [USABLE_SIGIO]:
6494 (terminate_due_to_signal, record_child_status_change): New decls.
6495 * process.c (create_process): Avoid disaster if memory is exhausted
6496 while we're processing a vfork, by tightening the critical section
6498 (send_process_frame, process_sent_to, handle_pipe_signal)
6499 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
6501 (send_process): No need for setjmp/longjmp any more, since the
6502 SIGPIPE stuff is now gone. Instead, report an error if errno
6504 (record_child_status_change): Now extern. PID and W are now args.
6505 Return void, not bool. All callers changed.
6506 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
6507 Remove. All uses removed. This bug should be fixed now in a
6509 (wait_for_termination_1): Use waitpid rather than sigsuspend,
6510 and record the child status change directly. This avoids the
6511 need to futz with the signal mask.
6512 (process_fatal_action): Move here from emacs.c.
6513 (emacs_sigaction_flags): New function, containing
6514 much of what used to be in emacs_sigaction_init.
6515 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
6516 caught by emacs, to make races less likely.
6517 (deliver_process_signal): Rename from handle_on_main_thread.
6519 (BACKTRACE_LIMIT_MAX): Now at top level.
6520 (thread_backtrace_buffer, threadback_backtrace_pointers):
6522 (deliver_thread_signal, deliver_fatal_thread_signal):
6523 New functions, for more-accurate delivery of thread-specific signals.
6524 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
6525 (deliver_arith_signal): Handle in this thread, not
6526 in the main thread, since it's triggered by this thread.
6527 (maybe_fatal_sig): New function.
6528 (init_signals): New arg DUMPING so that we can be more accurate
6529 about whether we're dumping. Caller changed.
6530 Treat thread-specific signals differently from process-general signals.
6531 Block all signals while handling fatal error; that's safer.
6532 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
6534 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
6535 Ignore SIGPIPE unless batch.
6536 (emacs_backtrace): Output backtrace for the appropriate thread,
6537 which is not necessarily the main thread.
6538 * syssignal.h: Include <stdbool.h>.
6539 (emacs_raise): New macro.
6540 * xterm.c (x_connection_signal): Remove; no longer needed
6541 now that we use sigaction.
6542 (x_connection_closed): No need to mess with sigmask now.
6543 (x_initialize): No need to reset SIGPIPE handler here, since
6544 init_signals does this for us now.
6546 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6548 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
6549 background rect may be larger (Bug#12245).
6551 2012-09-23 Chong Yidong <cyd@gnu.org>
6553 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
6555 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6557 * .gdbinit: Just stop at fatal_error_backtrace.
6558 See Stefan Monnier's request in
6559 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
6560 Remove no-longer-used query of system type.
6562 2012-09-22 Chong Yidong <cyd@gnu.org>
6564 * search.c (Freplace_match): Doc fix (Bug#12325).
6566 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
6568 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
6569 (Fline_end_position): Doc fix.
6571 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
6573 2012-09-22 Chong Yidong <cyd@gnu.org>
6575 * dispextern.h (struct image_type): Add new slot, storing a type
6576 initialization function.
6578 * image.c (define_image_type): Call the image initializer function
6579 if it is defined. Arguments and return value changed.
6580 (valid_image_p, make_image): Callers changed.
6581 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
6582 (gif_type, imagemagick_type, svg_type, gs_type):
6583 Add initialization functions.
6584 (Finit_image_library): Call lookup_image_type.
6585 (CHECK_LIB_AVAILABLE): Macro deleted.
6586 (lookup_image_type): Call define_image_type here, rather than via
6587 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
6588 (syms_of_image): Move define_image_type calls for xbm_type and
6589 pbm_type to lookup_image_type.
6591 2012-09-22 Eli Zaretskii <eliz@gnu.org>
6593 * keyboard.c (timer_check_2): Move calculation of 'timers' and
6594 'idle_timers' from here ...
6595 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
6596 lists, to avoid infloops when the timer does something stupid,
6597 like reinvoke itself with the same or smaller time-out.
6600 2012-09-22 Martin Rudalics <rudalics@gmx.at>
6602 * window.c (Fsplit_window_internal): Handle only Qt value of
6603 Vwindow_combination_limit separately.
6604 (Qtemp_buffer_resize): New symbol.
6605 (Vwindow_combination_limit): New default value.
6608 2012-09-22 Eli Zaretskii <eliz@gnu.org>
6610 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
6611 the new overlay string. (Bug#10159)
6613 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6615 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
6616 or that fprintf is async-signal-safe. POSIX doesn't require
6619 2012-09-22 Chong Yidong <cyd@gnu.org>
6621 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
6624 2012-09-22 Kenichi Handa <handa@gnu.org>
6626 * composite.c (composition_reseat_it): Handle the case that a
6627 grapheme cluster is not covered by a single font (Bug#12352).
6629 2012-09-21 Chong Yidong <cyd@gnu.org>
6631 * image.c (define_image_type): Avoid adding duplicate types to
6632 image_types (Bug#12463). Suggested by Jörg Walter.
6634 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6636 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
6637 (print_load_command_name): Add case LC_DATA_IN_CODE.
6638 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
6640 2012-09-21 Glenn Morris <rgm@gnu.org>
6642 * eval.c (Frun_hook_with_args_until_success)
6643 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
6645 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
6647 * fileio.c (Ffile_selinux_context): Only call freecon when
6648 lgetfilecon succeeded.
6649 (Fset_file_selinux_context): Likewise. (Bug#12444)
6651 2012-09-21 Eli Zaretskii <eliz@gnu.org>
6653 * xdisp.c (try_window_reusing_current_matrix): Under bidi
6654 reordering, locate the cursor by calling set_cursor_from_row; if
6655 that fails, clear the desired glyph matrix before returning a
6656 failure indication to the caller. Fixes leaving garbled display
6657 when fast scrolling with a down-key. (Bug#12403)
6658 (compute_stop_pos_backwards): Fix a typo that caused crashes while
6659 scrolling through multibyte text.
6661 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
6663 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
6664 calling mark_vectorlike since that's the one that marks the window.
6665 (mark_discard_killed_buffers): Mark the final cdr.
6666 * window.h (struct window): Move prev/next_buffers to the
6667 non-standard fields.
6668 * window.c (make_window): Initialize prev/next_buffers manually.
6670 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
6672 Omit unused arg EXPECTED from socket hooks.
6673 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
6674 * nsterm.m (ns_term_init):
6675 * termhooks.h (struct terminal.read_socket_hook):
6676 * w32inevt.c (w32_console_read_socket):
6677 * w32term.c (w32_read_socket):
6678 * xterm.c (XTread_socket):
6679 Omit unused arg EXPECTED. All callers changed.
6680 (store_user_signal_events): Return void, not int, since callers no
6681 longer care about the return value. All uses changed.
6683 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
6685 * w32gui.h (XParseGeometry): Do not declare.
6687 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
6689 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
6690 Ignore 'expected'. See Eli Zaretskii in
6691 <http://bugs.gnu.org/12471#8> (last line).
6693 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
6694 (XParseGeometry): Now static. Substitute extremal values for
6695 values that are out of range.
6697 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
6699 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
6701 * nsfns.m (XParseGeometry): Remove.
6702 (Fx_create_frame): Call x_set_offset to correctly interpret
6703 top_pos in geometry.
6705 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
6706 (Fx_parse_geometry): If there is a space in string, call
6707 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
6709 2012-09-17 Eli Zaretskii <eliz@gnu.org>
6711 * search.c (scan_buffer): Use character positions in calls to
6712 region_cache_forward and region_cache_backward, not byte
6713 positions. (Bug#12196)
6715 * w32term.c (w32_read_socket): Set pending_signals to 1, like
6716 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
6718 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
6719 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
6720 emacs_blocked_malloc, now deleted.
6722 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
6724 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
6725 The workaround was for improving performance on Solaris 2.4, but
6726 is getting in the way now. Emacs will still work if someone is
6727 still running Solaris 2.4 in a museum somewhere; Sun dropped
6728 support for Solaris 2.4 in 2003.
6729 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
6730 * process.c (create_process) [HAVE_WORKING_VFORK]:
6731 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
6732 since Emacs no longer uses vfork on that platform.
6734 2012-09-17 Glenn Morris <rgm@gnu.org>
6736 * emacs.c: Use COPYRIGHT.
6738 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
6740 Remove configure's --without-sync-input option (Bug#12450).
6741 When auditing signal-handling in preparation for cleaning it up,
6742 I found that SYNC_INPUT has race conditions and would be a real
6743 pain to fix. Since it's an undocumented and deprecated
6744 configure-time option, now seems like a good time to remove it.
6745 Also see <http://bugs.gnu.org/11080#16>.
6746 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
6747 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
6748 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
6749 (malloc_hysteresis):
6750 (check_depth) [XMALLOC_OVERRUN_CHECK]:
6751 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
6752 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
6753 (dont_register_blocks, bytes_used_when_reconsidered)
6754 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
6755 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
6756 [!SYSTEM_MALLOC && !SYNC_INPUT]:
6757 Remove. All uses removed.
6758 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
6759 implementation, one that depends on whether the new macro
6760 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
6762 * atimer.c (run_timers, handle_alarm_signal):
6763 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
6764 (handle_async_input, process_pending_signals)
6765 (handle_input_available_signal, init_keyboard):
6766 * nsterm.m (ns_read_socket):
6767 * process.c (wait_reading_process_output):
6768 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
6769 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
6771 * xterm.c (XTread_socket):
6773 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
6774 * eval.c (handling_signal): Remove. All uses removed.
6775 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
6776 All uses replaced with the SYNC_INPUT version.
6777 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
6779 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6782 * font.c (Ffont_shape_gstring): Remove unused local.
6784 2012-09-16 Glenn Morris <rgm@gnu.org>
6786 * Makefile.in (clean): No longer run nextstep's clean.
6788 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
6790 (ns-app): Move here from ns.mk, and simplify.
6791 (clean): Simplify nextstep entry.
6792 * ns.mk: Remove file.
6794 2012-09-17 Kenichi Handa <handa@gnu.org>
6796 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
6797 not covert the last few charactes.
6799 2012-09-16 Kenichi Handa <handa@gnu.org>
6801 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
6802 here, but just check the validity of glyphs in the glyph-string.
6804 2012-09-16 Martin Rudalics <rudalics@gmx.at>
6806 * window.c (Fwindow_parameter, Fset_window_parameter):
6807 Accept any window as argument (Bug#12452).
6809 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
6811 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
6812 to ns_term_init to avoid memory leak.
6814 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
6815 explicit retain/release.
6816 (ns_term_init): Only allow one display. Initialize outerpool and
6819 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6821 Port _setjmp fix to POSIXish hosts as well as Microsoft.
6822 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
6823 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
6824 the Microsoft problem in a different way, by altering ../nt/config.nt.
6826 2012-09-15 Eli Zaretskii <eliz@gnu.org>
6841 * w16select.c: Remove inclusion of setjmp.h, as it is now included
6842 by lisp.h. This completes removal of setjmp.h inclusion
6843 erroneously announced in the previous commit. (Bug#12446)
6845 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
6848 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
6849 not defined as a macro. The latter happens on MS-Windows.
6852 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6854 Port better to POSIX hosts lacking _setjmp (Bug#12446).
6855 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
6856 Some instances of '#include <setjmp.h>' removed, if the
6857 only reason for the instance was because "lisp.h" was included.
6858 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
6859 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
6860 and _longjmp with the new symbols. Emacs already uses _setjmp if
6861 available, so this change affects only POSIXish hosts that have
6862 sigsetjmp but not _setjmp, such as some versions of Solaris and
6863 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
6864 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
6865 (png_load_body) [HAVE_PNG]:
6866 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
6867 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
6868 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
6869 since PNG requires jmp_buf. This is the only exception to the
6870 general rule that we now use sys_setjmp and sys_longjmp.
6871 This exception is OK since this code does not change the signal
6872 mask or longjmp out of a signal handler.
6874 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
6876 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
6877 Include "syssignal.h", for 'main_thread'.
6879 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
6881 Avoid out-of-range marker position (Bug#12426).
6882 * insdel.c (replace_range, replace_range_2):
6883 Adjust markers before overlays, as suggested by comments.
6884 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
6885 Remove redundant check before calling offset_intervals.
6887 2012-09-14 Martin Rudalics <rudalics@gmx.at>
6889 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
6890 current buffer (Bug#12387).
6892 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
6894 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
6896 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6898 Use a more backwards-compatible timer format (Bug#12430).
6899 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
6900 vector element, not from the 4th, since PSECS is now at the end.
6901 (Fcurrent_idle_time): Doc fix.
6903 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
6905 Function to mark objects and remove killed buffers at once.
6906 * alloc.c (discard_killed_buffers): Rename to ...
6907 (mark_discard_killed buffers) ... new name. Add marking
6908 of remaining objects. Fix comment. Adjust users.
6909 (mark_object): Do not touch frame buffer lists here.
6910 * frame.c (delete_frame): Reset frame buffer lists here.
6912 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6914 Better workaround for GNOME bug when --enable-gcc-warnings.
6915 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
6916 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
6917 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
6919 Simplify SIGIO usage (Bug#12408).
6920 The code that dealt with SIGIO was crufty and confusing, e.g., it
6921 played tricks like "#undef SIGIO" but these tricks were not used
6922 consistently. Simplify mostly by not #undeffing standard symbols,
6923 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
6924 or not as we please) rather than "defined SIGIO" (standard symbol
6925 that we probably shouldn't #undef).
6926 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
6927 Modules that need it can include it.
6928 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
6929 * dispextern.h (ignore_sigio): New decl.
6930 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
6931 unconditionally, since it's now a no-op if !USABLE_SIGIO.
6932 * emacs.c (shut_down_emacs):
6933 * keyboard.c (kbd_buffer_store_event_hold):
6934 Use ignore_sigio rather than invoking 'signal' directly.
6935 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
6937 (FIONREAD, SIGIO): Do not #undef.
6938 (tty_read_avail_input): Use #error rather than a syntax error.
6939 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
6940 for I_PIPE, used by SETUP_SLAVE_PTY.
6941 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
6942 * sysdep.c (croak): Remove; no longer needed. This bit of
6943 temporary code, with Fred N. Fish's comment that it's temporary,
6944 has been in Emacs since at least 1992!
6945 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
6946 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
6947 * syssignal.h (croak): Remove decl.
6948 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
6949 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
6950 now that we're termios-only.
6951 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
6952 * term.c (dissociate_if_controlling_tty): Use #error rather than
6955 Work around GCC and GNOME bugs when --enable-gcc-warnings.
6956 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
6957 to work around GNOME bug 683906.
6958 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
6959 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
6960 This works around GCC bug 54561.
6962 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6964 More fixes for 'volatile' and setjmp/longjmp.
6965 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
6966 * image.c (struct png_load_context) [HAVE_PNG]: New type.
6967 (png_load_body) [HAVE_PNG]:
6968 (jpeg_load_body) [HAVE_JPEG]:
6969 New function, with most of the old parent function's body.
6970 (png_load) [HAVE_PNG]:
6971 (jpeg_load) [HAVE_JPEG]:
6972 Invoke the new function, to avoid longjmp munging our locals.
6973 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
6974 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
6975 longjmp is passed 2, as the C standard doesn't guarantee this.
6976 Instead, store the failure code into mgr->failure_code.
6978 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6980 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
6981 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
6982 (syms_of_keyboard): Remove support for unread-command-char.
6984 2012-09-12 Eli Zaretskii <eliz@gnu.org>
6986 * w32proc.c (sys_kill): If PID is our process ID and the signal is
6987 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
6988 violation. (Bug#12426)
6990 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6992 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
6994 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6996 * eval.c: Add `inhibit-debugger'.
6997 (Qinhibit_debugger): New symbol.
6998 (call_debugger): Bind it instead of Qdebug_on_error.
6999 (maybe_call_debugger): Test Vinhibit_debugger.
7000 (syms_of_eval): Define inhibit-debugger.
7001 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
7002 (syms_of_xdisp): Remove inhibit-debug-on-message.
7004 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
7006 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
7007 If a nonvolatile local variable is written before a _longjmp to
7008 the frame containing the variable, and is read after the _longjmp,
7009 the value read is indeterminate. Some local variables of type
7010 'struct handler' and 'struct catchtag' are used in this way, so
7011 mark each of their slots as volatile if the slot can be set before
7012 _longjmp and read afterwards.
7013 * lisp.h (struct handler): var and chosen_clause are now volatile.
7014 (struct catchtag): val, next, and pdlcount are now volatile.
7016 * bidi.c (bidi_push_it, bidi_pop_it):
7017 * fns.c (copy_hash_table):
7018 * image.c (define_image_type):
7019 * keyboard.c (kbd_buffer_store_event_hold):
7020 * process.c (Fprocess_send_eof):
7021 * xfaces.c (x_create_gc) [HAVE_NS]:
7022 * xgselect.c (xg_select):
7023 Prefer assignment to memcpy when either will do.
7025 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
7026 Use pointer-to-a-pointer to simplify and avoid a NILP check each
7027 time an item is removed. No need to mark this function 'inline';
7028 the compiler knows better than we do.
7030 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
7032 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
7033 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
7034 to change_frame_size (Bug#12388).
7035 (windowDidResize:): Pass YES to updateFrameSize.
7037 * nsterm.h: Add delay parameter to updateFrameSize.
7039 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
7041 Discard killed buffers from deleted window and frame objects.
7042 This reduces an amount of references to killed buffers and
7043 helps GC to reclaim them faster.
7044 * alloc.c (discard_killed_buffers): New function.
7045 (mark_object): Use it for deleted windows and frames.
7046 (mark_object): If symbol's value is set up for a killed buffer
7047 or deleted frame, restore its global binding.
7048 * data.c (swap_in_global_binding): Add GC notice.
7049 (swap_in_symval_forwarding): Use convenient set_blv_where.
7050 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
7051 * window.h: ... to here.
7053 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
7055 Convenient macro to check whether the buffer is live.
7056 * buffer.h (BUFFER_LIVE_P): New macro.
7057 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
7058 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
7060 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7062 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
7063 composition cases (Bug#12364).
7065 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
7066 overhang of succeeding glyphs overlapping box cursor.
7068 * w32term.c (x_draw_glyph_string): Likewise.
7070 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
7072 Simplify, document, and port floating-point (Bug#12381).
7073 The porting part of this patch fixes bugs on non-IEEE platforms
7074 with frexp, ldexp, logb.
7075 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
7077 * floatfns.c: Simplify discussion of functions that Emacs doesn't
7078 support, by removing commented-out code and briefly listing the
7079 C89 functions excluded. The commented-out stuff was confusing
7080 maintenance, e.g., we thought we needed cbrt but it was commented out.
7081 (logb): Remove decl; no longer needed.
7082 (isfinite): New macro, if not already supplied.
7083 (isnan): Don't replace any existing macro.
7084 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
7085 are present on all C89 platforms.
7086 (Ffrexp): Do not special-case zero, as frexp does the right thing
7088 (Flogb): Do not use logb, as it doesn't have the desired meaning
7089 on hosts that use non-base-2 floating point. Instead, stick with
7090 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
7091 frexp, to avoid getting an unspecified result.
7093 * xdisp.c (Qinhibit_debug_on_message): Now static.
7095 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
7097 * nsterm.m (ns_update_begin): Set clip path to whole view by using
7098 NSBezierPath (Bug#12131).
7100 2012-09-10 Chong Yidong <cyd@gnu.org>
7102 * fns.c (Fdelq, Fdelete): Doc fix.
7104 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
7106 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
7107 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
7109 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
7111 * lisp.h (make_lisp_ptr): New macro to replace XSET.
7112 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
7115 2012-09-09 Eli Zaretskii <eliz@gnu.org>
7117 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
7118 left fringe if the window has a left margin. This avoids leaving
7119 traces of the cursor because its leftmost pixel is not drawn over.
7121 * dispnew.c (update_window_line): When the left margin area of a
7122 screen line is updated, set the redraw_fringe_bitmaps_p flag of
7123 that screen line. (Bug#12277)
7125 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
7127 Assume C89 or later for math functions (Bug#12381).
7128 This simplifies the code, and makes it a bit smaller and faster,
7129 and (most important) makes it easier to clean up signal handling
7130 since we can stop worring about floating-point exceptions in
7131 library code. That was a problem before C89, but the problem
7132 went away many years ago on all practical Emacs targets.
7133 * data.c, image.c, lread.c, print.c:
7134 Don't include <math.h>; no longer needed.
7135 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
7136 might be autoconfigured, as that never happens.
7138 * doprnt.c (DBL_MAX_10_EXP):
7139 * print.c (DBL_DIG):
7140 Remove. C89 or later always defines these.
7141 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
7142 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
7143 (arith_error, domain_error, domain_error2):
7144 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
7145 no longer needed -- we simply return what C returns. All uses removed.
7146 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
7148 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
7149 Remove. All uses expanded, as these macros are no longer used
7150 more than once and are now more trouble than they're worth.
7151 (Ftan): Use tan, not sin / cos.
7152 (Flogb): Assume C89 frexp.
7153 (fmod_float): Assume C89 fmod.
7154 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
7155 (init_floatfns): Remove. All uses removed.
7157 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7159 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
7160 compositeToPoint for OSX < 10.6 (Bug#12390).
7162 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
7164 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
7165 This produces more-accurate results.
7167 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7169 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
7170 changes (Bug#12088).
7172 2012-09-08 Chong Yidong <cyd@gnu.org>
7174 * syntax.c (Fstring_to_syntax): Doc fix.
7176 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7178 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
7179 in the internal border.
7180 (x_set_window_size): Remove static variables and their usage.
7181 (ns_redraw_scroll_bars): Fix NSTRACE arg.
7182 (ns_after_update_window_line, ns_draw_fringe_bitmap):
7183 Remove fringe/internal border adjustment (Bug#11052).
7184 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
7185 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
7186 (ns_fix_rect_ibw): Remove.
7187 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
7188 (ns_dumpglyphs_box_or_relief): Ditto.
7189 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
7191 (ns_dumpglyphs_image): Ditto.
7192 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
7194 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
7195 their usage. Add fringe_extended_p and its use as in other terms.
7196 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
7197 scroll bar was removed.
7198 (updateFrameSize): New function.
7199 (windowDidResize): Move code to updateFrameSize and call it.
7201 * nsterm.h (EmacsView): Add updateFrameSize.
7203 2012-09-07 Chong Yidong <cyd@gnu.org>
7205 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
7207 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
7209 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7211 More signal-handler cleanup (Bug#12327).
7212 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
7213 Problem introduced when merging patches. Noted by Eli Zaretskii in
7214 <http://bugs.gnu.org/12327#67>.
7215 * floatfns.c: Comment fix.
7216 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
7217 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
7218 and anyway the declaration is harmless even if SIGDANGER is not defined.
7219 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
7220 defined BROKEN_FIONREAD). systty.h formerly did this, but other
7221 source files not surprisingly expected syssignal.h to define, or
7222 not define, SIGIO, and it's cleaner to do it that way, for consistency.
7223 Include <sys/ioctl.h>, for FIONREAD.
7224 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
7225 This eliminates a problem whereby other files mysteriously had
7226 to include "syssignal.h" before including "systty.h" if they
7227 wanted to use "#ifdef SIGIO".
7229 2012-09-07 Eli Zaretskii <eliz@gnu.org>
7231 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
7233 * w32.c (sigemptyset): Empty the set.
7234 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
7236 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
7238 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
7240 * alloc.c (mark_buffer): Revert unsafe marking optimization.
7241 (mark_object): Likewise for frame objects.
7243 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7245 * syssignal.h (handle_on_main_thread): Always declare,
7246 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
7247 This ports to platforms without HAVE_PTHREAD.
7249 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7251 Signal-handler cleanup (Bug#12327).
7252 Emacs's signal handlers were written in the old 4.2BSD style with
7253 sigblock and sigmask and so forth, and this led to some
7254 inefficiencies and confusion. Rewrite these to use
7255 pthread_sigmask etc. without copying signal sets around. Also,
7256 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
7257 'signal', and instead use functions that do not attempt to take
7258 over the system name space. This patch causes Emacs's text
7259 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
7260 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
7261 Do not include <signal.h> or "syssignal.h", as these
7262 modules do not use signals.
7263 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
7264 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
7265 Do not include <signal.h>, as "syssignal.h" does that for us now.
7266 * atimer.c (sigmask_atimers): New function.
7267 (block_atimers, unblock_atimers): New functions,
7268 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
7270 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
7271 no longer needed here.
7272 * emacs.c (main): Inspect existing signal handler with sigaction,
7273 so that there's no need to block and unblock SIGHUP.
7274 * sysdep.c (struct save_signal): New member 'action', replacing
7275 old member 'handler'.
7276 (save_signal_handlers, restore_signal_handlers):
7277 Use sigaction instead of 'signal' to save and restore.
7278 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
7279 New function. All users of 'signal' modified to use set_sighandler
7280 if they're writeonly, and to use sys_signal if they're read+write.
7281 (emacs_sigaction_init, forwarded_signal): New functions.
7282 (sys_signal): Remove. All uses replaced by calls to sigaction
7283 and emacs_sigaction_init, or by direct calls to 'signal'.
7284 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
7285 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
7286 all uses replaced by pthread_sigmask etc. calls.
7287 * syssignal.h: Include <signal.h>.
7288 (emacs_sigaction_init, forwarded_signal): New decls.
7289 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
7290 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
7291 (sigmask, sys_sigmask): Remove; no longer needed.
7292 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
7293 (sigblock, sigunblock, sigfree):
7294 (sigsetmask) [!defined sigsetmask]:
7295 Remove. All uses replaced by pthread_sigmask.
7296 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
7297 no longer need to be replaced, and its typical old uses
7298 are now done via emacs_sigaction_init and sigaction.
7299 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
7300 (sys_sigdel): Remove; unused.
7301 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
7303 2012-09-06 Eli Zaretskii <eliz@gnu.org>
7305 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
7306 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
7308 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7310 Explicitly mark buffer_defaults and buffer_local_symbols.
7311 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
7312 mark_local_symbols here.
7313 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
7314 since special buffers aren't marked here any more.
7315 (allocate_buffer): Chain new buffer with all_buffers here...
7316 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
7318 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
7319 (syms_of_buffer): Remove staticpro of the above.
7320 (init_buffer_once): Set names for buffer_defaults and
7321 buffer_local_symbols.
7323 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7325 Use bool for booleans in font-related modules.
7326 * font.c (font_intern_prop, font_style_to_value)
7327 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
7328 (generate_otf_features, font_check_otf_features, font_check_otf)
7329 (font_match_p, font_list_entities, font_at):
7330 * fontset.c (fontset_id_valid_p, reorder_font_vector
7331 (fontset_find_font, Fset_fontset_font)
7332 (face_suitable_for_char_p) [0]:
7333 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
7334 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
7335 (m17n_flt_initialized, ftfont_shape_by_flt):
7336 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
7337 * nsfont.m (nsfont_draw):
7338 * w32font.c (w32font_draw):
7339 * w32term.c (x_draw_glyphless_glyph_string_foreground):
7340 Use bool for booleans.
7341 * font.h: Adjust to above API changes.
7342 (struct font, struct font_driver, struct font_driver_list):
7343 Use bool for booleans.
7344 (struct font): Remove useless member encoding_type.
7346 * fontset.c, xftfont.c: Omit unnecessary static decls.
7348 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7350 * alloc.c (mark_object): Revert window marking code
7351 since it's unsafe for the Fset_window_configuration.
7353 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7355 Fix race conditions with signal handlers and errno (Bug#12327).
7356 Be more systematic about preserving errno whenever a signal
7357 handler returns, even if it's not in the main thread. Do this by
7358 renaming signal handlers to distinguish between signal delivery
7359 and signal handling. All uses changed.
7360 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
7361 * data.c (deliver_arith_signal): Rename from arith_error.
7362 * dispnew.c (deliver_window_change_signal): Rename from
7363 window_change_signal.
7364 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
7365 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
7366 * keyboard.c (deliver_input_available_signal): Rename from
7367 input_available_signal.
7368 (deliver_user_signal): Rename from handle_user_signal.
7369 (deliver_interrupt_signal): Rename from interrupt_signal.
7370 * process.c (deliver_pipe_signal): Rename from send_process_trap.
7371 (deliver_child_signal): Rename from sigchld_handler.
7372 * atimer.c (handle_alarm_signal):
7373 * data.c (handle_arith_signal):
7374 * dispnew.c (handle_window_change_signal):
7375 * emacs.c (handle_fatal_signal, handle_danger_signal):
7376 * keyboard.c (handle_input_available_signal):
7377 * keyboard.c (handle_user_signal, handle_interrupt_signal):
7378 * process.c (handle_pipe_signal, handle_child_signal):
7379 New functions, with the actual signal-handling code taken from the
7380 original respective signal handlers, sans the sporadic attempts to
7381 preserve errno, since that's now done by handle_on_main_thread.
7382 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
7383 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
7384 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7386 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7387 Move initialization of main_thread to sysdep.c's init_signals.
7388 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
7389 our usage, and simplifies the mainline code.
7390 (record_child_status_change): New static function, as a helper
7391 for handle_child_signal, and with most of the old child handler's
7393 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
7394 (handle_child_signal): Use the above.
7395 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7396 Moved here from emacs.c.
7397 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
7398 code moved here from emacs.c's main function.
7399 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
7400 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
7401 This lets callers save and restore errno properly.
7403 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7405 Remove redundant or unused things here and there.
7406 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
7407 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
7408 * editfns.c (Fcompare_buffer_substrings): Likewise.
7409 * frame.h (struct terminal, struct font_driver_list):
7410 Remove redundant declarations.
7411 * window.h (Qleft, Qright): Likewise.
7413 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7415 Do not mark objects from deleted buffers, windows and frames.
7416 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
7417 (mark_object): Likewise for windows and frames.
7419 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7421 * alloc.c (valid_lisp_object_p): Treat killed buffers,
7422 buffer_defaults and buffer_local_symbols as valid objects.
7423 Return special value to denote them.
7425 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7427 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
7428 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
7429 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
7430 (file_name_absolute_p, Fsubstitute_in_file_name):
7431 (check_executable, check_writable, Ffile_accessible_directory_p)
7432 (Fset_file_selinux_context, Fdefault_file_modes)
7433 (Finsert_file_contents, choose_write_coding_system)
7434 (Fwrite_region, build_annotations, a_write, e_write)
7436 * filelock.c (boot_time_initialized, get_boot_time)
7437 (get_boot_time_1, lock_file_1, within_one_second):
7438 * floatfns.c (in_float):
7439 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
7440 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
7441 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
7442 * lisp.h (struct Lisp_Hash_Table.cmpfn):
7443 * window.c (compare_window_configurations):
7444 Use bool for booleans.
7445 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
7446 (Fdefault_file_modes): Now mode_t, not int, for modes.
7447 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
7448 (internal_delete_file): Now returns void, not a (boolean) int,
7449 since nobody was looking at the return value.
7450 * lisp.h, window.h: Adjust to above API changes.
7452 * xdisp.c (set_message): Simplify and reindent last change.
7454 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
7456 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
7458 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
7460 * eval.c (call_debugger): Make the function non-static so that we
7461 can call it from set_message.
7463 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
7464 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
7466 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7468 Give more-useful info on a fatal error (Bug#12328).
7469 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
7470 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
7471 of doing the work ourselves.
7472 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
7473 do most of the work.
7474 (fatal_error_backtrace): New function, taken from the guts
7475 of the old fatal_error_signal, but with a new option to output
7477 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
7478 info about the signal than just its number.
7479 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
7480 * sysdep.c: Include <execinfo.h>
7481 (emacs_backtrace): New function, taken partly from the previous
7482 code of the 'die' function.
7483 (emacs_abort): Call fatal_error_backtrace rather than abort.
7485 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
7487 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
7488 eager (load-time) macro-expansion.
7489 * lisp.mk (lisp): Add macroexp.
7491 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7493 Simplify redefinition of 'abort' (Bug#12316).
7494 Do not try to redefine the 'abort' function. Instead, redo
7495 the code so that it calls 'emacs_abort' rather than 'abort'.
7496 This removes the need for the NO_ABORT configure-time macro
7497 and makes it easier to change the abort code to do a backtrace.
7498 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
7499 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
7500 Remove; sysdep.c's emacs_abort now takes its place.
7501 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
7502 'abort' changed to use 'emacs_abort'.
7503 * msdos.c (dos_abort) [defined abort]: Remove; not used.
7504 (abort) [!defined abort]: Rename to ...
7505 (emacs_abort): ... new name.
7506 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
7507 the place of the old 'abort' in emacs.c.
7508 * w32.c, w32fns.c (abort): Do not #undef.
7509 * w32.c (emacs_abort): Rename from w32_abort.
7511 2012-09-04 Eli Zaretskii <eliz@gnu.org>
7513 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
7514 offsets[j].dv, since the y axis of the screen coordinates points
7515 down, while the y axis of the font definition coordinates points
7516 up. This fixes display of Arabic diacritics such as KASRA and
7517 KASRATAN. (Bug#11860)
7519 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7521 Be more systematic about _setjmp vs setjmp.
7522 * alloc.c (test_setjmp, mark_stack):
7523 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
7524 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
7525 (png_load, my_error_exit, jpeg_load):
7526 * process.c (send_process_trap, send_process):
7527 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
7528 The underscored versions are up to 30x faster on some hosts.
7529 Formerly, the code used setjmp+longjmp sometimes and
7530 _setjmp+_longjmp at other times, with no particular reason to
7531 prefer setjmp+longjmp.
7533 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
7535 Fix minor problem found by static checking.
7536 * buffer.c (Fdelete_all_overlays): Return nil.
7538 2012-09-03 Martin Rudalics <rudalics@gmx.at>
7540 * buffer.c (Fdelete_all_overlays): New function.
7542 2012-09-03 Chong Yidong <cyd@gnu.org>
7544 * gtkutil.c: Add extern decl for Qxft.
7546 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7548 * emacs.c, eval.c: Use bool for boolean.
7549 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
7550 (malloc_using_checking) [DOUG_LEA_MALLOC]:
7551 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
7552 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
7553 (main, decode_env_path, Fdaemon_initialized):
7554 * eval.c (call_debugger, Finteractive_p, interactive_p):
7555 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
7556 (maybe_call_debugger, Fbacktrace):
7557 * process.c (read_process_output, exec_sentinel):
7558 Use bool for booleans.
7559 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
7560 All callers changed.
7561 * eval.c (interactive_p): Omit always-true boolean argument
7562 EXCLUDE_SUBRS_P. All callers changed.
7563 * dispextern.h, lisp.h: Reflect above API changes.
7564 * firstfile.c (dummy): Use the address of 'main', whose signature
7565 won't change, instead of the address of 'initialize', whose
7566 signature just changed from int to bool.
7567 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
7568 * msdos.c (fatal_error_in_progress): ... from here.
7569 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
7571 (redisplay_internal, unwind_redisplay): Simply clear
7572 REDISPLAYING_P when unwinding, instead of saving its previous,
7573 always-false value and then restoring it.
7575 Clean up some extern decls.
7576 Mostly, this hoists extern decls out of .c files and into .h files.
7577 That way, we're more likely to catch errors if the interfaces change.
7578 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
7579 declare xg_mark_data.
7580 * dispextern.h (x_frame_parm_handlers):
7582 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
7583 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
7584 (Qultra_bold, Qoblique, Qitalic):
7585 Move extern decl here from .c file.
7586 * alloc.c (xg_mark_data) [USE_GTK]:
7588 * eval.c (Qlexical_binding):
7589 * fns.c (time) [!HAVE_UNISTD_H]:
7590 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
7591 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
7592 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
7593 * lread.c (Qinternal_interpreter_environment):
7594 * minibuf.c (Qbuffer):
7595 * process.c (QCfamily, QCfilter):
7596 * widget.c (free_frame_faces):
7597 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
7598 * xfont.c (x_clear_errors):
7599 * xterm.c (x_frame_parm_handlers):
7600 Remove now-redundant extern decls.
7601 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
7602 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
7604 * xfaces.c: Remove unnecessary static decls.
7605 * xterm.c (updating_frame): Remove decl of nonexistent object.
7607 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
7608 when building globals.h, as the objects that are not built on
7609 this host are not needed to compile C files on this host.
7611 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
7613 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
7615 * frame.h: Add missing prototype for x_wm_set_size_hint.
7617 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7619 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
7620 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
7621 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
7622 (Fsubstitute_command_keys):
7623 * editfns.c (region_limit, find_field, Fconstrain_to_field)
7624 (save_excursion_save, save_excursion_restore)
7625 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
7626 (format_time_string, general_insert_function)
7627 (make_buffer_string, make_buffer_string_both)
7628 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
7629 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
7630 (copy_text, insert_1, insert_1_both, insert_from_string)
7631 (insert_from_string_before_markers, insert_from_string_1)
7632 (insert_from_buffer, insert_from_buffer_1, replace_range)
7633 (replace_range_2, del_range_1, del_range_byte, del_range_both)
7634 (del_range_2, modify_region):
7635 * intervals.c (intervals_equal, balance_possible_root_interval)
7636 (adjust_intervals_for_insertion, merge_properties_sticky)
7637 (graft_intervals_into_buffer, lookup_char_property)
7638 (adjust_for_invis_intang, set_point_both)
7639 (get_property_and_range, compare_string_intervals)
7640 (set_intervals_multibyte_1, set_intervals_multibyte):
7641 * keyboard.c (decode_timer):
7642 Use bool for boolean.
7643 * intervals.h, lisp.h, systime.h: Reflect above API changes.
7644 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
7646 2012-09-02 Chong Yidong <cyd@gnu.org>
7648 * keymap.c (push_key_description): Print M-TAB as C-M-i
7651 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
7653 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
7654 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
7655 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
7656 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
7657 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
7658 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
7659 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
7661 2012-09-01 Eli Zaretskii <eliz@gnu.org>
7663 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
7664 more than one grapheme cluster passed to the shaper: compute the
7665 offset adjustment values separately for each cluster. (Bug#11860)
7667 * image.c: Restore mistakenly removed inclusion of w32.h. Without
7668 it, GCC doesn't see prototypes of w32_delayed_load, and complains
7669 about implicit conversions from integer to pointer.
7671 2012-09-01 Daniel Colascione <dancol@dancol.org>
7673 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
7674 system used too early.
7676 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
7678 Better seed support for (random).
7679 * emacs.c (main): Call init_random.
7680 * fns.c (Frandom): Set the seed from a string argument, if given.
7681 Remove long-obsolete Gentzel cruft.
7682 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
7683 (init_random): New function.
7685 2012-09-01 Daniel Colascione <dancol@dancol.org>
7687 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
7688 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
7689 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
7690 x_wm_set_size_hint, x_query_colors, x_real_positions,
7691 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
7692 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
7693 all of which have been moved to common code.
7695 * xfaces.c: Include TERM_HEADER instead of listing all possible
7696 window-system headers.
7698 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
7701 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
7702 directly accessing frame internals.
7704 * w32font.h: Include font.h. Define syms_of_w32font and
7707 * process.c: Include TERM_HEADER instead of listing all possible
7708 window-system headers.
7710 * nsterm.h: Remove declarations now in frame.h.
7711 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
7713 * menu.c: Include TERM_HEADER instead of listing all possible
7714 window-system headers.
7716 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
7719 * keyboard.c: Include TERM_HEADER instead of listing all possible
7720 window-system headers.
7722 * image.c: Include TERM_HEADER instead of listing all possible
7723 window-system headers. Declare Vlibrary_cache when compiling for
7726 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
7727 window system declarations.
7729 * frame.h: Move common functions here: set_frame_menubar,
7730 x_set_window_size, x_sync, x_get_focus_frame,
7731 x_set_mouse_position, x_set_mouse_pixel_position,
7732 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
7733 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
7734 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
7735 x_activate_menubar, x_real_positions, x_bitmap_icon,
7736 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
7739 * frame.c: Include TERM_HEADER instead of listing all possible
7740 window-system headers.
7742 * font.c: Include TERM_HEADER instead of listing all possible
7743 window-system headers.
7745 * emacs.c: Include TERM_HEADER.
7747 * dispnew.c: Include TERM_HEADER instead of listing all possible
7748 window-system headers.
7750 * ccl.h: Include character.h.
7752 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
7753 the current window system; include in list of objects to link into
7756 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7758 Remove mark_ttys function and fix tty_display_info initialization.
7759 * lisp.h (mark_ttys): Remove prototype.
7760 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
7761 to mark_ttys because all possible values of 'top_frame' slot are
7762 the frames which are reachable from Vframe_list.
7763 * term.c (mark_ttys): Remove.
7764 (init_tty): Safely initialize 'top_frame' slot with Qnil.
7766 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7768 Change struct frame bitfields from unsigned char to unsigned.
7769 * frame.h (struct frame): Change type of 'display_preempted',
7770 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
7771 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
7772 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
7773 bitfields from unsigned char to unsigned.
7775 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7777 Remove unused member of struct x_output and struct w32_output.
7778 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
7779 * w32term.h (struct w32_output): Likewise.
7781 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
7783 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
7784 does not become zero (Bug#12234).
7786 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
7788 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
7789 for GCC 4.7.1 x86-64.
7791 2012-08-30 Glenn Morris <rgm@gnu.org>
7793 * lread.c (init_lread): For out-of-tree builds, only add the
7794 source directory's site-lisp dir to the load-path if it exists,
7795 consistent with in-tree builds. (Bug#12302)
7797 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
7799 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
7800 button_values to NULL. Call setStykeMask so dialogs get a close button.
7801 (windowShouldClose:): Set window_closed.
7802 (dealloc): New member, free button_values.
7803 (process_dialog:): Make member function. Remove window argument,
7804 replace window with self. Count buttons and allocate and store values
7806 (addButton:value:row:): value is int with the name tag. Call setTag
7807 with tag. Remove return self, declare return value as void.
7808 (addString:row:): Remove return self, declare return value as void.
7809 (addSplit): Remove return self, declare return value as void.
7810 (clicked:): Remove return self, declare return value as void.
7811 Set dialog_return to button_values[seltag]. Code formatting change.
7812 (initFromContents:isQuestion:): Adjust call to process_dialog.
7813 Code formatting change.
7814 (timeout_handler:): Set timer_fired to YES.
7815 (runDialogAt:): Set timer_fired to NO.
7816 Handle click on close button as quit.
7818 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
7819 Add window_closed and button_values. Add void as return value for
7820 add(Button|String|Split). addButton takes int instead of Lisp_Object.
7821 Add process_dialog as new member.
7823 2012-08-28 Eli Zaretskii <eliz@gnu.org>
7825 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
7826 is not one of the heaps we manage. (Bug#12242)
7828 2012-08-28 Glenn Morris <rgm@gnu.org>
7830 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
7832 2012-08-28 Martin Rudalics <rudalics@gmx.at>
7834 * window.c (Fset_window_configuration): Remove handling of
7835 auto-buffer-name window parameter. Install revision of reverted
7838 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7840 Do not allow to set major mode for a dead buffer.
7841 * buffer.c (Fset_buffer_major_mode): Signal an error
7842 if the buffer is dead.
7843 (Fother_buffer, other_buffer_safely): Remove redundant
7846 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7848 Always use set_buffer_if_live to restore original buffer at unwind.
7849 * buffer.h (record_unwind_current_buffer): New function.
7850 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
7851 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
7852 * undo.c, window.c: Adjust users.
7853 * buffer.c (set_buffer_if_live): Fix comment.
7855 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7857 Fix usage of set_buffer_internal.
7858 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
7859 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
7860 * coding.c (decode_coding): Omit redundant test.
7861 * fileio.c (decide_coding_unwind): Likewise.
7862 * fns.c (secure_hash): Likewise.
7863 * insdel.c (modify_region): Likewise.
7864 * keyboard.c (command_loop_1): Likewise.
7865 * print.c (PRINTFINISH): Likewise.
7866 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
7868 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7870 * dispnew.c: Use bool for boolean.
7871 (frame_garbaged, display_completed, delayed_size_change)
7872 (fonts_changed_p, add_window_display_history)
7873 (add_frame_display_history, verify_row_hash)
7874 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
7875 (row_equal_p, realloc_glyph_pool)
7876 (allocate_matrices_for_frame_redisplay)
7877 (showing_window_margins_p)
7878 (adjust_frame_glyphs_for_frame_redisplay)
7879 (build_frame_matrix_from_leaf_window, make_current)
7880 (mirrored_line_dance, mirror_line_dance, update_frame)
7881 (update_window_tree, update_single_window)
7882 (check_current_matrix_flags, update_window, update_text_area)
7883 (update_window_line, set_window_update_flags, scrolling_window)
7884 (update_frame_1, scrolling, buffer_posn_from_coords)
7885 (do_pending_window_change, change_frame_size)
7886 (change_frame_size_1, sit_for):
7887 Use bool for boolean.
7888 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
7889 and remove last int (actually boolean) argument, which was always 0.
7890 All callers changed.
7891 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
7892 * dispextern.h (struct composition_it): Use bool for boolean.
7893 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
7894 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
7895 * dired.c (file_name_completion):
7896 Use bool for boolean. (This was missed in an earlier change.)
7898 2012-08-27 Martin Rudalics <rudalics@gmx.at>
7900 * window.c (Fset_window_configuration): Revert first part of
7903 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
7905 * nsterm.h (NSPanel): New class variable dialog_return.
7907 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
7908 Initialize dialog_return.
7909 (windowShouldClose:): Use stop instead of stopModalWithCode.
7910 (clicked:): Ditto, and also set dialog_return (Bug#12258).
7911 (timeout_handler:): Use stop instead of abortModal. Send a dummy
7913 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
7916 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7918 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
7919 * composite.c (find_composition, composition_gstring_p)
7920 (composition_reseat_it, find_automatic_composition):
7921 * data.c (let_shadows_buffer_binding_p)
7922 (let_shadows_global_binding_p, set_internal, make_blv)
7923 (Fmake_variable_buffer_local, Fmake_local_variable)
7924 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
7925 (cons_to_signed, arith_driver):
7926 * dbusbind.c (xd_in_read_queued_messages):
7927 * dired.c (directory_files_internal, file_name_completion):
7928 Use bool for booleans.
7929 * dired.c (file_name_completion):
7930 * process.h (fd_callback):
7931 Omit int (actually boolean) argument. It wasn't being used.
7933 * composite.h, lisp.h: Reflect above API changes.
7935 * cmds.c, coding.c: Use bool for booleans.
7936 * cmds.c (move_point, Fself_insert_command):
7937 * coding.h (struct composition status, struct coding_system):
7938 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
7939 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
7940 (emacs_mule_char, decode_coding_emacs_mule)
7941 (encode_coding_emacs_mule, detect_coding_iso_2022)
7942 (decode_coding_iso_2022, encode_invocation_designation)
7943 (encode_designation_at_bol, encode_coding_iso_2022)
7944 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
7945 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
7946 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
7947 (encode_coding_raw_text, detect_coding_charset)
7948 (decode_coding_charset, encode_coding_charset, detect_eol)
7949 (detect_coding, get_translation_table, produce_chars)
7950 (consume_chars, reused_workbuf_in_use)
7951 (make_conversion_work_buffer, code_conversion_save)
7952 (decode_coding_object, encode_coding_object)
7953 (detect_coding_system, char_encodable_p)
7954 (Funencodable_char_position, code_convert_region)
7955 (code_convert_string, code_convert_string_norecord)
7956 (Fset_coding_system_priority):
7957 * fileio.c (Finsert_file_contents):
7958 Use bool for booleans.
7959 * coding.h, lisp.h: Reflect above API changes.
7960 * coding.c: Remove unnecessary static function decls.
7961 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
7962 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
7963 not a boolean 'int', since callers never look at the return value.
7964 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
7965 * coding.h (decoding_buffer_size, encoding_buffer_size)
7966 (emacs_mule_string_char): Remove unused extern decls.
7967 (struct iso_2022_spec, struct coding_system):
7968 Use 'unsigned int : 1' for boolean fields, since there's more than one.
7969 (struct emacs_mule_spec): Remove unused field 'full_support'.
7970 All initializations removed.
7971 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
7973 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7975 Fix spare memory change (Bug#12286).
7976 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
7977 (valid_lisp_object_p): Likewise.
7979 2012-08-27 Martin Rudalics <rudalics@gmx.at>
7981 * window.c (Fset_window_configuration): Record any window's old
7982 buffer if it's replaced (see Bug#8789). If the new current
7983 buffer doesn't appear in the selected window, go to its old
7986 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7988 Special MEM_TYPE_SPARE to denote reserved memory.
7989 * alloc.c (enum mem_type): New memory type.
7990 (refill_memory_reserve): Use new type for spare memory.
7991 This prevents live_cons_p and live_string_p from incorrect
7992 detection of uninitialized objects from spare memory as live.
7994 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
7997 * Makefile.in (.PHONY): versioclean -> versionclean.
7999 Remove unused external symbols.
8000 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
8001 * window.c (Qwindow_valid_p, decode_valid_window):
8002 Now static, not extern.
8003 * data.c (Qinterval): Remove; unused.
8004 (syms_of_data): Do not define 'interval'.
8005 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
8006 * window.h (decode_valid_window):
8009 * character.c, charset.c, chartab.c: Use bool for booleans.
8010 * character.c (lisp_string_width, string_count_byte8)
8011 (string_escape_byte8):
8012 * charset.c (charset_map_loaded, load_charset_map, read_hex):
8013 (load_charset_map_from_file, map_charset_chars)
8014 (Fdefine_charset_internal, define_charset_internal)
8015 (Fdeclare_equiv_charset, find_charsets_in_text)
8016 (Ffind_charset_region, char_charset, Fiso_charset):
8017 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
8018 (sub_char_table_set, sub_char_table_set_range)
8019 (char_table_set_range, optimize_sub_char_table)
8020 (map_sub_char_table):
8021 Use bool for boolean.
8022 * character.c (str_to_unibyte): Omit last boolean argument; it was
8023 always 0. All callers changed.
8024 * character.h, charset.h: Adjust to match previous changes.
8025 * character.h (char_printable_p): Remove decl of nonexistent function.
8026 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
8027 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
8028 are all boolean, so make them single-bit bitfields.
8030 * lisp.h (ASET): Remove attempt to detect side effects.
8031 It was meant to be temporary and it often doesn't work,
8032 because when IDX has side effects the behavior of IDX==IDX
8033 is undefined. See Stefan Monnier in
8034 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
8036 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
8038 * lisp.h (functionp): New function (extracted from Ffunctionp).
8039 (FUNCTIONP): Use it.
8040 * eval.c (Ffunctionp): Use it.
8042 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
8044 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
8045 as that's faster and simpler than static storage. Don't bother
8046 with the g_main_context_query overhead if g_main_context_pending
8047 says no events are pending.
8048 (gfds, gfds_size): Remove these static vars.
8049 (xgselect_initialize): Remove; no longer needed.
8050 All uses and decls removed.
8052 * emacs.c (fatal_error_signal_hook): Remove.
8053 All uses removed. This leftover from old code was always 0.
8055 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
8056 * casefiddle.c (casify_object, casify_region):
8057 * casetab.c (set_case_table):
8058 * category.c, category.h (word_boundary_p):
8059 * category.h (CHAR_HAS_CATEGORY):
8060 Use bool for booleans, instead of int.
8062 2012-08-25 Eli Zaretskii <eliz@gnu.org>
8064 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
8066 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
8068 On assertion failure, print backtrace if available.
8069 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
8070 (die) [ENABLE_CHECKING]: Print a backtrace if available.
8071 * Makefile.in (LIB_EXECINFO): New macro.
8074 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
8075 * bytecode.c (exec_byte_code):
8076 * callint.c (check_mark, Fcall_interactively):
8077 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
8078 (getenv_internal, sync_process_alive, call_process_exited):
8079 * lisp.h (USE_SAFE_ALLOCA):
8080 Use bool for booleans, instead of int.
8081 * lisp.h, process.h: Adjust prototypes to match above changes.
8082 * callint.c (Fcall_interactively): Don't assume the mark's
8083 offset fits in 'int'.
8085 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
8087 * buffer.c, buffer.h: Use bool for boolean.
8088 * buffer.c (reset_buffer_local_variables)
8089 (buffer_lisp_local_variables, Fset_buffer_modified_p)
8090 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
8091 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
8092 (overlay_touches_p, overlay_strings, Foverlay_put)
8093 (report_overlay_modification, call_overlay_mod_hooks):
8094 (mmap_enlarge, mmap_set_vars):
8095 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
8096 Use bool for booleans, instead of int.
8097 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
8098 since the 1-or-0 return value is always ignored anyway.
8099 (mmap_initialized_p):
8100 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
8101 * buffer.h, lisp.h: Adjust prototypes to match above changes.
8103 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
8105 * bidi.c: Use bool for boolean.
8106 This is a bit more readable, and makes the text segment of bidi.o
8107 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
8108 Presumably it's faster too.
8109 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
8111 (bidi_cache_find_level_change, bidi_cache_iterator_state)
8112 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
8113 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
8114 (bidi_explicit_dir_char, bidi_level_of_next_char)
8115 (bidi_find_other_level_edge, bidi_move_to_visually_next):
8116 Use bool for booleans, instead of int.
8117 * dispextern.h (bidi_init_it, bidi_paragraph_init)
8118 (bidi_unshelve_cache): Adjust decls to match code.
8120 2012-08-23 Martin Rudalics <rudalics@gmx.at>
8122 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
8125 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
8127 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
8128 * atimer.h: Include <stdbool.h>.
8130 2012-08-22 Dan Nicolaescu <dann@gnu.org>
8132 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
8133 compile time tests instead of run time tests on systems that do
8135 (FRAME_MAC_P): Remove leftover from deleted code.
8136 * frame.c (syms_of_frame): Remove leftover from deleted code.
8138 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
8140 * nsterm.m (insertText:): Don't clear modifiers if code is space.
8142 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
8144 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
8145 Otherwise, the compiler complains about (A?B:C) where B is void
8146 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
8147 (fontset_add): Return void, for FONTSET_ADD.
8149 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8151 * alloc.c: Use bool for booleans.
8152 (gc_in_progress, abort_on_gc)
8153 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
8154 (dont_register_blocks) [GC_MALLOC_CHECK]:
8155 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
8156 (check_string_bytes, make_specified_string, memory_full)
8157 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
8158 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
8159 (mark_stack, valid_pointer_p, make_pure_string)
8160 (Fgarbage_collect, survives_gc_p, gc_sweep):
8161 Use bool for booleans, instead of int.
8162 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
8163 Remove unused local.
8164 * alloc.c (PURE_POINTER_P):
8165 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
8166 * editfns.c (Fformat):
8167 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
8169 * fns.c (sweep_weak_table):
8170 * lisp.h (suppress_checking, push_message, survives_gc_p)
8171 (make_pure_string, gc_in_progress, abort_on_gc):
8172 * lread.c (readchar, read1):
8173 * print.c (Fprin1_to_string):
8174 * xdisp.c (push_message):
8175 Use bool for booleans affected directly or indirectly by
8178 Make recently-introduced setters macros.
8179 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
8180 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
8181 (set_fontset_default, set_fontset_fallback): Rename from their
8182 upper-case counterparts, and make them functions rather than macros.
8183 This is more consistent with the other recently-introduced setters.
8184 These don't need to be inline, since they're local.
8186 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
8188 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
8189 the loop (Bug#12247).
8191 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8193 * lisp.h (vcopy): Use memcpy rather than our own loop.
8194 This fixes a performance regression introduced by the recent
8195 addition of vcopy. This means 'vcopy' will need to be modified
8196 for a copying collector, but that's OK. Also, tighten the
8197 checking in the assertion.
8199 2012-08-21 Eli Zaretskii <eliz@gnu.org>
8201 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
8202 components for RTL text (Bug#11860). Adjust X-OFFSET of each
8203 non-base glyph for the width of the base character, according to
8204 what x_draw_composite_glyph_string_foreground expects.
8205 Generate WADJUST value according to composition_gstring_width's
8206 expectations, to produce correct width of the composed character.
8207 Reverse the sign of the DU offset produced by ScriptPlace.
8209 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8211 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
8213 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8215 Avoid direct writes to contents member of struct Lisp_Vector.
8216 * lisp.h (vcopy): New function to copy data into vector.
8217 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
8218 * fns.c (Ffillarray): Use ASET.
8219 * keyboard.c (timer_check_2): Use AREF and ASET.
8220 (append_tool_bar_item, Frecent_keys): Use vcopy.
8221 * lread.c (read_vector): Use ASET.
8222 * msdos.c (Frecent_doskeys): Use vcopy.
8223 * xface.c (Finternal_copy_lisp_face): Use vcopy.
8224 (Finternal_merge_in_global_face): Use ASET and vcopy.
8225 * xfont.c (xfont_list_pattern): Likewise.
8227 2012-08-21 Martin Rudalics <rudalics@gmx.at>
8229 * window.c (Fwindow_point): For the selected window always return
8230 the position of its buffer's point.
8231 (Fset_window_point): For the selected window always go in its
8232 buffer to the specified position.
8234 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8236 Setter macros for fontsets.
8237 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
8238 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
8239 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
8242 2012-08-20 Glenn Morris <rgm@gnu.org>
8244 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
8245 Don't assume that `ln -f' works.
8247 2012-08-20 Eli Zaretskii <eliz@gnu.org>
8249 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
8250 and later about non-assignments with no effect. See discussion at
8251 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
8254 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8256 Inline setter functions for Lisp_Objects slots of struct specbinding.
8257 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
8260 2012-08-20 Martin Rudalics <rudalics@gmx.at>
8262 * window.c (select_window): Always make selected window's buffer
8265 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8267 Use AREF and ASET for docstrings of category tables.
8268 * category.h (CATEGORY_DOCSTRING): Use AREF.
8269 (SET_CATEGORY_DOCSTRING): Use ASET.
8270 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
8272 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8274 Inline setter functions for hash table members.
8275 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
8276 (set_hash_hash, set_hash_index): Rename with _slot suffix.
8277 (set_hash_key_and_value, set_hash_index, set_hash_next)
8278 (set_hash_hash): New functions.
8279 * charset.c, fns.c: Adjust users.
8281 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8283 Inline getter and setter functions for per-buffer values.
8284 * buffer.h (per_buffer_default, set_per_buffer_default)
8285 (per_buffer_value, set_per_buffer_value): New functions.
8286 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
8287 * buffer.c, data.c: Adjust users.
8289 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
8291 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
8293 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
8295 Rely on <config.h> + <unistd.h> to declare 'environ',
8296 as gnulib does this if the system doesn't.
8297 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
8298 Remove declaration. MS-Windows declares it on stdlib.h which is
8299 included by conf_post.h.
8300 * emacs.c (environ) [DOUG_LEA_MALLOC]:
8301 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
8302 * vm-limit.c: Include <unistd.h>, for 'environ'.
8304 * unexaix.c, unexcoff.c: Include "mem-limits.h".
8305 (start_of_data): Remove decl; mem-limits.h provides it.
8307 * xdisp.c (handle_invisible_prop): Make it a bit faster
8308 and avoid a gcc -Wmaybe-uninitialized diagnostic.
8310 2012-08-19 Chong Yidong <cyd@gnu.org>
8312 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
8315 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
8317 * .gdbinit: Use call instead of set when calling a function in the
8320 * data.c (set_internal): Don't use set_blv_found.
8321 (Fkill_local_variable): Likewise.
8323 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
8325 * nsfont.m (ns_ascii_average_width): Ensure the string
8326 ascii_printable is initialized with a null-terminated character
8327 array. Otherwise, it can contain undesired extra characters.
8329 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8331 port new setting code to Sun C 5.8 2005/10/13
8332 * chartab.c, lisp.h (char_table_set, char_table_set_range):
8333 Return void, not Lisp_Object. Otherwise, the compiler
8334 complains about (A?B:C) where B is void and C is Lisp_Object
8335 when compiling CHAR_TABLE_SET, due to the recent change to
8336 the API of sub_char_table_set_contents.
8338 2012-08-18 Chong Yidong <cyd@gnu.org>
8340 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
8341 for the string case (Bug#3874).
8343 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8345 * buffer.h (BSET): Remove (Bug#12215).
8346 Replace all uses with calls to new setter functions.
8347 (bset_bidi_paragraph_direction, bset_case_canon_table)
8348 (bset_case_eqv_table, bset_directory, bset_display_count)
8349 (bset_display_time, bset_downcase_table)
8350 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
8351 (bset_last_selected_window, bset_local_var_alist)
8352 (bset_mark_active, bset_point_before_scroll, bset_read_only)
8353 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
8355 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
8356 (bset_auto_fill_function, bset_auto_save_file_format)
8357 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
8358 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
8359 (bset_cache_long_line_scans, bset_case_fold_search)
8360 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
8361 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
8362 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
8363 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
8364 (bset_header_line_format, bset_indicate_buffer_boundaries)
8365 (bset_indicate_empty_lines, bset_invisibility_spec)
8366 (bset_left_fringe_width, bset_major_mode, bset_mark)
8367 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
8368 (bset_name, bset_overwrite_mode, bset_pt_marker)
8369 (bset_right_fringe_width, bset_save_length)
8370 (bset_scroll_bar_width, bset_scroll_down_aggressively)
8371 (bset_scroll_up_aggressively, bset_selective_display)
8372 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
8373 (bset_word_wrap, bset_zv_marker):
8374 * category.c (bset_category_table):
8375 * syntax.c (bset_syntax_table):
8376 New setter functions.
8378 * process.h (PSET): Remove (Bug#12215).
8379 Replace all uses with calls to new setter functions.
8380 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8381 (PROCESS_INLINE): New macro.
8382 (pset_childp): New setter function.
8383 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
8384 * process.c (PROCESS_INLINE):
8385 Define to EXTERN_INLINE, so that the corresponding functions
8386 are compiled into code.
8387 (pset_buffer, pset_command, pset_decode_coding_system)
8388 (pset_decoding_buf, pset_encode_coding_system)
8389 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
8390 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
8391 (pset_type, pset_write_queue): New setter functions.
8393 * window.h (WSET): Remove (Bug#12215).
8394 Replace all uses with calls to new setter functions.
8395 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8396 (WINDOW_INLINE): New macro.
8397 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
8398 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
8399 (wset_total_lines, wset_vertical_scroll_bar)
8400 (wset_window_end_pos, wset_window_end_valid)
8401 (wset_window_end_vpos): New setter functions.
8402 * window.c (WINDOW_INLINE):
8403 Define to EXTERN_INLINE, so that the corresponding functions
8404 are compiled into code.
8405 (wset_combination_limit, wset_dedicated, wset_display_table)
8406 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
8407 (wset_new_normal, wset_new_total, wset_next_buffers)
8408 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
8409 (wset_prev_buffers, wset_right_fringe_width)
8410 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
8411 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
8412 (wset_window_parameters):
8413 * xdisp.c (wset_base_line_number, wset_base_line_pos)
8414 (wset_column_number_displayed, wset_region_showing):
8415 New setter functions.
8417 * termhooks.h (TSET): Remove (Bug#12215).
8418 Replace all uses with calls to new setter functions.
8419 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8420 (TERMHOOKS_INLINE): New macro.
8421 (tset_charset_list, tset_selection_alist): New setter functions.
8422 * terminal.c (TERMHOOKS_INLINE):
8423 Define to EXTERN_INLINE, so that the corresponding functions
8424 are compiled into code.
8425 (tset_param_alist): New setter function.
8427 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8429 * keyboard.h (KSET): Remove (Bug#12215).
8430 Replace all uses with calls to new setter functions.
8431 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8432 (KEYBOARD_INLINE): New macro.
8433 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
8434 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
8435 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
8436 New setter functions.
8437 * keyboard.c (KEYBOARD_INLINE):
8438 Define to EXTERN_INLINE, so that the corresponding functions
8439 are compiled into code.
8440 (kset_echo_string, kset_kbd_queue)
8441 (kset_keyboard_translate_table, kset_last_prefix_arg)
8442 (kset_last_repeatable_command, kset_local_function_key_map)
8443 (kset_overriding_terminal_local_map, kset_real_last_command)
8444 (kset_system_key_syms): New setter functions.
8446 * frame.h (FSET): Remove (Bug#12215).
8447 Replace all uses with calls to new setter functions.
8448 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8449 (FRAME_INLINE): New macro.
8450 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
8451 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
8452 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
8453 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
8454 (fset_param_alist, fset_root_window, fset_scroll_bars)
8455 (fset_selected_window, fset_title, fset_tool_bar_items)
8456 (fset_tool_bar_position, fset_tool_bar_window): New functions.
8457 * frame.c (FRAME_INLINE):
8458 Define to EXTERN_INLINE, so that the corresponding functions
8459 are compiled into code.
8460 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
8462 A few more naming-convention fixes for getters and setters.
8463 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
8464 and rename from buffer_overlays_set_before.
8465 (set_buffer_overlays_after): Move here from buffer.h, and rename
8466 from buffer_overlays_set_after.
8467 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
8469 (set_buffer_intervals): Rename from buffer_set_intervals.
8470 * intervals.c (set_interval_object): Move here from intervals.h,
8471 and rename from interval_set_object.
8472 (set_interval_left): Move here from intervals.h, and rename from
8474 (set_interval_right): Move here from intervals.h, and rename from
8476 (copy_interval_parent): Move here from intervals.h, and rename from
8477 interval_copy_parent.
8478 * intervals.h (set_interval_parent): Rename from interval_set_parent.
8479 (set_interval_plist): Rename from interval_set_plist.
8480 Return void, not Lisp_Object, since no caller uses the result.
8481 * lisp.h (string_intervals): Rename from string_get_intervals.
8482 (set_string_intervals): Rename from string_set_intervals.
8484 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
8485 (set_char_table_contents): Rename from char_table_set_contents.
8486 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
8487 All uses changed. See the end of
8488 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
8490 * lisp.h (CSET): Remove (Bug#12215).
8491 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
8492 (set_char_table_purpose): New functions,
8493 replacing CSET. All uses changed. For example, replace
8494 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
8495 "set_char_table_parent (char_table, parent);".
8496 The old version was confusing because it used the same name
8497 'parent' for two different things.
8499 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8501 Functions to get and set Lisp_Object fields of buffer-local variables.
8502 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
8503 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
8504 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
8505 * data.c, eval.c, frame.c: Adjust users.
8507 2012-08-17 Chong Yidong <cyd@gnu.org>
8509 * xfaces.c (merge_face_vectors): If the target font specfies a
8510 font spec, make the font's attributes take precedence over
8511 directly-specified attributes.
8512 (merge_face_ref): Recognize :font.
8514 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8516 Do not use memcpy for copying intervals.
8517 * intervals.c (reproduce_interval): New function.
8518 (reproduce_tree, reproduce_tree_obj): Use it.
8519 (reproduce_tree_obj): Remove prototype.
8521 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8523 * lisp.h (duration_to_sec_usec): Remove unused decl.
8525 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
8527 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
8528 to an allocated instance of NSString, not to the class itself.
8530 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
8532 * makefile.w32-in (C_CTYPE_H): New macro.
8533 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
8534 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
8535 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
8537 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
8539 Use ASCII tests for character types.
8540 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
8542 Don't include <ctype.h>; was not needed.
8543 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
8544 * sysdep.c, xfaces.c:
8545 Include <c-ctype.h> instead of <ctype.h>.
8546 * nsterm.m: Include <c-ctype.h>.
8547 * charset.c (read_hex):
8548 * doc.c (Fsnarf_documentation):
8549 * fileio.c (IS_DRIVE) [WINDOWSNT]:
8550 (DRIVE_LETTER) [DOS_NT]:
8551 (Ffile_name_directory, Fexpand_file_name)
8552 (Fsubstitute_in_file_name):
8553 * font.c (font_parse_xlfd, font_parse_fcname):
8554 * frame.c (x_set_font_backend):
8555 * gtkutil.c (xg_get_font):
8556 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
8557 * nsimage.m (hexchar):
8558 * nsterm.m (ns_xlfd_to_fontname):
8559 * sysdep.c (system_process_attributes):
8560 * xfaces.c (hash_string_case_insensitive):
8561 Use C-locale tests instead of locale-specific tests for character
8562 types, since we want the ASCII interpretation here, not the
8563 interpretation suitable for whatever happens to be the current locale.
8565 2012-08-16 Martin Rudalics <rudalics@gmx.at>
8567 Consistently check windows for validity/liveness
8568 (Bug#11984, Bug#12025, Bug#12026).
8569 * lisp.h (CHECK_VALID_WINDOW): New macro.
8570 * window.c (decode_window): Rename to decode_live_window.
8571 (decode_valid_window, Fwindow_valid_p): New functions.
8572 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
8573 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
8574 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
8575 (Fwindow_prev_sibling, Fwindow_combination_limit)
8576 (Fset_window_combination_limit, Fwindow_use_time)
8577 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
8578 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
8579 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
8580 (Fwindow_hscroll, Fset_window_hscroll)
8581 (Fwindow_redisplay_end_trigger)
8582 (Fset_window_redisplay_end_trigger, Fwindow_edges)
8583 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
8584 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
8585 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
8586 (Fwindow_end, Fset_window_point, Fset_window_start)
8587 (Fpos_visible_in_window_p, Fwindow_line_height)
8588 (Fwindow_dedicated_p, Fset_window_dedicated_p)
8589 (Fwindow_prev_buffers, Fset_window_prev_buffers)
8590 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
8591 (Fset_window_parameter, Fwindow_display_table)
8592 (Fset_window_display_table, Fdelete_other_windows_internal)
8593 (Fset_window_buffer, Fset_window_new_total)
8594 (Fset_window_new_normal, Fdelete_window_internal)
8595 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
8596 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
8597 (Fwindow_scroll_bars): Check whether argument window is a valid or
8598 live window. Update doc-strings.
8599 (syms_of_window): New symbol Qwindow_valid_p.
8600 * keyboard.c (Fposn_at_x_y): Check whether argument
8601 frame_or_window denotes a valid window.
8603 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8605 Fix previous char table change.
8606 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
8607 * chartab.c (optimize_sub_char_table): Likewise.
8609 2012-08-16 Chong Yidong <cyd@gnu.org>
8611 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
8613 * xfont.c (xfont_open):
8614 * xftfont.c (xftfont_open): Set the font's max_width field.
8616 * nsfont.m (nsfont_open): Similar to the Xft backend, set
8617 min_width to space_width and average_width to the average over
8618 printable ASCII characters.
8619 (ns_char_width): Code cleanup.
8620 (ns_ascii_average_width): New utility function.
8622 * font.h (struct font): Update comments.
8624 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8626 Simple interface to set Lisp_Object fields of character tables.
8627 * lisp.h (CSET): New macro.
8628 (char_table_set_extras, char_table_set_contents)
8629 (sub_char_table_set_contents): New function.
8630 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
8631 * syntax.c: Adjust users.
8633 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
8635 * eval.c (eval_sub): Bind lexical-binding.
8636 * lread.c (Qlexical_binding): Make non-static.
8638 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
8640 * nsmenu.m (popupSession): Remove.
8641 (pop_down_menu): Remove endModalSession.
8642 (timeout_handler:): New method.
8643 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
8644 Call runModalForWindow. Check timer_fired when it returns.
8645 If not set, cancel timer and break out of loop.
8646 Otherwise loop again, with a new timeout.
8648 * nsterm.m: Include fcntl.h if present.
8649 (fd_entry, t_readfds, inNsSelect): Remove.
8650 (select_writefds, select_valid, select_timeout, selfds)
8651 (select_mutex, apploopnr): Add.
8652 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
8653 Otherwise call kbd_buffer_store_event.
8654 (ns_send_appdefined): Remove release of fd_entry.
8655 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
8656 Increment and decrement apploopnr.
8657 (ns_select): If no file descriptors, just do a NSTimer.
8658 Otherwise copy read/write masks and start select thread (fd_handler).
8659 Start main loop and wait for application defined event.
8660 Inform select thread to stop selecting after main loop is exited.
8661 (ns_term_init): Create selfds pipe and set non-blocking.
8662 Initialize select_mutex. Start the select thread (fd_handler).
8663 (fd_handler:): Loop forever, wait for info from the main thread
8664 to either start or stop selecting. When select returns, send
8665 and appdefined event.
8666 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
8667 If not call kbd_buffer_store_event.
8669 * nsterm.h (EmacsApp): fd_handler takes id argument.
8670 (EmacsDialogPanel): Add timer_fired and timeout_handler.
8672 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
8674 2012-08-15 Eli Zaretskii <eliz@gnu.org>
8676 * region-cache.c (move_cache_gap): Update gap_len using the actual
8677 growth of the boundaries array. Do not change cache_len.
8680 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8682 Generalize and cleanup font subsystem checks.
8683 * font.h (FONT_DEBUG, font_assert): Remove.
8684 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
8685 Change font_assert to eassert. Use eassert where appropriate.
8687 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8689 * gtkutil.c (xg_get_font): Use pango_units_to_double.
8691 2012-08-15 Chong Yidong <cyd@gnu.org>
8693 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
8694 When using the new font chooser, use gtk_font_chooser_get_font_desc to
8695 extract the font descriptor instead of just the font name.
8696 In that case, return a font spec instead of a string.
8697 (x_last_font_name): Move to this file from xfns.c.
8699 * xfns.c (Fx_select_font): The return value can also be a font
8700 spec. Move x_last_font_name management to gtkutil.c.
8702 * xfaces.c: Make font weight and style symbols non-static.
8704 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
8706 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
8709 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
8711 * alloc.c (Fgarbage_collect): Use plural form consistently.
8713 2012-08-14 Eli Zaretskii <eliz@gnu.org>
8715 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
8716 iteration through the command loop. Fixes a problem whereby mouse
8717 movements are ignored until the first mouse click.
8719 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8721 Use bool, not int, for Lisp booleans.
8722 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
8723 makes Emacs a bit smaller and presumably a bit faster.
8724 * lisp.h: Include <stdbool.h>.
8725 (struct Lisp_Boolfwd, defvar_bool):
8726 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
8727 * regex.c [!emacs]: Include <stdbool.h>.
8728 (false, true): Remove; <stdbool.h> does this for us now.
8730 2012-08-14 Chong Yidong <cyd@gnu.org>
8732 * character.c (Fcharacterp): Doc fix (Bug#12076).
8734 * data.c (Findirect_variable): Doc fix (Bug#11040).
8736 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
8738 * editfns.c (Fformat): Doc fix (Bug#12059).
8739 (Fsave_current_buffer): Doc fix (Bug#11542).
8741 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
8743 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
8746 2012-08-14 Martin Rudalics <rudalics@gmx.at>
8748 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
8749 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
8750 * minibuf.c (choose_minibuf_frame, read_minibuf):
8751 * w32fns.c (x_create_tip_frame):
8752 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
8753 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
8755 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8757 * intervals.c (offset_intervals): Remove obsolete comment.
8759 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
8761 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
8763 2012-08-14 Gergely Risko <gergely@risko.hu>
8765 * coding.c (decode_coding): Record buffer modification before
8766 disabling undo_list (Bug#11773).
8768 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8770 Revert and cleanup some recent overlay changes.
8771 * buffer.h (enum overlay_type): Remove.
8772 (buffer_get_overlays, buffer_set_overlays): Likewise.
8773 (buffer_set_overlays_before, buffer_set_overlays_after):
8774 New function. Adjust users.
8775 (unchain_both): Add eassert.
8777 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8779 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
8781 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8783 * gtkutil.c (xg_mark_data): Don't assume C99.
8785 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
8787 * gtkutil.c (xg_frame_tb_info): New struct.
8788 (TB_INFO_KEY): New define.
8789 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
8790 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
8791 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
8793 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
8794 is up to date. Otherwise store new data.
8795 (free_frame_tool_bar): Free xg_frame_tb_info if present.
8797 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8799 Use KSET for write access to Lisp_Object members of struct kboard.
8800 * keyboard.h (KSET): New macro.
8801 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
8802 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
8803 * xterm.c: Adjust users.
8805 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8807 Use BSET for write access to Lisp_Object members of struct buffer.
8808 * buffer.h (BSET): New macro.
8809 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
8810 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
8811 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
8812 * window.c, xdisp.c, xfns.c: Adjust users.
8814 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
8816 * lread.c (syms_of_lread): Initialize Vlexical_binding.
8818 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
8820 * nsterm.m (not_in_argv): New function.
8821 (application:openFile, application:openTempFile:):
8822 (application:openFileWithoutUI:, application:openFiles:): Open file
8823 if not_in_argv returns non-zero (bug#12171).
8825 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
8826 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
8827 Define for Gtk+ versions less than 3.2.
8828 (xg_get_font_name): Use those functions/macros here.
8829 Reported by Frans Oilinki <moilinki@gmail.com>.
8831 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8833 * unexmacosx.c (copy_data_segment): Copy initialized data in
8834 statically linked libraries from input file rather than memory.
8836 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
8837 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
8838 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
8840 2012-08-10 Glenn Morris <rgm@gnu.org>
8842 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
8843 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
8845 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8847 Fix last change to allow compilation with low optimization levels.
8848 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
8849 Reported by Jan Djärv <jan.h.d@swipnet.se>.
8851 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8853 Use common inline syntax in intervals.h.
8854 * intervals.h (INTERVALS_INLINE): New macro.
8855 Change all users from LISP_INLINE.
8857 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8859 Define Qnone once for all platforms.
8860 * frame.c (Qnone): Define here.
8861 (syms_of_frame): DEFSYM it.
8862 * lisp.h (Qnone): New declaration.
8863 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
8864 * xfns.c: Remove duplication. Adjust users.
8866 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8868 Remove unused macros from intervals.h.
8869 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
8870 * intervals.c: Adjust comment.
8872 2012-08-10 Eli Zaretskii <eliz@gnu.org>
8874 * w32fns.c <w32_unicode_gui>: New static variable.
8875 (globals_of_w32fns): Initialize it according to os_subtype.
8876 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
8879 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
8880 Eli Zaretskii <eliz@gnu.org>
8882 Fix bug #10299 with Unicode characters sent by customized
8883 keyboards created by MSKLC.
8884 * w32fns.c (INIT_WINDOW_CLASS): New macro.
8885 (w32_init_class): Use it to initialize the Emacs class with either
8886 ANSI or Unicode API calls.
8887 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
8889 (w32_wnd_proc): If the character code sent by WM_CHAR or
8890 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
8891 original message. Call DefWindowProcW on NT and later.
8893 2012-08-10 Glenn Morris <rgm@gnu.org>
8895 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
8897 * lisp.h (DIRECTORY_SEP): Let configure set it.
8899 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
8901 Use TSET for write access to Lisp_Object slots of struct terminal.
8902 * termhooks.h (TSET): New macro.
8903 * coding.c, terminal.c, xselect.c: Adjust users.
8905 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
8907 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
8908 the failing expression, include them in the error message.
8909 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
8910 * lisp.h (internal_condition_case_n): Update declaration.
8912 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8914 Inline functions to examine and change buffer overlays.
8915 * buffer.c (unchain_both): New function.
8916 * buffer.h (buffer_get_overlays, buffer_set_overlays):
8917 (buffer_has_overlays): New function.
8918 (enum overlay_type): New enum.
8919 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
8920 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
8922 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8924 Inline functions to examine and change buffer intervals.
8925 * alloc.c (mark_interval_tree): Remove.
8926 (MARK_INTERVAL_TREE): Simplify.
8927 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
8928 * intervals.c (buffer_balance_intervals): New function.
8929 (graft_intervals_into_buffer): Adjust indentation.
8930 (set_intervals_multibyte): Simplify.
8931 * buffer.h (BUF_INTERVALS): Remove.
8932 (buffer_get_intervals, buffer_set_intervals): New function.
8933 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
8934 * intervals.c, textprop.c: Adjust users.
8936 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8938 Inline functions to examine and change string intervals.
8939 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
8940 (string_get_intervals, string_set_intervals): New function.
8941 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
8942 * lread.c, print.c, textprop.c: Adjust users.
8944 2012-08-08 Glenn Morris <rgm@gnu.org>
8946 * lisp.mk (lisp): Remove language/persian.elc.
8948 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8951 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
8952 (NULL_INTERVAL_P): Likewise. Adjust users.
8953 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
8954 Adjust comment. Move under #if 0.
8955 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
8956 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
8958 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8960 Check total length of intervals with eassert.
8961 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
8962 * intervals.c: Change all users to eassert.
8964 2012-08-07 Eli Zaretskii <eliz@gnu.org>
8966 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
8967 Rename fields to match removal of FGET and WGET and disuse of
8968 INTERNAL_FIELD in Lisp_Cons.
8970 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8972 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
8973 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
8974 name since all xname users are fixed long time ago. Do not
8976 (set_symbol_name, set_symbol_function, set_symbol_plist):
8977 (set_symbol_next, set_overlay_plist): New function.
8978 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
8979 (struct Lisp_Overlay): Likewise.
8980 (CVAR, MVAR, SVAR): Remove.
8981 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
8982 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
8983 * xterm.c: Adjust users.
8984 * .gdbinit: Change to use name field of struct Lisp_Symbol
8987 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8989 Basic functions to set Lisp_Object and pointer slots of intervals.
8990 * intervals.h (interval_set_parent, interval_set_object):
8991 (interval_set_left, interval_set_right, interval_set_plist):
8992 (interval_copy_parent): New function.
8993 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
8994 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
8996 (INTERVAL_SIZE): Remove. Adjust users.
8997 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
8999 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9001 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
9002 * process.h (PGET): Remove.
9003 (struct Lisp_Process): Do not use INTERNAL_FIELD.
9004 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
9006 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9008 Drop WGET and revert read access to Lisp_Objects slots of struct window.
9009 * window.h (WGET): Remove.
9010 (struct window): Do not use INTERNAL_FIELD.
9011 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
9012 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
9013 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
9014 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
9015 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
9018 2012-08-07 Chong Yidong <cyd@gnu.org>
9020 * window.c (Fwindow_edges, Fwindow_pixel_edges)
9021 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
9022 (Fdelete_window_internal): Signal an error if the window is not on
9023 a live frame (Bug#12025).
9025 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9027 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
9028 * frame.h (FGET): Remove.
9029 (struct frame): Do not use INTERNAL_FIELD.
9030 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
9031 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
9032 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
9033 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
9035 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
9037 * w32.c: Silence compiler warnings.
9038 (map_w32_filename): Remove unused variable `is_fat'.
9039 (chase_symlinks): Add parentheses around expression.
9041 2012-08-06 Glenn Morris <rgm@gnu.org>
9043 * sysdep.c: Respect BROKEN_GETWD.
9045 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
9046 Let configure handle it.
9047 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
9049 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9051 Use GCALIGNMENT where appropriate.
9052 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
9053 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
9054 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
9056 2012-08-06 Eli Zaretskii <eliz@gnu.org>
9058 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
9059 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
9061 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
9063 * buffer.h (struct buffer): Revert `indirections' to a simple int;
9064 that should be sufficient for everyone.
9066 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
9068 * keyboard.c (timer_check_2): Add break so timer_check returns next
9071 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9073 Fix Windows build errors introduced after converting to WGET and WSET.
9074 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
9075 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
9077 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
9079 * nsterm.m (ns_frame_rehighlight): Use FSET.
9081 * nsmenu.m (ns_update_menubar): Use FSET.
9083 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9085 Separate read and write access to Lisp_Object slots of Lisp_Process.
9086 * process.h (PGET, PSET): New macros similar to AREF and ASET.
9087 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
9089 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9091 Separate read and write access to Lisp_Object slots of struct window.
9092 * window.h (WGET, WSET): New macros similar to AREF and ASET.
9093 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
9094 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
9095 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
9096 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
9097 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
9100 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9102 Fix Windows build errors introduced after converting to FGET and FSET.
9103 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
9104 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
9105 (w32_judge_scroll_bars): Change to use FSET.
9106 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
9108 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9110 Fix replacement typo.
9111 * window.c (replace_window): Set root_window instead of
9112 selected_window. This fixes a total window subsystem
9113 malfunction reported by Bastien Guerry <bzg@gnu.org>.
9115 2012-08-06 Glenn Morris <rgm@gnu.org>
9117 * lisp.mk (lisp): Add language/persian.elc.
9119 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9121 Separate read and write access to Lisp_Object slots of struct frame.
9122 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
9123 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
9124 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
9125 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
9126 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
9128 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
9130 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
9132 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
9134 Generalize common compile-time constants.
9135 * lisp.h (header_size, bool_header_size, word_size): Now here.
9136 (struct Lisp_Vector): Add comment.
9137 (struct Lisp_Bool_Vector): Move up to define handy constants.
9138 (VECSIZE, PSEUDOVECSIZE): Simplify.
9139 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
9140 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
9141 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
9142 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
9143 * xfont.c, xmenu.c: Use word_size where appropriate.
9145 2012-08-05 Lawrence Mitchell <wence@gmx.li>
9147 * search.c (Freplace_match): Treat \? in the replacement text
9148 literally (Bug#8161).
9150 2012-08-05 Chong Yidong <cyd@gnu.org>
9152 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
9153 * frame.c (Vdelete_frame_functions):
9154 * emacs.c (Vkill_emacs_hook): Doc fix.
9156 2012-08-04 Eli Zaretskii <eliz@gnu.org>
9158 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
9159 --with-x-toolkit=no builds.
9160 Reported by Carsten Mattner <carstenmattner@gmail.com>.
9162 2012-08-04 Chong Yidong <cyd@gnu.org>
9164 * syntax.c (Fmodify_syntax_entry): Doc fix.
9166 2012-08-04 Eli Zaretskii <eliz@gnu.org>
9168 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
9169 * w32.c (init_environment): Change the default values of many
9170 environment variables in dflt_envvars[] to NULL, to avoid pushing
9171 them into environment when they were not already defined.
9172 Remove the code that deletes site-lisp subdirectories from the default
9173 value of EMACSLOADPATH, as it is no longer needed.
9174 (check_windows_init_file): Now external, not static.
9175 Use Vload_path as is, without adding anything, as this function is now
9176 called when Vload_path is already set up.
9178 * w32.h (check_windows_init_file): Add prototype.
9180 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
9181 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
9182 compatibility with Posix platforms.
9183 (main): Move the call to check_windows_init_file to here from
9185 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
9186 any, in the DEFALT argument into the root of the Emacs build or
9187 installation tree, as appropriate.
9189 * callproc.c (init_callproc_1): Call decode_env_path instead of
9190 doing its equivalent by hand.
9191 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
9192 the code that sets Vexec_path run on MS-Windows.
9194 * lread.c (init_lread): Add comments to #ifdef's.
9196 * msdos.c (dos_set_window_size, IT_update_begin)
9197 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
9198 instead of direct references.
9200 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
9202 Export DEFAULT_REHASH_* to GDB.
9203 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
9204 Now constants, not macros.
9206 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
9208 Remove unnecessary casts involving pointers.
9209 These casts are no longer needed now that we assume C89 or later,
9210 since they involve casting to or from void *.
9211 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
9212 (make_pure_float, make_pure_vector):
9213 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
9214 * macros.c (Fstart_kbd_macro):
9215 * menu.c (find_and_return_menu_selection):
9216 * minibuf.c (read_minibuf_noninteractive):
9217 * sysdep.c (closedir):
9218 * xdisp.c (x_produce_glyphs):
9219 * xfaces.c (compare_fonts_by_sort_order):
9220 * xfns.c (x_real_positions, select_visual):
9221 * xselect.c (x_stop_queuing_selection_requests)
9222 (x_get_window_property, x_get_window_property_as_lisp_data):
9223 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
9224 Remove unnecessary pointer casts.
9225 * alloc.c (record_xmalloc): New function.
9226 * lisp.h (record_xmalloc): New decl.
9227 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
9228 more like a function. This is because the pointer cast is not
9229 needed. All uses changed.
9230 * print.c (print_string, print_error_message): Avoid length recalc.
9232 Improve fix for macroexp crash with debugging (Bug#12118).
9233 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
9234 ARRAY_MARK_FLAG when checking subscripts, because ASET is
9235 not supposed to be invoked from the garbage collector.
9236 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
9237 (gc_aset): New function, which is like ASET but can be
9238 used in the garbage collector.
9239 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
9240 (set_hash_index): Use it instead of ASET.
9242 2012-08-03 Eli Zaretskii <eliz@gnu.org>
9244 Support symlinks on latest versions of MS-Windows.
9245 * w32.c: Include winioctl.h and aclapi.h.
9246 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
9247 (revert_to_self): Forward declarations of static functions.
9248 <static BOOL g_b_init_get_security_info>:
9249 <g_b_init_create_symbolic_link>: New static flags.
9250 (globals_of_w32): Initialize them to zero.
9251 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
9252 (map_w32_filename): Improve commentary. Simplify switch.
9253 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
9254 headers (most versions of MinGW w32api don't).
9255 (get_security_info, create_symbolic_link)
9256 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
9258 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
9259 in the argument file name.
9260 (sys_access): Call unc_volume_file_attributes only if
9261 GetFileAttributes fails with network-related error codes.
9262 (sys_rename): Diagnose renaming of a symlink when the user doesn't
9263 have the required privileges.
9264 (get_file_security_desc_by_name): Rename from
9265 get_file_security_desc.
9266 (stat_worker): New function, with most of the guts of 'stat', and
9267 with addition of handling of symlinks and support for 'lstat'.
9268 If possible, get file's attributes and security information by
9269 handle, not by name. Produce S_IFLNK bit for symlinks, when
9270 called from 'lstat'.
9271 (stat, lstat): New functions, call 'stat_worker'.
9272 (symlink, readlink, careadlinkat): Rewritten to create and resolve
9273 symlinks when the underlying filesystem supports them.
9275 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9277 Fix macroexp crash on Windows with debugging (Bug#12118).
9278 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
9279 checking subscripts; problem introduced with the recent
9280 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
9281 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
9282 since it's used in non-static inline functions now.
9284 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
9285 Don't assume buffer size fits in 'int'. Remove unused local.
9287 Use C99-style 'extern inline' if available.
9288 * buffer.h (BUFFER_INLINE):
9289 * category.h (CATEGORY_INLINE):
9290 * character.h (CHARACTER_INLINE):
9291 * charset.h (CHARSET_INLINE):
9292 * composite.h (COMPOSITE_INLINE):
9293 * dispextern.h (DISPEXTERN_INLINE):
9294 * lisp.h (LISP_INLINE):
9295 * systime.h (SYSTIME_INLINE):
9296 New macro, replacing 'static inline' in this header.
9297 * buffer.h, category.h, character.h, charset.h, composite.h:
9298 * dispextern.h, lisp.h, systime.h:
9299 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
9300 * alloc.c (LISP_INLINE):
9301 * buffer.c (BUFFER_INLINE):
9302 * category.c (CATEGORY_INLINE):
9303 * character.c (CHARACTER_INLINE):
9304 * charset.c (CHARSET_INLINE):
9305 * composite.c (COMPOSITE_INLINE):
9306 * dispnew.c (DISPEXTERN_INLINE):
9307 * sysdep.c (SYSTIME_INLINE):
9308 Define to EXTERN_INLINE, so that the corresponding functions
9309 are compiled into code.
9310 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
9311 (INLINE_HEADER_END): New macros.
9312 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
9313 since it's used in non-static inline functions now.
9314 (VALMASK) [!USE_LSB_TAG]: Likewise.
9316 2012-08-02 Glenn Morris <rgm@gnu.org>
9318 * s/: Remove empty directory.
9320 * s/ms-w32.h: Move to ../nt/inc.
9321 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
9322 Update for new ms-w32.h location.
9324 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9327 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
9329 2012-08-02 Glenn Morris <rgm@gnu.org>
9331 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
9332 hard-coding the path separator.
9334 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9336 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
9337 This how ASET and AREF are supposed to work, and makes
9338 it easier to think about future improvements. See
9339 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
9340 * charset.h (set_charset_attr): New function.
9341 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
9342 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
9343 (aref_addr): New function. All uses of &AREF(...) changed.
9344 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
9345 (set_hash_index): New functions. All lvalue-style uses of
9346 HASH_KEY etc. changed.
9347 * keyboard.c (set_prop): New function. All lvalue-style uses
9350 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
9352 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
9353 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
9354 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
9355 * nsfns.m (ns_set_name_as_filename): Likewise.
9356 * nsmenu.m (ns_update_menubar): Likewise.
9357 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
9359 2012-08-01 Eli Zaretskii <eliz@gnu.org>
9361 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
9362 Adapt to latest changes in field names of the corresponding Lisp
9365 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
9367 2012-08-01 Glenn Morris <rgm@gnu.org>
9369 * s/msdos.h: Remove file.
9370 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
9371 * Makefile.in (S_FILE): Remove.
9372 (config_h): Remove S_FILE.
9374 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
9376 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
9377 Remove; moved to nt/config.nt.
9379 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9381 Use INTERNAL_FIELD for conses and overlays.
9382 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
9383 Remove obsolete comment.
9385 (struct Lisp_Overlay): Use INTERNAL_FIELD.
9386 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
9388 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9390 Use INTERNAL_FIELD for symbols.
9391 * lisp.h (SVAR): New macro. Adjust users.
9392 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
9393 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
9395 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9397 Use INTERNAL_FIELD for processes.
9398 * process.h (PVAR): New macro. Adjust style.
9399 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
9400 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
9402 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9404 Use INTERNAL_FIELD for windows.
9405 * window.h (WVAR): New macro.
9406 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
9407 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
9408 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
9409 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
9410 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
9411 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
9413 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9415 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
9417 2012-08-01 Glenn Morris <rgm@gnu.org>
9419 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
9420 Move to configure.ac.
9422 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
9424 * makefile.w32-in (CONFIG_H): Update dependencies.
9425 (CONF_POST_H): New macro.
9427 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
9429 2012-07-31 Glenn Morris <rgm@gnu.org>
9431 * Makefile.in (S_FILE): No longer set by configure.
9433 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
9435 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
9437 * process.h (NULL_DEVICE):
9438 * emacs.c (SEPCHAR):
9439 * editfns.c (USER_FULL_NAME): Let configure set them.
9441 * s/README, s/template.h: Remove files.
9443 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
9445 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
9446 Move to configure.ac.
9448 2012-07-31 Eli Zaretskii <eliz@gnu.org>
9450 * .gdbinit (xframe): Adapt to introduction of FVAR and the
9451 resulting renaming of 'struct frame' members.
9453 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
9455 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
9456 after introduction of FVAR.
9458 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9460 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
9462 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
9463 instead of compositeToPoint.
9464 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
9466 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
9468 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9470 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
9471 * lisp.h (INTERNAL_FIELD): New macro.
9472 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
9473 (BVAR): Change to use INTERNAL_FIELD.
9474 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
9475 (KVAR): Change to use INTERNAL_FIELD.
9476 * frame.h (FVAR): New macro.
9477 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
9478 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
9479 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
9480 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
9481 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
9483 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9485 Miscellaneous fixes for non-default X toolkits.
9486 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
9487 * xterm.c (x_frame_of_widget): Remove redundant prototype.
9488 Move under #ifdef USE_LUCID.
9489 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
9490 definition and usage to avoid warnings.
9492 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9494 * nsterm.m (openFiles): Fix previous checkin.
9496 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
9498 * indent.c (compute_motion): Remove unused local.
9500 2012-07-31 Glenn Morris <rgm@gnu.org>
9502 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
9504 * conf_post.h [USG5_4]:
9505 Move remaining contents of s/usg5-4-common.h here.
9506 * s/usg5-4-common.h: Remove file.
9508 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
9509 * s/irix6-5.h: Remove file.
9511 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
9512 * s/darwin.h: Remove file.
9514 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
9515 * s/hpux10-20.h: Remove file, which is now empty.
9517 2012-07-30 Glenn Morris <rgm@gnu.org>
9519 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
9520 * Makefile.in (config_h): Add conf_post.h.
9521 * makefile.w32-in (CONFIG_H): Add conf_post.h.
9523 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
9525 * nsterm.m (ns_do_open_file): New variable.
9526 (ns_term_init): Set ns_do_open_file to YES after run returns.
9527 (openFile, openTempFile, openFileWithoutUI, openFiles):
9528 Open files only if ns_do_open_file.
9530 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9532 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
9533 This no-op macro hasn't been needed for many years.
9534 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
9536 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
9537 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
9538 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
9539 gdb_make_enums_visible.
9540 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
9541 (DIRECTORY_SEP): Now a constant, not a macro.
9543 2012-07-30 Eli Zaretskii <eliz@gnu.org>
9545 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
9546 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
9548 * w32term.c <w32_keyboard_codepage>: Renamed from
9549 keyboard_codepage and now external. All users changed.
9551 * w32term.h: Add declaration of w32_keyboard_codepage.
9553 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
9554 the codepage to translate keys to Unicode. If this argument is
9555 -1, use the value returned by GetConsoleCP. All callers changed.
9557 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9559 Update .PHONY listings in makefiles.
9560 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
9561 bootstrap-clean, distclean, maintainer-clean, versioclean,
9564 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
9565 This is a bit clearer. Fix some commentary typos.
9567 2012-07-30 Glenn Morris <rgm@gnu.org>
9569 * s/netbsd.h: Let configure include signal.h if needed.
9570 Remove file, which is now empty.
9572 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
9573 Let configure set them.
9574 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
9575 No more need to undefine.
9577 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
9579 * keymap.c (Fkey_description): Don't remove 0x80 bit from
9580 non-single-byte char when adding meta modifier. (Bug#12090)
9582 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9584 Convert safe_call to use variable number of arguments.
9585 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
9586 (safe_call2): Fix comment.
9587 * lisp.h (safe_call): Adjust prototype.
9588 * coding.c (encode_coding_object): Change to use safe_call2.
9589 * xfaces.c (merge_face_heights): Change to use safe_call1.
9591 2012-07-30 Glenn Morris <rgm@gnu.org>
9593 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
9594 does that unconditionally. Remove file, which is now empty.
9596 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
9599 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9601 Export to GDB most of lisp.h's remaining object-like macros.
9602 * lisp.h (min, max): Move earlier, because they're used earlier now.
9603 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
9604 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
9605 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
9606 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
9607 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
9608 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
9609 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
9610 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
9611 Now constants, for GDB. They need not be macros.
9612 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
9613 Now constants, for GDB, as well as macros, for static initializers.
9614 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
9615 Move to after the definition of struct Lisp_Char_Table,
9616 since the former now needs that type defined.
9617 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
9618 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
9619 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
9620 New enums, for gdb_make_enums_visible.
9621 (GLYPH_MODE_LINE_FACE): Remove; unused.
9622 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
9623 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
9624 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
9625 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
9626 enum maxargs, enum MAX_ALLOCA.
9627 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
9628 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
9629 no longer needed, now that they are done in lisp.h.
9631 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9633 Cleanup string bytes checking.
9634 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
9635 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
9636 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
9637 (check_sblock, compact_small_strings): Simplify.
9639 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9641 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
9642 These macros are confusing and no longer need to be defined, as
9643 the enum values now suffice. All uses replaced with definiens.
9644 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
9646 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
9648 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
9649 ($(BLD)/w32console.$(O)): Update dependencies.
9651 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9653 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
9654 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
9656 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
9658 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
9660 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
9661 setting sitelisp (Bug#12010).
9663 2012-07-29 Eli Zaretskii <eliz@gnu.org>
9665 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
9667 * w32heap.c (cache_system_info):
9668 * w32.c (sys_rename):
9669 * w32proc.c (find_child_console, sys_kill): All users changed.
9671 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9673 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
9675 2012-07-29 Eli Zaretskii <eliz@gnu.org>
9677 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
9679 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9681 Cleanup statistics calculation in Fgarbage_collect.
9682 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
9683 Fix zombies percentage calculation. Simplify elapsed time calculation.
9685 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9687 Generalize marker debugging code under MARKER_DEBUG and use eassert.
9688 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
9689 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
9690 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
9691 (replace_range, replace_range_2, del_range_2): Change to eassert.
9692 * marker.c (byte_char_debug_check): Adjust style.
9694 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9696 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
9697 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
9698 long-ago-commented-out code that talks about "WIN32".
9699 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
9702 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
9704 Use Gnulib stdalign module (Bug#9772, Bug#9960).
9705 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
9706 Simplify by using alignof.
9707 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
9708 * lisp.h: Include <stdalign.h>.
9709 (GCALIGNMENT): New macro and constant.
9710 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
9711 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
9712 (stdalign): New macro, if not already defined.
9714 2012-07-28 Eli Zaretskii <eliz@gnu.org>
9716 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
9717 * w32inevt.c: Include w32inevt.h.
9718 (w32_read_console_input): New inline function, calls either
9719 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
9720 w32_console_unicode_input.
9721 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
9722 (w32_kbd_patch_key, key_event): Use the codepage returned by
9723 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
9724 (key_event): use uChar.UnicodeChar only if
9725 w32_console_unicode_input is non-zero.
9727 * w32console.c: Include w32heap.h.
9728 <w32_console_unicode_input>: New global variable.
9729 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
9730 family of Windows, zero otherwise.
9732 * w32inevt.h: Declare w32_console_unicode_input.
9734 * xdisp.c (init_iterator): Don't reference tip_frame in a build
9735 --without-x. (Bug#11742)
9737 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9739 Adjust GDB to reflect pvec_type changes (Bug#12036).
9740 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
9741 2012-07-04 changes to pseudovector representation.
9742 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
9744 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
9746 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
9748 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
9750 2012-07-27 Eli Zaretskii <eliz@gnu.org>
9752 * alloc.c (listn): Fix the order the arguments are consed onto the
9755 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
9756 enumeration constants, as PURE and HEAP are too general, and clash
9757 with other headers and sources, such as gmalloc.c and the
9758 MS-Windows system headers. All users changed.
9760 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9762 Revert last save_excursion_save and save_excursion_restore changes.
9763 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
9764 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
9766 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9768 Fix recently-introduced typos in Windows port.
9769 Reported by Martin Rudalics <rudalics@gmx.at>.
9770 * w32.c (init_environment): Replace comma with semicolon.
9771 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
9773 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9775 Improve GDB symbol export (Bug#12036).
9776 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
9777 arms of an 'if', not using conditional expressions; otherwise GDB
9778 complains about the types in the unevaluated arm when the argument
9779 is an integer literal.
9780 (xgetint): Simplify expression.
9781 * alloc.c (gdb_make_enums_visible): New constant. This ports to
9782 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
9783 Zaretskii in <http://bugs.gnu.org/12036#13>.
9784 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
9785 needed now that we have gdb_make_enums_visible.
9786 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
9787 (enum enum_USE_LSB_TAG):
9788 New enum types, packaging up enums that need to be exported to GDB.
9790 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9792 Utility function to make a list from specified amount of objects.
9793 * lisp.h (enum constype): New datatype.
9794 (listn): New prototype.
9795 * alloc.c (listn): New function.
9796 (Fmemory_use_count, syms_of_alloc): Use it.
9797 * buffer.c (syms_of_buffer): Likewise.
9798 * callint.c (syms_of_callint): Likewise.
9799 * charset.c (define_charset_internal): Likewise.
9800 * coding.c (syms_of_coding): Likewise.
9801 * keymap.c (syms_of_keymap): Likewise.
9802 * search.c (syms_of_search): Likewise.
9803 * syntax.c (syms_of_syntax): Likewise.
9804 * w32.c (init_environment): Likewise.
9805 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
9806 * xdisp.c (syms_of_xdisp): Likewise.
9807 * xfns.c (syms_of_xfns): Likewise.
9809 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9811 Fast save_excursion_save and save_excursion_restore.
9812 * lisp.h (struct Lisp_Excursion): New data type.
9813 (PVEC_EXCURSION): New pseudovector type.
9814 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
9815 to deal with it. Adjust comments.
9816 (init_marker, attach_marker): New prototype.
9817 (unchain_marker): Adjust prototype.
9818 * marker.c (attach_marker): Change to global.
9819 (init_marker): New function.
9820 * alloc.c (Fmake_marker, build_marker): Use it.
9821 (build_marker): More easserts.
9822 (mark_object): Handle struct Lisp_Excursion.
9823 * editfns.c (save_excursion_save, save_excursion_restore):
9824 Reimplement to use struct Lisp_Excursion. Add comments.
9826 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9828 Fix export of symbols to GDB (Bug#12036).
9829 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
9830 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
9831 emacs.c, as this is a more-suitable home. Had this been done earlier
9832 the fix for 12036 would have avoided some of the problems noted in
9833 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
9834 would have been more obvious.
9835 * emacs.c: Do not include <verify.h>; no longer needed.
9836 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
9837 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
9838 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
9839 Remove; now done in lisp.h.
9840 * lisp.h (PUBLISH_TO_GDB): New macro.
9841 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
9842 (DATA_SEG_BITS): Use it.
9843 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
9844 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
9845 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
9846 not be usable in #if. This simplifies things.
9848 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
9850 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
9852 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9854 Simplify export of symbols to GDB (Bug#12036).
9855 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
9856 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
9857 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
9858 Adjust to changes in lisp.h and emacs.c, by using
9859 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
9860 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
9861 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
9862 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
9863 instead of gdb_valbits.
9864 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
9865 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
9866 instead of gdb_array_mark_flag.
9867 (xboolvector): Get size from $->size, not $->header.size.
9868 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
9869 (xreload, hook-run, hookpost-run): Remove.
9870 * emacs.c: Include <verify.h>.
9871 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
9872 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
9874 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
9875 (gdb_USE_LSB_TAG): New enum constants.
9876 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
9877 Also define these as enum constants, so they're visible to GDB.
9878 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
9879 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
9880 as constants, so they're visible to GDB.
9881 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
9882 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
9883 Now enum constants, not macros, so they're visible to GDB.
9884 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
9885 more convenient now. All uses changed.
9886 (VALMASK) [USE_LSB_TAG]: Also define in this case.
9887 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
9889 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
9891 Explicitly free restriction data that are not needed anymore.
9892 * editfns.c (save_restriction_restore): Free restriction data.
9894 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
9896 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
9897 add argument, tune behavior, and adjust all callers.
9899 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
9901 Use typedef for EMACS_INT, EMACS_UINT.
9902 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
9903 than macros. This simplifies debugging in the usual case, since
9904 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
9905 and it allows expressions involving EMACS_INT casts.
9906 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
9908 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
9910 * nsterm.m (ns_read_socket): Return early if there is a modal
9913 2012-07-25 Martin Rudalics <rudalics@gmx.at>
9915 * frame.c (Fredirect_frame_focus): In doc-string don't mention
9916 that FOCUS-FRAME can be omitted.
9918 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
9920 Adjust buffer text indirection counters at the end of Fkill_buffer.
9921 * buffer.c (Fkill_buffer): Adjust indirection counters when the
9922 buffer is definitely dead. This should really fix an issue reported
9923 by Christoph Scholtes again. (Bug#12007).
9924 (init_buffer_once): Initialize indirection counters of
9925 buffer_defaults and buffer_local_symbols (for sanity and safety).
9927 2012-07-24 Eli Zaretskii <eliz@gnu.org>
9929 * xdisp.c (init_iterator): Don't compute dimensions of truncation
9930 and continuation glyphs on tooltip frames, leave them at zero.
9931 Avoids continued lines in tooltips. (Bug#11832)
9933 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
9935 Simplify copy_overlay.
9936 * buffer.c (copy_overlay): Simplify. Use build_marker.
9937 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
9939 2012-07-23 Eli Zaretskii <eliz@gnu.org>
9941 * print.c (print_object): Don't crash when a frame's name is nil
9942 or invalid. (Bug#12025)
9944 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
9945 it signals an error when a tooltip frame is being created.
9947 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
9949 Cleanup miscellaneous objects allocation and initialization.
9950 * alloc.c (allocate_misc): Change to static. Add argument to
9951 specify the subtype. Adjust comment and users.
9952 (build_overlay): New function.
9953 * buffer.c (copy_overlays, Fmake_overlay): Use it.
9954 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
9955 (allocate_misc): Remove prototype.
9956 (build_overlay): Add prototype.
9958 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
9960 Swap buffer text indirection counters in Fbuffer_swap_text.
9961 * buffer.c (Fbuffer_swap_text): Swap indirections too.
9962 This avoids crash reported by Christoph Scholtes at
9963 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
9965 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
9967 * nsmenu.m (Popdown_data): New struct.
9968 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
9970 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
9971 (initWithContentRect): Make imgView and contentView non-static
9972 and autorelease them. Also autorelease img and matrix (Bug#12005).
9973 (dealloc): Remove (Bug#12005).
9975 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9977 Adjust consing_since_gc when objects are explicitly freed.
9978 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
9979 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
9980 (free_cons, free_misc): Subtract object size from consing_since_gc.
9982 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9984 Simplify and cleanup markers positioning code.
9985 * marker.c (attach_marker): More useful eassert.
9986 (live_buffer, set_marker_internal): New function.
9987 (Fset_marker, set_marker_restricted): Use set_marker_internal.
9988 (set_marker_both, set_marker_restricted_both): Use live_buffer.
9990 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
9992 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
9993 as it's limited by the amount of memory, not by INT_MAX.
9995 2012-07-21 Eli Zaretskii <eliz@gnu.org>
9997 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
9998 in special-event-map. See the discussion at
9999 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
10002 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
10003 info.dwItemData. Fixes crashes on 64-bit Windows.
10004 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
10006 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
10008 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
10009 (conversationIdentifier): Return value is NSInteger.
10010 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
10012 2012-07-21 Chong Yidong <cyd@gnu.org>
10014 * window.c (decode_any_window): Signal an error if the window is
10015 on a dead frame (Bug#11984).
10017 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10019 Add indirection counting to speed up Fkill_buffer.
10020 * buffer.h (struct buffer): New member.
10021 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
10022 (Fmake_indirect_buffer): Set indirection counter to -1, increment
10023 base buffer indirection counter.
10024 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
10025 (Fkill_buffer): Adjust indirection counters as needed, don't walk
10026 through buffer list if indirection counter is 0.
10028 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10030 Extend the value returned by Fgarbage_collect with heap statistics.
10031 * alloc.c (Qheap): New symbol.
10032 (syms_of_alloc): DEFSYM it.
10033 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
10034 (Fmemory_free): Remove.
10035 (syms_of_alloc): Don't defsubr it.
10036 * buffer.c (Fcompact_buffer): Remove.
10037 (syms_of_buffer): Don't defsubr it.
10039 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10041 Make maybe_gc inline.
10042 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
10043 * lisp.h (consing_since_gc, gc_relative_threshold)
10044 (memory_full_cons_threshold): Revert declaration.
10045 (maybe_gc): Remove prototype, define as inline.
10046 * alloc.c: Remove old commented-out code.
10047 (consing_since_gc, gc_relative_threshold)
10048 (memory_full_cons_threshold): Revert to global.
10049 (maybe_gc): Remove.
10051 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10053 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
10054 * lisp.h (build_unibyte_string): New function.
10055 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
10056 * sysdep.c, w32fns.c, xfns.c: Use it.
10057 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
10058 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
10059 Adjust users accordingly.
10060 * font.h (font_open_by_name): Adjust prototype.
10062 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10064 Cleanup calls to Fgarbage_collect.
10065 * lisp.h (maybe_gc): New prototype.
10066 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
10067 Remove declarations.
10068 * alloc.c (maybe_gc): New function.
10069 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
10071 * bytecode.c (MAYBE_GC): Use maybe_gc.
10072 * eval.c (eval_sub, Ffuncall): Likewise.
10073 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
10074 to avoid dependency from auto-save feature.
10076 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
10078 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
10079 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
10080 'for_each_per_buffer_object_at'.
10081 All uses changed. It's better to use upper-case for macros that
10082 cannot be implemented as functions, to give the reader a clue
10083 that they're special.
10085 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
10087 * alloc.c (Fgarbage_collect): Tweak docstring.
10089 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10091 Tweak the value returned from Fgarbage_collect again.
10092 * alloc.c (Fgarbage_collect): New return value, as confirmed in
10093 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
10094 Adjust documentation.
10095 (total_vector_bytes): Rename to total_vector_slots, adjust
10097 (total_free_vector_bytes): Rename to total_free_vector_slots,
10099 (Qstring_bytes, Qvector_slots): New symbols.
10100 (syms_of_alloc): DEFSYM them.
10102 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10104 Buffer compaction primitive which may be used from Lisp.
10105 * buffer.c (compact_buffer, Fcompact_buffer): New function.
10106 (syms_of_buffer): Register Fcompact_buffer.
10107 * alloc.c (Fgarbage_collect): Use compact_buffer.
10108 * buffer.h (compact_buffer): New prototype.
10109 (struct buffer_text): New member.
10111 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10113 New macro to iterate over all buffers, miscellaneous cleanups.
10114 * lisp.h (all_buffers): Remove declaration.
10115 * buffer.h (all_buffers): Add declaration, with comment.
10116 (for_each_buffer): New macro.
10117 * alloc.c (Fgarbage_collect, mark_object): Use it.
10118 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
10119 (init_buffer): Likewise.
10120 * data.c (Fset_default): Likewise.
10121 * coding.c (code_conversion_restore): Remove redundant check
10123 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
10125 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
10127 Fix bug that created negative-length intervals.
10128 * intervals.c (merge_interval_right, merge_interval_left):
10129 Do not zero out this interval if it is absorbed by its children,
10130 as this interval's total length doesn't change in that case. See
10131 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
10133 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
10135 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
10136 when invoking (make-bool-vector N t) and N is a positive
10137 multiple of 8 -- the last 8 bits were mistakenly cleared.
10139 Remove some struct layout assumptions in bool vectors.
10140 * alloc.c (bool_header_size): New constant.
10141 (header_size, word_size): Move earlier, as they're now used earlier.
10142 Use 'word_size' in a few more places, where it's appropriate.
10143 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
10144 padding before the data member of a bool vector.
10145 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
10146 than doing the check by hand with an abort ().
10148 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
10150 * eval.c (Fdefvar): Don't check constants since we only set the var if
10151 it's not yet defined anyway (bug#11904).
10153 * lisp.h (last_undo_boundary): Declare new var.
10154 * keyboard.c (command_loop_1): Set it.
10155 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
10156 were auto-added by the command loop (bug#11774).
10158 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
10160 * w32font.c (Qsymbol): Remove local definition.
10161 (syms_of_w32font): Don't DEFSYM it.
10163 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
10165 Fix sweep_vectors to handle large bool vectors correctly.
10166 * alloc.c (sweep_vectors): Account total_vector_bytes for
10167 bool vectors larger than VBLOCK_BYTES_MAX.
10169 2012-07-18 Chong Yidong <cyd@gnu.org>
10171 * frame.c (x_set_frame_parameters): Revert bogus change introduced
10172 in 2012-05-25 commit by Paul Eggert (Bug#11738).
10174 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
10176 Return more descriptive data from Fgarbage_collect.
10177 Suggested by Stefan Monnier in
10178 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
10179 * alloc.c (bounded_number): New function.
10180 (total_buffers, total_vectors): New variable.
10181 (total_string_size): Rename to total_string_bytes, adjust users.
10182 (total_vector_size): Rename to total_vector_bytes, adjust users.
10183 (sweep_vectors): Account total_vectors and total_vector_bytes.
10184 (Fgarbage_collect): New return value. Adjust documentation.
10185 (gc_sweep): Account total_buffers.
10186 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
10187 (VECTOR_SIZE): Remove.
10188 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
10189 (Qinterval, Qmisc): New symbols.
10190 (syms_of_data): Initialize them.
10191 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
10192 (Qcons, Qbuffer): New declarations.
10194 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10196 * alloc.c (Fmemory_free): Account for memory-free's own storage.
10197 Round up, not down. Improve doc.
10199 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10201 Restore old code in allocate_string_data to avoid Faset breakage.
10202 Reported by Julien Danjou <julien@danjou.info> in
10203 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
10204 * alloc.c (allocate_string_data): Restore old code with minor
10205 adjustments, fix comment to explain this subtle issue.
10207 2012-07-17 Eli Zaretskii <eliz@gnu.org>
10209 Remove FILE_SYSTEM_CASE.
10210 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
10212 * fileio.c (FILE_SYSTEM_CASE): Don't define.
10213 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
10214 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
10215 call-process-region passes it through expand-file-name.
10217 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
10219 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10221 Fix crash when creating indirect buffer (Bug#11917)
10222 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
10223 Don't handle unbound variables specially if non-zero.
10224 (Fbuffer_local_variables): Pass zero.
10225 (clone_per_buffer_values): Pass non-zero.
10227 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10229 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
10230 to make the loop interruptible.
10232 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10234 * gnutls.c (emacs_gnutls_handshake): Only retry if
10235 GNUTLS_E_INTERRUPTED.
10237 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10239 Cleanup and convert miscellaneous checks to eassert.
10240 * alloc.c (mark_interval): Fix comment, partially rephrase
10241 old comment from intervals.h (see below).
10242 * intervals.c (find_interval, adjust_intervals_for_insertion)
10243 (delete_interval, adjust_intervals_for_deletion)
10244 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
10245 Convert to eassert.
10246 (adjust_intervals_for_insertion, make_new_interval):
10247 Remove obsolete and unused code.
10248 * intervals.h (struct interval): Remove obsolete comment.
10249 * textprotp.c (erase_properties): Remove unused code.
10250 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
10251 (Fremove_list_of_text_properties): Convert to eassert.
10253 2012-07-17 Chong Yidong <cyd@gnu.org>
10255 * editfns.c (Finsert_char): Doc fix.
10257 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10259 Fix previous change to make Fmemory_free always accurate.
10260 * alloc.c (make_interval): Update total_free_intervals.
10261 (make_float): Likewise for total_free_floats.
10262 (free_cons, Fcons): Likewise for total_free_conses.
10263 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
10264 Likewise for total_free_vector_bytes.
10265 (Fmake_symbol): Likewise for total_free_symbols.
10266 (bytes_free): Remove.
10268 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10270 Simple free memory accounting feature.
10271 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
10272 (sweep_vectors): Accumulate size of free vectors.
10273 (Fgarbage_collect): Setup bytes_free.
10274 (Fmemory_free): New function.
10275 (syms_of_alloc): Register it.
10277 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10279 Cleanup overlays checking.
10280 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
10281 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
10282 eassert and OVERLAYP.
10283 (sort_overlays): Change to use OVERLAYP.
10285 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
10287 * editfns.c (Finsert_char): Make it interactive, and make the
10288 second arg optional. Copy interactive spec and docstring from
10291 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10293 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
10294 Unlike the other wrapped functions, fabs has an unspecified
10297 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
10299 * nsterm.m (keyDown): Interpret flags without left/right bits
10300 as the left key (Bug#11670).
10302 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10304 Remove empty and useless init functions.
10305 * lisp.h (init_character_once, init_fns, init_image)
10306 (init_filelock, init_sound): Remove prototype.
10307 * character.c (init_character_once): Remove.
10308 * filelock.c (init_filelock): Likewise.
10309 * fns.c (init_fns): Likewise.
10310 * image.c (init_image): Likewise.
10311 * sound.c (init_sound): Likewise.
10312 * emacs.c (main): Adjust accordingly.
10314 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10316 * gtkutil.h: Tiny cleanups.
10317 (use_old_gtk_file_dialog): Remove useless declaration.
10318 (xg_uses_old_file_dialog): Add suggested const attribute.
10320 2012-07-15 Eli Zaretskii <eliz@gnu.org>
10322 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
10323 (bidi_paragraph_init): Use it to limit search forward for a strong
10324 directional character in abnormally large paragraphs full of
10325 neutral or weak characters. (Bug#11943)
10327 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
10329 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
10330 the toolbar (Bug#9451).
10331 (xg_make_tool_item): Give the widget event box a transparent
10334 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10336 Cleanup basic allocation variables and functions.
10337 * alloc.c (ignore_warnings, init_intervals, init_float)
10338 (init_cons, init_symbol, init_marker): Remove.
10339 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
10340 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
10341 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
10342 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
10343 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
10344 (staticidx, init_alloc_once, init_strings, free_ablock):
10345 Remove redundant initialization.
10346 * fns.c (init_weak_hash_tables): Remove.
10347 * lisp.h (init_weak_hash_tables): Remove prototype.
10349 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10351 Use zero_vector where appropriate.
10352 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
10354 * lisp.h (zero_vector): New declaration.
10355 * font.c (null_vector): Remove.
10356 (syms_of_font): Remove initialization and staticpro.
10357 (font_list_entities, font_find_for_lface): Change to use zero_vector.
10358 * keymap.c (Faccessible_keymaps): Likewise.
10360 2012-07-15 Leo Liu <sdl.web@gmail.com>
10362 * fringe.c: Fix typo in comments.
10364 2012-07-14 Leo Liu <sdl.web@gmail.com>
10366 * fringe.c: Add a new bitmap exclamation-mark.
10368 2012-07-14 Eli Zaretskii <eliz@gnu.org>
10370 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
10372 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
10373 (HAVE_MENUS): Don't define, defined by editing config.in with
10375 (GMALLOC_INHIBIT_VALLOC): Don't define.
10376 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
10378 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
10380 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
10382 2012-07-14 Glenn Morris <rgm@gnu.org>
10384 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
10385 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
10386 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
10388 2012-07-13 Glenn Morris <rgm@gnu.org>
10390 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
10392 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
10393 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
10395 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
10397 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
10398 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
10399 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
10400 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
10402 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
10403 as boolean expression.
10404 (x_set_window_size): Remove unused variable toolbar.
10405 (ns_get_color_default, ns_mod_to_lisp): Remove.
10406 (ns_mouse_position): Remove unused variables xchar and ychar.
10407 (ns_compute_glyph_string_overhangs): Remove unused variable face.
10408 (ns_set_vertical_scroll_bar): Remove unused variable count.
10409 (ns_delete_terminal): Remove unused variable i.
10410 (ns_term_init): Remove unused variables r, g and b.
10411 (mouseDown): Remove unused variable window.
10412 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
10413 (initFrameFromEmacs): Remove unused variable vbextra.
10414 (mouseEntered): Remove unused variables p and dpyinfo.
10415 (mouseExited): Remove unused variables p and r.
10416 (ns_define_frame_cursor, ns_clear_frame_area)
10417 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
10418 (menuDown): Assign [sender tag] to variable and cast the variable.
10420 * nsterm.h (menuDown): Add id as type to argument sender.
10421 (ns_display_info_for_name): Add Lisp_Object argument.
10422 (ns_term_init): Add Lisp_Object argument.
10423 (ns_map_event_to_object): Add void argument.
10424 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
10425 prototype with arguments and only declare if __OBJC__.
10426 (nxatoms_of_nsselect): Add void argument.
10427 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
10428 (ns_alloc_autorelease_pool): Add void argument.
10429 (ns_release_autorelease_pool): Add void* argument.
10430 (ns_get_defaults_value): Add const char* argument.
10432 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
10433 (initFromContents): Use SSDATA where appropriate.
10434 (ns_update_menubar): Add braces to ambigous if-else.
10435 (initWithTitle): Put () around assignment in if statement.
10436 (ns_menu_show): Remove unused variables window and keymap.
10437 (update_frame_tool_bar): Remove unused variable selected_p.
10438 (initWithContentRect): Remove unused variable this_cmd_name.
10440 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
10442 (setXBMColor): Remove unused variable len.
10443 (setPixmapData): Put () around assignment in loop statement.
10445 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
10446 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
10448 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
10449 around assignment in loop statement.
10450 (nsfont_open): Remove unused variable i.
10451 (nsfont_open): Remove unused variable len.
10452 (nsfont_draw): Remove unused variable cs.
10454 * nsfns.m (x_set_icon_name, ns_set_name_internal)
10455 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
10456 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
10457 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
10458 (Fns_font_name, Fns_perform_service)
10459 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
10460 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
10461 (ns_set_name): Remove unused variable view.
10462 (x_set_menu_bar_lines): Remove unused variable olines.
10463 (x_set_tool_bar_lines): Remove unused variable root_window.
10464 (Fns_list_colors): Put () around assignment in while statement.
10465 (Fns_perform_service): Remove unused variable len.
10466 (Fns_display_usable_bounds): Remove unused variable top.
10467 (syms_of_nsfns): Remove unused variable i.
10469 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
10470 memcpy (Bug#11907).
10472 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
10474 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
10475 and free it with DestroyExceptionInfo (Bug#11558).
10477 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
10479 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
10480 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
10481 Set here, not in nt/config.nt.
10483 2012-07-13 Eli Zaretskii <eliz@gnu.org>
10485 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
10486 cursor overflow into the last glyph on display line when the right
10487 fringe is off. (Bug#11832)
10489 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
10491 * xdisp.c (produce_special_glyphs): Now static.
10492 * dispextern.h (produce_special_glyphs): Remove decl.
10494 2012-07-13 Glenn Morris <rgm@gnu.org>
10496 * s/bsd-common.h, s/cygwin.h: Remove empty files.
10497 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
10499 * s/usg5-4-common.h (USG, USG5):
10500 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
10501 * s/sol2-6.h (SOLARIS2):
10502 * s/irix6-5.h (IRIX6_5):
10503 * s/hpux10-20.h (USG, USG5, HPUX):
10504 * s/gnu-linux.h (USG, GNU_LINUX):
10505 * s/freebsd.h (BSD_SYSTEM):
10506 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
10507 * s/cygwin.h (CYGWIN):
10508 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
10509 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
10511 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
10513 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
10515 2012-07-13 Glenn Morris <rgm@gnu.org>
10517 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
10519 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
10521 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
10522 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
10524 2012-07-12 Glenn Morris <rgm@gnu.org>
10526 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
10528 * process.c (init_process_emacs): Rename from init_process.
10529 The old name is also the name of a Mach system call.
10530 * lisp.h, emacs.c: Update for this name change.
10531 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
10534 2012-07-12 Eli Zaretskii <eliz@gnu.org>
10536 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
10537 memmove call that removes glyphs covered by the left truncation
10538 glyph. Improve commentary.
10539 (display_line): Fix display of continuation glyphs on GUI frames
10540 when the right fringe is turned off and variable-size fonts are
10541 used in the window. Move the code that appends a stretch glyph to
10542 produce_special_glyphs, so that it could be used for truncation
10543 and continuation glyphs alike.
10544 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
10545 glyph of a suitably computed width, to align the special glyphs at
10546 the window margin. Code moved from display_line. (Bug#11832)
10548 2012-07-12 Glenn Morris <rgm@gnu.org>
10550 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
10552 * s/gnu-linux.h, s/hpux10-20.h:
10553 Do not unconditionally define HAVE_XRMSETDATABASE.
10555 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
10557 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
10559 Fix typos that broke OS X build.
10560 Reported by Randal L. Schwartz in
10561 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
10562 * nsterm.m (ns_timeout): Add missing local decl.
10563 (ns_get_color): snprintf -> sprintf, to fix typo.
10565 2012-07-12 Glenn Morris <rgm@gnu.org>
10567 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
10568 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
10569 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
10570 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
10572 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
10573 Move PTY_OPEN to configure.
10575 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
10576 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
10577 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
10579 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
10581 Use empty_unibyte_string where applicable.
10582 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
10583 * lread.c (read1): Likewise.
10584 * xsettings.c (syms_of_xsettings): Likewise.
10586 2012-07-12 Glenn Morris <rgm@gnu.org>
10588 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
10589 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
10590 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
10591 * s/hpux10-20.h (RUN_TIME_REMAP):
10592 * s/bsd-common.h (TABDLY): Move to configure.
10594 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
10596 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
10598 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
10599 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
10601 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
10603 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
10604 * s/template.h: Move NARROWPROTO to configure.
10606 2012-07-11 Glenn Morris <rgm@gnu.org>
10608 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
10609 unused since 2011-01-17 change to systty.h.
10611 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
10612 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
10613 Move HAVE_PTYS and HAVE_SOCKETS to configure.
10615 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10617 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
10619 2012-07-11 Glenn Morris <rgm@gnu.org>
10621 * s/darwin.h, s/gnu-linux.h, s/template.h:
10622 Move INTERRUPT_INPUT to configure.
10624 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10626 Minor adjustments to interning code.
10627 * lisp.h (intern, intern_c_string): Redefine as static inline
10628 wrappers for intern_1 and intern_c_string_1, respectively.
10629 (intern_1, intern_c_string_1): Rename prototypes.
10630 * lread.c (intern_1, intern_c_string_1, oblookup):
10631 Simplify Vobarray checking.
10632 * font.c (font_intern_prop): Likewise. Adjust comment.
10633 * w32font.c (intern_font_name): Likewise.
10635 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
10637 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
10639 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
10640 of Fcar/Fcdr if possible.
10641 * font.c (check_otf_features): Likewise.
10642 * fontset.c (Fnew_fontset): Likewise.
10643 * gnutls.c (Fgnutls_boot): Likewise.
10644 * minibuf.c (read_minibuf): Likewise.
10645 * msdos.c (IT_set_frame_parameters): Likewise.
10646 * xmenu.c (Fx_popup_dialog): Likewise.
10647 * w32menu.c (Fx_popup_dialog): Likewise.
10649 2012-07-11 Glenn Morris <rgm@gnu.org>
10651 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
10652 since nothing has defined it on these platforms.
10654 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
10655 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
10657 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
10658 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
10659 Move CLASH_DETECTION to configure.
10661 * s/gnu.h: Remove file, which is now empty.
10663 * s/gnu.h, s/gnu-linux.h:
10664 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
10666 2012-07-11 John Wiegley <johnw@newartisans.com>
10668 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
10669 function attribute, so we only use it if it exists in the
10672 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10674 Avoid call to strlen in fast_c_string_match_ignore_case.
10675 * search.c (fast_c_string_match_ignore_case): Change to use
10676 length argument. Adjust users accordingly.
10677 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
10679 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10681 Assume mkdir, rmdir.
10682 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
10683 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
10686 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
10689 * s/hpux10-20.h (HAVE_PERROR): Remove.
10690 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
10691 Remove dummy definition, as this problem was obsolete long ago.
10694 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
10696 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10698 Avoid calls to strlen in font processing functions.
10699 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
10700 (font_open_by_name): Change to use length argument.
10701 Adjust users accordingly.
10702 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
10704 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
10705 Change to return ptrdiff_t.
10706 (xfont_list_pattern, xfont_match): Use length returned by
10707 xfont_decode_coding_xlfd.
10708 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
10710 2012-07-11 Glenn Morris <rgm@gnu.org>
10712 * s/darwin.h, s/freebsd.h, s/netbsd.h:
10713 Move DONT_REOPEN_PTY to configure.
10715 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
10716 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
10718 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
10720 Remove "#define unix" that is no longer needed (Bug#11905).
10721 * s/aix4-2.h (unix): Remove; no longer needed.
10723 EMACS_TIME simplification (Bug#11875).
10724 This replaces macros (which typically do not work in GDB)
10725 with functions, typedefs and enums, making the code easier to debug.
10726 The functional style also makes code easier to read and maintain.
10727 * systime.h: Include <sys/time.h> on all hosts, not just if
10728 WINDOWSNT, since 'struct timeval' is needed in general.
10729 (EMACS_TIME): Now a typedef, not a macro.
10730 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
10732 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
10733 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
10734 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
10735 (EMACS_TIME_LE): Now functions, not macros.
10736 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
10737 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
10738 which are not functions. All uses rewritten to use:
10739 (make_emacs_time): New function.
10740 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
10741 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
10742 not functions. All uses rewritten to use the following, respectively:
10743 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
10744 (add_emacs_time, sub_emacs_time): New functions.
10745 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
10746 * fileio.c (Fcopy_file):
10747 * xterm.c (XTflash): Get the current time closer to when it's used.
10748 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
10750 * bytecode.c (targets): Suppress -Woverride-init warnings.
10752 Simplify by avoiding confusing use of strncpy etc.
10753 * doc.c (Fsnarf_documentation):
10754 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
10755 * frame.c (Fmake_terminal_frame):
10756 * gtkutil.c (get_utf8_string):
10758 * nsmenu.m (ns_update_menubar):
10759 * regex.c (regerror):
10760 Prefer memcpy to strncpy and strncat when either will do.
10761 * fileio.c (Fsubstitute_in_file_name):
10762 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
10763 (menu_separator_name_p):
10764 * nsmenu.m (ns_update_menubar):
10765 Prefer memcmp to strncmp when either will do.
10766 * nsterm.m: Include <ftoastr.h>.
10768 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
10769 Prefer snprintf to strncpy.
10770 * nsterm.m (ns_term_init):
10771 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
10772 * nsterm.m (ns_term_init):
10773 Avoid the need for strncpy, by using build_string or
10774 make_unibyte_string directly. Use dtoastr, not snprintf.
10775 * process.c (Fmake_network_process): Diagnose service names that
10776 are too long, rather than silently truncating them or creating
10777 non-null-terminated names.
10778 (Fnetwork_interface_info): Likewise, for interface names.
10779 * sysdep.c (system_process_attributes) [GNU_LINUX]:
10780 Prefer sprintf to strncat.
10781 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
10782 Prefer vsnprintf to vsprintf + strncpy.
10784 2012-07-10 Glenn Morris <rgm@gnu.org>
10786 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
10787 Clarify fallback case.
10789 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10791 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
10792 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
10793 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
10794 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
10795 where argument type is known to be a Lisp_Cons.
10797 2012-07-10 Tom Tromey <tromey@redhat.com>
10799 * bytecode.c (BYTE_CODE_THREADED): New macro.
10800 (BYTE_CODES): New macro. Replaces all old byte-code defines.
10801 (enum byte_code_op): New type.
10802 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
10803 (exec_byte_code): Use them. Use token threading when applicable.
10805 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10807 Optimize pure C strings initialization.
10808 * lisp.h (make_pure_string): Fix prototype.
10809 (build_pure_c_string): New function, defined as static inline. This
10810 provides a better opportunity to optimize away calls to strlen when
10811 the function is called with compile-time constant argument.
10812 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
10813 argument, adjust users accordingly. Use build_pure_c_string where
10815 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
10816 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
10817 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
10819 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10821 Avoid calls to strlen in miscellaneous functions.
10822 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
10823 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
10824 * lread.c (openp): Likewise.
10826 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10828 Avoid calls to strlen in path processing functions.
10829 * fileio.c (file_name_as_directory): Add comment. Change to add
10830 srclen argument and return the length of result. Adjust users
10832 (directory_file_name): Fix comment. Change to add srclen argument,
10833 swap 1st and 2nd arguments to obey the common convention.
10834 Adjust users accordingly.
10835 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
10837 2012-07-10 Glenn Morris <rgm@gnu.org>
10839 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
10840 Move PENDING_OUTPUT_COUNT definition to configure.
10842 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
10843 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
10844 * s/gnu.h (DATA_START): Move definitions to configure.
10846 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
10847 We include usg5-4-common.h, which defines them both.
10849 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
10850 O_RDONLY already includes it).
10852 Stop ns builds setting the EMACSLOADPATH environment variable.
10853 * nsterm.m (ns_load_path): Rename from ns_init_paths.
10854 Now it does not set EMACSLOADPATH, just returns the load-path string.
10855 * nsterm.h: Update accordingly.
10856 * lread.c [HAVE_NS]: Include nsterm.h.
10857 (init_lread) [HAVE_NS]: Use ns_load_path.
10858 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
10860 2012-07-09 Glenn Morris <rgm@gnu.org>
10862 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
10863 since the included bsd-common.h does so.
10865 Stop ns builds setting the EMACSPATH environment variable.
10866 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
10867 (ns_init_paths): Do not set EMACSPATH.
10868 * nsterm.h (ns_exec_path): Add it.
10869 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
10872 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
10874 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
10876 * process.c (wait_reading_process_output): 'waitchannels' was unset
10877 when read_kbd || !NILP (wait_for_cell); fix this.
10879 Add GCC-style 'const' attribute to functions that can use it.
10880 * character.h (char_resolve_modifier_mask):
10881 * keyboard.h (make_ctrl_char):
10882 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
10883 (init_character_once, next_almost_prime, init_fns, init_image)
10884 (flush_pending_output, init_sound):
10885 * mem-limits.h (start_of_data):
10886 * menu.h (finish_menu_items):
10887 Add ATTRIBUTE_CONST.
10888 * emacs.c (DEFINE_DUMMY_FUNCTION):
10889 Declare the dummy function with ATTRIBUTE_CONST.
10890 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
10891 Add decls with ATTRIBUTE_CONST.
10893 Minor improvements to make_formatted_string.
10894 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
10895 where int is good enough, as vsprintf returns an int.
10896 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
10898 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10900 Use make_formatted_string to avoid double length calculation.
10901 * lisp.h (make_formatted_string): New prototype.
10902 * alloc.c (make_formatted_string): New function.
10903 * buffer.c (Fgenerate_new_buffer_name): Use it.
10904 * dbusbind.c (syms_of_dbusbind): Likewise.
10905 * editfns.c (Fcurrent_time_zone): Likewise.
10906 * filelock.c (get_boot_time): Likewise.
10907 * frame.c (make_terminal_frame, set_term_frame_name)
10908 (x_report_frame_params): Likewise.
10909 * image.c (gs_load): Likewise.
10910 * minibuf.c (get_minibuffer): Likewise.
10911 * msdos.c (dos_set_window_size): Likewise.
10912 * process.c (make_process): Likewise.
10913 * xdisp.c (ensure_echo_area_buffers): Likewise.
10914 * xsettings.c (apply_xft_settings): Likewise.
10916 2012-07-09 Glenn Morris <rgm@gnu.org>
10918 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
10919 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
10920 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
10921 * nsterm.h (ns_etc_directory): Add it.
10922 * callproc.c [HAVE_NS]: Include nsterm.h.
10923 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
10925 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10927 Move marker debugging code under MARKER_DEBUG.
10928 * marker.c (MARKER_DEBUG): Move marker debugging code under
10929 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
10930 for bootstrap with --enable-checking (~3x slowdown reported
10931 by Juanma Barranquero <lekktu@gmail.com>).
10932 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
10934 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
10936 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
10937 See <http://bugs.gnu.org/11825#29>.
10939 2012-07-08 Eli Zaretskii <eliz@gnu.org>
10941 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
10942 has no font, use the frame's font. (Bug#11813)
10943 (display_line): Add commentary about displaying truncation glyphs
10945 (produce_special_glyphs): Move here from term.c.
10947 * term.c (produce_special_glyphs): Move to xdisp.c.
10949 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
10952 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
10954 * xdisp.c (display_line): Avoid warning about implicit declaration
10957 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
10959 * lisp.h: Remove empty conditional.
10961 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
10963 * lread.c (load_path_check): Now static.
10965 Fix some minor --with-ns problems found by static checking.
10966 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
10967 (x_set_font) [!HAVE_X_WINDOWS]:
10968 * image.c (xpm_load_image) [HAVE_NS]:
10969 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
10970 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
10971 Remove unused local.
10972 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
10973 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
10974 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
10975 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
10976 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
10977 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
10978 Fix pointer signedness problem.
10979 * xfaces.c (FRAME_X_FONT_TABLE):
10980 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
10982 2012-07-07 Glenn Morris <rgm@gnu.org>
10984 * lread.c (load_path_check): New function, split from init_lread.
10985 (init_lread): Reorganize. Motivation:
10986 If EMACSLOADPATH is set, check/warn about that rather than the
10987 defaults, which we are not going to use. Hence we can remove
10988 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
10989 Don't warn if site-lisp directories are missing.
10990 If not installed, start from a blank load-path, since
10991 PATH_LOADSEARCH refers to the eventual installation directories.
10993 2012-07-07 Eli Zaretskii <eliz@gnu.org>
10995 Support truncation and continuation glyphs on GUI frames, when
10996 fringes are disabled. (Bug#11832)
10997 * xdisp.c (init_iterator): Get dimensions of truncation and
10998 continuation glyphs even if on GUI frames.
10999 Adjust it->last_visible_x on GUI frames when the left or right fringes,
11000 or both, are absent.
11001 (start_display, move_it_in_display_line_to): Handle the case of a
11002 GUI frame without a fringe to display continuation or truncation
11004 (insert_left_trunc_glyphs): Support GUI frames: make sure
11005 truncation glyphs overwrite enough glyphs from the current line to
11006 have sufficient space in pixels.
11007 (display_line): Support truncation and continuation glyphs on GUI
11008 frames. If some spare pixels are left on the line after inserting
11009 the truncation glyphs, fill that space with a stretch glyph of a
11010 suitably computed width.
11012 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
11013 produce_glyphs, to support GUI sessions.
11015 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
11017 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
11019 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
11021 Do not require float-time's arg to fit in time_t (Bug#11825).
11022 This works better on hosts where time_t is unsigned, and where
11023 float-time is applied to the (negative) difference between two times.
11024 * editfns.c (decode_time_components): Last arg is now double *,
11025 not int *, and means to store all the result as a double, without
11026 worrying about whether the seconds part fits in time_t.
11027 All callers changed.
11028 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
11029 All callers changed.
11030 (Ffloat_time): Do not fail merely because the specified time falls
11031 outside of time_t range.
11033 2012-07-07 Glenn Morris <rgm@gnu.org>
11035 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
11036 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
11037 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
11039 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
11041 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
11042 Update dependencies.
11044 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
11046 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11048 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
11049 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
11050 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
11051 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
11052 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
11053 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
11055 * xfont.c (compare_font_names): Redo to omit the need for casts.
11057 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
11059 * xfns.c (Fx_change_window_property): Doc fix.
11060 * w32fns.c (Fx_change_window_property): Doc fix.
11062 * w32fns.c (Fx_window_property): Accept the same arguments as the
11063 X Windows version. Doc fix.
11064 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
11066 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
11067 Eli Zaretskii <eliz@gnu.org>
11069 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
11070 Windows-specific code from nt/config.nt moved here.
11071 Obsolete settings removed.
11073 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11075 * process.c: Avoid unnecessary calls to gettime.
11076 (wait_reading_process_output): Don't get the time of day
11077 when gobbling data immediately and not waiting, as there's no need
11078 for it in that case. This removes a FIXME.
11080 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
11082 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
11083 is defined (Bug#11768).
11085 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11087 Fix marker debugging code.
11088 * marker.c (byte_char_debug_check): Do not perform the check
11089 if buffer is not multibyte.
11090 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
11091 Call byte_char_debug_check with correct arguments.
11093 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11095 Compile marker debugging code only if ENABLE_CHECKING is defined.
11096 * marker.c (byte_char_debug_check, count_markers):
11097 Use only if ENABLE_CHECKING is defined.
11098 (byte_debug_flag): Remove.
11099 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
11100 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
11102 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11104 Avoid code repetition in marker-related functions.
11105 * marker.c (attach_marker): New function.
11106 (Fset_marker, set_marker_restricted, set_marker_both)
11107 (set_marker_restricted_both): Use it.
11108 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
11109 Consistently rename charno to charpos.
11110 (marker_position): Add eassert.
11111 (marker_byte_position): Convert to eassert.
11113 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11115 Simplify list operations in unchain_overlay and unchain_marker.
11116 * buffer.c (unchain_overlay): Simplify. Add comment.
11117 * marker.c (unchain_marker): Simplify. Fix comments.
11119 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11121 Introduce fast path for the widely used marker operation.
11122 * alloc.c (build_marker): New function.
11123 * lisp.h (build_marker): New prototype.
11124 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
11125 * composite.c (autocmp_chars): Likewise.
11126 * editfns.c (buildmark): Remove.
11127 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
11128 (save_restriction_save): Use build_marker.
11129 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
11130 * window.c (save_window_save): Likewise.
11132 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11134 Do not use Fdelete_overlay in delete_all_overlays
11135 to avoid redundant calls to unchain_overlay.
11136 * buffer.c (drop_overlay): New function.
11137 (delete_all_overlays, Fdelete_overlay): Use it.
11138 * minibuf.c (get_minibuffer): Fix comment.
11140 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11142 Port to OpenBSD 5.1 amd64.
11143 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
11144 This is needed for OpenBSD, and should be harmless on all BSD systems.
11145 Also, include <sys/sysctl.h>, as it should be available on all
11146 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
11147 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
11148 use p_pid member, not kp_proc.pid.
11150 2012-07-06 Glenn Morris <rgm@gnu.org>
11152 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
11154 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11156 More xmalloc and related cleanup.
11157 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
11158 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
11159 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
11160 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
11161 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
11162 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
11163 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
11164 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
11165 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
11167 Omit needless casts involving void * pointers and allocation.
11168 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
11169 as the former is more robust if P's type is changed.
11170 Prefer xzalloc to xmalloc + memset 0.
11171 Simplify malloc-or-realloc to realloc.
11172 Don't worry about xmalloc returning a null pointer.
11173 Prefer xstrdup to xmalloc + strcpy.
11174 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
11176 * keyboard.c (apply_modifiers_uncached): Prefer local array to
11177 alloca of a constant.
11179 2012-07-05 Eli Zaretskii <eliz@gnu.org>
11181 * xdisp.c (display_line): Fix horizontal pixel coordinates when
11182 hscroll is larger than the line width. Fixes long and futile
11183 looping inside extend_face_to_end_of_line (on a TTY) producing
11184 glyphs that are not needed and thrown away.
11186 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
11188 * marker.c (set_marker_restricted_both): Simplify by using
11191 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11193 * editfns.c (region_limit): Simplify by using clip_to_bounds.
11195 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
11197 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
11198 not defined (Bug#11768).
11199 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
11200 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
11201 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
11202 followed by gtk_box_set_homogeneous (Bug#11768).
11203 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
11204 (update_theme_scrollbar_width, xg_create_scroll_bar):
11205 Use gtk_scrollbar_new (Bug#11768).
11206 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
11207 (is_box_type): New function (Bug#11768).
11208 (xg_tool_item_stale_p): Call is_box_type.
11209 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
11210 with default display (Bug#11768).
11212 2012-07-05 Eli Zaretskii <eliz@gnu.org>
11214 * xdisp.c (window_hscroll_limited): New function.
11215 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
11216 coordinates when window's hscroll is set to insanely large
11217 values. (Bug#11857)
11219 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
11221 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
11222 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
11224 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
11227 * lisp.h (xzalloc): New prototype. Omit needless casts.
11228 * alloc.c (xzalloc): New function. Omit needless casts.
11229 * charset.c: Omit needless casts. Convert all calls to
11230 xmalloc with following memset to xzalloc.
11231 * dispnew.c: Likewise.
11232 * fringe.c: Likewise.
11233 * image.c: Likewise.
11234 * sound.c: Likewise.
11235 * term.c: Likewise.
11236 * w32fns.c: Likewise.
11237 * w32font.c: Likewise.
11238 * w32term.c: Likewise.
11239 * xfaces.c: Likewise.
11240 * xfns.c: Likewise.
11241 * xterm.c: Likewise.
11242 * atimer.c: Omit needless casts.
11243 * buffer.c: Likewise.
11244 * callproc.c: Likewise.
11246 * coding.c: Likewise.
11247 * composite.c: Likewise.
11249 * doprnt.c: Likewise.
11250 * editfns.c: Likewise.
11251 * emacs.c: Likewise.
11252 * eval.c: Likewise.
11253 * filelock.c: Likewise.
11255 * gtkutil.c: Likewise.
11256 * keyboard.c: Likewise.
11257 * lisp.h: Likewise.
11258 * lread.c: Likewise.
11259 * minibuf.c: Likewise.
11260 * msdos.c: Likewise.
11261 * print.c: Likewise.
11262 * process.c: Likewise.
11263 * region-cache.c: Likewise.
11264 * search.c: Likewise.
11265 * sysdep.c: Likewise.
11266 * termcap.c: Likewise.
11267 * terminal.c: Likewise.
11268 * tparam.c: Likewise.
11269 * w16select.c: Likewise.
11271 * w32reg.c: Likewise.
11272 * w32select.c: Likewise.
11273 * w32uniscribe.c: Likewise.
11274 * widget.c: Likewise.
11275 * xdisp.c: Likewise.
11276 * xmenu.c: Likewise.
11277 * xrdb.c: Likewise.
11278 * xselect.c: Likewise.
11280 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11282 * fileio.c (time_error_value): Check the right error number.
11283 Problem reported by Troels Nielsen in
11284 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
11286 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11288 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
11289 This should be fixed in a better way; see Eli Zaretskii in
11290 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
11291 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
11293 * fileio.c (time_error_value): Rename from special_mtime.
11294 The old name's problems were noted by Eli Zaretskii in
11295 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
11297 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
11298 This variable's comment says Emacs needs at least one GDB-visible
11299 symbol of type enum pvec_type, to work around GDB problems.
11300 The symbol's value doesn't matter.
11302 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
11303 that causes compilation to fail on pre-C99 compilers.
11305 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
11307 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
11308 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
11310 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11312 * buffer.c (init_buffer_once): Fix initialization of
11313 headers for buffer_defaults and buffer_local_symbols.
11314 Reported by Juanma Barranquero <lekktu@gmail.com>.
11316 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11318 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
11319 * lisp.h (enum pvec_type): Use fewer bits.
11320 (PSEUDOVECTOR_SIZE_BITS): New constant.
11321 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
11322 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
11323 change in pvec_type.
11324 (PSEUDOVECTOR_TYPEP): New macro.
11325 (TYPED_PSEUDOVECTORP): Use it.
11326 * fns.c (internal_equal): Adapt code to extract pvectype.
11327 * emacs.c (gdb_pvec_type): Update type.
11328 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
11329 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
11330 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
11331 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
11332 (sweep_vectors): Use it. Use local var `total_bytes' instead of
11333 abusing vector->header.next.nbytes.
11334 (live_vector_p): Use PVEC_TYPE.
11335 (mark_object): Adapt code to extract pvectype. Use switch.
11337 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11339 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
11340 Tighten new eassert a bit.
11342 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11344 Fix compilation with --enable-gcc-warnings and -O1
11345 optimization level.
11346 * doprnt.c (doprnt): Change type of tem to int, initialize
11347 to avoid compiler warning. Add eassert.
11348 * search.c (simple_search): Initialize match_byte to avoid
11349 compiler warning. Add eassert.
11351 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11353 Avoid weird behavior with large horizontal scrolls.
11354 Without this change, for example, large hscroll values would
11355 mess up Emacs's display on Fedora 15 x86, presumably due to
11356 overflows in int calculations in the display code.
11357 Also, if buffers had long lines, Emacs would freeze.
11358 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
11359 (set_window_hscroll): New function, containing the old guts of
11360 Fset_window_hscroll. Return the clipped value.
11361 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
11362 This avoids the need to check against PTRDIFF_MAX.
11364 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
11366 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11368 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
11370 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11372 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
11373 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
11374 since GCC 4.4.6 issues a bogus warning for them.
11376 Fix bugs in file timestamp newness comparisons.
11377 * fileio.c (Ffile_newer_than_file_p):
11378 * lread.c (Fload): Use full timestamp resolution of files,
11379 not just the 1-second resolution, so that files that are only
11380 slightly newer still count as newer.
11381 * fileio.c (Ffile_newer_than_file_p): Don't assume file
11382 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
11384 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
11386 * fileio.c: Improve handling of file time marker. (Bug#11852)
11387 (special_mtime): New function.
11388 (Finsert_file_contents, Fverify_visited_file_modtime):
11389 Use it to set special mtime values consistently.
11391 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
11393 * fileio.c (Finsert_file_contents): Properly handle st_mtime
11394 marker for non-existing file. (Bug#11852)
11396 2012-07-03 Glenn Morris <rgm@gnu.org>
11398 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
11399 and did not make it into globals.h).
11401 2012-07-03 Tom Tromey <tromey@redhat.com>
11403 * window.c (Fset_window_margins, Fset_window_fringes)
11404 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
11405 * textprop.c (Fprevious_property_change): No longer static.
11406 * syntax.c (Fsyntax_table_p): No longer static.
11407 * process.c (Fget_process, Fprocess_datagram_address): No longer
11409 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
11410 * keyboard.c (Fcommand_execute): No longer static.
11412 * insdel.c (Fcombine_after_change_execute): No longer static.
11413 * image.c (Finit_image_library): No longer static.
11414 * fileio.c (Fmake_symbolic_link): No longer static.
11415 * eval.c (Ffetch_bytecode): No longer static.
11416 * editfns.c (Fuser_full_name): No longer static.
11417 * doc.c (Fdocumentation_property, Fsnarf_documentation):
11419 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
11421 * dired.c (Ffile_attributes): No longer static.
11422 * composite.c (Fcomposition_get_gstring): No longer static.
11423 * callproc.c (Fgetenv_internal): No longer static.
11425 * ccl.h: Remove EXFUNs.
11426 * buffer.h: Remove EXFUNs.
11427 * dispextern.h: Remove EXFUNs.
11428 * intervals.h: Remove EXFUNs.
11429 * fontset.h: Remove EXFUN.
11430 * font.h: Remove EXFUNs.
11431 * dosfns.c (system_process_attributes): Remove EXFUN.
11432 * keymap.h: Remove EXFUNs.
11433 * lisp.h: Remove EXFUNs.
11434 * w32term.h: Remove EXFUNs.
11435 * window.h: Remove EXFUNs.
11436 * xsettings.h: Remove EXFUN.
11437 * xterm.h: Remove EXFUN.
11439 2012-07-03 Glenn Morris <rgm@gnu.org>
11441 * lisp.h (Frandom): Make it visible to C.
11442 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
11443 buffer for invisible buffers. (Bug#1229)
11445 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11447 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
11448 values which aren't power of 2.
11449 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
11450 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
11453 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
11455 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
11457 * alloc.c (mark_object): Revert part of last patch to use `switch'.
11459 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11461 * alloc.c (allocate_vector_block): Remove redundant
11462 calls to mallopt if DOUG_LEA_MALLOC is defined.
11463 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
11464 avoid calls to mallopt if zero_vector is returned.
11466 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11468 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
11469 is enabled, avoid dereferencing NULL current_sblock if
11472 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11474 Cleanup basic buffer management.
11475 * buffer.h (struct buffer): Change layout to use generic vector
11476 marking code. Fix some comments. Change type of 'clip_changed'
11477 to bitfield. Remove unused #ifndef old.
11478 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
11479 (GET_OVERLAYS_AT): Fix indentation.
11480 (for_each_per_buffer_object_at): New macro.
11481 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
11482 (Fbuffer_local_variables): Use it.
11483 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
11484 * alloc.c (allocate_buffer): Adjust to match new layout of
11485 struct buffer. Fix comment.
11486 (mark_overlay): New function.
11487 (mark_buffer): Use it. Use mark_vectorlike to mark normal
11488 Lisp area of struct buffer.
11489 (mark_object): Use it. Adjust marking of misc objects
11490 and related comments.
11492 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
11494 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
11495 wrapper that is not needed because the wrapped code is a no-op (zero
11496 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
11497 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
11499 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
11501 * alloc.c (mark_buffer): Simplify. Remove prototype.
11502 (mark_object): Add comment. Reorganize marking of vector-like
11503 objects. Use CHECK_LIVE for all vector-like objects except buffers
11504 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
11505 Avoid redundant calls to mark_vectorlike for bool vectors.
11507 2012-06-30 Glenn Morris <rgm@gnu.org>
11509 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
11511 * epaths.in (PATH_SITELOADSEARCH): New.
11512 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
11513 This is rather than relying on --enable-locallisppath elements
11514 having "site-lisp" in their names. (Bug#10208#25, 11658)
11516 2012-06-30 Eli Zaretskii <eliz@gnu.org>
11518 * w32proc.c (sys_select): Accept and ignore one more argument.
11520 * w32.c (emacs_gnutls_pull): Call select with one more argument.
11522 * sysselect.h [DOS_NT]: Don't include sys/select.h.
11523 (pselect) [!MS_DOS]: Redirect to sys_select.
11525 * sysdep.c: Don't include dos.h and dosfns.h.
11527 * process.c (sys_select):
11528 * msdos.c (sys_select): Accept one more argument and ignore it.
11530 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
11531 adapt data types and code to that.
11534 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
11535 which clashes with the gnulib function of the same name.
11537 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
11539 * font.c (font_style_to_value, font_style_symbolic)
11540 (font_prop_validate_style): Add type checks for values in
11543 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
11545 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
11548 2012-06-29 Eli Zaretskii <eliz@gnu.org>
11550 * xdisp.c (try_window_id): Undo last change.
11552 * w32.c (getwd): Adjust commentary about startup_dir.
11553 (init_environment): Always call sys_access, even in non-MSVC
11554 builds. Don't chdir to the directory of the Emacs executable.
11555 This undoes code from 1997 which was justified by the need to
11556 "avoid conflicts when removing and renaming directories". But its
11557 downside was that every relative file name was being interpreted
11558 relative to the directory of the Emacs executable, which can never
11559 be TRT. In particular, it broke sys_access when called with
11560 relative file names.
11561 (sys_access): Map GetLastError to errno.
11563 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11565 * window.h (struct window): Change type of 'fringes_outside_margins'
11566 to bitfield. Fix comment. Adjust users accordingly.
11567 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
11569 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
11572 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
11574 * gnutls.c (emacs_gnutls_handshake):
11575 Add QUIT to make the loop interruptible.
11577 2012-06-29 Glenn Morris <rgm@gnu.org>
11579 * charset.c (init_charset): Make lack of etc/charsets fatal.
11581 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11583 * editfns.c (region_limit): Fix type mismatch.
11585 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11587 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
11588 undefined. Convert from xassert to eassert.
11589 * nsmenu.m: Convert from xassert to eassert.
11590 * nsterm.m: Likewise.
11592 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
11594 * editfns.c (region_limit): Clip to narrowing (bug#11770).
11596 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
11598 Avoid integer overflow on scroll-left and scroll-right.
11599 * window.c (HSCROLL_MAX): New macro.
11600 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
11601 overflow when requested scroll falls outside ptrdiff_t range.
11603 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11605 * window.h (struct window): Change type of 'hscroll',
11606 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
11607 'last_modified' and 'last_overlay_modified' to EMACS_INT.
11608 Adjust users accordingly.
11609 * xdisp.c (try_cursor_movement): Replace type check with eassert.
11610 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
11611 from EMACS_INT to ptrdiff_t.
11612 (make_window): Omit redundant initialization.
11614 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
11616 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
11618 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11620 * window.h (struct window): Change type of 'use_time' and
11621 'sequence_number' from Lisp_Object to int.
11622 * frame.c (make_frame): Adjust users accordingly.
11623 * print.c (print_object): Likewise.
11624 * window.c (select_window, Fwindow_use_time, make_parent_window)
11625 (make_window): Likewise.
11627 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11629 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
11630 enabled with --enable-checking=[all,glyphs] configure option.
11631 Fix GLYPH_DEBUG usage assuming that it may be undefined,
11632 adjust comments accordingly.
11633 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
11634 undefined, adjust comments accordingly.
11635 * image.c: Likewise.
11636 * scroll.c: Likewise.
11637 * w32fns.c: Likewise.
11638 * w32term.c: Likewise.
11639 * xdisp.c: Likewise.
11640 * xfaces.c: Likewise.
11641 * xfns.c: Likewise.
11642 * xterm.c: Likewise.
11644 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11646 Generalize run-time debugging checks.
11647 * dispextern.h (XASSERTS): Remove.
11648 * fontset.c (xassert): Remove.
11649 Convert from xassert to eassert.
11650 * alloc.c: Convert from xassert to eassert.
11651 * bidi.c: Likewise.
11652 * dispnew.c: Likewise.
11654 * fringe.c: Likewise.
11655 * ftfont.c: Likewise.
11656 * gtkutil.c: Likewise.
11657 * image.c: Likewise.
11658 * keyboard.c: Likewise.
11659 * menu.c: Likewise.
11660 * process.c: Likewise.
11661 * scroll.c: Likewise.
11662 * sound.c: Likewise.
11663 * term.c: Likewise.
11664 * w32console.c: Likewise.
11665 * w32fns.c: Likewise.
11666 * w32term.c: Likewise.
11667 * window.c: Likewise.
11668 * xdisp.c: Likewise.
11669 * xfaces.c: Likewise.
11670 * xfns.c: Likewise.
11671 * xselect.c: Likewise.
11672 * xterm.c: Likewise.
11674 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
11676 * fns.c (maybe_resize_hash_table): Output message when growing the
11679 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11681 * alloc.c (allocate_string_data): Remove dead code.
11682 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
11683 avoid GCC warning about unused macro.
11685 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11687 * alloc.c (allocate_string): Omit intervals initialization.
11688 * alloc.c (make_uninit_multibyte_string): Initialize intervals
11689 as in make_pure_string and make_pure_c_string.
11691 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11693 * alloc.c (allocate_string): Fix last change.
11695 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11697 * alloc.c (allocate_string): Remove two redundant calls
11698 to memset, add explicit initialization where appropriate.
11700 2012-06-27 Glenn Morris <rgm@gnu.org>
11702 * lisp.mk (lisp): Remove paths.elc.
11704 2012-06-27 Chong Yidong <cyd@gnu.org>
11706 * doc.c (Fsubstitute_command_keys): Fix punctuation.
11708 2012-06-26 John Wiegley <johnw@newartisans.com>
11710 * unexmacosx.c (copy_data_segment): Add two section names used
11711 on Mac OS X Lion: __mod_init_func and __mod_term_func.
11713 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
11714 when building with Clang.
11716 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
11718 * eval.c (Fapply): Allow calling it with a single argument.
11720 2012-06-26 Eli Zaretskii <eliz@gnu.org>
11722 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
11723 _stricmp and _strnicmp.
11724 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
11726 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11728 * alloc.c (allocate_window): Zero out non-Lisp part of newly
11730 (allocate_process): Likewise for new process.
11731 (allocate_terminal): Change to use offsetof.
11732 (allocate_frame): Likewise.
11733 * frame.c (make_frame): Omit redundant initialization.
11734 * window.c (make_parent_window): Use memset.
11735 (make_window): Omit redundant initialization.
11736 * process.c (make_process): Omit redundant initialization.
11737 * terminal.c (create_terminal): Likewise.
11739 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11741 * term.c (delete_tty): Remove redundant call to memset.
11743 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11745 * alloc.c: Remove build_string.
11746 * lisp.h: Define build_string as static inline. This provides
11747 a better opportunity to optimize away calls to strlen when the
11748 function is called with compile-time constant argument.
11749 * image.c (imagemagick_error): Convert to build_string.
11750 * w32proc.c (sys_spawnve): Likewise.
11751 * xterm.c (x_term_init): Likewise.
11753 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
11755 Use sprintf return value instead of invoking strlen on result.
11756 In the old days this wasn't portable, since some sprintf
11757 implementations returned char *. But they died out years ago and
11758 Emacs already assumes sprintf returns int.
11759 Similarly for float_to_string.
11760 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
11761 * ccl.c (ccl_driver):
11762 * character.c (string_escape_byte8):
11763 * data.c (Fnumber_to_string):
11764 * doprnt.c (doprnt):
11765 * print.c (print_object):
11766 * xdisp.c (message_dolog):
11767 * xfns.c (syms_of_xfns):
11768 Use sprintf or float_to_string result to avoid need to call strlen.
11769 * data.c (Fnumber_to_string):
11770 Use make_unibyte_string, since the string must be ASCII.
11771 * lisp.h, print.c (float_to_string): Now returns int length.
11772 * term.c (produce_glyphless_glyph):
11773 Use sprintf result rather than recomputing it.
11775 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
11776 * Makefile.in (ALL_CFLAGS):
11777 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
11778 * gmalloc.c, regex.c: Include <config.h> unconditionally.
11780 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11782 * dispextern.h (xstrcasecmp): Define to library function
11783 strcasecmp if available.
11784 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
11786 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
11788 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
11789 Avoid comma operator.
11790 * menu.c (push_submenu_start, push_submenu_end)
11791 (push_left_right_boundary, push_menu_pane): Likewise.
11792 * msdos.c (dos_rawgetc): Likewise.
11794 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11796 * xfns.c (xic_create_fontsetname): Remove redundant calls
11799 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
11801 * gtkutil.c (get_utf8_string): Remove redundant assignment.
11802 sprintf already null-terminates its output.
11804 * xfns.c (x_window): Remove redundant cast.
11806 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11808 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
11809 `const char *' to `char *' to avoid compiler warning.
11811 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11813 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
11814 instead of truncating it to 63 (admittedly a generous limit).
11816 * process.c: Fix spelling and caps in comments.
11818 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
11820 * emacs.c (setpgrp): Remove definition, unused.
11821 * sysdep.c (setpgrp): Remove definition, not used in this file.
11823 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
11825 * makefile.w32-in: Update dependencies.
11827 2012-06-24 Eli Zaretskii <eliz@gnu.org>
11829 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
11830 (SYSTIME_H): Add nt/inc/sys/time.h.
11832 * systime.h [WINDOWSNT]: Include sys/time.h.
11834 * s/ms-w32.h (struct timespec): Definition moved from
11835 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11837 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11839 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
11840 * buffer.h (buffer_slot_type_mismatch):
11841 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
11842 * eval.c (unwind_to_catch):
11843 * image.c (my_png_error, my_error_exit):
11844 * keyboard.c (quit_throw_to_read_char, user_error)
11845 (Fexit_recursive_edit, Fabort_recursive_edit):
11846 * lisp.h (die, args_out_of_range, args_out_of_range_3)
11847 (wrong_type_argument, buffer_overflow, __executable_start)
11848 (memory_full, buffer_memory_full, string_overflow, Fthrow)
11849 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
11850 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
11852 (child_setup) [!DOS_NT]:
11853 * lread.c (end_of_file_error, invalid_syntax):
11854 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
11855 * puresize.h (pure_write_error):
11856 * search.c (matcher_overflow):
11857 * sound.c (sound_perror, alsa_sound_perror):
11858 * sysdep.c, syssignal.h (croak):
11859 * term.c (maybe_fatal, vfatal):
11860 * textprop.c (text_read_only):
11861 * undo.c (user_error):
11862 * unexmacosx.c (unexec_error):
11863 * xterm.c (x_ins_del_lines, x_delete_glyphs):
11864 Use _Noreturn rather than NO_RETURN.
11865 No need for separate decl merely because of _Noreturn.
11866 * sound.c (sound_warning, parse_sound):
11867 Remove unnecessary forward decls.
11869 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11871 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
11872 * lisp.h (WAIT_READING_MAX): New macro.
11873 * dispnew.c (Fsleep_for, sit_for):
11874 * keyboard.c (kbd_buffer_get_event):
11875 * process.c (Faccept_process_output):
11876 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
11877 This improves on the previous patch, which introduced a bug
11878 when time_t is unsigned and as wide as intmax_t.
11879 See <http://bugs.gnu.org/9000#51>.
11881 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11883 * dispnew.c (sit_for, Fsleep_for):
11884 * keyboard.c (kbd_buffer_get_event):
11885 * process.c (Faccept_process_output): Avoid compiler warnings when
11886 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
11888 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
11890 * makefile.w32-in: Update dependencies.
11892 * w32.c (ltime): Add return type and declare static.
11893 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
11895 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11897 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
11898 Privately reported by Herbert J. Skuhra.
11899 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
11901 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
11902 not make_lisp_timeval, when the argument is of type EMACS_TIME.
11904 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11906 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
11907 last argument of make_unibyte_string.
11909 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
11910 language ID in the event parameters.
11912 * w32term.c (w32_read_socket): Put the new keyboard codepage into
11913 event.code, not the obscure "character set ID".
11915 2012-06-23 Chong Yidong <cyd@gnu.org>
11917 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
11919 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11921 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
11922 * w32.c (fdutimens): New function.
11924 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
11926 * s/ms-w32.h (pselect): Redirect to sys_select.
11928 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
11930 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
11931 in the logic of incrementing and decrementing the value of
11932 use_relocatable_buffers.
11934 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11936 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
11937 Privately reported by Herbert J. Skuhra.
11938 [__FreeBSD__]: Remove "*/" typo after "#include".
11939 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
11940 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
11941 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
11942 Don't assume EMACS_TIME and struct timeval are the same type.
11944 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
11946 Support higher-resolution time stamps (Bug#9000).
11947 The time stamps are only nanosecond-resolution at the C level,
11948 since that's the best that any real-world system supports now.
11949 But they are picosecond-resolution at the Lisp level, as that's
11950 easy, and leaves room for future OS improvements.
11952 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
11955 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
11956 Don't get current time unless it's needed.
11958 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
11959 now provides it if it's absent.
11960 (start_atimer): Port to higher-res time stamps.
11961 Check for time stamp overflow. Don't get current time more
11962 often than is needed.
11964 * buffer.h (struct buffer): Buffer modtime now has high resolution.
11965 Include systime.h, not time.h.
11966 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
11968 * dired.c: Include stat-time.h.
11969 (Ffile-attributes): File times now have higher resolution.
11971 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
11972 (struct image): Timestamp now has higher resolution.
11974 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
11975 has at least microseconds now. All uses removed.
11976 (update_frame, update_single_window, update_window, update_frame_1)
11977 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
11978 (duration_to_sec_usec): Remove; no longer needed.
11980 * editfns.c (time_overflow): Now extern.
11981 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
11982 (float-time, Fformat_time_string, Fcurrent_time_string)
11983 (Fcurrent_time_zone): Accept and generate higher-resolution
11985 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
11986 (decode_time_components, lisp_seconds_argument): New functions.
11987 (make_time): Now static.
11988 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
11989 Report an error if the time is invalid, rather than having the caller
11992 * fileio.c: Include <stat-time.h>
11993 (Fcopy_file): Copy higher-resolution time stamps.
11994 Prefer to set the time stamp via a file descriptor if that works.
11995 (Fset_file_times, Finsert_file_contents, Fwrite_region)
11996 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
11997 (Fvisited_file_modtime, Fset_visited_file_modtime):
11998 Support higher-resolution time stamps.
12000 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
12002 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
12004 * image.c (prepare_image_for_display, clear_image_cache)
12005 (lookup_image): Port to higer-resolution time stamps.
12007 * keyboard.c (start_polling, bind_polling_period):
12008 Check for time stamp overflow.
12009 (read_char, kbd_buffer_get_event, timer_start_idle)
12010 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
12011 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
12012 Port to higher-resolution time stamps. Do not assume time_t is signed.
12013 (decode_timer): New function. Timers are now vectors of length 9,
12014 not 8, to accommodate the picosecond component.
12015 (timer_check_2): Use it.
12017 * nsterm.m (select_timeout, timeval_subtract): Remove.
12018 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
12019 as they're a bit more accurate and handle overflow better.
12020 (ns_select): Change prototype to be compatible with pselect.
12021 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
12022 * nsterm.h (ns_select): Adjust prototype.
12024 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
12025 us-resolution time stamps.
12026 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
12028 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
12030 * lisp.h (time_overflow): New decl.
12031 (wait_reading_process_output): First arg is now intmax_t, not int,
12032 to accommodate larger waits.
12034 * process.h (struct Lisp_Process.read_output_delay):
12035 Now counts nanoseconds, not microseconds.
12036 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
12038 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
12039 (wait_reading_process_output):
12040 Port to ns-resolution time stamps.
12041 (Faccept_process_output, wait_reading_process_output):
12042 Check for time stamp overflow. Do not assume time_t is signed.
12043 (select_wrapper): Remove; we now use pselect.
12044 (Fprocess_attributes): Now generates ns-resolution time stamps.
12046 * sysdep.c: Include utimens.h. Don't include utime.h
12047 or worry about struct utimbuf; gnulib does that for us now.
12048 (gettimeofday): Remove; gnulib provides a substitute.
12049 (make_timeval): New function.
12050 (set_file_times): Now sets ns-resolution time stamps.
12051 New arg FD; all uses changed.
12052 (time_from_jiffies, ltime_from_jiffies, get_up_time)
12053 (system_process_attributes):
12054 Now returns ns-resolution time stamp. All uses changed.
12055 Check for time stamp overflow.
12057 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
12058 provides a substitute now.
12060 * systime.h: Include timespec.h rather than sys/time.h and time.h,
12061 since it guarantees struct timespec.
12062 (EMACS_TIME): Now struct timespec, so that we can support
12063 ns-resolution time stamps.
12064 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
12065 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
12066 (EMACS_USECS): Remove.
12067 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
12068 so multiply the arg by 1000 before storing it.
12069 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
12071 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
12072 Port to ns-resolution time stamps.
12073 (EMACS_TIME_NEG_P): Remove; replaced by....
12074 (EMACS_TIME_SIGN): New macro.
12075 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
12076 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
12077 (set_file_times, make_time, lisp_time_argument): Adjust signature.
12078 (make_timeval, make_lisp_time, decode_time_components): New decls.
12079 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
12080 that it mishandled time_t overflow. You can't compare by subtracting!
12081 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
12082 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
12084 * term.c: Include <sys/time.h>.
12085 (timeval_to_Time): New function, for proper overflow wraparound.
12086 (term_mouse_position, term_mouse_click): Use it.
12088 * undo.c (record_first_change): Support higher-resolution time stamps
12089 in the undo buffer.
12090 (Fprimitive_undo): Use them when restoring time stamps.
12092 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
12093 (w32_get_internal_run_time):
12094 Port to higher-resolution Emacs time stamps.
12095 (ltime): Now accepts single 64-bit integer, as that's more convenient
12098 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
12100 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
12101 for compatibility with pselect. Support ns-resolution time stamps.
12103 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
12105 * xselect.c (wait_for_property_change, x_get_foreign_selection):
12106 Check for time stamp overflow, and support ns-resolution time stamps.
12108 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
12109 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
12110 (timeval_subtract): Remove; no longer needed.
12111 (XTflash, XTring_bell, x_wait_for_event):
12112 Port to ns-resolution time stamps. Don't assume time_t is signed.
12114 2012-06-22 Chong Yidong <cyd@gnu.org>
12116 * xdisp.c (x_consider_frame_title): Revert last change.
12118 2012-06-22 Eli Zaretskii <eliz@gnu.org>
12120 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
12121 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
12122 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
12123 staticidx goes up to 1597 out of 1600 = 0x640.)
12125 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
12127 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
12128 Otherwise, the umask might be mistakenly 0 while handling input signals.
12130 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
12132 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
12134 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
12136 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
12137 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
12138 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
12139 access to `contents' member of Lisp_Vector objects with AREF and ASET
12142 2012-06-19 Chong Yidong <cyd@gnu.org>
12144 * frame.c (delete_frame): When selecting a frame on a different
12145 text terminal, do not alter the terminal's top-frame.
12147 * xdisp.c (format_mode_line_unwind_data): Record the target
12148 frame's selected window and its terminal's top-frame.
12149 (unwind_format_mode_line): Restore them.
12150 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
12152 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
12153 since tty frames can be explicitly named.
12154 (prepare_menu_bars): Likewise.
12156 * term.c (Ftty_top_frame): New function.
12158 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
12160 Port byte-code-meter to modern targets.
12161 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
12162 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
12163 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
12164 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
12165 (METER_1, METER_2): Simplify.
12167 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
12169 * data.c (Fdefalias): Return `symbol' (bug#11686).
12171 2012-06-18 Martin Rudalics <rudalics@gmx.at>
12173 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
12174 gets killed during executing of this function (Bug#11665).
12175 Try to always return Qt when the buffer has been actually killed.
12176 (Vkill_buffer_query_functions): In doc-string say that functions
12177 run by this hook should not change the current buffer.
12179 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
12181 Fix recently-introduced process.c problems found by static checking.
12182 * process.c (write_queue_push, write_queue_pop, send_process):
12183 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
12184 (write_queue_pop): Fix pointer signedness problem.
12185 (send_process): Remove unused local.
12187 2012-06-17 Chong Yidong <cyd@gnu.org>
12189 * xdisp.c (redisplay_internal): No need to redisplay terminal
12190 frames that are not on top.
12192 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
12194 * process.c (make_process): Initialize write_queue.
12195 (write_queue_push, write_queue_pop): New functions.
12196 (send_process): Use them to maintain correct ordering of process
12197 writes (Bug#10815).
12199 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
12201 * lisp.h (eassert): Assume C89 or later.
12202 This removes the need for CHECK.
12203 (CHECK): Remove. Its comments about always evaluating its
12204 argument were confusing, as 'eassert' typically does not evaluate
12207 * coding.c (produce_chars): Use ptrdiff_t, not int.
12209 * xterm.c (x_draw_underwave): Check for integer overflow.
12210 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
12212 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
12214 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
12215 referenced (Bug#11583).
12217 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
12219 Implement wave-style variant of underlining.
12220 * dispextern.h (face_underline_type): New enum.
12221 (face): Add field for underline type.
12222 * nsterm.m (ns_draw_underwave): New function.
12223 (ns_draw_text_decoration): Use it.
12224 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
12226 (x_draw_glyph_string): Use them.
12227 * xfaces.c (Qline, Qwave): New Lisp objects.
12228 (check_lface_attrs, merge_face_ref)
12229 (Finternal_set_lisp_face_attribute, realize_x_face):
12230 Handle wave-style underline face attributes.
12231 * xterm.c (x_draw_underwave): New function.
12232 (x_draw_glyph_string): Use it.
12234 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
12236 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
12237 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
12238 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
12239 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
12240 ($(BLD)/w32select.$(O)): Update dependencies.
12242 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12244 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
12245 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
12246 * character.c (_fetch_multibyte_char_p): Remove.
12247 * alloc.c: Include "character.h" before "buffer.h".
12248 * bidi.c: Likewise.
12249 * buffer.c: Likewise.
12250 * bytecode.c: Likewise.
12251 * callint.c: Likewise.
12252 * callproc.c: Likewise.
12253 * casefiddle.c: Likewise.
12254 * casetab.c: Likewise.
12255 * category.c: Likewise.
12256 * cmds.c: Likewise.
12257 * coding.c: Likewise.
12258 * composite.c: Likewise.
12259 * dired.c: Likewise.
12260 * dispnew.c: Likewise.
12262 * dosfns.c: Likewise.
12263 * editfns.c: Likewise.
12264 * emacs.c: Likewise.
12265 * fileio.c: Likewise.
12266 * filelock.c: Likewise.
12267 * font.c: Likewise.
12268 * fontset.c: Likewise.
12269 * fringe.c: Likewise.
12270 * indent.c: Likewise.
12271 * insdel.c: Likewise.
12272 * intervals.c: Likewise.
12273 * keyboard.c: Likewise.
12274 * keymap.c: Likewise.
12275 * lread.c: Likewise.
12276 * macros.c: Likewise.
12277 * marker.c: Likewise.
12278 * minibuf.c: Likewise.
12279 * nsfns.m: Likewise.
12280 * nsmenu.m: Likewise.
12281 * print.c: Likewise.
12282 * process.c: Likewise.
12283 * regex.c: Likewise.
12284 * region-cache.c: Likewise.
12285 * search.c: Likewise.
12286 * syntax.c: Likewise.
12287 * term.c: Likewise.
12288 * textprop.c: Likewise.
12289 * undo.c: Likewise.
12290 * unexsol.c: Likewise.
12291 * w16select.c: Likewise.
12292 * w32fns.c: Likewise.
12293 * w32menu.c: Likewise.
12294 * window.c: Likewise.
12295 * xdisp.c: Likewise.
12296 * xfns.c: Likewise.
12297 * xmenu.c: Likewise.
12299 * xselect.c: Likewise.
12301 2012-06-16 Eli Zaretskii <eliz@gnu.org>
12303 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
12304 If all the glyphs of the glyph row came from strings, and we have no
12305 cursor positioning clues, put the cursor on the first glyph of the
12307 (handle_face_prop): Use chunk-relative overlay string index when
12308 indexing into it->string_overlays array. (Bug#11653)
12309 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
12310 the rightmost. (Bug#11720)
12312 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12314 * category.h (CHAR_HAS_CATEGORY): Define as inline.
12315 (CATEGORY_MEMBER): Enforce 1/0 value.
12316 * category.c (_temp_category_set): Remove.
12318 2012-06-16 Eli Zaretskii <eliz@gnu.org>
12320 * window.c (Fdelete_other_windows_internal)
12321 (Fdelete_window_internal): Don't access frame's mouse highlight
12322 info of the initial frame. (Bug#11677)
12324 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
12326 * .gdbinit (xgetint): Fix recently-introduced paren typo.
12327 Assume USE_2_TAGS_FOR_INTS.
12328 (xreload): Adjust $tagmask width to match recent lisp.h change.
12330 Simplify lisp.h in minor ways that should not affect code.
12331 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
12332 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
12333 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
12334 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
12335 (INTTYPEBITS): New macro, for clarity.
12336 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
12337 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
12338 Simplify now that USE_LSB_TAG is always defined.
12339 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
12340 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
12342 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
12344 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
12346 2012-06-13 Glenn Morris <rgm@gnu.org>
12348 * s/bsd-common.h (BSD4_3):
12349 * s/usg5-4-common.h (USG5_4): No longer define; unused.
12351 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
12353 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
12355 (XLI, XIL): Define.
12356 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
12358 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
12359 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
12360 * alloc.c (widen_to_Lisp_Object): Remove.
12361 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
12362 * frame.c (delete_frame): Remove outdated comment.
12363 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
12364 USE_LISP_UNION_TYPE.
12365 (Fw32_unregister_hot_key): Likewise.
12366 (Fw32_toggle_lock_key): Likewise.
12367 * w32menu.c (add_menu_item): Likewise.
12368 (w32_menu_display_help): Use XIL instead of checking
12369 USE_LISP_UNION_TYPE.
12370 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
12371 (init_heap): Likewise.
12372 * w32term.c (w32_read_socket): Update comment.
12374 2012-06-13 Glenn Morris <rgm@gnu.org>
12376 * s/usg5-4-common.h, src/s/unixware.h:
12377 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
12379 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
12381 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
12383 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
12384 * alloc.c (make_number) [!defined make_number]:
12385 Remove, as lisp.h always defines this now.
12386 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
12387 (roundup_size): Verify that it is a power of 2.
12388 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
12389 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
12390 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
12391 -DUSE_LSB_TAG=0, to override the automatically-selected default.
12392 USE_LSB_TAG now is always defined to be either 0 or 1.
12394 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
12395 code works fine either way, and efficiency is not a concern here,
12396 as the union type is for debugging, not for production.
12397 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
12398 Use an inline function on all platforms when using the union type,
12399 since this is simpler and 'static inline' can be used portably
12401 (LISP_INITIALLY_ZERO): New macro.
12402 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
12403 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
12405 2012-06-12 Glenn Morris <rgm@gnu.org>
12407 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
12409 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
12411 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
12412 Move BROKEN_SIGIO to configure.
12414 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
12415 Move NO_TERMIO to configure.
12417 2012-06-12 Chong Yidong <cyd@gnu.org>
12419 * image.c (imagemagick_load_image): Use MagickFlattenImage if
12420 MagickMergeImageLayers is undefined. Use pixel pusher loop if
12421 MagickExportImagePixels is undefined.
12423 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
12425 * image.c (imagemagick_load_image): Remove unused label.
12427 2012-06-11 Glenn Morris <rgm@gnu.org>
12429 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
12430 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
12431 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
12432 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
12434 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
12436 * alloc.c (make_byte_code): New function.
12437 (Fmake_byte_code): Use it. Don't purify here.
12438 * lread.c (read1): Use it as well to avoid extra allocation.
12440 2012-06-11 Chong Yidong <cyd@gnu.org>
12442 * image.c (imagemagick_load_image): Implement transparency.
12444 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
12446 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
12447 account for preceding backslashes. (Bug#11663)
12449 2012-06-09 Chong Yidong <cyd@gnu.org>
12451 * term.c: Support italics in capable terminals (Bug#9652).
12452 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
12453 (turn_on_face): Output using TS_enter_italic_mode if available.
12454 Don't handle unused blinking and alt-charset cases.
12455 (turn_off_face): Handle italic case; discard unused tty_blinking_p
12456 and tty_alt_charset_p cases.
12457 (tty_capable_p, init_tty): Support italics.
12459 * termchar.h (struct tty_display_info): Add field for italics.
12460 Remove unused blink field.
12462 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
12465 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
12466 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
12467 tty_alt_charset_p. Add tty_italic_p.
12469 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
12471 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
12472 dbus_type_is_basic if available.
12473 (xd_extract_signed, xd_extract_unsigned): Rename from
12474 extract_signed and extract_unsigned, respectively. Adapt callers.
12476 2012-06-09 Chong Yidong <cyd@gnu.org>
12478 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
12480 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
12483 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
12485 * xdisp.c (vmessage): Treat frame message as multibyte.
12486 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
12487 would generate the diagnostic "Making \302\247 buffer-local while
12490 2012-06-08 Eli Zaretskii <eliz@gnu.org>
12492 * dispnew.c (showing_window_margins_p): Undo last change, which
12493 was done due to an inadvertent commit.
12494 (adjust_frame_glyphs_for_frame_redisplay): Do call
12495 showing_window_margins_p.
12497 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12499 * eval.c (Fmake_var_non_special): New primitive.
12500 (syms_of_eval): Defsubr it.
12501 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
12503 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
12505 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
12506 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
12508 2012-06-08 Eli Zaretskii <eliz@gnu.org>
12510 * alloc.c (allocate_vectorlike): Fix last change.
12512 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
12514 Block-based vector allocation of small vectors.
12515 * lisp.h (struct vectorlike_header): New field `nbytes',
12516 adjust comment accordingly.
12517 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
12518 to denote vector blocks. Adjust users (live_vector_p,
12519 mark_maybe_pointer, valid_lisp_object_p) accordingly.
12520 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
12521 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES)
12522 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX)
12523 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST)
12524 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
12525 (roundup_size): New constant.
12526 (struct vector_block): New data type.
12527 (vector_blocks, vector_free_lists, zero_vector): New variables.
12528 (all_vectors): Rename to `large_vectors'.
12529 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
12530 (sweep_vectors): New functions.
12531 (allocate_vectorlike): Return `zero_vector' as the only vector of
12532 0 items. Allocate new vector from block if vector size is less than
12533 or equal to VBLOCK_BYTES_MAX.
12534 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
12535 (init_alloc_once): Add call to init_vectors.
12537 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12539 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
12541 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
12543 * doprnt.c (doprnt): Truncate multibyte char correctly.
12544 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
12545 would mishandle a string argument "Xc" if X was a multibyte
12546 character of length 2: it would truncate after X's first byte
12547 rather than including all of X.
12549 2012-06-06 Chong Yidong <cyd@gnu.org>
12551 * buffer.c (word_wrap): Doc fix.
12553 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
12555 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
12557 2012-06-03 Glenn Morris <rgm@gnu.org>
12559 * xdisp.c (tool-bar-style): Doc fix.
12561 2012-06-03 Ulrich Müller <ulm@gentoo.org>
12563 * Makefile.in (PAXCTL): Define.
12564 (temacs$(EXEEXT)): Disable memory randomization for the temacs
12565 binary via PaX flags if the paxctl utility is available.
12566 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
12567 Restore PaX flags to their default. (Bug#11398)
12569 2012-06-03 Chong Yidong <cyd@gnu.org>
12571 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
12572 buffer (Bug#11226).
12574 2012-06-03 Chong Yidong <cyd@gnu.org>
12576 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
12577 (note_mode_line_or_margin_highlight): If there is no help echo,
12578 use mode-line-default-help-echo. Handle the case where the mouse
12579 position is past the end of the mode line string.
12581 * buffer.c (buffer_local_value_1): New function, split from
12582 Fbuffer_local_value; can return Qunbound.
12583 (Fbuffer_local_value): Use it.
12584 (Vmode_line_format): Docstring tweaks.
12586 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12588 * sysdep.c (system_process_attributes): Improve comment.
12590 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
12592 * keyboard.c: Export real-this-command to Elisp.
12593 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
12594 and DEFVAR it. Update all users.
12596 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12598 * minibuf.c (Fassoc_string): Remove duplicate declaration.
12600 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
12601 Convert pctcpu and pctmem to Lisp float properly.
12602 Let the compiler fold better, as 100.0/0x8000 is exact.
12604 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
12606 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
12609 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
12611 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
12613 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
12615 For a 'struct window', replace some Lisp_Object fields to
12616 bitfields where appropriate, remove unused fields.
12617 * window.h (struct window): Remove unused 'last_mark_x' and
12618 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
12619 change its type from Lisp_Object to bitfield.
12620 Change type of 'force_start', 'optional_new_start',
12621 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
12622 fields from Lisp_Object to bitfield. Adjust users accordingly.
12624 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12626 Pacify gcc -Wdouble-precision when using Xaw.
12627 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
12628 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
12629 Use 'float' consistently, rather than 'float' in most places
12630 and 'double' in a couple of places.
12632 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12634 * xdisp.c (handle_stop): Detect whether we have overlay strings
12635 loaded by testing it->current.overlay_string_index to be
12636 non-negative, instead of checking whether n_overlay_strings is
12637 positive. (Bug#11587)
12639 2012-05-31 Chong Yidong <cyd@gnu.org>
12641 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
12643 * doc.c (Fsubstitute_command_keys): Doc fix.
12645 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12647 * search.c (search_buffer): Remove calls to
12648 r_alloc_inhibit_buffer_relocation, as it is now called by
12649 maybe_unify_char, which was the cause of relocation of buffer text
12652 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12654 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
12655 for the duration of call to load_charset, to avoid problems with
12656 callers of maybe_unify_char that access buffer text through C
12659 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
12660 decrement the inhibition flag, instead of just setting or
12663 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12665 Remove obsolete '#define static' cruft.
12666 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
12667 This #undef was "temporary" in 2000; it is no longer needed
12668 now that '#define static' has gone away.
12669 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
12670 (gray_bitmap_bits): Remove; no longer needed.
12671 All uses replaced with definiens.
12672 * xterm.c: Include "bitmaps/gray.xbm".
12674 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12676 Clean up __executable_start, monstartup when --enable-profiling.
12677 The following changes affect the code only when profiling.
12678 * dispnew.c (__executable_start): Rename from safe_bcopy.
12679 Define only on platforms that need it.
12680 * emacs.c: Include <sys/gmon.h> when profiling.
12681 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
12682 (__executable_start): Remove decl, since lisp.h does it now.
12683 (safe_bcopy): Remove decl; no longer has that name.
12684 (main): Coalesce #if into single bit of code, for simplicity.
12685 Cast pointers to uintptr_t, since standard libraries want integers
12687 * lisp.h (__executable_start): New decl.
12689 2012-05-31 Glenn Morris <rgm@gnu.org>
12691 * image.c (Fimagemagick_types): Doc fix.
12693 2012-05-30 Jim Meyering <meyering@redhat.com>
12695 * callproc.c (Fcall_process_region): Include directory component
12696 in mkstemp error message (Bug#11586).
12698 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12700 * alloc.c, lisp.h (make_pure_vector): Now static.
12702 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
12704 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
12705 Move to byte-run.el.
12706 (Fautoload): Do the hash-doc more carefully.
12707 * data.c (Fdefalias): Purify definition, except for keymaps.
12708 (Qdefun): Move from eval.c.
12709 * lisp.h (Qdefun): Remove.
12710 * lread.c (read1): Tiny simplification.
12712 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
12714 Do not create empty overlays with the evaporate property (Bug#9642).
12715 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
12716 Bug#9642, but explicitly check that the buffer the overlay would
12717 be moved to is live and rearrange lines to make sure that errors
12718 will not put the overlay in an inconsistent state.
12719 (Fdelete_overlay): Cosmetics.
12721 2012-05-28 Eli Zaretskii <eliz@gnu.org>
12723 * w32term.c (my_bring_window_to_top): New function.
12724 (x_raise_frame): Use handle returned by DeferWindowPos, which
12725 could be different from the original one.
12726 Call my_bring_window_to_top instead of my_set_foreground_window.
12729 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
12730 by calling BringWindowToTop.
12732 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
12733 (WM_EMACS_END): Increase by one.
12735 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
12737 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
12738 This avoids undefined behavior that might cause the eassert
12739 to not catch an out-of-range value.
12741 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
12743 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
12744 Update dependencies.
12746 2012-05-27 Eli Zaretskii <eliz@gnu.org>
12748 * bidi.c (bidi_mirror_char): Fix last change.
12750 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
12752 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
12753 when referring to sectname field in printf format.
12755 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
12757 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
12758 Only r_alloc_inhibit_buffer_relocation needed to be added;
12759 the others were already declared.
12761 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
12762 before checking whether it's out of range. Put the check inside
12764 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
12766 2012-05-27 Ken Brown <kbrown@cornell.edu>
12768 * callproc.c (Fcall_process): Restore a line that was accidentally
12769 commented out in the 2011-02-13 change (bug#11547).
12771 2012-05-27 Eli Zaretskii <eliz@gnu.org>
12773 * lisp.h [REL_ALLOC]: Add prototypes for external functions
12774 defined on ralloc.c.
12776 * buffer.c [REL_ALLOC]: Remove prototypes of
12777 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
12778 they are now on lisp.h.
12780 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
12782 * search.c (search_buffer): Use it to inhibit relocation of buffer
12783 text while re_search_2 is doing its job, because re_search_2 is
12784 passed C pointers to buffer text. (Bug#11519)
12786 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
12787 Update value to 24.
12789 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
12790 state after an additional call to move_it_in_display_line_to, keep
12791 the values of it->max_ascent and it->max_descent found for the
12793 (pos_visible_p): Revert the comparison against bottom_y to what it
12794 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
12797 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12799 Fix coding-related core dumps with gcc -ftrapv.
12800 The code was computing A - B, where A and B are pointers, and B is
12801 random garbage. This can lead to core dumps on platforms that
12802 have special pointer registers, and it also leads to core dumps on
12803 x86-64 when compiled with gcc -ftrapv. The fix is to compute
12804 A - B only when B is initialized properly.
12805 * coding.c (coding_set_source, coding_set_destination): Return void.
12806 (coding_change_source, coding_change_destinations): New functions,
12807 with the old behaviors of coding_set_source and coding_set_destination.
12808 All callers that need an offset changed to use these new functions.
12810 2012-05-26 Glenn Morris <rgm@gnu.org>
12812 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
12814 2012-05-26 Eli Zaretskii <eliz@gnu.org>
12816 Extend mouse support on W32 text-mode console.
12817 * xdisp.c (draw_row_with_mouse_face):
12818 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
12820 * w32console.c: Include window.h.
12821 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
12823 (initialize_w32_display): Initialize mouse-highlight data.
12825 * w32inevt.c: Include termchar.h and window.h.
12826 (do_mouse_event): Support mouse-autoselect-window. When the mouse
12827 moves, call note_mouse_highlight. If help_echo changed, call
12828 gen_help_event to produce help-echo message in the echo area.
12829 Call clear_mouse_face if mouse_face_hidden is set in the mouse
12832 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12834 * lread.c (read1): Simplify slightly to avoid an overflow warning
12835 with GCC 4.7.0 on x86-64.
12837 2012-05-26 Eli Zaretskii <eliz@gnu.org>
12839 * bidi.c (bidi_mirror_char): Revert last change: an int is
12840 definitely wide enough here.
12842 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
12844 Fix integer width and related bugs (Bug#9874).
12845 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
12846 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
12847 (string_bytes, check_sblock, allocate_string_data):
12848 (compact_small_strings, Fmake_bool_vector, make_string)
12849 (make_unibyte_string, make_multibyte_string)
12850 (make_string_from_bytes, make_specified_string)
12851 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
12852 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
12854 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12855 (allocate_pseudovector):
12856 Use int, not EMACS_INT, where int is wide enough.
12857 (inhibit_garbage_collection, Fgarbage_collect):
12858 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12859 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
12860 int might not be wide enough.
12861 (bidi_cache_search, bidi_cache_find, bidi_init_it)
12862 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
12863 (bidi_at_paragraph_end, bidi_find_paragraph_start)
12864 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
12865 (bidi_level_of_next_char, bidi_move_to_visually_next):
12866 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12867 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
12868 (Fkill_buffer, Fset_buffer_major_mode)
12869 (advance_to_char_boundary, Fbuffer_swap_text)
12870 (Fset_buffer_multibyte, overlays_at, overlays_in)
12871 (overlay_touches_p, struct sortvec, record_overlay_string)
12872 (overlay_strings, recenter_overlay_lists)
12873 (adjust_overlays_for_insert, adjust_overlays_for_delete)
12874 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
12875 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
12876 (Foverlay_recenter, last_overlay_modification_hooks_used)
12877 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
12878 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12879 (validate_region): Omit unnecessary test for b <= e,
12880 since that's guaranteed by the previous test.
12881 (adjust_overlays_for_delete): Avoid pos + length overflow.
12882 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
12883 (report_overlay_modification):
12884 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12885 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
12886 Omit pointer cast, which isn't needed anyway, and doesn't work
12887 after the EMACS_INT -> ptrdiff_t change.
12888 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
12889 * buffer.h: Adjust decls to match defn changes elsewhere.
12890 (struct buffer_text, struct buffer):
12891 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12892 Use EMACS_INT, not int, where int might not be wide enough.
12893 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
12894 not int, to avoid needless 32-bit limit on 64-bit hosts.
12895 (exec_byte_code): Use tighter memory-full test, one that checks
12896 for alloca overflow. Don't compute the address of the object just
12897 before an array, as that's not portable. Use EMACS_INT, not
12898 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
12899 * callint.c (Fcall_interactively):
12900 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12901 * callproc.c (call_process_kill, Fcall_process):
12902 Don't assume pid_t fits into an Emacs fixnum.
12903 (call_process_cleanup, Fcall_process, child_setup):
12904 Don't assume pid_t fits into int.
12905 (call_process_cleanup, Fcall_process, delete_temp_file)
12906 (Fcall_process_region):
12907 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12908 (Fcall_process): Simplify handling of volatile integers.
12909 Use int, not EMACS_INT, where int will do.
12910 * casefiddle.c (casify_object, casify_region, operate_on_word)
12911 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
12912 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12913 (casify_object): Avoid integer overflow when overallocating buffer.
12914 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
12915 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
12916 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
12917 * category.h (CATEGORYP): Don't assume arg is nonnegative.
12918 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
12919 integers are now checked earlier. All uses replaced with XINT.
12921 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12922 For CCL_MapSingle, check that content and value are in int range.
12923 (ccl_driver, Fregister_code_conversion_map):
12924 Check that Vcode_version_map_vector is a vector.
12925 (resolve_symbol_ccl_program): Check that vector header is in range.
12926 Always copy the vector, so that we can check its contents reliably
12927 now rather than having to recheck each instruction as it's being
12928 executed. Check that vector words fit in 'int'.
12929 (ccl_get_compiled_code, Fregister_ccl_program)
12930 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
12931 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
12932 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
12933 contents are in range.
12934 (Fccl_execute_on_string): Check that status is in range.
12935 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
12936 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
12937 Accept and return EMACS_INT, not int, because callers can pass values
12938 out of 'int' range.
12939 (c_string_width, strwidth, lisp_string_width, chars_in_text)
12940 (multibyte_chars_in_text, parse_str_as_multibyte)
12941 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
12942 (str_as_unibyte, str_to_unibyte, string_count_byte8)
12943 (string_escape_byte8, Fget_byte):
12944 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12945 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
12946 avoid mishandling large integers.
12947 * character.h: Adjust decls to match defn changes elsewhere.
12948 * charset.c (load_charset_map_from_file, find_charsets_in_text)
12949 (Ffind_charset_region):
12950 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12951 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
12952 (load_charset_map_from_vector, Fdefine_charset_internal):
12953 Don't assume fixnum fits in int.
12954 (load_charset_map_from_vector, Fmap_charset_chars):
12955 Remove now-unnecessary CHECK_NATNUMs.
12956 (Fdefine_charset_internal): Check ranges here, more carefully.
12957 Don't rely on undefined behavior with signed left shift overflow.
12958 Don't assume unsigned int fits into fixnum, or that fixnum fits
12959 into unsigned int. Don't require max_code to be a valid fixnum;
12960 that's not true for gb10830 4-byte on a 32-bit host. Allow
12961 invalid_code to be a cons, for the same reason. Require code_offset
12962 to be a character. Avoid int overflow if max_char is close
12964 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
12965 this is intended anyway and avoids some undefined behavior.
12966 (load_charset_map): Pass unsigned, not int, as 2nd arg of
12967 INDEX_TO_CODE_POINT, as that's what it expects.
12968 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
12969 * charset.h (DECODE_CHAR): Return int, not unsigned;
12970 this is what was intended anyway, and it avoids undefined behavior.
12971 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
12972 integer-overflow issues.
12973 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
12974 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
12975 where the argument is EMACS_INT, and this behavior is not intended.
12976 * chartab.c (Fmake_char_table, Fset_char_table_range)
12977 (uniprop_get_decoder, uniprop_get_encoder):
12978 Don't assume fixnum fits in int.
12979 * cmds.c (move_point): New function, that does the gist of
12980 Fforward_char and Fbackward_char, but does so while checking
12981 for integer overflow more accurately.
12982 (Fforward_char, Fbackward_char): Use it.
12983 (Fforward_line, Fend_of_line, internal_self_insert)
12984 (internal_self_insert):
12985 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12986 Fix a FIXME, by checking for integer overflow when calculating
12987 target_clm and actual_clm.
12988 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
12989 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
12990 (ASSURE_DESTINATION, coding_alloc_by_realloc)
12991 (coding_alloc_by_making_gap, alloc_destination)
12992 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
12993 (encode_coding_utf_16, detect_coding_emacs_mule)
12994 (decode_coding_emacs_mule, encode_coding_emacs_mule)
12995 (detect_coding_iso_2022, decode_coding_iso_2022)
12996 (encode_invocation_designation, encode_designation_at_bol)
12997 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
12998 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
12999 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
13000 (encode_coding_ccl, encode_coding_raw_text)
13001 (detect_coding_charset, decode_coding_charset)
13002 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
13003 (produce_composition, produce_charset, produce_annotation)
13004 (decode_coding, handle_composition_annotation)
13005 (handle_charset_annotation, consume_chars, decode_coding_gap)
13006 (decode_coding_object, encode_coding_object, detect_coding_system)
13007 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
13008 (code_convert_region, code_convert_string)
13009 (Fdefine_coding_system_internal)
13010 (coding_set_source, coding_set_destination):
13011 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13012 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
13013 (Fdefine_coding_system_internal):
13014 Don't assume fixnums fit in int.
13015 (decode_coding_gap, decode_coding_object, encode_coding_object)
13016 (Fread_coding_system, Fdetect_coding_region)
13017 (Funencodable_char_position, Fcheck_coding_systems_region)
13018 (get_translation, handle_composition_annotation, consume_chars):
13019 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13020 (consume_chars): Rewrite to not calculate an address outside buffer.
13021 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
13022 Don't access memory outside of the args array.
13023 (Fdefine_coding_system_internal): Check for charset-id overflow.
13024 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
13025 result of ENCODE_CHAR.
13026 * coding.h: Adjust decls to match defn changes elsewhere.
13027 (struct coding_system):
13028 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13029 * composite.c (get_composition_id, find_composition)
13030 (run_composition_function, update_compositions)
13031 (compose_text, composition_gstring_put_cache)
13032 (composition_gstring_p, composition_gstring_width)
13033 (fill_gstring_header, fill_gstring_body, autocmp_chars)
13034 (composition_compute_stop_pos, composition_reseat_it)
13035 (composition_update_it, struct position_record)
13036 (find_automatic_composition, composition_adjust_point)
13037 (Fcomposition_get_gstring, Ffind_composition_internal):
13038 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13039 (update_compositions):
13040 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13041 * composite.h: Adjust decls to match defn changes elsewhere.
13042 (struct composition):
13043 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13044 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
13045 Do not attempt to compute the address of the object just before a
13046 buffer; this is not portable.
13048 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13049 (Faset): Use int, not EMACS_INT, where int is wide enough.
13050 (Fstring_to_number): Don't assume fixnums fit in int.
13051 (Frem): Don't assume arg is nonnegative.
13052 * dbusbind.c (xd_append_arg): Check for integers out of range.
13053 (Fdbus_call_method): Don't overflow the timeout int.
13054 (extract_signed, extract_unsigned): New functions.
13055 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
13056 (xd_get_connection_references): Return ptrdiff_t, not int.
13058 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
13059 (xd_read_message_1):
13060 Use int, not unsigned, where the dbus API uses int.
13061 (Fdbus_message_internal): Don't overflow mtype.
13062 (syms_of_dbusbind): Allocate right-sized buffer for integers.
13063 * dired.c (directory_files_internal, file_name_completion, scmp)
13064 (file_name_completion_stat):
13065 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13066 (file_name_completion): Don't overflow matchcount.
13067 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
13068 * dispextern.h: Adjust decls to match defn changes elsewhere.
13069 (struct text_pos, struct glyph, struct bidi_saved_info)
13070 (struct bidi_string_data, struct bidi_it, struct composition_it)
13072 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13073 (struct display_pos, struct composition_it, struct it):
13074 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13075 * dispnew.c (increment_matrix_positions)
13076 (increment_row_positions, mode_line_string)
13077 (marginal_area_string):
13078 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13079 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
13080 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13081 (duration_to_sec_usec): New function, to check for overflow better.
13082 (Fsleep_for, sit_for): Use it.
13083 * doc.c (get_doc_string, store_function_docstring):
13084 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13085 (get_doc_string, Fsnarf_documentation):
13086 Use int, not EMACS_INT, where int is wide enough.
13088 Use SAFE_ALLOCA, not alloca.
13089 Check for overflow when converting EMACS_INT to off_t.
13090 * doprnt.c (doprnt):
13091 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13092 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
13093 Don't assume uid_t fits into fixnum.
13094 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
13095 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
13096 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
13097 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
13098 (general_insert_function)
13099 (Finsert_char, make_buffer_string, make_buffer_string_both)
13100 (update_buffer_properties, Fbuffer_substring)
13101 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
13102 (Fsubst_char_in_region, check_translation)
13103 (Ftranslate_region_internal, save_restriction_restore, Fformat)
13104 (transpose_markers, Ftranspose_regions):
13105 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13106 (clip_to_bounds): Move to lisp.h as an inline function).
13107 (Fconstrain_to_field): Don't assume integers are nonnegative.
13108 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
13109 (Fsubst_char_in_region, Fsave_restriction):
13110 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13111 (Femacs_pid): Don't assume pid_t fits into fixnum.
13112 (lo_time): Use int, not EMACS_INT, when int suffices.
13113 (lisp_time_argument): Check for usec out of range.
13114 (Fencode_time): Don't assume fixnum fits in int.
13115 (Fuser_login_name, Fuser_full_name): Signal an error
13116 if a uid argument is out of range, rather than relying on
13117 undefined behavior.
13118 (Fformat_time_string): Remove now-unnecessary check.
13119 lisp_time_argument checks for out-of-range usec now.
13120 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
13121 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
13122 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
13123 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
13124 (init_cmdargs, Fdump_emacs):
13125 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13126 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
13127 the bottom (typically) 32 bits of the fixnum.
13128 * eval.c (specpdl_size, call_debugger):
13129 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13130 (when_entered_debugger, Fbacktrace_debug):
13131 Don't assume fixnum can fit in int.
13132 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
13133 the object just before a buffer; this is not portable.
13134 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
13135 (grow_specpdl, unbind_to):
13136 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13137 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
13138 (grow_specpdl): Simplify allocation by using xpalloc.
13139 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
13140 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
13141 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
13142 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13143 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
13144 (a_write, e_write):
13145 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13146 (Fcopy_file, non_regular_nbytes, read_non_regular)
13147 (Finsert_file_contents):
13148 Use int, not EMACS_INT, where int is wide enough.
13149 (READ_BUF_SIZE): Verify that it fits in int.
13150 (Finsert_file_contents): Check that counts are in proper range,
13151 rather than assuming fixnums fit into ptrdiff_t etc.
13152 Don't assume fixnums fit into int.
13153 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
13154 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
13155 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
13156 (string_char_to_byte, string_byte_to_char)
13157 (string_make_multibyte, string_to_multibyte)
13158 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
13159 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
13160 (substring_both, Fdelete, internal_equal, Ffillarray)
13161 (Fclear_string, mapcar1)
13162 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
13163 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
13164 (larger_vector, make_hash_table, maybe_resize_hash_table)
13165 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
13166 (Fmaphash, secure_hash):
13167 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13168 (concat): Check for string index and length overflow.
13169 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
13171 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13172 (larger_vector): New API (vec, incr_min, size_max) replaces old
13173 one (vec, new_size, init). This catches size overflow.
13174 INIT was removed because it was always Qnil.
13175 All callers changed.
13176 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
13177 the upper bound on a hash table index size.
13178 (make_hash_table, maybe_resize_hash_table): Use it.
13179 (secure_hash): Computer start_byte and end_byte only after
13180 they're known to be in ptrdiff_t range.
13181 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
13182 (Ffont_get_glyphs, Ffont_at):
13183 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13184 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
13185 (Flist_fonts, Fopen_font):
13186 Don't assume fixnum can fit in int.
13187 (check_gstring): Don't assume index can fit in int.
13188 (font_match_p): Check that fixnum is a character, not a nonnegative
13189 fixnum, since the later code needs to stuff it into an int.
13190 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
13191 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
13192 conversion overflow issues.
13193 (Fopen_font): Check for integer out of range.
13194 (Ffont_get_glyphs): Don't assume index can fit in int.
13195 * font.h: Adjust decls to match defn changes elsewhere.
13196 * fontset.c (reorder_font_vector): Redo score calculation to avoid
13198 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
13199 printmax_t, where ptrdiff_t is wide enough.
13200 (Finternal_char_font):
13201 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13202 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
13203 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
13204 (Fset_frame_position, x_set_frame_parameters)
13205 (x_set_line_spacing, x_set_border_width)
13206 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
13207 Check that fixnums are in proper range for system types.
13208 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
13209 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13210 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
13211 Use SAFE_ALLOCA_LISP, not alloca.
13212 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
13213 intptr_t is wide enough.
13214 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
13215 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
13216 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
13217 Check for fixnum out of range.
13218 * ftfont.c (ftfont_list): Don't assume index fits in int.
13219 Check that fixnums are in proper range for system types.
13220 (ftfont_shape_by_flt):
13221 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13222 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
13223 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13224 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
13225 Check that fixnums are in proper range for system types.
13226 * gnutls.h: Adjust decls to match defn changes elsewhere.
13227 * gtkutil.c (xg_dialog_run):
13228 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13229 (update_frame_tool_bar):
13230 Check that fixnums are in proper range for system types.
13231 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
13232 (lookup_image): Check that fixnums are in range for system types.
13233 * indent.c (last_known_column, last_known_column_point):
13234 (current_column_bol_cache):
13235 (skip_invisible, current_column, check_display_width):
13236 (check_display_width, scan_for_column, current_column_1)
13237 (Findent_to, Fcurrent_indentation, position_indentation)
13238 (indented_beyond_p, Fmove_to_column, compute_motion):
13239 (Fcompute_motion, Fvertical_motion):
13240 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13241 (last_known_column_modified): Use EMACS_INT, not int.
13242 (check_display_width):
13244 Check that fixnums and floats are in proper range for system types.
13245 (compute_motion): Don't assume index or fixnum fits in int.
13246 (compute_motion, Fcompute_motion):
13247 Use int, not EMACS_INT, when it is wide enough.
13248 (vmotion): Omit local var start_hpos that is always 0; that way
13249 we don't need to worry about overflow in expressions involving it.
13250 * indent.h: Adjust decls to match defn changes elsewhere.
13252 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13253 Use int, not EMACS_INT, where int is wide enough.
13254 Remove unused members ovstring_chars_done and tab_offset;
13256 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
13257 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
13258 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
13259 (make_gap, copy_text, insert, insert_and_inherit)
13260 (insert_before_markers, insert_before_markers_and_inherit)
13261 (insert_1, count_combining_before, count_combining_after)
13262 (insert_1_both, insert_from_string)
13263 (insert_from_string_before_markers, insert_from_string_1)
13264 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
13265 (adjust_after_replace, adjust_after_insert, replace_range)
13266 (replace_range_2, del_range, del_range_1, del_range_byte)
13267 (del_range_both, del_range_2, modify_region)
13268 (prepare_to_modify_buffer, signal_before_change)
13269 (signal_after_change, Fcombine_after_change_execute):
13270 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13271 * intervals.c (traverse_intervals, rotate_right, rotate_left)
13272 (balance_an_interval, split_interval_right, split_interval_left)
13273 (find_interval, next_interval, update_interval)
13274 (adjust_intervals_for_insertion, delete_node, delete_interval)
13275 (interval_deletion_adjustment, adjust_intervals_for_deletion)
13276 (static_offset_intervals, offset_intervals)
13277 (merge_interval_right, merge_interval_left, make_new_interval)
13278 (graft_intervals_into_buffer, temp_set_point_both)
13279 (temp_set_point, set_point, adjust_for_invis_intang)
13280 (set_point_both, move_if_not_intangible, get_property_and_range)
13281 (get_local_map, copy_intervals, copy_intervals_to_string)
13282 (compare_string_intervals, set_intervals_multibyte_1):
13283 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13284 * intervals.h: Adjust decls to match defn changes elsewhere.
13286 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13287 * keyboard.c (this_command_key_count, this_single_command_key_start)
13288 (before_command_key_count, before_command_echo_length, echo_now)
13289 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
13290 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
13291 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
13292 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
13293 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13294 (last_non_minibuf_size, last_point_position, echo_truncate)
13295 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
13296 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
13297 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
13298 (stuff_buffered_input):
13299 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13300 (last_auto_save, command_loop_1, read_char):
13301 Use EMACS_INT, not int, to avoid integer overflow.
13302 (record_char): Avoid overflow in total_keys computation.
13303 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
13304 * keyboard.h: Adjust decls to match defn changes elsewhere.
13305 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
13306 (Fkey_description, Fdescribe_vector, Flookup_key):
13307 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13308 (click_position): New function, to check that positions are in range.
13309 (Fcurrent_active_maps):
13310 (describe_command):
13311 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13312 (Faccessible_keymaps, Fkey_description):
13313 (preferred_sequence_p):
13314 Don't assume fixnum can fit into int.
13315 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
13316 Check for integer overflow in size calculations.
13317 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
13318 avoid mishandling large integers.
13319 * lisp.h: Adjust decls to match defn changes elsewhere.
13320 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
13321 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
13322 (struct Lisp_Marker):
13323 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13324 (clip_to_bounds): Now an inline function, moved here from editfns.c.
13325 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
13326 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
13327 All callers changed.
13328 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
13329 Assume the arg has valid form, since it always does.
13330 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
13331 unsigned integer system type.
13332 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
13333 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
13334 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13335 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
13336 (duration_to_sec_usec): New decl.
13337 * lread.c (read_from_string_index, read_from_string_index_byte)
13338 (read_from_string_limit, readchar, unreadchar, openp)
13339 (read_internal_start, read1, oblookup):
13340 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13341 (Fload, readevalloop, Feval_buffer, Feval_region):
13342 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13343 (openp): Check for out-of-range argument to 'access'.
13344 (read1): Use int, not EMACS_INT, where int is wide enough.
13345 Don't assume fixnum fits into int.
13346 Fix off-by-one error that can read outside a buffer.
13347 (read_filtered_event): Use duration_to_sec_usec
13348 to do proper overflow checking on durations.
13349 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
13350 in size calculation.
13351 (Fexecute_kbd_macro):
13352 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13353 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
13354 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
13355 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
13356 (set_marker_both, set_marker_restricted_both, marker_position)
13357 (marker_byte_position, Fbuffer_has_markers_at):
13358 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13359 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
13360 * menu.c (ensure_menu_items): Rename from grow_menu_items.
13361 It now merely ensures that the menu is large enough, without
13362 necessarily growing it, as this avoids some integer overflow issues.
13363 All callers changed.
13364 (keymap_panes, parse_single_submenu, Fx_popup_menu):
13365 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13366 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
13367 Use SAFE_ALLOCA_LISP, not alloca.
13368 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
13369 to EMACS_INT. Check that fixnums are in proper range for system types.
13370 * minibuf.c (minibuf_prompt_width, string_to_object)
13371 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
13372 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
13373 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13374 (get_minibuffer, read_minibuf_unwind):
13375 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13376 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
13377 this simplifies overflow checking. All callers changed.
13378 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
13379 (Ftest_completion):
13380 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13381 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
13382 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
13383 Check that fixnums are in proper range for system types.
13384 (Fx_create_frame, Fx_show_tip):
13385 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13386 * nsfont.m (ns_findfonts, nsfont_list_family):
13387 Don't assume fixnum fits in long.
13388 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
13389 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13390 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
13392 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
13393 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13394 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
13395 (PRINTDECLARE, PRINTPREPARE):
13396 (strout, print_string):
13397 (print, print_preprocess, print_check_string_charset_prop)
13399 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13401 (temp_output_buffer_setup, Fprin1_to_string, print_object):
13402 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13403 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
13404 (printchar, strout): Use xpalloc to catch size calculation overflow.
13405 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
13406 (print_error_message): Use SAFE_ALLOCA, not alloca.
13407 (print_object): Use int, not EMACS_INT, where int is wide enough.
13408 (print_depth, new_backquote_output, print_number_index):
13409 Use ptrdiff_t, not int, where int might not be wide enough.
13410 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
13411 (Fset_process_window_size, Fformat_network_address)
13412 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
13414 Check that fixnums are in proper range for system types.
13415 (Fsignal_process): Simplify by avoiding a goto.
13416 Check for process-ids out of pid_t range rather than relying on
13417 undefined behavior.
13418 (process_tick, update_tick): Use EMACS_INT, not int.
13419 (Fformat_network_address, read_process_output, send_process)
13420 (Fprocess_send_region, status_notify):
13421 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13422 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
13423 (wait_reading_process_output, read_process_output, exec_sentinel):
13424 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13425 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
13426 (Faccept_process_output): Use duration_to_sec_usec to do proper
13427 overflow checking on durations.
13428 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
13429 Don't assume pid_t fits in int.
13430 * process.h (struct Lisp_Process): Members tick and update_tick
13431 are now of type EMACS_INT, not int.
13432 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
13433 configured --with-wide-int.
13434 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
13435 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
13436 * search.c (looking_at_1, string_match_1):
13437 (fast_string_match, fast_c_string_match_ignore_case)
13438 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
13439 (scan_newline, find_before_next_newline, search_command)
13440 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
13441 (set_search_regs, wordify):
13444 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13445 (string_match_1, search_buffer, set_search_regs):
13447 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13448 (wordify): Check for overflow in size calculation.
13449 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
13450 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
13451 Check that fixnums are in proper range for system types.
13452 * sound.c (struct sound_device)
13453 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
13454 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13455 (Fplay_sound_internal):
13456 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13457 * syntax.c (struct lisp_parse_state, find_start_modiff)
13458 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
13459 (Fparse_partial_sexp):
13460 Don't assume fixnums can fit in int.
13461 (struct lisp_parse_state, find_start_pos, find_start_value)
13462 (find_start_value_byte, find_start_begv)
13463 (update_syntax_table, char_quoted, dec_bytepos)
13464 (find_defun_start, prev_char_comend_first, back_comment):
13465 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
13466 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
13467 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13468 (Finternal_describe_syntax_value): Check that match_lisp is a
13469 character, not an integer, since the code stuffs it into int.
13470 (scan_words, scan_sexps_forward):
13471 Check that fixnums are in proper range for system types.
13473 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13474 (scan_sexps_forward):
13475 Use CHARACTERP, not INTEGERP, since the value must fit into int.
13476 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
13477 * syntax.h: Adjust decls to match defn changes elsewhere.
13478 (struct gl_state_s):
13479 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13480 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
13481 MOST_POSITIVE_FIXNUM.
13482 * sysdep.c (wait_for_termination_1, wait_for_termination)
13483 (interruptible_wait_for_termination, mkdir):
13484 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
13485 (emacs_read, emacs_write):
13486 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13487 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
13488 and double all fit in int.
13489 * term.c (set_tty_color_mode):
13490 Check that fixnums are in proper range for system types.
13491 * termhooks.h (struct input_event):
13492 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13493 * textprop.c (validate_interval_range, interval_of)
13494 (Fadd_text_properties, set_text_properties_1)
13495 (Fremove_text_properties, Fremove_list_of_text_properties)
13496 (Ftext_property_any, Ftext_property_not_all)
13497 (copy_text_properties, text_property_list, extend_property_ranges)
13498 (verify_interval_modification):
13499 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13500 (Fnext_single_char_property_change)
13501 (Fprevious_single_char_property_change):
13502 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13503 (copy_text_properties):
13504 Check for integer overflow in index calculation.
13505 * undo.c (last_boundary_position, record_point, record_insert)
13506 (record_delete, record_marker_adjustment, record_change)
13507 (record_property_change):
13508 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13509 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
13510 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13511 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
13512 (Fx_hide_tip, Fx_file_dialog):
13513 * w32menu.c (set_frame_menubar):
13514 Use ptrdiff_t, not int, for consistency with rest of code.
13515 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
13516 (select_window, Fdelete_other_windows_internal)
13517 (window_scroll_pixel_based, window_scroll_line_based)
13518 (Frecenter, Fset_window_configuration):
13519 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13520 (Fset_window_hscroll, run_window_configuration_change_hook)
13521 (set_window_buffer, temp_output_buffer_show, scroll_command)
13522 (Fscroll_other_window, Frecenter):
13523 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13524 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
13525 Don't assume fixnum fits in int.
13526 (Fset_window_scroll_bars):
13527 Check that fixnums are in proper range for system types.
13528 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
13529 (string_pos, c_string_pos, number_of_chars, init_iterator)
13530 (in_ellipses_for_invisible_text_p, init_from_display_pos)
13531 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
13532 (compute_display_string_end, handle_face_prop)
13533 (face_before_or_after_it_pos, handle_invisible_prop)
13534 (handle_display_prop, handle_display_spec, handle_single_display_spec)
13535 (display_prop_intangible_p, string_buffer_position_lim)
13536 (string_buffer_position, handle_composition_prop, load_overlay_strings)
13537 (get_overlay_strings_1, get_overlay_strings)
13538 (iterate_out_of_display_property, forward_to_next_line_start)
13539 (back_to_previous_visible_line_start, reseat, reseat_to_string)
13540 (get_next_display_element, set_iterator_to_next)
13541 (get_visually_first_element, compute_stop_pos_backwards)
13542 (handle_stop_backwards, next_element_from_buffer)
13543 (move_it_in_display_line_to, move_it_in_display_line)
13544 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13545 (add_to_log, message_dolog, message_log_check_duplicate)
13546 (message2, message2_nolog, message3, message3_nolog
13547 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
13548 (current_message_1, truncate_echo_area, truncate_message_1)
13549 (set_message, set_message_1, store_mode_line_noprop)
13550 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
13551 (text_outside_line_unchanged_p, check_point_in_composition)
13552 (reconsider_clip_changes)
13553 (redisplay_internal, set_cursor_from_row, try_scrolling)
13554 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
13555 (redisplay_window, find_last_unchanged_at_beg_row)
13556 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
13557 (trailing_whitespace_p, find_row_edges, display_line)
13558 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
13559 (display_mode_element, store_mode_line_string)
13560 (pint2str, pint2hrstr, decode_mode_spec)
13561 (display_count_lines, display_string, draw_glyphs)
13562 (x_produce_glyphs, x_insert_glyphs)
13563 (rows_from_pos_range, mouse_face_from_buffer_pos)
13564 (fast_find_string_pos, mouse_face_from_string_pos)
13565 (note_mode_line_or_margin_highlight, note_mouse_highlight):
13566 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13567 (safe_call, init_from_display_pos, handle_fontified_prop)
13568 (handle_single_display_spec, load_overlay_strings)
13569 (with_echo_area_buffer, setup_echo_area_for_printing)
13570 (display_echo_area, echo_area_display)
13571 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
13572 (update_tool_bar, hscroll_window_tree, redisplay_internal)
13573 (redisplay_window, dump_glyph_row, display_mode_line)
13574 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
13575 (handle_display_spec, display_prop_string_p):
13576 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13577 (handle_single_display_spec, build_desired_tool_bar_string)
13578 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
13579 (get_specified_cursor_type):
13580 Check that fixnums are in proper range for system types.
13581 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
13582 (Flookup_image_map):
13583 Don't assume fixnums fit in int.
13584 (compare_overlay_entries):
13585 Avoid mishandling comparisons due to subtraction overflow.
13586 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
13587 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
13588 (handle_tool_bar_click):
13589 Use int, not unsigned, since we prefer signed and the signedness
13590 doesn't matter here.
13591 (get_next_display_element, next_element_from_display_vector):
13592 Use int, not EMACS_INT, when int is wide enough.
13593 (start_hourglass): Use duration_to_sec_usec to do proper
13594 overflow checking on durations.
13595 * xfaces.c (Fbitmap_spec_p):
13596 Check that fixnums are in proper range for system types.
13597 (compare_fonts_by_sort_order):
13598 Avoid mishandling comparisons due to subtraction overflow.
13599 (Fx_family_fonts, realize_basic_faces):
13600 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13602 Don't assume fixnum fits in int.
13603 Use SAFE_ALLOCA_LISP, not alloca.
13604 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
13605 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
13606 (face_at_buffer_position, face_for_overlay_string)
13607 (face_at_string_position):
13608 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13609 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
13610 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
13612 Check that fixnums are in proper range for system types.
13613 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
13614 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
13615 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13616 (Fx_change_window_property): Don't assume fixnums fit in int.
13617 * xfont.c (xfont_chars_supported):
13618 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13619 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
13620 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
13621 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13622 * xml.c (parse_region):
13623 * xrdb.c (magic_file_p):
13624 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13625 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
13626 (x_get_local_selection, x_reply_selection_request)
13627 (x_handle_selection_request, wait_for_property_change):
13628 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13629 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
13630 short is wide enough.
13631 (x_send_client_event): Don't assume fixnum fits in int.
13632 * xterm.c (x_x_to_emacs_modifiers):
13633 Don't assume EMACS_INT overflows nicely into int.
13634 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
13635 may come from Lisp.
13636 (handle_one_xevent): NATNUMP can eval its arg twice.
13637 (x_connection_closed):
13638 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13639 * xterm.h: Adjust decls to match defn changes elsewhere.
13640 (struct scroll_bar): Use struct vectorlike_header
13641 rather than rolling our own approximation.
13642 (SCROLL_BAR_VEC_SIZE): Remove; not used.
13644 2012-05-25 Glenn Morris <rgm@gnu.org>
13646 * lisp.mk (lisp): Update for more files being compiled now.
13648 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
13650 * lread.c: Remove `read_pure' which makes no difference.
13651 (read_pure): Remove var.
13652 (unreadpure): Remove function.
13653 (readevalloop): Don't call read_list with -1 flag.
13654 (read1, read_vector): Don't test read_pure any more.
13655 (read_list): Simplify.
13657 * fileio.c, character.h: Minor style tweaks.
13659 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
13661 * window.h (clip_changed): Remove useless declaration.
13663 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
13665 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
13666 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
13668 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
13671 This directory predates autoconf and is no longer needed nowadays.
13672 Move its few remaining bits of functionality to where they're needed.
13673 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
13674 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
13675 * m/template.h: Remove.
13676 * Makefile.in (M_FILE): Remove. All uses removed.
13677 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
13678 * lisp.h (USE_LSB_TAG):
13679 * mem-limits.h (EXCEEDS_LISP_PTR):
13680 Use VAL_MAX, not VALBITS, in #if.
13681 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
13682 (EMACS_UINT): Define unconditionally now.
13683 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
13684 (BITS_PER_EMACS_INT): New constants, replacing
13685 what used to be in config.h, but not useful in #if.
13686 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
13687 define them any more.
13688 (VAL_MAX): New macro.
13690 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
13691 BITS_PER_EMACS_INT, in #if.
13692 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
13693 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
13694 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
13695 * s/ms-w32.h (DATA_START):
13696 Move here from removed file m/intel386.h.
13697 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
13698 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
13700 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
13702 Assume C89 or later.
13703 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
13704 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
13706 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
13707 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
13708 * textprop.c, tparam.c (NULL): Remove.
13709 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
13710 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
13711 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
13712 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
13713 * xterm.c (input_signal_count): Assume volatile works.
13715 2012-05-21 Ken Brown <kbrown@cornell.edu>
13717 * xgselect.c (xg_select): Fix first argument in call to 'select'
13720 2012-05-20 Ken Brown <kbrown@cornell.edu>
13722 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
13723 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
13725 2012-05-19 Ken Brown <kbrown@cornell.edu>
13727 * xfns.c (x_in_use): Remove `static' qualifier.
13728 * xterm.h (x_in_use): Declare.
13729 * xgselect.c: Include xterm.h.
13730 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
13731 and `display_arg' (bug#9754).
13733 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
13735 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
13737 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
13738 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
13740 2012-05-18 Eli Zaretskii <eliz@gnu.org>
13742 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
13744 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
13745 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
13747 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
13748 reference to image_cache->refcount.
13749 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
13751 2012-05-17 Juri Linkov <juri@jurta.org>
13753 * search.c (Fword_search_regexp, Fword_search_backward)
13754 (Fword_search_forward, Fword_search_backward_lax)
13755 (Fword_search_forward_lax): Move functions to isearch.el
13756 (bug#10145, bug#11381).
13758 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
13760 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
13762 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
13764 * lread.c (init_obarray): Declare Qt and Qnil as special.
13766 2012-05-14 Glenn Morris <rgm@gnu.org>
13768 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
13769 Put "libexec" before "bin", for the sake of init_callproc_1.
13771 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
13773 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
13775 * unexaix.c: Port to more-recent AIX compilers.
13776 (report_error, report_error_1, make_hdr, copy_sym)
13777 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
13778 Make arguments const char *, not char *, to avoid violations of C
13779 standard and to fix some AIX warnings reported by Gilles Pion.
13781 2012-05-14 Eli Zaretskii <eliz@gnu.org>
13783 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
13784 already have overlays loaded.
13785 (handle_single_display_spec): Before returning without displaying
13786 fringe bitmap, synchronize the bidi iterator with the main display
13787 iterator, by calling iterate_out_of_display_property.
13788 (iterate_out_of_display_property): Detect buffer iteration by
13789 testing that it->string is a Lisp string.
13790 (get_next_display_element): When the current object is exhausted,
13791 and there's something on it->stack, call set_iterator_to_next to
13792 proceed with what's on the stack, instead of returning zero.
13793 (set_iterator_to_next): If called at the end of a Lisp string,
13794 proceed to consider_string_end without incrementing string
13795 position. Don't increment display vector index past the end of
13796 the display vector. (Bug#11417)
13797 (pos_visible_p): Don't report a position visible when move_it_to
13798 stopped at the last line of window, which happens to be scanned
13799 backwards by the bidi iteration. (Bug#11464)
13801 2012-05-14 Eli Zaretskii <eliz@gnu.org>
13803 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
13804 and right-margin display specs even if the spec is invalid or we
13805 are on a TTY, and thus unable to display on the fringes.
13806 That's because the text with the property will not be displayed anyway,
13807 so we need to signal to the caller that this is a "replacing"
13808 display spec. This fixes display when the spec is invalid or we
13811 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
13813 * unexaix.c (make_hdr): Fix typo in prototype.
13814 This bug broke the build on AIX. Problem reported by Gilles Pion.
13816 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
13818 * keyboard.c (kbd_buffer_get_event): Read special events also in
13819 batch mode. (Bug#11415)
13821 2012-05-12 Glenn Morris <rgm@gnu.org>
13823 * ns.mk: Update for ns_appbindir no longer having trailing "/".
13825 2012-05-12 Eli Zaretskii <eliz@gnu.org>
13827 * lisp.mk (lisp): Add newcomment.elc.
13829 2012-05-12 Glenn Morris <rgm@gnu.org>
13831 * Makefile.in (MKDIR_P): New, set by configure.
13832 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
13834 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
13836 Remove unused function hourglass_started.
13837 * dispextern.h (hourglass_started):
13838 * w32fns.c (hourglass_started):
13839 * xdisp.c (hourglass_started): Remove.
13841 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
13843 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
13844 Update dependencies.
13846 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
13848 * xgselect.c (xg_select): Put maxfds+1 into a var.
13849 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
13851 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
13853 2012-05-10 Dave Abrahams <dave@boostpro.com>
13855 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
13856 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
13858 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
13860 * dbusbind.c (xd_registered_buses): New internal Lisp object.
13861 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
13862 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
13863 Initialize xd_registered_buses.
13865 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
13867 Untag more efficiently if USE_LSB_TAG.
13868 This is based on a proposal by YAMAMOTO Mitsuharu in
13869 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
13870 For an admittedly artificial (nth 8000 longlist) benchmark on
13871 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
13872 Emacs's overall text size by 1%.
13873 * lisp.h (XUNTAG): New macro.
13874 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
13875 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
13876 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
13877 * eval.c (Fautoload):
13878 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
13879 * frame.h (XFRAME): Use XUNTAG.
13881 Port recent dbusbind.c changes to 32-bit --with-wide-int.
13882 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
13883 Remove unportable assumptions about print widths of types like
13885 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
13886 intptr_t when converting between pointer and integer, to avoid GCC
13887 warnings about wrong width.
13889 2012-05-09 Eli Zaretskii <eliz@gnu.org>
13891 * w32proc.c (new_child): Force Windows to reserve only 64KB of
13892 stack for each reader_thread, instead of defaulting to 8MB
13893 determined by the linker. This avoids failures in creating
13894 subprocesses on Windows 7, see the discussion in this thread:
13895 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
13897 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
13899 Fix up display of the *Minibuf-0* buffer in the mini window.
13900 * keyboard.c (read_char): Don't clear the echo area if there's no
13902 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
13903 contents of *Minibuf-0*) if there's no message displayed in its stead.
13905 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
13907 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
13910 2012-05-06 Chong Yidong <cyd@gnu.org>
13912 * lisp.mk (lisp): Update.
13914 2012-05-05 Jim Meyering <meyering@redhat.com>
13916 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
13918 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
13920 * data.c (PUT_ERROR): New macro.
13921 (syms_of_data): Use it. Add new error type `user-error'.
13922 * undo.c (user_error): New function.
13923 (Fprimitive_undo): Use it.
13924 * print.c (print_error_message): Adjust print style for `user-error'.
13925 * keyboard.c (user_error): New function.
13926 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
13928 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
13930 Do not limit current-time-string to years 1000..9999.
13931 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
13932 (Fcurrent_time_string): Support any year that is supported by the
13933 underlying localtime representation. Don't use asctime, as it
13934 has undefined behavior for years outside the range -999..9999.
13936 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
13938 Fix race conditions involving setenv, gmtime, localtime, asctime.
13939 Without this fix, interrupts could mess up code that uses these
13940 nonreentrant functions, since setting TZ invalidates existing
13941 tm_zone or tzname values, and since most of these functions return
13942 pointers to static storage.
13943 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
13944 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
13945 Grow the critical sections to include not just invoking
13946 localtime/gmtime, but also accessing these functions' results
13947 including their tm_zone values if any, and any related TZ setting.
13948 (format_time_string): Last arg is now struct tm *, not struct tm **,
13949 so that the struct tm is saved in the critical section.
13950 All callers changed. Simplify allocation of initial buffer, partly
13951 motivated by the fact that memory allocation needs to be outside
13952 the critical section.
13954 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
13956 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
13957 with RESET_INTERVAL.
13959 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
13960 Remove duplicated buffer name initialization.
13962 2012-05-02 Jim Meyering <jim@meyering.net>
13964 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
13966 * xfns.c (x_window): Use xstrdup (Bug#11375).
13968 2012-05-02 Eli Zaretskii <eliz@gnu.org>
13970 * xdisp.c (pos_visible_p): If already at a newline from the
13971 display string before the 'while' loop, don't walk back the glyphs
13972 from it3.glyph_row. Solves assertion violation when the display
13973 string begins with a newline (egg.el). (Bug#11367)
13975 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
13977 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
13980 2012-05-01 Glenn Morris <rgm@gnu.org>
13982 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
13983 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
13984 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
13985 All were removed before 23.1.
13987 * dispnew.c: Remove HAVE_LIBNCURSES test;
13988 it is always true on relevant platforms.
13990 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
13991 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
13993 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
13995 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
13997 * .gdbinit (xpr): Remove checks for no longer existing misc types.
13998 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
14001 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
14003 Do not avoid creating empty evaporating overlays (Bug#9642).
14004 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
14005 That is, do not delete an evaporating overlay if it becomes
14006 empty after its bounds are adjusted to fit within its buffer.
14007 This fix caused other problems, and I'm reverting it until we get
14008 to the bottom of them.
14010 2012-04-27 Chong Yidong <cyd@gnu.org>
14012 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
14014 2012-04-27 Eli Zaretskii <eliz@gnu.org>
14016 * xdisp.c (pos_visible_p): If the window start position is beyond
14017 ZV, start the display from buffer beginning. Prevents assertion
14018 violation in init_iterator when the minibuffer window is scrolled
14019 via the scroll bar.
14021 * window.c (window_scroll_pixel_based): Likewise.
14023 2012-04-27 Chong Yidong <cyd@gnu.org>
14025 * keymap.c (where_is_internal): Doc fix (Bug#10872).
14027 2012-04-27 Glenn Morris <rgm@gnu.org>
14029 * fileio.c (Fcopy_file, Fset_file_selinux_context):
14030 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
14032 2012-04-27 Eli Zaretskii <eliz@gnu.org>
14034 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
14035 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
14037 2012-04-26 Eli Zaretskii <eliz@gnu.org>
14039 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
14040 display element, check also the underlying string or buffer
14041 character. (Bug#11341)
14043 * w32menu.c: Include w32heap.h.
14044 (add_menu_item): If the call to AppendMenuW (via
14045 unicode_append_menu) fails, disable Unicode menus only if we are
14046 running on Windows 9X/Me.
14048 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
14050 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
14051 (xgetint): Add missing shift for LSB tags.
14053 2012-04-24 Martin Rudalics <rudalics@gmx.at>
14055 * keyboard.c (read_char): Don't wipe echo area for select window
14056 events: These might get delayed via `mouse-autoselect-window'
14059 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
14061 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
14062 manipulation of :loaded-from data.
14064 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
14066 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
14067 now a cons (bug#11311).
14069 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
14071 Do not create empty overlays with the evaporate property (Bug#9642).
14072 * buffer.c (Fmove_overlay): Delete an evaporating overlay
14073 if it becomes empty after its bounds are adjusted to fit within
14074 its buffer. Without this fix, in a nonempty buffer (let ((o
14075 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
14076 yields an empty overlay that has the evaporate property, which is
14077 not supposed to happen.
14079 Fix minor GTK3 problems found by static checking.
14080 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
14081 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
14082 (struct _EmacsFixedClass, emacs_fixed_get_type):
14083 Move decls here from emacsgtkfixed.h, since they needn't be public.
14084 (emacs_fixed_get_type): Now static.
14085 (emacs_fixed_class_init): Omit unused local.
14086 (emacs_fixed_child_type): Remove; unused.
14087 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
14088 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
14089 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
14090 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
14091 (EMACS_FIXED_GET_CLASS): Remove; unused.
14092 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
14094 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
14095 Problem reported by Juanma Barranquero for Windows -Wunused-function.
14097 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14099 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
14100 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
14101 (__malloc_size_t, __malloc_ptrdiff_t):
14102 Remove. All uses removed, replaced by the definiens if needed,
14103 since we can assume C89 or better now.
14104 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
14105 (protect_malloc_state, align, get_contiguous_space)
14106 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
14107 (malloc_atfork_handler_child, malloc_enable_thread)
14108 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
14109 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
14110 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
14111 (special_realloc, _realloc_internal_nolock, _realloc_internal)
14112 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
14113 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
14114 Define using prototypes, not old style.
14115 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
14116 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
14117 (align): Don't assume that signed integer overflow wraps around.
14118 Omit unused local var.
14119 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
14120 (_free_internal_nolock, memalign, mallochook, reallochook):
14121 Omit no-longer-needed casts.
14122 (valloc): Use getpagesize, not __getpagesize.
14123 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
14124 (struct hdr): The 'magic' member is now size_t, not unsigned long.
14126 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
14128 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
14130 Move functions from C to Lisp. Make non-blocking method calls
14131 the default. Implement further D-Bus standard interfaces.
14133 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
14134 (QCdbus_request_name_allow_replacement)
14135 (QCdbus_request_name_replace_existing)
14136 (QCdbus_request_name_do_not_queue)
14137 (QCdbus_request_name_reply_primary_owner)
14138 (QCdbus_request_name_reply_in_queue)
14139 (QCdbus_request_name_reply_exists)
14140 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
14141 (QCdbus_registered_serial, QCdbus_registered_method)
14142 (QCdbus_registered_signal): New Lisp objects.
14143 (XD_DEBUG_MESSAGE): Use sizeof.
14144 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
14145 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
14146 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
14147 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
14148 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
14149 (xd_signature, xd_append_arg): Allow float for integer types.
14150 (xd_get_connection_references): New function.
14151 (xd_get_connection_address): Rename from xd_initialize.
14152 Return cached address.
14153 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
14154 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
14156 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
14157 Return number of refcounts.
14158 (Fdbus_get_unique_name): Make stronger parameter check.
14159 (Fdbus_message_internal): New defun.
14160 (Fdbus_call_method, Fdbus_call_method_asynchronously)
14161 (Fdbus_method_return_internal, Fdbus_method_error_internal)
14162 (Fdbus_send_signal, Fdbus_register_service)
14163 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
14164 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
14165 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
14166 (Vdbus_compiled_version, Vdbus_runtime_version)
14167 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
14168 (Vdbus_message_type_method_return, Vdbus_message_type_error)
14169 (Vdbus_message_type_signal): New defvars.
14170 (Vdbus_registered_buses, Vdbus_registered_objects_table):
14173 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14175 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
14176 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
14177 Do not assume ptrdiff_t is the same width as 'int'.
14179 * alloc.c: Handle unusual debugging option combinations.
14180 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
14181 since the two debugging options are incompatible.
14182 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
14184 (mem_init, mem_insert, mem_insert_fixup):
14185 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
14186 (NEED_MEM_INSERT): Remove; no longer needed.
14188 2012-04-22 Leo Liu <sdl.web@gmail.com>
14190 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
14192 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14194 * sysdep.c [__FreeBSD__]: Minor cleanups.
14195 (list_system_processes, system_process_attributes) [__FreeBSD__]:
14196 Use Emacs indenting style more consistently. Avoid some casts.
14197 Use 'double' consistently rather than mixing 'float' and 'double'.
14199 2012-04-21 Eduard Wiebe <usenet@pusto.de>
14201 * sysdep.c (list_system_processes, system_process_attributes):
14202 Add implementation for FreeBSD (Bug#5243).
14204 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
14206 * lisp.mk (lisp): Update.
14208 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
14210 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
14211 It is never used otherwise.
14213 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
14215 * print.c (print_preprocess): Only check print_depth if print-circle
14217 (print_object): Check for cycles even when print-circle is nil and
14218 print-gensym is t, but only check print_depth if print-circle is nil.
14220 2012-04-20 Chong Yidong <cyd@gnu.org>
14222 * process.c (wait_reading_process_output): If EIO occurs on a pty,
14223 set the status to "failed" and ensure that sentinel is run.
14225 2012-04-20 Glenn Morris <rgm@gnu.org>
14227 * process.c (Fset_process_inherit_coding_system_flag)
14228 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
14229 (Fmake_network_process, Fmake_serial_process): Doc fix.
14231 2012-04-20 Eli Zaretskii <eliz@gnu.org>
14233 * xdisp.c (string_buffer_position_lim): Limit starting position to
14235 (set_cursor_from_row): If called for a mode-line or header-line
14236 row, return zero immediately.
14237 (try_cursor_movement): If inside continuation line, don't back up
14238 farther than the first row after the header line, if any.
14239 Don't consider the header-line row as "partially visible", even if
14240 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
14242 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
14244 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
14247 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
14248 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
14250 configure: new option --enable-gcc-warnings (Bug#11207)
14251 * Makefile.in (C_WARNINGS_SWITCH): Remove.
14252 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
14253 (ALL_CFLAGS): Use new macros rather than old.
14254 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
14255 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
14256 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
14257 -Wunused-result, -Wunused-variable. This should go away once
14258 the Emacs and Gnulib regex code is merged.
14259 (xmalloc, xrealloc): Now static.
14261 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
14263 * dired.c (Fsystem_groups): Remove unused local.
14265 2012-04-17 Glenn Morris <rgm@gnu.org>
14267 * dired.c (Fsystem_users): Doc fix.
14269 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
14271 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
14272 (syms_of_dired): Add them.
14274 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
14276 Fix minor alloc.c problems found by static checking.
14277 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
14278 New extern decls, to avoid calling undeclared functions.
14279 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
14280 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
14281 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
14282 (NEED_MEM_INSERT): New macro.
14283 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
14284 Remove one incorrect comment and fix another.
14286 Fix minor ralloc.c problems found by static checking.
14287 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
14288 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
14289 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
14290 (r_alloc_sbrk): Now static.
14292 Improve ralloc.c interface checking.
14293 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
14294 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
14295 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
14296 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
14297 [REL_ALLOC]: ... to here, to check interface.
14298 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
14299 Remove decls. This fixes an "It stinks!".
14301 * alloc.c (which_symbols): Fix alignment issue / type clash.
14303 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
14305 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
14306 (struct Lisp_Misc_Any): Likewise.
14307 (struct Lisp_Free): Likewise.
14308 * alloc.c (union aligned_Lisp_Symbol): Define.
14309 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
14310 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
14311 (union aligned_Lisp_Misc): Define.
14312 (MARKER_BLOCK_SIZE, struct marker_block): Use union
14313 aligned_Lisp_Misc instead of union Lisp_Misc.
14314 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
14316 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
14318 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
14319 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
14320 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
14321 * s/netbsd.h, s/sol2-6.h:
14322 Remove definition of GC_MARK_STACK, since the default now works.
14323 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
14324 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
14325 no longer the default.
14326 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
14328 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
14330 * lread.c (lisp_file_lexically_bound_p):
14331 Fix hang at ";-*-\n" (bug#11238).
14333 2012-04-14 Eli Zaretskii <eliz@gnu.org>
14335 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
14336 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
14338 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
14340 * nsterm.m (constrainFrameRect): Always constrain when there is only
14341 one screen (Bug#10962).
14343 2012-04-13 Ken Brown <kbrown@cornell.edu>
14345 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
14347 2012-04-13 Reuben Thomas <rrt@sc3d.org>
14349 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
14351 2012-04-11 Daniel Colascione <dancol@dancol.org>
14353 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
14354 against is gone. It's better to use vfork now so that when Cygwin
14355 gains a new, working vfork, we use it automatically (bug#10398).
14357 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14359 * window.c (save_window_save): Obey window-point-insertion-type.
14361 2012-04-11 Glenn Morris <rgm@gnu.org>
14363 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
14365 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14367 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
14369 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
14371 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
14372 (force_quit_count): New var.
14373 (handle_interrupt): Use it.
14375 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
14377 * w32.c (w32_delayed_load): Record the full path of the library
14378 being loaded (bug#10424).
14380 2012-04-09 Glenn Morris <rgm@gnu.org>
14382 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
14383 not just in the obarray, before snarfing them. (Bug#11036)
14385 * Makefile.in ($(leimdir)/leim-list.el):
14386 Pass EMACS rather than BUILT_EMACS.
14388 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
14390 * process.c (make_process):
14391 * process.h: Add integer `gnutls_handshakes_tried' member to
14394 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
14395 Add convenience `GNUTLS_LOG2i' macro.
14397 * gnutls.c (gnutls_log_function2i): Convenience log function.
14398 (emacs_gnutls_read): Use new log functions,
14399 `gnutls_handshakes_tried' process member, and
14400 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
14401 attempts per process (connection).
14403 2012-04-09 Chong Yidong <cyd@gnu.org>
14405 * eval.c (Fuser_variable_p, user_variable_p_eh)
14406 (lisp_indirect_variable): Functions deleted.
14407 (Fdefvar): Caller changed.
14409 * callint.c (Finteractive, Fcall_interactively):
14410 * minibuf.c (Fread_variable): Callers changed.
14412 2012-04-09 Eli Zaretskii <eliz@gnu.org>
14414 * xdisp.c (set_cursor_from_row): If the display string appears in
14415 the buffer at position that is closer to point than the position
14416 after the display string, display the cursor on the first glyph of
14417 the display string. Fixes cursor display when a 'display' text
14418 property immediately follows invisible text. (Bug#11094)
14420 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
14422 composite.c: use 'double' consistently
14423 * composite.c (get_composition_id): Use 'double' consistently
14424 instead of converting 'float' to 'double' and vice versa; this is
14425 easier to understand and avoids a GCC warning.
14427 2012-04-09 Glenn Morris <rgm@gnu.org>
14429 * Makefile.in: Generate leim-list with bootstrap-emacs, in
14430 preparation for dumping it with emacs. (Bug#4789)
14431 (leimdir): New variable.
14432 ($(leimdir)/leim-list.el): New rule.
14433 (emacs$(EXEEXT)): Depend on leim-list.el.
14435 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
14436 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
14437 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
14439 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
14441 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
14444 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
14446 * xml.c (init_libxml2_functions) [WINDOWSNT]:
14447 Remove unused local variable.
14449 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14451 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
14452 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
14453 (mark_memory): Mark Lisp_Objects only if pointers might hide in
14454 objects, as mark_maybe_pointer will catch them otherwise.
14455 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
14456 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
14458 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14460 Fix typo that broke non-Windows builds.
14461 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
14463 2012-04-07 Eli Zaretskii <eliz@gnu.org>
14465 Support building on MS-Windows with libxml2.
14467 * makefile.w32-in (OBJ2): Add xml.$(O).
14468 (GLOBAL_SOURCES): Add xml.c.
14469 ($(BLD)/xml.$(O)): New dependency list.
14471 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
14472 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
14473 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
14474 [!WINDOWSNT]: New macros.
14475 (init_libxml2_functions, libxml2_loaded_p): New functions.
14476 (parse_region): Call fn_xmlCheckVersion instead of using the macro
14477 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
14478 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
14479 Calls xmlCleanupParser only if libxml2 was loaded (or statically
14481 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
14482 Call init_libxml2_functions before calling libxml2 functions.
14483 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
14485 * emacs.c: Don't include libxml/parser.h.
14486 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
14487 xmlCleanupParser directly.
14489 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
14491 2012-04-07 Eli Zaretskii <eliz@gnu.org>
14493 * indent.c (Fvertical_motion): If there is a display string at
14494 point, use it.vpos to compute how many lines to backtrack after
14495 move_it_to point. (Bug#11133)
14497 2012-04-06 Eli Zaretskii <eliz@gnu.org>
14499 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
14500 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
14501 about subtle differences between FETCH_CHAR* and STRING_CHAR*
14502 macros related to unification of CJK characters. For the details,
14503 see the discussion following the message here:
14504 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
14506 2012-04-04 Chong Yidong <cyd@gnu.org>
14508 * keyboard.c (Vdelayed_warnings_list): Doc fix.
14510 2012-04-01 Eli Zaretskii <eliz@gnu.org>
14512 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
14513 instead of alloca. (Bug#11138)
14515 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
14517 * w32menu.c (is_simple_dialog): Properly check lisp types.
14520 2012-03-31 Eli Zaretskii <eliz@gnu.org>
14522 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
14523 position we get to after a call to move_it_to fails the
14524 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
14525 only if we wind up in a string from display property. (Bug#11063)
14527 * window.c (Fdelete_other_windows_internal): Invalidate the row
14528 and column information about mouse highlight, so that redisplay
14529 restores it after reallocating the glyph matrices. (Bug#7464)
14531 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
14532 string comes from a `display' text property, use the buffer
14533 position of that property as if we actually saw that position in
14535 (move_it_by_lines): Remove the assertion that
14536 "it->current_x == 0 && it->hpos == 0" which can be legitimately
14537 violated when there's a before-string at the beginning of a line.
14540 2012-03-30 Eli Zaretskii <eliz@gnu.org>
14542 * xdisp.c (append_space_for_newline): If the default face was
14543 remapped, use the remapped face for the appended newline.
14544 (extend_face_to_end_of_line): Use the remapped default face for
14545 extending the face to the end of the line.
14546 (display_line): Call extend_face_to_end_of_line when the default
14547 face was remapped. (Bug#11068)
14549 2012-03-29 Eli Zaretskii <eliz@gnu.org>
14551 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
14553 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
14555 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
14557 2012-03-27 Glenn Morris <rgm@gnu.org>
14559 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
14562 2012-03-26 Kenichi Handa <handa@m17n.org>
14564 * dispextern.h (struct glyph): Fix previous change. Change the
14565 bit length of glyphless.ch to 25 (Bug#11082).
14567 2012-03-26 Chong Yidong <cyd@gnu.org>
14569 * keyboard.c (Vselection_inhibit_update_commands): New variable.
14570 (command_loop_1): Use it; inhibit selection update for
14571 handle-select-window too (Bug#8996).
14573 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
14575 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
14577 2012-03-25 Kenichi Handa <handa@m17n.org>
14579 * dispextern.h (struct glyph): Change the bit length of
14580 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
14582 2012-03-24 Eli Zaretskii <eliz@gnu.org>
14584 * s/ms-w32.h (tzname): Include time.h before redirecting to
14585 _tzname. Fixes the MSVC build. (Bug#9960)
14587 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
14589 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
14592 * xterm.c (XTread_socket): Only modify handling_signal if
14593 !SYNC_INPUT. (Bug#11080)
14595 2012-03-23 Eli Zaretskii <eliz@gnu.org>
14597 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
14598 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
14599 when fetching a multibyte character consumes more bytes than
14600 CHAR_BYTES returns, due to unification of CJK characters in
14601 string_char. (Bug#11073)
14603 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
14605 * process.c (wait_reading_process_output): Handle pty disconnect
14606 by refraining from sending oneself a SIGCHLD (bug#10933).
14608 2012-03-22 Chong Yidong <cyd@gnu.org>
14610 * dispextern.h (struct it): New member string_from_prefix_prop_p.
14612 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
14613 Mark string as coming from a prefix property.
14614 (handle_face_prop): Use default face for prefix strings (Bug#4281).
14615 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
14617 2012-03-21 Chong Yidong <cyd@gnu.org>
14619 * xfaces.c (Vface_remapping_alist): Doc fix.
14621 2012-03-20 Eli Zaretskii <eliz@gnu.org>
14623 * w32proc.c (Fw32_set_console_codepage)
14624 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
14627 2012-03-20 Chong Yidong <cyd@gnu.org>
14629 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
14630 to reflect default non-nil value of redisplay-dont-pause.
14632 2012-03-19 Kenichi Handa <handa@m17n.org>
14634 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
14635 it fit in a valid range (Bug#11003).
14637 2012-03-18 Eli Zaretskii <eliz@gnu.org>
14639 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
14640 that is not from display property, accept the row as a "cursor
14641 row" if one of the string's character has a non-nil `cursor'
14642 property. Fixes cursor positioning when there are newlines in
14643 overlay strings, e.g. in icomplete.el. (Bug#11035)
14645 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
14647 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
14649 2012-03-12 Chong Yidong <cyd@gnu.org>
14651 * eval.c (inhibit_lisp_code): Rename from
14652 inhibit_window_configuration_change_hook; move from window.c.
14654 * xfns.c (unwind_create_frame_1, Fx_create_frame):
14655 * window.c (run_window_configuration_change_hook)
14656 (syms_of_window): Callers changed.
14658 2012-03-11 Chong Yidong <cyd@gnu.org>
14660 * keymap.c (Fkey_description): Doc fix (Bug#9700).
14662 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
14664 2012-03-10 Chong Yidong <cyd@gnu.org>
14666 * frame.c (other_visible_frames): Don't assume the selected frame
14667 is visible (Bug#10955).
14669 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
14671 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
14673 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
14675 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
14676 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
14679 2012-03-03 Glenn Morris <rgm@gnu.org>
14681 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
14683 2012-03-02 Eli Zaretskii <eliz@gnu.org>
14685 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
14686 position past the first glyph_row that ends at ZV. (Bug#10902)
14687 (redisplay_window, next_element_from_string): Fix typos in
14689 (redisplay_window): Pass to move_it_vertically the margin in
14690 pixels, not in screen lines.
14692 2012-03-02 Glenn Morris <rgm@gnu.org>
14694 * buffer.c (buffer-list-update-hook): Doc fix.
14696 2012-02-29 Eli Zaretskii <eliz@gnu.org>
14698 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
14699 push_it before setting up the iterator for the first overlay
14700 string, even if we have an empty string loaded.
14701 (next_overlay_string): If there's an empty string on the iterator
14702 stack, pop the stack. (Bug#10903)
14704 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
14706 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
14707 Suggested by Stefan Monnier in
14708 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
14709 * alloc.c (widen_to_Lisp_Object): New static function.
14710 (mark_memory): Also mark Lisp_Objects by fetching pointer words
14711 and widening them to Lisp_Objects. This would work even if
14712 USE_LSB_TAG is defined and wide integers are used, which might
14713 happen in a future version of Emacs.
14715 2012-02-25 Chong Yidong <cyd@gnu.org>
14717 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
14720 * xselect.c (Fx_selection_exists_p): Doc fix.
14721 (x_clipboard_manager_save_all): Print an informative message
14722 before saving to clipboard manager.
14724 2012-02-24 Chong Yidong <cyd@gnu.org>
14726 * keyboard.c (process_special_events): Handle all X selection
14727 requests in kbd_buffer, not just the next one (Bug#8869).
14729 2012-02-23 Chong Yidong <cyd@gnu.org>
14731 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
14732 call when setting menu-bar-lines and tool-bar-lines parameters.
14733 (unwind_create_frame_1): New helper function.
14735 * window.c (inhibit_window_configuration_change_hook): New var.
14736 (run_window_configuration_change_hook): Obey it.
14737 (syms_of_window): Initialize it.
14739 2012-02-22 Chong Yidong <cyd@gnu.org>
14741 * xterm.c (x_draw_image_relief): Add missing type check for
14742 Vtool_bar_button_margin (Bug#10743).
14744 2012-02-21 Chong Yidong <cyd@gnu.org>
14746 * fileio.c (Vfile_name_handler_alist): Doc fix.
14748 * buffer.c (Fget_file_buffer): Protect against invalid file
14749 handler return value.
14751 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
14753 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
14754 when computing $valmask.
14756 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
14757 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
14758 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
14759 It's useless in that case, and it can cause problems on hosts
14760 that allocate halves of EMACS_INT values separately.
14761 Reported by Dan Horák. Diagnosed by Andreas Schwab in
14762 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
14763 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
14764 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
14765 it avoids undefined behavior on hosts where shifting right by more
14766 than the word width has undefined behavior.
14768 2012-02-19 Chong Yidong <cyd@gnu.org>
14770 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
14771 (Funhandled_file_name_directory, Ffile_name_as_directory)
14772 (Fdirectory_file_name, Fexpand_file_name)
14773 (Fsubstitute_in_file_name): Protect against invalid file handler
14774 return values (Bug#10845).
14776 2012-02-18 Eli Zaretskii <eliz@gnu.org>
14778 * .gdbinit (pitx): Fix incorrect references to fields of the
14781 2012-02-17 Chong Yidong <cyd@gnu.org>
14783 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
14785 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
14787 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
14788 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
14790 2012-02-15 Chong Yidong <cyd@gnu.org>
14792 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
14793 marked as special. Also, starting docstrings with * is obsolete.
14795 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
14797 * gnutls.c (emacs_gnutls_write): Fix last change.
14799 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
14801 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
14804 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
14806 * keymap.c (Fsingle_key_description): Handle char ranges.
14808 2012-02-12 Chong Yidong <cyd@gnu.org>
14810 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
14811 as that creates a dangerous corner case.
14813 * window.c (Fdelete_window_internal): Invalidate the mouse
14814 highlight (Bug#9904).
14816 2012-02-12 Glenn Morris <rgm@gnu.org>
14818 * xselect.c (Fx_own_selection_internal)
14819 (Fx_get_selection_internal, Fx_disown_selection_internal)
14820 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
14821 * nsselect.m (Fx_own_selection_internal)
14822 (Fx_disown_selection_internal, Fx_selection_exists_p)
14823 (Fx_selection_owner_p, Fx_get_selection_internal):
14824 Sync docs and argument specs with the xselect.c versions.
14826 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
14828 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
14830 2012-02-11 Eli Zaretskii <eliz@gnu.org>
14832 * w32select.c (Fx_selection_exists_p): Sync doc string and
14833 argument list with xselect.c. (Bug#10783)
14835 * w16select.c (Fx_selection_exists_p): Sync doc string and
14836 argument list with xselect.c. (Bug#10783)
14838 2012-02-10 Glenn Morris <rgm@gnu.org>
14840 * fns.c (Fsecure_hash): Doc fix.
14842 2012-02-09 Kenichi Handa <handa@m17n.org>
14844 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
14846 2012-02-07 Chong Yidong <cyd@gnu.org>
14848 * buffer.c (Fbuffer_local_variables)
14849 (buffer_lisp_local_variables): Handle unbound vars correctly;
14850 don't let Qunbound leak into Lisp.
14852 2012-02-07 Glenn Morris <rgm@gnu.org>
14854 * image.c (Fimagemagick_types): Doc fix.
14856 * image.c (imagemagick-render-type): Change it from a lisp object
14857 to an integer. Move the doc here from the lisp manual.
14858 Treat all values not equal to 0 the same.
14860 2012-02-06 Chong Yidong <cyd@gnu.org>
14862 * doc.c (store_function_docstring): Avoid applying docstring of
14863 alias to base function (Bug#2603).
14865 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
14867 * .gdbinit (pp1, pv1): Remove redundant defines.
14870 2012-02-04 Chong Yidong <cyd@gnu.org>
14872 * nsterm.m: Declare a global (Bug#10694).
14874 2012-02-04 Eli Zaretskii <eliz@gnu.org>
14876 * w32.c (get_emacs_configuration_options):
14877 Include --enable-checking, if specified, in the return value.
14879 2012-02-04 Martin Rudalics <rudalics@gmx.at>
14881 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
14882 after rounding frame sizes. (Bug#9723)
14884 2012-02-04 Eli Zaretskii <eliz@gnu.org>
14886 * keyboard.c (adjust_point_for_property): Don't position point
14887 before BEGV. (Bug#10696)
14889 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
14891 Handle overflow when computing char display width (Bug#9496).
14892 * character.c (char_width): Return EMACS_INT, not int.
14893 (char_width, c_string_width): Check for overflow when
14894 computing the width; this is possible now that individual
14895 characters can have unbounded width. Problem introduced
14896 by merge from Emacs 23 on 2012-01-19.
14898 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
14900 * dbusbind.c (Fdbus_register_method): Mention the return value
14901 :ignore in the docstring.
14903 2012-02-02 Glenn Morris <rgm@gnu.org>
14905 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
14907 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14908 Unconditionally set to t. (Bug#10673)
14909 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14910 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
14911 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
14913 2012-02-02 Kenichi Handa <handa@m17n.org>
14915 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
14916 0, do not call append_composite_glyph.
14918 2012-02-02 Kenichi Handa <handa@m17n.org>
14920 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
14922 (x_produce_glyphs): If the component of a composition is a null
14923 string, set it->pixel_width to 1 to avoid zero-width glyph.
14925 2012-02-01 Eli Zaretskii <eliz@gnu.org>
14927 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
14928 first 2 arguments are identical. This makes inserting large
14929 output from a subprocess an order of magnitude faster on
14930 MS-Windows, where all sbrk'ed memory is always contiguous.
14932 2012-01-31 Glenn Morris <rgm@gnu.org>
14934 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14935 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
14936 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
14938 2012-01-29 Glenn Morris <rgm@gnu.org>
14940 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
14942 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
14944 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
14946 2012-01-28 Chong Yidong <cyd@gnu.org>
14948 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
14950 2012-01-26 Chong Yidong <cyd@gnu.org>
14952 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
14954 * search.c (Fsearch_forward, Fsearch_backward): Document negative
14955 repeat counts (Bug#10507).
14957 2012-01-26 Glenn Morris <rgm@gnu.org>
14959 * lread.c (syms_of_lread): Doc fix.
14961 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
14963 * coding.c (encode_designation_at_bol): Change return value to
14966 2012-01-25 Chong Yidong <cyd@gnu.org>
14968 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
14970 2012-01-21 Chong Yidong <cyd@gnu.org>
14972 * floatfns.c (Fcopysign): Make the second argument non-optional,
14973 since nil is not allowed anyway.
14975 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
14977 * process.c (read_process_output): Use p instead of XPROCESS (proc).
14978 (send_process): Likewise.
14980 2012-01-19 Martin Rudalics <rudalics@gmx.at>
14982 * window.c (save_window_save, Fcurrent_window_configuration)
14983 (Vwindow_persistent_parameters): Do not use Qstate.
14984 Rewrite doc-strings.
14986 2012-01-19 Kenichi Handa <handa@m17n.org>
14988 * character.c (char_width): New function.
14989 (Fchar_width, c_string_width, lisp_string_width):
14990 Use char_width (Bug#9496).
14992 2012-01-16 Martin Rudalics <rudalics@gmx.at>
14994 * window.c (Vwindow_persistent_parameters): New variable.
14995 (Fset_window_configuration, save_window_save): Handle persistent
14998 2012-01-14 Eli Zaretskii <eliz@gnu.org>
15000 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
15001 thrashing the stack of the thread. (Bug#9087)
15003 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
15005 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
15007 2012-01-11 Eli Zaretskii <eliz@gnu.org>
15009 * xdisp.c (rows_from_pos_range): Handle the case where the
15010 highlight ends on a newline. (Bug#10464)
15011 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
15012 he end column for display of highlight that ends on a newline
15015 2012-01-11 Glenn Morris <rgm@gnu.org>
15017 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
15018 from load-path also when installation-directory is nil. (Bug#10208)
15020 2012-01-10 Glenn Morris <rgm@gnu.org>
15022 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
15024 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
15025 Update template values to be closer to their typical values these days.
15027 2012-01-09 Eli Zaretskii <eliz@gnu.org>
15029 * xdisp.c (rows_from_pos_range): Accept additional argument
15030 DISP_STRING, and accept any glyph in a row whose object is that
15031 string as eligible for mouse highlight. Fixes mouse highlight of
15032 display strings from overlays. (Bug#10464)
15034 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
15036 emacs: fix an auto-save permissions race condition (Bug#10400)
15037 * fileio.c (auto_saving_dir_umask): New static var.
15038 (Fmake_directory_internal): Use it.
15039 (do_auto_save_make_dir): Set it, instead of invoking chmod after
15040 creating the directory. The old code temporarily assigns
15041 too-generous permissions to the directory.
15042 (do_auto_save_eh): Clear it.
15043 (Fdo_auto_save): Catch all errors, not just file errors, so
15044 that the var is always cleared.
15046 2012-01-07 Eli Zaretskii <eliz@gnu.org>
15048 * search.c (scan_buffer): Pass character positions to
15049 know_region_cache, not byte positions. (Bug#6540)
15051 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
15053 * w32.c (sys_rename): Report EXDEV when rename of a directory
15054 fails because the target is on another logical disk. (Bug#10284)
15056 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
15058 * xterm.c (x_embed_request_focus): New function.
15060 * xterm.h: Add prototype.
15062 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
15064 2012-01-05 Glenn Morris <rgm@gnu.org>
15066 * emacs.c (emacs_copyright): Update short copyright year to 2012.
15068 2012-01-01 Eli Zaretskii <eliz@gnu.org>
15070 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
15071 Load gnutls_transport_set_lowat only if GnuTLS version is below
15073 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
15074 GnuTLS versions below 2.11.1.
15076 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
15078 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
15079 to the doc string advising against its use for altering the way
15080 windows are scrolled.
15082 2011-12-28 Kenichi Handa <handa@m17n.org>
15084 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
15085 coding-system ASCII compatible only when it does not produce BOM
15086 on encoding (Bug#10383).
15088 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
15090 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
15092 (create_and_show_popup_menu): Always use menu_position_func for
15095 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
15097 * callint.c (Fcall_interactively): Don't truncate prompt string.
15099 2011-12-23 Eli Zaretskii <eliz@gnu.org>
15101 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
15102 property that ends at ZV, so that the bidi iteration could be
15103 resumed from there (after widening). (Bug#10360)
15105 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
15107 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
15109 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
15111 * nsterm.m (x_free_frame_resources):
15112 Release f->output_data.ns->miniimage.
15113 (ns_index_color): Fix indentation. Do not retain
15114 color_table->colors[i].
15116 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
15119 * nsfns.m (x_set_background_color): Assign return value from
15120 ns_index_color to face-background instead of NSColor*.
15121 (ns_implicitly_set_icon_type): Fix indentation.
15122 Change assignment in for loop to comparison.
15124 * emacs.c (ns_pool): New variable.
15125 (main): Assign ns_pool.
15126 (Fkill_emacs): Call ns_release_autorelease_pool.
15128 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
15129 autorelease fdesc, release fdAttrs and tdict.
15130 (ns_get_covering_families): Release charset.
15131 (ns_findfonts): Release NSFontDescriptor created with new.
15132 (ns_uni_to_glyphs): Fix indentation.
15133 (setString): Release attrStr before assigning new value.
15135 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
15137 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
15139 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
15140 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
15142 2011-12-18 David Reitter <reitter@cmu.edu>
15144 * nsterm.m (ns_term_init): Subscribe for notifications
15145 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
15146 to method trackingNotification in EmacsMenu.
15148 * nsmenu.m (trackingMenu): New variable.
15149 (trackingNotification): New method (from Aquamacs).
15150 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
15151 from Aquamacs (Bug#7030).
15153 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
15155 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
15156 (symbol_to_nsstring): Fix indentation.
15157 (ns_symbol_to_pb): New function.
15158 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
15159 (Fns_rotate_cut_buffers_internal): Remove.
15160 (Fns_store_selection_internal): Rename from
15161 Fns_store_cut_buffer_internal.
15162 (ns_get_foreign_selection, Fx_own_selection_internal)
15163 (Fx_disown_selection_internal, Fx_selection_exists_p)
15164 (Fns_get_selection_internal, Fns_store_selection_internal):
15165 Use ns_symbol_to_pb and check if return value is nil.
15166 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
15167 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
15168 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
15169 renamed to Sns_store_selection_internal.
15170 (ns_handle_selection_request): Move code to Fx_own_selection_internal
15171 and remove this function.
15172 (ns_handle_selection_clear): Remove, never used.
15173 (Fx_own_selection_internal): Move code from ns_handle_selection_request
15176 2011-12-17 Ken Brown <kbrown@cornell.edu>
15178 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
15179 GID is unknown (Bug#10257).
15181 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
15183 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
15184 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
15185 which caused a build failure on GNU/Linux IA-64. This problem was
15186 introduced by my 2011-10-07 patch.
15188 2011-12-15 Juri Linkov <juri@jurta.org>
15190 * image.c (imagemagick_error): New function. (Bug#10112)
15191 (imagemagick_load_image): Comment out `MagickSetResolution' call.
15192 Use `imagemagick_error' where ImageMagick functions return
15194 (Fimagemagick_types): Add `Fnreverse' to return the list in the
15197 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15199 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
15200 fill background (Bug#8992).
15202 2011-12-13 Martin Rudalics <rudalics@gmx.at>
15204 * window.c (Vwindow_combination_resize)
15205 (Vwindow_combination_limit): Use t instead of non-nil in
15207 (Vrecenter_redisplay): Add first sentence of doc-string on
15209 (Frecenter): Fix doc-string typo.
15211 2011-12-11 Kenichi Handa <handa@m17n.org>
15213 * coding.c (Funencodable_char_position): Pay attention to the
15214 buffer text relocation (Bug#9389).
15216 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
15218 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
15219 gtk_init (Bug#10100).
15221 2011-12-10 Eli Zaretskii <eliz@gnu.org>
15223 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
15224 IT->string is nil. (Bug#10263)
15226 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
15228 * nsterm.h (x_free_frame_resources): Declare.
15230 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
15231 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
15233 * nsterm.h (ns_get_defaults_value): Declare.
15235 * nsterm.m (ns_default): Call ns_get_defaults_value.
15237 2011-12-09 Eli Zaretskii <eliz@gnu.org>
15239 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
15242 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15244 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
15245 that where the value of an _OBJC_* symbol points to is in the .bss
15246 section (Bug#10240).
15248 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15250 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
15251 after the loop to call ccl_driver at least once (Bug#8619).
15253 2011-12-08 Kenichi Handa <handa@m17n.org>
15255 * ftfont.c (get_adstyle_property): Fix previous change
15258 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
15260 * w32.c (init_environment): If no_site_lisp, remove site-lisp
15261 dirs from the default value of EMACSLOADPATH (bug#10208).
15263 2011-12-07 Glenn Morris <rgm@gnu.org>
15265 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
15266 installation and source directories as well. (Bug#10208)
15268 2011-12-06 Chong Yidong <cyd@gnu.org>
15270 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
15272 2011-12-06 Glenn Morris <rgm@gnu.org>
15274 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
15275 as an error, not just -1. (Bug#10217)
15277 2011-12-05 Chong Yidong <cyd@gnu.org>
15279 * keyboard.c (process_special_events): New function.
15280 (swallow_events, Finput_pending_p): Use it (Bug#10195).
15282 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
15284 * coding.c (encode_designation_at_bol): Don't use uninitialized
15285 local variable (Bug#9318).
15287 2011-12-05 Kenichi Handa <handa@m17n.org>
15289 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
15290 return Qnil (Bug#8046, Bug#10193).
15292 2011-12-05 Kenichi Handa <handa@m17n.org>
15294 * coding.c (encode_designation_at_bol): New args charbuf_end and
15295 dst. Return the number of produced bytes. Callers changed.
15296 (coding_set_source): Return how many bytes coding->source was
15298 (coding_set_destination): Return how many bytes
15299 coding->destination was relocated.
15300 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
15301 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
15303 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15305 * coding.c (CODING_CHAR_CHARSET_P): New macro.
15306 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
15309 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
15311 The following changes are to fix Bug#9318.
15313 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
15314 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
15315 (encode_coding_iso_2022, encode_coding_sjis)
15316 (encode_coding_big5, encode_coding_charset): Use the above macros.
15318 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
15320 * lisp.h (process_quit_flag): Fix external declaration.
15322 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
15324 Don't macro-inline non-performance-critical code.
15325 * eval.c (process_quit_flag): New function.
15326 * lisp.h (QUIT): Use it.
15328 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
15330 * nsfns.m (get_geometry_from_preferences): New function.
15331 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
15333 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
15335 * emacs.c (Qkill_emacs): Define.
15336 (syms_of_emacs): Initialize it.
15337 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
15338 Qquit_flag to `kill-emacs' instead.
15339 (quit_throw_to_read_char): Add parameter `from_signal'.
15340 All callers changed. Call Fkill_emacs if requested and safe.
15341 * lisp.h (QUIT): Call Fkill_emacs if requested.
15343 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
15345 * widget.c (update_wm_hints): Return if wmshell is null.
15346 (widget_update_wm_size_hints): New function.
15348 * widget.h (widget_update_wm_size_hints): Declare.
15350 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
15351 widget_update_wm_size_hints (Bug#10104).
15353 2011-12-03 Eli Zaretskii <eliz@gnu.org>
15355 * xdisp.c (handle_invisible_prop): If the invisible text ends just
15356 before a newline, prepare the bidi iterator for consuming the
15357 newline, and keep the current paragraph direction. (Bug#10183)
15358 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
15360 2011-12-02 Juri Linkov <juri@jurta.org>
15362 * search.c (Fword_search_regexp): New Lisp function created from
15363 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
15364 (Fword_search_backward, Fword_search_forward)
15365 (Fword_search_backward_lax, Fword_search_forward_lax):
15366 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
15367 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
15369 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
15371 * fileio.c (Finsert_file_contents): Move after-change-function call
15372 to before the "handled:" label, since all "goto handled" appear in
15373 cases where the *-change-functions have already been properly called
15376 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
15378 * keyboard.c (interrupt_signal): Don't call kill-emacs when
15379 waiting for input. (Bug#10169)
15381 2011-11-30 Eli Zaretskii <eliz@gnu.org>
15383 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
15384 verifies glyph row's hash code--we have just reallocated the
15385 glyphs, so their contents can be complete garbage. (Bug#10164)
15387 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
15389 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
15391 2011-11-30 Eli Zaretskii <eliz@gnu.org>
15393 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
15394 attributes are tested _before_ calling verify_row_hash, to protect
15395 against GCC re-ordering of the tests. (Bug#10164)
15397 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
15399 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
15401 * xterm.c (handle_one_xevent): Only set async_visible and friends
15402 if net_wm_state_hidden_seen is non-zero (Bug#10002)
15403 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
15404 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
15406 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
15408 Remove GCPRO-related macros that exist only to avoid shadowing locals.
15409 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
15410 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
15411 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
15412 All uses changed to use GCPRO1 etc.
15413 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
15414 Revert to old implementation (i.e., before 2011-03-11).
15416 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15418 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
15419 of scroll runs so as to avoid assigning disabled bogus rows and
15420 unnecessary graphics copy operations.
15422 2011-11-27 Eli Zaretskii <eliz@gnu.org>
15424 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
15425 (snprintf) [_MSC_VER]: Redirect to _snprintf.
15426 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
15427 (malloc, free, realloc, calloc): Redirect to e_* only when
15430 * lisp.h (GCTYPEBITS): Move before first use.
15431 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
15432 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
15433 this macro definition.
15435 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
15438 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
15440 * gtkutil.c (xg_create_frame_widgets):
15441 Call gtk_window_set_has_resize_grip (FALSE) if that function is
15442 present with Gtk+ 2.0.
15444 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15446 * fileio.c (Finsert_file_contents): Undo previous change; see
15447 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
15449 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15451 Rename locals to avoid shadowing.
15452 * fileio.c (Finsert_file_contents):
15453 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
15454 * process.c (wait_reading_process_output):
15455 Rename inner 'proc' to 'p' to avoid shadowing.
15456 Indent for consistency with usual Emacs style.
15458 2011-11-25 Eli Zaretskii <eliz@gnu.org>
15460 * xdisp.c (redisplay_window): If cursor row is not fully visible
15461 after recentering, and scroll-conservatively is set to a large
15462 number, scroll window by a few more lines to make the cursor fully
15463 visible and out of scroll-margin. (Bug#10105)
15464 (start_display): Don't move to the next line if the display should
15465 start at a newline that is part of a display vector or an overlay
15466 string. (Bug#10119)
15468 2011-11-24 Juri Linkov <juri@jurta.org>
15470 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
15471 after the `MagickPingImage' call. (Bug#10112)
15473 2011-11-23 Chong Yidong <cyd@gnu.org>
15475 * window.c (Fcoordinates_in_window_p): Accept only live windows.
15477 2011-11-23 Martin Rudalics <rudalics@gmx.at>
15479 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
15480 making another buffer current. (Bug#10114)
15482 2011-11-23 Glenn Morris <rgm@gnu.org>
15484 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
15486 2011-11-23 Chong Yidong <cyd@gnu.org>
15488 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
15489 using it (Bug#5984).
15491 2011-11-22 Eli Zaretskii <eliz@gnu.org>
15493 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
15494 and header-lines, as they don't have one computed for them.
15497 * .gdbinit (prow): Make displayed values more self-explaining.
15498 Add row's hash code.
15500 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
15502 * process.c (wait_reading_process_output): Fix asynchrounous
15503 GnuTLS socket handling on some versions of the GnuTLS library.
15504 (wait_reading_process_output): Add comment and URL.
15506 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
15508 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
15510 2011-11-21 Chong Yidong <cyd@gnu.org>
15512 * window.c (Fnext_window, Fprevious_window): Doc fix.
15514 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15516 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
15518 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
15520 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
15522 2011-11-20 Martin Rudalics <rudalics@gmx.at>
15524 * window.c (Fset_window_combination_limit): Rename argument
15526 (Vwindow_combination_limit): Remove "status" from doc-string.
15528 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
15530 * m/ibms390.h: Remove.
15531 * m/ibms390x.h: Don't include "ibms390.h".
15533 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15535 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
15536 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
15538 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
15540 * casetab.c (Fset_case_table):
15541 * charset.c (Fcharset_after): Fix typos.
15543 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
15545 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
15546 Otherwise, valgrind does not work on some platforms.
15547 Problem reported by Andreas Schwab in
15548 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
15549 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
15550 is set, removing the need for VIRT_ADDRESS_VARIES.
15551 (PURE_P): Use a more-efficient implementation that needs just one
15552 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
15553 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
15554 to 4 (xorl, subq, cmpq, setbe).
15555 * alloc.c (pure): Always extern now, since that's the
15556 VIRT_ADDR_VARIES behavior.
15557 (PURE_POINTER_P): Use a single comparison, not two, for
15558 consistency with the new puresize.h.
15559 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
15560 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
15561 Remove VIRT_ADDR_VARIES no longer needed.
15563 2011-11-19 Eli Zaretskii <eliz@gnu.org>
15565 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
15566 (erase_phys_cursor, update_window_cursor, show_mouse_face)
15567 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
15568 behave as if the cursor position were at the window margin.
15570 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
15571 and the cursor position is out of bounds, behave as if the cursor
15572 position were at the window margin. (Bug#10075)
15574 2011-11-18 Chong Yidong <cyd@gnu.org>
15576 * window.c (Fwindow_combination_limit): Make first argument
15577 non-optional, since it is meaningless for live windows like the
15580 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
15582 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
15584 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
15586 * intervals.c: Fix grafting over the whole buffer (bug#10071).
15587 (graft_intervals_into_buffer): Simplify.
15589 2011-11-18 Eli Zaretskii <eliz@gnu.org>
15591 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
15592 hash values of the two rows.
15593 (copy_row_except_pointers): Preserve the used[] arrays and the
15594 hash values of the two rows. (Bug#10035)
15595 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
15597 * xdisp.c (row_hash): New function, body extracted from
15598 compute_line_metrics.
15599 (compute_line_metrics): Call row_hash, instead of computing the
15602 * dispnew.c (verify_row_hash): Call row_hash for computing the
15603 hash code of a row, instead of duplicating code from xdisp.c.
15605 * dispextern.h (row_hash): Add prototype.
15607 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
15609 * frame.c (delete_frame): Don't delete the terminal when the last
15610 X frame is closed if emacs is built with GTK toolkit.
15612 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
15614 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
15616 2011-11-17 Martin Rudalics <rudalics@gmx.at>
15618 * window.c (Vwindow_splits): Rename to
15619 Vwindow_combination_resize. Suggested by Juri Linkov.
15620 (Fsplit_window_internal): Use Vwindow_combination_resize instead
15623 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
15625 * nsfns.m (Fns_font_name):
15626 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
15628 2011-11-16 Martin Rudalics <rudalics@gmx.at>
15630 * window.h (window): Rename slot "nest" to "combination_limit".
15631 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
15632 (Fset_window_nest): Rename to Fset_window_combination_limit.
15633 (Vwindow_nest): Rename to Vwindow_combination_limit.
15634 (recombine_windows, make_parent_window, make_window)
15635 (Fsplit_window_internal, saved_window)
15636 (Fset_window_configuration, save_window_save): Rename all
15637 occurrences of window_nest to window_combination_limit.
15639 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
15641 * image.c (imagemagick_load_image): Fix typo.
15643 2011-11-14 Eli Zaretskii <eliz@gnu.org>
15645 * xdisp.c (display_line): Move the call to
15646 highlight_trailing_whitespace before the call to
15647 compute_line_metrics, since the latter needs to see the final
15648 faces of all the glyphs to compute ROW's hash value.
15649 Fixes assertion violations in row_equal_p. (Bug#10035)
15651 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
15653 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
15654 just return (bug#10044).
15656 2011-11-12 Eli Zaretskii <eliz@gnu.org>
15658 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
15659 with user-defined heap size. Bump the default size of the temacs
15660 heap to 27MB, to avoid memory warning when running temacs.
15661 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
15663 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
15664 current_matrix and desired_matrix. (Bug#9990)
15665 (verify_row_hash) [XASSERTS]: New function.
15666 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
15667 that the hash value of glyph rows is correct.
15669 2011-11-12 Martin Rudalics <rudalics@gmx.at>
15671 * window.h (window): Remove splits slot.
15672 * window.c (Fwindow_splits, Fset_window_splits): Remove.
15673 (Fdelete_other_windows_internal, make_parent_window)
15674 (make_window, Fsplit_window_internal, Fdelete_window_internal)
15675 (Fset_window_configuration, save_window_save): Don't deal with
15676 split status of windows.
15677 (saved_window): Remove splits slot.
15678 (Vwindow_splits): Rewrite doc-string.
15680 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
15682 * xfns.c (unwind_create_frame):
15683 * nsfns.m (unwind_create_frame):
15684 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
15685 Vframe_list (Bug#9999).
15687 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
15689 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
15691 2011-11-11 Kenichi Handa <handa@m17n.org>
15693 * callproc.c (Fcall_process): Set the member dst_multibyte of
15696 2011-11-11 Johan Bockgård <bojohan@gnu.org>
15698 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
15699 avoid a crash (bug#9496).
15701 2011-11-09 Chong Yidong <cyd@gnu.org>
15703 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
15704 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
15706 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15708 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
15710 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15712 Avoid some portability problems by eschewing 'extern inline' functions.
15713 The trivial performance wins aren't worth the portability hassles; see
15714 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
15716 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
15717 (window_box_width, window_box_left, window_box_left_offset)
15718 (window_box_right, window_box_right_offset): Undo previous change,
15719 by removing the "extern"s.
15720 * intervals.c (adjust_intervals_for_insertion)
15721 (adjust_intervals_for_deletion): Undo previous change,
15722 making these static again.
15723 (offset_intervals, temp_set_point_both, temp_set_point)
15724 (copy_intervals_to_string): No longer inline.
15725 * xdisp.c (window_text_bottom_y, window_box_width)
15726 (window_box_height, window_box_left_offset)
15727 (window_box_right_offset, window_box_left, window_box_right)
15728 (window_box): No longer inline.
15730 2011-11-08 Chong Yidong <cyd@gnu.org>
15732 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
15733 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
15734 Signal an error if not a live window.
15735 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
15736 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
15738 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
15740 * lisp.h (syms_of_abbrev): Remove declaration.
15741 Reported by CHENG Gao <chenggao@royau.me>.
15743 2011-11-07 Eli Zaretskii <eliz@gnu.org>
15745 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
15746 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
15747 of temacs in GUI mode.
15749 2011-11-07 Martin Rudalics <rudalics@gmx.at>
15751 * window.h: Declare delete_all_child_windows instead of
15752 delete_all_subwindows.
15753 * window.c (Fwindow_nest, Fset_window_nest)
15754 (Fset_window_new_total, Fset_window_new_normal)
15755 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
15756 (delete_all_subwindows): Rename to delete_all_child_windows.
15757 (Fdelete_other_windows_internal, Fset_window_configuration):
15758 Call delete_all_child_windows instead of delete_all_subwindows.
15759 * frame.c (delete_frame): Call delete_all_child_windows instead
15760 of delete_all_subwindows.
15762 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
15764 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
15765 This is also needed for porting to any host where GC_MARK_STACK is
15766 not GC_MAKE_GCPROS_NOOPS.
15767 (which_symbols): Use it.
15769 2011-11-07 Kenichi Handa <handa@m17n.org>
15771 * coding.c (coding_set_destination): Check coding->src_pos only
15772 when coding->src_object is a buffer (bug#9910).
15774 * process.c (send_process): Set the member src_multibyte of coding
15775 to 0 (bug#9911) when sending a unibyte text.
15777 * callproc.c (Fcall_process): Set the member src_multibyte of
15778 process_coding to 0 (bug#9912).
15780 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15782 * xmenu.c (cleanup_widget_value_tree): New function.
15783 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
15784 calling free_menubar_widget_value_tree directly (Bug#9830).
15786 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
15788 Fix some portability problems with 'inline'.
15789 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
15790 (window_box_width, window_box_left, window_box_left_offset)
15791 (window_box_right, window_box_right_offset): Declare extern.
15792 Otherwise, these inline functions do not conform to C99 and
15793 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
15794 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
15795 * intervals.c (adjust_intervals_for_insertion)
15796 (adjust_intervals_for_deletion): Now extern, because otherwise the
15797 extern inline functions 'offset_intervals' couldn't refer to it.
15798 (static_offset_intervals): Remove.
15799 (offset_intervals): Rewrite using the old contents of
15800 static_offset_intervals. The old version didn't conform to C99
15801 because an extern inline function contained a reference to an
15802 identifier with static linkage.
15804 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
15806 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
15809 2011-11-06 Eli Zaretskii <eliz@gnu.org>
15811 * xdisp.c (init_iterator, reseat_to_string): Don't set the
15812 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
15813 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
15814 return Qleft_to_right.
15816 2011-11-06 Chong Yidong <cyd@gnu.org>
15818 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
15819 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
15820 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
15821 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
15822 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
15823 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
15824 (Fwindow_vscroll): Doc fix.
15825 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
15826 argument, since it makes no sense to pass a live window and for
15827 consistency with window-child.
15829 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
15831 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
15834 2011-11-05 Jason Rumney <jasonr@gnu.org>
15836 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
15837 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
15839 (add_font_entity_to_list): Fix logic errors in mixed boolean and
15840 bitwise arithmetic preventing use of unicode-sip and non-truetype
15843 2011-11-05 Eli Zaretskii <eliz@gnu.org>
15845 * s/ms-w32.h (fstat, stat, utime): Move redirections to
15848 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
15849 initialization code to keep similarity to xfns.c after changes
15852 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
15854 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
15855 (unwind_create_frame): New function (Bug#9943).
15856 (Fx_create_frame): Restructure code to be more similar to the one in
15857 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
15858 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
15859 Move terminal->reference_count++ just before making the frame official
15862 * nsterm.m (x_free_frame_resources): New function.
15863 (x_destroy_window): Move code to x_free_frame_resources.
15865 * xfns.c (unwind_create_frame): Fix comment.
15866 (Fx_create_frame, x_create_tip_frame):
15867 Move terminal->reference_count++ just before making the frame
15868 official. Move initialization of image_cache_refcount and
15869 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
15871 2011-11-05 Eli Zaretskii <eliz@gnu.org>
15873 Support MSVC build with newer versions of Visual Studio.
15874 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
15875 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
15878 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
15879 which are not supported by MSVC.
15880 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
15881 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
15883 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
15884 types in bitfields.
15885 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
15887 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
15889 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
15891 Support MSVC build with newer versions of Visual Studio.
15892 * w32.c: Don't include w32api.h for MSVC.
15893 (init_environment) [_MSC_VER]: Call sys_access, not _access.
15895 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
15896 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
15897 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
15898 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
15900 (alloca) [_MSC_VER]: Define to _alloca.
15902 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
15904 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
15906 2011-11-04 Eli Zaretskii <eliz@gnu.org>
15908 * xdisp.c (note_mouse_highlight): If either of
15909 previous/next-single-property-change returns nil, treat that as
15910 the beginning or the end of the buffer. (Bug#9955)
15912 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
15914 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
15915 label is not null (Bug#9951).
15916 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
15919 2011-11-04 Eli Zaretskii <eliz@gnu.org>
15921 * window.c (Fwindow_body_size): Mention in the doc string that the
15922 return value is in frame's canonical units. (Bug#9949)
15924 2011-11-03 Eli Zaretskii <eliz@gnu.org>
15926 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
15928 * w32fns.c (unwind_create_frame): If needed, free the glyph
15929 matrices of the partially constructed frame. (Bug#9943)
15930 * xfns.c (unwind_create_frame): Likewise.
15932 2011-11-01 Eli Zaretskii <eliz@gnu.org>
15934 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
15935 Don't stop backward scan on the continuation glyph, even though
15936 its CHARPOS is positive.
15937 (mouse_face_from_buffer_pos, note_mouse_highlight):
15938 Rename cover_string to disp_string.
15940 2011-11-01 Martin Rudalics <rudalics@gmx.at>
15942 * window.c (temp_output_buffer_show): Don't use
15943 Vtemp_buffer_show_specifiers.
15944 (Vtemp_buffer_show_specifiers): Remove unused variable.
15946 2011-10-30 Eli Zaretskii <eliz@gnu.org>
15948 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
15949 past the beginning of the current glyph matrix.
15951 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
15953 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
15954 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
15955 HAVE_GTK3 (Bug#9869).
15957 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
15958 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
15960 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
15962 * xterm.c: Declare x_handle_net_wm_state to return int.
15963 (handle_one_xevent): Check if we are iconified but don't have
15964 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
15965 (get_current_wm_state): Return non-zero if not hidden,
15966 check for _NET_WM_STATE_HIDDEN (Bug#9893).
15967 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
15968 (x_handle_net_wm_state): Return what get_current_wm_state returns.
15969 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
15971 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
15973 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
15974 so that this new function doesn't get optimized away by a
15975 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
15977 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15979 * frame.h (MOUSE_HL_INFO): Remove excess parens.
15981 2011-10-29 Eli Zaretskii <eliz@gnu.org>
15983 Fix the `xbytecode' command.
15984 * .gdbinit (xprintbytestr): New command.
15985 (xwhichsymbols): Rename from `which'; all callers changed.
15986 (xbytecode): Print the byte-code string as well.
15988 2011-10-29 Kim Storm <storm@cua.dk>
15990 * alloc.c (which_symbols): New function.
15992 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15994 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
15997 2011-10-29 Glenn Morris <rgm@gnu.org>
15999 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
16000 Not clear what it was for, and it causes various bugs. (Bug#9839)
16002 2011-10-28 Eli Zaretskii <eliz@gnu.org>
16004 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
16005 possible random value that matches one of those tested as
16006 condition to clear the mouse face.
16008 2011-10-28 Chong Yidong <cyd@gnu.org>
16010 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
16012 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
16014 * window.c (make_window): Initialize phys_cursor_on_p.
16016 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
16018 * lisp.h (struct Lisp_Symbol): Update comments.
16020 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
16022 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
16024 2011-10-28 Eli Zaretskii <eliz@gnu.org>
16026 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
16027 <oslsachem@gmail.com> for helping to debug this.
16029 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
16030 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
16031 (g_b_init_get_glyph_outline_w): New static variables.
16032 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
16033 (GetGlyphOutlineW_Proc): New typedefs.
16034 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
16035 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
16037 (w32font_open_internal, compute_metrics):
16038 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
16039 instead of calling the "wide" APIs directly.
16041 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
16043 * w32.h (syms_of_w32font): Add prototype.
16045 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
16047 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
16048 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
16049 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
16050 (Fmove_to_window_line): Doc fix.
16052 2011-10-27 Chong Yidong <cyd@gnu.org>
16054 * process.c (make_process): Set gnutls_state to NULL.
16056 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
16057 non-NULL, regardless of GNUTLS_INITSTAGE.
16058 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
16059 an error. Set process slots as soon as we allocate them.
16061 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
16063 2011-10-27 Chong Yidong <cyd@gnu.org>
16065 * gnutls.c (emacs_gnutls_deinit): New function.
16066 Deallocate credentials structures as well as calling gnutls_deinit.
16067 (Fgnutls_deinit, Fgnutls_boot): Use it.
16069 * process.c (make_process): Initialize GnuTLS credentials to NULL.
16070 (deactivate_process): Call emacs_gnutls_deinit.
16072 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
16074 * image.c (x_create_x_image_and_pixmap):
16075 * w32.c (sys_rename, w32_delayed_load):
16076 * w32font.c (fill_in_logfont):
16077 * w32reg.c (x_get_string_resource): Silence compiler warnings.
16079 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
16081 * w32fns.c (w32_default_color_map): New function,
16082 extracted from Fw32_default_color_map.
16083 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
16085 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
16087 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
16089 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
16091 * keyboard.c (test_undefined): New function (bug#9751).
16092 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
16094 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
16096 * sysdep.c (init_sys_modes): Fix the check for the controlling
16097 terminal (Bug#6649).
16099 2011-10-20 Eli Zaretskii <eliz@gnu.org>
16101 * dispextern.h (struct bidi_it): New member next_en_type.
16103 * bidi.c (bidi_line_init): Initialize the next_en_type member.
16104 (bidi_resolve_explicit_1): When next_en_pos is valid for the
16105 current character, check also for next_en_type being WEAK_EN.
16106 (bidi_resolve_weak): Don't enter the expensive loop if the current
16107 position is before next_en_pos. Record the bidi type of the first
16108 non-ET, non-BN character we find, in addition to its position.
16109 (bidi_level_of_next_char): Invalidate next_en_type when
16110 next_en_pos is over-stepped.
16112 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
16114 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
16115 * editfns.c: Rewrite current-time-zone so that it invokes
16116 the equivalent of (format-time-string "%Z") to get the time zone name.
16117 This fixes a bug when the time zone name contains characters that
16118 need converting from the system time locale to Emacs internal format.
16119 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
16120 that patch fixed format-time-string to do the conversion, but
16121 I forgot to fix current-time-zone.
16122 (format_time_string): New function, containing most of
16123 what Fformat_time_string used to contain.
16124 (Fformat_time_string): Rewrite in terms of format_time_string.
16125 This doesn't change this function's behavior.
16126 (current-time-zone): Rewrite to use format_time_string.
16127 This fixes the bug reported by Michael Schierl in
16128 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
16129 Jason Rumney's 2007-06-07 change worked around this bug, but
16131 * systime.h (tzname, timezone): Remove no-longer-used declarations.
16133 2011-10-19 Eli Zaretskii <eliz@gnu.org>
16135 * xdisp.c (start_display): If the character at POS is displayed
16136 via a display vector, reset IT->current.dpvec_index to zero.
16137 (try_window_reusing_current_matrix): If a line ends in a display
16138 vector or the next line starts in a display vector, continue
16139 redrawing the window even though the character position of
16140 start_row was reached.
16143 2011-10-18 Chong Yidong <cyd@gnu.org>
16145 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
16146 with nobreak-char-display too.
16148 2011-10-18 Eli Zaretskii <eliz@gnu.org>
16150 Fix part 3 of bug#9771.
16151 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
16152 (bidi_resolve_neutral): Don't enter the expensive loop looking for
16153 non-neutral characters if the current character is a paragraph
16154 separator (a.k.a. Newline). This avoids running the same
16155 expensive loop twice, once when we consume the preceding newline
16156 and the other time when the line actually needs to be displayed.
16157 Avoid the loop when we see neutrals on the base embedding level
16158 following a character whose directionality is the same as the
16159 paragraph's. This avoids running the expensive loop when a line
16160 ends in a long sequence of neutrals, like control characters.
16161 Add assertion against STRONG_AL type. Slightly rearrange code
16162 that determines the type of a neutral given the first non-neutral
16164 (bidi_level_of_next_char): Set next_en_pos to zero when
16165 invalidating its info.
16167 2011-10-17 Eli Zaretskii <eliz@gnu.org>
16169 * xdisp.c (push_display_prop): Determine whether to record string
16170 or buffer position by IT->string, not by IT->method. Allow
16171 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
16172 (move_it_vertically_backward): Don't look for character position
16173 immediately after the newline when in a continuation line.
16176 2011-10-15 Martin Rudalics <rudalics@gmx.at>
16178 * window.c (coordinates_in_window): Rewrite and delabelize
16179 vertical border check. (Bug#5357) (Bug#9618)
16181 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
16183 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
16184 errors in XSetWindowBorder (bug#9310).
16186 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
16188 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
16189 avoid crash when xmalloc overrun checking is enabled.
16191 2011-10-13 Eli Zaretskii <eliz@gnu.org>
16193 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
16194 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
16195 cursor motion with <left> and <right> arrow keys.
16197 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
16198 some callers set that themselves.
16200 2011-10-12 Eli Zaretskii <eliz@gnu.org>
16202 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
16203 display string and the previous row comes from the same string and
16204 is empty. (Bug#9739) (Bug#9738)
16206 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
16208 * doc.c (get_doc_string): Encode file name (bug#9735).
16210 2011-10-12 Eli Zaretskii <eliz@gnu.org>
16212 * bidi.c (bidi_level_of_next_char):
16213 * xdisp.c (get_visually_first_element): Remove old incorrect
16214 comments regarding the Unicode Line Separator character.
16216 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
16218 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
16220 * alloc.c (Fgc_status): Do not access beyond zombies array
16221 boundary if nzombies > MAX_ZOMBIES.
16222 * alloc.c (dump_zombies): Add missing format specifier.
16224 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
16226 * xdisp.c (set_cursor_from_row): Simplify conditionals,
16227 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
16229 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
16230 Some packages use them to denote characters with modifiers.
16232 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
16234 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
16235 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
16236 matching a pp-number. Rename parameter var to var1.
16238 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
16240 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
16242 2011-10-08 Glenn Morris <rgm@gnu.org>
16244 * callint.c (Fcall_interactively): Give a more explicit error for the
16245 'c' case with a non-character input. (Bug#8479)
16247 2011-10-08 Eli Zaretskii <eliz@gnu.org>
16249 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
16251 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
16252 lines that are hscrolled on the left.
16254 * dispnew.c (buffer_posn_from_coords): Account for a possible
16255 presence of header-line. (Bug#4426)
16257 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
16259 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
16260 Don't advertise functionality which we discourage or doesn't work.
16262 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
16264 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
16265 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
16266 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
16267 this makes Emacs dump core during garbage collection on rare
16268 occasions. sizeof is obviously inferior to offsetof here, so
16269 stick with offsetof.
16270 (GC_POINTER_ALIGNMENT): New macro.
16271 (mark_memory): Omit 3rd (offset) arg; caller changed.
16272 Don't assume EMACS_INT alignment is the same as pointer alignment.
16274 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
16276 * keyboard.c (read_key_sequence_remapped): New var.
16277 (read_key_sequence): Compute remapping in the right buffer.
16278 (command_loop_1): Use read_key_sequence's remapping directly.
16280 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
16282 * dired.c (file_name_completion): Don't expand file name.
16283 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
16284 before checking file name handler.
16286 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
16287 they've been requested explicitly (bug#9591).
16289 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
16291 * keymap.c (Fsingle_key_description): Use make_specified_string
16292 instead of build_string to build string from push_key_description.
16295 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16297 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
16298 This fixes a Y2038 bug on 64-bit hosts.
16299 * buffer.c (reset_buffer):
16300 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
16301 (Fclear_buffer_auto_save_failure):
16302 Use 0, not -1, to represent an unset failure time, since time_t
16303 might not be signed.
16305 Remove dependency on glibc malloc internals.
16306 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16307 Move back here from lisp.h, but with their new implementations.
16308 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16309 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
16310 * charset.c (charset_table_init): New static var.
16311 (syms_of_charset): Use it instead of xmalloc. This removes a
16312 dependency on glibc malloc internals. See Eli Zaretskii's comment in
16313 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
16314 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16315 Move back to alloc.c.
16316 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16317 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
16319 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
16321 * nsterm.m (windowDidResize): Call x_set_window_size only when
16322 ns_in_resize is true. Otherwise set pixelwidth/height and
16323 call change_frame_size (Bug#9628).
16325 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16327 Port --enable-checking=all to Fedora 14 x86-64.
16328 * charset.c (syms_of_charset): Also account for glibc malloc's
16329 internal overhead when calculating the initial malloc maximum.
16331 Port --enable-checking=all to Fedora 14 x86.
16332 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16334 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
16335 (overrun_check_realloc, overrun_check_free):
16336 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
16337 That way, xmalloc returns a properly-aligned pointer even if
16338 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
16339 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
16340 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
16341 into account when calculating the initial malloc maximum.
16342 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16343 Move here from alloc.c, so that charset.c can use it too.
16344 Properly align; the old code wasn't right for common 32-bit hosts
16345 when configured with --enable-checking=all.
16346 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16347 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
16349 2011-09-29 Eli Zaretskii <eliz@gnu.org>
16351 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
16354 2011-09-28 Eli Zaretskii <eliz@gnu.org>
16356 * xdisp.c (compute_display_string_end): If there's no display
16357 string at CHARPOS, return -1.
16359 * bidi.c (bidi_fetch_char): When compute_display_string_end
16360 returns a negative value, treat the character as a normal
16361 character not covered by a display string. (Bug#9624)
16363 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
16365 * lread.c (Fread_from_string): Fix typo in docstring.
16367 2011-09-27 Eli Zaretskii <eliz@gnu.org>
16369 * xdisp.c (handle_invisible_prop): If invisible text ends on a
16370 newline, reseat the iterator instead of bidi-iterating there one
16371 character at a time. (Bug#9610)
16372 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
16373 TO_CHARPOS if the bidi iterator is at base embedding level.
16375 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
16377 * lread.c (readevalloop): Use correct code for NBSP.
16378 (read1): Likewise. (Bug#9608)
16380 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
16382 * dbusbind.c (Fdbus_register_signal): When service is not
16383 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
16385 2011-09-25 Glenn Morris <rgm@gnu.org>
16387 * buffer.c (truncate-lines): Doc fix.
16389 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
16391 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
16392 (Fset_window_next_buffers): Doc fix.
16394 2011-09-24 Glenn Morris <rgm@gnu.org>
16396 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
16398 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
16400 Fix minor problems found by static checking.
16401 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
16402 * indent.c (Fvertical_motion): Fix == vs = typo.
16404 2011-09-24 Eli Zaretskii <eliz@gnu.org>
16406 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
16407 Default value is now t. Doc fix.
16409 * indent.c (Fvertical_motion): Compute and apply the overshoot
16410 logic when moving up, not only when moving down. Fix the
16411 confusing name and values of the it_overshoot_expected variable;
16412 logic changes accordingly. (Bug#9254) (Bug#9549)
16414 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
16415 CHARPOS is covered by a display string which includes newlines.
16416 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
16417 is covered by a display string with embedded newlines.
16419 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
16421 * dbusbind.c (Fdbus_register_signal): Add match rule to
16422 Vdbus_registered_objects_table. (Bug#9581)
16423 (Fdbus_register_method, Vdbus_registered_objects_table):
16426 2011-09-24 Jim Meyering <meyering@redhat.com>
16428 do not ignore write error for any output size
16429 The previous change was incomplete.
16430 While it makes emacs --batch detect the vast majority of stdout
16431 write failures, errors were still ignored whenever the output size is
16432 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
16433 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
16434 && echo FAIL: ignored write error
16435 FAIL: ignored write error
16436 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
16437 && echo FAIL: ignored write error
16438 FAIL: ignored write error
16439 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
16441 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
16443 * emacs.c (Fkill_emacs): In noninteractive mode exit
16444 non-successfully if a write error occurred on stdout. (Bug#9574)
16446 2011-09-21 Eli Zaretskii <eliz@gnu.org>
16448 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
16451 * dispextern.h (struct it): Update the comment documenting what
16454 2011-09-20 Eli Zaretskii <eliz@gnu.org>
16456 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
16457 a display string, extend search for cursor position to end of row.
16458 (find_row_edges): If the row ends in a newline from a display
16459 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
16460 Handle the case of a display string with multiple newlines.
16461 (Fcurrent_bidi_paragraph_direction): Fix search for previous
16462 non-empty line. Fixes confusing cursor motion with arrow keys at
16463 the beginning of a line that starts with whitespace.
16465 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
16467 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
16470 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
16472 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
16473 boolean (Bug#9154).
16475 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16477 * xdisp.c (display_line): Record maximum and minimum buffer
16478 positions even if no glyphs were produced (e.g., by a zero-width
16479 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
16480 buffer positions that will be removed from the glyph row because
16482 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
16483 column is beyond frame width: don't subtract 1 "pixel" when
16484 computing width of the stretch.
16485 (reseat_at_next_visible_line_start): Undo the change made on
16486 2011-09-17 that saved paragraph information and restored it after
16487 the call to `reseat'. (Bug#9545)
16489 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16491 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
16492 and turn window cursor on if cleared (Bug#9415).
16494 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
16496 * search.c (boyer_moore): Take unibyte characters from pattern
16497 literally. (Bug#9458)
16499 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16501 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
16503 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
16505 Fix minor problem found by static checking.
16506 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
16507 initialized, to pacify gcc -Wuninitialized.
16509 * fileio.c: Report proper errno when syscall falls.
16510 (Finsert_file_contents): Save and restore errno,
16511 so that report_file_error outputs the correct diagnostic.
16512 (Fwrite_region) [CLASH_DETECTION]: Likewise.
16514 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16516 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
16518 2011-09-17 Eli Zaretskii <eliz@gnu.org>
16520 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
16521 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
16523 2011-09-17 Eli Zaretskii <eliz@gnu.org>
16525 * xdisp.c (reseat_at_next_visible_line_start): Keep information
16526 about the current paragraph and restore it after the call to reseat.
16528 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
16529 (bidi_find_paragraph_start): Search back for paragraph beginning
16530 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
16531 (bidi_move_to_visually_next): Only trigger paragraph-related
16532 computations when the last character is a newline or at EOB, not
16533 just any NEUTRAL_B. (Bug#9470)
16535 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
16536 truncated lines if point is covered by a display string. (Bug#9524)
16538 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
16540 * xselect.c: Relax test for outgoing X longs (Bug#9498).
16541 (cons_to_x_long): New function.
16542 (lisp_data_to_selection_data): Use it. Correct the test for
16543 short-versus-long data; it was negated. Break out of vector
16544 loop, for efficiency, when a long datum is discovered.
16546 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
16548 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
16550 2011-09-16 Eli Zaretskii <eliz@gnu.org>
16552 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
16553 GCC PR/17406) by declaring this function with external scope.
16555 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16557 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
16558 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
16560 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
16562 * editfns.c (Fformat): Correctly handle text properties on "%%".
16564 2011-09-15 Eli Zaretskii <eliz@gnu.org>
16566 * xterm.c (x_draw_composite_glyph_string_foreground):
16567 * w32term.c (x_draw_composite_glyph_string_foreground):
16568 * term.c (encode_terminal_code):
16569 * composite.c (composition_update_it, get_composition_id):
16570 * xdisp.c (get_next_display_element)
16571 (fill_composite_glyph_string): Add comments about special meaning
16572 of TAB characters in a composition.
16574 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16576 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
16577 This occurs when processing a multibyte format.
16578 Problem reported by Wolfgang Jenker.
16580 2011-09-15 Johan Bockgård <bojohan@gnu.org>
16582 * xdisp.c (try_cursor_movement): Only check for exact match if
16583 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
16585 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16587 Remove unused external symbols.
16588 * dispextern.h (calc_pixel_width_or_height): Remove decl.
16589 * xdisp.c (calc_pixel_width_or_height): Now static.
16590 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
16591 * indent.c (check_display_width):
16592 * w32term.c: Fix comment to match code.
16593 * xterm.c, xterm.h (x_catching_errors): Remove.
16595 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16597 * xselect.c: Use signed conversions more consistently (Bug#9498).
16598 (selection_data_to_lisp_data): Assume incoming selection data are
16599 signed integers, not unsigned. This is to be consistent with
16600 outgoing selection data, which was modified to use signed integers
16601 in as part of the fix to Bug#9196 in response to Jan D.'s comment
16602 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
16603 expects long, not unsigned long.
16605 2011-09-14 Eli Zaretskii <eliz@gnu.org>
16607 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
16608 computation of loop end. Reported by Johan Bockgård
16611 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
16613 * frame.c (Fother_visible_frames_p): Function deleted.
16615 2011-09-12 Eli Zaretskii <eliz@gnu.org>
16617 * indent.c (compute_motion): Process display vector front to back
16618 rather than the other way around. (Bug#2496)
16620 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
16622 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
16624 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
16626 * minibuf.c (Fread_from_minibuffer): Doc fix.
16628 2011-09-11 Eli Zaretskii <eliz@gnu.org>
16630 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
16631 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
16633 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
16635 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
16636 value for non-existent files.
16638 2011-09-11 Eli Zaretskii <eliz@gnu.org>
16640 * fileio.c (Finsert_file_contents): If the file cannot be opened,
16641 set its "size" to -1. This will set the modtime_size field of
16642 the corresponding buffer to -1, which is what
16643 verify-visited-file-modtime expects for files that do not exist.
16646 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
16648 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
16650 * lisp.h: ... from here. push_key_description is no longer
16651 defined in keyboard.c, so its declaration should not be in
16652 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
16653 logically belongs with push_key_description.
16655 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
16657 * buffer.h: Include <sys/types.h> instead of <time.h>.
16658 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
16659 Problem reported by Herbert J. Skuhra.
16661 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
16663 * xml.c (parse_region): Make the parsing work for
16664 non-comment-starting XML files again (bug#9144).
16666 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
16668 * image.c (gif_load): Fix calculation of bottom and right corner.
16671 2011-09-10 Eli Zaretskii <eliz@gnu.org>
16673 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
16674 redisplay in small windows.
16676 2011-09-09 Eli Zaretskii <eliz@gnu.org>
16678 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
16680 2011-09-08 Martin Rudalics <rudalics@gmx.at>
16682 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
16683 Operate on live windows only.
16685 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
16687 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
16689 2011-09-07 Eli Zaretskii <eliz@gnu.org>
16691 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
16692 only under bidi iteration.
16694 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
16696 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
16698 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16700 isnan: Fix porting problem to Solaris 10 with bundled gcc.
16701 Without this fix, the command to link temacs failed due to an
16702 undefined symbol __builtin_isnan. This is because
16703 /usr/include/iso/math_c99.h #defines isnan(x) to
16704 __builtin_isnan(x), but the bundled gcc, which identifies itself
16705 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
16707 * floatfns.c (isnan): #undef, and then #define to a clone of
16709 (Fisnan): Always define, since it's always available now.
16710 (syms_of_floatfns): Always define isnan at the Lisp level.
16712 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16714 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
16716 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16718 * fileio.c: Fix bugs with large file offsets (Bug#9428).
16719 The previous code assumed that file offsets (off_t values) fit in
16720 EMACS_INT variables, which is not true on typical 32-bit hosts.
16721 The code messed up by falsely reporting buffer overflow in cases
16722 such as (insert-file-contents "big" nil 1 2) into an empty buffer
16723 when "big" contains more than 2**29 bytes, even though this
16724 inserts just one byte and does not overflow the buffer.
16725 (Finsert_file_contents): Store file offsets as off_t
16726 values, not as EMACS_INT values. Check for overflow when
16727 converting between EMACS_INT and off_t. When checking for
16728 buffer overflow or for overlap, take the offsets into account.
16729 Don't use EMACS_INT for small values where int suffices.
16730 When checking for overlap, fix a typo: ZV was used where
16731 ZV_BYTE was intended.
16732 (Fwrite_region): Don't assume off_t fits into 'long'.
16733 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
16735 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
16737 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
16739 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
16741 sprintf-related integer and memory overflow issues (Bug#9412).
16743 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
16744 (esprintf, exprintf, evxprintf): New functions.
16745 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
16746 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
16747 (modify_event_symbol): Do not assume that the length of
16748 name_alist_or_stem is safe to alloca and fits in int.
16749 (Fexecute_extended_command): Likewise for function name and binding.
16750 (Frecursion_depth): Wrap around reliably on integer overflow.
16751 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
16752 since some callers pass EMACS_INT values.
16753 (Fsingle_key_description): Don't crash if symbol name contains more
16754 than MAX_ALLOCA bytes.
16755 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
16756 (get_minibuffer): Arg is now EMACS_INT, not int.
16757 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
16758 (esprintf, exprintf, evxprintf): New decls.
16759 * window.h (command_loop_level, minibuf_level): Reflect API changes.
16761 * dbusbind.c (signature_cat): New function.
16762 (xd_signature, Fdbus_register_signal):
16763 Do not overrun buffer; instead, report string overflow.
16765 * dispnew.c (add_window_display_history): Don't overrun buffer.
16766 Truncate instead; this is OK since it's just a log.
16768 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
16769 even if the time zone offset is outlandishly large.
16770 Don't mishandle offset == INT_MIN.
16772 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
16773 when creating daemon; the previous buffer-overflow check was incorrect.
16775 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
16776 which has the guts of the old verror function.
16778 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
16779 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
16781 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
16782 (font_unparse_xlfd): Don't blindly alloca long strings.
16783 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
16784 fits in int, when using sprintf. Use single snprintf to count
16785 length of string rather than counting it via multiple sprintfs;
16786 that's simpler and more reliable.
16787 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
16788 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
16789 sprintf, in case result does not fit in int.
16791 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
16792 (fontset_from_font): Print it.
16794 * frame.c (tty_frame_count): Now printmax_t, not int.
16795 (make_terminal_frame, set_term_frame_name): Print it.
16796 (x_report_frame_params): In X, window IDs are unsigned long,
16797 not signed long, so print them as unsigned.
16798 (validate_x_resource_name): Check for implausibly long names,
16799 and don't assume name length fits in 'int'.
16800 (x_get_resource_string): Don't blindly alloca invocation name;
16801 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
16804 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
16805 (xg_check_special_colors, xg_set_geometry):
16806 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
16808 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
16809 Use esprintf, not sprintf, in case result does not fit in int.
16811 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
16812 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
16813 it as a large positive number.
16814 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
16815 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
16817 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
16818 in case result does not fit in int.
16820 * print.c (float_to_string): Detect width overflow more reliably.
16821 (print_object): Make sprintf buffer a bit bigger, to avoid potential
16822 buffer overrun. Don't assume list length fits in 'int'. Treat
16823 print length of 0 as 0, not as infinity; to be consistent with other
16824 uses of print length in this function. Don't overflow print length
16825 index. Don't assume hash table size fits in 'long', or that
16826 vectorlike size fits in 'unsigned long'.
16828 * process.c (make_process): Use printmax_t, not int, to format
16829 process-name gensyms.
16831 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
16833 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
16834 to avoid potential buffer overrun.
16836 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
16837 if X resource line is longer than 512 bytes.
16839 * xfns.c (x_window): Make sprintf buffer a bit bigger
16840 to avoid potential buffer overrun.
16842 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
16844 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
16846 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
16848 Integer overflow fixes for scrolling, etc.
16849 Without these, Emacs silently mishandles large integers sometimes.
16850 For example, "C-u 4294967297 M-x recenter" was treated as if
16851 it were "C-u 1 M-x recenter" on a typical 64-bit host.
16853 * xdisp.c (try_window_id): Check Emacs fixnum range before
16854 converting to 'int'.
16856 * window.c (window_scroll_line_based, Frecenter):
16857 Check that an Emacs fixnum is in range before assigning it to 'int'.
16858 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
16859 values converted from Emacs fixnums.
16860 (Frecenter): Don't wrap around a line count if it is out of 'int'
16861 range; instead, treat it as an extreme value.
16862 (Fset_window_configuration, compare_window_configurations):
16863 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
16865 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
16866 that can exceed INT_MAX. Check that EMACS_INT value is in range
16867 before assigning it to the (possibly-narrower) index.
16868 (match_limit): Don't assume that a fixnum can fit in 'int'.
16870 * print.c (print_object): Use ptrdiff_t, not int, for index that can
16873 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
16874 (Fvertical_motion): Don't wrap around LINES values that don't fit
16875 in 'int'. Instead, treat them as extreme values. This is good
16876 enough for windows, which can't have more than INT_MAX lines anyway.
16878 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
16880 * Require libxml/parser.h to avoid compilation warning.
16882 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
16884 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
16885 since this reportedly can destroy thread storage.
16887 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
16889 * syntax.c (find_defun_start): Update all cache variables if
16890 exiting early (Bug#9401).
16892 2011-08-30 Eli Zaretskii <eliz@gnu.org>
16894 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
16896 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
16897 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
16898 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
16900 * term.c (tty_append_glyph): New function.
16901 (produce_stretch_glyph): Static function and its prototype deleted.
16903 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
16906 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
16908 * image.c (parse_image_spec): Check for nonnegative, not for positive,
16909 when checking :margin (Bug#9390).
16910 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
16911 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
16912 so that the name doesn't mislead. All uses changed.
16914 2011-08-28 Johan Bockgård <bojohan@gnu.org>
16916 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
16919 2011-08-27 Eli Zaretskii <eliz@gnu.org>
16921 * xdisp.c (move_it_to): Don't bail out early when reaching
16922 position beyond to_charpos, if we are scanning backwards.
16923 (move_it_vertically_backward): When DY == 0, make sure we get to
16924 the first character in the line after the newline.
16926 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
16928 * ccl.c: Improve and simplify overflow checking (Bug#9196).
16929 (ccl_driver): Do not generate an out-of-range pointer.
16930 (Fccl_execute_on_string): Remove unnecessary check for
16931 integer overflow, noted by Stefan Monnier in
16932 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
16933 Remove a FIXME that didn't need fixing.
16934 Simplify the newly-introduced buffer reallocation code.
16936 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
16938 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
16940 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
16942 Integer and memory overflow issues (Bug#9196).
16944 * doc.c (get_doc_string): Rework so that
16945 get_doc_string_buffer_size is the actual buffer size, rather than
16946 being 1 less than the actual buffer size; this makes xpalloc more
16949 * image.c (x_allocate_bitmap_record, cache_image):
16950 * xselect.c (Fx_register_dnd_atom):
16951 Simplify previous changes by using xpalloc.
16953 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
16954 since either will do and ptrdiff_t is convenient with xpalloc.
16956 * charset.c (charset_table_size)
16957 (struct charset_sort_data.priority): Now ptrdiff_t.
16958 (charset_compare): Don't overflow if priorities differ greatly.
16959 (Fsort_charsets): Don't assume list length fits in int.
16960 Check for size-calculation overflow when allocating sort data.
16961 (syms_of_charset): Allocate an initial charset table that is
16962 just under 64 KiB, to avoid problems with glibc malloc and mmap.
16964 * cmds.c (internal_self_insert): Check for size-calculation overflow.
16966 * composite.h (struct composition.glyph_len): Now int, not unsigned.
16967 The actual value is always <= INT_MAX, and leaving it unsigned made
16968 overflow checking harder.
16970 * dispextern.h (struct glyph_matrix.rows_allocated)
16971 (struct face_cache.size): Now ptrdiff_t, for convenience in use
16972 with xpalloc. The values are still always <= INT_MAX.
16974 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
16976 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
16977 (SAFE_NALLOCA): New macro.
16979 * region-cache.c (struct boundary.pos, find_cache_boundary)
16980 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
16981 (set_cache_region, invalidate_region_cache)
16982 (revalidate_region_cache, know_region_cache, region_cache_forward)
16983 (region_cache_backward, pp_cache):
16984 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
16985 so that ptrdiff_t * can be passed to xpalloc.
16986 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
16987 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
16988 (pp_cache): Don't assume cache_len fits in int.
16989 * region-cache.h: Adjust extern decls to match.
16991 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
16992 EMACS_INT, since either will do, for xpalloc.
16994 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
16995 (xnmalloc, xnrealloc, xpalloc): New functions.
16997 * bidi.c (bidi_shelve_header_size): New constant.
16998 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
16999 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
17001 * bidi.c (bidi_cache_shrink):
17002 * buffer.c (overlays_at, overlays_in, record_overlay_string)
17004 Don't update size of array until after memory allocation succeeds,
17005 because xmalloc/xrealloc may not return.
17006 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
17007 now that we have proper integer overflow checking.
17008 (record_overlay_string, overlay_strings): Catch overflows when
17009 calculating size of overlay_str_buf.
17011 * callproc.c (Fcall_process): Check for size overflow when
17012 calculating size of args2.
17013 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
17014 Normally we prefer signed values, but sticking with ptrdiff_t would
17015 require adding more-complicated checks.
17017 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
17018 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
17019 Redo buffer-overflow calculations to avoid integer overflow.
17020 Add a FIXME comment where memory seems to be over-allocated.
17022 * character.c (Fstring): Check for size-calculation overflow.
17024 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
17025 unnecessary integer overflow. Check for size overflow.
17026 (encode_coding_object): Don't update size until xmalloc succeeds.
17028 * composite.c (get_composition_id): Check for overflow in glyph
17029 length calculations.
17031 Integer and memory overflow fixes for display code.
17032 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
17033 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
17034 (scrolling_window): Check for overflow in size calculations.
17035 (line_draw_cost, realloc_glyph_pool, add_row_entry):
17036 Don't assume glyph table len fits in int.
17037 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
17038 (row_table_size): Now ptrdiff_t, not int.
17039 (scrolling_window): Avoid overflow in size calculations.
17040 Don't update size until allocation succeeds.
17041 * fns.c (concat): Check for overflow in size calculations.
17042 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
17043 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
17044 (NEXT_ALMOST_PRIME_LIMIT): New constant.
17046 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
17047 (get_doc_string): Check for size calculation overflow.
17048 Don't update size until allocation succeeds.
17049 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
17050 EMACS_INT, where ptrdiff_t will do.
17051 (Fsubstitute_command_keys): Check for string overflow.
17053 * editfns.c (set_time_zone_rule): Don't assume environment length
17055 (message_length): Now ptrdiff_t, not int.
17056 (Fmessage_box): Don't update size until allocation succeeds.
17057 Don't assume message length fits in int.
17058 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
17060 * emacs.c (main): Do not reallocate argv, since there is a null at
17061 the end that can be overwritten, and this way there's no need to
17062 worry about size-calculation overflow.
17063 (sort_args): Check for size-calculation overflow.
17065 * eval.c (init_eval_once, grow_specpdl): Don't update size until
17067 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
17069 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
17070 (x_set_scroll_bar_width, x_figure_window_size):
17071 Check for integer overflow.
17072 (x_set_alpha): Do not assume XINT fits in int.
17074 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
17075 This is for the members text_lines, text_cols, total_lines, total_cols,
17076 where the system imposes an 'int' limit.
17078 * fringe.c (Fdefine_fringe_bitmap):
17079 Don't update size until alloc works.
17081 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
17082 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
17084 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
17085 Check for size-calculation overflow.
17086 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
17087 do, as we prefer signed integers.
17088 (id_to_widget.max_size, id_to_widget.used)
17089 (xg_store_widget_in_map, xg_remove_widget_from_map)
17090 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
17091 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
17092 Use and return ptrdiff_t, not int.
17093 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
17094 * gtkutil.h: Change prototypes to match the above.
17096 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
17097 are duplicate now that they've been promoted to lisp.h.
17098 (x_allocate_bitmap_record, x_alloc_image_color)
17099 (make_image_cache, cache_image, xpm_load):
17100 Don't update size until alloc is done.
17101 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
17103 Check for size calculation overflow.
17104 (ct_colors_allocated_max): New constant.
17105 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
17108 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
17109 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
17110 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
17111 Use ptrdiff_t, not int, to count maps.
17112 (read_char_minibuf_menu_prompt): Check for overflow in size
17113 calculations. Don't update size until allocation succeeds.
17114 Redo calculations to avoid overflow.
17115 * keyboard.h: Change prototypes to match the above.
17117 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
17119 (current_minor_maps): Check for size calculation overflow.
17120 * keymap.h: Change prototypes to match the above.
17122 * lread.c (read1, init_obarray): Don't update size until alloc done.
17124 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
17125 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
17127 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
17128 Now ptrdiff_t, not int.
17129 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
17130 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
17132 * process.c (Fnetwork_interface_list): Check for overflow
17133 in size calculation.
17135 * region-cache.c (move_cache_gap): Check for size calculation overflow.
17137 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
17138 overflow. Don't bother calling xmalloc when xrealloc will do.
17140 * search.c (Freplace_match): Check for size calculation overflow.
17141 (Fset_match_data): Don't assume list lengths fit in 'int'.
17143 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
17144 for command line length. Do not attempt to address one before the
17145 beginning of an array, as that's not portable.
17147 * term.c (max_frame_lines): Remove; unused.
17148 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
17150 (encode_terminal_code, calculate_costs): Check for size
17151 calculation overflow.
17152 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
17153 table lengths and related sizes. Don't update size until alloc
17154 done. Redo calculations to avoid overflow.
17155 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
17157 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
17158 subtracting pointers.
17159 (gobble_line): Check for overflow more carefully. Don't update size
17162 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
17163 Don't update size until alloc done.
17164 Redo size calculations to avoid overflow.
17165 Check for size calculation overflow.
17166 (main) [DEBUG]: Fix typo in invoking tparam1.
17168 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
17169 Use ptrdiff_t, not int, for sizes.
17170 (store_mode_line_noprop_char): Don't update size until alloc done.
17172 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
17173 Use ptrdiff_t, not int, for sizes.
17174 (Finternal_make_lisp_face, cache_face):
17175 Check for size calculation overflow.
17176 (cache_face): Treat size calculation overflows as if they were
17177 memory exhaustion (the usual treatment), rather than aborting.
17179 * xfns.c (x_encode_text, x_set_name_internal)
17180 (Fx_change_window_property): Use ptrdiff_t, not int, to count
17181 sizes, since they can exceed INT_MAX in size. Check for size
17182 calculation overflow.
17184 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
17185 (xg_select): Check for size calculation overflow.
17186 Don't update size until alloc done.
17188 * xrdb.c (get_environ_db): Don't assume path length fits in int,
17189 as sprintf is limited to int lengths.
17191 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
17192 (X_LONG_MIN): New macros.
17193 Use them to make the following changes clearer.
17194 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
17195 This change doesn't affect the value now, but it may help remind
17196 future maintainers not to raise the value too much later.
17197 (SELECTION_QUANTUM): Remove, replacing with ...
17198 (selection_quantum): ... new function, which avoids overflow.
17200 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
17201 assumption that selection length fits in 'int'.
17202 (x_reply_selection_request, x_handle_selection_request)
17203 (x_get_window_property, receive_incremental_selection)
17204 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
17205 (lisp_data_to_selection_data, clean_local_selection_data):
17206 Use ptrdiff_t, not int, to record length of selection.
17207 (x_reply_selection_request, x_get_window_property)
17208 (receive_incremental_selection, x_property_data_to_lisp):
17209 Redo calculations to avoid overflow.
17210 (x_reply_selection_request): When sending hint, ceiling it at
17211 X_LONG_MAX rather than relying on wraparound overflow to send
17213 (x_get_window_property, receive_incremental_selection)
17214 (lisp_data_to_selection_data, x_property_data_to_lisp):
17215 Check for size-calculation overflow.
17216 (x_get_window_property, receive_incremental_selection)
17217 (lisp_data_to_selection_data, Fx_register_dnd_atom):
17218 Don't store size until memory allocation succeeds.
17219 (x_get_window_property): Plug memory leak on memory exhaustion.
17220 Don't double-block input; malloc is safe here. Don't assume 2**34
17221 - 4 fits in unsigned long. Add an xassert to check
17222 XGetWindowProperty overflow. Be more careful about overflow
17223 calculations, and distinguish size from memory overflow better.
17224 (receive_incremental_selection): When tracing, don't assume
17225 unsigned int is less than INT_MAX.
17226 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
17227 harmful) conversions of unsigned short to int.
17228 (lisp_data_to_selection_data): Don't assume that integers
17229 in the range -65535 through -1 fit in an X unsigned short.
17230 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
17231 result parameters unless successful. Rely on cons_to_unsigned
17232 to report problems with elements; the old code wasn't right anyway.
17233 (x_check_property_data): Check for int overflow; we cannot use
17234 a wider type due to X limits.
17235 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
17237 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
17239 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
17240 (x_term_init): Check for size calculation overflow.
17241 (x_color_cells): Don't store size until memory allocation succeeds.
17242 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
17243 Don't assume alloca size is less than MAX_ALLOCA.
17244 (x_term_init): Don't assume length fits in int (sprintf is limited
17247 Use ptrdiff_t for composition IDs.
17248 * character.c (lisp_string_width):
17249 * composite.c (composition_table_size, n_compositions)
17250 (get_composition_id, composition_gstring_from_id):
17251 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
17252 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
17253 * window.c (Frecenter):
17254 Use ptrdiff_t, not int, for composition IDs.
17255 * composite.c (get_composition_id): Check for integer overflow.
17256 * composite.h: Adjust prototypes to match the above changes.
17258 Use ptrdiff_t for hash table indexes.
17259 * category.c (hash_get_category_set):
17260 * ccl.c (ccl_driver):
17261 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
17262 * coding.c (coding_system_charset_list, detect_coding_system):
17263 * coding.h (struct coding_system.id):
17264 * composite.c (get_composition_id, gstring_lookup_cache):
17265 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
17266 * image.c (xpm_get_color_table_h):
17267 * lisp.h (hash_lookup, hash_put):
17268 * minibuf.c (Ftest_completion):
17269 Use ptrdiff_t for hash table indexes, not int (which is too
17270 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
17271 32-bit --with-wide-int hosts).
17273 * charset.c (Fdefine_charset_internal): Check for integer overflow.
17274 Add a FIXME comment about memory leaks.
17275 (syms_of_charset): Don't assume xmalloc returns.
17277 Don't assume that stated character widths fit in int.
17278 * character.c (Fchar_width, c_string_width, lisp_string_width):
17279 * character.h (CHAR_WIDTH):
17280 * indent.c (MULTIBYTE_BYTES_WIDTH):
17281 Use sanitize_char_width to avoid undefined and/or bad behavior
17282 with outlandish widths.
17283 * character.h (sanitize_tab_width): Rename from sanitize_width,
17284 now that we have two such functions. All uses changed.
17285 (sanitize_char_width): New inline function.
17287 Don't assume that tab-width fits in int.
17288 * character.h (sanitize_width): New inline function.
17289 (SANE_TAB_WIDTH): New macro.
17290 (ASCII_CHAR_WIDTH): Use it.
17291 * indent.c (sane_tab_width): Remove. All uses replaced by
17292 SANE_TAB_WIDTH (current_buffer).
17293 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
17295 * fileio.c: Integer overflow issues with file modes.
17296 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
17298 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
17299 Remove unreachable code.
17300 (read_hex, load_charset_map_from_file): Check for integer overflow.
17302 * xterm.c: Don't go over XClientMessageEvent limit.
17303 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
17304 (x_send_scroll_bar_event): Likewise. Check that the size does not
17305 exceed limits imposed by XClientMessageEvent, as well as the usual
17306 ptrdiff_t and size_t limits.
17308 * keyboard.c: Overflow, signedness and related fixes.
17309 (make_lispy_movement): Use same integer type in forward decl
17310 that is used in the definition.
17311 (read_key_sequence, keyremap_step):
17312 Change bufsize argument back to int, undoing my 2011-03-30 change.
17313 We prefer signed types, and int is wide enough here.
17314 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
17315 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
17316 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
17317 length, not size_t. Use ptrdiff_t for index, not int.
17318 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
17319 possibility of integer overflow.
17321 Overflow, signedness and related fixes for images.
17323 * dispextern.h (struct it.stack[0].u.image.image_id)
17324 (struct_it.image_id, struct image.id, struct image_cache.size)
17325 (struct image_cache.used, struct image_cache.ref_count):
17326 * gtkutil.c (update_frame_tool_bar):
17327 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
17328 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
17329 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
17330 * nsmenu.m (update_frame_tool_bar):
17331 * xdisp.c (calc_pixel_width_or_height):
17332 * xfns.c (image_cache_refcount):
17333 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
17334 on typical 64-bit hosts.
17336 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
17337 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
17338 Omit unnecessary casts to int.
17339 (parse_image_spec): Check that integers fall into 'int' range
17340 when the callers expect that.
17341 (image_ascent): Redo ascent calculation to avoid int overflow.
17342 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
17343 (lookup_image): Remove unnecessary tests.
17344 (xbm_image_p): Locals are now of int, not EMACS_INT,
17345 since parse_image_check makes sure they fit into int.
17346 (png_load, gif_load, svg_load_image):
17347 Prefer int to unsigned where either will do.
17348 (tiff_handler): New function, combining the cores of the
17349 old tiff_error_handler and tiff_warning_handler.
17350 This function is rewritten to use vsnprintf and thereby avoid
17351 stack buffer overflows. It uses only the features of vsnprintf
17352 that are common to both POSIX and native Microsoft.
17353 (tiff_error_handler, tiff_warning_handler): Use it.
17354 (tiff_load, gif_load, imagemagick_load_image):
17355 Don't assume :index value fits in 'int'.
17356 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
17357 (imagemagick_load_image): Check that crop parameters fit into
17358 the integer types that MagickCropImage accepts. Don't assume
17359 Vimagemagick_render_type has a nonnegative value. Don't assume
17360 size_t fits in 'long'.
17361 (gs_load): Use printmax_t to print the widest integers possible.
17362 Check for integer overflow when computing image height and width.
17364 2011-08-26 Eli Zaretskii <eliz@gnu.org>
17366 * xdisp.c (redisplay_window): Don't force window start if point
17367 will be invisible in the resulting window. (Bug#9324)
17369 2011-08-25 Eli Zaretskii <eliz@gnu.org>
17371 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
17372 the display spec is of the form `(space ...)'.
17373 (handle_display_spec): Return the value returned by
17374 handle_single_display_spec, not just 1 or zero.
17375 (handle_single_display_spec): If the display spec is of the form
17376 `(space ...)', and specifies display in the text area, return 2
17378 (try_cursor_movement): Check for the need to scroll more
17379 accurately, and prefer exact match for point under bidi.
17380 Don't advance `row' beyond the last row of the window.
17382 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
17383 into disp_prop; all users changed.
17385 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
17386 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
17387 for the text covered by the display property.
17389 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
17391 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
17392 Change return value to nil.
17393 (Frecord_buffer): Delete unused function.
17395 2011-08-24 Eli Zaretskii <eliz@gnu.org>
17397 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
17398 buffers, return left-to-right.
17399 (set_cursor_from_row): Consider candidate row a win if its glyph
17400 represents a newline and point is on that newline. Fixes cursor
17401 positioning on the newline at EOL of R2L text within L2R
17402 paragraph, and vice versa.
17403 (try_cursor_movement): Check continued rows, in addition to
17404 continuation rows. Fixes unwarranted scroll when point enters a
17405 continued line of R2L text within an L2R paragraph, or vice versa.
17406 (cursor_row_p): Consider the case of point being equal to
17407 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
17408 from the end of a short line to the beginning of a continued line
17409 of R2L text within L2R paragraph.
17410 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
17411 composed characters.
17413 * bidi.c (bidi_check_type): Use xassert.
17414 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
17417 2011-08-23 Eli Zaretskii <eliz@gnu.org>
17419 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
17422 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
17424 * nsfont.m (ns_otf_to_script): Fix typo.
17426 2011-08-22 Kenichi Handa <handa@m17n.org>
17428 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
17429 extra slot even if the purpose is char-code-property-table.
17431 2011-08-23 Eli Zaretskii <eliz@gnu.org>
17433 * xdisp.c (redisplay_window): When computing centering_position,
17434 account for the height of the header line. (Bug#8874)
17436 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
17437 instead of CHAR_TO_BYTE. Fixes a crash when a completion
17438 candidate is selected by the mouse, and that candidate has a
17439 composed character under the mouse.
17441 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
17442 coordinates reported by pos-visible-in-window-p for a composed
17443 character in column zero.
17445 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
17447 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
17449 2011-08-22 Eli Zaretskii <eliz@gnu.org>
17451 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
17452 consider it a hit if to_charpos is anywhere in the range of the
17453 composed buffer positions.
17455 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
17457 * image.c (gif_load): Don't assume that each subimage has the same
17458 dimensions as the base image. Handle disposal method that is
17459 "undefined" by the gif spec (Bug#9335).
17461 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
17463 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
17464 (Fcondition_case): Document `debug' symbol in error handler.
17466 2011-08-19 Eli Zaretskii <eliz@gnu.org>
17468 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
17469 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
17470 from an Org mode buffer to a Speedbar frame.
17472 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
17473 a composition, take its buffer position from IT->cmp_it.charpos.
17474 Fixes cursor positioning at the beginning of a line that begins
17475 with a composed character.
17477 2011-08-18 Eli Zaretskii <eliz@gnu.org>
17479 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
17480 character bidirectional type, use STRONG_L instead. Fixes crashes
17481 in a buffer produced by `describe-categories'.
17483 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
17484 members before the level stack, so they would be saved and
17485 restored when copying iterator state. Fixes incorrect reordering
17486 around TABs covered by display properties.
17488 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
17490 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
17492 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
17494 * eval.c (internal_condition_case, internal_condition_case_1)
17495 (internal_condition_case_2, internal_condition_case_n):
17496 Remove unnecessary aborts (Bug#9081).
17498 2011-08-17 Eli Zaretskii <eliz@gnu.org>
17500 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
17501 has no `load' handler, try opening the file locally. (Bug#9311)
17503 2011-08-16 Ken Brown <kbrown@cornell.edu>
17505 * gmalloc.c: Expand comment.
17507 2011-08-16 Eli Zaretskii <eliz@gnu.org>
17509 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
17510 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
17512 2011-08-16 Ken Brown <kbrown@cornell.edu>
17514 Fix memory allocation problems in Cygwin build (Bug#9273).
17516 * unexcw.c ( __malloc_initialized): Declare external variable.
17517 (fixup_executable): Force the dumped emacs to reinitialize malloc.
17519 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
17521 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
17523 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
17524 in the static heap.
17525 [CYGWIN] (special_realloc): New function.
17526 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
17527 requests to realloc storage in the static heap.
17529 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
17531 * bidi.c (bidi_initialize): Remove unused local.
17533 2011-08-15 Eli Zaretskii <eliz@gnu.org>
17536 * biditype.h: Remove file.
17537 * makefile.w32-in ($(BLD)/bidi.$(O)):
17538 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
17540 * dispextern.h: Fix a typo in the comment to bidi_type_t.
17542 * chartab.c: Improve commentary for the uniprop_table API.
17544 * bidi.c (bidi_paragraph_init): Support zero value of
17545 bidi_ignore_explicit_marks_for_paragraph_level.
17546 (bidi_initialize): Use uniprop_table instead of including
17547 biditype.h and bidimirror.h.
17549 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
17550 coordinates of the iterator when restoring from ppos_it.
17553 2011-08-14 Kenichi Handa <handa@m17n.org>
17555 * process.c (create_process): Call setup_process_coding_systems
17556 after the pid of the process is set to -1 (Bug#8162).
17558 2011-08-14 Eli Zaretskii <eliz@gnu.org>
17560 * xdisp.c (move_it_in_display_line_to): Don't invoke
17561 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
17562 ppos_it. Fixes vertical cursor motion when line beginning is
17563 covered by an image. (Bug#9296)
17565 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
17567 * nsterm.h (ns_run_ascript): Declare.
17568 (NSAPP_DATA2_RUNASSCRIPT): Define.
17570 * nsfns.m (as_script, as_result, as_status): New static variables.
17571 (ns_run_ascript): New function.
17572 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
17573 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
17574 the event loop. Get status from as_status (Bug#7276).
17576 * nsterm.m (sendEvent): If event is NSApplicationDefined and
17577 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
17578 the event loop (Bug#7276).
17580 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
17582 * gnutls.c (QCgnutls_bootprop_priority)
17583 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
17584 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
17585 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
17586 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
17587 (QCgnutls_bootprop_verify_hostname_error)
17588 (QCgnutls_bootprop_callbacks_verify): Rename from
17589 Qgnutls_bootprop_..., all uses changed.
17591 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
17594 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
17596 * xfaces.c (Qframe_set_background_mode): Now static.
17597 * dispextern.h (Qframe_set_background_mode): Remove decl.
17599 * process.c (Fnetwork_interface_info): Declare local only if needed.
17601 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
17603 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
17604 (Fnetwork_interface_list): Allocate in increments of bytes instead
17605 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
17606 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
17608 (struct ifflag_def): notrailers is smart on OSX.
17609 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
17610 Get hardware address with getifaddrs if available.
17612 2011-08-12 Eli Zaretskii <eliz@gnu.org>
17614 * xdisp.c (iterate_out_of_display_property): xassert that
17615 IT->position is set to within IT->object's boundaries. Break from
17616 the loop as soon as EOB is reached; avoids infloops in redisplay
17617 when IT->position is set up wrongly due to some bug.
17618 Set IT->current to match the bidi iterator unconditionally.
17619 (push_display_prop): Allow GET_FROM_STRING as IT->method on
17620 entry. Force push_it to save on the stack the current
17621 buffer/string position, to be restored by pop_it. Fix flags in
17622 the iterator structure wrt the object coming from a display
17623 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
17624 properties. (Bug#9284)
17626 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
17628 * fontset.c (fontset_get_font_group): Add proper type checks.
17631 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17633 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
17634 and LC_VERSION_MIN_MACOSX.
17635 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
17636 (dump_it) [LC_FUNCTION_STARTS]: Use it.
17638 2011-08-08 Eli Zaretskii <eliz@gnu.org>
17640 * xdisp.c (forward_to_next_line_start): Allow to use the
17641 no-display-properties-and-no-overlays under bidi display.
17642 Set disp_pos in the bidi iterator to avoid searches for display
17643 properties and overlays.
17645 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
17647 * editfns.c (Fset_time_zone_rule): Document relationship with the
17650 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
17651 the font entity extracted from the cache (Bug#8109).
17653 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
17655 * composite.c (autocmp_chars): Don't reset point. That is done by
17656 restore_point_unwind (Bug#5984).
17658 2011-08-07 Juri Linkov <juri@jurta.org>
17660 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
17661 to show the arg `TIME' instead of `TIMEVAL'.
17663 2011-08-06 Eli Zaretskii <eliz@gnu.org>
17665 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
17666 display property strides EOL and includes a newline, as in
17667 longlines-mode. (Bug#9254)
17668 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
17669 word-wrap under bidirectional display. (Bug#9224)
17671 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
17672 is non-zero, even if the data buffer is NULL. Fixes a crash in
17673 vertical-motion with longlines-mode. (Bug#9254)
17675 2011-08-05 Eli Zaretskii <eliz@gnu.org>
17677 * bidi.c <bidi_cache_total_alloc>: Now static.
17678 (bidi_initialize): Initialize bidi_cache_total_alloc.
17680 * xdisp.c (display_line): Release buffer allocated for shelved bidi
17683 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
17684 amount allocated this far in `bidi_cache_total_alloc'.
17685 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
17686 non-zero, only free the data buffer without restoring the cache
17687 contents. All callers changed.
17689 * dispextern.h (bidi_unshelve_cache): Update prototype.
17691 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
17692 (move_it_in_display_line, move_it_to)
17693 (move_it_vertically_backward, move_it_by_lines): Replace the call
17694 to xfree to an equivalent call to bidi_unshelve_cache.
17695 (move_it_in_display_line_to): Fix logic of returning
17696 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
17698 2011-08-05 Eli Zaretskii <eliz@gnu.org>
17700 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
17701 came from a string character with a `cursor' property. (Bug#9229)
17703 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17705 * Makefile.in (LIB_PTHREAD): New variable.
17706 (LIBES): Add LIB_PTHREAD (Bug#9216).
17708 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
17709 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
17711 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
17713 * regex.c (re_iswctype): Remove some redundant boolean conversions.
17715 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17717 * xterm.c (x_find_topmost_parent): New function.
17718 (x_set_frame_alpha): Find topmost parent window with
17719 x_find_topmost_parent and set the property there also (bug#9181).
17720 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
17722 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
17724 * callproc.c (Fcall_process): Avoid vfork clobbering
17725 the local vars buffer, coding_systems, current_dir.
17727 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
17729 * keymap.c (Fmake_composed_keymap): Move to subr.el.
17731 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
17733 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
17734 so that it is not optimized away.
17736 * xdisp.c (compute_display_string_pos): Remove unused local.
17738 2011-08-02 Eli Zaretskii <eliz@gnu.org>
17740 Fix slow cursor motion and scrolling in large buffers with
17741 selective display, like Org Mode buffers. (Bug#9218)
17743 * dispextern.h (struct bidi_it): New member disp_prop_p.
17745 * xdisp.c: Remove one-slot cache of display string positions.
17746 (compute_display_string_pos): Accept an additional argument
17747 DISP_PROP_P; callers changed. Scan at most 5K characters forward
17748 for a display string or property. If found, set DISP_PROP_P
17751 * bidi.c (bidi_fetch_char): Accept an additional argument
17752 DISP_PROP_P, and pass it to compute_display_string_pos.
17753 Only handle text covered by a display string if DISP_PROP_P is returned
17754 non-zero. All callers of bidi_fetch_char changed.
17756 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
17758 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
17760 2010-12-03 Don March <don@ohspite.net>
17762 * keymap.c (Fdefine_key): Fix non-prefix key error message when
17763 last character M-[char] is translated to ESC [char] (bug#7541).
17765 2011-08-02 Kenichi Handa <handa@m17n.org>
17767 * lisp.h (uniprop_table): Extern it.
17769 * chartab.c (uniprop_table): Make it non-static.
17771 2011-08-01 Eli Zaretskii <eliz@gnu.org>
17773 * xdisp.c (forward_to_next_line_start): Accept additional argument
17774 BIDI_IT_PREV, and store into it the state of the bidi iterator had
17776 (reseat_at_next_visible_line_start): Use the bidi iterator state
17777 returned by forward_to_next_line_start to restore the state of
17778 it->bidi_it after backing up to previous newline. (Bug#9212)
17780 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
17782 * regex.c (re_comp): Protoize.
17783 (re_exec): Fix return type.
17784 (regexec): Fix type of `ret'. (Bug#9203)
17786 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17788 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
17789 This is needed if max-image-size is a floating-point number.
17791 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17793 * print.c (print_object): Print empty symbol as ##.
17795 * lread.c (read1): Read ## as empty symbol.
17797 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
17799 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
17800 setting frame foreground color (Bug#9175).
17801 (x_set_background_color): Likewise.
17803 * nsmenu.m (-setText): Size tooltip dimensions precisely to
17804 contents (Bug#9176).
17805 (EmacsTooltip -init): Remove bezels and add shadows to
17808 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
17809 or scroll bar (Bug#8470).
17811 * nsfont.m (nsfont_open): Remove assignment to voffset and
17812 unnecessary vars hshink, expand, hd, full_height, min_height.
17813 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
17815 * nsterm.h (nsfont_info): Remove voffset field.
17817 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
17819 Implement strike-through and overline on NextStep (Bug#8863).
17821 * nsfont.m (nsfont_open): Use underline position provided by font,
17822 instead of hard-coded value of 2.
17823 (nsfont_draw): Call ns_draw_text_decoration instead.
17825 * nsterm.h: Add declaration for ns_draw_text_decoration.
17827 * nsterm.m (ns_draw_text_decoration): New function for drawing
17828 underline, overline, and strike-through.
17829 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
17830 ns_draw_text_decoration. Change treatment of cursor drawing to
17831 accommodate underlining, etc.
17833 2011-07-28 Eli Zaretskii <eliz@gnu.org>
17835 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
17838 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17840 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
17841 Without this fix, if a signal arrives just after memory fills up,
17842 'malloc' might be invoked reentrantly.
17844 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
17845 In other words, assume that every image size is allowed, on non-X
17846 hosts. This assumption is probably wrong, but it lets Emacs compile.
17848 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17850 * regex.c (re_iswctype): Convert return values to boolean.
17852 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
17854 * xdisp.c (compute_display_string_pos): Don't use cached display
17855 string position if the buffer had its restriction changed.
17858 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17860 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
17862 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17864 Integer signedness and overflow and related fixes. (Bug#9079)
17866 * bidi.c: Integer size and overflow fixes.
17867 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
17868 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
17869 (bidi_cache_find_level_change, bidi_cache_ensure_space)
17870 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
17871 (bidi_find_other_level_edge):
17872 Use ptrdiff_t instead of EMACS_INT where either will do.
17873 This works better on 32-bit hosts configured --with-wide-int.
17874 (bidi_cache_ensure_space): Check for size-calculation overflow.
17875 Use % rather than repeated addition, for better worst-case speed.
17876 Don't set bidi_cache_size until after xrealloc returns, because it
17878 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
17879 (bidi_cache_ensure_space): Also check that the bidi cache size
17880 does not exceed that of the largest Lisp string or buffer. See Eli
17881 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
17883 * alloc.c (__malloc_size_t): Remove.
17884 All uses replaced by size_t. See Andreas Schwab's note
17885 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
17887 * image.c: Improve checking for integer overflow.
17888 (check_image_size): Assume that f is nonnull, since
17889 it is always nonnull in practice. This is one less thing to
17890 worry about when checking for integer overflow later.
17891 (x_check_image_size): New function, which checks for integer
17892 overflow issues inside X.
17893 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
17894 This removes the need for a memory_full check.
17895 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
17896 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
17897 (xbm_read_bitmap_data): Change locals back to 'int', since
17898 their values must fit in 'int'.
17899 (xpm_load_image, png_load, tiff_load):
17900 Invoke x_create_x_image_and_pixmap earlier,
17901 to avoid much needless work if the image is too large.
17902 (tiff_load): Treat overly large images as if
17903 x_create_x_image_and_pixmap failed, not as malloc failures.
17904 (gs_load): Use x_check_image_size.
17906 * gtkutil.c: Omit integer casts.
17907 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
17908 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
17910 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
17912 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
17913 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
17914 would wrongly return t on a 64-bit host.
17916 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
17917 The plain *_OVERFLOW macros run afoul of GCC bug 49705
17918 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
17919 and therefore cause GCC to emit a bogus diagnostic in some cases.
17921 * image.c: Integer signedness and overflow and related fixes.
17922 This is not an exhaustive set of fixes, but it's time to
17923 record what I've got.
17924 (lookup_pixel_color, check_image_size): Remove redundant decls.
17925 (check_image_size): Don't assume that arbitrary EMACS_INT values
17926 fit in 'int', or that arbitrary 'double' values fit in 'int'.
17927 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
17928 (tiff_load, imagemagick_load_image):
17929 Check for overflow in size calculations.
17930 (x_create_x_image_and_pixmap): Remove unnecessary test for
17931 xmalloc returning NULL; that can't happen.
17932 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
17933 (xpm_color_bucket): Use better integer hashing function.
17934 (xpm_cache_color): Don't possibly over-allocate memory.
17935 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
17936 (gif_memory_source):
17937 Use ptrdiff_t, not int or size_t, to record sizes.
17938 (png_load): Don't assume values greater than 2**31 fit in 'int'.
17939 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
17940 either works, as we prefer signed integers.
17941 (tiff_read_from_memory, tiff_write_from_memory):
17942 Return tsize_t, not size_t, since that's what the TIFF API wants.
17943 (tiff_read_from_memory): Don't fail simply because the read would
17944 go past EOF; instead, return a short read.
17945 (tiff_load): Omit no-longer-needed casts.
17946 (Fimagemagick_types): Don't assume size fits into 'int'.
17948 Improve hashing quality when configured --with-wide-int.
17949 * fns.c (hash_string): New function, taken from sxhash_string.
17950 Do not discard information about ASCII character case; this
17951 discarding is no longer needed.
17952 (sxhash-string): Use it. Change sig to match it. Caller changed.
17953 * lisp.h: Declare it.
17954 * lread.c (hash_string): Remove, since we now use fns.c's version.
17955 The fns.c version returns a wider integer if --with-wide-int is
17956 specified, so this should help the quality of the hashing a bit.
17958 * emacs.c: Integer overflow minor fix.
17959 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
17960 Define only if GNU_LINUX.
17961 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
17963 * dispnew.c: Integer signedness and overflow fixes.
17964 Remove unnecessary forward decls, that were a maintenance hassle.
17965 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
17967 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
17968 (scrolling_window): Use ptrdiff_t, not int, for byte count.
17969 (prepare_desired_row, line_draw_cost):
17970 Use int, not unsigned, where either works.
17971 (save_current_matrix, restore_current_matrix):
17972 Use ptrdiff_t, not size_t, where either works.
17973 (init_display): Check for overflow more accurately, and without
17974 relying on undefined behavior.
17976 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
17977 Remove, replacing with the new symbols in lisp.h. All uses changed.
17978 * fileio.c (make_temp_name):
17979 * filelock.c (lock_file_1, lock_file):
17980 * xdisp.c (message_dolog):
17981 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
17982 Use pMd etc. instead.
17983 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
17984 replacing the pWIDE etc. symbols removed from editfns.c.
17986 * keyboard.h (num_input_events): Now uintmax_t.
17987 This is (very slightly) less likely to mess up due to wraparound.
17990 * buffer.c: Integer signedness fixes.
17991 (alloc_buffer_text, enlarge_buffer_text):
17992 Use ptrdiff_t rather than size_t when either will do, as we prefer
17995 * alloc.c: Integer signedness and overflow fixes.
17996 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
17997 (__malloc_size_t): Default to size_t, not to int.
17998 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
17999 (Fgarbage_collect, mark_object_loop_halt, mark_object):
18000 Prefer ptrdiff_t to size_t when either would do, as we prefer
18002 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
18003 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
18004 Now const. Initialize with values that are in range even if char
18006 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
18007 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
18008 These functions do the right thing with sizes > 2**32.
18009 (check_depth): Now ptrdiff_t, not int.
18010 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
18011 Adjust to new way of storing sizes. Check for size overflow bugs
18013 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
18014 slightly wrong anyway, as it missed one instance of
18015 XMALLOC_OVERRUN_CHECK_OVERHEAD.
18016 (refill_memory_reserve): Omit needless cast to size_t.
18017 (mark_object_loop_halt): Mark as externally visible.
18019 * xselect.c: Integer signedness and overflow fixes.
18020 (Fx_register_dnd_atom, x_handle_dnd_message):
18021 Use ptrdiff_t, not size_t, since we prefer signed.
18022 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
18023 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
18024 x_dnd_atoms_size and x_dnd_atoms_length.
18026 * doprnt.c: Prefer signed to unsigned when either works.
18028 * doprnt.c (doprnt):
18030 * xdisp.c (vmessage):
18031 Use ptrdiff_t, not size_t, when using or implementing doprnt,
18032 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
18033 prefer signed arithmetic to avoid comparison confusion.
18034 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
18035 but is a bit tricky.
18037 Assume freestanding C89 headers, string.h, stdlib.h.
18038 * data.c, doprnt.c, floatfns.c, print.c:
18039 Include float.h unconditionally.
18040 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
18041 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
18042 * regex.c: Likewise for stddef.h, string.h.
18043 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
18044 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
18045 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
18046 (STDC_HEADERS): Remove obsolete defines.
18047 * sysdep.c: Include limits.h unconditionally.
18049 Assume support for memcmp, memcpy, memmove, memset.
18050 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
18051 * regex.c (memcmp, memcpy):
18052 Remove; we assume C89 now.
18054 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
18055 (__malloc_safe_bcopy): Remove; no longer needed.
18057 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
18058 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
18059 well either way, and we prefer signed to unsigned.
18061 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
18063 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
18064 closes the connection while we're reading (bug#9182).
18066 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
18068 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
18069 are specified (Bug#9168).
18071 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
18073 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
18074 Found by GCC static checking and --with-wide-int on a 32-bit host.
18076 2011-07-25 Eli Zaretskii <eliz@gnu.org>
18078 * xdisp.c (compute_display_string_pos): Fix logic of caching
18079 previous display string position. Initialize cached_prev_pos to
18080 -1. Fixes slow-down at the beginning of a buffer.
18082 2011-07-24 Eli Zaretskii <eliz@gnu.org>
18084 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
18085 for attrs[LFACE_FONTSET_INDEX].
18087 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
18089 * xml.c (parse_region): Remove unused local
18090 that was recently introduced.
18092 2011-07-23 Eli Zaretskii <eliz@gnu.org>
18094 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
18095 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
18097 * xdisp.c (move_it_in_display_line_to): Record the best matching
18098 position for TO_CHARPOS while scanning the line, and restore it on
18099 exit if none of the characters scanned was an exact match.
18100 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
18101 when exact match is impossible due to invisible text, and the
18102 lines are truncated.
18104 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
18106 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
18109 2011-07-22 Eli Zaretskii <eliz@gnu.org>
18111 Fix a significant slow-down of cursor motion with C-n, C-p,
18112 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
18113 auto-repeat under bidi redisplay in fontified buffers.
18114 * xdisp.c (compute_stop_pos_backwards): New function.
18115 (next_element_from_buffer): Call compute_stop_pos_backwards to
18116 find a suitable prev_stop when we find ourselves before
18118 (reseat): Don't look for prev_stop, as that could mean a very long
18120 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
18121 <cached_disp_overlay_modiff>: Cache for last found display string
18123 (compute_display_string_pos): Return the cached position if asked
18124 about the same buffer in the same area of character positions, and
18125 the buffer wasn't changed since the time the display string
18126 position was cached.
18128 2011-07-22 Eli Zaretskii <eliz@gnu.org>
18130 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
18131 is an integer, which is important for empty lines. (Bug#9149)
18133 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
18135 * frame.c (Fmodify_frame_parameters): In tty case, update the
18136 default face if necessary (Bug#4238).
18138 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
18140 * editfns.c (Fstring_to_char): No need to explain what a character
18141 is in the docstring (Bug#6576).
18143 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
18145 * xml.c (parse_region): Make sure we always return a tree.
18147 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
18149 * xml.c (parse_region): If a document contains only comments,
18152 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
18154 * xml.c (make_dom): Return comments, too.
18156 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
18159 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
18160 and the surrounding thread.
18161 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
18162 rather than fgets, and retry after EINTR. Otherwise, 'emacs
18163 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
18165 * s/openbsd.h (BROKEN_SIGIO): Define.
18166 * unexelf.c (unexec) [__OpenBSD__]:
18167 Don't update the .mdebug section of the Alpha COFF symbol table.
18169 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
18171 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
18174 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
18176 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
18177 This fixes some race conditions on the permissions of any newly
18180 * alloc.c (valid_pointer_p): Use pipe, not open.
18181 This fixes some permissions issues when debugging.
18183 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
18184 If fchown fails to set both uid and gid, try to set just gid,
18185 as that is sometimes allowed. Adjust the file's mode to eliminate
18186 setuid or setgid bits that are inappropriate if fchown fails.
18188 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
18190 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
18191 to compare Lisp_Objects.
18192 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
18193 global_gnutls_log_level, don't mistake it for a Lisp_Object.
18194 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
18196 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
18198 * lread.c (read_integer): Unread even EOF character.
18199 (read1): Likewise. Properly record start position of symbol.
18201 * lread.c (read1): Read `#:' as empty uninterned symbol if no
18202 symbol character follows.
18204 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
18206 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
18207 This works around a problem with the previous change to Fcopy_file.
18208 Recent glibc declares fchown with __attribute__((warn_unused_result)),
18209 and without this change, GCC might complain about discarding
18210 fchown's return value.
18212 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
18214 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
18216 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
18218 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
18220 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
18222 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
18223 it's used from the C level.
18225 * process.c: Use the same condition for POLL_FOR_INPUT in both
18226 keyboard.c and process.c (bug#1858).
18228 2011-07-09 Lawrence Mitchell <wence@gmx.li>
18230 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
18231 (Fgnutls_boot): Use it.
18233 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
18235 * doc.c (Fsubstitute_command_keys): Revert last change.
18237 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
18239 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
18240 quotes the next character, and doesn't affect other longer
18241 sequences (bug#8935).
18243 * lread.c (syms_of_lread): Clarify that is isn't only
18244 `eval-buffer' and `eval-defun' that's affected by
18245 `lexical-binding' (bug#8460).
18247 2011-07-15 Eli Zaretskii <eliz@gnu.org>
18249 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
18250 bidi redisplay when a line includes both an image and is truncated.
18252 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
18254 Fix minor problems found by static checking.
18255 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
18256 (elsz): Now a signed constant, not a size_t var. We prefer signed
18257 types to unsigned, to avoid integer comparison confusion. Without
18258 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
18259 "cannot optimize loop, the loop counter may overflow", a symptom
18261 * indent.c (Fvertical_motion): Mark locals as initialized.
18262 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
18264 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18266 * search.c (Fre_search_backward): Mention `case-fold-search' in
18267 all the re_search_* functions (bug#8138).
18269 * keyboard.c (Fopen_dribble_file): Document when the file is
18272 2011-07-14 Eli Zaretskii <eliz@gnu.org>
18274 * bidi.c (bidi_dump_cached_states): Fix format of displaying
18277 Support bidi reordering of display and overlay strings.
18278 * xdisp.c (compute_display_string_pos)
18279 (compute_display_string_end): Accept additional argument STRING.
18280 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
18281 (reseat_to_string): Initialize bidi_it->string.s and
18282 bidi_it->string.schars.
18283 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
18284 NULL (avoids a crash in bidi_paragraph_init).
18285 Initialize itb.string.lstring.
18286 (init_iterator): Call bidi_init_it only of a valid
18287 buffer position was specified. Initialize paragraph_embedding to
18289 (reseat_to_string): Initialize the bidi iterator.
18290 (display_string): If we need to ignore text properties of
18291 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
18292 original value of -1 will not work with bidi.)
18293 (compute_display_string_pos): First arg is now struct
18294 `text_pos *'; all callers changed. Support display properties on
18296 (compute_display_string_end): Support display properties on Lisp
18298 (init_iterator, reseat_1, reseat_to_string): Initialize the
18299 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
18300 when iterating on a string not from display properties).
18301 (compute_display_string_pos, compute_display_string_end):
18302 Fix calculation of the object to scan. Fixes an error when using
18304 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
18305 base_level_stop; instead, set base_level_stop to BEGV.
18306 Fixes crashes in vertical-motion.
18307 (next_element_from_buffer): Improve commentary for when
18308 the iterator is before prev_stop.
18309 (init_iterator): Initialize bidi_p from the default value of
18310 bidi-display-reordering, not from buffer-local value. Use the
18311 buffer-local value only if initializing for buffer iteration.
18312 (handle_invisible_prop): Support invisible properties on strings
18313 that are being bidi-reordered.
18314 (set_iterator_to_next): Support bidi reordering of C strings and
18316 (next_element_from_string): Support bidi reordering of Lisp
18318 (handle_stop_backwards): Support Lisp strings as well.
18319 (display_string): Support display of R2L glyph rows.
18320 Use IT_STRING_CHARPOS when displaying from a Lisp string.
18321 (init_iterator): Don't initialize it->bidi_p for strings
18323 (reseat_to_string): Initialize it->bidi_p for strings here.
18324 (next_element_from_string, next_element_from_c_string)
18325 (next_element_from_buffer): Add xassert's for correspondence
18326 between IT's object being iterated and it->bidi_it.string
18328 (face_before_or_after_it_pos): Support bidi iteration.
18329 (next_element_from_c_string): Handle the case of the first string
18330 character that is not the first one in the visual order.
18331 (get_visually_first_element): New function, refactored from common
18332 parts of next_element_from_buffer, next_element_from_string, and
18333 next_element_from_c_string.
18334 (tool_bar_lines_needed, redisplay_tool_bar)
18335 (display_menu_bar): Force left-to-right direction. Add a FIXME
18336 comment for making that be controlled by a user option.
18337 (push_it, pop_it): Save and restore the state of the
18338 bidi iterator. Save and restore the bidi_p flag.
18339 (pop_it): Iterate out of display property for string iteration as
18341 (iterate_out_of_display_property): Support iteration over strings.
18342 (handle_single_display_spec): Set up it->bidi_it for iteration
18343 over a display string, and call bidi_init_it.
18344 (handle_single_display_spec, next_overlay_string)
18345 (get_overlay_strings_1, push_display_prop): Set up the bidi
18346 iterator for displaying display or overlay strings.
18347 (forward_to_next_line_start): Don't use the shortcut if
18349 (back_to_previous_visible_line_start): If handle_display_prop
18350 pushed the iterator stack, restore the internal state of the bidi
18351 iterator by calling bidi_pop_it same number of times.
18352 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
18353 and we are bidi-iterating, don't decrement the iterator position;
18354 instead, set the first_elt flag in the bidi iterator, to produce
18356 (reseat_1): Remove redundant setting of string_from_display_prop_p.
18357 (push_display_prop): xassert that we are iterating a buffer.
18358 (push_it, pop_it): Save and restore paragraph_embedding member.
18359 (handle_single_display_spec, next_overlay_string)
18360 (get_overlay_strings_1, reseat_1, reseat_to_string)
18361 (push_display_prop): Set up the `unibyte' member of bidi_it.string
18362 correctly. Don't assume unibyte strings are not bidi-reordered.
18363 (compute_display_string_pos)
18364 (compute_display_string_end): Fix handling the case of C string.
18365 (push_it, pop_it): Save and restore from_disp_prop_p.
18366 (handle_single_display_spec, push_display_prop): Set the
18367 from_disp_prop_p flag.
18368 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
18369 (pop_it): Call iterate_out_of_display_property only if we are
18370 popping after iteration over a string that came from a display
18371 property. Fix a typo in popping stretch info. Add an assertion
18372 for verifying that the iterator position is in sync with the bidi
18374 (handle_single_display_spec, get_overlay_strings_1)
18375 (push_display_prop): Fix initialization of paragraph direction for
18376 string when that of the parent object is not yet determined.
18377 (reseat_1): Call bidi_init_it to resync the bidi
18378 iterator with IT's position. (Bug#7616)
18379 (find_row_edges): If ROW->start.pos gives position
18380 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
18381 (handle_stop, back_to_previous_visible_line_start, reseat_1):
18382 Reset the from_disp_prop_p flag.
18383 (SAVE_IT, RESTORE_IT): New macros.
18384 (pos_visible_p, face_before_or_after_it_pos)
18385 (back_to_previous_visible_line_start)
18386 (move_it_in_display_line_to, move_it_in_display_line)
18387 (move_it_to, move_it_vertically_backward, move_it_by_lines)
18388 (try_scrolling, redisplay_window, display_line): Use them when
18389 saving a temporary copy of the iterator and restoring it back.
18390 (back_to_previous_visible_line_start, reseat_1)
18391 (init_iterator): Empty the bidi cache "stack".
18392 (move_it_in_display_line_to): If iterator ended up at
18393 EOL, but we never saw any buffer positions smaller than
18394 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
18395 motion in bidi-reordered lines.
18396 (move_it_in_display_line_to): Record prev_method and prev_pos
18397 immediately before the call to set_iterator_to_next. Fixes cursor
18398 motion in bidi-reordered lines with stretch glyphs and strings
18399 displayed in margins. (Bug#8133) (Bug#8867)
18400 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
18402 (pos_visible_p): Support positions in bidi-reordered lines.
18403 Save and restore bidi cache.
18405 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
18406 (bidi_paragraph_info): Delete unused struct.
18407 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
18408 (bidi_cache_start): New variable.
18409 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
18411 (bidi_cache_fetch_state, bidi_cache_search)
18412 (bidi_cache_find_level_change, bidi_cache_iterator_state)
18413 (bidi_cache_find, bidi_peek_at_next_level)
18414 (bidi_level_of_next_char, bidi_find_other_level_edge)
18415 (bidi_move_to_visually_next): Compare cache index with
18416 bidi_cache_start rather than with zero.
18417 (bidi_fetch_char): Accept new argument STRING; all callers
18418 changed. Support iteration over a string. Support strings with
18419 display properties. Support unibyte strings. Fix the type of
18420 `len' according to what STRING_CHAR_AND_LENGTH expects.
18421 (bidi_paragraph_init, bidi_resolve_explicit_1)
18422 (bidi_resolve_explicit, bidi_resolve_weak)
18423 (bidi_level_of_next_char, bidi_move_to_visually_next):
18424 Support iteration over a string.
18425 (bidi_set_sor_type, bidi_resolve_explicit_1)
18426 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
18427 can now be zero (for strings); special values 0 and -1 were
18428 changed to -1 and -2, respectively.
18429 (bidi_char_at_pos): New function.
18430 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
18431 Call it instead of FETCH_MULTIBYTE_CHAR.
18432 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
18433 initialized to valid values.
18434 (bidi_init_it): Don't initialize charpos and bytepos with invalid
18436 (bidi_level_of_next_char): Allow the sentinel "position" to pass
18437 the test for valid cached positions. Fix the logic for looking up
18438 the sentinel state in the cache. GCPRO the Lisp string we are
18440 (bidi_push_it, bidi_pop_it): New functions.
18441 (bidi_initialize): Initialize the bidi cache start stack pointer.
18442 (bidi_cache_ensure_space): New function, refactored from part of
18443 bidi_cache_iterator_state. Don't assume the required size is just
18444 one BIDI_CACHE_CHUNK away.
18445 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
18446 (bidi_count_bytes, bidi_char_at_pos): New functions.
18447 (bidi_cache_search): Don't assume bidi_cache_last_idx is
18448 always valid if bidi_cache_idx is valid.
18449 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
18450 is valid if it's going to be used.
18451 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
18452 (bidi_cache_fetch_state, bidi_cache_search)
18453 (bidi_cache_find_level_change, bidi_cache_ensure_space)
18454 (bidi_cache_iterator_state, bidi_cache_find)
18455 (bidi_find_other_level_edge, bidi_cache_start_stack):
18456 All variables related to cache indices are now EMACS_INT.
18458 * dispextern.h (struct bidi_string_data): New structure.
18459 (struct bidi_it): New member `string'. Make flag members be 1-bit
18460 fields, and put them last in the struct.
18461 (compute_display_string_pos, compute_display_string_end):
18463 (bidi_push_it, bidi_pop_it): Add prototypes.
18464 (struct iterator_stack_entry): New members bidi_p,
18465 paragraph_embedding, and from_disp_prop_p.
18466 (struct it): Member bidi_p is now a bit field 1 bit wide.
18467 (bidi_shelve_cache, bidi_unshelve_cache):
18468 Declare prototypes.
18470 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
18471 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
18472 and vector-like objects.
18474 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
18475 cache around display iteration.
18477 * window.c (Fwindow_end, window_scroll_pixel_based)
18478 (displayed_window_lines, Frecenter): Save and restore the bidi
18479 cache around display iteration.
18481 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18483 * editfns.c (Fdelete_region): Clarify the use of the named
18484 parameters (bug#6788).
18486 2011-07-14 Martin Rudalics <rudalics@gmx.at>
18488 * indent.c (Fvertical_motion): Set and restore w->pointm when
18489 saving and restoring the window's buffer (Bug#9006).
18491 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
18493 * editfns.c (Fstring_to_char): Clarify just what is returned
18494 (bug#6576). Text by Eli Zaretskii.
18496 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
18498 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
18500 2011-07-13 Eli Zaretskii <eliz@gnu.org>
18502 * buffer.c (mmap_find): Fix a typo.
18504 2011-07-13 Johan Bockgård <bojohan@gnu.org>
18506 Fix execution of x selection hooks.
18507 * xselect.c (Qx_lost_selection_functions)
18508 (Qx_sent_selection_functions): New vars.
18509 (syms_of_xselect): DEFSYM them.
18510 (x_handle_selection_request): Pass Qx_sent_selection_functions
18511 rather than Vx_sent_selection_functions to Frun_hook_with_args.
18512 (x_handle_selection_clear,x_clear_frame_selections):
18513 Pass Qx_lost_selection_functions rather than
18514 Vx_lost_selection_functions to Frun_hook_with_args.
18516 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
18518 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
18519 The old code sometimes used this field without initializing it.
18521 * alloc.c (gc_sweep): Don't read past end of array.
18522 In theory, the old code could also have corrupted Emacs internals,
18523 though it'd be very unlikely.
18525 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
18527 * character.c (Fcharacterp): Don't advertise optional ignored
18528 argument. (Bug#4026)
18530 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
18532 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
18535 * window.c (Fset_window_start): Doc fix (bug#4199).
18536 (Fset_window_hscroll): Ditto.
18538 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
18540 Fix minor new problems caught by GCC 4.6.1.
18541 * term.c (init_tty): Remove unused local.
18542 * xsettings.c (store_monospaced_changed): Define this function only
18543 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
18544 not used otherwise.
18546 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
18548 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
18550 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
18552 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
18553 are the mini-buffer and the echo area (bug#3320).
18555 * term.c (init_tty): Remove support for supdup, c10 and perq
18556 terminals, which are no longer supported (bug#1482).
18558 2011-07-10 Johan Bockgård <bojohan@gnu.org>
18560 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
18562 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
18564 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
18565 for non-popups (Bug#3642).
18567 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
18569 * alloc.c (reset_malloc_hooks): Protoize.
18570 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
18571 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
18572 * cm.c (losecursor): Likewise.
18573 * data.c (fmod): Likewise.
18574 * dispnew.c (swap_glyphs_in_rows): Likewise.
18575 * emacs.c (memory_warning_signal): Likewise.
18576 * floatfns.c (float_error): Likewise.
18577 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
18578 (otf_open, font_otf_capability, generate_otf_features)
18579 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
18581 * image.c (pbm_read_file): Likewise.
18582 * indent.c (string_display_width): Likewise.
18583 * intervals.c (check_for_interval, search_for_interval)
18584 (inc_interval_count, count_intervals, root_interval)
18585 (adjust_intervals_for_insertion, make_new_interval): Likewise.
18586 * lread.c (defalias): Likewise.
18587 * ralloc.c (r_alloc_check): Likewise.
18588 * regex.c (set_image_of_range_1, set_image_of_range)
18589 (regex_grow_registers): Likewise.
18590 * sysdep.c (strerror): Likewise.
18591 * termcap.c (valid_filename_p, tprint, main): Likewise.
18592 * tparam.c (main): Likewise.
18593 * unexhp9k800.c (run_time_remap, save_data_space)
18594 (update_file_ptrs, read_header, write_header, calculate_checksum)
18595 (copy_file, copy_rest, display_header): Likewise.
18596 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
18598 * xdisp.c (check_it): Likewise.
18599 * xfaces.c (register_color, unregister_color, unregister_colors):
18601 * xfns.c (print_fontset_result): Likewise.
18602 * xrdb.c (member, fatal, main): Likewise.
18604 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
18606 Fix minor problems found by static checking (Bug#9031).
18607 * chartab.c (char_table_set_range, map_sub_char_table):
18608 Remove unused locals.
18609 (uniprop_table): Now static.
18610 * composite.c (_work_char): Remove unused static var.
18612 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
18614 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
18616 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
18618 * gtkutil.c (qttip_cb): Remove code without function.
18620 2011-07-09 Eli Zaretskii <eliz@gnu.org>
18622 * w32.c (pthread_sigmask): New stub.
18624 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
18626 Use pthread_sigmask, not sigprocmask (Bug#9010).
18627 sigprocmask is portable only for single-threaded applications, and
18628 Emacs can be multi-threaded when it uses GTK.
18629 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
18631 * callproc.c (Fcall_process):
18632 * process.c (create_process):
18633 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
18634 Use pthread_sigmask, not sigprocmask.
18636 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18638 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
18639 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
18642 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18644 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
18645 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
18646 (xg_hide_tooltip): Fix comment.
18648 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
18649 in registerServicesMenuSendTypes.
18650 (validRequestorForSendType): Don't check ns_return_types.
18652 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
18655 2011-07-08 Jason Rumney <jasonr@gnu.org>
18657 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
18658 SH_SHOW for hidden windows (Bug#5482).
18660 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
18661 frame struct members of non-existent frames (Bug#6284).
18663 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18665 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
18666 variable firstTime not needed on OSX >= 10.6.
18667 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
18668 >= 10.5. Use setKnobProportion, setDoubleValue.
18670 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
18671 (MAC_OS_X_VERSION_10_5): Define if not defined.
18672 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
18673 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
18674 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
18676 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
18677 cString and lossyCString on OSX >= 10.4.
18679 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
18680 sizeToFit on OSX >= 10.2.
18682 * nsimage.m (allocInitFromFile): Don't use deprecated method
18683 bestRepresentationForDevice on OSX >= 10.6.
18685 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
18688 * emacs.c: Declare unexec_init_emacs_zone.
18690 * nsgui.h: Fix compiler warning about gnulib redefining verify.
18692 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
18694 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
18695 on svcsMenu (Bug#8842).
18697 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
18699 (Fns_list_services): Just return Qnil on 10.6, code not working there.
18701 * nsterm.m (QUTF8_STRING): Declare.
18702 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
18703 (validRequestorForSendType): Return type is (id).
18704 Change indexOfObjectIdenticalTo to indexOfObject.
18705 Check if we have local selection before returning self (Bug#8842).
18706 (writeSelectionToPasteboard): Put local selection into paste board
18707 if we have a local selection (Bug#8842).
18708 (syms_of_nsterm): DEFSYM QUTF8_STRING.
18710 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
18711 (ns_get_local_selection): Declare.
18713 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
18715 * keymap.c (describe_map_tree): Don't insert a double newline at
18716 the end of the buffer (bug#1169) and return whether we inserted
18719 * callint.c (Fcall_interactively): Change "reading args" to
18720 "providing args" to try to clarify what it does (bug#1010).
18722 2011-07-07 Kenichi Handa <handa@m17n.org>
18724 * composite.c (composition_compute_stop_pos): Ignore a static
18725 composition starting before CHARPOS (Bug#8915).
18727 * xdisp.c (handle_composition_prop): Likewise.
18729 2011-07-07 Eli Zaretskii <eliz@gnu.org>
18731 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
18734 2011-07-07 Kenichi Handa <handa@m17n.org>
18736 * character.h (unicode_category_t): New enum type.
18738 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
18739 (Qchar_code_property_table): New variable.
18740 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
18741 (UNIPROP_COMPRESSED_FORM_P): New macros.
18742 (char_table_ascii): Uncompress the compressed values.
18743 (sub_char_table_ref): New arg is_uniprop. Callers changed.
18744 Uncompress the compressed values.
18745 (sub_char_table_ref_and_range): Likewise.
18746 (char_table_ref_and_range): Uncompress the compressed values.
18747 (sub_char_table_set): New arg is_uniprop. Callers changed.
18748 Uncompress the compressed values.
18749 (sub_char_table_set_range): Args changed. Callers changed.
18750 (char_table_set_range): Adjuted for the above change.
18751 (map_sub_char_table): Delete args default_val and parent. Add arg
18752 top. Give decoded values to a Lisp function.
18753 (map_char_table): Adjust for the above change. Give decoded
18754 values to a Lisp function. Gcpro more variables.
18755 (uniprop_table_uncompress)
18756 (uniprop_decode_value_run_length): New functions.
18757 (uniprop_decoder, uniprop_decoder_count): New variables.
18758 (uniprop_get_decoder, uniprop_encode_value_character)
18759 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
18761 (uniprop_encoder, uniprop_encoder_count): New variables.
18762 (uniprop_get_encoder, uniprop_table)
18763 (Funicode_property_table_internal, Fget_unicode_property_internal)
18764 (Fput_unicode_property_internal): New functions.
18765 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
18766 Sunicode_property_table_internal, Sget_unicode_property_internal,
18767 and Sput_unicode_property_internal. Defvar_lisp
18768 char-code-property-alist.
18770 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
18771 Vunicode_category_table.
18773 * font.c (font_range): Adjust for the change of
18774 Vunicode_category_table.
18776 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
18778 * m/iris4d.h: Remove file, move contents ...
18779 * s/irix6-5.h: ... here.
18781 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
18783 Remove unportable assumption about struct layout (Bug#8884).
18784 * alloc.c (mark_buffer):
18785 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
18786 (clone_per_buffer_values): Don't assume that
18787 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
18788 This isn't true in general, and it's particularly not true
18789 if Emacs is configured with --with-wide-int.
18790 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
18791 New macros, used in the buffer.c change.
18793 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
18795 * xsettings.c: Use both GConf and GSettings if both are available.
18796 (store_config_changed_event): Add comment.
18797 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
18798 (store_tool_bar_style_changed): New functions.
18799 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
18800 (struct xsettings): Move font inside HAVE_XFT.
18801 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
18802 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
18803 Move inside HAVE_XFT.
18804 (something_changed_gsettingsCB): Rename from something_changedCB.
18805 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
18807 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
18808 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
18809 (something_changed_gconfCB): Rename from something_changedCB.
18810 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
18811 (parse_settings): Move check for font inside HAVE_XFT.
18812 (read_settings, apply_xft_settings): Add comment.
18813 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
18814 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
18815 call store_font_name_changed.
18816 (xft_settings_event): Add comment.
18817 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
18818 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
18819 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
18820 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
18821 (xsettings_initialize): Call init_gsettings last.
18822 (xsettings_get_system_font, xsettings_get_system_normal_font):
18825 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
18827 Random fixes. E.g., (random) never returned negative values.
18828 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
18829 subseconds part to the entropy, as that's a bit more random.
18830 Prefer signed to unsigned, since the signedness doesn't matter and
18831 in general we prefer signed. When given a limit, use a
18832 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
18833 latter isn't right if USE_2_TAGS_FOR_INTS.
18834 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
18835 not 0..VALMASK. Don't discard "excess" bits that random () returns.
18837 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
18839 * textprop.c (text_property_stickiness):
18840 Obey Vtext_property_default_nonsticky.
18841 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
18842 * w32fns.c (syms_of_w32fns):
18843 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
18845 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18847 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
18848 This is more efficient than Ffile_directory_p and avoids a minor race.
18850 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
18852 * buffer.c (Foverlay_put): Say what the return value is
18855 * fileio.c (barf_or_query_if_file_exists): Check first if the file
18856 is a directory before asking whether to use the file name
18858 (barf_or_query_if_file_exists): Make the "File is a directory"
18859 error be more correct.
18861 * fns.c (Frequire): Remove the mention of the .gz files, since
18862 that's installation-specific, but keep the mention of
18863 `get-load-suffixes'.
18865 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18867 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
18868 Report string overflow if the output is too long.
18870 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
18872 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
18873 (syms_of_gnutls): Remove duplicate DEFSYM for
18874 Qgnutls_bootprop_verify_hostname_error, an error for
18875 Qgnutls_bootprop_verify_error (which is no longer used).
18877 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
18878 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
18879 Also (re)move comments that are misplaced or no longer relevant.
18881 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18883 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
18885 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
18887 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
18888 and background color parameters if they have been changed.
18890 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18892 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
18894 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
18896 * xsettings.c (SYSTEM_FONT): Define only when used.
18897 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
18899 * keymap.c (access_keymap_1): Now static.
18901 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
18903 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
18904 leave any prefix arg for the up event (Bug#1586).
18906 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
18908 * lread.c (syms_of_lread): Mention single symbols defined by
18909 `defvar' or `defconst' (bug#7154).
18911 * fns.c (Frequire): Mention .el.gz files (bug#7314).
18912 (Frequire): Mention get-load-suffixes.
18914 2011-07-02 Martin Rudalics <rudalics@gmx.at>
18916 * window.h (window): Remove clone_number slot.
18917 * window.c (Fwindow_clone_number, Fset_window_clone_number):
18919 (make_parent_window, make_window, saved_window)
18920 (Fset_window_configuration, save_window_save): Don't deal with
18922 * buffer.c (Qclone_number): Remove declaration.
18923 (sort_overlays, overlay_strings): Don't deal with clone numbers.
18925 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
18927 Add multiple inheritance to keymaps.
18928 * keymap.c (Fmake_composed_keymap): New function.
18929 (Fset_keymap_parent): Simplify.
18930 (fix_submap_inheritance): Remove.
18931 (access_keymap_1): New function extracted from access_keymap to handle
18932 embedded parents and handle lists of maps.
18933 (access_keymap): Use it.
18934 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
18935 (Fcopy_keymap): Handle embedded parents.
18936 (Fcommand_remapping, define_as_prefix): Simplify.
18937 (Fkey_binding): Simplify.
18938 (syms_of_keymap): Move minibuffer-local-completion-map,
18939 minibuffer-local-filename-completion-map,
18940 minibuffer-local-must-match-map, and
18941 minibuffer-local-filename-must-match-map to Elisp.
18942 (syms_of_keymap): Defsubr make-composed-keymap.
18943 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
18944 (parse_menu_item): Trivial simplification.
18946 2011-07-01 Glenn Morris <rgm@gnu.org>
18948 * Makefile.in (SETTINGS_LIBS): Fix typo.
18950 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
18952 * coding.c (Fencode_coding_string): Record the last coding system
18953 used, as the function doc string says (bug#8738).
18955 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
18957 * xsettings.c (store_monospaced_changed): Take new font as arg and
18958 check for change against current_mono_font.
18959 (EMACS_TYPE_SETTINGS): Remove this and related defines.
18960 (emacs_settings_constructor, emacs_settings_get_property)
18961 (emacs_settings_set_property, emacs_settings_class_init)
18962 (emacs_settings_init, gsettings_obj): Remove.
18963 (something_changedCB): New function for HAVE_GSETTINGS.
18964 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
18965 with value as argument.
18966 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
18967 g_settings_new (Bug#8967). Do not create gsettings_obj.
18968 Remove calls to g_settings_bind. Connect something_changedCB to
18971 * xgselect.c: Add defined (HAVE_GSETTINGS).
18972 (xgselect_initialize): Ditto.
18974 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
18975 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
18978 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
18980 * eval.c (struct backtrace): Simplify and port the data structure.
18981 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
18982 signed bit field, as this assumption is not portable and it makes
18983 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
18984 "char debug_on_exit : 1" as this is not portable either; instead,
18985 use the portable "unsigned int debug_on_exit : 1". Remove unused
18986 member evalargs. Remove obsolete comments about cc bombing out.
18988 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
18990 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
18991 Let HAVE_GSETTINGS override HAVE_GCONF.
18992 (store_monospaced_changed): New function.
18993 (EMACS_SETTINGS): A new type derived from GObject to handle
18994 GSettings notifications.
18995 (emacs_settings_constructor, emacs_settings_get_property)
18996 (emacs_settings_set_property, emacs_settings_class_init):
18998 (gsettings_client, gsettings_obj): New variables.
18999 (GSETTINGS_SCHEMA): New define.
19000 (something_changedCB): Call store_monospaced_changed.
19001 (init_gsettings): New function.
19002 (xsettings_initialize): Call init_gsettings.
19003 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
19006 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
19009 2011-06-29 Martin Rudalics <rudalics@gmx.at>
19011 * window.c (resize_root_window, grow_mini_window)
19012 (shrink_mini_window): Rename Qresize_root_window to
19013 Qwindow_resize_root_window and Qresize_root_window_vertically to
19014 Qwindow_resize_root_window_vertically.
19016 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
19018 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
19020 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
19022 * makefile.w32-in: Redesign dependencies so they reflect more
19023 clearly which files are directly included by each source file,
19024 and not through other includes.
19026 2011-06-27 Martin Rudalics <rudalics@gmx.at>
19028 * buffer.c (Qclone_number): Declare static and DEFSYM it.
19029 (sort_overlays, overlay_strings): When an overlay's clone number
19030 matches the window's clone number process the overlay even if
19031 the overlay's window property doesn't match the current window.
19033 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
19034 (Fwindow_hchild): Rename to Fwindow_left_child.
19035 (Fwindow_next): Rename to Fwindow_next_sibling.
19036 (Fwindow_prev): Rename to Fwindow_prev_sibling.
19037 (resize_window_check): Rename to window_resize_check.
19038 (resize_window_apply): Rename to window_resize_apply.
19039 (Fresize_window_apply): Rename to Fwindow_resize_apply.
19040 (Fdelete_other_windows_internal, resize_frame_windows)
19041 (Fsplit_window_internal, Fdelete_window_internal)
19042 (grow_mini_window, shrink_mini_window)
19043 (Fresize_mini_window_internal): Fix callers accordingly.
19045 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
19047 * emacsgtkfixed.h: State that this is only used with Gtk+3.
19048 (emacs_fixed_set_min_size): Remove.
19049 (emacs_fixed_new): Take frame as argument.
19051 * emacsgtkfixed.c: State that this is only used with Gtk+3.
19052 (_EmacsFixedPrivate): Remove minwidth/height.
19053 Add struct frame *f.
19054 (emacs_fixed_init): Initialize priv->f.
19055 (get_parent_class, emacs_fixed_set_min_size): Remove.
19056 (emacs_fixed_new): Set priv->f to argument.
19057 (emacs_fixed_get_preferred_width)
19058 (emacs_fixed_get_preferred_height): Use min_width/height from
19059 frames size_hint to set minimum and natural (Bug#8919).
19060 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
19061 and use min_width/height from frames size_hint to set
19062 min_width/height (Bug#8919).
19064 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
19065 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
19068 2011-06-26 Eli Zaretskii <eliz@gnu.org>
19070 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
19071 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
19074 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
19076 * process.c (wait_reading_process_output): Bypass select if
19077 waiting for a cell while ignoring keyboard input, and input is
19078 pending. Suggested by Jan Djärv (Bug#8869).
19080 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
19082 Use gnulib's dup2 module instead of rolling our own.
19083 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
19085 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19087 * dispnew.c (scrolling_window): Before scrolling, turn off a
19088 mouse-highlight in the window being scrolled.
19090 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
19092 Move DEFSYM to lisp.h and use everywhere.
19094 * character.h (DEFSYM): Move declaration...
19095 * lisp.h (DEFSYM): ...here.
19101 * w32select.c: Don't include character.h.
19103 * alloc.c (syms_of_alloc):
19104 * buffer.c (syms_of_buffer):
19105 * bytecode.c (syms_of_bytecode):
19106 * callint.c (syms_of_callint):
19107 * casefiddle.c (syms_of_casefiddle):
19108 * casetab.c (init_casetab_once):
19109 * category.c (init_category_once, syms_of_category):
19110 * ccl.c (syms_of_ccl):
19111 * cmds.c (syms_of_cmds):
19112 * composite.c (syms_of_composite):
19113 * dbusbind.c (syms_of_dbusbind):
19114 * dired.c (syms_of_dired):
19115 * dispnew.c (syms_of_display):
19116 * doc.c (syms_of_doc):
19117 * editfns.c (syms_of_editfns):
19118 * emacs.c (syms_of_emacs):
19119 * eval.c (syms_of_eval):
19120 * fileio.c (syms_of_fileio):
19121 * fns.c (syms_of_fns):
19122 * frame.c (syms_of_frame):
19123 * fringe.c (syms_of_fringe):
19124 * insdel.c (syms_of_insdel):
19125 * keymap.c (syms_of_keymap):
19126 * lread.c (init_obarray, syms_of_lread):
19127 * macros.c (syms_of_macros):
19128 * msdos.c (syms_of_msdos):
19129 * print.c (syms_of_print):
19130 * process.c (syms_of_process):
19131 * search.c (syms_of_search):
19132 * sound.c (syms_of_sound):
19133 * syntax.c (init_syntax_once, syms_of_syntax):
19134 * terminal.c (syms_of_terminal):
19135 * textprop.c (syms_of_textprop):
19136 * undo.c (syms_of_undo):
19137 * w32.c (globals_of_w32):
19138 * window.c (syms_of_window):
19139 * xdisp.c (syms_of_xdisp):
19140 * xfaces.c (syms_of_xfaces):
19141 * xfns.c (syms_of_xfns):
19142 * xmenu.c (syms_of_xmenu):
19143 * xsettings.c (syms_of_xsettings):
19144 * xterm.c (syms_of_xterm): Use DEFSYM.
19146 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
19148 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
19150 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
19152 Integer and buffer overflow fixes (Bug#8873).
19154 * print.c (printchar, strout): Check for string overflow.
19155 (PRINTPREPARE, printchar, strout):
19156 Don't set size unless allocation succeeds.
19158 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
19159 for sizes. Check for string overflow more accurately.
19160 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
19162 * macros.c: Integer and buffer overflow fixes.
19163 * keyboard.h (struct keyboard.kbd_macro_bufsize):
19164 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
19165 Use ptrdiff_t, not int, for sizes.
19166 Don't increment bufsize until after realloc succeeds.
19167 Check for size-calculation overflow.
19168 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
19170 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
19172 * lread.c: Integer overflow fixes.
19173 (read_integer): Radix is now EMACS_INT, not int,
19174 to improve quality of diagnostics for out-of-range radices.
19175 Calculate buffer size correctly for out-of-range radices.
19176 (read1): Check for integer overflow in radices, and in
19177 read-circle numbers.
19178 (read_escape): Avoid int overflow.
19179 (Fload, openp, read_buffer_size, read1)
19180 (substitute_object_recurse, read_vector, read_list, map_obarray):
19181 Use ptrdiff_t, not int, for sizes.
19182 (read1): Use EMACS_INT, not int, for sizes.
19183 Check for size overflow.
19185 * image.c (cache_image): Check for size arithmetic overflow.
19187 * lread.c: Integer overflow issues.
19188 (saved_doc_string_size, saved_doc_string_length)
19189 (prev_saved_doc_string_size, prev_saved_doc_string_length):
19190 Now ptrdiff_t, not int.
19191 (read1): Don't assume doc string length fits in int. Check for
19192 out-of-range doc string lengths.
19193 (read_list): Don't assume file position fits in int.
19194 (read_escape): Check for hex character overflow.
19196 2011-06-22 Leo Liu <sdl.web@gmail.com>
19198 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
19199 Move to minibuffer.el.
19201 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19203 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
19204 The following patches are for when GLYPH_DEBUG && !XASSERT.
19205 * dispextern.h (trace_redisplay_p, dump_glyph_string):
19206 * dispnew.c (flush_stdout):
19207 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
19208 Mark as externally visible.
19209 * dispnew.c (check_window_matrix_pointers): Now static.
19210 * dispnew.c (window_to_frame_vpos):
19211 * xfns.c (unwind_create_frame):
19212 * xterm.c (x_check_font): Remove unused local.
19213 * scroll.c (CHECK_BOUNDS):
19214 * xfaces.c (cache_fache): Rename local to avoid shadowing.
19215 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
19216 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
19217 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
19218 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
19220 (debug_method_add): Use va_list and vsprintf rather than relying
19221 on undefined behavior with wrong number of arguments.
19222 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
19223 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
19224 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
19225 since we're not interested in debugging glyphs with old libraries.
19226 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
19227 GCC 4.6.0's static checking.
19229 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19231 Integer overflow and signedness fixes (Bug#8873).
19232 A few related buffer overrun fixes, too.
19234 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
19236 * dispextern.h (struct face.stipple):
19237 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
19238 (x_bitmap_mask, x_allocate_bitmap_record)
19239 (x_create_bitmap_from_data, x_create_bitmap_from_file)
19240 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
19241 (x_create_bitmap_from_xpm_data):
19242 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
19243 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
19245 * xfaces.c (load_pixmap):
19246 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
19247 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
19248 (.bitmaps_last, struct x_output.icon_bitmap):
19249 Use ptrdiff_t, not int, for bitmap indexes.
19250 (x_allocate_bitmap_record): Check for size overflow.
19251 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
19253 Use ptrdiff_t, not int, for overlay counts.
19254 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
19255 * editfns.c (overlays_around, get_pos_property):
19256 * textprop.c (get_char_property_and_overlay):
19257 * xdisp.c (next_overlay_change, note_mouse_highlight):
19258 * xfaces.c (face_at_buffer_position):
19259 * buffer.c (OVERLAY_COUNT_MAX): New macro.
19260 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
19261 (Fnext_overlay_change, Fprevious_overlay_change)
19262 (mouse_face_overlay_overlaps, Foverlays_in):
19263 Use ptrdiff_t, not int, for sizes.
19264 (overlays_at, overlays_in): Check for size-calculation overflow.
19266 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
19268 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
19269 (x_session_initialize): Do not assume string length fits in int.
19271 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
19272 This is unlikely, but can occur if DPI is outlandish.
19274 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
19275 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
19277 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
19278 * xrdb.c (magic_file_p, search_magic_path):
19279 Omit last arg SUFFIX; it was always 0. All callers changed.
19280 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
19282 * xfont.c (xfont_match): Avoid need for strlen.
19284 * xfns.c: Don't assume strlen fits in int.
19285 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
19287 * xdisp.c (message_log_check_duplicate): Return intmax_t,
19288 not unsigned long, as we prefer signed integers. All callers changed.
19289 Detect integer overflow in repeat count.
19290 (message_dolog): Don't assume print length fits in 39 bytes.
19291 (display_mode_element): Don't assume strlen fits in int.
19293 * termcap.c: Don't assume sizes fit in int and never overflow.
19294 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
19295 (gobble_line): Check for size-calculation overflow.
19297 * minibuf.c (Fread_buffer):
19298 * lread.c (intern, intern_c_string):
19299 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
19300 Don't assume string length fits in int.
19302 * keyboard.c (parse_tool_bar_item):
19303 * gtkutil.c (style_changed_cb): Avoid need for strlen.
19305 * font.c: Don't assume string length fits in int.
19306 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
19307 Use ptrdiff_t, not int.
19308 (font_intern_prop): Don't assume string length fits in int.
19309 Don't assume integer property fits in fixnum.
19310 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
19312 * filelock.c: Fix some buffer overrun and integer overflow issues.
19313 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
19314 Reformulate so as not to need the command string.
19315 Invoke gzip -cd rather than gunzip, as it's more portable.
19316 (lock_info_type, lock_file_1, lock_file):
19317 Don't assume pid_t and time_t fit in unsigned long.
19318 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
19319 (current_lock_owner): Prefer signed type for sizes.
19320 Use memcpy, not strncpy, where memcpy is what is really wanted.
19321 Don't assume (via atoi) that time_t and pid_t fit in int.
19322 Check for time_t and/or pid_t out of range, e.g., via a network share.
19323 Don't alloca where an auto var works fine.
19325 * fileio.c: Fix some integer overflow issues.
19326 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
19327 Don't assume string length fits in int.
19328 (directory_file_name): Don't assume string length fits in long.
19329 (make_temp_name): Don't assume pid fits in int, or that its print
19330 length is less than 20.
19332 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
19334 * coding.c (make_subsidiaries): Don't assume string length fits in int.
19336 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
19338 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
19339 We prefer signed integers, even for size calculations.
19341 * emacs.c: Don't assume string length fits in 'int'.
19342 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
19343 (main): Don't invoke strlen when not needed.
19345 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
19346 (XD_DEBUG_MESSAGE): Don't waste a byte.
19348 * callproc.c (getenv_internal_1, getenv_internal)
19349 (Fgetenv_internal):
19350 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
19352 * lread.c (invalid_syntax): Omit length argument.
19353 All uses changed. This doesn't fix a bug, but it simplifies the
19354 code away from its former Hollerith-constant appearance, and it's
19355 one less 'int' to worry about when looking at integer-overflow issues.
19356 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
19358 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
19359 This didn't break anything, but it didn't help either.
19360 It's confusing to put a bogus integer in a place where the actual
19361 value does not matter.
19362 (LIST_END_P): Remove unused macro and its bogus comment.
19363 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
19365 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
19366 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
19368 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
19369 We prefer signed types, and the value cannot exceed the EMACS_INT
19370 range anyway (because otherwise the length would not be representable).
19371 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
19372 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
19373 This avoids a GCC warning when WIDE_EMACS_INT.
19375 * indent.c (sane_tab_width): New function.
19376 (current_column, scan_for_column, Findent_to, position_indentation)
19377 (compute_motion): Use it. This is just for clarity.
19378 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
19380 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
19382 * lisp.h (lint_assume): New macro.
19383 * composite.c (composition_gstring_put_cache):
19384 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
19386 * editfns.c, insdel.c:
19387 Omit unnecessary forward decls, to simplify future changes.
19389 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
19391 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
19393 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
19394 Use much-faster test for byte-length change.
19395 Don't assume string byte-length fits in 'int'.
19396 Check that character arg fits in 'int'.
19397 (mapcar1): Declare byte as byte, for clarity.
19399 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
19401 * fns.c (concat): Catch string overflow earlier.
19402 Do not rely on integer wraparound.
19404 * dispextern.h (struct it.overlay_strings_charpos)
19405 (struct it.selective): Now EMACS_INT, not int.
19406 * xdisp.c (forward_to_next_line_start)
19407 (back_to_previous_visible_line_start)
19408 (reseat_at_next_visible_line_start, next_element_from_buffer):
19409 Don't arbitrarily truncate the value of 'selective' to int.
19411 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
19413 * composite.c: Don't truncate sizes to 'int'.
19414 (composition_gstring_p, composition_reseat_it)
19415 (composition_adjust_point): Use EMACS_INT, not int.
19416 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
19417 not EMACS_UINT, for indexes.
19419 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
19421 * buffer.c: Include <verify.h>.
19422 (struct sortvec.priority, struct sortstr.priority):
19423 Now EMACS_INT, not int.
19424 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
19425 (struct sortstr.size, record_overlay_string)
19426 (struct sortstrlist.size, struct sortlist.used):
19427 Don't truncate size to int.
19428 (record_overlay_string): Check for size-calculation overflow.
19429 (init_buffer_once): Check at compile-time, not run-time.
19431 2011-06-22 Jim Meyering <meyering@redhat.com>
19433 Don't leak an XBM-image-sized buffer
19434 * image.c (xbm_load): Free the image buffer after using it.
19436 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
19439 * composite.c (find_automatic_composition): Omit needless 'return 0;'
19440 that Sun C diagnosed.
19441 * fns.c (secure_hash): Fix pointer signedness issue.
19442 * intervals.c (static_offset_intervals): New function.
19443 (offset_intervals): Use it.
19445 2011-06-21 Leo Liu <sdl.web@gmail.com>
19448 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
19451 * fns.c (secure_hash): Rename from crypto_hash_function and change
19452 the first arg to accept symbols.
19453 (Fsecure_hash): New primitive.
19454 (syms_of_fns): New symbols.
19456 2011-06-20 Deniz Dogan <deniz@dogan.se>
19458 * process.c (Fset_process_buffer): Clarify return value in
19461 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
19463 * dispnew.c (add_window_display_history): Use BVAR.
19465 * xdisp.c (debug_method_add): Use BVAR.
19466 (check_window_end, dump_glyph_matrix, dump_glyph)
19467 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
19469 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
19472 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
19473 check till after the cache is created in init_frame_faces.
19475 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
19477 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
19479 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
19481 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
19482 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
19483 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
19485 Improve buffer-overflow checking (Bug#8873).
19486 * fileio.c (Finsert_file_contents):
19487 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
19488 Remove the old (too-loose) buffer overflow checks.
19489 They weren't needed, since make_gap checks for buffer overflow.
19490 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
19491 The old code merely checked for Emacs fixnum overflow, and relied
19492 on undefined (wraparound) behavior. The new code avoids undefined
19493 behavior, and also checks for ptrdiff_t and/or size_t overflow.
19495 * editfns.c (Finsert_char): Don't dump core with very negative counts.
19496 Tune. Don't use wider integers than needed. Don't use alloca.
19497 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
19499 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
19501 * insdel.c, lisp.h (buffer_overflow): New function.
19502 (insert_from_buffer_1, replace_range, replace_range_2):
19503 * insdel.c (make_gap_larger):
19504 * editfns.c (Finsert_char):
19505 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
19507 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
19509 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
19511 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
19513 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
19514 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
19516 * fileio.c: Don't assume EMACS_INT fits in off_t.
19517 (emacs_lseek): New static function.
19518 (Finsert_file_contents, Fwrite_region): Use it.
19519 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
19521 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
19523 * fns.c: Don't overflow int when computing a list length.
19524 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
19525 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
19526 truncation on 64-bit hosts. Check for QUIT every
19527 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
19528 faster and is responsive enough.
19529 (Flength): Report an error instead of overflowing an integer.
19530 (Fsafe_length): Return a float if the value is not representable
19531 as a fixnum. This shouldn't happen except in contrived situations.
19532 (Fnthcdr, Fsort): Don't assume list length fits in int.
19533 (Fcopy_sequence): Don't assume vector length fits in int.
19535 * alloc.c: Check that resized vectors' lengths fit in fixnums.
19536 (header_size, word_size): New constants.
19537 (allocate_vectorlike): Don't check size overflow here.
19538 (allocate_vector): Check it here instead, since this is the only
19539 caller of allocate_vectorlike that could cause overflow.
19540 Check that the new vector's length is representable as a fixnum.
19542 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
19543 The previous code was bogus. For example, next_almost_prime (32)
19544 returned 39, which is undesirable as it is a multiple of 3; and
19545 next_almost_prime (24) returned 25, which is a multiple of 5 so
19546 why was the code bothering to check for multiples of 7?
19548 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
19550 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
19552 Variadic C functions now count arguments with ptrdiff_t.
19553 This partly undoes my 2011-03-30 change, which replaced int with size_t.
19554 Back then I didn't know that the Emacs coding style prefers signed int.
19555 Also, in the meantime I found a few more instances where arguments
19556 were being counted with int, which may truncate counts on 64-bit
19557 machines, or EMACS_INT, which may be unnecessarily wide.
19558 * lisp.h (struct Lisp_Subr.function.aMANY)
19559 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
19560 Arg counts are now ptrdiff_t, not size_t.
19561 All variadic functions and their callers changed accordingly.
19562 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
19563 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
19564 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
19565 * callint.c (Fcall_interactively): Check arg count for overflow,
19566 to avoid potential buffer overrun. Use signed char, not 'int',
19567 for 'varies' array, so that we needn't bother to check its size
19568 calculation for overflow.
19569 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
19570 * eval.c (apply_lambda):
19571 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
19572 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
19573 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
19575 * callint.c (Fcall_interactively): Don't use index var as event count.
19577 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
19578 * mem-limits.h (SIZE): Remove; no longer used.
19580 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
19582 Remove unnecessary casts.
19583 * xterm.c (x_term_init):
19584 * xfns.c (x_set_border_pixel):
19585 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
19586 These aren't needed now that we assume ANSI C.
19588 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
19589 It's more likely to cause problems (due to unsigned overflow)
19592 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
19594 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
19596 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
19598 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
19600 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
19602 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
19604 GLYPH_CODE_FACE returns EMACS_INT, not int.
19605 * dispextern.h (merge_faces):
19606 * xfaces.c (merge_faces):
19607 * xdisp.c (get_next_display_element, next_element_from_display_vector):
19608 Don't assume EMACS_INT fits in int.
19610 * character.h (CHAR_VALID_P): Remove unused parameter.
19611 * fontset.c, lisp.h, xdisp.c: All uses changed.
19613 * editfns.c (Ftranslate_region_internal): Omit redundant test.
19615 * fns.c (concat): Minor tuning based on overflow analysis.
19616 This doesn't fix any bugs. Use int to hold character, instead
19617 of constantly refetching from Emacs object. Use XFASTINT, not
19618 XINT, for value known to be a character. Don't bother comparing
19619 a single byte to 0400, as it's always less.
19621 * floatfns.c (Fexpt):
19622 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
19624 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
19627 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
19629 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
19630 Without this fix, on a 64-bit host (aset S 0 4294967386) would
19631 incorrectly succeed when S was a string, because 4294967386 was
19632 truncated before it was used.
19634 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
19635 Otherwise, an out-of-range integer could cause undefined behavior
19638 * composite.c: Use int, not EMACS_INT, for characters.
19639 (fill_gstring_body, composition_compute_stop_pos): Use int, not
19640 EMACS_INT, for values that are known to be in character range.
19641 This doesn't fix any bugs but is the usual style inside Emacs and
19642 may generate better code on 32-bit machines.
19644 Make sure a 64-bit char is never passed to ENCODE_CHAR.
19645 This is for reasons similar to the recent CHAR_STRING fix.
19646 * charset.c (Fencode_char): Check that character arg is actually
19647 a character. Pass an int to ENCODE_CHAR.
19648 * charset.h (ENCODE_CHAR): Verify that the character argument is no
19649 wider than 'int', as a compile-time check to prevent future regressions
19652 * character.c (char_string): Remove unnecessary casts.
19654 Make sure a 64-bit char is never passed to CHAR_STRING.
19655 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
19656 by silently ignoring the top 32 bits, allowing some values
19657 that were far too large to be valid characters.
19658 * character.h: Include <verify.h>.
19659 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
19660 arguments are no wider than unsigned, as a compile-time check
19661 to prevent future regressions in this area.
19663 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
19664 (Fsubst_char_in_region):
19666 * xdisp.c (decode_mode_spec_coding):
19667 Adjust to CHAR_STRING's new requirement.
19668 * editfns.c (Finsert_char, Fsubst_char_in_region):
19669 * fns.c (concat): Check that character args are actually
19670 characters. Without this test, these functions did the wrong
19671 thing with wildly out-of-range values on 64-bit hosts.
19673 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
19674 These casts should not be needed on 32-bit hosts, either.
19675 * keyboard.c (read_char):
19676 * lread.c (Fload): Remove casts to unsigned.
19678 * lisp.h (UNSIGNED_CMP): New macro.
19679 This fixes comparison bugs on 64-bit hosts.
19680 (ASCII_CHAR_P): Use it.
19681 * casefiddle.c (casify_object):
19682 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
19683 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
19684 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
19685 * dispextern.h (FACE_FROM_ID):
19686 * keyboard.c (read_char): Use UNSIGNED_CMP.
19688 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
19689 not to EMACS_INT, to avoid GCC warning.
19691 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
19693 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
19694 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
19695 isn't needed on 32-bit machines.
19697 * buffer.c (Fgenerate_new_buffer_name):
19698 Use EMACS_INT for count, not int.
19699 (advance_to_char_boundary): Return EMACS_INT, not int.
19701 * data.c (Qcompiled_function): Now static.
19703 * window.c (window_body_lines): Now static.
19705 * image.c (gif_load): Rename local to avoid shadowing.
19707 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
19708 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
19709 * alloc.c (make_save_value): Integer argument is now of type
19710 ptrdiff_t, not int.
19711 (mark_object): Use ptrdiff_t, not int.
19712 * lisp.h (pD): New macro.
19713 * print.c (print_object): Use it.
19715 * alloc.c: Use EMACS_INT, not int, to count objects.
19716 (total_conses, total_markers, total_symbols, total_vector_size)
19717 (total_free_conses, total_free_markers, total_free_symbols)
19718 (total_free_floats, total_floats, total_free_intervals)
19719 (total_intervals, total_strings, total_free_strings):
19720 Now EMACS_INT, not int. All uses changed.
19721 (Fgarbage_collect): Compute overall total using a double, so that
19722 integer overflow is less likely to be a problem. Check for overflow
19723 when converting back to an integer.
19724 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
19725 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
19726 These were 'int' variables that could overflow on 64-bit hosts;
19727 they were never used, so remove them instead of repairing them.
19728 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
19729 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
19730 Previously, this ceilinged at INT_MAX, but that doesn't work on
19732 (allocate_pseudovector): Don't use EMACS_INT when int would do.
19734 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
19735 (allocate_vectorlike): Check for ptrdiff_t overflow.
19736 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
19737 when a (possibly-narrower) signed value would do just as well.
19738 We prefer using signed arithmetic, to avoid comparison confusion.
19740 * alloc.c: Catch some string size overflows that we were missing.
19741 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
19742 for convenience in STRING_BYTES_MAX.
19743 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
19744 The definition here is exact; the one in lisp.h was approximate.
19745 (allocate_string_data): Check for string overflow. This catches
19746 some instances we weren't catching before. Also, it catches
19747 size_t overflow on (unusual) hosts where SIZE_MAX <= min
19748 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
19749 and ptrdiff_t and EMACS_INT are both 64 bits.
19751 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
19752 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
19753 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
19755 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
19757 * alloc.c (Fmake_string): Check for out-of-range init.
19759 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
19761 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
19763 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
19765 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
19766 xg_get_default_scrollbar_width.
19768 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
19769 (int_gtk_range_get_value): Move to the scroll bar part of the file.
19770 (style_changed_cb): Call update_theme_scrollbar_width and call
19771 x_set_scroll_bar_default_width and xg_frame_set_char_size for
19772 all frames (Bug#8505).
19773 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
19774 Call gtk_window_set_resizable if HAVE_GTK3.
19775 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
19776 and height if HAVE_GTK3 (Bug#8505).
19777 (scroll_bar_width_for_theme): New variable.
19778 (update_theme_scrollbar_width): New function.
19779 (xg_get_default_scrollbar_width): Move code to
19780 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
19781 (xg_initialize): Call update_theme_scrollbar_width.
19783 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
19785 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
19787 2011-06-12 Martin Rudalics <rudalics@gmx.at>
19789 * frame.c (make_frame): Call other_buffer_safely instead of
19792 * window.c (temp_output_buffer_show): Call display_buffer with
19793 second argument Vtemp_buffer_show_specifiers and reset latter
19794 immediately after the call.
19795 (Vtemp_buffer_show_specifiers): New variable.
19796 (auto_window_vscroll_p, next_screen_context_lines)
19797 (Vscroll_preserve_screen_position): Remove leading asterisks from
19800 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
19802 Fix minor problems found by GCC 4.6.0 static checking.
19803 * buffer.c (Qclone_number): Remove for now, as it's unused.
19804 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
19805 (record_buffer): Remove unused local.
19806 * frame.c (other_visible_frames, frame_buffer_list): Now static.
19807 (set_frame_buffer_list): Remove; unused.
19808 * frame.h (other_visible_frames): Remove decl.
19809 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
19810 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
19811 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
19813 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
19814 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
19815 Define only if HAVE_GPM.
19816 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
19817 (update_hints_inhibit): Remove; never set. All uses removed.
19818 * widgetprv.h (emacsFrameClassRec): Remove decl.
19819 * window.c (delete_deletable_window): Now returns void, since it
19820 wasn't returning anything.
19821 (compare_window_configurations): Remove unused locals.
19822 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
19823 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
19824 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
19825 the same widths as pointers. This follows up on the 2011-05-06 patch.
19826 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
19827 * xterm.h: Likewise.
19828 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
19830 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
19832 * makefile.w32-in: Update dependencies.
19833 (LISP_H): Add lib/intprops.h.
19835 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
19837 * image.c (gif_load): Add animation frame delay to the metadata.
19838 (syms_of_image): Use DEFSYM. New symbol `delay'.
19840 2011-06-11 Martin Rudalics <rudalics@gmx.at>
19842 * window.c (delete_deletable_window): Re-add.
19843 (Fset_window_configuration): Rewrite to handle dead buffers and
19844 consequently deletable windows.
19845 (window_tree, Fwindow_tree): Remove. Supply functionality in
19847 (compare_window_configurations): Simplify code.
19849 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
19851 * image.c (imagemagick_load_image): Fix type mismatch.
19852 (Fimagemagick_types): Likewise.
19854 * window.h (replace_buffer_in_windows): Declare.
19856 2011-06-11 Martin Rudalics <rudalics@gmx.at>
19858 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
19859 Qclone_number. Remove external declaration of Qdelete_window.
19860 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
19862 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
19863 Run Qbuffer_list_update_hook if allowed.
19864 (Fother_buffer): Rewrite doc-string. Major rewrite for new
19865 buffer list implementation.
19866 (other_buffer_safely): New function.
19867 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
19868 calls to replace_buffer_in_windows and
19869 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
19871 (record_buffer): Inhibit quitting and rewrite using quittable
19872 functions. Run Qbuffer_list_update_hook if allowed.
19873 (Frecord_buffer, Funrecord_buffer): New functions.
19874 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
19875 Move switch-to-buffer to window.el.
19876 (bury-buffer): Move to window.el.
19877 (Vbuffer_list_update_hook): New variable.
19879 * lisp.h (other_buffer_safely): Add prototype in buffer.c
19882 * window.h (resize_frame_windows): Move up in code.
19883 (Fwindow_frame): Remove EXFUN.
19884 (replace_buffer_in_all_windows): Remove prototype.
19885 (replace_buffer_in_windows_safely): Add prototype.
19887 * window.c: Declare Qdelete_window static again. Move down
19888 declaration of select_count.
19889 (Fnext_window, Fprevious_window): Rewrite doc-strings.
19890 (Fother_window): Move to window.el.
19891 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
19892 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
19893 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
19895 (replace_buffer_in_windows): Implement by calling
19896 Qreplace_buffer_in_windows.
19897 (replace_buffer_in_all_windows): Remove with some functionality
19898 moved into replace_buffer_in_windows_safely.
19899 (replace_buffer_in_windows_safely): New function.
19900 (select_window_norecord, select_frame_norecord): Move in front
19901 of run_window_configuration_change_hook. Remove now obsolete
19903 (Fset_window_buffer): Rewrite doc-string.
19904 Call Qrecord_window_buffer.
19905 (keys_of_window): Move binding for other-window to window.el.
19907 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
19909 * dispextern.h (struct image): Replace data member, whose int_val
19910 and ptr_val fields were not used by anything, with a single
19913 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
19914 (gif_clear_image, gif_load, imagemagick_load_image)
19915 (gs_clear_image, gs_load): Callers changed.
19917 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
19919 * buffer.h: Include <time.h>, for time_t.
19920 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
19922 Fix minor problems found by static checking.
19924 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
19926 Make identifiers static if they are not used in other modules.
19927 * data.c (Qcompiled_function, Qframe, Qvector):
19928 * image.c (QimageMagick, Qsvg):
19929 * minibuf.c (Qmetadata):
19930 * window.c (resize_window_check, resize_root_window): Now static.
19931 * window.h (resize_window_check, resize_root_window): Remove decls.
19933 * window.c (window_deletion_count, delete_deletable_window):
19935 (window_body_lines): Now static.
19936 (Fdelete_other_windows_internal): Mark vars as initialized.
19937 Make sure 'resize_failed' is initialized.
19938 (run_window_configuration_change_hook): Rename local to avoid shadowing.
19939 (resize_window_apply): Remove unused local.
19940 * window.h (delete_deletable_window): Remove decl.
19942 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
19943 (imagemagick_load_image): Fix pointer signedness problem by changing
19944 last arg from unsigned char * to char *. All uses changed.
19945 Also, fix a local for similar reasons.
19946 Remove unused locals. Remove locals to avoid shadowing.
19947 (fn_rsvg_handle_free): Remove; unused.
19948 (svg_load, svg_load_image): Fix pointer signedness problem.
19949 (imagemagick_load_image): Don't use garbage pointer image_wand.
19951 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
19953 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
19955 * image.c (gif_load): Fix omitted cast error introduced by
19958 2011-06-10 Martin Rudalics <rudalics@gmx.at>
19960 * window.h (resize_proportionally, orig_total_lines)
19961 (orig_top_line): Remove from window structure.
19962 (set_window_height, set_window_width, change_window_heights)
19963 (Fdelete_window): Remove prototypes.
19964 (resize_frame_windows): Remove duplicate declaration.
19966 2011-06-10 Eli Zaretskii <eliz@gnu.org>
19968 * window.h (resize_frame_windows, resize_window_check)
19969 (delete_deletable_window, resize_root_window)
19970 (resize_frame_windows): Declare prototypes.
19972 * window.c (resize_window_apply): Make definition be "static" to
19973 match the prototype.
19975 2011-06-10 Martin Rudalics <rudalics@gmx.at>
19977 * window.c: Remove declarations of Qwindow_size_fixed,
19978 window_min_size_1, window_min_size_2, window_min_size,
19979 size_window, window_fixed_size_p, enlarge_window, delete_window.
19980 Remove static from declaration of Qdelete_window, it's
19981 temporarily needed by Fbury_buffer.
19982 (replace_window): Don't assign orig_top_line and
19984 (Fdelete_window, delete_window): Remove. Window deletion is
19985 handled by window.el.
19986 (window_loop): Remove DELETE_OTHER_WINDOWS case.
19987 Replace Fdelete_window calls with calls to Qdelete_window.
19988 (Fdelete_other_windows): Remove. Deleting other windows is
19989 handled by window.el.
19990 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
19991 handled in window.el.
19992 (window_min_size_2, window_min_size_1, window_min_size): Remove.
19993 Window minimum sizes are handled in window.el.
19994 (shrink_windows, size_window, set_window_height)
19995 (set_window_width, change_window_heights, window_height)
19996 (window_width, CURBEG, CURSIZE, enlarge_window)
19997 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
19998 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
19999 handled in window.el.
20000 (make_dummy_parent): Rename to make_parent_window and give it a
20001 second argument horflag.
20002 (make_window): Don't set resize_proportionally any more.
20003 (Fsplit_window): Remove. Windows are split in window.el.
20004 (save_restore_action, save_restore_orig_size)
20005 (shrink_window_lowest_first, save_restore_orig_size): Remove.
20006 Resize mini windows in window.el.
20007 (grow_mini_window, shrink_mini_window): Implement by calling
20008 Qresize_root_window_vertically, resize_window_check and
20009 resize_window_apply.
20010 (saved_window, Fset_window_configuration, save_window_save):
20011 Do not handle orig_top_line, orig_total_lines, and
20012 resize_proportionally.
20013 (window_min_height, window_min_width): Move to window.el.
20014 (keys_of_window): Move bindings for delete-other-windows,
20015 split-window, delete-window and enlarge-window to window.el.
20017 * buffer.c: Temporarily extern Qdelete_window.
20018 (Fbury_buffer): Temporarily call Qdelete_window instead of
20019 Fdelete_window (Fbury_buffer will move to window.el soon).
20021 * frame.c (set_menu_bar_lines_1): Remove code handling
20022 orig_top_line and orig_total_lines.
20024 * dispnew.c (adjust_frame_glyphs_initially): Don't use
20025 set_window_height but set heights directly.
20026 (change_frame_size_1): Use resize_frame_windows.
20028 * xdisp.c (init_xdisp): Don't use set_window_height but set
20031 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
20032 Use resize_frame_windows instead of change_window_heights and run
20033 run_window_configuration_change_hook.
20035 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
20036 instead of change_window_heights and run
20037 run_window_configuration_change_hook.
20039 2011-06-09 Martin Rudalics <rudalics@gmx.at>
20041 * window.c (replace_window): Rename second argument REPLACEMENT to
20042 NEW. New third argument SETFLAG. Rewrite.
20043 (delete_window, make_dummy_parent): Call replace_window with
20045 (window_list_1): Move down in code.
20046 (run_window_configuration_change_hook): Move set_buffer part
20047 before select_frame_norecord part in order to unwind correctly.
20048 Rename count1 to count.
20049 (recombine_windows, delete_deletable_window, resize_root_window)
20050 (Fdelete_other_windows_internal)
20051 (Frun_window_configuration_change_hook, make_parent_window)
20052 (resize_window_check, resize_window_apply, Fresize_window_apply)
20053 (resize_frame_windows, Fsplit_window_internal)
20054 (Fdelete_window_internal, Fresize_mini_window_internal):
20056 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
20058 2011-06-08 Martin Rudalics <rudalics@gmx.at>
20060 * window.h (window): Add some new members to window structure -
20061 normal_lines, normal_cols, new_total, new_normal, clone_number,
20062 splits, nest, prev_buffers, next_buffers.
20063 (WINDOW_TOTAL_SIZE): Move here from window.c.
20064 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
20066 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
20068 (make_dummy_parent): Set new members of windows structure.
20069 (make_window): Move down in code. Handle new members of window
20071 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
20072 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
20073 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
20074 (Fset_window_prev_buffers, Fwindow_next_buffers)
20075 (Fset_window_next_buffers, Fset_window_clone_number):
20077 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
20078 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
20080 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
20081 Argument WINDOW can be now internal window too.
20082 (Fwindow_use_time): Move up in code.
20083 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
20084 Rewrite doc-string.
20085 (Fset_window_configuration, saved_window)
20086 (Fcurrent_window_configuration, save_window_save): Handle new
20087 members of window structure.
20088 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
20089 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
20090 (syms_of_window): New Lisp objects Qrecord_window_buffer,
20091 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
20092 Qget_mru_window, Qresize_root_window,
20093 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
20094 Qauto_buffer_name; staticpro them.
20096 2011-06-07 Martin Rudalics <rudalics@gmx.at>
20098 * window.c (Fwindow_total_size, Fwindow_left_column)
20099 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
20100 (Fwindow_list_1): New functions.
20101 (window_box_text_cols): Replace with window_body_cols.
20102 (Fwindow_width, Fscroll_left, Fscroll_right):
20103 Use window_body_cols instead of window_box_text_cols.
20104 (delete_window, Fset_window_configuration):
20105 Call delete_all_subwindows with window as argument.
20106 (delete_all_subwindows): Take a window as argument and not a
20107 structure. Rewrite.
20108 (window_loop): Remove handling of GET_LRU_WINDOW and
20109 GET_LARGEST_WINDOW.
20110 (Fget_lru_window, Fget_largest_window): Move to window.el.
20112 * window.h: Extern window_body_cols instead of
20113 window_box_text_cols. delete_all_subwindows now takes a
20114 Lisp_Object as argument.
20116 * indent.c (compute_motion, Fcompute_motion):
20117 Use window_body_cols instead of window_box_text_cols.
20119 * frame.c (delete_frame): Call delete_all_subwindows with root
20120 window as argument.
20122 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
20124 * fns.c (Fputhash): Document return value.
20126 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
20128 * image.c (gif_load): Implement gif89a spec "no disposal" method.
20130 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20132 Cons<->int and similar integer overflow fixes (Bug#8794).
20134 Check for overflow when converting integer to cons and back.
20135 * charset.c (Fdefine_charset_internal, Fdecode_char):
20136 Use cons_to_unsigned to catch overflow.
20137 (Fencode_char): Use INTEGER_TO_CONS.
20138 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
20139 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
20140 * data.c (long_to_cons, cons_to_long): Remove.
20141 (cons_to_unsigned, cons_to_signed): New functions.
20142 These signal an error for invalid or out-of-range values.
20143 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
20144 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
20145 * font.c (Ffont_variation_glyphs):
20146 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
20147 * lisp.h: Include <intprops.h>.
20148 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
20149 (cons_to_signed, cons_to_unsigned): New decls.
20150 (long_to_cons, cons_to_long): Remove decls.
20151 * undo.c (record_first_change): Use INTEGER_TO_CONS.
20152 (Fprimitive_undo): Use CONS_TO_INTEGER.
20153 * xfns.c (Fx_window_property): Likewise.
20154 * xselect.c: Include <limits.h>.
20155 (x_own_selection, selection_data_to_lisp_data):
20156 Use INTEGER_TO_CONS.
20157 (x_handle_selection_request, x_handle_selection_clear)
20158 (x_get_foreign_selection, Fx_disown_selection_internal)
20159 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
20160 (lisp_data_to_selection_data): Use cons_to_unsigned.
20161 (x_fill_property_data): Use cons_to_signed.
20162 Report values out of range.
20164 Check for buffer and string overflow more precisely.
20165 * buffer.h (BUF_BYTES_MAX): New macro.
20166 * lisp.h (STRING_BYTES_MAX): New macro.
20167 * alloc.c (Fmake_string):
20168 * character.c (string_escape_byte8):
20169 * coding.c (coding_alloc_by_realloc):
20170 * doprnt.c (doprnt):
20171 * editfns.c (Fformat):
20173 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
20174 since they may not be the same number.
20175 * editfns.c (Finsert_char):
20176 * fileio.c (Finsert_file_contents):
20177 Likewise for BUF_BYTES_MAX.
20179 * image.c: Use ptrdiff_t, not int, for sizes.
20180 (slurp_file): Switch from int to ptrdiff_t.
20182 (slurp_file): Check that file size fits in both size_t (for
20183 malloc) and ptrdiff_t (for sanity and safety).
20185 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
20186 if b->modtime has its maximal value.
20188 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
20190 Don't assume time_t can fit into int.
20191 * buffer.h (struct buffer.modtime): Now time_t, not int.
20192 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
20193 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
20195 Minor fixes for signed vs unsigned integers.
20196 * character.h (MAYBE_UNIFY_CHAR):
20197 * charset.c (maybe_unify_char):
20198 * keyboard.c (read_char, reorder_modifiers):
20199 XINT -> XFASTINT, since the integer must be nonnegative.
20200 * ftfont.c (ftfont_spec_pattern):
20201 * keymap.c (access_keymap, silly_event_symbol_error):
20202 XUINT -> XFASTINT, since the integer must be nonnegative.
20203 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
20204 since it makes no difference and we prefer signed.
20205 * keyboard.c (record_char): Use XUINT when all the neighbors do.
20206 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
20209 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
20211 * window.h (Fwindow_frame): Declare.
20213 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20215 * alloc.c: Simplify handling of large-request failures (Bug#8800).
20216 (SPARE_MEMORY): Always define.
20217 (LARGE_REQUEST): Remove.
20218 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
20220 2011-06-06 Martin Rudalics <rudalics@gmx.at>
20222 * lisp.h: Move EXFUNS for Fframe_root_window,
20223 Fframe_first_window and Fset_frame_selected_window to window.h.
20225 * window.h: Move EXFUNS for Fframe_root_window,
20226 Fframe_first_window and Fset_frame_selected_window here from
20229 * frame.c (Fwindow_frame, Fframe_first_window)
20230 (Fframe_root_window, Fframe_selected_window)
20231 (Fset_frame_selected_window): Move to window.c.
20232 (Factive_minibuffer_window): Move to minibuf.c.
20233 (Fother_visible_frames_p): New function.
20235 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
20237 * window.c (decode_window, decode_any_window): Move up in code.
20238 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
20239 (inhibit_frame_unsplittable): Remove unused variable.
20240 (Fwindow_buffer): Move up and rewrite doc-string.
20241 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
20242 (Fwindow_prev): New functions.
20243 (Fwindow_frame): Move here from frame.c. Accept any window as
20245 (Fframe_root_window, Fframe_first_window)
20246 (Fframe_selected_window): Move here from frame.c. Accept frame
20247 or arbitrary window as argument. Update doc-strings.
20248 (Fminibuffer_window): Move up in code.
20249 (Fwindow_minibuffer_p): Move up in code and simplify.
20250 (Fset_frame_selected_window): Move here from frame.c.
20252 (Fselected_window, select_window, Fselect_window): Move up in
20253 code. Minor doc-string fixes.
20255 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20257 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
20258 Do not assume that spare memory exists; that assumption is valid
20259 only if SYSTEM_MALLOC.
20260 (LARGE_REQUEST): New macro, so that the issue of large requests
20261 is separated from the issue of spare memory.
20263 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
20265 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
20268 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
20270 * xfns.c (x_set_scroll_bar_default_width): Move declarations
20273 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
20275 * gtkutil.c (xg_get_default_scrollbar_width): New function.
20277 * gtkutil.h: Declare xg_get_default_scrollbar_width.
20279 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
20280 min width by calling x_set_scroll_bar_default_width (Bug#8505).
20282 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
20284 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
20286 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
20288 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
20289 (x_clipboard_manager_save): Add return value.
20290 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
20291 New error handlers.
20292 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
20293 Obey Vx_select_enable_clipboard_manager. Catch errors in
20294 x_clipboard_manager_save (Bug#8779).
20295 (Vx_select_enable_clipboard_manager): New variable.
20296 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
20298 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
20300 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
20302 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20304 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
20305 in the current matrix if keep_current_p is non-zero.
20307 2011-06-04 Eli Zaretskii <eliz@gnu.org>
20309 * bidi.c (bidi_level_of_next_char): Fix last change.
20311 2011-06-03 Eli Zaretskii <eliz@gnu.org>
20313 Support bidi reordering of text covered by display properties.
20315 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
20316 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
20317 (bidi_cache_search, bidi_cache_iterator_state)
20318 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
20319 (bidi_level_of_next_char, bidi_move_to_visually_next):
20320 Support character positions inside a run of characters covered by a
20322 (bidi_paragraph_init, bidi_resolve_explicit_1)
20323 (bidi_level_of_next_char): Call bidi_fetch_char and
20324 bidi_fetch_char_advance instead of FETCH_CHAR and
20325 FETCH_CHAR_ADVANCE.
20326 (bidi_init_it): Initialize new members.
20327 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
20329 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
20330 instead of using explicit *_CHAR codes.
20331 (bidi_resolve_explicit, bidi_resolve_weak):
20332 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
20333 bidirectional text is supported only in multibyte buffers.
20334 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
20335 it to initialize the frame_window_p member of struct bidi_it.
20336 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
20337 (bidi_resolve_explicit, bidi_resolve_weak)
20338 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
20339 bidi_it->nchars is non-positive.
20340 (bidi_level_of_next_char): Don't try to lookup the cache for the
20341 next/previous character if nothing is cached there yet, or if we
20342 were just reseat()'ed to a new position.
20344 * xdisp.c (set_cursor_from_row): Set start and stop points
20345 according to the row's direction when priming the loop that looks
20346 for the glyph on which to display cursor.
20347 (single_display_spec_intangible_p): Function deleted.
20348 (display_prop_intangible_p): Reimplement to call
20349 handle_display_spec instead of single_display_spec_intangible_p.
20350 Accept 3 additional arguments needed by handle_display_spec.
20351 This fixes incorrect cursor motion across display property with complex
20352 values: lists, `(when COND...)' forms, etc.
20353 (single_display_spec_string_p): Support property values that are
20354 lists with the argument STRING its top-level element.
20355 (display_prop_string_p): Fix the condition for processing a
20356 property that is a list to be consistent with handle_display_spec.
20357 (handle_display_spec): New function, refactored from the
20358 last portion of handle_display_prop.
20359 (compute_display_string_pos): Accept additional argument
20360 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
20361 value of a `display' property is a "replacing spec".
20362 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
20363 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
20364 the display property, but just return a value indicating whether
20365 the display property will replace the characters it covers.
20366 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
20367 frame_window_p members of struct bidi_it.
20368 (compute_display_string_pos, compute_display_string_end):
20370 (push_it): Accept second argument POSITION, where pop_it should
20371 jump to continue iteration.
20372 (reseat_1): Initialize bidi_it.disp_pos.
20374 * keyboard.c (adjust_point_for_property): Adjust the call to
20375 display_prop_intangible_p to its new signature.
20377 * dispextern.h (struct bidi_it): New member frame_window_p.
20378 (bidi_init_it): Update prototypes.
20379 (display_prop_intangible_p): Update prototype.
20380 (compute_display_string_pos, compute_display_string_end):
20381 Declare prototypes.
20382 (struct bidi_it): New members nchars and disp_pos. ch_len is now
20385 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
20387 Malloc failure behavior now depends on size of allocation.
20388 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
20389 * lisp.h: Change signatures accordingly.
20390 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
20391 All callers changed. (Bug#8762)
20393 * gnutls.c: Use Emacs's memory allocators.
20394 Without this change, the gnutls library would invoke malloc etc.
20395 directly, which causes problems on non-SYNC_INPUT hosts, and which
20396 runs afoul of improving memory_full behavior. (Bug#8761)
20397 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
20398 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
20399 xfree instead of the default malloc, realloc, free.
20400 (Fgnutls_boot): No need to check for memory allocation failure,
20401 since xmalloc does that for us.
20403 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
20404 * category.c (hash_get_category_set):
20405 * ccl.c (ccl_driver):
20406 * charset.c (Fdefine_charset_internal):
20407 * charset.h (struct charset.hash_index):
20408 * composite.c (get_composition_id, gstring_lookup_cache)
20409 (composition_gstring_put_cache):
20410 * composite.h (struct composition.hash_index):
20411 * dispextern.h (struct image.hash):
20412 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
20413 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
20414 (hashfn_equal, hashfn_user_defined, make_hash_table)
20415 (maybe_resize_hash_table, hash_lookup, hash_put)
20416 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
20417 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
20418 (Fsxhash, Fgethash, Fputhash, Fmaphash):
20419 * image.c (make_image, search_image_cache, lookup_image)
20420 (xpm_put_color_table_h):
20421 * lisp.h (struct Lisp_Hash_Table):
20422 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
20423 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
20424 for hashes and hash indexes, instead of 'unsigned' and 'int'.
20425 * alloc.c (allocate_vectorlike):
20426 Check for overflow in vector size calculations.
20427 * ccl.c (ccl_driver):
20428 Check for overflow when converting EMACS_INT to int.
20429 * fns.c, image.c: Remove unnecessary static decls that would otherwise
20430 need to be updated by these changes.
20431 * fns.c (make_hash_table, maybe_resize_hash_table):
20432 Check for integer overflow with large hash tables.
20433 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
20434 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
20435 (SXHASH_REDUCE): New macro.
20436 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
20437 Use it instead of discarding useful hash info with large hash values.
20438 (sxhash_float): New function.
20439 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
20440 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
20441 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
20442 Rewrite to use FIXNUM_BITS, as this simplifies things.
20443 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
20444 Adjust signatures to match updated version of code.
20445 (consing_since_gc): Now EMACS_INT, since a single hash table can
20446 use more than INT_MAX bytes.
20448 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
20450 Make it possible to build with GCC-4.6+ -O2 -flto.
20452 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
20454 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
20456 * minibuf.c (get_minibuffer, read_minibuf_unwind):
20457 Call minibuffer-inactive-mode.
20459 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
20461 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
20462 Update dependencies.
20464 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20466 * data.c (init_data): Remove code for UTS, this system is not
20469 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20471 Don't force ./temacs to start in terminal mode.
20473 * frame.c (make_initial_frame): Initialize faces in all cases, not
20474 only when CANNOT_DUMP is defined.
20475 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
20477 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20479 * dispnew.c (add_window_display_history): Use const for the string
20480 pointer. Remove declaration, not needed.
20482 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
20484 Use 'inline', not 'INLINE'.
20485 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
20486 * alloc.c, fontset.c (INLINE): Remove.
20487 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
20488 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
20489 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
20490 * gmalloc.c (register_heapinfo): Use inline unconditionally.
20491 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
20493 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20495 Make it possible to run ./temacs.
20497 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
20498 syms_of_callproc does the same thing. Remove test for
20499 "initialized", do it in the caller.
20500 * emacs.c (main): Avoid calling set_initial_environment when dumping.
20502 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
20504 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
20505 (read_minibuf): Use get_minibuffer.
20506 (syms_of_minibuf): Use DEFSYM.
20507 (Qmetadata): New var.
20508 * data.c (Qbuffer): Don't make it static.
20509 (syms_of_data): Use DEFSYM.
20511 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
20513 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
20514 (CCL_CODE_MIN): New macro.
20516 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
20518 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
20520 * eval.c (Qdebug): Now static.
20521 * lisp.h (Qdebug): Remove decl. This reverts a part of the
20522 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
20523 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
20525 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
20527 * image.c: Various fixes to ImageMagick code comments.
20528 (Fimagemagick_types): Doc fix.
20530 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
20532 Minor fixes prompted by GCC 4.6.0 warnings.
20534 * xselect.c (converted_selections, conversion_fail_tag): Now static.
20536 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
20537 (x_clipboard_manager_save_all): Move extern decl to ...
20538 * xterm.h: ... here, so that it can be checked for consistency.
20540 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
20542 * xselect.c (x_clipboard_manager_save_frame)
20543 (x_clipboard_manager_save_all): New functions.
20544 (Fx_clipboard_manager_save): Lisp function deleted.
20546 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
20547 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
20549 * xterm.h: Update prototype.
20551 2011-05-28 William Xu <william.xwl@gmail.com>
20553 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
20554 exiting (Bug#8239).
20556 2011-05-28 Jim Meyering <meyering@redhat.com>
20558 Avoid a sign-extension bug in crypto_hash_function.
20559 * fns.c (to_uchar): Define.
20560 (crypto_hash_function): Use it to convert some newly-signed
20561 variables to unsigned, to avoid sign-extension bugs. For example,
20562 without this change, (md5 "truc") would evaluate to
20563 45723a2aff78ff4fff7fff1114760e62 rather than the expected
20564 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
20565 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
20567 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20569 Integer overflow fixes.
20571 * dbusbind.c: Serial number integer overflow fixes.
20572 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
20573 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
20574 to hold a serial number that is too large for a fixnum.
20575 (Fdbus_method_return_internal, Fdbus_method_error_internal):
20576 Check for serial numbers out of range. Decode any serial number
20577 that was so large that it became a float. (Bug#8722)
20579 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
20580 (Fdbus_call_method, Fdbus_call_method_asynchronously):
20581 Use XFASTINT rather than XUINT when numbers are nonnegative.
20582 (xd_append_arg, Fdbus_method_return_internal):
20583 (Fdbus_method_error_internal): Likewise. Also, for unsigned
20584 arguments, check that Lisp number is nonnegative, rather than
20585 silently wrapping negative numbers around. (Bug#8722)
20586 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
20589 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
20591 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
20593 ccl: Add integer overflow checks.
20594 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
20595 (IN_INT_RANGE): New macros.
20596 (ccl_driver): Use them to check for integer overflow when
20597 decoding a CCL program. Many of the new checks are whether XINT (x)
20598 fits in int; it doesn't always, on 64-bit hosts. The new version
20599 doesn't catch all possible integer overflows, but it's an
20600 improvement. (Bug#8719)
20602 * alloc.c (make_event_array): Use XINT, not XUINT.
20603 There's no need for unsigned here.
20605 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
20606 This follows up to the 2011-05-06 change that substituted uintptr_t
20607 for EMACS_INT. This case wasn't caught back then.
20609 Rework Fformat to avoid integer overflow issues.
20610 * editfns.c: Include <float.h> unconditionally, as it's everywhere
20611 now (part of C89). Include <verify.h>.
20612 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
20613 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
20614 (Fformat): Avoid the prepass trying to compute sizes; it was only
20615 approximate and thus did not catch overflow reliably. Instead, walk
20616 through the format just once, formatting and computing sizes as we go,
20617 checking for integer overflow at every step, and allocating a larger
20618 buffer as needed. Keep track separately whether the format is
20619 multibyte. Keep only the most-recently calculated precision, rather
20620 than them all. Record whether each argument has been converted to
20621 string. Use EMACS_INT, not int, for byte and char and arg counts.
20622 Support field widths and precisions larger than INT_MAX. Avoid
20623 sprintf's undefined behavior with conversion specifications such as %#d
20624 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
20625 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
20626 formatting out-of-range floating point numbers with int
20627 formats. (Bug#8668)
20629 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
20631 * data.c: Avoid integer truncation in expressions involving floats.
20632 * data.c: Include <intprops.h>.
20633 (arith_driver): When there's an integer overflow in an expression
20634 involving floating point, convert the integers to floating point
20635 so that the resulting value does not suffer from catastrophic
20636 integer truncation. For example, on a 64-bit host (* 4
20637 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
20638 Do not rely on undefined behavior after integer overflow.
20640 merge count_size_as_multibyte, parse_str_to_multibyte
20641 * character.c, character.h (count_size_as_multibyte):
20642 Rename from parse_str_to_multibyte; all uses changed.
20643 Check for integer overflow.
20644 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
20645 since it's now a duplicate of the other. This is more of
20646 a character than a buffer op, so better that it's in character.c.
20647 * fns.c, print.c: Adjust to above changes.
20649 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
20651 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
20653 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20655 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
20656 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
20657 (x_clipboard_manager_save): Now static.
20658 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
20660 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
20661 (crypto_hash_function): Now static.
20662 Fix pointer signedness problems. Avoid unnecessary initializations.
20664 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
20666 * termhooks.h (Vselection_alist): Make it terminal-local.
20668 * terminal.c (create_terminal): Initialize it.
20670 * xselect.c: Support for clipboard managers.
20671 (Vselection_alist): Move to termhooks.h as terminal-local var.
20672 (LOCAL_SELECTION): New macro.
20673 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
20674 (symbol_to_x_atom): Remove gratuitous arg.
20675 (x_handle_selection_request, lisp_data_to_selection_data)
20676 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
20677 (x_own_selection, x_get_local_selection, x_convert_selection):
20678 New arg, specifying work frame. Use terminal-local Vselection_alist.
20679 (some_frame_on_display): Delete unused function.
20680 (Fx_own_selection_internal, Fx_get_selection_internal)
20681 (Fx_disown_selection_internal, Fx_selection_owner_p)
20682 (Fx_selection_exists_p): New optional frame arg.
20683 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
20684 (x_handle_selection_clear): Don't treat other terminals with the
20685 same keyboard specially. Use the terminal-local Vselection_alist.
20686 (x_clear_frame_selections): Use Frun_hook_with_args.
20688 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
20690 * xterm.h: Add support for those atoms.
20692 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
20694 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
20695 (converted_selections, conversion_fail_tag): New global variables.
20696 (x_selection_request_lisp_error): Free the above.
20697 (x_get_local_selection): Remove unnecessary code.
20698 (x_reply_selection_request): Args changed; handle arbitrary array
20699 of converted selections stored in converted_selections.
20700 Separate the XChangeProperty and SelectionNotify steps.
20701 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
20702 (x_convert_selection): New function.
20703 (x_handle_selection_event): Simplify.
20704 (x_get_foreign_selection): Don't ignore incoming requests while
20705 waiting for an answer; this will fail when we implement
20706 SAVE_TARGETS, and seems unnecessary anyway.
20707 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
20708 (Vx_sent_selection_functions): Doc fix.
20710 2011-05-26 Leo Liu <sdl.web@gmail.com>
20712 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
20714 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20716 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
20718 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
20719 for fringe update if it has periodic bitmap.
20720 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
20721 and fringe_bitmap_periodic_p.
20723 * fringe.c (get_fringe_bitmap_data): New function.
20724 (draw_fringe_bitmap_1, update_window_fringes): Use it.
20725 (update_window_fringes): Record periodicity of fringe bitmap in glyph
20726 row. Mark glyph row for fringe update if periodicity changed.
20728 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
20729 for fringe update unless it has periodic bitmap.
20731 2011-05-25 Kenichi Handa <handa@m17n.org>
20733 * xdisp.c (get_next_display_element): Set correct it->face_id for
20734 a static composition.
20736 2011-05-24 Leo Liu <sdl.web@gmail.com>
20739 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
20741 * fns.c (crypto_hash_function, Fsha1): New function.
20742 (Fmd5): Use crypto_hash_function.
20743 (syms_of_fns): Add Ssha1.
20745 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20747 * gnutls.c: Remove unused macros.
20748 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
20749 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
20750 Remove macros that are defined and never used.
20751 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
20753 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
20755 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
20756 (Fx_get_selection_internal): Minor cleanup.
20757 (Fx_own_selection_internal): Rename arguments for consistency with
20760 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20762 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
20764 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
20766 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
20768 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20770 * dispnew.c (scrolling_window): Don't exclude the case that the
20771 last enabled row in the desired matrix touches the bottom boundary.
20773 2011-05-21 Glenn Morris <rgm@gnu.org>
20775 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
20776 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
20777 and add some more files.
20779 2011-05-20 Eli Zaretskii <eliz@gnu.org>
20781 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
20782 report_file_error introduced by the change from 2011-05-07.
20784 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
20786 * systime.h (Time): Define only if emacs is defined.
20787 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
20788 where the include path doesn't have X11/X.h by default. See
20789 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
20791 2011-05-20 Kenichi Handa <handa@m17n.org>
20793 * composite.c (find_automatic_composition): Fix previous change.
20795 2011-05-20 Glenn Morris <rgm@gnu.org>
20797 * lisp.mk: New file, split from Makefile.in.
20798 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
20799 (shortlisp): Remove.
20800 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
20802 2011-05-19 Glenn Morris <rgm@gnu.org>
20804 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
20805 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
20806 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
20807 (lisp): Set the order to that of loadup.el.
20808 (shortlisp): Make it a copy of $lisp.
20809 (SOME_MACHINE_LISP): Remove.
20810 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
20811 Use just $shortlisp, not $SOME_MACHINE_LISP too.
20813 2011-05-18 Kenichi Handa <handa@m17n.org>
20815 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
20816 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
20817 (find_automatic_composition): Mostly rewrite for efficiency.
20819 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
20821 * makefile.w32-in: Update dependencies.
20823 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
20825 * menu.c: Include limits.h (fixes the MS-Windows build broken by
20826 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
20828 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
20830 Fix some integer overflow issues, such as string length overflow.
20832 * insdel.c (count_size_as_multibyte): Check for string overflow.
20834 * character.c (lisp_string_width): Check for string overflow.
20835 Use EMACS_INT, not int, for string indexes and lengths; in
20836 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
20837 the resulting string length overflows an EMACS_INT; instead,
20838 report a string overflow if no precision given. When checking for
20839 precision exhaustion, use a check that cannot possibly have
20840 integer overflow. (Bug#8675)
20841 * character.h (lisp_string_width): Adjust to new signature.
20843 * alloc.c (string_overflow): New function.
20844 (Fmake_string): Use it. This doesn't change behavior, but saves
20845 a few bytes and will simplify future changes.
20846 * character.c (string_escape_byte8): Likewise.
20847 * lisp.h (string_overflow): New decl.
20849 Fixups, following up to the user-interface timestamp change.
20850 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
20851 for UI timestamps, instead of unsigned long.
20852 * msdos.c (mouse_get_pos): Likewise.
20853 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
20854 * w32gui.h (Time): Define by including "systime.h" rather than by
20855 declaring it ourselves. (Bug#8664)
20857 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
20858 * image.c (clear_image_cache): Likewise.
20860 * term.c (term_mouse_position): Don't assume time_t wraparound.
20862 Be more systematic about user-interface timestamps.
20863 Before, the code sometimes used 'Time', sometimes 'unsigned long',
20864 and sometimes 'EMACS_UINT', to represent these timestamps.
20865 This change causes it to use 'Time' uniformly, as that's what X uses.
20866 This makes the code easier to follow, and makes it easier to catch
20867 integer overflow bugs such as Bug#8664.
20868 * frame.c (Fmouse_position, Fmouse_pixel_position):
20869 Use Time, not unsigned long, for user-interface timestamps.
20870 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
20871 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
20872 * keyboard.h (last_event_timestamp): Likewise.
20873 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
20874 * menu.h (xmenu_show): Likewise.
20875 * term.c (term_mouse_position): Likewise.
20876 * termhooks.h (struct input_event.timestamp): Likewise.
20877 (struct terminal.mouse_position_hook): Likewise.
20878 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
20879 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
20880 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
20881 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
20882 what it was before.
20883 * menu.h, termhooks.h: Include "systime.h", for Time.
20885 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
20886 Don't assume that the difference between two unsigned long values
20887 can fit into an integer. At this point, we know button_down_time
20888 <= event->timestamp, so the difference must be nonnegative, so
20889 there's no need to cast the result if double-click-time is
20890 nonnegative, as it should be; check that it's nonnegative, just in
20891 case. This bug is triggered when events are more than 2**31 ms
20892 apart (about 25 days). (Bug#8664)
20894 * xselect.c (last_event_timestamp): Remove duplicate decl.
20895 (x_own_selection): Remove needless cast to unsigned long.
20897 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
20898 that always fit in int. Use a sentinel instead of a counter, to
20899 avoid a temp and to allay GCC's concerns about possible int overflow.
20900 * frame.h (struct frame): Use int for menu_bar_items_used
20901 instead of EMACS_INT, since it always fits in int.
20903 * menu.c (grow_menu_items): Check for int overflow.
20905 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
20907 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
20908 Before, the code was not consistent. These values cannot exceed
20909 2**31 - 1 so there's no need to make them unsigned.
20910 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
20911 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
20912 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
20914 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
20916 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
20917 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
20918 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
20919 presumably because the widths might not match.
20921 * window.c (size_window): Avoid needless test at loop start.
20923 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
20925 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
20927 2011-05-12 Drew Adams <drew.adams@oracle.com>
20929 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
20931 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20933 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
20934 `width' to `bar_area_x' and `bar_area_width', respectively.
20935 (x_scroll_run): Take account of fringe background extension.
20937 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
20938 Rename local vars `left' and `width' to `bar_area_x' and
20939 `bar_area_width', respectively.
20940 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
20941 background extension.
20943 2011-05-10 Jim Meyering <meyering@redhat.com>
20945 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
20947 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
20949 * image.c (Finit_image_library): Return t for built-in image types,
20950 like pbm and xbm. (Bug#8640)
20952 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
20954 * w32menu.c (set_frame_menubar): Fix submenu allocation.
20956 2011-05-07 Eli Zaretskii <eliz@gnu.org>
20958 * w32console.c (Fset_screen_color): Doc fix.
20959 (Fget_screen_color): New function.
20960 (syms_of_ntterm): Defsubr it.
20962 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
20963 unlink the temporary file if Fcall_process didn't create it in the
20965 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
20966 child process will be redirected to a file specified with `:file'.
20967 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
20968 cue to call_process_cleanup not to close that handle.
20970 2011-05-07 Ben Key <bkey76@gmail.com>
20972 * makefile.w32-in: The bootstrap-temacs rule now makes use of
20973 one of two shell specific rules, either bootstrap-temacs-CMD or
20974 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
20975 to the previous implementation of the bootstrap-temacs rule.
20976 The bootstrap-temacs-CMD rule is similar to the previous
20977 implementation of the bootstrap-temacs rule except that it
20978 makes use of the ESC_CFLAGS variable instead of the CFLAGS
20981 These changes, along with some changes to nt/configure.bat,
20982 nt/gmake.defs, and nt/nmake.defs, are required to extend my
20983 earlier fix to add support for --cflags and --ldflags options
20984 that include quotes so that it works whether make uses cmd or
20987 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
20989 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
20990 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
20992 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
20993 a string. Handle both cases.
20994 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
20995 (Fdbus_register_method): Use Qinvalid_function.
20997 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
20999 * makefile.w32-in: Update dependencies.
21000 (LISP_H): Add inttypes.h and stdin.h.
21001 (PROCESS_H): Add unistd.h.
21003 2011-05-06 Eli Zaretskii <eliz@gnu.org>
21005 * lread.c: Include limits.h (fixes the MS-Windows build broken by
21006 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
21008 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
21010 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
21012 * term.c (vfatal): Remove stray call to va_end.
21013 It's not needed and the C Standard doesn't allow it here anyway.
21015 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
21016 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
21018 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
21021 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
21023 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
21025 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
21027 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
21029 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
21031 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
21032 * charset.c (Fdefine_charset_internal): Don't initialize
21033 charset.code_space[15]. The value was garbage, on hosts with
21034 32-bit int (Bug#8600).
21036 * lread.c (read_integer): Be more consistent with string-to-number.
21037 Use string_to_number to do the actual conversion; this avoids
21038 rounding errors and fixes some other screwups. Without this fix,
21039 for example, #x1fffffffffffffff was misread as -2305843009213693952.
21040 (digit_to_number): Move earlier, for benefit of read_integer.
21041 Return -1 if the digit is out of range for the base, -2 if it is
21042 not a digit in any supported base. (Bug#8602)
21044 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
21046 * dispnew.c (scrolling_window): Return 1 if we scrolled,
21047 to match comment at start of function. This also removes a
21048 GCC warning about overflow in a 32+64-bit port.
21050 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
21052 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
21053 Reported by Stefan Monnier in
21054 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
21055 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
21056 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
21058 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
21059 (EMACS_UINTPTR): Likewise, with uintptr_t.
21061 * lisp.h: Prefer 64-bit EMACS_INT if available.
21062 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
21063 on 32-bit hosts that have 64-bit int, so that they can access
21065 However, temporarily disable this change unless the temporary
21066 symbol WIDE_EMACS_INT is defined.
21068 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
21070 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
21071 This removes an assumption that EMACS_INT and long are the same
21072 width as pointers. The assumption is true for Emacs porting targets
21073 now, but we want to make other targets possible.
21074 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
21075 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
21076 In the rest of the code, change types of integers that hold casted
21077 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
21078 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
21079 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
21080 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
21081 No need to cast type when ORing.
21082 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
21083 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
21084 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
21085 assume EMACS_INT is the same width as char *.
21086 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
21087 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
21088 Remove no-longer-needed casts.
21089 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
21090 (xg_tool_bar_help_callback, xg_make_tool_item):
21091 Use EMACS_INTPTR to hold an integer
21092 that will be cast to void *; this can avoid a GCC warning
21093 if EMACS_INT is not the same width as void *.
21094 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
21095 * xdisp.c (display_echo_area_1, resize_mini_window_1):
21096 (current_message_1, set_message_1):
21097 Use a local to convert to proper width without a cast.
21098 * xmenu.c (dialog_selection_callback): Likewise.
21100 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
21101 Also, don't assume VALBITS / RAND_BITS is less than 5,
21102 and don't rely on undefined behavior when shifting a 1 left into
21104 * lisp.h (get_random): Change signature to match.
21106 * lread.c (hash_string): Use size_t, not int, for hash computation.
21107 Normally we prefer signed values; but hashing is special, because
21108 it's better to use unsigned division on hash table sizes so that
21109 the remainder is nonnegative. Also, size_t is the natural width
21110 for hashing into memory. The previous code used 'int', which doesn't
21111 retain enough info to hash well into very large tables.
21112 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
21114 * dbusbind.c: Don't possibly lose pointer info when converting.
21115 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
21116 Use XPNTR rather than XHASH, so that the high-order bits of
21117 the pointer aren't lost when converting through void *.
21119 * eval.c (Fautoload): Don't double-shift a pointer.
21121 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
21123 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
21125 * gnutls.c (DEF_GNUTLS_FN):
21126 * image.c (DEF_IMGLIB_FN): Make function pointers static.
21128 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
21130 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
21133 2011-05-05 Eli Zaretskii <eliz@gnu.org>
21135 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
21136 New version that can reserve upto 2GB of heap space.
21138 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
21140 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
21142 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
21144 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
21145 `gnutls_certificate_set_x509_key_file'.
21147 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
21149 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
21150 Update dependencies.
21152 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
21154 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
21155 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
21156 Remove unused parameter `fildes'.
21157 * process.c (read_process_output, send_process): Don't pass it.
21159 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
21161 Fix previous change: the library cache is defined in w32.c.
21162 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
21163 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
21165 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
21167 Implement dynamic loading of GnuTLS on Windows.
21169 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
21170 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
21171 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
21174 * gnutls.c (Qgnutls_dll): Define.
21175 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
21176 (gnutls_*): Declare function pointers.
21177 (init_gnutls_functions): New function to initialize function pointers.
21178 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
21179 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
21180 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
21181 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
21182 (emacs_gnutls_write, emacs_gnutls_read)
21183 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
21184 (Fgnutls_available_p): New function.
21185 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
21186 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
21187 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
21189 * image.c: Include w32.h.
21190 (Vimage_type_cache): Delete.
21191 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
21192 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
21193 (w32_delayed_load): Move to w32.c.
21195 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
21197 * w32.c (QCloaded_from, Vlibrary_cache): Define.
21198 (w32_delayed_load): Move from image.c. When loading a library, record
21199 its filename in the :loaded-from property of the library id.
21200 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
21201 Initialize and staticpro them.
21202 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
21204 * process.c: Include lisp.h before w32.h, not after.
21205 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
21206 instead of gnutls_record_check_pending.
21208 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
21210 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
21212 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
21213 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
21216 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
21218 * xterm.c (x_set_frame_alpha): Do not set property on anything
21219 else than FRAME_X_OUTER_WINDOW (Bug#8608).
21221 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
21223 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
21225 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
21227 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
21228 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
21229 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
21230 (gnutls_global_initialized, Qgnutls_bootprop_priority)
21231 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
21232 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
21233 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
21234 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
21235 (Qgnutls_bootprop_callbacks_verify): Make static.
21237 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
21239 * callproc.c: Indentation fixup.
21241 * sysdep.c (wait_for_termination_1): Make static.
21242 (wait_for_termination, interruptible_wait_for_termination):
21243 Move after wait_for_termination_1.
21245 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
21247 * sysdep.c (interruptible_wait_for_termination): New function
21248 which is like wait_for_termination, but allows keyboard
21251 * callproc.c (Fcall_process): Add (:file "file") as an option for
21253 (Fcall_process_region): Ditto.
21255 2011-04-30 Eli Zaretskii <eliz@gnu.org>
21257 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
21258 rather than `XVECTOR (FOO)->size'.
21260 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
21261 inttypes.h, as a gnulib replacement is used if it not available in
21264 2011-04-21 Eli Zaretskii <eliz@gnu.org>
21266 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
21267 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
21268 of MOST_POSITIVE_FIXNUM. (Bug#8528)
21270 * coding.c (coding_alloc_by_realloc): Error out if destination
21271 will grow beyond MOST_POSITIVE_FIXNUM.
21272 (decode_coding_emacs_mule): Abort if there isn't enough place in
21273 charbuf for the composition carryover bytes. Reserve an extra
21274 space for up to 2 characters produced in a loop.
21275 (decode_coding_iso_2022): Abort if there isn't enough place in
21276 charbuf for the composition carryover bytes.
21278 2011-04-21 Eli Zaretskii <eliz@gnu.org>
21280 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
21281 aborting when %lld or %lll format is passed.
21282 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
21283 %llo or %llx format is passed. (Bug#8545)
21285 * window.c (window_scroll_line_based): Use a marker instead of
21286 simple variables to record original value of point. (Bug#7952)
21288 * doprnt.c (doprnt): Fix the case where a multibyte sequence
21289 produced by %s or %c overflows available buffer space. (Bug#8545)
21291 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
21293 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
21294 (SIZE_MAX): Move defn after all includes, as they might #define it.
21296 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21298 * w32.c (init_environment): Warn about defaulting HOME to C:\.
21300 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21302 * keyboard.c (Qdelayed_warnings_hook): Define.
21303 (command_loop_1): Run `delayed-warnings-hook'
21304 if Vdelayed_warnings_list is non-nil.
21305 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
21306 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
21308 2011-04-28 Eli Zaretskii <eliz@gnu.org>
21310 * doprnt.c (doprnt): Don't return value smaller than the buffer
21311 size if the message was truncated. (Bug#8545).
21313 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21315 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
21316 (Fx_window_property): #if-0 the whole functions, not just the bodies.
21318 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21320 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
21322 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
21324 * makefile.w32-in: Update dependencies.
21326 2011-04-27 Eli Zaretskii <eliz@gnu.org>
21328 Improve `doprnt' and its usage. (Bug#8545)
21329 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
21330 `format_end'. Remove support for %l as a conversion specifier.
21331 Don't use xrealloc. Improve diagnostics when the %l size modifier
21332 is used. Update the commentary.
21334 * eval.c (verror): Simplify calculation of size_t.
21336 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
21339 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
21341 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
21344 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21346 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
21347 This makes this file independent of the recent pseudovector change.
21349 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
21351 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
21353 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
21354 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
21355 Remove unused local.
21356 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
21358 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
21359 GCC 4.6.0 optimizes based on type-based alias analysis.
21360 For example, if b is of type struct buffer * and v of type struct
21361 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
21362 != &v->size, and therefore "v->size = 1; b->size = 2; return
21363 v->size;" must therefore return 1. This assumption is incorrect
21364 for Emacs, since it type-puns struct Lisp_Vector * with many other
21365 types. To fix this problem, this patch adds a new type struct
21366 vectorlike_header that documents the constraints on layout of vectors
21367 and pseudovectors, and helps optimizing compilers not get fooled
21368 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
21369 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
21370 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
21372 (XSETPVECTYPE): Rewrite in terms of new macro.
21373 (XSETPVECTYPESIZE): New macro, specifying both type and size.
21374 This is a bit clearer, and further avoids the possibility of
21375 undesirable aliasing.
21376 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
21377 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
21378 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
21379 since Lisp_Subr is a special case (no "next" field).
21380 (ASIZE): Now uses header.size rather than size.
21381 All previous uses of XVECTOR (foo)->size replaced to use this macro,
21382 to avoid the hassle of writing XVECTOR (foo)->header.size.
21383 (struct vectorlike_header): New type.
21384 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
21385 object, to help avoid aliasing.
21386 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
21387 (SUBRP): Likewise, since Lisp_Subr is a special case.
21388 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
21389 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
21390 (struct Lisp_Hash_Table): Combine first two members into a single
21391 struct vectorlike_header member. All uses of "size" and "next" members
21392 changed to be "header.size" and "header.next".
21393 * buffer.h (struct buffer): Likewise.
21394 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
21395 * frame.h (struct frame): Likewise.
21396 * process.h (struct Lisp_Process): Likewise.
21397 * termhooks.h (struct terminal): Likewise.
21398 * window.c (struct save_window_data, struct saved_window): Likewise.
21399 * window.h (struct window): Likewise.
21400 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
21401 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
21402 * buffer.c (init_buffer_once): Likewise.
21403 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
21405 * process.c (Fformat_network_address): Use local var for size,
21408 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
21410 Make the Lisp reader and string-to-float more consistent (Bug#8525)
21411 * data.c (atof): Remove decl; no longer used or needed.
21412 (digit_to_number): Move to lread.c.
21413 (Fstring_to_number): Use new string_to_number function, to be
21414 consistent with how the Lisp reader treats infinities and NaNs.
21415 Do not assume that floating-point numbers represent EMACS_INT
21416 without losing information; this is not true on most 64-bit hosts.
21417 Avoid double-rounding errors, by insisting on integers when
21418 parsing non-base-10 numbers, as the documentation specifies.
21419 * lisp.h (string_to_number): New decl, replacing ...
21420 (isfloat_string): Remove.
21421 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
21422 (read1): Do not accept +. and -. as integers; this
21423 appears to have been a coding error. Similarly, do not accept
21424 strings like +-1e0 as floating point numbers. Do not report
21425 overflow for integer overflows unless the base is not 10 which
21426 means we have no simple and reliable way to continue.
21427 Break out the floating-point parsing into a new
21428 function string_to_number, so that Fstring_to_number parses
21429 floating point numbers consistently with the Lisp reader.
21430 (digit_to_number): Move here from data.c. Make it static inline.
21431 (E_CHAR, EXP_INT): Remove, replacing with ...
21432 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
21433 (string_to_number): New function, replacing isfloat_string.
21434 This function checks for valid syntax and produces the resulting
21435 Lisp float number too. Rework it so that string-to-number
21436 no longer mishandles examples like "1.0e+". Use strtoumax,
21437 so that overflow for non-base-10 numbers is reported only when
21438 there's no portable and simple way to convert to floating point.
21440 * textprop.c (set_text_properties_1): Rewrite for clarity,
21441 and to avoid GCC warning about integer overflow.
21443 * intervals.h (struct interval): Use EMACS_INT for members
21444 where EMACS_UINT might cause problems. See
21445 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
21446 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
21447 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
21449 (offset_intervals): Tell GCC not to worry about length overflow
21450 when negating a negative length.
21452 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
21453 (overrun_check_free): Likewise.
21455 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
21456 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
21459 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
21460 (gnutls_make_error): Rename local to avoid shadowing.
21461 (gnutls_emacs_global_deinit): ifdef out; not used.
21462 (Fgnutls_boot): Use const for pointer to readonly storage.
21463 Comment out unused local. Fix pointer signedness problems.
21465 * lread.c (openp): Don't stuff size_t into an 'int'.
21466 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
21467 about possible signed overflow.
21469 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
21470 (GDK_KEY_g): Don't define if already defined.
21471 (xg_prepare_tooltip): Avoid pointer signedness problem.
21472 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
21474 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
21475 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
21477 * xfns.c (Fx_window_property): Simplify a bit,
21478 to make a bit faster and to avoid GCC 4.6.0 warning.
21479 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
21481 * fns.c (internal_equal): Don't assume size_t fits in int.
21483 * alloc.c (compact_small_strings): Tighten assertion a little.
21485 Replace pEd with more-general pI, and fix some printf arg casts.
21486 * lisp.h (pI): New macro, generalizing old pEd macro to other
21487 conversion specifiers. For example, use "...%"pI"d..." rather
21488 than "...%"pEd"...".
21489 (pEd): Remove. All uses replaced with similar uses of pI.
21490 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
21491 * alloc.c (check_pure_size): Don't overflow by converting size to int.
21492 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
21493 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
21494 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
21495 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
21496 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
21498 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
21499 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
21500 * print.c (safe_debug_print, print_object): Likewise.
21501 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
21503 Use pI instead of if-then-else-abort. Use %p to avoid casts,
21504 avoiding the 0 flag, which is not portable.
21505 * process.c (Fmake_network_process): Use pI to avoid cast.
21506 * region-cache.c (pp_cache): Likewise.
21507 * xdisp.c (decode_mode_spec): Likewise.
21508 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
21509 behavior on 64-bit hosts with printf arg.
21510 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
21511 (x_stop_queuing_selection_requests): Likewise.
21512 (x_get_window_property): Don't truncate byte count to an 'int'
21515 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
21516 here, since it parses constructs like leading '-' and spaces,
21517 which are not wanted; and it overflows with large numbers.
21518 Instead, simply match F[0-9]+, which is what is wanted anyway.
21520 * alloc.c: Remove unportable assumptions about struct layout.
21521 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
21522 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
21523 (allocate_vectorlike, make_pure_vector): Use the new macros,
21524 plus offsetof, to remove unportable assumptions about struct layout.
21525 These assumptions hold on all porting targets that I know of, but
21526 they are not guaranteed, they're easy to remove, and removing them
21527 makes further changes easier.
21529 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
21530 This doesn't fix a bug but makes the code clearer.
21531 (string_overrun_cookie): Now const. Use initializers that
21532 don't formally overflow signed char, to avoid warnings.
21533 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
21534 can cause Emacs to crash when string overrun checking is enabled.
21535 (allocate_buffer): Don't assume sizeof (struct buffer) is a
21536 multiple of sizeof (EMACS_INT); it need not be, if
21537 alignof(EMACS_INT) < sizeof (EMACS_INT).
21538 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
21540 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
21542 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
21544 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
21546 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
21547 supposed to be handshaking. (Bug#8556)
21548 Reported by Paul Eggert <eggert@cs.ucla.edu>.
21550 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
21552 * lisp.h (Qdebug): List symbol.
21553 * eval.c (Qdebug): Restore global linkage.
21554 * keyboard.c (debug-on-event): New variable.
21555 (handle_user_signal): Break into debugger when debug-on-event
21556 matches the current signal symbol.
21558 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
21560 * alloc.c (check_sblock, check_string_bytes)
21561 (check_string_free_list): Convert to standard C.
21563 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
21565 * w32.c (emacs_gnutls_push): Fix typo.
21567 2011-04-25 Eli Zaretskii <eliz@gnu.org>
21569 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
21570 "cast to pointer from integer of different size".
21572 Improve doprnt and its use in verror. (Bug#8545)
21573 * doprnt.c (doprnt): Document the set of format control sequences
21574 supported by the function. Use SAFE_ALLOCA instead of always
21577 * eval.c (verror): Don't limit the buffer size at size_max-1, that
21578 is one byte too soon. Don't use xrealloc; instead xfree and
21581 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
21583 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
21586 * gnutls.c: Renamed global_initialized to
21587 gnutls_global_initialized. Added internals for the
21588 :verify-hostname-error, :verify-error, and :verify-flags
21589 parameters of `gnutls-boot' and documented those parameters in the
21590 docstring. Start callback support.
21591 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
21592 unless a fatal error occurred. Call gnutls_alert_send_appropriate
21593 on error. Return error code.
21594 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
21595 (emacs_gnutls_read): Likewise.
21596 (Fgnutls_boot): Return handshake error code.
21597 (emacs_gnutls_handle_error): New function.
21598 (wsaerror_to_errno): Likewise.
21600 * w32.h (emacs_gnutls_pull): Add prototype.
21601 (emacs_gnutls_push): Likewise.
21603 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
21604 (emacs_gnutls_push): Likewise.
21606 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
21608 * process.c (wait_reading_process_output): Check if GnuTLS
21609 buffered some data internally if no FDs are set for TLS
21612 * makefile.w32-in (OBJ2): Add gnutls.$(O).
21613 (LIBS): Link to USER_LIBS.
21614 ($(BLD)/gnutls.$(0)): New target.
21616 2011-04-24 Eli Zaretskii <eliz@gnu.org>
21618 * xdisp.c (handle_single_display_spec): Rename the
21619 display_replaced_before_p argument into display_replaced_p, to
21620 make it consistent with the commentary. Fix typos in the
21623 * textprop.c (syms_of_textprop): Remove dead code.
21624 (copy_text_properties): Delete obsolete commentary about an
21625 interface that was deleted long ago. Fix typos in the description
21628 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
21629 to changes in oldXMenu/XMenu.h from 2011-04-16.
21630 <menu_help_message, prev_menu_help_message>: Constify.
21631 (IT_menu_make_room): menu->help_text is now `const char **';
21634 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
21635 to changes in oldXMenu/XMenu.h from 2011-04-16.
21636 (struct XMenu): Declare `help_text' `const char **'.
21638 * xfaces.c <Qunspecified>: Make extern again.
21640 * syntax.c: Include sys/types.h before including regex.h, as
21643 * doc.c (get_doc_string): Improve the format passed to `error'.
21645 * doprnt.c (doprnt): Improve commentary.
21647 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
21649 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
21652 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
21653 changes in globals.h immediately force recompilation.
21654 (TAGS): Depend on $(CURDIR)/m/intel386.h and
21655 $(CURDIR)/s/ms-w32.h.
21656 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
21658 * character.c (Fchar_direction): Function deleted.
21659 (syms_of_character): Don't defsubr it.
21660 <char-direction-table>: Deleted.
21662 2011-04-23 Eli Zaretskii <eliz@gnu.org>
21664 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
21665 * doprnt.c: Include limits.h.
21666 (SIZE_MAX): New macro.
21667 (doprnt): Return a size_t value. 2nd arg is now size_t.
21668 Many local variables are now size_t instead of int or unsigned.
21669 Improve overflow protection. Support `l' modifier for integer
21670 conversions. Support %l conversion. Don't assume an EMACS_INT
21671 argument for integer conversions and for %c.
21673 * lisp.h (doprnt): Restore prototype.
21675 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
21676 $(SRC)/character.h.
21678 * Makefile.in (base_obj): Add back doprnt.o.
21680 * deps.mk (doprnt.o): Add back prerequisites.
21681 (callint.o): Depend on character.h.
21683 * eval.c (internal_lisp_condition_case): Include the handler
21684 representation in the error message.
21685 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
21686 when breaking from the loop.
21688 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
21690 * callint.c (Fcall_interactively): When displaying error message
21691 about invalid control letter, pass the character's codepoint, not
21692 a pointer to its multibyte form. Improve display of the character
21693 in octal and display also its hex code.
21695 * character.c (char_string): Use %x to display the (unsigned)
21696 codepoint of an invalid character, to avoid displaying a bogus
21699 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
21700 `error', not SYMBOL_NAME itself.
21702 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
21703 character arguments to `error'.
21705 * charset.c (check_iso_charset_parameter): Fix incorrect argument
21706 to `error' in error message about FINAL_CHAR argument. Make sure
21707 FINAL_CHAR is a character, and use %c when it is passed as
21708 argument to `error'.
21710 2011-04-23 Eli Zaretskii <eliz@gnu.org>
21712 * s/ms-w32.h (localtime): Redirect to sys_localtime.
21714 * w32.c: Include <time.h>.
21715 (sys_localtime): New function.
21717 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
21719 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
21721 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
21723 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
21725 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
21726 zombies (Bug#8467).
21728 2011-04-19 Eli Zaretskii <eliz@gnu.org>
21730 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
21731 gl_state.e_property when gl_state.object is Qt.
21733 * insdel.c (make_gap_larger): Remove limitation of buffer size
21736 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
21738 * xdisp.c (lookup_glyphless_char_display)
21739 (produce_glyphless_glyph): Handle cons cell entry in
21740 glyphless-char-display.
21741 (Vglyphless_char_display): Document it.
21743 * term.c (produce_glyphless_glyph): Handle cons cell entry in
21744 glyphless-char-display.
21746 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
21748 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
21750 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
21752 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
21753 definition for no-X builds.
21755 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
21757 Static checks with GCC 4.6.0 and non-default toolkits.
21759 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
21761 * process.c (keyboard_bit_set): Define only if SIGIO.
21762 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
21763 (send_process): Repair possible setjmp clobbering.
21765 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
21767 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
21769 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
21771 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
21772 Define only if needed.
21774 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
21775 by pacifying GCC about it. Maybe it's time to retire it?
21776 * xfaces.c (USG, __TIMEVAL__): Likewise.
21778 * dispextern.h (struct redisplay_interface): Rename param
21779 to avoid shadowing.
21780 * termhooks.h (struct terminal): Likewise.
21781 * xterm.c (xembed_send_message): Likewise.
21783 * insdel.c (make_gap_smaller): Define only if
21784 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
21786 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
21789 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
21790 so that we aren't warned about unused symbols.
21792 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
21794 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
21796 * xfns.c (x_real_positions): Mark locals as initialized.
21798 * xmenu.c (xmenu_show): Don't use uninitialized vars.
21800 * xterm.c: Fix problems found by static analysis with other toolkits.
21801 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
21802 (x_dispatch_event): Declare static if USE_GTK, and
21803 define if USE_GTK || USE_X_TOOLKIT.
21804 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
21805 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
21806 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
21807 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
21809 * xmenu.c (menu_help_callback): Pointer type fixes.
21810 Use const pointers when pointing at readonly data. Avoid pointer
21811 signedness clashes.
21812 (FALSE): Remove unused macro.
21813 (update_frame_menubar): Remove unused decl.
21815 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
21817 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
21818 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
21819 (single_menu_item): Rename local to avoid shadowing.
21821 * keyboard.c (make_lispy_event): Remove unused local var.
21823 * frame.c, frame.h (x_get_resource_string): Bring this back, but
21824 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
21826 * bitmaps: Change bitmaps from unsigned char back to the X11
21827 compatible char. Avoid the old compiler warnings about
21828 out-of-range initializers by using, for example, '\xab' rather
21831 * xgselect.c (xgselect_initialize): Check vs interface
21832 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
21834 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
21836 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
21837 to read-only memory.
21839 * fns.c (vector): Remove; this old hack is no longer needed.
21841 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
21843 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
21845 * xrdb.c (x_load_resources): Omit unused local.
21847 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
21848 (x_window): Rename locals to avoid shadowing.
21849 (USG): Use the kludged USG macro, to pacify gcc.
21851 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
21852 (x_term_init): Remove local to avoid shadowing.
21854 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
21856 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
21857 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
21859 2011-04-16 Eli Zaretskii <eliz@gnu.org>
21861 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
21863 Fix regex.c, syntax.c and friends for buffers > 2GB.
21864 * syntax.h (struct gl_state_s): Declare character position members
21867 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
21869 * textprop.c (verify_interval_modification, interval_of):
21870 Declare arguments EMACS_INT.
21872 * intervals.c (adjust_intervals_for_insertion): Declare arguments
21875 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
21877 * indent.c (Fvertical_motion): Local variable it_start is now
21880 * regex.c (re_match, re_match_2, re_match_2_internal)
21881 (bcmp_translate, regcomp, regexec, print_double_string)
21882 (group_in_compile_stack, re_search, re_search_2, regex_compile)
21883 (re_compile_pattern, re_exec): Declare arguments and local
21884 variables `size_t' and `ssize_t' and return values `regoff_t', as
21886 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
21887 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
21888 <compile_stack_type>: `size' and `avail' are now `size_t'.
21890 * regex.h <regoff_t>: Use ssize_t, not int.
21891 (re_search, re_search_2, re_match, re_match_2): Arguments that
21892 specify buffer/string position and length are now ssize_t and
21893 size_t. Return type is regoff_t.
21895 2011-04-16 Ben Key <bkey76@gmail.com>
21897 * nsfont.m: Fixed bugs in ns_get_family and
21898 ns_descriptor_to_entity that were caused by using free to
21899 deallocate memory blocks that were allocated by xmalloc (via
21900 xstrdup). This caused Emacs to crash when compiled with
21901 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
21902 --enable-checking=xmallocoverrun). xfree is now used to
21903 deallocate these memory blocks.
21905 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
21907 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
21909 emacs_write: Accept and return EMACS_INT for sizes.
21910 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
21912 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
21913 Accept and return EMACS_INT.
21914 (emacs_gnutls_write): Return the number of bytes written on
21916 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
21917 (emacs_read, emacs_write): Remove check for negative size, as the
21918 Emacs source code has been audited now.
21919 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
21920 (emacs_read, emacs_write): Use it.
21921 * process.c (send_process): Adjust to the new signatures of
21922 emacs_write and emacs_gnutls_write. Do not attempt to store
21923 a byte offset into an 'int'; it might overflow.
21924 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
21926 * sound.c: Don't assume sizes fit in 'int'.
21927 (struct sound_device.period_size, alsa_period_size):
21928 Return EMACS_INT, not int.
21929 (struct sound_device.write, vox_write, alsa_write):
21930 Accept EMACS_INT, not int.
21931 (wav_play, au_play): Use EMACS_INT to store sizes and to
21932 record read return values.
21934 2011-04-15 Ben Key <bkey76@gmail.com>
21936 * keyboard.c (Qundefined): Don't declare static since it is used
21938 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
21939 static since they are used in nsfont.m.
21941 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
21943 * process.c (Qprocessp): Don't declare static.
21944 * lisp.h (Qprocessp): Declare again.
21946 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
21948 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
21950 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
21952 Improve C-level modularity by making more things 'static'.
21954 Don't publish debugger-only interfaces to other modules.
21955 * lisp.h (safe_debug_print, debug_output_compilation_hack):
21956 (verify_bytepos, count_markers): Move decls to the only modules
21958 * region-cache.h (pp_cache): Likewise.
21959 * window.h (check_all_windows): Likewise.
21960 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
21962 * sysdep.c (croak): Now static, if
21963 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
21964 * syssignal.h (croak): Declare only if not static.
21966 * alloc.c (refill_memory_reserve): Now static if
21967 !defined REL_ALLOC || defined SYSTEM_MALLOC.
21968 * lisp.h (refill_memory_reserve): Declare only if not static.
21970 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
21971 Define only if USE_LUCID.
21973 * xrdb.c (x_customization_string, x_rm_string): Now static.
21975 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
21976 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
21978 * xdisp.c (draw_row_with_mouse_face): Now static.
21979 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
21981 * window.h (check_all_windows): Mark externally visible.
21983 * window.c (window_deletion_count): Now static.
21985 * undo.c: Make symbols static if they're not exported.
21986 (last_undo_buffer, last_boundary_position, pending_boundary):
21989 * textprop.c (interval_insert_behind_hooks): Now static.
21990 (interval_insert_in_front_hooks): Likewise.
21992 * term.c: Make symbols static if they're not exported.
21993 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
21994 (max_frame_lines, tty_set_terminal_modes):
21995 (tty_reset_terminal_modes, tty_turn_off_highlight):
21996 (get_tty_terminal): Now static.
21997 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
21998 * termhooks.h (term_mouse_moveto): Do not declare if
21999 HAVE_WINDOW_SYSTEM.
22000 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
22001 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
22003 * sysdep.c: Make symbols static if they're not exported.
22004 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
22006 (sigprocmask_set, full_mask): Remove; unused.
22007 (wait_debugging): Mark as visible.
22008 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
22009 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
22011 * syntax.c (syntax_temp): Define only if !__GNUC__.
22013 * sound.c (current_sound_device, current_sound): Now static.
22015 * search.c (searchbufs, searchbuf_head): Now static.
22017 * scroll.c (scroll_cost): Remove; unused.
22018 * dispextern.h (scroll_cost): Remove decl.
22020 * region-cache.h (pp_cache): Mark as externally visible.
22022 * process.c: Make symbols static if they're not exported.
22023 (process_tick, update_tick, create_process, chan_process):
22024 (Vprocess_alist, proc_buffered_char, datagram_access):
22025 (fd_callback_data, send_process_frame, process_sent_to): Now static.
22026 (deactivate_process): Mark defn as static, as well as decl.
22027 * lisp.h (create_process): Remove decl.
22028 * process.h (chan_process, Vprocess_alist): Remove decls.
22030 * print.c: Make symbols static if they're not exported.
22031 (print_depth, new_backquote_output, being_printed, print_buffer):
22032 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
22033 (print_interval, print_number_index, initial_stderr_stream):
22035 * lisp.h (Fprinc): Remove decl.
22036 (debug_output_compilation_hack): Mark as externally visible.
22038 * sysdep.c (croak): Move decl from here to syssignal.h.
22039 * syssignal.h (croak): Put it here, so the API can be checked when
22040 'croak' is called from dissociate_if_controlling_tty.
22042 * minibuf.c: Make symbols static if they're not exported.
22043 (minibuf_save_list, choose_minibuf_frame): Now static.
22044 * lisp.h (choose_minibuf_frame): Remove decl.
22046 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
22048 * lread.c: Make symbols static if they're not exported.
22049 (read_objects, initial_obarray, oblookup_last_bucket_number):
22051 (make_symbol): Remove; unused.
22052 * lisp.h (initial_obarray, make_symbol): Remove decls.
22054 * keyboard.c: Make symbols static if they're not exported.
22055 (single_kboard, recent_keys_index, total_keys, recent_keys):
22056 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
22057 (this_single_command_key_start, echoing, last_auto_save):
22058 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
22059 (command_loop, echo_now, keyboard_init_hook, help_char_p):
22060 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
22061 (Vlispy_mouse_stem, double_click_count):
22063 (force_auto_save_soon): Define only if SIGDANGER.
22064 (ignore_mouse_drag_p): Now static if
22065 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
22066 (print_help): Remove; unused.
22067 (stop_character, last_timer_event): Mark as externally visible.
22068 * keyboard.h (ignore_mouse_drag_p): Declare only if
22069 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
22070 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
22071 * lisp.h (echoing): Remove decl.
22072 (force_auto_save_soon): Declare only if SIGDANGER.
22073 * xdisp.c (redisplay_window): Simplify code, to make it more
22074 obvious that ignore_mouse_drag_p is not accessed if !defined
22075 USE_GTK && !defined HAVE_NS.
22077 * intervals.c: Make symbols static if they're not exported.
22078 (merge_properties_sticky, merge_interval_right, delete_interval):
22080 * intervals.h (merge_interval_right, delete_interval): Remove decls.
22082 * insdel.c: Make symbols static if they're not exported.
22083 However, leave prepare_to_modify_buffer alone. It's never
22084 called from outside this function, but that appears to be a bug.
22085 (combine_after_change_list, combine_after_change_buffer):
22086 (adjust_after_replace, signal_before_change): Now static.
22087 (adjust_after_replace_noundo): Remove; unused.
22088 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
22089 (signal_before_change): Remove decls.
22091 * indent.c (val_compute_motion, val_vmotion): Now static.
22093 * image.c: Make symbols static if they're not exported.
22094 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
22096 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
22097 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
22099 * fringe.c (standard_bitmaps): Now static.
22100 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
22102 * frame.c: Make symbols static if they're not exported.
22103 (x_report_frame_params, make_terminal_frame): Now static.
22104 (get_frame_param): Now static, unless HAVE_NS.
22105 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
22106 (x_get_resource_string): Remove; not used.
22107 * frame.h (make_terminal_frame, x_report_frame_params):
22108 (x_get_resource_string); Remove decls.
22109 (x_fullscreen_adjust): Declare only if WINDOWSNT.
22110 * lisp.h (get_frame_param): Declare only if HAVE_NS.
22112 * font.c, fontset.c: Make symbols static if they're not exported.
22113 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
22114 (FACE_SUITABLE_FOR_CHAR_P): Use it.
22115 * font.c (font_close_object): Now static.
22116 * font.h (font_close_object): Remove.
22117 * fontset.c (FONTSET_OBJLIST): Remove.
22118 (free_realized_fontset) #if-0 the body, which does nothing.
22119 (face_suitable_for_char_p): #if-0, as it's never called.
22120 * fontset.h (face_suitable_for_char_p): Remove decl.
22121 * xfaces.c (face_at_string_position):
22122 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
22123 since 0 is always ASCII.
22125 * fns.c (weak_hash_tables): Now static.
22127 * fileio.c: Make symbols static if they're not exported.
22128 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
22129 (Vwrite_region_annotation_buffers): Now static.
22131 * eval.c: Make symbols static if they're not exported.
22132 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
22133 * lisp.h (backtrace_list): Remove decl.
22135 * emacs.c: Make symbols static if they're not exported.
22136 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
22137 (fatal_error_code, fatal_error_signal_hook, standard_args):
22139 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
22140 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
22141 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
22142 * lisp.h (fatal_error_signal_hook): Remove decl.
22143 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
22145 * editfns.c: Move a (normally-unused) function to its only use.
22146 * editfns.c, lisp.h (get_operating_system_release): Remove.
22147 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
22148 worth the hassle of breaking this out.
22150 * xterm.c: Make symbols static if they're not exported.
22151 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
22152 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
22153 (x_destroy_window, x_delete_display):
22155 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
22156 (x_mouse_leave): Remove; unused.
22157 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
22158 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
22159 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
22161 (x_mouse_leave): Declare only if WINDOWSNT.
22162 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
22163 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
22166 * ftxfont.c: Make symbols static if they're not exported.
22167 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
22169 * font.h (ftxfont_driver): Likewise.
22171 * xfns.c: Make symbols static if they're not exported.
22172 (x_last_font_name, x_display_info_for_name):
22173 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
22174 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
22175 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
22176 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
22177 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
22178 (last_show_tip_args): Now static.
22179 (xic_defaut_fontset, xic_create_fontsetname): Define only if
22180 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
22181 (x_screen_planes): Remove; unused.
22182 * dispextern.h (x_screen_planes): Remove decl.
22184 * dispnew.c: Make symbols static if they're not exported.
22185 * dispextern.h (redraw_garbaged_frames, scrolling):
22186 (increment_row_positions): Remove.
22187 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
22188 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
22190 (redraw_garbaged_frames): Remove; unused.
22192 * xfaces.c: Make symbols static if they're not exported.
22193 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
22195 * xterm.h (defined_color): Remove decls.
22196 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
22197 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
22198 (menu_face_changed_default, defined_color, free_realized_face):
22199 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
22200 (ascii_face_of_lisp_face): Remove; unused.
22202 * xdisp.c: Make symbols static if they're not exported.
22203 * dispextern.h (scratch_glyph_row, window_box_edges):
22204 (glyph_to_pixel_coords, set_cursor_from_row):
22205 (get_next_display_element, set_iterator_to_next):
22206 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
22207 (show_mouse_face): Remove decls
22208 * frame.h (message_buf_print): Likewise.
22209 * lisp.h (pop_message, set_message, check_point_in_composition):
22211 * xterm.h (set_vertical_scroll_bar): Likewise.
22212 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
22213 (message_buf_print, scratch_glyph_row, displayed_buffer):
22214 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
22215 (get_next_display_element, show_mouse_face, window_box_edges):
22216 (frame_to_window_pixel_xy, check_point_in_composition):
22217 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
22218 (glyph_to_pixel_coords): Remove; unused.
22220 * dired.c (file_name_completion): Now static.
22222 * dbusbind.c (xd_in_read_queued_messages): Now static.
22224 * lisp.h (circular_list_error, FOREACH): Remove; unused.
22225 * data.c (circular_list_error): Remove.
22227 * commands.h (last_point_position, last_point_position_buffer):
22228 (last_point_position_window): Remove decls.
22229 * keyboard.c: Make these variables static.
22231 * coding.h (coding, code_convert_region, encode_coding_gap):
22233 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
22234 (iso_code_class, detect_coding, code_convert_region): Now static.
22235 (encode_coding_gap): Remove; unused.
22237 * chartab.c (chartab_chars, chartab_bits): Now static.
22239 * charset.h (charset_iso_8859_1): Remove decl.
22240 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
22243 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
22244 * ccl.c (Vccl_program_table): Now static.
22245 (check_ccl_update): Remove; unused.
22247 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
22248 * category.h: ... from here.
22249 * category.c (check_category_table, set_category_set): Now static.
22251 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
22252 * lisp.h: Remove these decls.
22254 * buffer.c (buffer_count): Remove unused var.
22256 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
22257 so that it's not optimized away.
22258 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
22259 * dispextern.h (bidi_dump_cached_states): Remove, since it's
22260 exported only to the debugger.
22262 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
22263 * atimer.h (run_all_atimers): Remove; not exported.
22265 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
22266 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
22267 was inaccessible from Lisp.
22268 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
22269 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
22271 alloc.c: Import and export fewer symbols, and remove unused items.
22272 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
22274 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
22275 it's not optimized away by whole-program optimization.
22276 (message_enable_multibyte, free_misc): Remove.
22277 (catchlist, handlerlist, mark_backtrace):
22278 Declare only if BYTE_MARK_STACK.
22279 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
22280 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
22281 (message_enable_multibyte): Remove decl.
22282 (free_misc, interval_free_list, float_block, float_block_index):
22283 (n_float_blocks, float_free_list, cons_block, cons_block_index):
22284 (cons_free_list, last_marked_index):
22286 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
22287 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
22288 (mark_backtrace): Define only if BYTE_MARK_STACK.
22289 * xdisp.c (message_enable_multibyte): Now static.
22291 Declare Lisp_Object Q* variables to be 'static' if not exported.
22292 This makes it easier for human readers (and static analyzers)
22293 to see whether these variables are used from other modules.
22294 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
22295 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
22296 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
22297 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
22298 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
22299 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
22300 * xmenu.c, xselect.c:
22301 Declare Q* vars static if they are not used in other modules.
22302 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
22303 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
22304 Remove decls of unexported vars.
22305 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
22307 * lisp.h (DEFINE_FUNC): Make sname 'static'.
22309 Make Emacs functions such as Fatom 'static' by default.
22310 This makes it easier for human readers (and static analyzers)
22311 to see whether these functions can be called from other modules.
22312 DEFUN now defines a static function. To make the function external
22313 so that it can be used in other C modules, use the new macro DEFUE.
22314 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
22315 (Finit_image_library):
22316 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
22317 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
22318 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
22319 Remove decls, since these functions are now static.
22320 (Funintern, Fget_internal_run_time): New decls, since these functions
22321 were already external.
22323 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
22324 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
22325 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
22326 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
22327 * keyboard.c, keymap.c, lread.c:
22328 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
22329 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
22330 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
22331 Mark functions with DEFUE instead of DEFUN,
22332 if they are used in other modules.
22333 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
22334 decls for now-static functions.
22335 * buffer.h (Fdelete_overlay): Remove decl.
22336 * callproc.c (Fgetenv_internal): Mark as internal.
22337 * composite.c (Fremove_list_of_text_properties): Remove decl.
22338 (Fcomposition_get_gstring): New forward static decl.
22339 * composite.h (Fcomposite_get_gstring): Remove decl.
22340 * dired.c (Ffile_attributes): New forward static decl.
22341 * doc.c (Fdocumntation_property): New forward static decl.
22342 * eval.c (Ffetch_bytecode): New forward static decl.
22343 (Funintern): Remove extern decl; now in .h file where it belongs.
22344 * fileio.c (Fmake_symbolic_link): New forward static decl.
22345 * image.c (Finit_image_library): New forward static decl.
22346 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
22347 * intervals.h (Fprevious_property_change):
22348 (Fremove_list_of_text_properties): Remove decls.
22349 * keyboard.c (Fthis_command_keys): Remove decl.
22350 (Fcommand_execute): New forward static decl.
22351 * keymap.c (Flookup_key): New forward static decl.
22352 (Fcopy_keymap): Now static.
22353 * keymap.h (Flookup_key): Remove decl.
22354 * process.c (Fget_process): New forward static decl.
22355 (Fprocess_datagram_address): Mark as internal.
22356 * syntax.c (Fsyntax_table_p): New forward static decl.
22357 (skip_chars): Remove duplicate decl.
22358 * textprop.c (Fprevious_property_change): New forward static decl.
22359 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
22361 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
22362 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
22364 * editfns.c (Fformat): Remove unreachable code.
22366 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
22368 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
22371 2011-04-13 Eli Zaretskii <eliz@gnu.org>
22373 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
22374 when at ZV. (Bug#8487)
22376 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
22378 * charset.c (Fclear_charset_maps): Use xfree instead of free.
22380 * keyboard.c (parse_tool_bar_item): Likewise.
22381 * sound.c (sound_cleanup, alsa_close): Likewise.
22382 * termcap.c (tgetent): Likewise.
22383 * xfns.c (x_default_font_parameter): Likewise.
22384 * xsettings.c (read_and_apply_settings): Likewise.
22386 * alloc.c (overrun_check_malloc, overrun_check_realloc)
22387 (overrun_check_free): Protoize.
22389 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
22391 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
22392 since callers should never pass a negative size.
22393 Change the signature to match that of plain 'read' and 'write'; see
22394 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
22395 * lisp.h: Update prototypes of emacs_write and emacs_read.
22397 2011-04-11 Eli Zaretskii <eliz@gnu.org>
22399 * xdisp.c (redisplay_window): Don't try to determine the character
22400 position of the scroll margin if the window start point w->startp
22401 is outside the buffer's accessible region. (Bug#8468)
22403 2011-04-10 Eli Zaretskii <eliz@gnu.org>
22405 Fix write-region and its subroutines for buffers > 2GB.
22406 * fileio.c (a_write, e_write): Modify declaration of arguments and
22407 local variables to support buffers larger than 2GB.
22408 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
22410 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
22411 argument, local variables, and return value.
22413 * lisp.h: Update prototypes of emacs_write and emacs_read.
22415 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
22417 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
22419 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
22421 Fix more problems found by GCC 4.6.0's static checks.
22423 * xdisp.c (vmessage): Use a better test for character truncation.
22425 * charset.c (load_charset_map): <, not <=, for optimization,
22426 and to avoid potential problems with integer overflow.
22427 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
22428 * casetab.c (set_identity, shuffle): Likewise.
22429 * editfns.c (Fformat): Likewise.
22430 * syntax.c (skip_chars): Likewise.
22432 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
22433 This also lets GCC 4.6.0 generate slightly better loop code.
22435 * callint.c (Fcall_interactively): <, not <=, for optimization.
22436 (Fcall_interactively): Count the number of arguments produced,
22437 not the number of arguments given. This is simpler and lets GCC
22438 4.6.0 generate slightly better code.
22440 * ftfont.c: Distingish more carefully between FcChar8 and char.
22441 The previous code passed unsigned char * to a functions like
22442 strlen and xstrcasecmp that expect char *, which does not
22443 conform to the C standard.
22444 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
22445 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
22446 char * when the C standard requires it.
22448 * keyboard.c (read_char): Remove unused var.
22450 * eval.c: Port to Windows vsnprintf (Bug#8435).
22451 Include <limits.h>.
22452 (SIZE_MAX): Define if the headers do not.
22453 (verror): Do not give up if vsnprintf returns a negative count.
22454 Instead, grow the buffer. This ports to Windows vsnprintf, which
22455 does not conform to C99. Problem reported by Eli Zaretskii.
22456 Also, simplify the allocation scheme, by avoiding the need for
22457 calling realloc, and removing the ALLOCATED variable.
22459 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
22461 Remove invocations of doprnt, as Emacs now uses vsnprintf.
22462 But keep the doprint source code for now, as we might revamp it
22463 and use it again (Bug#8435).
22464 * lisp.h (doprnt): Remove.
22465 * Makefile.in (base_obj): Remove doprnt.o.
22466 * deps.mk (doprnt.o): Remove.
22468 error: Print 32- and 64-bit integers portably (Bug#8435).
22469 Without this change, on typical 64-bit hosts error ("...%d...", N)
22470 was used to print both 32- and 64-bit integers N, which relied on
22471 undefined behavior.
22472 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
22473 * lisp.h (error, verror): Mark as printf-like functions.
22474 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
22475 Report overflow in size calculations when allocating printf buffer.
22476 Do not truncate output string at its first null byte.
22477 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
22478 Truncate the output at a character boundary, since vsnprintf does not
22480 * charset.c (check_iso_charset_parameter): Convert internal
22481 character to string before calling 'error', since %c now has the
22483 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
22484 overflow when computing char to be passed to 'error'. Do not
22485 pass Lisp_Object to 'error'; pass the integer instead.
22486 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
22487 formatted with plain %d.
22489 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
22491 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
22493 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
22495 * xterm.c (x_catch_errors): Remove duplicate declaration.
22497 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
22499 * xdisp.c, lisp.h (message_nolog): Remove; unused.
22501 2011-04-10 Jim Meyering <meyering@redhat.com>
22503 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
22504 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
22505 return ssize_t not "int", and use size_t as the buffer length.
22506 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
22507 * gnutls.h: Update declarations.
22508 * process.c (read_process_output): Use ssize_t, to match.
22509 (send_process): Likewise.
22511 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
22513 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
22515 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
22517 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
22518 Use unsigned char, to match FcChar8 type definition.
22520 * xterm.c (handle_one_xevent):
22521 * xmenu.c (create_and_show_popup_menu):
22522 * xselect.c (x_decline_selection_request)
22523 (x_reply_selection_request): Avoid type-punned deref of X events.
22525 2011-04-09 Eli Zaretskii <eliz@gnu.org>
22527 Fix some uses of `int' instead of EMACS_INT.
22528 * search.c (string_match_1, fast_string_match)
22529 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
22530 (scan_buffer, find_next_newline_no_quit)
22531 (find_before_next_newline, search_command, Freplace_match)
22532 (Fmatch_data): Make some `int' variables be EMACS_INT.
22534 * xdisp.c (display_count_lines): 3rd argument and return value now
22535 EMACS_INT. All callers changed.
22536 (pint2hrstr): Last argument is now EMACS_INT.
22538 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
22539 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
22540 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
22541 (decode_coding_utf_16, decode_coding_emacs_mule)
22542 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
22543 (decode_coding_ccl, decode_coding_charset)
22544 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
22545 (decode_coding_iso_2022, decode_coding_emacs_mule)
22546 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
22547 <char_offset, last_offset>: Declare EMACS_INT.
22548 (encode_coding_utf_8, encode_coding_utf_16)
22549 (encode_coding_emacs_mule, encode_invocation_designation)
22550 (encode_designation_at_bol, encode_coding_iso_2022)
22551 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
22552 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
22554 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
22555 (encode_invocation_designation): Last argument P_NCHARS is now
22557 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
22558 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
22560 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
22563 * ccl.c (Fccl_execute_on_string): Declare some variables
22566 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
22568 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
22570 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
22572 * process.c (Fformat_network_address): Doc fix.
22574 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
22576 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
22578 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
22580 * keyboard.c (read_char): Call Lisp function help-form-show,
22581 instead of using internal_with_output_to_temp_buffer.
22582 (Qhelp_form_show): New var.
22583 (syms_of_keyboard): Use DEFSYM macro.
22585 * print.c (internal_with_output_to_temp_buffer): Function deleted.
22587 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
22589 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
22591 * process.c (Flist_processes): Remove to Lisp.
22592 (list_processes_1): Delete.
22594 2011-04-06 Eli Zaretskii <eliz@gnu.org>
22596 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
22598 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
22600 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
22602 Fix more problems found by GCC 4.6.0's static checks.
22604 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
22606 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
22608 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
22610 * xdisp.c (vmessage): Mark as a printf-like function.
22612 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
22614 * sound.c (sound_warning): Don't crash if arg contains a printf format.
22616 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
22617 printf-like functions.
22618 (tiff_load): Add casts to remove these marks before passing them
22619 to system-supplied API.
22621 * eval.c (Fsignal): Remove excess argument to 'fatal'.
22623 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
22624 This avoids several warnings with gcc -Wstrict-overflow.
22625 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
22626 directly, rather than having caller test rule sign. This avoids
22627 some unnecessary tests.
22628 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
22629 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
22630 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
22632 * xfont.c (xfont_text_extents): Remove var that was set but not used.
22633 (xfont_open): Avoid unnecessary tests.
22635 * composite.c (composition_gstring_put_cache): Use unsigned integer.
22637 * composite.h, composite.c (composition_gstring_put_cache):
22638 Use EMACS_INT, not int, for length.
22640 * composite.h (COMPOSITION_DECODE_REFS): New macro,
22641 breaking out part of COMPOSITION_DECODE_RULE.
22642 (COMPOSITION_DECODE_RULE): Use it.
22643 * composite.c (get_composition_id): Remove unused local vars,
22644 by using the new macro.
22646 * textprop.c (set_text_properties_1): Change while to do-while,
22647 since the condition is always true at first.
22649 * intervals.c (graft_intervals_into_buffer): Mark var as used.
22650 (interval_deletion_adjustment): Return unsigned value.
22653 * process.c (list_processes_1, create_pty, read_process_output):
22654 (exec_sentinel): Remove vars that were set but not used.
22655 (create_pty): Remove unnecessary "volatile"s.
22656 (Fnetwork_interface_info): Avoid possibility of int overflow.
22657 (read_process_output): Do adaptive read buffering even if carryover.
22658 (read_process_output): Simplify nbytes computation if buffered.
22660 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
22662 * syntax.c (scan_words): Remove var that was set but not used.
22663 (update_syntax_table): Use unsigned instead of int.
22665 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
22666 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
22667 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
22669 * print.c (print_error_message): Avoid int overflow.
22671 * font.c (font_list_entities): Redo for clarity,
22672 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
22674 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
22675 (font_score): Avoid potential overflow in diff calculation.
22677 * fns.c (substring_both): Remove var that is set but not used.
22678 (sxhash): Redo loop for clarity and to avoid wraparound warning.
22680 * eval.c (funcall_lambda): Rename local to avoid shadowing.
22682 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
22683 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
22684 can always succeed if overflow has undefined behavior.
22686 * search.c (boyer_moore, wordify): Remove vars set but not used.
22687 (wordify): Omit three unnecessary tests.
22689 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
22690 All callers changed. This avoids the need for an unused var.
22692 * casefiddle.c (casify_region): Remove var that is set but not used.
22694 * dired.c (file_name_completion): Remove var that is set but not used.
22696 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
22698 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
22699 (Finsert_file_contents): Remove unnecessary code checking fd.
22701 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
22702 Check for integer overflow on size calculations.
22704 * buffer.c (Fprevious_overlay_change): Remove var that is set
22707 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
22708 Remove vars that are set but not used.
22709 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
22710 (timer_check_2): Mark vars as initialized.
22712 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
22714 * image.c (lookup_image): Remove var that is set but not used.
22715 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
22717 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
22718 that are set but not used.
22720 * xfns.c (make_invisible_cursor): Don't return garbage
22721 if XCreateBitmapFromData fails (Bug#8410).
22723 * xselect.c (x_get_local_selection, x_handle_property_notify):
22724 Remove vars that are set but not used.
22726 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
22727 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
22729 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
22730 Remove var that is set but not used.
22731 (scroll_bar_windows_size): Now size_t, not int.
22732 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
22733 Check for overflow.
22735 * xfaces.c (realize_named_face): Remove vars that are set but not used.
22736 (map_tty_color) [!defined MSDOS]: Likewise.
22738 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
22740 * coding.c: Remove vars that are set but not used.
22741 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
22742 All callers changed.
22743 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
22744 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
22745 (decode_coding_charset): Remove vars that are set but not used.
22747 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
22748 that is set but not used.
22750 * print.c (print_object): Remove var that is set but not used.
22752 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
22753 The gnulib version avoids calling malloc in the usual case,
22754 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
22755 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
22756 * filelock.c (current_lock_owner): Likewise.
22757 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
22758 * sysdep.c: Include allocator.h, careadlinkat.h.
22759 (emacs_no_realloc_allocator): New static constant.
22760 (emacs_readlink): New function.
22761 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
22762 ../lib/careadlinkat.h.
22764 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
22766 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
22767 first non-nil return value).
22769 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
22771 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
22772 if not defined (Bug#8403).
22774 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
22776 * xdisp.c (display_count_lines): Remove parameter `start',
22777 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
22778 (get_char_face_and_encoding): Remove parameter `multibyte_p',
22779 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
22780 (fill_stretch_glyph_string): Remove parameters `row' and `area',
22781 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
22782 and thereabouts. All callers changed.
22783 (get_per_char_metric): Remove parameter `f', unused since
22784 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
22786 2011-04-02 Jim Meyering <meyering@redhat.com>
22788 do not dereference NULL upon failed strdup
22789 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
22790 (ns_get_family): Likewise.
22792 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
22794 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
22796 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
22798 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
22801 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
22803 Add lexical binding.
22805 * window.c (Ftemp_output_buffer_show): New fun.
22806 (Fsave_window_excursion):
22807 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
22809 * lread.c (lisp_file_lexically_bound_p): New function.
22810 (Fload): Bind Qlexical_binding.
22811 (readevalloop): Remove `evalfun' arg.
22812 Bind Qinternal_interpreter_environment.
22813 (Feval_buffer): Bind Qlexical_binding.
22814 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
22816 (syms_of_lread): Declare `lexical-binding'.
22818 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
22820 * keyboard.c (eval_dyn): New fun.
22821 (menu_item_eval_property): Use it.
22823 * image.c (parse_image_spec): Use Ffunctionp.
22825 * fns.c (concat, mapcar1): Accept byte-code-functions.
22827 * eval.c (Fsetq): Handle lexical vars.
22828 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
22829 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
22830 (FletX, Flet): Obey lexical binding.
22831 (Fcommandp): Handle closures.
22832 (Feval): New `lexical' arg.
22833 (eval_sub): New function extracted from Feval. Use it almost
22834 everywhere where Feval was used. Look up vars in lexical env.
22836 (Ffunctionp): Move from subr.el.
22837 (Ffuncall): Handle closures.
22838 (apply_lambda): Remove `eval_flags'.
22839 (funcall_lambda): Handle closures and new byte-code-functions.
22840 (Fspecial_variable_p): New function.
22841 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
22842 but without exporting it to Lisp.
22844 * doc.c (Fdocumentation, store_function_docstring):
22845 * data.c (Finteractive_form): Handle closures.
22847 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
22850 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
22852 (exec_byte_code): New function extracted from Fbyte_code to handle new
22853 calling convention for byte-code-functions. Add new byte-codes.
22855 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
22857 * alloc.c (Fmake_symbol): Init new `declared_special' field.
22859 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
22861 * xdisp.c (redisplay_internal): Fix prototype.
22863 2011-03-31 Eli Zaretskii <eliz@gnu.org>
22865 * xdisp.c (SCROLL_LIMIT): New macro.
22866 (try_scrolling): Use it when setting scroll_limit.
22867 Limit scrolling to 100 screen lines.
22868 (redisplay_window): Even when falling back on "recentering",
22869 position point in the window according to scroll-conservatively,
22870 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
22872 (try_scrolling): When point is above the window, allow searching
22873 as far as scroll_max, or one screenful, to compute vertical
22874 distance from PT to the scroll margin position. This prevents
22875 try_scrolling from unnecessarily failing when
22876 scroll-conservatively is set to a value slightly larger than the
22877 window height. Clean up the case of PT below the margin at bottom
22878 of window: scroll_max can no longer be INT_MAX. When aggressive
22879 scrolling is in use, don't let point enter the opposite scroll
22880 margin as result of the scroll.
22881 (syms_of_xdisp) <scroll-conservatively>: Document the
22882 threshold of 100 lines for never-recentering scrolling.
22884 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
22886 * dispextern.h (move_it_by_lines):
22887 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
22888 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
22889 (message_log_check_duplicate): Remove parameters `prev_bol' and
22890 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
22891 (redisplay_internal): Remove parameter `preserve_echo_area',
22892 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
22894 * indent.c (Fvertical_motion):
22895 * window.c (window_scroll_pixel_based, Frecenter):
22896 Don't pass `need_y_p' to `move_it_by_lines'.
22898 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
22900 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
22901 steal a few bits to be more compact.
22902 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
22903 Remove unneeded casts.
22905 * bytecode.c (Fbyte_code): CAR and CDR can GC.
22907 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
22909 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
22910 binding" message (bug#7967).
22912 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
22914 Fix more problems found by GCC 4.6.0's static checks.
22916 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
22917 Remove unused local var.
22919 * editfns.c (Fmessage_box): Remove unused local var.
22921 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
22922 (note_mode_line_or_margin_highlight, note_mouse_highlight):
22923 Omit unused local vars.
22924 * window.c (shrink_windows): Omit unused local var.
22925 * menu.c (digest_single_submenu): Omit unused local var.
22926 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
22927 Omit unused local var.
22929 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
22930 Don't assume string length fits in int.
22931 (keyremap_step, read_key_sequence): Use size_t for sizes.
22932 (read_key_sequence): Don't check last_real_key_start redundantly.
22934 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
22935 instead of alloca (Bug#8344).
22937 * eval.c (Fbacktrace): Don't assume nargs fits in int.
22938 (Fbacktrace_frame): Don't assume nframes fits in int.
22940 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
22942 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
22945 * term.c (produce_glyphless_glyph): Remove unnecessary test.
22947 * cm.c (calccost): Turn while-do into do-while, for clarity.
22949 * keyboard.c (syms_of_keyboard): Use the same style as later
22950 in this function when indexing through an array. This also
22951 works around GCC bug 48267.
22953 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
22955 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
22957 * chartab.c (sub_char_table_ref_and_range): Redo for slight
22958 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
22960 * keyboard.c, keyboard.h (num_input_events): Now size_t.
22961 This avoids undefined behavior on integer overflow, and is a bit
22962 more convenient anyway since it is compared to a size_t variable.
22964 Variadic C functions now count arguments with size_t, not int.
22965 This avoids an unnecessary limitation on 64-bit machines, which
22966 caused (substring ...) to crash on large vectors (Bug#8344).
22967 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
22968 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
22969 All variadic functions and their callers changed accordingly.
22970 (struct gcpro.nvars): Now size_t, not int. All uses changed.
22971 * data.c (arith_driver, float_arith_driver): Likewise.
22972 * editfns.c (general_insert_function): Likewise.
22973 * eval.c (struct backtrace.nargs, interactive_p)
22974 (internal_condition_case_n, run_hook_with_args, apply_lambda)
22975 (funcall_lambda, mark_backtrace): Likewise.
22976 * fns.c (concat): Likewise.
22977 * frame.c (x_set_frame_parameters): Likewise.
22978 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
22979 0 if not found, not -1. All callers changed.
22981 * alloc.c (garbage_collect): Don't assume stack size fits in int.
22982 (stack_copy_size): Now size_t, not int.
22983 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
22985 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
22987 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
22988 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
22989 All callers changed.
22991 * lisp.h (multibyte_char_to_unibyte):
22992 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
22993 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
22994 * character.h (CHAR_TO_BYTE8):
22995 * cmds.c (internal_self_insert):
22996 * editfns.c (general_insert_function):
22997 * keymap.c (push_key_description):
22998 * search.c (Freplace_match):
22999 * xdisp.c (message_dolog, set_message_1): All callers changed.
23001 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
23003 * keyboard.c (safe_run_hook_funcall): New function.
23004 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
23005 don't set the hook to nil, but remove the offending function instead.
23006 (Qcommand_hook_internal): Remove, unused.
23007 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
23008 Vcommand_hook_internal.
23010 * eval.c (enum run_hooks_condition): Remove.
23011 (funcall_nil, funcall_not): New functions.
23012 (run_hook_with_args): Call each function through a `funcall' argument.
23013 Remove `cond' argument, now redundant.
23014 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
23015 (Frun_hook_with_args_until_failure): Adjust accordingly.
23016 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
23018 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
23020 * dispextern.h (string_buffer_position): Remove declaration.
23022 * print.c (strout): Remove parameter `multibyte', unused since
23023 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
23025 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
23026 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
23027 All callers changed.
23029 * w32.c (_wsa_errlist): Use braces for struct initializers.
23031 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
23032 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
23033 All callers changed.
23034 (string_buffer_position): Likewise. Also, make static (it's never
23035 used outside xdisp.c).
23036 (cursor_row_p): Remove parameter `w', unused since
23037 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
23038 (decode_mode_spec): Remove parameter `precision', introduced during
23039 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
23040 All callers changed.
23042 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
23044 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
23046 2011-03-27 Anders Lindgren <andlind@gmail.com>
23048 * nsterm.m (ns_menu_bar_is_hidden): New variable.
23049 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
23050 (ns_update_auto_hide_menu_bar): New functions.
23051 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
23052 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
23053 ns_constrain_all_frames.
23054 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
23055 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
23057 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
23059 * nsmenu.m (runDialogAt): Remove argument to timer_check.
23061 2011-03-27 Glenn Morris <rgm@gnu.org>
23063 * syssignal.h: Replace RETSIGTYPE with void.
23064 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
23065 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
23066 Replace SIGTYPE with void everywhere.
23067 * s/usg5-4-common.h (SIGTYPE): Remove definition.
23068 * s/template.h (SIGTYPE): Remove commented out definition.
23070 2011-03-26 Eli Zaretskii <eliz@gnu.org>
23072 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
23073 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
23075 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
23077 * w32.c (read_unc_volume): Use parameter `henum', instead of
23078 global variable `wget_enum_handle'.
23080 * keymap.c (describe_vector): Remove parameters `indices' and
23081 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
23082 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
23084 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
23086 * keyboard.c (timer_check): Remove parameter `do_it_now',
23087 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
23088 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
23089 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
23091 * keyboard.c (read_char):
23092 * w32menu.c (w32_menu_display_help):
23093 * xmenu.c (show_help_event, menu_help_callback):
23094 Adjust calls to `show_help_echo'.
23096 * gtkutil.c (xg_maybe_add_timer):
23097 * keyboard.c (readable_events):
23098 * process.c (wait_reading_process_output):
23099 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
23101 * insdel.c (adjust_markers_gap_motion):
23102 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
23103 (gap_left, gap_right): Don't call it.
23105 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
23107 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
23108 incurred during fontification.
23110 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
23112 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
23113 (DEFVAR_PER_BUFFER): Don't pass it.
23115 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
23116 (scrolling_window): Don't pass it.
23118 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
23120 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
23122 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
23124 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
23125 of variables specific to SELinux and computation of `encoded_absname'.
23127 * image.c (XPutPixel): Remove unused variable `height'.
23129 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
23131 * unexw32.c (get_section_info): Remove unused variable `section'.
23133 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
23134 (system_process_attributes): Remove unused variable `sess'.
23135 (sys_read): Remove unused variable `err'.
23137 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
23138 (w32_wnd_proc): Remove unused variable `isdead'.
23139 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
23140 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
23141 (x_create_tip_frame): Remove unused variable `tem'.
23143 * w32inevt.c (w32_console_read_socket):
23144 Remove unused variable `no_events'.
23146 * w32term.c (x_draw_composite_glyph_string_foreground):
23147 Remove unused variable `width'.
23149 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
23151 * w32term.c (x_set_glyph_string_clipping):
23152 Don't pass uninitialized region to CombineRgn.
23154 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
23156 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
23157 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
23158 (Fx_close_connection): Remove unused variable `i'.
23160 * w32font.c (w32font_draw): Return number of glyphs.
23161 (w32font_open_internal): Remove unused variable `i'.
23162 (w32font_driver): Add missing initializer.
23164 * w32menu.c (utf8to16): Remove unused variable `utf16'.
23165 (fill_in_menu): Remove unused variable `items_added'.
23167 * w32term.c (last_mouse_press_frame): Remove static global variable.
23168 (w32_clip_to_row): Remove unused variable `f'.
23169 (x_delete_terminal): Remove unused variable `i'.
23171 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
23172 (NOTHING): Remove unused static global variable.
23173 (uniscribe_check_otf): Remove unused variable `table'.
23174 (uniscribe_font_driver): Add missing initializers.
23176 2011-03-23 Julien Danjou <julien@danjou.info>
23178 * term.c (Fsuspend_tty, Fresume_tty):
23179 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
23180 * window.c (temp_output_buffer_show):
23181 * insdel.c (signal_before_change):
23182 * frame.c (Fhandle_switch_frame):
23183 * fileio.c (Fdo_auto_save):
23184 * emacs.c (Fkill_emacs):
23185 * editfns.c (save_excursion_restore):
23186 * cmds.c (internal_self_insert):
23187 * callint.c (Fcall_interactively):
23188 * buffer.c (Fkill_all_local_variables):
23189 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
23191 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
23192 unconditionally since it does the check itself.
23194 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
23196 Fix more problems found by GCC 4.5.2's static checks.
23198 * coding.c (encode_coding_raw_text): Avoid unnecessary test
23199 the first time through the loop, since we know p0 < p1 then.
23200 This also avoids a gcc -Wstrict-overflow warning.
23202 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
23203 leading to a memory leak, possible in functions like
23204 load_charset_map_from_file that can allocate an unbounded number
23205 of objects (Bug#8318).
23207 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
23208 that could (at least in theory) be that large.
23210 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
23211 This is less likely to overflow, and avoids undefined behavior if
23212 overflow does occur. All callers changed. Use strtoul to scan
23213 for the unsigned long integer.
23214 (pint2hrstr): Simplify and tune code slightly.
23215 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
23217 * scroll.c (do_scrolling): Work around GCC bug 48228.
23218 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
23220 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
23221 This also avoids a warning with gcc -Wstrict-overflow.
23222 (validate_x_resource_name): Simplify count usage.
23223 This also avoids a warning with gcc -Wstrict-overflow.
23225 * fileio.c (Fcopy_file): Report error if fchown or fchmod
23228 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
23230 * process.c (Fmake_network_process): Use socklen_t, not int,
23231 where POSIX says socklen_t is required in portable programs.
23232 This fixes a porting bug on hosts like 64-bit HP-UX, where
23233 socklen_t is wider than int (Bug#8277).
23234 (Fmake_network_process, server_accept_connection):
23235 (wait_reading_process_output, read_process_output):
23238 * process.c: Rename or move locals to avoid shadowing.
23239 (list_processes_1, Fmake_network_process):
23240 (read_process_output_error_handler, exec_sentinel_error_handler):
23241 Rename or move locals.
23242 (Fmake_network_process): Define label "retry_connect" only if needed.
23243 (Fnetwork_interface_info): Fix pointer signedness.
23244 (process_send_signal): Add cast to avoid pointer signedness problem.
23245 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
23246 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
23248 Make tparam.h and terminfo.c consistent.
23249 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
23250 Include tparam.h instead, since it declares them.
23251 * cm.h (PC): Remove extern decl; tparam.h now does this.
23252 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
23253 * terminfo.c: Include tparam.h, to check interfaces.
23254 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
23255 (tparam): Adjust signature to match interface in tparam.h;
23256 this removes some undefined behavior. Check that outstring and len
23257 are zero, which they always are with Emacs.
23258 * tparam.h (PC, BC, UP): New extern decls.
23260 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
23261 (xftfont_open): Rename locals to avoid shadowing.
23263 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
23264 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
23265 (OTF_TAG_SYM): Omit macro if not needed.
23266 (ftfont_list): Remove unused local.
23267 (get_adstyle_property, ftfont_pattern_entity):
23268 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
23269 Rename locals to avoid shadowing.
23271 * xfont.c (xfont_list_family): Mark var as initialized.
23273 * xml.c (make_dom): Now static.
23275 * composite.c (composition_compute_stop_pos): Rename local to
23277 (composition_reseat_it): Remove unused locals.
23278 (find_automatic_composition, composition_adjust_point): Likewise.
23279 (composition_update_it): Mark var as initialized.
23280 (find_automatic_composition): Mark vars as initialized,
23281 with a FIXME (Bug#8290).
23283 character.h: Rename locals to avoid shadowing.
23284 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
23285 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
23286 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
23287 (BUF_DEC_POS): Be more systematic about renaming local temporaries
23288 to avoid shadowing.
23290 * textprop.c (property_change_between_p): Remove; unused.
23292 * intervals.c (interval_start_pos): Now static.
23294 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
23296 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
23297 Rename locals to avoid shadowing.
23299 * sound.c (wav_play, au_play, Fplay_sound_internal):
23300 Fix pointer signedness.
23301 (alsa_choose_format): Remove unused local var.
23302 (wav_play): Initialize a variable to 0, to prevent undefined
23303 behavior (Bug#8278).
23305 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
23307 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
23309 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
23310 clobbering (Bug#8298).
23311 * sysdep.c (sys_subshell): Likewise.
23312 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
23314 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
23315 This should get cleaned up, so that child_setup has the
23316 same signature on all platforms.
23318 * callproc.c (call_process_cleanup): Now static.
23319 (relocate_fd): Rename locals to avoid shadowing.
23321 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
23323 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
23324 not to be necessary, and produces flickering.
23326 2011-03-20 Glenn Morris <rgm@gnu.org>
23328 * config.in: Remove file.
23330 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
23332 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
23333 are now in src/globals.h.
23334 (syms_of_minibuf): Remove spurious & from previous change.
23336 2011-03-20 Leo Liu <sdl.web@gmail.com>
23338 * minibuf.c (completing-read-function): New variable.
23339 (completing-read-default): Rename from completing-read.
23340 (completing-read): Call completing-read-function.
23342 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
23344 * xfaces.c (Fx_load_color_file):
23345 Read color file from absolute filename (bug#8250).
23347 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
23349 * makefile.w32-in: Update dependencies.
23351 2011-03-17 Eli Zaretskii <eliz@gnu.org>
23353 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
23355 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
23357 Fix more problems found by GCC 4.5.2's static checks.
23359 * process.c (make_serial_process_unwind, send_process_trap):
23360 (sigchld_handler): Now static.
23362 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
23363 That way, the code declares only the vars that it needs.
23364 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
23365 * s/cygwin.h (PTY_ITERATION): Likewise.
23366 * s/darwin.h (PTY_ITERATION): Likewise.
23367 * s/gnu-linux.h (PTY_ITERATION): Likewise.
23369 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
23370 * process.c (allocate_pty): Don't declare stb unless it's needed.
23372 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
23373 (CONSTANTLIM): Remove; unused.
23374 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
23375 Define only if needed.
23377 * unexelf.c (unexec): Name an expression,
23378 to avoid gcc -Wbad-function-cast warning.
23379 Use a different way to cause a compilation error if anyone uses
23380 n rather than nn, a way that does not involve shadowing.
23381 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
23383 * deps.mk (unexalpha.o): Remove; unused.
23385 New file unexec.h, the (simple) interface for unexec (Bug#8267).
23386 * unexec.h: New file.
23387 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
23388 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
23389 Depend on unexec.h.
23390 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
23391 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
23392 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
23393 Change as necessary to match prototype in unexec.h.
23395 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
23397 (back_comment, skip_chars): Mark vars as initialized.
23399 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
23400 Rename locals to avoid shadowing.
23402 * lread.c (read1): Rewrite so as not to use empty "else".
23403 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
23405 * print.c (Fredirect_debugging_output): Fix pointer signedess.
23407 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
23408 warning when compiling print.c.
23410 * font.c (font_unparse_fcname): Abort in an "impossible" situation
23411 instead of using an uninitialized var.
23412 (font_sort_entities): Mark var as initialized.
23414 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
23416 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
23417 pointers to constants.
23418 (font_parse_fcname): Remove unused vars.
23419 (font_delete_unmatched): Now static.
23420 (font_get_spec): Remove; unused.
23421 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
23422 (font_update_drivers, Ffont_get_glyphs, font_add_log):
23423 Rename or move locals to avoid shadowing.
23425 * fns.c (require_nesting_list, require_unwind): Now static.
23426 (Ffillarray): Rename locals to avoid shadowing.
23428 * floatfns.c (domain_error2): Define only if needed.
23429 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
23431 * alloc.c (mark_backtrace): Move decl from here ...
23432 * lisp.h: ... to here, so that it can be checked.
23434 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
23435 (Fdefvar): Rewrite so as not to use empty "else".
23436 (lisp_indirect_variable): Name an expression,
23437 to avoid gcc -Wbad-function-cast warning.
23438 (Fdefvar): Rename locals to avoid shadowing.
23440 * callint.c (quotify_arg, quotify_args): Now static.
23441 (Fcall_interactively): Rename locals to avoid shadowing.
23442 Use const pointer when appropriate.
23444 * lisp.h (get_system_name, get_operating_system_release):
23445 Move decls here, to check interfaces.
23446 * process.c (get_operating_system_release): Move decl to lisp.h.
23447 * xrdb.c (get_system_name): Likewise.
23448 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
23449 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
23450 some of which prompt warnings from gcc -Wbad-function-cast.
23451 (Fformat_time_string, Fencode_time, Finsert_char):
23452 (Ftranslate_region_internal, Fformat):
23453 Rename or remove local vars to avoid shadowing.
23454 (Ftranslate_region_internal): Mark var as initialized.
23456 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
23459 * lisp.h (eassert): Check that the argument compiles, even if
23460 ENABLE_CHECKING is not defined.
23462 * data.c (Findirect_variable): Name an expression, to avoid
23463 gcc -Wbad-function-cast warning.
23464 (default_value, arithcompare, arith_driver, arith_error): Now static.
23465 (store_symval_forwarding): Rename local to avoid shadowing.
23466 (Fmake_variable_buffer_local, Fmake_local_variable):
23467 Mark variables as initialized.
23468 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
23470 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
23471 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
23472 Rename locals to avoid shadowing.
23473 (mark_stack): Move local variables into the #ifdef region where
23475 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
23476 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
23478 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
23479 (GC_STRING_CHARS): Remove; not used.
23480 (Fmemory_limit): Cast sbrk's returned value to char *.
23482 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
23483 avoids undefined behavior in theory.
23485 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
23487 Use functions, not macros, for up- and down-casing (Bug#8254).
23488 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
23489 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
23490 to use the following functions instead of these macros.
23491 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
23492 EMACS_INT, since callers assume the returned value fits in int.
23493 (upcase1): Likewise, for UPCASE_TABLE.
23494 (uppercasep, lowercasep, upcase): New static inline functions.
23495 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
23496 the race-condition problem in the old DOWNCASE.
23498 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
23499 Rename locals to avoid shadowing.
23500 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
23501 (regex_compile, re_search_2, re_match_2_internal):
23502 Remove unused local vars.
23503 (FREE_VAR): Rewrite so as not to use empty "else",
23504 which gcc can warn about.
23505 (regex_compile, re_match_2_internal): Mark locals as initialized.
23506 (RETALLOC_IF): Define only if needed.
23507 (WORDCHAR_P): Likewise. This one is never needed, but is used
23508 only in a comment talking about a compiler bug, so put inside
23509 the #if 0 of that comment.
23510 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
23511 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
23514 * search.c (boyer_moore): Rename locals to avoid shadowing.
23515 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
23516 (PREV_CHAR_BOUNDARY): Likewise.
23518 * search.c (simple_search): Remove unused var.
23520 * dired.c (compile_pattern): Move decl from here ...
23521 * lisp.h: ... to here, so that it can be checked.
23522 (struct re_registers): New forward decl.
23524 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
23526 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
23528 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
23529 Rename locals to avoid shadowing.
23530 (Fvertical_motion): Mark locals as initialized.
23532 * casefiddle.c (casify_object, casify_region): Now static.
23533 (casify_region): Mark local as initialized.
23535 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
23537 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
23538 New macros, so that the caller can use some names other than
23539 gcpro1, gcpro2, etc.
23540 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
23542 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
23543 argument, for consistency with GCPRO2_VAR, etc: it is now the
23544 prefix of the variable, not the variable itself. All uses
23546 * dired.c (directory_files_internal, file_name_completion):
23547 Rename locals to avoid shadowing.
23549 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
23550 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
23551 dired.c's scmp function, had undefined behavior.
23552 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
23553 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
23554 * buffer.h: ... to here, because these macros use current_buffer,
23555 and the new implementation with inline functions needs to have
23556 current_buffer in scope now, rather than later when the macros
23558 (downcase, upcase1): New static inline functions.
23559 (DOWNCASE, UPCASE1): Reimplement using these functions.
23560 This avoids undefined behavior in expressions like
23561 DOWNCASE (x) == DOWNCASE (y), which previously suffered
23562 from race conditions in accessing the global variables
23563 case_temp1 and case_temp2.
23564 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
23565 * lisp.h (case_temp1, case_temp2): Remove their decls.
23566 * character.h (ASCII_CHAR_P): Move from here ...
23567 * lisp.h: ... to here, so that the inline functions mentioned
23568 above can use them.
23570 * dired.c (directory_files_internal_unwind): Now static.
23572 * fileio.c (file_name_as_directory, directory_file_name):
23573 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
23575 (file_name_as_directory): Use const pointers when appropriate.
23576 (Fexpand_file_name): Likewise. In particular, newdir might
23577 point at constant storage, so make it a const pointer.
23578 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
23579 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
23581 (Fset_file_times, Finsert_file_contents, auto_save_error):
23582 Rename locals to avoid shadowing.
23584 * minibuf.c (choose_minibuf_frame_1): Now static.
23585 (Ftry_completion, Fall_completions): Rename or remove locals
23586 to avoid shadowing.
23588 * marker.c (bytepos_to_charpos): Remove; unused.
23590 * lisp.h (verify_bytepos, count_markers): New decls,
23591 so that gcc does not warn that these functions aren't declared.
23593 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
23594 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
23595 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
23596 (copy_text): Remove unused local var.
23598 * filelock.c (within_one_second): Now static.
23599 (lock_file_1): Rename local to avoid shadowing.
23601 * buffer.c (fix_overlays_before): Mark locals as initialized.
23602 (fix_start_end_in_overlays): Likewise. This function should be
23603 simplified by using pointers-to-pointers, but that's a different
23605 (switch_to_buffer_1): Now static.
23606 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
23607 (report_overlay_modification): Rename locals to avoid shadowing.
23609 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
23610 Fix pointer signedness issue.
23611 (sys_subshell): Mark local as volatile if checking for lint,
23612 to suppress a gcc -Wclobbered warning that does not seem to be right.
23613 (MAXPATHLEN): Define only if needed.
23615 * process.c (serial_open, serial_configure): Move decls from here ...
23616 * systty.h: ... to here, so that they can be checked.
23618 * fns.c (get_random, seed_random): Move extern decls from here ...
23619 * lisp.h: ... to here, so that they can be checked.
23621 * sysdep.c (reset_io): Now static.
23622 (wait_for_termination_signal): Remove; unused.
23624 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
23625 (copy_keymap_item, append_key, push_text_char_description):
23627 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
23628 (DENSE_TABLE_SIZE): Remove; unused.
23629 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
23630 (describe_map_tree):
23631 Rename locals to avoid shadowing.
23633 * keyboard.c: Declare functions static if they are not used elsewhere.
23634 (echo_char, echo_dash, cmd_error, top_level_2):
23635 (poll_for_input, handle_async_input): Now static.
23636 (read_char, kbd_buffer_get_event, make_lispy_position):
23637 (make_lispy_event, make_lispy_movement, apply_modifiers):
23638 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
23639 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
23640 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
23641 (read_key_sequence, read_char): Mark locals as initialized.
23642 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
23644 * keyboard.h (make_ctrl_char): New decl.
23645 (mark_kboards): Move decl here ...
23646 * alloc.c (mark_kboards): ... from here.
23648 * lisp.h (force_auto_save_soon): New decl.
23650 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
23651 (DEFINE_DUMMY_FUNCTION): New macro.
23652 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
23654 (main): Add casts to avoid warnings
23655 if GCC considers string literals to be constants.
23657 * lisp.h (fatal_error_signal): Add decl, since it's exported.
23659 * dbusbind.c: Pointer signedness fixes.
23660 (xd_signature, xd_append_arg, xd_initialize):
23661 (Fdbus_call_method, Fdbus_call_method_asynchronously):
23662 (Fdbus_method_return_internal, Fdbus_method_error_internal):
23663 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
23664 (Fdbus_register_signal): Use SSDATA when the context wants char *.
23666 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
23667 if GCC considers string literals to be constants.
23668 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
23670 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
23672 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
23673 (print_preprocess, print_object): New macro to fix last change.
23675 * print.c (print_preprocess): Don't forget font objects.
23677 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
23679 * emacs.c (USAGE3): Doc fixes.
23681 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
23683 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
23686 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
23688 * lisp.h (VWindow_system, Qfile_name_history):
23689 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
23690 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
23691 (w32_system_caret_x, w32_system_caret_y): Declare extern.
23693 * w32select.c: Don't #include "keyboard.h".
23694 (run_protected): Add extern declaration for waiting_for_input.
23696 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
23697 * w32console.c (detect_input_pending, read_input_pending)
23698 (encode_terminal_code):
23699 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
23700 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
23701 (w32_system_caret_y, Qfile_name_history):
23702 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
23703 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
23704 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
23705 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
23706 * w32proc.c (Qlocal, report_file_error):
23707 * w32term.c (Vwindow_system, updating_frame):
23708 * w32uniscribe.c (initialized, uniscribe_font_driver):
23709 Remove unneeded extern declarations.
23711 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
23713 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
23715 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
23717 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
23718 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
23719 These macros can no longer be used for assignment.
23721 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
23722 Assign struct members directly, instead of using BUF_BEGV etc.
23723 (record_buffer_markers, fetch_buffer_markers): New functions for
23724 recording and fetching special buffer markers.
23725 (set_buffer_internal_1, set_buffer_temp): Use them.
23727 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
23729 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
23731 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
23732 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
23734 * xdisp.c (hscroll_window_tree):
23735 (reconsider_clip_changes): Use PT instead of BUF_PT.
23737 2011-03-13 Eli Zaretskii <eliz@gnu.org>
23739 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
23740 $(EMACS_ROOT)/lib/intprops.h.
23742 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
23744 Fix more problems found by GCC 4.5.2's static checks.
23746 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
23747 to unsigned char * to avoid compiler diagnostic.
23748 (xg_free_frame_widgets): Make it clear that a local variable is
23749 needed only if USE_GTK_TOOLTIP.
23750 (gdk_window_get_screen): Make it clear that this macro is needed
23751 only if USE_GTK_TOOLTIP.
23752 (int_gtk_range_get_value): New function, which avoids a diagnostic
23753 from gcc -Wbad-function-cast.
23754 (xg_set_toolkit_scroll_bar_thumb): Use it.
23755 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
23756 diagnostic from gcc -Wbad-function-cast.
23757 (get_utf8_string, xg_get_file_with_chooser):
23758 Rename locals to avoid shadowing.
23759 (create_dialog): Move locals to avoid shadowing.
23761 * xgselect.c (xg_select): Remove unused var.
23763 * image.c (four_corners_best): Mark locals as initialized.
23764 (gif_load): Initialize transparent_p to zero (Bug#8238).
23765 Mark another local as initialized.
23766 (my_png_error, my_error_exit): Mark with NO_RETURN.
23768 * image.c (clear_image_cache): Now static.
23769 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
23770 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
23771 (x_edge_detection): Remove unnecessary cast that
23772 gcc -Wbad-function-cast diagnoses.
23773 (gif_load): Fix pointer signedness.
23774 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
23775 (jpeg_load, gif_load): Rename locals to avoid shadowing.
23777 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
23779 Improve quality of tests for time stamp overflow.
23780 For example, without this patch (encode-time 0 0 0 1 1
23781 1152921504606846976) returns the obviously-bogus value (-948597
23782 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
23783 reports time overflow. See
23784 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
23785 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
23786 * editfns.c: Include limits.h and intprops.h.
23787 (TIME_T_MIN, TIME_T_MAX): New macros.
23788 (time_overflow): Move earlier, to before first use.
23789 (hi_time, lo_time): New functions, for an accurate test for
23790 out-of-range times.
23791 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
23792 (Fget_internal_run_time): Don't assume time_t fits in int.
23793 (make_time): Use list2 instead of Fcons twice.
23794 (Fdecode_time): More accurate test for out-of-range times.
23795 (check_tm_member): New function.
23796 (Fencode_time): Use it, to test for out-of-range times.
23797 (lisp_time_argument): Don't rely on undefined left-shift and
23798 right-shift behavior when checking for time stamp overflow.
23800 * editfns.c (time_overflow): New function, refactoring common code.
23801 (Fformat_time_string, Fdecode_time, Fencode_time):
23802 (Fcurrent_time_string): Use it.
23804 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
23805 * dired.c (make_time): Move to ...
23806 * editfns.c (make_time): ... here.
23807 * systime.h: Note the move.
23809 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
23811 * fringe.c (update_window_fringes): Remove unused variables.
23813 * unexmacosx.c (copy_data_segment): Also copy __got section.
23816 2011-03-12 Eli Zaretskii <eliz@gnu.org>
23818 * termcap.c [MSDOS]: Include "msdos.h".
23819 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
23820 Constify `char *' arguments and their references according to
23821 prototypes in tparam.h.
23823 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
23825 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
23826 Adapt all references accordingly.
23828 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
23830 2011-03-11 Tom Tromey <tromey@redhat.com>
23832 * buffer.c (syms_of_buffer): Remove obsolete comment.
23834 2011-03-11 Eli Zaretskii <eliz@gnu.org>
23836 * termhooks.h (encode_terminal_code): Declare prototype.
23838 * msdos.c (encode_terminal_code): Don't declare prototype.
23840 * term.c (encode_terminal_code): Now external again, used by
23841 w32console.c and msdos.c.
23843 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
23844 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
23846 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
23848 Fix some minor problems found by GCC 4.5.2's static checks.
23850 * fringe.c (update_window_fringes): Mark locals as initialized
23852 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
23854 * alloc.c (mark_fringe_data): Move decl from here ...
23855 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
23856 to check its interface.
23857 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
23859 * fontset.c (free_realized_fontset): Now static.
23860 (Fset_fontset_font): Rename local to avoid shadowing.
23861 (fontset_font): Mark local as initialized.
23862 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
23864 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
23866 * xselect.c (x_disown_buffer_selections): Remove; not used.
23867 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
23868 (x_own_selection, Fx_disown_selection_internal): Rename locals
23869 to avoid shadowing.
23870 (x_handle_dnd_message): Remove local to avoid shadowing.
23872 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
23873 so that the caller can use some name other than gcpro1.
23874 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
23875 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
23876 (Fx_backspace_delete_keys_p):
23877 Use them to avoid shadowing, and rename vars to avoid shadowing.
23878 (x_decode_color, x_set_name, x_window): Now static.
23879 (Fx_create_frame): Add braces to silence GCC warning.
23880 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
23881 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
23882 Remove unused locals.
23883 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
23884 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
23885 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
23888 * xterm.h (x_mouse_leave): New decl.
23890 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
23891 Remove unused functions.
23892 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
23893 (x_calc_absolute_position): Now static.
23894 (XTread_socket): Don't define label "out" unless it's used.
23895 Don't declare local "event" unless it's used.
23896 (x_iconify_frame, x_free_frame_resources): Don't declare locals
23897 unless they are used.
23898 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
23899 (x_fatal_error_signal): Remove; not used.
23900 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
23901 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
23902 (x_error_catcher, x_connection_closed, x_error_handler):
23903 (x_error_quitter, xembed_send_message, x_iconify_frame):
23904 (my_log_handler): Rename locals to avoid shadowing.
23905 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
23906 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
23908 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
23909 Rename or move locals to avoid shadowing.
23910 (tty_defined_color, merge_face_heights): Now static.
23911 (free_realized_faces_for_fontset): Remove; not used.
23912 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
23913 does not deduce is never used uninitialized.
23914 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
23915 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
23917 * terminal.c (store_terminal_param): Now static.
23919 * xmenu.c (menu_highlight_callback): Now static.
23920 (set_frame_menubar): Remove unused local.
23921 (xmenu_show): Rename parameter to avoid shadowing.
23922 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
23923 since they might point to immutable storage.
23924 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
23925 since it's unused otherwise.
23927 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
23928 Add a FIXME, since the code still doesn't look right. (Bug#8215)
23929 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
23930 avoids a gcc -Wuninitialized diagnostic.
23931 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
23932 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
23933 does not deduce are never used uninitialized.
23935 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
23937 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
23938 * window.c (window_loop, size_window):
23939 (run_window_configuration_change_hook, enlarge_window): Likewise.
23941 * window.c (display_buffer): Now static.
23942 (size_window): Mark variables that gcc -Wuninitialized
23943 does not deduce are never used uninitialized.
23944 * window.h (check_all_windows): New decl, to forestall
23945 gcc -Wmissing-prototypes diagnostic.
23946 * dispextern.h (bidi_dump_cached_states): Likewise.
23948 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
23950 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
23951 Include <limits.h>.
23952 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
23953 and to avoid gcc -Wuninitialized warning.
23954 (load_charset_map): Mark variables that gcc -Wuninitialized
23955 does not deduce are never used uninitialized.
23956 (load_charset): Abort instead of using uninitialized var (Bug#8229).
23958 * coding.c (coding_set_source, coding_set_destination):
23959 Use "else { /* comment */ }" rather than "else /* comment */;"
23960 for clarity, and to avoid gcc -Wempty-body warning.
23961 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
23962 a block, when the outer 'i' will do.
23963 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
23964 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
23965 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
23966 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
23967 (Fdecode_sjis_char, Fdefine_coding_system_internal):
23968 Rename locals to avoid shadowing.
23969 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
23970 * coding.c (emacs_mule_char, encode_invocation_designation):
23971 Now static, since they're not used elsewhere.
23972 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
23973 (decode_coding_object, encode_coding_object, detect_coding_system):
23974 (decode_coding_emacs_mule): Mark variables that gcc
23975 -Wuninitialized does not deduce are never used uninitialized.
23976 (detect_coding_iso_2022): Initialize a local variable that might
23977 be used uninitialized. Leave a FIXME because it's not clear that
23978 this initialization is needed. (Bug#8211)
23979 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
23980 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
23981 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
23982 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
23983 Remove unused macros.
23985 * category.c (hash_get_category_set): Remove unused local var.
23986 (copy_category_table): Now static, since it's not used elsewhere.
23987 * character.c (string_count_byte8): Likewise.
23989 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
23990 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
23992 * chartab.c (copy_sub_char_table): Now static, since it's not used
23994 (sub_char_table_ref_and_range, char_table_ref_and_range):
23995 Rename locals to avoid shadowing.
23996 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
23998 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
23999 (BIDI_BOB): Remove unused macro.
24001 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
24002 deduce are never used uninitialized.
24003 * term.c (encode_terminal_code): Likewise.
24005 * term.c (encode_terminal_code): Now static. Remove unused local.
24007 * tparam.h: New file.
24008 * term.c, tparam.h: Include it.
24009 * deps.mk (term.o, tparam.o): Depend on tparam.h.
24010 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
24011 Move these decls to tparam.h, and make them agree with what
24012 is actually in tparam.c. The previous trick of using incompatible
24013 decls in different modules does not conform to the C standard.
24014 All callers of tparam changed to use tparam's actual API.
24015 * tparam.c (tparam1, tparam, tgoto):
24016 Use const pointers where appropriate.
24018 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
24019 * cm.h (struct cm): Likewise.
24020 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
24021 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
24022 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
24023 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
24024 (turn_on_face, init_tty): Likewise.
24025 * termchar.h (struct tty_display_info): Likewise.
24027 * term.c (term_mouse_position): Rename local to avoid shadowing.
24029 * alloc.c (mark_ttys): Move decl from here ...
24030 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
24032 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
24034 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
24036 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
24038 * search.c (compile_pattern_1): Remove argument regp, unused since
24039 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
24040 (compile_pattern): Don't pass it.
24042 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
24044 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
24045 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
24047 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
24049 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
24051 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
24052 gdk_window_get_screen, gdk_window_get_geometry,
24053 gdk_x11_window_lookup_for_display and GDK_KEY_g.
24054 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
24055 (xg_get_pixbuf_from_pixmap): New function.
24056 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
24057 to Pixmap, take frame as parameter, remove GdkColormap parameter.
24058 Call xg_get_pixbuf_from_pixmap instead of
24059 gdk_pixbuf_get_from_drawable.
24060 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
24061 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
24062 (xg_check_special_colors): Use GtkStyleContext and its functions
24064 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
24065 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
24066 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
24067 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
24068 Call gtk_widget_get_preferred_size.
24069 (xg_frame_resized): gdk_window_get_geometry only takes 5
24071 (xg_win_to_widget, xg_event_is_for_menubar):
24072 Call gdk_x11_window_lookup_for_display.
24073 (xg_set_widget_bg): New function.
24074 (delete_cb): New function.
24075 (xg_create_frame_widgets): Connect delete-event to delete_cb.
24076 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
24077 (xg_set_background_color): Call xg_set_widget_bg.
24078 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
24079 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
24080 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
24081 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
24083 (update_frame_tool_bar): Call gtk_widget_hide.
24084 (xg_initialize): Use GDK_KEY_g.
24086 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
24088 (x_session_initialize): Call gdk_x11_set_sm_client_id.
24090 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
24091 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
24092 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
24094 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
24096 * w32xfns.c (select_palette): Check success of RealizePalette against
24097 GDI_ERROR, not zero.
24099 See ChangeLog.11 for earlier changes.
24101 ;; Local Variables:
24105 Copyright (C) 2011-2013 Free Software Foundation, Inc.
24107 This file is part of GNU Emacs.
24109 GNU Emacs is free software: you can redistribute it and/or modify
24110 it under the terms of the GNU General Public License as published by
24111 the Free Software Foundation, either version 3 of the License, or
24112 (at your option) any later version.
24114 GNU Emacs is distributed in the hope that it will be useful,
24115 but WITHOUT ANY WARRANTY; without even the implied warranty of
24116 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24117 GNU General Public License for more details.
24119 You should have received a copy of the GNU General Public License
24120 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.