merge trunk
[bpt/emacs.git] / src / ChangeLog
CommitLineData
1413e9a5
BR
12013-05-22 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2
3 * casetab.c (init_casetab_once): Fix last change (bug#14424).
4
e6d2f155
KH
52013-05-22 Kenichi Handa <handa@gnu.org>
6
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.
10
11 * coding.h (struct coding_system): New member detected_utf8_chars.
12
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
15 BOM is there.
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.
1413e9a5
BR
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
e6d2f155
KH
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
24 of BOM for utf-8.
25
ab56a6f4 262013-05-21 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
fc30d803
SM
27
28 * search.c (looking_at_1): Only set last_thing_searched if the match
29 changed the match-data (bug#14281).
30
ecc3c6ed
DA
312013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
32
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.
36
5ba8bf35
YM
372013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
38
39 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
d6635ba2 40 (Fx_display_pixel_width, Fx_display_pixel_height)
fc30d803
SM
41 (Fx_display_mm_width, Fx_display_mm_height):
42 Mention `display-monitor-attributes-list' in docstrings.
5ba8bf35 43
91e8418b
YM
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.
57
fc30d803
SM
58 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
59 Return pixel width or height for all physical monitors as in X11.
91e8418b 60
31ff141c
PE
612013-05-18 Paul Eggert <eggert@cs.ucla.edu>
62
63 Port --enable-gcc-warnings to clang.
64 * bytecode.c (exec_byte_code):
65 * regex.c:
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.
73
df065a0b
EZ
742013-05-16 Eli Zaretskii <eliz@gnu.org>
75
04d360e7
EZ
76 * insdel.c (insert_1_both): Document the arguments, instead of
77 referring to insert_1, which no longer exists.
78
5bb98290
EZ
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)
82
df065a0b
EZ
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
86 case.
87 (gettimeofday): Adjust signature and return value to Posix
88 expectations.
89
90 * unexw32.c (open_output_file): Delete the existing emacs.exe
91 before creating it, to break the hard link to the versioned
92 executable.
93
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.
104
1aa8d505
SM
1052013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
106
6e911150
SM
107 * makefile.w32-in (DOC): Use just "DOC".
108
109 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
110
1aa8d505
SM
111 * process.c: Export default filters and sentinels to Elisp.
112 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
113 New constants.
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
119 read_process_output.
120 (read_process_output): Use it; filters can't be nil.
121 (Finternal_default_process_filter): New function, extracted from
122 read_process_output.
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
127 status_notify.
128 (setup_process_coding_systems): Default filter is not nil any more.
129 (syms_of_process): Export new Elisp functions and initialize
130 new constants.
131 * lisp.h (make_lisp_proc): New function.
132
5ac2eb34
SM
1332013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
134
135 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
136
eda9c7d7
EZ
1372013-05-14 Eli Zaretskii <eliz@gnu.org>
138
139 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
5ac2eb34
SM
140 unless we know that the window w is a leaf window.
141 Another attempt at solving bug#14062.
eda9c7d7 142
8fdeaad5
JD
1432013-05-14 Jan Djärv <jan.h.d@swipnet.se>
144
145 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
146 fdesc (Bug#14375).
147
44aa9ee6
PE
1482013-05-12 Paul Eggert <eggert@cs.ucla.edu>
149
150 * image.c (gif_load): Check that subimages fit (Bug#14345).
151
759fd763
SM
1522013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
153
154 * lread.c (skip_dyn_eof): New function.
155 (read1): Use it to skip the end of a file in response to #@00.
156
157 * doc.c (get_doc_string): Slightly relax the sanity checking.
158
4465bfb4
JD
1592013-05-09 Jan Djärv <jan.h.d@swipnet.se>
160
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
168 Qsource.
169
7583e2a0
PE
1702013-05-09 Paul Eggert <eggert@cs.ucla.edu>
171
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.
176
ad75d77e
PE
1772013-05-08 Paul Eggert <eggert@cs.ucla.edu>
178
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.
182
07525f77
EZ
1832013-05-08 Eli Zaretskii <eliz@gnu.org>
184
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.
193
d901fc8d
JB
1942013-05-08 Juanma Barranquero <lekktu@gmail.com>
195
196 * makefile.w32-in (ACL_H): New macro.
197 ($(BLD)/fileio.$(O)): Update dependencies.
198
f269bc61
PE
1992013-05-07 Paul Eggert <eggert@cs.ucla.edu>
200
ffdc270a
PE
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
208 !acl_errno_valid.
209 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
210 it ourselves.
211
f269bc61
PE
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.
217
a261c53e
JL
2182013-05-07 Juri Linkov <juri@jurta.org>
219
220 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
221 to the string converted from number with `Fnumber_to_string'.
222 (Bug#14254)
223
2b66427d
PE
2242013-05-07 Paul Eggert <eggert@cs.ucla.edu>
225
226 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
227 This fixes a problem introduced by my previous change.
228
15acfe41
GM
2292013-05-07 Glenn Morris <rgm@gnu.org>
230
231 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
232
5ea03bf5
JD
2332013-05-07 Jan Djärv <jan.h.d@swipnet.se>
234
235 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
236
e0c9d565
PE
2372013-05-07 Paul Eggert <eggert@cs.ucla.edu>
238
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.
250
4e3f9230
YM
2512013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
252 Jan Djärv <jan.h.d@swipnet.se>
253
254 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
255 (XINERAMA_CFLAGS): New macros.
256 (ALL_CFLAGS, LIBES): Use them.
257
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.
269
270 * xterm.h (x_display_info): Add Xatom_net_workarea and
271 Xatom_net_current_desktop.
272
273 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
274 and dpyinfo->Xatom_net_current_desktop.
275
05839b6a
EZ
2762013-05-06 Eli Zaretskii <eliz@gnu.org>
277
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)
282
dc4a2ee0
PE
2832013-05-06 Paul Eggert <eggert@cs.ucla.edu>
284
5ee94506
PE
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.
305
dc4a2ee0
PE
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.
325
14c7ed05
EZ
3262013-05-05 Eli Zaretskii <eliz@gnu.org>
327
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)
332
e6076b1b
JD
3332013-05-05 Jan Djärv <jan.h.d@swipnet.se>
334
335 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
336 to where it is used, to avoid autorelease issues (Bug#14050).
337
cbee2131
PE
3382013-05-05 Paul Eggert <eggert@cs.ucla.edu>
339
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;
344 it's not needed.
345
30c7e542
SM
3462013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
347
348 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
349 (syms_of_minibuf): Adjust accodingly.
350 * lread.c (Fread):
351 * callint.c (Fcall_interactively): Adjust calls accordingly.
352
5bebd186
EZ
3532013-05-04 Eli Zaretskii <eliz@gnu.org>
354
355 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
30c7e542
SM
356 w->contents is a buffer before computing everything else.
357 Use parentheses to disambiguate last part of the condition.
5bebd186
EZ
358
359 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
360 assertion violations. (Bug#14062)
361
0fb0a4f3
DR
3622013-05-01 David Reitter <david.reitter@gmail.com>
363
364 * nsfns.m (ns_tooltip): Initialize.
365
9e63b4a5
EZ
3662013-04-28 Eli Zaretskii <eliz@gnu.org>
367
368 * coding.c (decode_coding_gap): Don't remove the character before
369 a newline unless it's a CR character. (Bug#14287)
370
ad60824e
DN
3712013-04-28 Dan Nicolaescu <dann@gnu.org>
372
373 * dispextern.h (struct face): Move enum face_underline_type
374 earlier so that bitfields can be in the same word.
375
edbdcec0
JD
3762013-04-28 Jan Djärv <jan.h.d@swipnet.se>
377
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).
382
0208ede7
JL
3832013-04-27 Juri Linkov <juri@jurta.org>
384
385 * callint.c (Fcall_interactively): Call `Qread_number' for
386 interactive code letter `n' instead of using duplicate code.
387 (Bug#14254)
388
b8dd59f7
PE
3892013-04-27 Paul Eggert <eggert@cs.ucla.edu>
390
391 * systime.h (make_timeval): Declare as 'const'.
392
8bd722db
KH
3932013-04-27 Kenichi Handa <handa@gnu.org>
394
395 * font.c (font_open_entity): Always open a font of manageable
396 size.
397
13d0e56f 3982013-04-26 Paul Eggert <eggert@cs.ucla.edu>
cbee2131 399
f780d632
PE
400 Port better to AIX (Bug#14258).
401 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
402 to pacify AIX xlc.
403
ec509856
KH
4042013-04-24 Kenichi Handa <handa@gnu.org>
405
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.
409
84fc48e5
PE
4102013-04-22 Paul Eggert <eggert@cs.ucla.edu>
411
412 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
413 Without this fix, "make distclean" leaves stamp-h1 behind.
414
806bda47
EC
4152013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
416
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.
422
423 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
424 window decorations and uses the entire screen.
425
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
429 struct.
430 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
431 Remove macros.
432 (FRAME_NORMAL_PLACEMENT): New macro.
433
9cc2810b
JB
4342013-04-16 Juanma Barranquero <lekktu@gmail.com>
435
436 * minibuf.c (Ftest_completion): Silence compiler warning.
437
fd16b54c
EZ
4382013-04-15 Eli Zaretskii <eliz@gnu.org>
439
440 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
5fbcd237 441 bug#14062.
fd16b54c
EZ
442
443 * frame.h (WINDOW_FRAME): Protect macro and its argument with
444 parentheses.
445
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.
450
9e3379a0
PE
4512013-04-14 Paul Eggert <eggert@cs.ucla.edu>
452
453 * keyboard.c (timer_start_idle): Remove no-longer-used local.
454
ddd6b685
EZ
4552013-04-14 Eli Zaretskii <eliz@gnu.org>
456
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)
461
29b79ba1
EZ
4622013-04-13 Eli Zaretskii <eliz@gnu.org>
463
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.
471
562c6ee9
SM
4722013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
473
474 * window.c (select_window): `record_buffer' even if window is
475 already selected (bug#14191).
476
fcc1fe85
EZ
4772013-04-11 Eli Zaretskii <eliz@gnu.org>
478
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
484 current matrix.
485
f009190a
EZ
4862013-04-10 Eli Zaretskii <eliz@gnu.org>
487
488 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
562c6ee9
SM
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
f009190a
EZ
491 there are GUI frames open in the same session. (Bug#13864)
492
78ce603d
SM
4932013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
494
495 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
496 of marking the idle timers directly.
497
a8036e40
SM
4982013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
499
500 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
501 tables (bug#14054).
502
7ffe7ef6
SM
5032013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
504
505 * window.c (select_window): Don't record_buffer while the invariant is
506 temporarily broken (bug#14161).
507
508 * fns.c (Fdelq): Don't assume !NILP => CONSP.
509
7d9f6883
EZ
5102013-04-07 Eli Zaretskii <eliz@gnu.org>
511
512 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
513
5406cfd9
RF
5142013-04-07 Romain Francoise <romain@orebokech.com>
515
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.
519
95c0e83b
JD
5202013-03-31 Jan Djärv <jan.h.d@swipnet.se>
521
522 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
523 f->output_data.ns.
524
876da980
PE
5252013-04-07 Paul Eggert <eggert@cs.ucla.edu>
526
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).
537
7452b7bd
DA
5382013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
539
540 Get rid of some platform-specific functions examining window
541 system and its capabilities. This is a partial rework of the
542 2013-04-05 change.
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):
549 New functions.
550 (check_window_system): Platform-independent now.
551 * xterm.h (x_in_use): Remove declaration.
552 (check_x_frame):
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):
564 Likewise.
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.
568
251e9147
KH
5692013-04-03 Kenichi Handa <handa@gnu.org>
570
571 The following changes is to optimize the code for reading UTF-8
572 files.
573
562c6ee9 574 * coding.c (check_ascii): Rename from detect_ascii. Return value
251e9147
KH
575 changed. Check EOL format. Do not call adjust_coding_eol_type
576 here.
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.
582
8bc369d4
KH
5832013-03-21 Kenichi Handa <handa@gnu.org>
584
585 * coding.c (syms_of_coding): Cancel previous change.
586
587 * insdel.c (insert_from_gap): Fix previous change.
588
73931ad1
DA
5892013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
590
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):
598 * xterm.h (check_x):
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.
607
7216e43b
PE
6082013-04-02 Paul Eggert <eggert@cs.ucla.edu>
609
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):
622 * doprnt.c (doprnt):
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):
632 * lread.c (read1):
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.
644
92759988
DA
6452013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
646
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.
651
9a1971bb
GM
6522013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
653
f38ab167
JD
654 * nsmenu.m (showAtX:Y:for:): setLevel to
655 NSPopUpMenuWindowLevel (Bug#13998).
656
6d01f1fe
JD
6572013-03-30 Jan Djärv <jan.h.d@swipnet.se>
658
659 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
660 (ns_check_pending_open_menu): Declare.
661
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).
668
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.
673
781f4782
DA
6742013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
675
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.
685
1921c31b
JB
6862013-03-29 Juanma Barranquero <lekktu@gmail.com>
687
688 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
689 Update dependencies.
690
717b8bcd
SM
6912013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
692
693 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
694 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
695 forward references.
696
e74aeda8
DA
6972013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
698
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.
750
121ab1cd
EZ
7512013-03-28 Eli Zaretskii <eliz@gnu.org>
752
ef454cf7
EZ
753 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
754 identify the reasons for assertion violations in bug#14062 and
755 similar ones.
21e930f8
EZ
756 (Fx_show_tip): Fix compilation error under
757 "--enable-check-lisp-object-type". (Bug#14073)
ef454cf7 758
121ab1cd
EZ
759 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
760 Reported by <rzl24ozi@gmail.com>.
761
5c89ca24
DA
7622013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
763
764 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
765 start marker...
562c6ee9
SM
766 (unwind_with_echo_area_buffer): ...to restore it here.
767 This is needed to ensure that...
5c89ca24
DA
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.
c7f53895
DA
772 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
773 Fix comment.
5c89ca24 774
f557c1b1
SM
7752013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
776
777 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
778 the upcase table.
779
40693bba 7802013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
781
782 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
783
c86f791f
EZ
7842013-03-27 Eli Zaretskii <eliz@gnu.org>
785
786 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
787 since MinGW's w32api headers do. This avoids compiler warnings.
788
789 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
790 if already defined.
791
c6e72e17
EZ
7922013-03-26 Eli Zaretskii <eliz@gnu.org>
793
794 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
795
54e95010
JD
7962013-03-26 Jan Djärv <jan.h.d@swipnet.se>
797
798 * gtkutil.c (style_changed_cb): Check if frame is live and an
799 X frame (Bug#14038).
800
b88b62de
EZ
8012013-03-26 Eli Zaretskii <eliz@gnu.org>
802
a18d7de6
EZ
803 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
804 Define only for _WIN32_WINNT less than 0x0500.
da9dcbb8
EZ
805 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
806 MinGW64.
8f5e14c8
EZ
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'.
a18d7de6 809
b88b62de
EZ
810 Fix incompatibilities between MinGW.org and MinGW64 headers.
811 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
812
813 * w32.c (REPARSE_DATA_BUFFER): Guard with
814 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
815
c074e458
JD
8162013-03-25 Jan Djärv <jan.h.d@swipnet.se>
817
818 * xterm.c: Include X11/XKBlib.h
819 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
820
908589fd
AS
8212013-03-24 Andreas Schwab <schwab@linux-m68k.org>
822
823 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
824 written backwards.
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):
836 Likewise.
837 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
838 (sit_for): Likewise.
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):
846 Likewise.
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):
861 Likewise.
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.
870 * regex.h: 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):
879 Likewise.
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):
883 Likewise.
884 * xsmfns.c (smc_save_yourself_CB): Likewise.
885 * xterm.c (x_scroll_bar_set_handle): Likewise.
886
2bf7d27a
DA
8872013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
888
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.
893
a9ebfa0b
PE
8942013-03-24 Paul Eggert <eggert@cs.ucla.edu>
895
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.
904
4f3576ee
KB
9052013-03-24 Ken Brown <kbrown@cornell.edu>
906
789b5e9a
KB
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.
910
4f3576ee
KB
911 * w32term.c (w32_initialize): Silence compiler warning.
912
b5b7745f
EZ
9132013-03-23 Eli Zaretskii <eliz@gnu.org>
914
cdc0d0bd
EZ
915 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
916 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
562c6ee9
SM
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,
cdc0d0bd
EZ
921 to avoid races between the main thread and the input thread.
922
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
927 members of a frame.
928
b5b7745f
EZ
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.
936 (Bug#14032)
937
938 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
939
940 * lisp.h (get_frame_param): Adjust conditions for prototype
941 declaration.
942
a3454eed
KB
9432013-03-22 Ken Brown <kbrown@cornell.edu>
944
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
949 argument.
950
5a49b79c
DA
9512013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
952
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
961 toolkit is in use.
962
d6723bf7
PE
9632013-03-21 Paul Eggert <eggert@cs.ucla.edu>
964
7b1123d8
PE
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
971 changed.
972 (INTX): Remove.
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):
982 New constants.
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.
987
d6723bf7
PE
988 * alloc.c: Remove redundant static declarations.
989
5f24fa51
DA
9902013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
991
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):
995 Remove.
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.
1000
42143acd
DA
10012013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
1002
1003 * frame.h (struct frame): Drop resx and resy because the same data is
1004 available from window system-specific output context. Adjust users.
562c6ee9
SM
1005 (default_pixels_per_inch_x, default_pixels_per_inch_y):
1006 New functions to provide defaults when no window system available.
42143acd 1007 (FRAME_RES_X, FRAME_RES_Y): New macros.
562c6ee9 1008 (NUMVAL): Move from xdisp.c.
42143acd
DA
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.
1016
c0a17406
KH
10172013-03-20 Kenichi Handa <handa@gnu.org>
1018
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).
1022
095d384d
DA
10232013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
1024
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.
cf4bb06d
DA
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.
095d384d 1033
748fa866
DA
10342013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
1035
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.
1043
81519fd2
SM
10442013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
1045
1046 * dispnew.c (bitch_at_user): Use `user-error'.
1047
6db423a9
KB
10482013-03-17 Ken Brown <kbrown@cornell.edu>
1049
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.
1053
8f2906f5
JD
10542013-03-16 Jan Djärv <jan.h.d@swipnet.se>
1055
960ce480 1056 * nsterm.m (updateFrameSize:): Change resize increments if needed.
6615748a 1057 (ns_select): Don't return with result uninitialized.
960ce480 1058
8f2906f5
JD
1059 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
1060 and getDirectory.
1061
81519fd2
SM
1062 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
1063 New functions.
8f2906f5
JD
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
1068 EmacsOpenPanel.
1069 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
1070
cded56c1
PE
10712013-03-15 Paul Eggert <eggert@cs.ucla.edu>
1072
1073 * coding.c (decode_coding_gap): Fix typo caught by static checking.
1074
251e9147 10752013-03-15 Kenichi Handa <handa@gnu.org>
8a44e6d1
KH
1076
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.
1080
1081 * coding.h (struct coding_system): New member eol_seen.
1082
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
1094 variable.
1095
8a44e6d1
KH
1096 * lisp.h (adjust_after_replace): Cancel externing it.
1097 (insert_from_gap): Adjust prototype.
1098
5f795e34
EZ
10992013-03-15 Eli Zaretskii <eliz@gnu.org>
1100
1101 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
1102 FULLSCREEN_MAXIMIZED. (Bug#13935)
1103
f258b4be
DA
11042013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
1105
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.
1110
a5cc4dde
EZ
11112013-03-14 Eli Zaretskii <eliz@gnu.org>
1112
1113 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
1114 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
1115 and WM_ACTIVATEAPP.
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.
1119 (Bug#13953)
1120
3fc5e44a
DC
11212013-03-13 Daniel Colascione <dancol@dancol.org>
1122
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.)
1127
47d7532e
PE
11282013-03-13 Paul Eggert <eggert@cs.ucla.edu>
1129
1130 File synchronization fixes (Bug#13944).
1131 * Makefile.in (LIB_FDATASYNC): New macro.
1132 (LIBES): Use it.
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.
1138
c7ffccaf
EZ
11392013-03-13 Eli Zaretskii <eliz@gnu.org>
1140
4e2df81d 1141 * w32term.c (w32_read_socket): If the Emacs frame is being
c7ffccaf
EZ
1142 activated, call w32fullscreen_hook, to make sure the new frame
1143 dimensions are in effect. (Bug#13937)
1144
8a7debc1
DA
11452013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
1146
1147 * xdisp.c (init_iterator): Simplify because both character and byte
1148 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
1149 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
1150 character and byte positions can be obtained from marker.
8a7debc1 1151
7fd8c501
PE
11522013-03-13 Paul Eggert <eggert@cs.ucla.edu>
1153
d9df6f40
PE
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):
1158 * eval.c (error):
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.
1168
7fd8c501
PE
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
1173 and FreeBSD now.
1174
cb0290df
PE
11752013-03-11 Paul Eggert <eggert@cs.ucla.edu>
1176
1177 * insdel.c (adjust_after_replace): Use bool for boolean.
1178
cbae07d5
SM
11792013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
1180
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.
1186
819e2da9
DC
11872013-03-10 Daniel Colascione <dancol@dancol.org>
1188
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
1192 w32fns.c.
1193
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.
1196
1197 * w32fns.c (x_set_name, x_set_title): Use the above macros to
1198 properly display non-ASCII frame titles in cygw32 builds.
1199
1200 * w32fns.c (Fw32_shell_execute): Use the above macros to properly
1201 call ShellExecute in cygw32 builds.
1202
1203 * w32fn.c (Fx_file_dialog): Use the above macros to simplify the
1204 common file dialog code.
1205
1206 * w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
1207 can just use du like other systems.
1208
1209 * coding.c (from_unicode_buffer): Declare.
1210 * coding.c (from_unicode_buffer): Implement.
1211
99ec1647
SM
12122013-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
1213
d2e24f92
SM
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.
1218
99ec1647
SM
1219 * bytecode.c (struct byte_stack): Remove `constants' when unused.
1220
138c0ae8
EZ
12212013-03-10 Eli Zaretskii <eliz@gnu.org>
1222
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)
99ec1647
SM
1227 (mouse_face_from_buffer_pos, note_mouse_highlight):
1228 Use MATRIX_ROW_DISPLAYS_TEXT_P.
138c0ae8 1229 (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
99ec1647
SM
1230 (mouse_face_from_string_pos, fast_find_string_pos):
1231 Use MATRIX_ROW_VPOS.
138c0ae8
EZ
1232
1233 * xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1234
1235 * w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1236
1237 * xdisp.c (try_cursor_movement): Use MATRIX_ROW and
1238 MATRIX_MODE_LINE_ROW.
1239
1240 * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
1241
c230dd7d
KH
12422013-03-10 handa <handa@gnu.org>
1243
1244 * lisp.h (adjust_after_replace): Extern it.
1245
1246 * coding.c (detect_coding): Cound the heading ASCII bytes in the
1247 case of detection for coding_category_utf_8_auto.
99ec1647
SM
1248 (decode_coding_gap) [not CODING_DISABLE_ASCII_OPTIMIZATION]:
1249 Skip decoding if all bytes are ASCII.
c230dd7d
KH
1250
1251 * insdel.c (adjust_after_replace): Make it public. New arg
1252 text_at_gap_tail.
1253 (adjust_after_insert): Call adjust_after_replace with the new arg
1254 value 0.
1255
27a98a62
SM
12562013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
1257
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.
1261
1262 * keyboard.c (access_keymap_keyremap): Accept nil return value from
1263 functions to mean "no change".
1264
457882c2
PE
12652013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1266
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.
1277
b5426561
DA
12782013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1279
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.
27a98a62
SM
1286 * editfns.c (Fconstrain_to_field): Break long line.
1287 Adjust call to find_newline.
b5426561
DA
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.
1294
0bce5d9e
PE
12952013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1296
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)
1301 (print_object):
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.
1312
36075a19
DA
13132013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1314
1315 * bidi.c (bidi_fetch_char): Swap first and second arguments
1316 to match other functions accepting character and byte positions.
1317 Adjust comment.
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.
1322
4aae1914
EZ
13232013-03-07 Eli Zaretskii <eliz@gnu.org>
1324
1325 * .gdbinit (prowlims): Display the enabled_p flag of the row.
1326
c54aa166
DA
13272013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1328
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.
1332 Add eassert.
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.
1341 Use SET_PT_BOTH.
1342 (Frecenter): Adjust calls to vmotion.
1343
3de717bd
DA
13442013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1345
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.
1359
d26e478e
EZ
13602013-03-06 Eli Zaretskii <eliz@gnu.org>
1361
a611149e
EZ
1362 * search.c (find_newline_no_quit): Rename from find_next_newline.
1363 Add commentary.
1364
1365 * lisp.h (find_newline_no_quit): Rename prototype.
1366
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.
1373
d26e478e
EZ
1374 * msdos.c: Change encoding to cp850. (Bug#13879)
1375 (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
1376
1af1a51a
DA
13772013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1378
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.
1394 Add eassert.
1395
0bafabe7 13962013-03-06 Paul Eggert <eggert@cs.ucla.edu>
725eb027 1397
9b1c3271 1398 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
0845a75c
PE
1399 * sysdep.c (list_system_processes)
1400 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
9b1c3271 1401 Make it a stub in this case; otherwise the build might fail,
0845a75c 1402 and this code hasn't been tested on such hosts anyway.
725eb027 1403 Problem reported by Nelson H. F. Beebe in
9b1c3271
PE
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>.
725eb027 1407
ffc65bee
DA
14082013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1409
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.
1415
70743157
PE
14162013-03-05 Paul Eggert <eggert@cs.ucla.edu>
1417
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
1445 stack.
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.
1467
05e193f1
EZ
14682013-03-05 Eli Zaretskii <eliz@gnu.org>
1469
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>.
1474
3bfc46eb
DA
14752013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
1476
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.
1481
84ac6f9d
PE
14822013-03-04 Paul Eggert <eggert@cs.ucla.edu>
1483
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.
1487
42926ec8
DA
14882013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
1489
1490 * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
1491 * ftfont.c (ftfont_shape_by_flt): Likewise.
1492 * w32uniscribe.c (uniscribe_shape): Likewise.
1493
b5029e23
PE
14942013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1495
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
1522 creation fails.
2db41375 1523 (lock_file): Don't access freed storage.
b5029e23 1524
b270d116
AS
15252013-03-02 Andreas Schwab <schwab@linux-m68k.org>
1526
1527 * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren. (Bug#13734)
1528
81c23309
PE
15292013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1530
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.
1534
18f2ac09
EZ
15352013-03-02 Eli Zaretskii <eliz@gnu.org>
1536
27a98a62
SM
1537 * textprop.c (Fadd_text_properties, Fremove_text_properties):
1538 If the interval tree changes as a side effect of calling
18f2ac09
EZ
1539 modify_region, re-do processing starting from the call to
1540 validate_interval_range. (Bug#13743)
1541
929aeac6 15422013-02-28 Eli Zaretskii <eliz@gnu.org>
c49e2256
EZ
1543
1544 * w32.c (sys_open): Don't reset the flags for FD in fd_info[].
1545 (Bug#13546).
1546
531e70ec
EZ
15472013-02-27 Eli Zaretskii <eliz@gnu.org>
1548
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.
1552 (Bug#13807)
1553
6e65b9cc
PE
15542013-02-27 Paul Eggert <eggert@cs.ucla.edu>
1555
1556 * callint.c (Qcall_interactively):
1557 * macros.c (Qexecute_kbd_macro):
1558 Now static.
1559
3b166f09
BG
15602013-02-26 Bastien Guerry <bzg@gnu.org>
1561
1562 * window.c (Frecenter): Tiny docstring enhancement.
1563
ecc0fdd4
PE
15642013-02-26 Paul Eggert <eggert@cs.ucla.edu>
1565
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.
1580
0248b0d7
EZ
15812013-02-25 Eli Zaretskii <eliz@gnu.org>
1582
343a2aef
EZ
1583 Implement CLASH_DETECTION for MS-Windows.
1584
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
1591 lock_file_1.
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
1595 emacs_readlinkat.
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
1600 dostounix_filename.
1601
1602 * w32proc.c (sys_kill): Support the case of SIG = 0, in which case
1603 just check if the process by that PID exists.
1604
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
1607 already exists.
1608
1609 * makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
1610
0248b0d7
EZ
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
27a98a62
SM
1614 have the requested properties, not just the first one.
1615 Add assertions that the loop afterwards always modifies the
0248b0d7
EZ
1616 properties. (Bug#13743)
1617
b5071fc7
SM
16182013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
1619
1620 * callint.c (Fcall_interactively): Use the right lexical environment
1621 for `interactive' specs (bug#13811).
1622 * eval.c (Feval): Accept a lexical environment.
1623
1ddc2bd6
PE
16242013-02-25 Paul Eggert <eggert@cs.ucla.edu>
1625
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.
1656
51aa2a8b
AS
16572013-02-24 Andreas Schwab <schwab@linux-m68k.org>
1658
1659 * xdisp.c (set_message): Only check for debug-on-message if STRING
1660 is a string. (Bug#13797)
1661
1938d88c
PE
16622013-02-24 Paul Eggert <eggert@cs.ucla.edu>
1663
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>.
1670
fcee5028
PE
16712013-02-22 Paul Eggert <eggert@cs.ucla.edu>
1672
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.
1678
d78cf5ed
CB
16792013-02-22 Claudio Bley <claudio.bley@gmail.com>
1680
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.
1683
6bcd97a4
KB
16842013-02-21 Ken Brown <kbrown@cornell.edu>
1685
1686 * sheap.c (report_sheap_usage): Fix arguments of message1_no_log.
1687
b6c2bfff
SM
16882013-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
1689
e11dacb5
SM
1690 * sheap.c (report_sheap_usage): Prefer message1_nolog.
1691
b6c2bfff
SM
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.
1696
f4ad7ea1 16972013-02-19 Daniel Colascione <dancol@dancol.org>
b6c2bfff 1698
d69f1120
DC
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.
b6c2bfff 1702
2a14a4f1 17032013-02-20 Dmitry Antipov <dmantipov@yandex.ru>
42926ec8 1704
2a14a4f1
DA
1705 * search.c (find_newline): Return byte position in bytepos.
1706 Adjust comment.
b6c2bfff
SM
1707 (find_next_newline_no_quit, find_before_next_newline):
1708 Add bytepos argument.
2a14a4f1
DA
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.
1717
872faefb 17182013-02-19 Eli Zaretskii <eliz@gnu.org>
17ddfd15
EZ
1719
1720 * w32proc.c (new_child): Avoid leaking handles if the subprocess
1721 resources were not orderly released.
1722
fd80c659
EZ
17232013-02-17 Eli Zaretskii <eliz@gnu.org>
1724
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)
1728
2f73da9c
SM
17292013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
1730
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'.
1741
fd9547e8
JD
17422013-02-17 Jan Djärv <jan.h.d@swipnet.se>
1743
1744 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
fd9547e8
JD
1745 * frame.c (syms_of_frame): ... to here.
1746
f277993b
EZ
17472013-02-16 Eli Zaretskii <eliz@gnu.org>
1748
c7939585
EZ
1749 * w32.c (sys_chown): Remove unused function.
1750
cd91fb4b
EZ
1751 * w32term.c <input_signal_count>: Declare 'volatile'
1752 unconditionally. (Bug#9066)
1753
f277993b
EZ
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
1761 h_errno.
1762 (sys_gethostbyname): Set h_errno only errors detected.
1763
e454145b
PE
17642013-02-15 Paul Eggert <eggert@cs.ucla.edu>
1765
1766 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
1767
bcf7fe2a
EZ
17682013-02-15 Eli Zaretskii <eliz@gnu.org>
1769
ef9c57e2
EZ
1770 * keyboard.c (read_char): Fix calculation of auto-save time out
1771 when auto-save-timeout is less than 4. (Bug#13720)
1772
ef862e20 1773 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
b2af991a 1774 time. Improve diagnostics in DebPrint. (Bug#13546)
ef862e20 1775
bcf7fe2a
EZ
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.
1785
0063fdb1
DA
17862013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
1787
1788 * composite.c (fill_gstring_header): Remove useless prototype.
1789 Break long line.
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.
1798 Adjust comments.
1799
648e5523 18002013-02-15 Paul Eggert <eggert@cs.ucla.edu>
974c7646 1801
35b3a27e
PE
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.
35b3a27e 1807
648e5523 18082013-02-15 Eli Zaretskii <eliz@gnu.org>
6e432f0c 1809
0e4e7b74
EZ
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)
1813
6e432f0c
EZ
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)
1819
51b3a99c
JD
18202013-02-14 Jan Djärv <jan.h.d@swipnet.se>
1821
1822 * gtkutil.c (tb_size_cb): New function.
1823 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
1824
e31560a7
SM
18252013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
1826
1827 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
1828 an event.
1829
fe336261
SM
18302013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
1831
1832 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
1833
5a655b9f
DA
18342013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
1835
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.
1841
1a359750
GM
18422013-02-13 Glenn Morris <rgm@gnu.org>
1843
1844 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
1845
01fcc3a5 18462013-02-13 Paul Eggert <eggert@cs.ucla.edu>
4458c255 1847
f53f992a
PE
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.
1861
4458c255
PE
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.
1865
227be86d
PE
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.
1876
01fcc3a5 18772013-02-13 Eli Zaretskii <eliz@gnu.org>
713bfeaa
EZ
1878
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
1886 cause an infloop.
1887
83be8524
PE
18882013-02-13 Paul Eggert <eggert@cs.ucla.edu>
1889
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.
1897
45b2b768
JB
18982013-02-13 Juanma Barranquero <lekktu@gmail.com>
1899
1900 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
1901 Update dependencies.
1902
33b49d71
EZ
19032013-02-12 Eli Zaretskii <eliz@gnu.org>
1904
1905 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
1906 marker's position.
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)
1910 (Bug#13626)
c4131562
EZ
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.
33b49d71
EZ
1914
1915 * window.h (struct window): region_showing can no longer be
1916 negative.
1917
b09a4810
PE
19182013-02-11 Paul Eggert <eggert@cs.ucla.edu>
1919
a84b7c53
PE
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.
1928
b09a4810
PE
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.
1932
99d0d6dc
SM
19332013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
1934
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.
1949
f5e1b680
EZ
19502013-02-11 Eli Zaretskii <eliz@gnu.org>
1951
99d0d6dc
SM
1952 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
1953 Don't use the limitation on backwards movement when lines are truncated
f5e1b680
EZ
1954 in the window. (Bug#13675)
1955
f74de345
DA
19562013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
1957
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.
1966
a4ba3963
EZ
19672013-02-10 Eli Zaretskii <eliz@gnu.org>
1968
99d0d6dc
SM
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
a4ba3963
EZ
1971 too far. This speeds up some redisplay operations. (Bug#13675)
1972
68643cde
DA
19732013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
1974
1975 * syntax.c (scan_sexps_forward): Fix byte position calculation
1976 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
1977
7ba11bee
PE
19782013-02-10 Paul Eggert <eggert@cs.ucla.edu>
1979
1980 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
1981 that was not needed.
1982
eff1c190
PE
19832013-02-09 Paul Eggert <eggert@cs.ucla.edu>
1984
1985 Minor hashing refactoring.
1986 * fns.c (SXHASH_REDUCE): Move to lisp.h.
1987 (sxhash_float): Return EMACS_UINT, for consistency with the other
1988 hash functions.
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.
1994
6b48c831
EZ
19952013-02-09 Eli Zaretskii <eliz@gnu.org>
1996
4dde2087
EZ
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)
74ba1583 2000
8549f9e8
EZ
2001 * xdisp.c (decode_mode_spec): Remove handling of %t.
2002
6b48c831
EZ
2003 * msdos.c (careadlinkatcwd): Remove.
2004
75a65c7e
SM
20052013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
2006
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.
2010
8ca30920
DA
20112013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
2012
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.
2020
25721f5b
DA
20212013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
2022
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.
2039
9a9d91d9
DA
20402013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
2041
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.
2047
6871e574
JD
20482013-02-05 Jan Djärv <jan.h.d@swipnet.se>
2049
2050 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
2051 height.
2052
2053 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
2054 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
2055 updateCollectionBehaviour.
2056
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.
2082
3f011c7f
PE
20832013-02-04 Paul Eggert <eggert@cs.ucla.edu>
2084
2085 * fileio.c (Qchoose_write_coding_system): Now static.
2086
86f7c0fe
EZ
20872013-02-04 Eli Zaretskii <eliz@gnu.org>
2088
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
99d0d6dc
SM
2092 whole window when showing region and the mark has changed.
2093 Record the new mark position to allow redisplay optimizations.
86f7c0fe
EZ
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)
2096
2097 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
2098 not bitfield of 1 bit.
2099
5257b701
DC
21002013-02-03 Daniel Colascione <dancol@dancol.org>
2101
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
2104 during development.
2105
8ea41ea9
PE
21062013-02-02 Paul Eggert <eggert@cs.ucla.edu>
2107
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.
2116
94fbc901 21172013-02-02 Eli Zaretskii <eliz@gnu.org>
18a80473 2118
e7ac588e
EZ
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.
2127
2128 * msdos.h (dostounix_filename): Adjust prototype.
2129
2130 * w32.h (dostounix_filename): Adjust prototype.
2131
2132 * msdos.c (dostounix_filename): Accept an additional argument and
2133 ignore it.
2134 (init_environment): Adjust callers of dostounix_filename.
2135
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
2139 dostounix_filename.
2140 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
2141 non-nil.
2142 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
2143 variables, as egetenv is case-insensitive for DOS_NT.
2144
2145 * dired.c (file_name_completion): Don't call Fdirectory_file_name
2146 with an encoded file name.
2147
99d0d6dc
SM
2148 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
2149 Adjust calls to dostounix_filename.
e7ac588e
EZ
2150
2151 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
2152
2153 * unexw32.c (unexec): Adjust call to dostounix_filename.
2154
2155 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
2156
2157 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
2158 dostounix_filename.
2159
2160 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
2161 dostounix_filename.
2162
e7c3fb06
EZ
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
2166 encoding is UTF-8.
2167
18a80473
EZ
2168 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
2169 even if w32-quote-process-args is nil.
2170
35e85499
PE
21712013-02-01 Paul Eggert <eggert@cs.ucla.edu>
2172
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.
2179
422ff52b
DA
21802013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
2181
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.
2198
8654f9d7
PE
21992013-02-01 Paul Eggert <eggert@cs.ucla.edu>
2200
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 +
2211 stat.
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.
2229
9dbda100
GM
22302013-01-31 Glenn Morris <rgm@gnu.org>
2231
2232 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
20a8c477
GM
2233 (Fwrite_region): Update for new choose_write_coding_system args.
2234 Move the last piece of choose_write_coding_system here. (Bug#13522)
9dbda100
GM
2235 (syms_of_fileio): Add choose-write-coding-system.
2236
3f82a88a 22372013-01-30 Eli Zaretskii <eliz@gnu.org>
224f4ec1
EZ
2238
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)
2242
806fed21 2243 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
99d0d6dc
SM
2244 (logon_network_drive, stat_worker, symlink, chase_symlinks):
2245 Use CharNextExA and CharPrevExA to iterate over file names encoded in
806fed21
EZ
2246 DBCS. (Bug#13553)
2247
6ee4509a
EZ
2248 * w32.c (w32_get_long_filename, init_environment, readlink):
2249 Support file names encoded in DBCS codepages.
26854e9c
EZ
2250 (readlink): Use the current file-name-coding-system, not the ANSI
2251 codepage, to decode and handle targets of symlinks.
6ee4509a 2252
cf01a359
EZ
22532013-01-28 Eli Zaretskii <eliz@gnu.org>
2254
2255 * w32.c (opendir): Now accepts a 'const char *'.
2256
6fd326b7
DA
22572013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
2258
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.
2266
d8cd7742
EZ
22672013-01-25 Eli Zaretskii <eliz@gnu.org>
2268
2269 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
2270
266fee4f
DA
22712013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
2272
2273 * font.c (num_fonts): Remove the leftover from old
2274 debugging code. Adjust comment style here and there.
59e624b3
DA
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.
266fee4f 2278
830e46e6 22792013-01-25 Eli Zaretskii <eliz@gnu.org>
6d2851de
EZ
2280
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
99d0d6dc
SM
2285 CharNextExA, instead of incrementing a 'char *' pointer.
2286 Use _mbslwr instead of _strlwr. (Bug#13515)
6d2851de 2287
81abbb95
EZ
2288 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
2289 request of memory reservation to 1.7GB. (Bug#13065)
2290
830e46e6 22912013-01-25 Andreas Schwab <schwab@linux-m68k.org>
ba14c607
AS
2292
2293 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
2294 at check_extra_latin label. (Bug#13505)
2295
fd3ceb09
DA
22962013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2297
2298 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
2299 Avoid redundant calls to strlen.
2300
edfa7fa0
DA
23012013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2302
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.
2313 * w32term.c: Ditto.
2314 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
2315 properly. Likewise for obscured.
2316 * xterm.c: Ditto.
266fee4f 2317 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
edfa7fa0
DA
2318 properly.
2319 * nsterm.m: Ditto.
2320 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
2321
5ad86e34
DA
23222013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2323
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.
2326
b09cca6a
SM
23272013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
2328
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.
2355
54ab1c5a
EZ
23562013-01-23 Eli Zaretskii <eliz@gnu.org>
2357
2358 * w32term.c (w32fullscreen_hook): Account correctly for the screen
2359 real estate used for the tool bar and the menu bar.
2360
6c27465b
DA
23612013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
2362
2363 * insdel.c (prepare_to_modify_buffer): Force redisplay if
2364 hidden buffer is prepared to modification (Bug#13164).
2365
9d93ce29
DA
23662013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2367
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.
2381
1dcb8ea2
DA
23822013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2383
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.
2389 Adjust comment.
2390
b41b8a7e
PE
23912013-01-22 Paul Eggert <eggert@cs.ucla.edu>
2392
593a5f2e
PE
2393 * emacs.c (Qkill_emacs_hook): Now static.
2394
b41b8a7e
PE
2395 * fileio.c (Finsert_file_contents): Simplify.
2396 Remove unnecessary assignments and tests.
2397
84e5ed96
EZ
23982013-01-21 Eli Zaretskii <eliz@gnu.org>
2399
2400 * w32.c (acl_set_file): Don't test for errors unless
2401 set_file_security returns FALSE. Avoids spurious errors when
2402 saving files.
2403
2ef88fd4
DA
24042013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
2405
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'
2409 where appropriate.
2410
d7a0a7c9
PE
24112013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2412
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.
2416
795e7a5b 24172013-01-19 Glenn Morris <rgm@gnu.org>
085d34c4
GM
2418
2419 * fns.c (Frandom): Doc fix.
2420
59ac2d13
EZ
24212013-01-19 Eli Zaretskii <eliz@gnu.org>
2422
2423 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
2424 segfault when there are lots of overlays.
2425
2426 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
99d0d6dc
SM
2427 when there are lots of overlays.
2428 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
59ac2d13
EZ
2429 for the details and a way to reproduce.
2430
b3fbb395
PE
24312013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2432
3a955a1f
PE
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.
2443
21cd50b8
PE
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.
2446
b3fbb395
PE
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.
2453
73c14218
CY
24542013-01-19 Chong Yidong <cyd@gnu.org>
2455
2456 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
2457 aborting on Fsignal (Bug#13289).
2458
6a9465f3
EZ
24592013-01-19 Eli Zaretskii <eliz@gnu.org>
2460
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>.
76e9f7b9 2464 (fstat): Return owner and group like 'stat' and 'lstat' do.
6a9465f3 2465
fa705c99
PE
24662013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2467
9fe43ff6
PE
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):
2475 New static vars.
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.
2480
fa705c99
PE
2481 * fileio.c (Finsert_file_contents): Simplify new diagnostic
2482 and make it more consistent with other stat-failure diagnostics.
2483
e07469fa
DA
24842013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
2485
99d0d6dc
SM
2486 Fix crash when inserting data from non-regular files.
2487 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
e07469fa
DA
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.
2497
67722112
PE
24982013-01-17 Paul Eggert <eggert@cs.ucla.edu>
2499
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.
2505
468afbac
DA
25062013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2507
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.
2521
0e70695a
DA
25222013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2523
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
2527 debugging stubs.
2528
963ea40f
PE
25292013-01-15 Paul Eggert <eggert@cs.ucla.edu>
2530
2531 * alloc.c (free_save_value): Now static.
2532
3346c1d0
DA
25332013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2534
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.
99d0d6dc
SM
2539 (Finsert_file_contents): Convert trytry to ptrdiff_t.
2540 Use format_save_value to pass parameters to read_non_regular.
3346c1d0
DA
2541 (read_non_regular): Use XSAVE_ macros to extract parameters.
2542 Adjust comment.
2543 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
2544 format_save_value.
2545 (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.
2546
2b30549c
DA
25472013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2548
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.
2554
1b971ac1
DA
25552013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2556
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.
2567
c50cf2ea
PE
25682013-01-14 Paul Eggert <eggert@cs.ucla.edu>
2569
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.
2582
9d5a1260
DA
25832013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2584
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.
2588
73ebd38f
DA
25892013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2590
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.
2612
b826986f
JD
26132013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2614
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
2e7a1892 2618 Bug#11484 with LCD smoothing on.
b826986f 2619
c0511b57 26202013-01-13 Paul Eggert <eggert@cs.ucla.edu>
45b7bfdd 2621
b6f960a0
PE
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.
2625
616763d5
JD
26262013-01-11 Jan Djärv <jan.h.d@swipnet.se>
2627
2628 * xterm.c (syms_of_xterm): Adjust documentation for
2629 scroll-bar-adjust-thumb-portion.
2630
0b59090b 26312012-12-31 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
ec782c5f
JD
2632
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.
2636
2637 * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
2638 GTK.
2639
7bc916b4
JD
26402013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2641
eac4d08f
JD
2642 * nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
2643 event is generated.
2644 (doCommandBySelector:): Set processingCompose to NO.
2645
7bc916b4
JD
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
2650 return.
2651 (nsfont_draw): Add block/unblock_input calls.
2652
bdc9b756
PE
26532013-01-12 Dmitry Antipov <dmantipov@yandex.ru>
2654
2655 * indent.c (Fvertical_motion): Remove now-incorrect GCPROs
2656 for old_charpos and old_bytepos.
2657
ee56a6dc
PE
26582013-01-12 Paul Eggert <eggert@cs.ucla.edu>
2659
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.
2664
9fc9a531
AH
26652013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
2666
99d0d6dc
SM
2667 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
2668 Fix ambiguous doc string cross-reference(s).
9fc9a531
AH
2669
2670 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
2671 doc string cross-reference(s).
2672
2673 * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
2674 string cross-reference(s).
2675
6020559a
DA
26762013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
2677
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.
2686
b8956427
PE
26872013-01-11 Paul Eggert <eggert@cs.ucla.edu>
2688
2689 emacsclient -t should not suspend Emacs server (Bug#13387)
2690 * lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
2691 New functions.
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.
2700
0b59090b 27012013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
48660ca5
JD
2702
2703 * gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
2704 x_last_font_name (Bug#13403).
2705
58cc0a01
DA
27062013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
2707
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
2723 line-spacing.
2724 * data.c (store_symval_forwarding): Adjust to call the predicate.
2725
5104861e
JB
27262013-01-09 Juanma Barranquero <lekktu@gmail.com>
2727
2728 * w32.c (get_name_and_id, acl_set_file):
2729 * w32term.c (w32fullscreen_hook): Remove unused local variables.
2730
eefd7278
DA
27312013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
2732
2733 * lisp.h (make_gap_1): New prototype.
2734 * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
2735 gap size values.
2736 * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
2737 naming convention.
2738 (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
2eae9ccc 2739 * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment.
eefd7278
DA
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.
2745
073ca75b
JL
27462013-01-08 Juri Linkov <juri@jurta.org>
2747
2748 * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
2749 of (supports :underline (:style wave)). (Bug#13000)
2750
3bace969
AH
27512013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
2752
2753 * undo.c (Fprimitive_undo): Move to simple.el.
2754 (syms_of_undo): Remove declarations for Sprimitive_undo.
2755
63a63bd4
SM
27562013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
2757
2758 * keyboard.c (echo_add_key): Rename from echo_add_char.
2759
56ed110a
CY
27602013-01-06 Chong Yidong <cyd@gnu.org>
2761
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
2764 empty (Bug#13255).
2765 (echo_char): Use it.
2766 (read_key_sequence): When echoing mock input, ensure that the
2767 trailing dash is properly added.
2768
b630991b
EZ
27692013-01-05 Eli Zaretskii <eliz@gnu.org>
2770
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
63a63bd4
SM
2773 digits for buffer positions, before misalignment starts.
2774 Display "0" for integer "object" field.
b630991b
EZ
2775 (dump_glyph_row): Adapt the header line to changes in dump_glyph.
2776 Display the newline glyph more unambiguously.
2777
f032a318
YM
27782013-01-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2779
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)
2784
4240dd3c
YM
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.
2789
553081a5
SM
27902013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
2791
2792 * fileio.c (Ffile_acl): Undocument return format.
2793
9539d465 27942013-01-02 Glenn Morris <rgm@gnu.org>
08f59219
GM
2795
2796 * keymap.c (Fkey_description): Doc fix. (Bug#13323)
2797
71376d4b
PE
27982013-01-02 Paul Eggert <eggert@cs.ucla.edu>
2799
2800 Simplify via eabs.
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).
2811
a7f11948
EZ
28122012-12-31 Eli Zaretskii <eliz@gnu.org>
2813
2814 * w32.c (unsetenv): Set up the string passed to _putenv
63a63bd4
SM
2815 correctly.
2816 See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
a7f11948
EZ
2817 for the bug this caused.
2818
84cc1ab6
PE
28192012-12-30 Paul Eggert <eggert@cs.ucla.edu>
2820
2821 * coding.c (Qmac): Now static.
2822
5a1d858b
JD
28232012-12-30 Jan Djärv <jan.h.d@swipnet.se>
2824
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.
8b745d92
JD
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
2839 false.
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.
5a1d858b
JD
2847
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.
2851
d5e5e7b4 28522012-12-30 Andreas Schwab <schwab@linux-m68k.org>
2550c6e4
AS
2853
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).
2858
d5e5e7b4 28592012-12-30 Eli Zaretskii <eliz@gnu.org>
7a3a7493
EZ
2860
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.
2863 (Bug#13277)
2864
e7ae8039
EZ
28652012-12-29 Eli Zaretskii <eliz@gnu.org>
2866
ccad023b
EZ
2867 * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
2868 file's SELinux context or ACLs successfully set, nil otherwise.
2869 (Bug#13298)
8d23a331 2870 (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
ccad023b 2871
e7ae8039
EZ
2872 * w32proc.c (reader_thread): Avoid passing NULL handles to
2873 SetEvent and WaitForSingleObject.
2874
7456e13f
PE
28752012-12-28 Paul Eggert <eggert@cs.ucla.edu>
2876
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.
2880
1ab0c851
GM
28812012-12-27 Glenn Morris <rgm@gnu.org>
2882
2883 * cygw32.c (Fcygwin_convert_file_name_to_windows)
2884 (Fcygwin_convert_file_name_from_windows): Doc fixes.
2885
82e2a1f0 28862012-12-27 Eli Zaretskii <eliz@gnu.org>
f5c81c80 2887
63a63bd4
SM
2888 * fileio.c (file_name_as_directory, directory_file_name):
2889 Accept an additional argument MULTIBYTE to indicate whether the input C
f5c81c80
EZ
2890 came from a multibyte or a unibyte Lisp string; all callers
2891 adjusted. Don't assume the input string is always multibyte.
2892 (Bug#13262)
2893 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
2894 don't ENCODE_FILE them, and return a unibyte string if the input
2895 was unibyte.
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
2899 library functions.
2900
8847a0de
DA
29012012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2902
2903 * lisp.h (toplevel): Add two notices to the comment about
2904 defining a new Lisp data type.
6cda572a
DA
2905 * print.c (print_object): If Lisp_Save_Value object's pointer
2906 is the address of a memory area containing Lisp_Objects, try
2907 to print them.
2908 * alloc.c (valid_lisp_object_p): Adjust comment.
8847a0de 2909
4b298d5a
DA
29102012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2911
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.
2922
12384b01
PE
29232012-12-26 Paul Eggert <eggert@cs.ucla.edu>
2924
2925 * window.c (select_window_1): Now static, since it's used only here.
2926
f1665bdc
EZ
29272012-12-25 Eli Zaretskii <eliz@gnu.org>
2928
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.
2933
9a0d4f34
DA
29342012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
2935
2936 * xdisp.c (redisplay_window): Remove inner local variable
2937 because the outer shadowed one has the same meaning.
cd78d9b1
DA
2938 * xterm.h (struct x_output): Remove toolbar_detached member since it's
2939 set but never used.
2940 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
2941 (xg_create_tool_bar): Adjust users.
9a0d4f34 2942
f9e7c67e
DA
29432012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
2944
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.
2944d406
DA
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.
f9e7c67e 2953
299614f3
EZ
29542012-12-23 Eli Zaretskii <eliz@gnu.org>
2955
40ff07a5
EZ
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.
2961
299614f3
EZ
2962 * w32proc.c (reader_thread): Do not index fd_info[] with negative
2963 values.
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.
2969
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
63a63bd4
SM
2973 delete_child on that subprocess when its SIGCHLD arrives.
2974 This avoids closing handles used for communications between sys_select
299614f3
EZ
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
2977 it.
2978
cf162aee
JD
29792012-12-23 Jan Djärv <jan.h.d@swipnet.se>
2980
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
2984 executing script.
2985
94900bfe
MR
29862012-12-22 Martin Rudalics <rudalics@gmx.at>
2987
2988 * window.c (Fselect_window): Reword doc-string (Bug#13248).
2989
b2faf49c
EZ
29902012-12-22 Eli Zaretskii <eliz@gnu.org>
2991
2992 * w32term.c (w32fullscreen_hook): New function.
2993 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
2994
7efa3fb3
EZ
29952012-12-21 Eli Zaretskii <eliz@gnu.org>
2996
bb085aed
EZ
2997 * fileio.c (Finsert_file_contents): Doc fix.
2998
7efa3fb3
EZ
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.
3005 (Bug#13086)
3006 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
3007
c1f02afa
CY
30082012-12-21 Chong Yidong <cyd@gnu.org>
3009
3010 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
3011
5bec25eb
CY
3012 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
3013
a4b0cca1 30142012-12-21 Eli Zaretskii <eliz@gnu.org>
92340ec7
EZ
3015
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
3021 callers changed.
3022
34b4b7eb
CY
30232012-12-21 Chong Yidong <cyd@gnu.org>
3024
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.
3027
13002885
DA
30282012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
3029
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.
3034 Adjust comment.
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.
9a0d4f34 3039 * process.c (process_send_region): Likewise. Use convenient
13002885
DA
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.
3044
99e9311c
PE
30452012-12-20 Paul Eggert <eggert@cs.ucla.edu>
3046
3047 * xdisp.c (redisplay_internal): Remove now-unused local.
3048
e02230bf
SM
30492012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
3050
3051 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
3052 (redisplay_internal): Don't bother selecting the frame to get the
4a74c818 3053 proper value of frame-local variables (bug#13225).
e02230bf 3054
1687fb14
DA
30552012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
3056
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.
3060
a2f07cd2
DA
30612012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
3062
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.
3066
474d441e
EZ
30672012-12-18 Eli Zaretskii <eliz@gnu.org>
3068
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
3071 Posix platforms do.
3072 (acl_set_file): Call revert_to_self, if any privileges were
3073 enabled.
3074
8725c076
JB
30752012-12-17 Juanma Barranquero <lekktu@gmail.com>
3076
3077 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
3078 ($(BLD)/w32.$(O)): Update dependencies.
3079
1e101a4b
SM
30802012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
3081
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.
3089
66447e07
EZ
30902012-12-17 Eli Zaretskii <eliz@gnu.org>
3091
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.
3111
3112 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
3113
207a7ef0
PE
31142012-12-17 Paul Eggert <eggert@cs.ucla.edu>
3115
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.
3123
17fdfc15
PE
31242012-12-16 Paul Eggert <eggert@cs.ucla.edu>
3125
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>.
3129
7c3d167f
RF
31302012-12-16 Romain Francoise <romain@orebokech.com>
3131
3132 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
3133 (Fcopy_file): Change last arg to `preserve_extended_attributes'
1e101a4b 3134 and copy ACL entries of file in addition to SELinux context if set.
7c3d167f
RF
3135 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
3136
3137 * Makefile.in (LIBACL_LIBS): New macro.
3138 (LIBES): Use it.
3139
7d80ea23
PE
31402012-12-15 Paul Eggert <eggert@cs.ucla.edu>
3141
3142 * fileio.c (internal_delete_file): Use bool for boolean.
3143
b0728617
EZ
31442012-12-15 Eli Zaretskii <eliz@gnu.org>
3145
3146 Fix bug #13079 on MS-Windows with temp files not being deleted.
3147 * w32.h (_child_process): New members input_file and
3148 pending_deletion.
3149 (register_child): First argument is now pid_t.
3150 (record_infile, record_pending_deletion): New prototypes.
3151
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.
3160
3161 * fileio.c (internal_delete_file): Return an int again: non-zero
3162 if delete-file succeeds, zero otherwise.
3163
3164 * lisp.h (internal_delete_file): Adjust prototype.
3165
3166 * callproc.c (Fcall_process): Don't overwrite infile with result
3167 of DECODE_FILE.
3168 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
3169 asynchronous subprocess, record the name of the input file name,
3170 if any.
3171 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
3172 delete the file, record it as pending deletion when the subprocess
3173 exits.
3174
7e90af26
EZ
31752012-12-14 Eli Zaretskii <eliz@gnu.org>
3176
3177 * editfns.c [HAVE_PWD_H]: Include grp.h.
3178
3179 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
3180
97976f9f
PE
31812012-12-14 Paul Eggert <eggert@cs.ucla.edu>
3182
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.
3189
26ec1f49
SM
31902012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
3191
ad966fe7
SM
3192 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
3193 Keep selected_window and selected_frame in sync.
26ec1f49 3194
5c207910
EZ
31952012-12-14 Eli Zaretskii <eliz@gnu.org>
3196
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.
3201
26ec1f49
SM
3202 * dired.c (Ffile_attributes) [WINDOWSNT]:
3203 Set w32_stat_get_owner_group to a non-zero value, to request accurate
5c207910
EZ
3204 owner and group information from 'lstat'.
3205
893f52d8
PE
32062012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3207
4c95c9a5
PE
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.
3212
893f52d8
PE
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.
3216
40d1e434
DA
32172012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
3218
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.
3225
727f9739 32262012-12-13 Eli Zaretskii <eliz@gnu.org>
e8c6e965
EZ
3227
3228 * search.c (search_buffer): Check the inverse translations of each
3229 character in pattern when the buffer being searched is unibyte.
3230 (Bug#13084)
3231
727f9739 32322012-12-13 Paul Eggert <eggert@cs.ucla.edu>
184246df
PE
3233
3234 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
3235 files, fixing a regression from 24.2.
645c6a30 3236 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
184246df 3237
d20704ef
PE
32382012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3239
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
3245 directories.
3246
2dd61a9b
DA
32472012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
3248
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.
3254
cc98b684
DC
32552012-12-12 Daniel Colascione <dancol@dancol.org>
3256
1e101a4b 3257 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
cc98b684
DC
3258 the dumped Emacs is not a sparse file, greatly improving Cygwin
3259 "make bootstrap" performance.
3260
38e791fd
MA
32612012-12-11 Michael Albinus <michael.albinus@gmx.de>
3262
3263 * inotify.c (inotify_callback): Generate an Emacs event for every
3264 incoming inotify event.
3265
f9d1448f
EZ
32662012-12-11 Eli Zaretskii <eliz@gnu.org>
3267
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)
3278
c6afe371
DA
32792012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3280
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
3287 is passed.
3288
1b47babd
EZ
32892012-12-11 Eli Zaretskii <eliz@gnu.org>
3290
3291 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
3292 encoded_file_name, which is what it is.
3293
4c1acb95
DA
32942012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3295
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.
3308
0eeb69fe
JB
33092012-12-11 Juanma Barranquero <lekktu@gmail.com>
3310
3311 * makefile.w32-in (SIG2STR_H): New macro.
3312 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
3313 ($(BLD)/w32notify.$(O)): Update dependencies.
3314
1cf1bbd5
DC
33152012-12-10 Daniel Colascione <dancol@dancol.org>
3316
8db4b52f
DC
3317 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
3318 Windows file notification functionality unless WINDOWSNT.
3319
1cf1bbd5
DC
3320 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
3321 declarations.
3322
3323 * w32fns.c (cache_system_info): Initialize the global hinst
3324 variable here so various initialization calls DTRT.
3325
1e101a4b 3326 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
1cf1bbd5
DC
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.
3330
3331 * emacs.c (main): Call cache_system_info early in startup; we
3332 previously weren't calling it in Cygwin builds.
3333
26ec1f49
SM
3334 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
3335 Teach the autoconf build system how to compile a Windows resource file
1cf1bbd5
DC
3336 and link it to Emacs.
3337
98a07056
DA
33382012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
3339
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
3347 in any window.
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.
3358
2b8c9064
EZ
33592012-12-10 Eli Zaretskii <eliz@gnu.org>
3360
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
3364 available.
3365
3366 * w32xfns.c (drain_message_queue): Now returns an int: an
3367 indication whether any WM_EMACS_FILENOTIFY messages were found in
3368 the queue.
3369
3370 * w32inevt.c (handle_file_notifications): New function.
3371 (w32_console_read_socket): Call it to process file notifications.
3372
3373 * w32console.c (initialize_w32_display): Record the main thread ID
3374 in dwMainThreadId.
3375
3376 * deps.mk (inotify.o): New dependency list.
3377
3378 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
3379
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):
3385 Add prototypes.
3386
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.
3391
3392 * w32notify.c: New file, implements file event notifications for
3393 MS-Windows.
3394
3395 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
3396 by posting it to the w32_read_socket queue.
3397
1e101a4b 3398 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
2b8c9064
EZ
3399
3400 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
3401 (GLOBAL_SOURCES): Add w32notify.c
3402 ($(BLD)/w32notify.$(O)): New set of dependencies.
3403
3404 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
3405
1e101a4b
SM
3406 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
3407 Handle FILE_NOTIFY_EVENT.
2b8c9064
EZ
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.
3411
3412 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
3413 syms_of_w32notify.
3414
81606b10
RS
34152012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
3416
2b8c9064 3417 Support for filesystem notifications on GNU/Linux via inotify.
1e101a4b 3418 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
81606b10
RS
3419
3420 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
3421
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.
3429
3430 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
3431
3432 * Makefile.in (base_obj): Add inotify.o.
3433
3434 * inotify.c: New file.
3435
265c2fbf 34362012-12-10 Jan Djärv <jan.h.d@swipnet.se>
a06ae17d
JD
3437
3438 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
3439
265c2fbf 34402012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
cb576b5c
FP
3441
3442 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
3443 DWORD_PTR, for compatibility with 64-bit builds.
3444
a06ae17d 3445 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
cb576b5c
FP
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.
3449
265c2fbf 34502012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
76b92fee
CS
3451
3452 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
3453
265c2fbf 34542012-12-10 Eli Zaretskii <eliz@gnu.org>
81d8cc53
EZ
3455
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)
3459
265c2fbf 34602012-12-10 Martin Rudalics <rudalics@gmx.at>
2cec368c
MR
3461
3462 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
3463
5f460827
PE
34642012-12-10 Paul Eggert <eggert@cs.ucla.edu>
3465
3466 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
3467 for string length.
3468
a16e75cd
EZ
34692012-12-08 Eli Zaretskii <eliz@gnu.org>
3470
3471 * w32.c (unsetenv): Return 0 if the input string is too long.
3472
5745a7df
PE
34732012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3474
3475 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
3476 * alloc.c (xputenv): New function.
3477 * dbusbind.c (Fdbus_init_bus):
3478 * emacs.c (main):
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.
3498
c56efa40
FP
34992012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
3500
3501 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
3502
75ceee05
EZ
35032012-12-08 Eli Zaretskii <eliz@gnu.org>
3504
3505 * w32.c (unsetenv, sys_putenv): New functions.
3506
1b6dbfeb
CY
35072012-12-08 Chong Yidong <cyd@gnu.org>
3508
3509 * editfns.c (Finsert_char): Make the error message more
3510 informative (Bug#12992).
3511
d983a10b
PE
35122012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3513
7be78020
PE
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.
3518
d983a10b
PE
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.
3539
9cdde1e2
PE
35402012-12-07 Paul Eggert <eggert@cs.ucla.edu>
3541
3542 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
3543 This will cause a production Emacs to dump core instead of
3544 infinite-looping.
3545
822995f8
DA
35462012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3547
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.
3553
ed08365b
DA
35542012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3555
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.
3561
e86f5134
EZ
35622012-12-06 Eli Zaretskii <eliz@gnu.org>
3563
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)
3567
1700db3c
DA
35682012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3569
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
3576 all window frames.
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.
3580
35fb8050
PE
35812012-12-06 Paul Eggert <eggert@cs.ucla.edu>
3582
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.
3590
565212e5
DA
35912012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3592
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.
3596
d8ad4d3f 35972012-12-06 Eli Zaretskii <eliz@gnu.org>
d3cefd13
EZ
3598
3599 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
3600 fails, signal an error instead of continuing with an empty
3601 string. (Bug#13079)
7c2fcf9b
EZ
3602 Encode expanded temp file pattern before passing it to mkstemp or
3603 mktemp.
d3cefd13 3604
2e7cddd3
EZ
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).
3608 (Bug#12933)
3609
644d3f0d
PE
36102012-12-05 Paul Eggert <eggert@cs.ucla.edu>
3611
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.
3617
396376f1
AS
36182012-12-04 Andreas Schwab <schwab@linux-m68k.org>
3619
3620 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
3621 processes.
3622
350f51ad
DA
36232012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
3624
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.
3635
bc9dbce6
PE
36362012-12-03 Paul Eggert <eggert@cs.ucla.edu>
3637
bb5f74ee
PE
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.
3654 All uses changed.
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):
3691 Remove decls.
3692 (record_deleted_pid, child_status_changed): New decls.
3693 (wait_for_termination): Adjust to API changes noted above.
3694
bc9dbce6
PE
3695 * bytecode.c, lisp.h (Qbytecode): Remove.
3696 No longer needed after 2012-11-20 interactive-p changes.
3697
3cf3c607
EZ
36982012-12-03 Eli Zaretskii <eliz@gnu.org>
3699
3700 * xdisp.c (redisplay_window): If the cursor is visible, but inside
3701 the scroll margin, move point outside the margin. (Bug#13055)
3702
005c8d13
JD
37032012-12-03 Jan Djärv <jan.h.d@swipnet.se>
3704
3705 * gtkutil.c (my_log_handler): New function.
3706 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
3707
20edc1c9
DA
37082012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3709
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.
3716
62c2e5ed
DA
37172012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3718
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.
3723 Add comment.
3724 (save_excursion_restore): Adjust to match saved data structure.
3725 Use free_save_value to offload some work from GC. Drop obsolete
3726 #if 0 code.
3727
c5bc2d1d 37282012-12-03 Chong Yidong <cyd@gnu.org>
a2458031
CY
3729
3730 * fileio.c (Vauto_save_list_file_name): Doc fix.
3731
c5bc2d1d 37322012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
c7b36b95
FP
3733
3734 * w32fns.c: Remove prototype of atof.
1e101a4b 3735 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
c7b36b95 3736 builds.
1e101a4b 3737 (file_dialog_callback): Make it UINT_PTR.
c7b36b95
FP
3738
3739 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
3740 with 64-bit builds.
3741
3742 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
3743 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
3744 defined.
3745
c5bc2d1d 37462012-12-03 Glenn Morris <rgm@gnu.org>
14d27346 3747
a9de9f0c 3748 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
14d27346 3749
21e54a94
PE
37502012-12-02 Paul Eggert <eggert@cs.ucla.edu>
3751
2dd2e622
PE
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.
3758
21e54a94
PE
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.
3765
3e5490f7
PE
37662012-12-01 Paul Eggert <eggert@cs.ucla.edu>
3767
3768 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
3769
75b4f59c
YM
37702012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3771
3772 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
3773 display for sliced images (Bug#10500).
3774
3775 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
3776
f8aff4c6
JB
37772012-11-30 Juanma Barranquero <lekktu@gmail.com>
3778
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).
3781
3940b924
DA
37822012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
3783
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.
3792
4a9204fe
PE
37932012-11-29 Paul Eggert <eggert@cs.ucla.edu>
3794
3795 * callproc.c (Fcall_process): Don't misreport vfork failure.
3796
60aeceb8
PE
37972012-11-28 Paul Eggert <eggert@cs.ucla.edu>
3798
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.
3807
00dc3ead
KH
38082012-11-18 Kenichi Handa <handa@gnu.org>
3809
3810 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
3811 for the variable "f".
3812
e1bf05c1
KH
38132012-11-13 Kenichi Handa <handa@gnu.org>
3814
3815 * font.c (font_unparse_xlfd): Exclude special characters from the
3816 generating XLFD name.
3817
22626a85
PE
38182012-11-27 Paul Eggert <eggert@cs.ucla.edu>
3819
350e0088
PE
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.
3823
22626a85
PE
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.
350e0088 3827
22626a85
PE
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.
3835
5c9cf0a3 38362012-11-27 Eli Zaretskii <eliz@gnu.org>
3fa1e84d
EZ
3837
3838 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
3839 (Bug#11964)
3840
22294a56
EZ
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.
3845
5fbab051
PE
38462012-11-25 Paul Eggert <eggert@cs.ucla.edu>
3847
3848 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
3849
bcd77a2b
KB
38502012-11-24 Ken Brown <kbrown@cornell.edu>
3851
3852 * keyboard.c (HAVE_MOUSE):
3853 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
3854 were always defined.
3855
d125ca15 38562012-11-24 Eli Zaretskii <eliz@gnu.org>
8654a41b 3857
24becea4
EZ
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.
3861
8654a41b
EZ
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).
3865
cb5867b1
EZ
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)
3869
f418b22e
DA
38702012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
3871
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
3876 really used.
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,
26ec1f49
SM
3880 asked_for_visible and menubar_active members.
3881 Drop unused pending_menu_activation member.
f418b22e
DA
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.
3885
a879f0ea
EZ
38862012-11-23 Eli Zaretskii <eliz@gnu.org>
3887
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.
3891
95ef7787
PE
38922012-11-23 Paul Eggert <eggert@cs.ucla.edu>
3893
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
3902 $(NT_INC)/dirent.h.
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".
3908
12645ae6
CY
39092012-11-23 Chong Yidong <cyd@gnu.org>
3910
3911 * xftfont.c (xftfont_open): Remove duplicate assignment.
3912
5c747675
DA
39132012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3914
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.
3923 Adjust users.
3924 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
3925 Do not check whether GC is in progress.
3926
6ceeb5f1
DA
39272012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3928
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.
3934
ec84768f
EZ
39352012-11-22 Eli Zaretskii <eliz@gnu.org>
3936
3937 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
3938 with Windows system header.
3939
9239d970
PE
39402012-11-21 Paul Eggert <eggert@cs.ucla.edu>
3941
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.
3950
954bba56
SM
39512012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
3952
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.
3956
6ef2e5ef 39572012-11-21 Ken Brown <kbrown@cornell.edu>
4ffea447
KB
3958
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.
3962
6ef2e5ef 39632012-11-21 Eli Zaretskii <eliz@gnu.org>
88c4a13c
EZ
3964
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.
3968
6ef2e5ef 3969 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
273ac8d1
EZ
3970
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
26ec1f49
SM
3974 dostounix_filename assumes it gets a unibyte string.
3975 Reported by Michel de Ruiter <michel@sentient.nl>, see
273ac8d1
EZ
3976 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
3977
eadf1faa
SM
39782012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
3979
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.
3990
b83fdfa9
PE
39912012-11-20 Paul Eggert <eggert@cs.ucla.edu>
3992
3993 * eval.c (interactive_p): Remove no-longer-used decl.
3994
952580c5
DA
39952012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
3996
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.
ea6de9b1
DA
4001 (window_outdated): New function.
4002 (text_outside_line_unchanged_p, redisplay_window): Use it.
4003 (redisplay_internal): Likewise. Fix indentation.
952580c5 4004
23ba2705
SM
40052012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
4006
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.
4010
6e9f7997
DC
40112012-11-19 Daniel Colascione <dancol@dancol.org>
4012
4013 * w32fns.c (Fx_file_dialog):
4014 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
4015 cygwin_convert_file_name*.
4016
4017 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
4018 Rename cygwin_convert_path* to cygwin_convert_file_name*.
4019
552a1590
PE
40202012-11-18 Paul Eggert <eggert@cs.ucla.edu>
4021
4022 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
4023
2ac9538d 40242012-11-18 Eli Zaretskii <eliz@gnu.org>
d8715cdf
EZ
4025
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.
4029
23ba2705
SM
4030 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
4031 New typedefs.
4032 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
4033 New prototypes.
d8715cdf
EZ
4034 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
4035
2ac9538d 40362012-11-18 Jan Djärv <jan.h.d@swipnet.se>
7436fc63
JD
4037
4038 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
4039 (ns_select): Return at once if events are held (Bug#12834).
4040
2ac9538d 40412012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
86dcf21c 4042
4043 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
4044 Needed following 2012-10-20 change. (Bug#12902)
4045
c1f7ba3a
JB
40462012-11-18 Juanma Barranquero <lekktu@gmail.com>
4047
4048 * w32proc.c (waitpid): Remove unused label get_result.
4049
a75ce9d3
JB
40502012-11-17 Juanma Barranquero <lekktu@gmail.com>
4051
4052 * makefile.w32-in (SYSWAIT_H): New macro.
4053 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
4054 ($(BLD)/sysdep.$(O)): Update dependencies.
4055
49cdacda
PE
40562012-11-17 Paul Eggert <eggert@cs.ucla.edu>
4057
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):
4067 Assume O_NONBLOCK.
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.
4078 (O_NOCTTY): Remove.
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.
4082
22bae83f
EZ
40832012-11-17 Eli Zaretskii <eliz@gnu.org>
4084
6ad30855
EZ
4085 * w32.c (faccessat): Pretend that directories have the execute bit
4086 set. Emacs expects that, e.g., in files.el:cd-absolute.
4087
22bae83f
EZ
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
4090 restriction.
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
4095 OPTIONS.
4096 (sys_select): Don't set dead_child.
4097
4098 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
4099 as it is no longer needed.
4100
4101 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
4102 no longer needed.
4103 (record_child_status_change): Remove the setting of
4104 record_at_most_one_child for the !WNOHANG case.
4105
a631d0e0
PE
41062012-11-17 Paul Eggert <eggert@cs.ucla.edu>
4107
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.
4115
d56f2e49
GM
41162012-11-16 Glenn Morris <rgm@gnu.org>
4117
4118 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
4119
96e05507 41202012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
5c2a7148
SM
4121
4122 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
4123
96e05507 41242012-11-16 Eli Zaretskii <eliz@gnu.org>
730b2d8f
EZ
4125
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
4132 the caller thread.
4133 (getitimer): Don't duplicate the caller thread's handle here.
4134 (Bug#12832)
4135
96e05507 41362012-11-16 Jan Djärv <jan.h.d@swipnet.se>
f99c65e5
JD
4137
4138 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
4139 called (Bug#12834).
4140
3d082a26
PE
41412012-11-16 Paul Eggert <eggert@cs.ucla.edu>
4142
4143 Remove no-longer-used pty_max_bytes variable.
4144 * process.c (pty_max_bytes): Remove; unused.
4145 (send_process): Do not set it.
4146
b72c161c
JB
41472012-11-15 Juanma Barranquero <lekktu@gmail.com>
4148
4149 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
4150 Update dependencies.
4151
bf20ea80
PE
41522012-11-15 Paul Eggert <eggert@cs.ucla.edu>
4153
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>.
4158
14f20728
EZ
41592012-11-14 Eli Zaretskii <eliz@gnu.org>
4160
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
4166 symlinks.
4167
77731919
DA
41682012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
4169
4170 * xdisp.c (echo_area_display, redisplay_internal):
4171 Omit redundant check whether frame_garbaged is set.
4172
73dcdb9f
PE
41732012-11-14 Paul Eggert <eggert@cs.ucla.edu>
4174
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.
4184 (LIBES): Use it.
4185 * callproc.c (init_callproc):
4186 * charset.c (init_charset):
4187 * fileio.c (check_existing, check_executable, check_writable)
4188 (Ffile_readable_p):
4189 * lread.c (openp, load_path_check):
4190 * process.c (allocate_pty):
4191 * xrdb.c (file_p):
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)
4199 (Ffile_readable_p):
4200 Use symbolic names instead of integers for the flags, as they're
4201 portable now.
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.
4237 All uses changed.
4238 (file_p): Remove; no longer needed.
4239
2a14f83b
DA
42402012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
4241
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...
c7085245 4246 (redraw_frame): ...to here. Add eassert. Adjust comment.
2a14f83b
DA
4247 (Fredraw_display): Use redraw_frame.
4248 * xdisp.c (clear_garbaged_frames): Likewise.
4249
f78ee6af 42502012-11-13 Eli Zaretskii <eliz@gnu.org>
32520273
EZ
4251
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.
4256 (Bug#12867)
4257
b95a9c0c
PE
42582012-11-13 Paul Eggert <eggert@cs.ucla.edu>
4259
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.
4268
be49ba74
DA
42692012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4270
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.
4275
5b04e9f9
DA
42762012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4277
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.
4292
76ae24d7
PE
42932012-11-12 Paul Eggert <eggert@cs.ucla.edu>
4294
12cc4337
PE
4295 * data.c (Qdefalias_fset_function): Now static.
4296
76ae24d7
PE
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.
4302
1479c557
PE
43032012-11-11 Paul Eggert <eggert@cs.ucla.edu>
4304
4305 * window.c (list4i): Rename from 'quad'. All uses changed.
4306 Needed because <sys/types.h> defines 'quad' on Solaris 10.
4307
11235c03
JB
43082012-11-11 Juanma Barranquero <lekktu@gmail.com>
4309
4310 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
4311 warning about mixing declarations and code in ISO C90.
4312
6baf66d5 43132012-11-10 Martin Rudalics <rudalics@gmx.at>
fdaf534a
MR
4314
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.
6baf66d5 4318 (Fset_window_combination_limit): Fix doc-string.
fdaf534a 4319
6baf66d5 43202012-11-10 Eli Zaretskii <eliz@gnu.org>
acf93bcf
EZ
4321
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
23ba2705
SM
4325 scroll margin within a reasonable number of screen lines.
4326 Fixes point position in window under scroll-up/down-aggressively when
acf93bcf
EZ
4327 point is positioned many lines beyond the window top/bottom.
4328 (Bug#12811)
4329
508f51f5
EZ
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)
4333
32e5c58c
SM
43342012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4335
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.
4340 (Fsubr_arity): CSE.
4341 (Finteractive_form): Simplify.
4342 (Fquo): Don't insist on having at least 2 arguments.
4343 (Qdefalias_fset_function): New var.
4344
719b0aa5
JD
43452012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4346
4ab15c3e
JD
4347 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
4348
719b0aa5
JD
4349 * nsfont.m (Qcondensed, Qexpanded): New variables.
4350 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
4351 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
4352
535cc8e9
DA
43532012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4354
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.
4359
7d377c48
DA
43602012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4361
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
4368 objects.
4369 (xvectype, xvecsize): Use them to examine Lisp_Object values.
4370
7ad27466
JD
43712012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4372
32e5c58c 4373 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
7ad27466
JD
4374 been removed, so remove them here also.
4375
57618ecf
SM
43762012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4377
4378 * doc.c (Fdocumentation): Handle new property
4379 dynamic-docstring-function to replace the old ad-advice-info.
4380
53371430
PE
43812012-11-09 Paul Eggert <eggert@cs.ucla.edu>
4382
4383 * fns.c (Qeql, hashtest_eq): Now static.
4384
61ddb1b9
SM
43852012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4386
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.
4391
04a2d0d3
PE
43922012-11-08 Paul Eggert <eggert@cs.ucla.edu>
4393
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.
4400
de5ef41a
SM
44012012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4402
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):
4406 Remove unused vars.
4407
a23c4171
JD
44082012-11-08 Jan Djärv <jan.h.d@swipnet.se>
4409
4410 * image.c (xpm_make_color_table_h): Fix compiler error because
4411 make_hash_table changed.
4412
0b59090b 44132012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
074d7bb0
JD
4414
4415 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
4416
b7432bb2
SM
44172012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4418
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.
4443
88002743
EZ
44442012-11-08 Eli Zaretskii <eliz@gnu.org>
4445
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)
4449
914adc42
DA
44502012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4451
4452 Shrink struct vectorlike_header to the only size field.
4453 * lisp.h (enum pvec_type): Avoid explicit enum member values.
4454 Adjust comment.
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
4462 layout.
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):
4488 New macros.
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.
4496
c66f21ea
DA
44972012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4498
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.
4503
eb147960
EZ
45042012-11-07 Eli Zaretskii <eliz@gnu.org>
4505
dab72075
EZ
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
6b064c16 4509 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
eb147960 4510
5890e400
DA
45112012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
4512
4513 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
4514
b6b3b294
PE
45152012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4516
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.
4523
e770aad5
JD
45242012-11-06 Jan Djärv <jan.h.d@swipnet.se>
4525
4526 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
4527 to keypad keys (Bug#12816).
4528
68f8f1c0
PE
45292012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4530
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.
4537
72f94d4b
DA
45382012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4539
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>.
4544
d9f07150
DA
45452012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4546
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.
4558 Adjust docstring.
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.
4579
89bc0592
DA
45802012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4581
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.
4591
c8e3a9c3
EZ
45922012-11-05 Eli Zaretskii <eliz@gnu.org>
4593
4594 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
4595
8e2417bf 4596 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
c8e3a9c3 4597 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
ae600a8e 4598 file descriptor 2 for standard error. (Bug#12805)
c8e3a9c3 4599
209c6a58
CY
46002012-11-05 Chong Yidong <cyd@gnu.org>
4601
4602 * process.c (wait_reading_process_output): Revert previous change.
4603
8148369c
PE
46042012-11-05 Paul Eggert <eggert@cs.ucla.edu>
4605
dd0333b6
PE
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):
4609 * emacs.c (main):
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.
4625
8148369c
PE
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.
4630
76abf5e5
PE
46312012-11-04 Paul Eggert <eggert@cs.ucla.edu>
4632
06b63c9b
PE
4633 Remove EMACS_OUTQSIZE+sleep hack.
4634 * dispnew.c (update_frame_1): Remove hack for terminals slower
de5ef41a
SM
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
06b63c9b
PE
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.
4640
76abf5e5
PE
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".
4647
8f31e74b
MM
46482012-11-04 Michael Marchionna <tralfaz@pacbell.net>
4649
4650 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
4651 (keyDown): Remap keypad keys to X11 virtual key codes.
4652
0d879dca
PE
46532012-11-03 Paul Eggert <eggert@cs.ucla.edu>
4654
7ccfb720
PE
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
4661 does that now.
4662
0b3d4a47
PE
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
de5ef41a
SM
4675 know the pid rather than having the callee infer it.
4676 The inference was sometimes incorrect anyway, due to another race.
0b3d4a47
PE
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'.
4691
0d879dca
PE
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.
4698
3478f4b5
EZ
46992012-11-03 Eli Zaretskii <eliz@gnu.org>
4700
4701 * lisp.mk: Adjust comments to the fact that term/internal is now
4702 loaded from loadup.el.
4703
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
4707 its argument list.
4708
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.
4712
4713 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
4714 iterator when starting in the middle of a display or overlay
4715 string. (Bug#12745)
4716
85fabcb7
CY
47172012-11-03 Chong Yidong <cyd@gnu.org>
4718
4719 * process.c (wait_reading_process_output): Clean up the last
4720 change.
4721
893cc455
CY
47222012-11-03 Jim Paris <jim@jtan.com> (tiny change)
4723
4724 * process.c (wait_reading_process_output): Avoid a race condition
4725 with SIGIO delivery (Bug#11536).
4726
0f7b074f
CY
47272012-11-03 Chong Yidong <cyd@gnu.org>
4728
4729 * buffer.c (cursor_type): Untabify docstring.
4730
3737fee7
DA
47312012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4732
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.
4737
b6a9e8b1
DA
47382012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4739
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.
4746
600d4768
JD
47472012-11-01 Jan Djärv <jan.h.d@swipnet.se>
4748
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
4752 size.
4753
1005b4b9
EZ
47542012-11-02 Eli Zaretskii <eliz@gnu.org>
4755
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.
4762
b9e9df47
DA
47632012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4764
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,
4777 respectively.
4778
2b371ff7
DA
47792012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4780
4781 Remove pad from struct input_event.
4782 * termhooks.h (struct input_event): Remove padding field.
4783 Adjust comment.
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.
4790
7e8b50d9
EZ
47912012-11-01 Eli Zaretskii <eliz@gnu.org>
4792
4793 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
4794
322aea6d
PE
47952012-10-31 Paul Eggert <eggert@cs.ucla.edu>
4796
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
4805 for the real thing.
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.
4815
220cb2bd
MA
48162012-10-31 Michael Albinus <michael.albinus@gmx.de>
4817
4818 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
4819
218e997a
MR
48202012-10-31 Martin Rudalics <rudalics@gmx.at>
4821
4822 * minibuf.c (read_minibuf): Restore current buffer since
4823 choose_minibuf_frame calling Fset_frame_selected_window may
4824 change it (Bug#12766).
4825
02615da0
JD
48262012-10-30 Jan Djärv <jan.h.d@swipnet.se>
4827
4828 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
4829
aee5b18e
KH
48302012-10-30 Kenichi Handa <handa@gnu.org>
4831
4832 * font.c (Ffont_at): If WINDOW is specified and it is not
4833 displaying the current buffer, signal an error.
4834
ba116008
DC
48352012-10-29 Daniel Colascione <dancol@dancol.org>
4836
de5ef41a
SM
4837 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
4838 In preparation for fixing bug#12739, move these functions from
ba116008
DC
4839 here...
4840
4841 * coding.h, coding.c: ... to here, and compile them only when
53372c27
DC
4842 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
4843 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
ba116008 4844
640bf8ad
EZ
48452012-10-28 Eli Zaretskii <eliz@gnu.org>
4846
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
4850 'clock'.
4851 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
4852 literal 10000.
4853
64ccff5f
JD
48542012-10-28 Jan Djärv <jan.h.d@swipnet.se>
4855
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).
4863
e483264c
SM
48642012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
4865
4866 * frame.c (x_set_font): Catch internal error.
4867
6c16c13e
EZ
48682012-10-27 Eli Zaretskii <eliz@gnu.org>
4869
e483264c
SM
4870 Avoid overflow in w32 implementation of interval timers.
4871 When possible, for ITIMER_PROF count only times the main thread
6c16c13e
EZ
4872 actually executes.
4873 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
2e612797
EZ
4874 'volatile ULONGLONG' types. All the other data which was
4875 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
6c16c13e
EZ
4876 (GetThreadTimes_Proc): New typedef.
4877 (w32_get_timer_time): New function, returns a suitable time value
4878 for the timer.
4879 (timer_loop): Enter critical section when accessing ULONGLONG
4880 values of the itimer_data struct, as these accesses are no longer
e483264c
SM
4881 atomic. Call 'w32_get_timer_time' instead of 'clock'.
4882 Remove unused variable.
6c16c13e
EZ
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.
2f246cd3 4887 (sys_spawnve): Avoid compiler warning about format mismatch.
6c16c13e 4888
ccc83f50
EZ
48892012-10-26 Eli Zaretskii <eliz@gnu.org>
4890
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.
4895
69deda53
PE
48962012-10-25 Paul Eggert <eggert@cs.ucla.edu>
4897
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).
4904
7e70a152
KH
49052012-10-23 Kenichi Handa <handa@gnu.org>
4906
4907 The following change is to make face-font-rescale-alist work
4908 correctly for non-ASCII fonts.
4909
4910 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
4911 (font_open_for_lface): Handle Vface_font_rescale_alist.
4912
49238e7f
CY
49132012-10-23 Chong Yidong <cyd@gnu.org>
4914
4915 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
4916
5ec86886
JD
49172012-10-21 Jan Djärv <jan.h.d@swipnet.se>
4918
ef446959
JD
4919 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
4920 for screen font.
4921 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
4922
5ec86886
JD
4923 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
4924 event (Bug#12681).
4925
ee7a418d
GM
49262012-10-21 Glenn Morris <rgm@gnu.org>
4927
4928 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
4929
4973679b
PE
49302012-10-20 Paul Eggert <eggert@cs.ucla.edu>
4931
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.
4951
c664f463
CY
49522012-10-20 Chong Yidong <cyd@gnu.org>
4953
4954 * lread.c (Fload): Doc fix (Bug#12592).
4955
6ec83f92 49562012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
a0d7415f
KH
4957
4958 * font.c (Ffont_at): Fix previous change.
4959
d2824928
EZ
49602012-10-19 Eli Zaretskii <eliz@gnu.org>
4961
e483264c
SM
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
c052c554
EZ
4964 for the reasons.
4965
d2824928
EZ
4966 * alloc.c (NSTATICS): Decrease to 0x800.
4967
f60d391f
SM
49682012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
4969
4a0e1924 4970 * fns.c (Fnreverse): Include the problem element when signaling an
f60d391f
SM
4971 error (bug#12677).
4972
1a9327d5
JD
49732012-10-18 Jan Djärv <jan.h.d@swipnet.se>
4974
4975 * nsterm.m (ns_select): Check writefds before call to
4976 FD_ISSET (Bug#12668).
4977
14145a1e
DC
49782012-10-18 Daniel Colascione <dancol@dancol.org>
4979
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.
4983
1f76f6f5
MR
49842012-10-18 Martin Rudalics <rudalics@gmx.at>
4985
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.
4990
fcf14875
EZ
49912012-10-17 Eli Zaretskii <eliz@gnu.org>
4992
1f76f6f5
MR
4993 * makefile.w32-in ($(BLD)/w32.$(O)):
4994 ($(BLD)/vm-limit.$(O)):
4995 ($(BLD)/term.$(O)):
4996 ($(BLD)/unexw32.$(O)):
4997 ($(BLD)/fileio.$(O)):
a68089e4
EZ
4998 ($(BLD)/dispnew.$(O)): Update dependencies.
4999
5000 * w32term.h (w32_initialize_display_info, initialize_w32_display):
5001 Add prototypes.
5002
5003 * w32proc.c: Include ctype.h.
5004
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.
5010
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.
5014
5015 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
5016
5017 * unexw32.c: Include lisp.h and w32.h.
5018
5019 * term.c [WINDOWSNT]: Include w32term.h.
5020
5021 * process.c [WINDOWSNT]: Add prototype of sys_select.
5022
5023 * fileio.c [WINDOWSNT]: Include w32.h.
5024
5025 * dispnew.c [WINDOWSNT]: Include w32.h.
5026
fcf14875
EZ
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)
5030
5031 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
5032 to Lisp_Object. (Bug#12661)
5033
fe0b1ec4
KH
50342012-10-17 Kenichi Handa <handa@gnu.org>
5035
5036 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
5037 invalidate.
5038
d556ebf9
DA
50392012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
5040
5041 * buffer.c (Fkill_buffer): When unchaining the marker,
1f9f395d 5042 reset its buffer pointer to NULL (Bug#12652).
d556ebf9 5043
f0863a54
DA
50442012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
5045
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.
5049
12fbe755
DA
50502012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
5051
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):
5055 Convert to eassert.
5056
61655b89
DA
50572012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
5058
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.
5063
9520f2f2
DC
50642012-10-15 Daniel Colascione <dancol@dancol.org>
5065
5066 * dbusbind.c: Add comment explaining reason for previous change.
5067
dca778d5
MR
50682012-10-15 Martin Rudalics <rudalics@gmx.at>
5069
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.
5074
3e0341b0
DC
50752012-10-15 Daniel Colascione <dancol@dancol.org>
5076
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.
5080
33d4113c
DC
50812012-10-14 Daniel Colascione <dancol@dancol.org>
5082
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.
5086
a36fb15e
JD
50872012-10-14 Jan Djärv <jan.h.d@swipnet.se>
5088
5089 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
5090
537f336d
JD
50912012-10-13 Jan Djärv <jan.h.d@swipnet.se>
5092
5093 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
5094
0ba06a77
KH
50952012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
5096
5097 * coding.c (detect_coding): Set coding->id before calling
5098 this->detector.
5099
ce2fe65a
AS
51002012-10-13 Andreas Schwab <schwab@linux-m68k.org>
5101
5102 * fileio.c: Formatting fixes.
5103
d6453ce4
PE
51042012-10-13 Paul Eggert <eggert@cs.ucla.edu>
5105
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
5110 fstat) succeeds.
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.
5116
06485aa8
SM
51172012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
5118
5119 * doc.c (get_doc_string): Don't signal an error if the file is missing.
5120
167e3640
JD
51212012-10-12 Jan Djärv <jan.h.d@swipnet.se>
5122
5123 * nsterm.m (hold_event_q): New static variable.
5124 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
5125 ! q_event_ptr.
5126 (hold_event): New function.
5127 (ns_read_socket): If hold_event_q have events, store them and
5128 return (Bug#12384).
5129 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
5130 is zero (Bug#12384).
5131
c40239df
JB
51322012-10-12 Juanma Barranquero <lekktu@gmail.com>
5133
5134 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
5135
bb385a92
EZ
51362012-10-12 Eli Zaretskii <eliz@gnu.org>
5137
2a9f1099
EZ
5138 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
5139
bb385a92
EZ
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.
5144 (Bug#12587)
5145
8599b23a 5146 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
bb385a92
EZ
5147
5148 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
5149 determine whether a file exists and is not a directory.
5150
5151 * lisp.h (check_existing): Add prototype.
5152
2b9c2e68
JD
51532012-10-12 Jan Djärv <jan.h.d@swipnet.se>
5154
5155 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
5156
81749a23
GM
51572012-10-12 Glenn Morris <rgm@gnu.org>
5158
5159 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
5160
5253a5fd
SM
51612012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
5162
389a94a5
SM
5163 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
5164
5253a5fd
SM
5165 * eval.c (Fautoload): Remember previous autoload status in load-history.
5166
7cded46f
PE
51672012-10-11 Paul Eggert <eggert@cs.ucla.edu>
5168
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)
5180 (Ftry_completion):
5181 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
5182 (ns_menu_show):
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
5188 buffer termination.
5189
549c3414
DA
51902012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
5191
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.
5194
e85aafe7
PE
51952012-10-11 Paul Eggert <eggert@cs.ucla.edu>
5196
fd2f90cf
PE
5197 * marker.c (cached_modiff): EMACS_INT, not int.
5198
c1af190b
PE
5199 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
5200 instead of having a wrong decl.
e85aafe7
PE
5201 * nsmenu.m (waiting_for_input): Remove wrong decl.
5202
e738ca56
PE
52032012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5204
9fa1de30
PE
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
5249 a string length.
5250 * keymap.c (push_key_description): Omit last arg, which was always 1.
5251 All callers changed.
5252
e738ca56
PE
5253 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
5254
29f21cdf
JB
52552012-10-10 Juanma Barranquero <lekktu@gmail.com>
5256
5257 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
5258 ($(BLD)/term.$(O)): Update dependencies.
5259
6aea7528
DA
52602012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5261
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.
5265
5f3f57be
PE
52662012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5267
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.
5272
3e98c68e
DA
52732012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5274
5275 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
5276
77e344e5
PE
52772012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5278
5279 * commands.h (immediate_quit): Remove duplicate decl.
5280
5683d7cd
JD
52812012-10-09 Jan Djärv <jan.h.d@swipnet.se>
5282
5283 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
5284 caching.
5285 (nsfont_open): Remove setting of Vfonts_in_cache.
1f9f395d 5286 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5683d7cd 5287
cf5fc6db
EZ
52882012-10-09 Eli Zaretskii <eliz@gnu.org>
5289
b15736e6
EZ
5290 * w32fns.c (w32_last_error): Change the return value to DWORD, to
5291 match what GetLastError returns. Explain why the function is
5292 needed.
5293
cf5fc6db
EZ
5294 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
5295 'is_tooltip_frame', to avoid confusion with its global namesake.
5296
f99714ce
DC
52972012-10-08 Daniel Colascione <dancol@dancol.org>
5298
5299 * xdisp.c (start_hourglass): Call w32_note_current_window when
2b1f11ed
EZ
5300 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
5301 build that caused Emacs to display the hourglass cursor forever.
f99714ce 5302
fd59cb29
GM
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).
5307
62c480c9 53082012-10-08 Jan Djärv <jan.h.d@swipnet.se>
fd59cb29 5309
62c480c9
JD
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.
5314
607446ba
JB
53152012-10-08 Juanma Barranquero <lekktu@gmail.com>
5316
fd5125ad
JB
5317 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
5318 in nt/config.nt.
46979e0b
JB
5319 (FONT_H): Define after FRAME_H.
5320 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
5321 Update dependencies.
fd5125ad 5322
607446ba
JB
5323 * w32term.c: Remove leftover declaration of keyboard_codepage.
5324
b6f4e300
EZ
53252012-10-08 Eli Zaretskii <eliz@gnu.org>
5326
c54ebba4
EZ
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.
fd59cb29
GM
5331 ($(BLD)/unexw32.$(O)):
5332 ($(BLD)/w32.$(O)):
5333 ($(BLD)/w32console.$(O)):
5334 ($(BLD)/w32fns.$(O)):
5335 ($(BLD)/w32heap.$(O)):
5336 ($(BLD)/w32menu.$(O)):
15c720a3 5337 ($(BLD)/w32proc.$(O)): Add w32common.h.
c54ebba4 5338
b6f4e300
EZ
5339 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
5340 'const char *'.
5341 (x_to_w32_color): Don't modify the argument, modify a copy instead.
5342
501199a3
DC
53432012-10-08 Daniel Colascione <dancol@dancol.org>
5344
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
5348 match.
5349
5350 * w32select.h (HAVE_W32SELECT): Remove.
5351
5352 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
1f9f395d 5353 w32common.h instead of w32heap.h.
501199a3
DC
5354
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
5360 w32common.
5361
5362 * w32heap.c: Include w32common.h.
5363 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
8599b23a
SM
5364 (w32_minor_version, w32_build_number, w32_subtype):
5365 Remove duplicate definitions.
501199a3
DC
5366
5367 * w32fns.c: Include w32common.h; include w32heap.h only in
5368 WINDOWSNT.
5369
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
5374 kernel.
5375
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.
5382
5383 * unexw32.c, unexcw.c: Include w32common.h.
5384
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.
5388
5389 * cygw32.h: Remove obsolete EXFUN declarations.
5390
5391 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
5392
5393 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
5394 of w32inevt.o from SOME_MACHINE_OBJECTS.
5395
93aa5c81
DC
53962012-10-08 Daniel Colascione <dancol@dancol.org>
5397
5398 * image.c: Permanent fix for JPEG compilation issue --- limit
5399 jpeglib `boolean' redefinition to Cygwin builds.
5400
d424f3d8
EZ
54012012-10-08 Eli Zaretskii <eliz@gnu.org>
5402
8ee4c6ce
EZ
5403 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
5404
d424f3d8
EZ
5405 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
5406 Cygwin.
5407
e08348a0
DC
54082012-10-08 Daniel Colascione <dancol@dancol.org>
5409
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.
5419
5420 * Makefile.in: consolidate image variables into LIBIMAGE; add
8e2417bf 5421 W32_OBJ and W32_LIBS. Compile new files.
e08348a0
DC
5422
5423 * conf_post.h:
5424 (_DebPrint) declare tracing facility for W32 debugging. We need
5425 to unify tracing later.
5426
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.
5430
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.
5435
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
5439 objects.
5440
5441 (w32_strerror): Just what it says on the tin.
5442
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.
5447
5448 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
5449 needs fork-then-exec for daemon launching.
5450
5451 * font.h: Include frame.h.
5452
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.
5456
5457 * keyboard.c: Clarify a comment regarding the input loop.
5458
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.
5465
5466 * unexw32.c (hinst): Declare extern.
5467
5468 * w32.c: Change header order;
5469 (w32_strerror): Move to w32fns.c because we need it for
5470 non-WINDOWSNT builds.
5471
5472 * w32.h: Add #error macro to make sure we don't include w32.h for
5473 Cygwin builds. Remove w32select declarations.
5474
5475 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
1f9f395d 5476 w32fns.c. w32console.c is WINDOWSNT-only.
e08348a0
DC
5477
5478 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
5479 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
5480 POSIXy alternative.
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.
5503
5504 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
5505
5506 * w32heap.c (syspage_mask): Declare here.
5507 (cache_system_info): Remove.
5508
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.
5512
5513 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
5514
5515 * w32proc.c (_DebPrint): Move to w32fns.c.
5516 * w32select.c: Include string.h, stdio.h for Cygwin.
5517 * w32select.h: New File.
5518
5519 * w32term.c: Include io.h for non-CYGWIN builds; needed for
5520 get_osfhandle.
5521 (w32_message_fd): New variable. Under Cygwin, holds the file
5522 descriptor the system used to tell us about pending thread
5523 messages.
5524
5525 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
5526 that prevented compilation under non-WINDOWSNT systems.
5527
5528 (w32_initialize): Open /dev/windows and assign it to
5529 w32_message_fd. Provide w32 feature.
5530
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.
5534
5535 * w32xfns.c:
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
5541 code did.
5542
5543 (post, prepend_msg): Actually call notify_msg_ready instead of
5544 setting the input event directly.
5545
98daa893
EZ
55462012-10-07 Eli Zaretskii <eliz@gnu.org>
5547
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)
5551
3bc0a2f7
JD
55522012-10-07 Jan Djärv <jan.h.d@swipnet.se>
5553
8ad5b73b 5554 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
493b5b1c 5555
335f5ae4
JD
5556 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
5557 MAC_OS_X_VERSION_10_6.
8ad5b73b
JD
5558 (syms_of_nsterm): Remove comment about Panther and above for
5559 ns-antialias-text.
335f5ae4
JD
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.
5563
5564 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
5565 MAC_OS_X_VERSION_10_4.
5566
8ad5b73b
JD
5567 * nsmenu.m (fillWithWidgetValue:): Remove code for <
5568 MAC_OS_X_VERSION_10_2.
335f5ae4
JD
5569
5570 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
5571
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.
5574
3bc0a2f7
JD
5575 * nsterm.m (ns_in_resize): Remove (Bug#12479).
5576 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
8599b23a
SM
5577 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
5578 Remove ns_in_resize check.
3bc0a2f7
JD
5579 (ns_clear_frame_area): Remove resize handle code.
5580
5581 * nsfns.m (ns_in_resize): Remove.
e483264c
SM
5582 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
5583 Remove ns_in_resize check.
3bc0a2f7 5584
c622b48f
PE
55852012-10-07 Paul Eggert <eggert@cs.ucla.edu>
5586
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.
5594
04fafa46
JD
55952012-10-06 Jan Djärv <jan.h.d@swipnet.se>
5596
5597 * nsfns.m (Fx_create_frame): Call x_default_parameter with
5598 fullscreen/Fullscreen.
5599
5600 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
5601 tobar_height is new.
5602
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.
1f9f395d 5611 (toggleFullScreen:): Remove comment. Rearrange calls.
04fafa46
JD
5612 Set toolbar values to zero, save old height in tobar_height.
5613 Restore tool bar height when leaving fullscreen.
5614 (canBecomeMainWindow): New function.
5615
c6e21c03
PE
56162012-10-06 Paul Eggert <eggert@cs.ucla.edu>
5617
5618 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
5619
0d9f584b
EZ
56202012-10-05 Eli Zaretskii <eliz@gnu.org>
5621
a65fbb5f
EZ
5622 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
5623
0d9f584b 5624 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
8599b23a
SM
5625 that time stamps of directories could also be changed.
5626 Don't request the too broad GENERIC_WRITE, only the more restrictive
0d9f584b
EZ
5627 FILE_WRITE_ATTRIBUTES access rights.
5628
5629 * fileio.c (Fset_file_times): Special-case ignoring errors for
5630 directories only on MSDOS, not on MS-Windows.
5631
e8757f09 56322012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
ca347e3d
IK
5633
5634 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
5635
7604f298
EZ
56362012-10-04 Eli Zaretskii <eliz@gnu.org>
5637
5638 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
5639 see whether CreateFile failed.
5640
88d69b7d
PE
56412012-10-04 Paul Eggert <eggert@cs.ucla.edu>
5642
5643 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
5644 to avoid similar races.
5645 * keyboard.c (pending_signals): Now bool, not int.
5646
7509f454
PE
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
5650 and/or setitimer.
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.
5657
a3c5c0c5
PE
56582012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5659
5660 * profiler.c (handle_profiler_signal): Fix a malloc race
5661 that caused Emacs to hang on Fedora 17 when profiling Lisp.
5662
914e743b
JD
56632012-10-02 Jan Djärv <jan.h.d@swipnet.se>
5664
5665 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
5666
d8ab37a8
EZ
56672012-10-02 Eli Zaretskii <eliz@gnu.org>
5668
5669 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
5670 consistent with the change in return value of 'safe_strsignal'.
5671
b3ecad33
PE
56722012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5673
0a99eee1
PE
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'.
5685
b3ecad33
PE
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.
5694
090cf9db
SM
56952012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
5696
5697 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
5698
5699 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
5700 case for the special 0 coding-system.
5701
5702 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
5703 (Fmake_overlay): Remove redundant tests.
64edc777 5704 (fix_start_end_in_overlays): Remove redundant recentering.
090cf9db 5705
81550bf4
JB
57062012-10-02 Juanma Barranquero <lekktu@gmail.com>
5707
5708 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
5709 Update dependencies.
5710
aa1ba90e
PE
57112012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5712
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
5718 strsignal.
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.
5729
ace917bd
EZ
57302012-10-01 Eli Zaretskii <eliz@gnu.org>
5731
5732 * w32proc.c (timer_loop): Fix code that waits for timer
5733 expiration, to avoid high CPU usage.
5734
9eb71b9c
SM
57352012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
5736
5737 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
5738 (sweep_weak_table): Remove redundant prototypes.
5739
b3317662
FP
57402012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
5741
5742 * emacs.c: Move the inclusion of TERM_HEADER after including
5743 windows.h on WINDOWSNT. This avoids compilation problems with
5744 MSVC.
5745
f0e5f225
EZ
57462012-10-01 Eli Zaretskii <eliz@gnu.org>
5747
2d7d1608
EZ
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 *'.
5752
5753 * ralloc.c (ROUNDUP): Fix last change.
5754 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
5755 'size_t'.
5756
f0e5f225
EZ
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.
4cdfbb89
EZ
5764 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
5765 return results.
5766 [!HAVE_SETITIMER]: Behave as the previous version that didn't
5767 support timers.
f0e5f225
EZ
5768
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.
5772
82ef37c1
PE
57732012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5774
b3a4c387
PE
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>.
5778
b0ab8123
PE
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)
5812 (char_encodable_p):
5813 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
5814 (assign_row, set_frame_matrix_frame, make_current)
5815 (add_row_entry):
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'.
5862
05584c31
PE
5863 * bidi.c: Tune.
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.
5866
86ec63ba
PE
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):
5871 Undo last change.
5872
82ef37c1
PE
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.
5877
62aba0d4
FP
58782012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
5879
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.
5e4daaf3 5884 (x_get_focus_frame): Add prototype.
62aba0d4
FP
5885
5886 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
5887 defining an XRectangle structure.
5888
5889 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
5890 arithmetics for compatibility with x64.
5891
5892 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
5893 compatibility with x64.
5894
5895 * w32heap.h: Adjust prototypes and declarations.
5896
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.
5902
5903 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
5904 less than 0x0500.
5905 (w32_msg_pump): Use WPARAM type for 'result'.
5906
5907 * w32.c (init_environment, get_emacs_configuration): Support AMD64
5908 architecture.
5909 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
5910 compatibility with x64.
5911
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.
5916
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.
5924
5925 * sysdep.c (STDERR_FILENO): Define if not already defined.
5926
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.
5932
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.
5936
5937 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
5938 (min): Define only if not already defined.
5939
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
5942 hosts.
5943
5944 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
5945 'bitmaps' is a pointer.
5946
5947 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
5948
5949 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
5950
e7a2937b
PE
59512012-09-30 Paul Eggert <eggert@cs.ucla.edu>
5952
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.
5956
b43d62ae
SM
59572012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
5958
5959 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
5960
c06c382a
EZ
59612012-09-30 Eli Zaretskii <eliz@gnu.org>
5962
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)
b43d62ae 5967 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
c06c382a
EZ
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.
5977
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.
5981
5982 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
5983 Windows-specific code to display the hourglass mouse pointer is no
5984 longer used.
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.
b43d62ae
SM
5989 (w32_note_current_window, show_hourglass, hide_hourglass):
5990 New functions, in support of hourglass cursor display similar to other
c06c382a
EZ
5991 window systems.
5992 (syms_of_w32fns): Don't initialize hourglass_timer.
5993
5994 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
5995 WINDOWSNT as well.
5996 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
5997
5998 * w32.h (init_timers, term_timers): Add prototypes.
5999
95402d5f
KH
60002012-09-30 Kenichi Handa <handa@gnu.org>
6001
6002 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
6003 to the buffer relocation which may be caused by ccl_driver.
6004
dd946752
JD
60052012-09-30 Jan Djärv <jan.h.d@swipnet.se>
6006
d7e642cc
JD
6007 * xfns.c (Fx_file_dialog): Update comment.
6008
6009 * w32fns.c (Fx_file_dialog): Update comment.
6010
6011 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
6012 Initialize panel name field if OSX >= 10.6.
6013
6014 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
6015
dd946752
JD
6016 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
6017
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
6032 tbar_height.
6033 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1f9f395d 6034 fullscreen. Set maximized_width/height. Act on next_maximized.
dd946752
JD
6035
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.
6040
427730eb
JB
60412012-09-30 Juanma Barranquero <lekktu@gmail.com>
6042
6043 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6044
48de8b12
CY
60452012-09-30 Chong Yidong <cyd@gnu.org>
6046
6047 * fns.c (Frandom): Doc fix.
6048
5938d519
MR
60492012-09-30 Martin Rudalics <rudalics@gmx.at>
6050
6051 * window.c (Vwindow_combination_limit): New default value.
6052 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
6053
cb5b0266
PE
60542012-09-30 Paul Eggert <eggert@cs.ucla.edu>
6055
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>.
6059
84f72efd
EZ
60602012-09-30 Eli Zaretskii <eliz@gnu.org>
6061
6062 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
6063 HAVE_TIMER_SETTIME is defined.
6064
9d4dcdc9
PE
60652012-09-30 Paul Eggert <eggert@cs.ucla.edu>
6066
d89460ed
PE
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]:
6074 New static vars.
84f72efd 6075 (enum profiler_cpu_running): New enum.
d89460ed
PE
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.
6100
9d4dcdc9
PE
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>.
6104
8e5691a0
JB
61052012-09-29 Juanma Barranquero <lekktu@gmail.com>
6106
6107 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6108
e7c1b6ef
SM
61092012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
6110
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.
6117
e61d39cd 61182012-09-28 Glenn Morris <rgm@gnu.org>
d393cefb
GM
6119
6120 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
6121 (Frun_hook_with_args_until_failure): Doc fixes.
6122
404043ea
EZ
61232012-09-28 Eli Zaretskii <eliz@gnu.org>
6124
6125 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
6126 Qautomatic_redisplay and change the symbol name. All users changed.
6127
704d3f45
TM
61282012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
6129
6130 * profiler.c (sigprof_handler): Fix race condition.
6131
757140ff
GM
61322012-09-28 Glenn Morris <rgm@gnu.org>
6133
6134 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
6135
a615a3ae
PE
61362012-09-27 Paul Eggert <eggert@cs.ucla.edu>
6137
6138 Check more robustly for timer_settime.
89d17fd0
PE
6139 * Makefile.in (LIB_TIMER_TIME): New macro.
6140 (LIBES): Add it.
a615a3ae
PE
6141 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
6142 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
6143 call timer_settime.
6144
3670daf7
TM
61452012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
6146
6147 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
6148
6a586b7f
JB
61492012-09-26 Juanma Barranquero <lekktu@gmail.com>
6150
6151 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
6152
41c8bfcf
PE
61532012-09-26 Paul Eggert <eggert@cs.ucla.edu>
6154
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.
6160
3a880af4 61612012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
908589fd
AS
6162 Stefan Monnier <monnier@iro.umontreal.ca>
6163 Juanma Barranquero <lekktu@gmail.com>
611b7507 6164
3a880af4
SM
6165 * profiler.c: New file.
6166 * Makefile.in (base_obj): Add profiler.o.
611b7507
JB
6167 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
6168 ($(BLD)/profiler.$(O)): New target.
3a880af4
SM
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
6178 race condition.
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.
611b7507 6186
5938d519 61872012-09-25 Eli Zaretskii <eliz@gnu.org>
b67238c2
JB
61882012-09-25 Juanma Barranquero <lekktu@gmail.com>
6189
6190 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
6191
e26fd2e4
PE
61922012-09-25 Paul Eggert <eggert@cs.ucla.edu>
6193
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.
9180598c 6198 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
e26fd2e4 6199
eedec3ee
EZ
62002012-09-25 Eli Zaretskii <eliz@gnu.org>
6201
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.
6206
aa15c6bb
JB
62072012-09-25 Juanma Barranquero <lekktu@gmail.com>
6208
6209 Move Vlibrary_cache to emacs.c and reset before dumping.
6210
6211 * lisp.h (reset_image_types): Declare.
6212 [WINDOWSNT] (Vlibrary_cache): Declare.
6213
6214 * image.c (reset_image_types): New function.
6215
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.
6219
6220 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
6221 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
6222
6223 * w32.h (Vlibrary_cache): Do not declare.
6224
54d629be
EZ
62252012-09-25 Eli Zaretskii <eliz@gnu.org>
6226
16b22fef
EZ
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
6232 code.
6233 (sys_kill): Improve commentary.
6234
6235 * w32.c (term_ntproc): Accept (and ignore) one argument, for
6236 consistency with a signature of a signal handler. All callers
6237 changed.
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.
6241
6242 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
6243
6244 * w32select.c (term_w32select): Protect against repeated
6245 invocation by setting clipboard_owner to NULL after calling
6246 DestroyWindow.
6247
6248 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
6249 and term_ntproc to their modified signatures.
6250
54d629be
EZ
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
6254 for the details.
6255
59f7af81
CY
62562012-09-25 Chong Yidong <cyd@gnu.org>
6257
6258 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
6259
22e8cf4a
SM
62602012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
6261
6262 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
6263 when encountering an unknown bytecode.
6264
578098f3
PE
62652012-09-24 Paul Eggert <eggert@cs.ucla.edu>
6266
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)
6290 (gs_load):
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.
6302
a5f2b6ec
CY
63032012-09-24 Chong Yidong <cyd@gnu.org>
6304
6305 * chartab.c (Fset_char_table_default): Obsolete function removed.
6306
18e27ea8
PE
63072012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6308
afea8a8a
PE
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.
6316
18e27ea8
PE
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):
6340 Return void, not 1.
6341
af0e9f75
JB
63422012-09-23 Juanma Barranquero <lekktu@gmail.com>
6343
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.
6360
5101529e
EZ
63612012-09-23 Eli Zaretskii <eliz@gnu.org>
6362
6363 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
6364 fatal_error_backtrace.
6365
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.
6369
2c3ee0ad
JB
63702012-09-23 Juanma Barranquero <lekktu@gmail.com>
6371
6372 * w32term.c (w32_read_socket): Remove leftover reference to
6373 interrupt_input_pending.
6374
62a1d661
PE
63752012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6376
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>.
6380 * alloc.c (die):
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.
6385
a0942b9a
JD
63862012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6387
6388 * xterm.c (x_term_init): Call fixup_locale before and after calling
6389 gtk_init (Bug#12392).
6390
d07ff9db
CY
63912012-09-23 Chong Yidong <cyd@gnu.org>
6392
6393 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
6394 Vdynamic_library_alist.
6395
6396 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
6397 (Fgnutls_available_p): Caller changed.
6398
6399 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
6400 (Flibxml_parse_xml_region): Likewise.
6401
6402 * dispextern.h (struct image_type): Remove arg from init function.
6403
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.
641cfd14 6410 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 6411
4d7e6e51
PE
64122012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6413
6414 Simplify and avoid signal-handling races (Bug#12471).
6415 * alloc.c (die):
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)
6424 (input_blocked_p):
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)
6442 (UNBLOCK_INPUT_TO):
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
6479 handle_async_input.
6480 (quit_count): Now volatile, since a signal handler uses it.
3a880af4
SM
6481 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
6482 All callers changed. Block SIGINT only if not already blocked.
4d7e6e51
PE
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
6497 around the vfork.
6498 (send_process_frame, process_sent_to, handle_pipe_signal)
6499 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
6500 ignores SIGPIPE.
6501 (send_process): No need for setjmp/longjmp any more, since the
6502 SIGPIPE stuff is now gone. Instead, report an error if errno
6503 is EPIPE.
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
6508 different way.
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.
6518 All uses changed.
6519 (BACKTRACE_LIMIT_MAX): Now at top level.
6520 (thread_backtrace_buffer, threadback_backtrace_pointers):
6521 New static vars.
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
6533 on IEEE hosts.
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.
6545
8f4635e9
JD
65462012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6547
6548 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
fb39b937 6549 background rect may be larger (Bug#12245).
8f4635e9 6550
3296976d
CY
65512012-09-23 Chong Yidong <cyd@gnu.org>
6552
6553 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
6554
d41e491e
PE
65552012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6556
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.
6561
c88b867f
CY
65622012-09-22 Chong Yidong <cyd@gnu.org>
6563
6564 * search.c (Freplace_match): Doc fix (Bug#12325).
6565
6566 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
6567
6568 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
6569 (Fline_end_position): Doc fix.
6570
6571 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
6572
bb4d86b4
CY
65732012-09-22 Chong Yidong <cyd@gnu.org>
6574
6575 * dispextern.h (struct image_type): Add new slot, storing a type
6576 initialization function.
6577
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)
3a880af4
SM
6582 (gif_type, imagemagick_type, svg_type, gs_type):
6583 Add initialization functions.
bb4d86b4
CY
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.
6590
df9685f3
EZ
65912012-09-22 Eli Zaretskii <eliz@gnu.org>
6592
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.
6598 (Bug#12447)
6599
8e17c9ba
MR
66002012-09-22 Martin Rudalics <rudalics@gmx.at>
6601
6602 * window.c (Fsplit_window_internal): Handle only Qt value of
6603 Vwindow_combination_limit separately.
6604 (Qtemp_buffer_resize): New symbol.
3a880af4
SM
6605 (Vwindow_combination_limit): New default value.
6606 Rewrite doc-string.
8e17c9ba 6607
589bd69b
EZ
66082012-09-22 Eli Zaretskii <eliz@gnu.org>
6609
6610 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
6611 the new overlay string. (Bug#10159)
6612
01108e3f
PE
66132012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6614
6615 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
6616 or that fprintf is async-signal-safe. POSIX doesn't require
6617 either assumption.
6618
82f8cd94
CY
66192012-09-22 Chong Yidong <cyd@gnu.org>
6620
6621 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
6622 (Bug#8207).
6623
3cccbd87
KH
66242012-09-22 Kenichi Handa <handa@gnu.org>
6625
6626 * composite.c (composition_reseat_it): Handle the case that a
6627 grapheme cluster is not covered by a single font (Bug#12352).
6628
09c01941
CY
66292012-09-21 Chong Yidong <cyd@gnu.org>
6630
6631 * image.c (define_image_type): Avoid adding duplicate types to
6632 image_types (Bug#12463). Suggested by Jörg Walter.
6633
acfa068f 66342012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
6635
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.
6639
acfa068f 66402012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
6641
6642 * eval.c (Frun_hook_with_args_until_success)
6643 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
6644
acfa068f 66452012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
6646
6647 * fileio.c (Ffile_selinux_context): Only call freecon when
6648 lgetfilecon succeeded.
6649 (Fset_file_selinux_context): Likewise. (Bug#12444)
6650
acfa068f 66512012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
6652
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)
f2016bea
EZ
6658 (compute_stop_pos_backwards): Fix a typo that caused crashes while
6659 scrolling through multibyte text.
aa36e4d2 6660
e99f70c8
SM
66612012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
6662
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.
6669
f75beb47
PE
66702012-09-20 Paul Eggert <eggert@cs.ucla.edu>
6671
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.
6682
b019b76a
JB
66832012-09-20 Juanma Barranquero <lekktu@gmail.com>
6684
6685 * w32gui.h (XParseGeometry): Do not declare.
6686
05642592
PE
66872012-09-19 Paul Eggert <eggert@cs.ucla.edu>
6688
e4bce92a 6689 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1f9f395d 6690 Ignore 'expected'. See Eli Zaretskii in
e4bce92a
PE
6691 <http://bugs.gnu.org/12471#8> (last line).
6692
05642592
PE
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.
6696
e543ae91
JD
66972012-09-19 Jan Djärv <jan.h.d@swipnet.se>
6698
6699 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
6700
6701 * nsfns.m (XParseGeometry): Remove.
6702 (Fx_create_frame): Call x_set_offset to correctly interpret
6703 top_pos in geometry.
6704
3a880af4 6705 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
e543ae91
JD
6706 (Fx_parse_geometry): If there is a space in string, call
6707 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
6708
45ba16c7
EZ
67092012-09-17 Eli Zaretskii <eliz@gnu.org>
6710
c8b9f1bc
EZ
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)
6714
b4c932a2
EZ
6715 * w32term.c (w32_read_socket): Set pending_signals to 1, like
6716 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
6717
45ba16c7
EZ
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.
6721
eeceac93
PE
67222012-09-17 Paul Eggert <eggert@cs.ucla.edu>
6723
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.
6733
78f83752
GM
67342012-09-17 Glenn Morris <rgm@gnu.org>
6735
6736 * emacs.c: Use COPYRIGHT.
6737
634b8cac
PE
67382012-09-16 Paul Eggert <eggert@cs.ucla.edu>
6739
0caaedb1
PE
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]:
1f9f395d 6757 Remove. All uses removed.
0caaedb1
PE
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
6761 is defined.
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]:
6770 (emacs_write):
6771 * xterm.c (XTread_socket):
6772 Assume SYNC_INPUT.
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):
6778 Remove decls.
6779 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6780 Now static.
6781
634b8cac
PE
6782 * font.c (Ffont_shape_gstring): Remove unused local.
6783
83da1b55
GM
67842012-09-16 Glenn Morris <rgm@gnu.org>
6785
518650a5
GM
6786 * Makefile.in (clean): No longer run nextstep's clean.
6787
83da1b55
GM
6788 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
6789 (ns_frag): Remove.
6790 (ns-app): Move here from ns.mk, and simplify.
6791 (clean): Simplify nextstep entry.
6792 * ns.mk: Remove file.
6793
85a43e2e
KH
67942012-09-17 Kenichi Handa <handa@gnu.org>
6795
6796 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
6797 not covert the last few charactes.
6798
ba13e616 67992012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
6800
6801 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
6802 here, but just check the validity of glyphs in the glyph-string.
6803
a8c729af
MR
68042012-09-16 Martin Rudalics <rudalics@gmx.at>
6805
3a880af4
SM
6806 * window.c (Fwindow_parameter, Fset_window_parameter):
6807 Accept any window as argument (Bug#12452).
a8c729af 6808
c077c059
JD
68092012-09-16 Jan Djärv <jan.h.d@swipnet.se>
6810
6811 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
6812 to ns_term_init to avoid memory leak.
6813
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
6817 ns_*_types.
6818
39a57ad0
PE
68192012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6820
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.
6825
7105c8cb
EZ
68262012-09-15 Eli Zaretskii <eliz@gnu.org>
6827
6828 * w32xfns.c:
6829 * w32uniscribe.c:
6830 * w32term.c:
6831 * w32select.c:
6832 * w32reg.c:
6833 * w32proc.c:
6834 * w32menu.c:
6835 * w32inevt.c:
6836 * w32heap.c:
6837 * w32font.c:
6838 * w32fns.c:
6839 * w32console.c:
6840 * w32.c:
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)
6844
6845 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
6846 more accurate.
6847
6848 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
6849 not defined as a macro. The latter happens on MS-Windows.
6850 (Bug#12446)
6851
0328b6de
PE
68522012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6853
6854 Port better to POSIX hosts lacking _setjmp (Bug#12446).
6855 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 6856 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
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.
6873
2af03429
PE
68742012-09-14 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
6877 Include "syssignal.h", for 'main_thread'.
6878
2f294edf
DA
68792012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
6880
6881 Avoid out-of-range marker position (Bug#12426).
3a880af4
SM
6882 * insdel.c (replace_range, replace_range_2):
6883 Adjust markers before overlays, as suggested by comments.
2f294edf
DA
6884 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
6885 Remove redundant check before calling offset_intervals.
6886
6b533e9c
MR
68872012-09-14 Martin Rudalics <rudalics@gmx.at>
6888
6889 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
6890 current buffer (Bug#12387).
6891
2a7931e3
JB
68922012-09-14 Juanma Barranquero <lekktu@gmail.com>
6893
6894 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
6895
c18e885b
PE
68962012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6897
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.
6902
d59a1afb
DA
69032012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
6904
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.
6911
5f0cb45a
PE
69122012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6913
8ea47e3a
PE
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>.
6918
4a4bbad2
PE
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>,
6936 for FIONREAD.
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
6953 a run-time error.
6954
5f0cb45a
PE
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.
6961
40bce90b
PE
69622012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6963
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.
6977
bfeae2cf
SM
69782012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6979
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.
6983
8099e36b
EZ
69842012-09-12 Eli Zaretskii <eliz@gnu.org>
6985
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)
6989
92547ff9
PE
69902012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
6993
45b82ad0
SM
69942012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6995
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.
7003
5779a1dc
PE
70042012-09-11 Paul Eggert <eggert@cs.ucla.edu>
7005
50f2e553
PE
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.
7015
ae1d87e2
PE
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.
7024
5779a1dc
PE
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.
7029
c4c9756b
JD
70302012-09-11 Jan Djärv <jan.h.d@swipnet.se>
7031
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.
7036
7037 * nsterm.h: Add delay parameter to updateFrameSize.
7038
d73e321c
DA
70392012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
7040
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
1f9f395d 7047 or deleted frame, restore its global binding.
d73e321c
DA
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.
7052
e578f381
DA
70532012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
7054
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.
7059
3057e615
YM
70602012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7061
7062 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
7063 composition cases (Bug#12364).
7064
7065 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
7066 overhang of succeeding glyphs overlapping box cursor.
7067
7068 * w32term.c (x_draw_glyph_string): Likewise.
7069
6fda35f2
PE
70702012-09-11 Paul Eggert <eggert@cs.ucla.edu>
7071
c990426a
PE
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):
7076 Now static.
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
7087 for that case.
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.
7092
6fda35f2
PE
7093 * xdisp.c (Qinhibit_debug_on_message): Now static.
7094
16130a58
JD
70952012-09-10 Jan Djärv <jan.h.d@swipnet.se>
7096
7097 * nsterm.m (ns_update_begin): Set clip path to whole view by using
7098 NSBezierPath (Bug#12131).
7099
d105a573
CY
71002012-09-10 Chong Yidong <cyd@gnu.org>
7101
7102 * fns.c (Fdelq, Fdelete): Doc fix.
7103
ff55dfe8
PE
71042012-09-10 Paul Eggert <eggert@cs.ucla.edu>
7105
7106 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
7107 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
7108
e7032e7c
SM
71092012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
7110
7111 * lisp.h (make_lisp_ptr): New macro to replace XSET.
7112 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
7113 Use it.
7114
e9957956
EZ
71152012-09-09 Eli Zaretskii <eliz@gnu.org>
7116
aba05ce9
EZ
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.
7120
e9957956
EZ
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)
7124
f6196b87
PE
71252012-09-09 Paul Eggert <eggert@cs.ucla.edu>
7126
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.
7137 * data.c (fmod):
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
7147 the wrapped code.
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.
7156
9d7f1863
JD
71572012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7158
7159 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
7160 compositeToPoint for OSX < 10.6 (Bug#12390).
7161
eabf0404
PE
71622012-09-08 Paul Eggert <eggert@cs.ucla.edu>
7163
7164 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
7165 This produces more-accurate results.
7166
0b3b1d23
JD
71672012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7168
7169 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
7170 changes (Bug#12088).
7171
6dcef6ec
CY
71722012-09-08 Chong Yidong <cyd@gnu.org>
7173
7174 * syntax.c (Fstring_to_syntax): Doc fix.
7175
aa7d57c5
JD
71762012-09-08 Jan Djärv <jan.h.d@swipnet.se>
7177
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.
3a880af4
SM
7182 (ns_after_update_window_line, ns_draw_fringe_bitmap):
7183 Remove fringe/internal border adjustment (Bug#11052).
aa7d57c5
JD
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
7190 adjustment.
7191 (ns_dumpglyphs_image): Ditto.
fc0c31f8 7192 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
7193 border adjustment.
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.
7200
7201 * nsterm.h (EmacsView): Add updateFrameSize.
7202
1a5432bc
CY
72032012-09-07 Chong Yidong <cyd@gnu.org>
7204
b4f5313e
CY
7205 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
7206
1a5432bc
CY
7207 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
7208
1a4f1e9b
PE
72092012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7210
7211 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
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>.
1a4f1e9b
PE
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".
7228
bc8000ff
EZ
72292012-09-07 Eli Zaretskii <eliz@gnu.org>
7230
3e6d6928
EZ
7231 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
7232
7233 * w32.c (sigemptyset): Empty the set.
7234 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
7235
bc8000ff
EZ
7236 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
7237
b4fa72f2
DA
72382012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
7239
7240 * alloc.c (mark_buffer): Revert unsafe marking optimization.
7241 (mark_object): Likewise for frame objects.
7242
30730c93
PE
72432012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7244
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.
7248
2fe28299
PE
72492012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7250
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.
7269 All uses replaced.
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,
fc0c31f8 7273 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
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.
7302
0216c128
EZ
73032012-09-06 Eli Zaretskii <eliz@gnu.org>
7304
7305 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
7306 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
7307
c752cfa9
DA
73082012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7309
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
7317 not here.
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.
7322
a864ef14
PE
73232012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7324
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.
7345 All users removed.
7346 * fontset.c, xftfont.c: Omit unnecessary static decls.
7347
0699fc18
DA
73482012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7349
7350 * alloc.c (mark_object): Revert window marking code
7351 since it's unsafe for the Fset_window_configuration.
7352
20ef56db
PE
73532012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7354
2fe28299 7355 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
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]:
7385 Move to sysdep.c.
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
7392 contents.
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,
3a880af4
SM
7400 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
7401 This lets callers save and restore errno properly.
20ef56db 7402
e3ccf108
DA
74032012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7404
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.
7412
697e1e39
DA
74132012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7414
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.
7418
c1ca42ca
DA
74192012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7420
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.
7424
014d93be
PE
74252012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7426
f75d7a91
PE
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)
7435 (Fdo_auto_save):
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.
7451
014d93be
PE
7452 * xdisp.c (set_message): Simplify and reindent last change.
7453
776f29e1
JB
74542012-09-05 Juanma Barranquero <lekktu@gmail.com>
7455
7456 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
7457
7f7e0167
LI
74582012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
7459
7460 * eval.c (call_debugger): Make the function non-static so that we
7461 can call it from set_message.
7462
7463 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
7464 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
7465
cf29dd84
PE
74662012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7467
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
7476 a backtrace.
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.
7484
972debf2
SM
74852012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
7486
7487 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
7488 eager (load-time) macro-expansion.
7489 * lisp.mk (lisp): Add macroexp.
7490
1088b922
PE
74912012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7492
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.
7510
30934d33
EZ
75112012-09-04 Eli Zaretskii <eliz@gnu.org>
7512
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)
7518
af26b72c
PE
75192012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7520
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.
7532
26d4541d
PE
75332012-09-03 Paul Eggert <eggert@cs.ucla.edu>
7534
d42f4f0f 7535 Fix minor problem found by static checking.
26d4541d 7536 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 7537
c5e28e39
MR
75382012-09-03 Martin Rudalics <rudalics@gmx.at>
7539
7540 * buffer.c (Fdelete_all_overlays): New function.
7541
3eab3ca9
CY
75422012-09-03 Chong Yidong <cyd@gnu.org>
7543
7544 * gtkutil.c: Add extern decl for Qxft.
7545
c04889f8
PE
75462012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7547
1882aa38
PE
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
7570 of incrementing it.
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.
7574
a411ac43
PE
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):
7581 * font.h (Qxft):
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]:
7587 * doc.c (Qclosure):
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):
7603 Now static.
7604 * xfaces.c: Remove unnecessary static decls.
7605 * xterm.c (updating_frame): Remove decl of nonexistent object.
7606
c04889f8
PE
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.
7610
8b339673
JD
76112012-09-02 Jan Djärv <jan.h.d@swipnet.se>
7612
7613 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
7614
7615 * frame.h: Add missing prototype for x_wm_set_size_hint.
7616
a08d4ba7
PE
76172012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7618
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.
7645
48c948de
CY
76462012-09-02 Chong Yidong <cyd@gnu.org>
7647
7648 * keymap.c (push_key_description): Print M-TAB as C-M-i
7649 (Bug#11758).
7650
6c49a40b
JB
76512012-09-02 Juanma Barranquero <lekktu@gmail.com>
7652
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.
7660
4dfbd238
EZ
76612012-09-01 Eli Zaretskii <eliz@gnu.org>
7662
7e510e28
EZ
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)
7666
4dfbd238
EZ
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.
7670
86571ae0
DC
76712012-09-01 Daniel Colascione <dancol@dancol.org>
7672
7673 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
7674 system used too early.
7675
0e23ef9d
PE
76762012-09-01 Paul Eggert <eggert@cs.ucla.edu>
7677
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.
7684
17a2cbbd
DC
76852012-09-01 Daniel Colascione <dancol@dancol.org>
7686
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.
7694
7695 * xfaces.c: Include TERM_HEADER instead of listing all possible
7696 window-system headers.
7697
7698 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
7699 to match header.
7700
7701 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
7702 directly accessing frame internals.
7703
f18cbb28 7704 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
7705 globals_of_w32font.
7706
7707 * process.c: Include TERM_HEADER instead of listing all possible
7708 window-system headers.
7709
3a880af4
SM
7710 * nsterm.h: Remove declarations now in frame.h.
7711 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
17a2cbbd
DC
7712
7713 * menu.c: Include TERM_HEADER instead of listing all possible
7714 window-system headers.
7715
7716 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
7717 window system.
7718
7719 * keyboard.c: Include TERM_HEADER instead of listing all possible
7720 window-system headers.
7721
7722 * image.c: Include TERM_HEADER instead of listing all possible
7723 window-system headers. Declare Vlibrary_cache when compiling for
7724 Windows.
7725
7726 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
7727 window system declarations.
7728
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,
7737 and x_query_colors.
7738
7739 * frame.c: Include TERM_HEADER instead of listing all possible
7740 window-system headers.
7741
7742 * font.c: Include TERM_HEADER instead of listing all possible
7743 window-system headers.
7744
7745 * emacs.c: Include TERM_HEADER.
7746
f18cbb28
EZ
7747 * dispnew.c: Include TERM_HEADER instead of listing all possible
7748 window-system headers.
17a2cbbd 7749
f18cbb28 7750 * ccl.h: Include character.h.
17a2cbbd
DC
7751
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
7754 Emacs.
7755
c650a5de
DA
77562012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7757
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.
7765
4e0f6479
DA
77662012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7767
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.
7774
8b96a52c
DA
77752012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7776
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.
7780
b4444c8a
JD
77812012-08-30 Jan Djärv <jan.h.d@swipnet.se>
7782
7783 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
7784 does not become zero (Bug#12234).
7785
b98521db
PE
77862012-08-30 Paul Eggert <eggert@cs.ucla.edu>
7787
7788 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
7789 for GCC 4.7.1 x86-64.
7790
31d02438
GM
77912012-08-30 Glenn Morris <rgm@gnu.org>
7792
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)
7796
7f8941d8
JD
77972012-08-28 Jan Djärv <jan.h.d@swipnet.se>
7798
7799 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 7800 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
7801 (windowShouldClose:): Set window_closed.
7802 (dealloc): New member, free button_values.
fc0c31f8
JB
7803 (process_dialog:): Make member function. Remove window argument,
7804 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
7805 in button_values.
7806 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 7807 with tag. Remove return self, declare return value as void.
7f8941d8
JD
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.
fc0c31f8 7811 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
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.
7817
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.
7822
eada0861 78232012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 7824
eada0861
GM
7825 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
7826 is not one of the heaps we manage. (Bug#12242)
7827
78282012-08-28 Glenn Morris <rgm@gnu.org>
7829
7830 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
7831
457294dd
MR
78322012-08-28 Martin Rudalics <rudalics@gmx.at>
7833
7834 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
7835 auto-buffer-name window parameter. Install revision of reverted
7836 fix.
457294dd 7837
4f2daf31
DA
78382012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7839
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
7844 nested declaration.
7845
66322887
DA
78462012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7847
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.
7854
a3d794a1
DA
78552012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7856
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.
7867
59ea14cd
PE
78682012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7869
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.)
7897
95072a94
MR
78982012-08-27 Martin Rudalics <rudalics@gmx.at>
7899
7900 * window.c (Fset_window_configuration): Revert first part of
7901 last change.
7902
0f19feff
JD
79032012-08-27 Jan Djärv <jan.h.d@swipnet.se>
7904
7905 * nsterm.h (NSPanel): New class variable dialog_return.
7906
3a880af4
SM
7907 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
7908 Initialize dialog_return.
0f19feff
JD
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
7912 event.
7913 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
7914 modal loop returns.
7915
f10fe38f
PE
79162012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7917
de1339b0
PE
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.
7932 All uses changed.
7933 * composite.h, lisp.h: Reflect above API changes.
7934
f10fe38f
PE
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'.
7972
5474c384
DA
79732012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7974
f10fe38f 7975 Fix spare memory change (Bug#12286).
5474c384
DA
7976 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
7977 (valid_lisp_object_p): Likewise.
7978
c4b6914d
MR
79792012-08-27 Martin Rudalics <rudalics@gmx.at>
7980
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
7984 point (Bug#12208).
7985
35aaa1ea
DA
79862012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7987
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.
7993
6af64513
PE
79942012-08-26 Paul Eggert <eggert@cs.ucla.edu>
7995
8b2e00a3
PE
7996 Spelling fixes.
7997 * Makefile.in (.PHONY): versioclean -> versionclean.
7998
b52d6985
PE
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):
8007 Remove decls.
8008
d5172d4f
PE
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.
8029
6af64513
PE
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>.
8035
e1f29348
BR
80362012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
8037
8038 * lisp.h (functionp): New function (extracted from Ffunctionp).
8039 (FUNCTIONP): Use it.
8040 * eval.c (Ffunctionp): Use it.
8041
17c05d74
PE
80422012-08-25 Paul Eggert <eggert@cs.ucla.edu>
8043
0f46bc75
PE
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.
8051
ee4c0f69
PE
8052 * emacs.c (fatal_error_signal_hook): Remove.
8053 All uses removed. This leftover from old code was always 0.
8054
17c05d74
PE
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.
8061
391ceac5
EZ
80622012-08-25 Eli Zaretskii <eliz@gnu.org>
8063
8064 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
8065
2f221583
PE
80662012-08-25 Paul Eggert <eggert@cs.ucla.edu>
8067
f4a681b0
PE
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.
8072 (LIBES): Use it.
8073
2f221583
PE
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'.
8084
37ef52bb
PE
80852012-08-24 Paul Eggert <eggert@cs.ucla.edu>
8086
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.
8102
2cc21167
PE
81032012-08-23 Paul Eggert <eggert@cs.ucla.edu>
8104
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):
8110 Now bool.
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.
8119
7db4ddf4
MR
81202012-08-23 Martin Rudalics <rudalics@gmx.at>
8121
8122 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
8123 argument.
8124
b1bb8011
PE
81252012-08-23 Paul Eggert <eggert@cs.ucla.edu>
8126
8127 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
8128 * atimer.h: Include <stdbool.h>.
8129
ff687885
DN
81302012-08-22 Dan Nicolaescu <dann@gnu.org>
8131
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
8134 not use them.
8135 (FRAME_MAC_P): Remove leftover from deleted code.
8136 * frame.c (syms_of_frame): Remove leftover from deleted code.
8137
4ce7a138
JD
81382012-08-22 Jan Djärv <jan.h.d@swipnet.se>
8139
8140 * nsterm.m (insertText:): Don't clear modifiers if code is space.
8141
d733ec6d
PE
81422012-08-22 Paul Eggert <eggert@cs.ucla.edu>
8143
8144 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
8145 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 8146 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
8147 (fontset_add): Return void, for FONTSET_ADD.
8148
d0d2d26f
PE
81492012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8150
fce31d69
PE
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)
8168 (Fdo_auto_save):
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
8176 alloc.c's changes.
8177
d0d2d26f
PE
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.
8185
d18e2bb6
JD
81862012-08-21 Jan Djärv <jan.h.d@swipnet.se>
8187
8188 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
8189 the loop (Bug#12247).
8190
1b9d9d16
PE
81912012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8192
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.
8198
b2f09701
EZ
81992012-08-21 Eli Zaretskii <eliz@gnu.org>
8200
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
e1f29348
BR
8204 what x_draw_composite_glyph_string_foreground expects.
8205 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
8206 expectations, to produce correct width of the composed character.
8207 Reverse the sign of the DU offset produced by ScriptPlace.
8208
9b994fed
PE
82092012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8210
8211 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
8212
086ca913
DA
82132012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8214
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.
8226
5481664a
MR
82272012-08-21 Martin Rudalics <rudalics@gmx.at>
8228
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.
8233
6d470bdd
DA
82342012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8235
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.
8240 Adjust users.
8241
24564fe1
GM
82422012-08-20 Glenn Morris <rgm@gnu.org>
8243
8244 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
8245 Don't assume that `ln -f' works.
8246
0a05a035
EZ
82472012-08-20 Eli Zaretskii <eliz@gnu.org>
8248
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
8252 details.
8253
e46f2325
DA
82542012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8255
8256 Inline setter functions for Lisp_Objects slots of struct specbinding.
8257 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
8258 Adjust users.
8259
734fbd86
MR
82602012-08-20 Martin Rudalics <rudalics@gmx.at>
8261
8262 * window.c (select_window): Always make selected window's buffer
8263 current.
8264
f1a95992
DA
82652012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8266
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.
8271
e83064be
DA
82722012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8273
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.
8280
4ce60d2e
DA
82812012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8282
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.
8288
c06c9690
JB
82892012-08-20 Juanma Barranquero <lekktu@gmail.com>
8290
8291 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
8292
32bd4250
PE
82932012-08-19 Paul Eggert <eggert@cs.ucla.edu>
8294
bad03192 8295 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
8296 as gnulib does this if the system doesn't.
8297 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
8298 Remove declaration. MS-Windows declares it on stdlib.h which is
8299 included by conf_post.h.
b69a6d22
PE
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'.
8303
22d7feb2
PE
8304 * unexaix.c, unexcoff.c: Include "mem-limits.h".
8305 (start_of_data): Remove decl; mem-limits.h provides it.
8306
32bd4250
PE
8307 * xdisp.c (handle_invisible_prop): Make it a bit faster
8308 and avoid a gcc -Wmaybe-uninitialized diagnostic.
8309
450809af
CY
83102012-08-19 Chong Yidong <cyd@gnu.org>
8311
8312 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
8313 ends (Bug#3874).
8314
9e677988
AS
83152012-08-19 Andreas Schwab <schwab@linux-m68k.org>
8316
6b1319ce
AS
8317 * .gdbinit: Use call instead of set when calling a function in the
8318 inferior.
8319
9e677988
AS
8320 * data.c (set_internal): Don't use set_blv_found.
8321 (Fkill_local_variable): Likewise.
8322
d7191076
AA
83232012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
8324
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.
8328
e757f1c6
PE
83292012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8330
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.
8337
a999ce26
CY
83382012-08-18 Chong Yidong <cyd@gnu.org>
8339
8340 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
8341 for the string case (Bug#3874).
8342
3f22b86f
PE
83432012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8344
39eb03f1
PE
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)
8354 (bset_width_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.
8377
6a09a33b
PE
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.
8392
e8c17b81
PE
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.
8416
3f22b86f
PE
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.
8426
742af32f
PE
84272012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8428
15dbb4d6
PE
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.
8445
f00af5b1
PE
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.
8461
0c94c8d6
PE
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.
8468 All uses changed.
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
8473 interval_set_left.
8474 (set_interval_right): Move here from intervals.h, and rename from
8475 interval_set_right.
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.
8483
34dabdb7
PE
8484 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
8485 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 8486 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
8487 All uses changed. See the end of
8488 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
8489
742af32f
PE
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
c24eb18a 8495 "set_char_table_parent (char_table, parent);".
742af32f
PE
8496 The old version was confusing because it used the same name
8497 'parent' for two different things.
8498
a04e2c62
DA
84992012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8500
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.
8506
383dcbf9
CY
85072012-08-17 Chong Yidong <cyd@gnu.org>
8508
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.
8513
44386687
DA
85142012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8515
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.
8520
927c7216
PE
85212012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8522
8523 * lisp.h (duration_to_sec_usec): Remove unused decl.
8524
93044f7b
AA
85252012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
8526
8527 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
8528 to an allocated instance of NSString, not to the class itself.
8529
9851e4a5
JB
85302012-08-17 Juanma Barranquero <lekktu@gmail.com>
8531
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.
8536
620f13b0
PE
85372012-08-16 Paul Eggert <eggert@cs.ucla.edu>
8538
8539 Use ASCII tests for character types.
8540 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
8541 * xfns.c, xterm.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.
8564
52162052
MR
85652012-08-16 Martin Rudalics <rudalics@gmx.at>
8566
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.
8602
2751c80f
DA
86032012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8604
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.
8608
032a42c8
CY
86092012-08-16 Chong Yidong <cyd@gnu.org>
8610
a2d19368
CY
8611 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
8612
032a42c8
CY
8613 * xfont.c (xfont_open):
8614 * xftfont.c (xftfont_open): Set the font's max_width field.
8615
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.
8621
8622 * font.h (struct font): Update comments.
8623
a098c930
DA
86242012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8625
032a42c8 8626 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
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.
8632
8be3a09c
SM
86332012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
8634
8635 * eval.c (eval_sub): Bind lexical-binding.
8636 * lread.c (Qlexical_binding): Make non-static.
8637
ac4845a6
JD
86382012-08-15 Jan Djärv <jan.h.d@swipnet.se>
8639
ddee6515
JD
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.
8647
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.
fc0c31f8 8662 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
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.
8668
8669 * nsterm.h (EmacsApp): fd_handler takes id argument.
8670 (EmacsDialogPanel): Add timer_fired and timeout_handler.
8671
ac4845a6
JD
8672 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
8673
eb424fe3
EZ
86742012-08-15 Eli Zaretskii <eliz@gnu.org>
8675
8676 * region-cache.c (move_cache_gap): Update gap_len using the actual
8677 growth of the boundaries array. Do not change cache_len.
8678 (Bug#12196)
8679
4e6a86c6
DA
86802012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8681
8682 Generalize and cleanup font subsystem checks.
8683 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
8684 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
8685 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 8686
5bf192ca
DA
86872012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8688
8689 * gtkutil.c (xg_get_font): Use pango_units_to_double.
8690
f2045622
CY
86912012-08-15 Chong Yidong <cyd@gnu.org>
8692
8be3a09c
SM
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.
f2045622
CY
8697 (x_last_font_name): Move to this file from xfns.c.
8698
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.
8701
8702 * xfaces.c: Make font weight and style symbols non-static.
8703
7f6feb56
SM
87042012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
8705
8706 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
8707 (bug#12117).
8708
fecbd8ff
SM
87092012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
8710
8711 * alloc.c (Fgarbage_collect): Use plural form consistently.
8712
9b8d5165
EZ
87132012-08-14 Eli Zaretskii <eliz@gnu.org>
8714
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.
8718
f5d9e83a
PE
87192012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8720
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.
8729
55802e4a
CY
87302012-08-14 Chong Yidong <cyd@gnu.org>
8731
4abcdac8
CY
8732 * character.c (Fcharacterp): Doc fix (Bug#12076).
8733
8734 * data.c (Findirect_variable): Doc fix (Bug#11040).
8735
55802e4a
CY
8736 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
8737
8738 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 8739 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 8740
8e99d072
BR
87412012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
8742
8743 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
8744 (bug#12022).
8745
08908aca
MR
87462012-08-14 Martin Rudalics <rudalics@gmx.at>
8747
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).
8754
56120d6f
PE
87552012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8756
8757 * intervals.c (offset_intervals): Remove obsolete comment.
8758
67b77c0b
AS
87592012-08-14 Andreas Schwab <schwab@linux-m68k.org>
8760
8761 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
8762
f48b82fd
GR
87632012-08-14 Gergely Risko <gergely@risko.hu>
8764
8765 * coding.c (decode_coding): Record buffer modification before
8766 disabling undo_list (Bug#11773).
8767
fd318b54
DA
87682012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8769
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.
8776
41a62dd9
DA
87772012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8778
8779 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
8780
5884c324
PE
87812012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8782
8783 * gtkutil.c (xg_mark_data): Don't assume C99.
8784
ca06f160
JD
87852012-08-13 Jan Djärv <jan.h.d@swipnet.se>
8786
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
8792 if not present.
8793 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 8794 is up to date. Otherwise store new data.
ca06f160
JD
8795 (free_frame_tool_bar): Free xg_frame_tb_info if present.
8796
7864a3f7
DA
87972012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8798
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.
8804
4c31be61
DA
88052012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8806
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.
8813
14ae4239
BT
88142012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
8815
8816 * lread.c (syms_of_lread): Initialize Vlexical_binding.
8817
32bcadb4
JD
88182012-08-11 Jan Djärv <jan.h.d@swipnet.se>
8819
3d29b2ce 8820 * nsterm.m (not_in_argv): New function.
fc0c31f8 8821 (application:openFile, application:openTempFile:):
3d29b2ce
JD
8822 (application:openFileWithoutUI:, application:openFiles:): Open file
8823 if not_in_argv returns non-zero (bug#12171).
8824
32bcadb4 8825 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
8826 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
8827 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
8828 (xg_get_font_name): Use those functions/macros here.
8829 Reported by Frans Oilinki <moilinki@gmail.com>.
8830
9ff9402d 88312012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
8832
8833 * unexmacosx.c (copy_data_segment): Copy initialized data in
8834 statically linked libraries from input file rather than memory.
8835
db74a5fc
YM
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.
8839
25e65510
GM
88402012-08-10 Glenn Morris <rgm@gnu.org>
8841
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.
8844
7961135c
DA
88452012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8846
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>.
8850
42b3a444
DA
88512012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8852
8853 Use common inline syntax in intervals.h.
8854 * intervals.h (INTERVALS_INLINE): New macro.
8855 Change all users from LISP_INLINE.
8856
9fb0c957
DA
88572012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8858
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.
8865
65e8ee52
DA
88662012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8867
8868 Remove unused macros from intervals.h.
8869 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
8870 * intervals.c: Adjust comment.
8871
9b855fd6
EZ
88722012-08-10 Eli Zaretskii <eliz@gnu.org>
8873
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
8877 testing os_subtype.
8878
39cb9e56 88792012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
8880 Eli Zaretskii <eliz@gnu.org>
8881
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
8888 later.
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.
8892
9374581a
GM
88932012-08-10 Glenn Morris <rgm@gnu.org>
8894
4b94e8cf
GM
8895 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
8896
9374581a
GM
8897 * lisp.h (DIRECTORY_SEP): Let configure set it.
8898
a2752828
DA
88992012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
8900
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.
8904
cc92c454
SM
89052012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
8906
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.
8911
4cb3e6b3
DA
89122012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8913
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.
8921
8707c1e5
DA
89222012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8923
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.
8935
ad8c997f
DA
89362012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8937
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.
8943
32ac3a6b
GM
89442012-08-08 Glenn Morris <rgm@gnu.org>
8945
8946 * lisp.mk (lisp): Remove language/persian.elc.
8947
77c7bcb1
DA
89482012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8949
8950 Cleanup intervals.
8951 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
8952 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
8953 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
8954 Adjust comment. Move under #if 0.
77c7bcb1
DA
8955 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
8956 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
8957
9c08a8d4
DA
89582012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8959
8960 Check total length of intervals with eassert.
8961 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
8962 * intervals.c: Change all users to eassert.
8963
26d16b35
EZ
89642012-08-07 Eli Zaretskii <eliz@gnu.org>
8965
14ae4239
BT
8966 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
8967 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
8968 INTERNAL_FIELD in Lisp_Cons.
8969
c644523b
DA
89702012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8971
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
8975 use INTERNAL_FIELD.
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
8985 where appropriate.
8986
6a3d20cc
DA
89872012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8988
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.
14ae4239
BT
8994 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
8995 Adjust indentation.
6a3d20cc
DA
8996 (INTERVAL_SIZE): Remove. Adjust users.
8997 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
8998
4d2b044c
DA
89992012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9000
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.
9005
d3d50620
DA
90062012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9007
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:
9016 Adjust users.
9017
d10a51dc
CY
90182012-08-07 Chong Yidong <cyd@gnu.org>
9019
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).
9024
e69b0960
DA
90252012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9026
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.
9034
25a20a3a
JB
90352012-08-06 Juanma Barranquero <lekktu@gmail.com>
9036
9037 * w32.c: Silence compiler warnings.
9038 (map_w32_filename): Remove unused variable `is_fat'.
9039 (chase_symlinks): Add parentheses around expression.
9040
1c6f11f4
GM
90412012-08-06 Glenn Morris <rgm@gnu.org>
9042
1db4583a
GM
9043 * sysdep.c: Respect BROKEN_GETWD.
9044
1c6f11f4
GM
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.
9048
2b90362b
DA
90492012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9050
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.
9055
5f50daf2
EZ
90562012-08-06 Eli Zaretskii <eliz@gnu.org>
9057
14ae4239
BT
9058 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
9059 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 9060
cbcc7007
SM
90612012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
9062
9063 * buffer.h (struct buffer): Revert `indirections' to a simple int;
9064 that should be sufficient for everyone.
9065
4d365fa4
JD
90662012-08-06 Jan Djärv <jan.h.d@swipnet.se>
9067
9068 * keyboard.c (timer_check_2): Add break so timer_check returns next
9069 timeout.
9070
dd86bd82
DA
90712012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9072
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>.
9076
054e1668
JD
90772012-08-06 Jan Djärv <jan.h.d@swipnet.se>
9078
9079 * nsterm.m (ns_frame_rehighlight): Use FSET.
9080
9081 * nsmenu.m (ns_update_menubar): Use FSET.
9082
21238f11
DA
90832012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9084
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.
9088
077288cf
DA
90892012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9090
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:
9098 Adjust users.
9099
71688bd7
DA
91002012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9101
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>.
9107
f99bac93
DA
91082012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9109
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>.
9114
8c2a0f2d
GM
91152012-08-06 Glenn Morris <rgm@gnu.org>
9116
9117 * lisp.mk (lisp): Add language/persian.elc.
9118
edd74c35
DA
91192012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9120
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.
9127
8671676c
AS
91282012-08-05 Andreas Schwab <schwab@linux-m68k.org>
9129
9130 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
9131
663e2b3f
DA
91322012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
9133
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.
9144
d32e47af
LM
91452012-08-05 Lawrence Mitchell <wence@gmx.li>
9146
9147 * search.c (Freplace_match): Treat \? in the replacement text
9148 literally (Bug#8161).
9149
e5d9c0d1
CY
91502012-08-05 Chong Yidong <cyd@gnu.org>
9151
9152 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
9153 * frame.c (Vdelete_frame_functions):
9154 * emacs.c (Vkill_emacs_hook): Doc fix.
9155
8da0576b
EZ
91562012-08-04 Eli Zaretskii <eliz@gnu.org>
9157
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>.
9161
02676e5d
CY
91622012-08-04 Chong Yidong <cyd@gnu.org>
9163
9164 * syntax.c (Fmodify_syntax_entry): Doc fix.
9165
97147da9
EZ
91662012-08-04 Eli Zaretskii <eliz@gnu.org>
9167
76151e2c
EZ
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
14ae4239
BT
9171 them into environment when they were not already defined.
9172 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 9173 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
9174 (check_windows_init_file): Now external, not static.
9175 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
9176 called when Vload_path is already set up.
9177
9178 * w32.h (check_windows_init_file): Add prototype.
9179
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
9184 w32.c.
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.
9188
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.
9193
9194 * lread.c (init_lread): Add comments to #ifdef's.
9195
97147da9
EZ
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.
9199
185ee146
PE
92002012-08-04 Paul Eggert <eggert@cs.ucla.edu>
9201
9202 Export DEFAULT_REHASH_* to GDB.
9203 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
9204 Now constants, not macros.
9205
8834c57a
PE
92062012-08-03 Paul Eggert <eggert@cs.ucla.edu>
9207
98c6f1e3
PE
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.
9231
8834c57a
PE
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.
9241
6dad7178
EZ
92422012-08-03 Eli Zaretskii <eliz@gnu.org>
9243
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):
9257 New functions.
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.
14ae4239 9264 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
9265 get_file_security_desc.
9266 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
9267 with addition of handling of symlinks and support for 'lstat'.
9268 If possible, get file's attributes and security information by
6dad7178
EZ
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.
9274
f162bcc3
PE
92752012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9276
79ea6c20
PE
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.
9283
c0ce93fd
PE
9284 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
9285 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 9286
f162bcc3
PE
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.
a8333d03 9314 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 9315
837b365b
GM
93162012-08-02 Glenn Morris <rgm@gnu.org>
9317
d66b744d
GM
9318 * s/: Remove empty directory.
9319
837b365b
GM
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.
9323
13294f95
PE
93242012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9325
9326 Port to Solaris 8.
9327 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
9328
90df0db3
GM
93292012-08-02 Glenn Morris <rgm@gnu.org>
9330
9331 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
9332 hard-coding the path separator.
9333
4939150c
PE
93342012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9335
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
9348 of PROP changed.
9349
947b2afd
AA
93502012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
9351
9352 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
9353 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1f9f395d 9354 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
947b2afd
AA
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.
9358
4f5d0325
EZ
93592012-08-01 Eli Zaretskii <eliz@gnu.org>
9360
2008beae
EZ
9361 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
9362 Adapt to latest changes in field names of the corresponding Lisp
288479f6 9363 objects.
2008beae 9364
4f5d0325
EZ
9365 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
9366
fe3cc771
GM
93672012-08-01 Glenn Morris <rgm@gnu.org>
9368
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.
9373
c90acc54
JB
93742012-08-01 Juanma Barranquero <lekktu@gmail.com>
9375
9376 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
9377 Remove; moved to nt/config.nt.
9378
d8a05828
DA
93792012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9380
9381 Use INTERNAL_FIELD for conses and overlays.
9382 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
9383 Remove obsolete comment.
9384 (MVAR): New macro.
9385 (struct Lisp_Overlay): Use INTERNAL_FIELD.
9386 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
9387
8271d590
DA
93882012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9389
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.
9394
3193acd2
DA
93952012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9396
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.
9401
3a45383a
DA
94022012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9403
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.
9412
c1dbc63c
PE
94132012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9414
9415 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
9416
5c0c0e8a
GM
94172012-08-01 Glenn Morris <rgm@gnu.org>
9418
9419 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
9420 Move to configure.ac.
9421
552a99b4
JB
94222012-08-01 Juanma Barranquero <lekktu@gmail.com>
9423
9424 * makefile.w32-in (CONFIG_H): Update dependencies.
9425 (CONF_POST_H): New macro.
9426
9427 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
9428
8d8e2dfe
GM
94292012-07-31 Glenn Morris <rgm@gnu.org>
9430
bc96620a
GM
9431 * Makefile.in (S_FILE): No longer set by configure.
9432
476b1b2d
GM
9433 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
9434 is available.
9435 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
9436
b2c7a106
GM
9437 * process.h (NULL_DEVICE):
9438 * emacs.c (SEPCHAR):
9439 * editfns.c (USER_FULL_NAME): Let configure set them.
9440
d53d062a
GM
9441 * s/README, s/template.h: Remove files.
9442
4515017f
GM
9443 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
9444
8d8e2dfe
GM
9445 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
9446 Move to configure.ac.
9447
5b20b3cc
EZ
94482012-07-31 Eli Zaretskii <eliz@gnu.org>
9449
1e0afd9a
EZ
9450 * .gdbinit (xframe): Adapt to introduction of FVAR and the
9451 resulting renaming of 'struct frame' members.
9452
5b20b3cc
EZ
9453 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
9454
9455 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
9456 after introduction of FVAR.
9457
f1310128
JD
94582012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9459
79e721e0
JD
9460 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
9461
9462 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
9463 instead of compositeToPoint.
9464 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
9465
8d7c7eed 9466 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 9467
e34f7f79
DA
94682012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9469
9470 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
9471 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 9472 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
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.
3a45383a
DA
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:
e34f7f79
DA
9481 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
9482
c09bfb2f
DA
94832012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9484
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.
9491
14c114ae
JD
94922012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9493
9494 * nsterm.m (openFiles): Fix previous checkin.
9495
3bd21e82
PE
94962012-07-31 Paul Eggert <eggert@cs.ucla.edu>
9497
9498 * indent.c (compute_motion): Remove unused local.
9499
c1529ded
GM
95002012-07-31 Glenn Morris <rgm@gnu.org>
9501
400d5621
GM
9502 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
9503
268e2432
GM
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.
9507
7552f3ee
GM
9508 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
9509 * s/irix6-5.h: Remove file.
9510
6a381852
GM
9511 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
9512 * s/darwin.h: Remove file.
9513
c1529ded
GM
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.
9516
b429a4ee
GM
95172012-07-30 Glenn Morris <rgm@gnu.org>
9518
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.
9522
adff3182
JD
95232012-07-30 Jan Djärv <jan.h.d@swipnet.se>
9524
9525 * nsterm.m (ns_do_open_file): New variable.
b9031d69 9526 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
9527 (openFile, openTempFile, openFileWithoutUI, openFiles):
9528 Open files only if ns_do_open_file.
adff3182 9529
c32af1e4
PE
95302012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9531
7393bcbb
PE
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.
9535
c32af1e4
PE
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.
9542
302fc036
EZ
95432012-07-30 Eli Zaretskii <eliz@gnu.org>
9544
9545 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
9546 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
9547
9548 * w32term.c <w32_keyboard_codepage>: Renamed from
9549 keyboard_codepage and now external. All users changed.
9550
9551 * w32term.h: Add declaration of w32_keyboard_codepage.
9552
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.
9556
88fb40b4
PE
95572012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9558
0aee6912
PE
9559 Update .PHONY listings in makefiles.
9560 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
9561 bootstrap-clean, distclean, maintainer-clean, versioclean,
9562 extraclean, frc.
9563
88fb40b4
PE
9564 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
9565 This is a bit clearer. Fix some commentary typos.
9566
0a763bd1
GM
95672012-07-30 Glenn Morris <rgm@gnu.org>
9568
32bac6d6
GM
9569 * s/netbsd.h: Let configure include signal.h if needed.
9570 Remove file, which is now empty.
9571
b65e7c46
GM
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.
0a763bd1 9576
169304bd
AS
95772012-07-30 Andreas Schwab <schwab@linux-m68k.org>
9578
9579 * keymap.c (Fkey_description): Don't remove 0x80 bit from
9580 non-single-byte char when adding meta modifier. (Bug#12090)
9581
6cd7a139
DA
95822012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9583
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.
9590
d34d6ffc
GM
95912012-07-30 Glenn Morris <rgm@gnu.org>
9592
7b8a48e4 9593 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 9594 does that unconditionally. Remove file, which is now empty.
7b8a48e4 9595
d34d6ffc
GM
9596 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
9597 Remove empty files.
9598
03a660a6
PE
95992012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9600
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.
88fb40b4 9622 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
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.
9630
e499d0ee
DA
96312012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9632
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.
9638
d5040d2d
PE
96392012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9640
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.
9645
7f259ae6
JB
96462012-07-29 Juanma Barranquero <lekktu@gmail.com>
9647
9648 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
9649 ($(BLD)/w32console.$(O)): Update dependencies.
9650
7e63e0c3
DA
96512012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9652
9653 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
9654 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
9655 time. Adjust users.
9656 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
9657
ffd817eb
JD
96582012-07-29 Jan Djärv <jan.h.d@swipnet.se>
9659
9660 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
9661 setting sitelisp (Bug#12010).
9662
417a7a0e
EZ
96632012-07-29 Eli Zaretskii <eliz@gnu.org>
9664
14ae4239 9665 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
9666
9667 * w32heap.c (cache_system_info):
9668 * w32.c (sys_rename):
9669 * w32proc.c (find_child_console, sys_kill): All users changed.
9670
387d4d92
PE
96712012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9672
9673 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
9674
55a6cca6
EZ
96752012-07-29 Eli Zaretskii <eliz@gnu.org>
9676
9677 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
9678
dbcf001c
DA
96792012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9680
9681 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
9682 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
9683 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 9684
e2688e4a
DA
96852012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9686
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.
9693
b46a6a83
PE
96942012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9695
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.
9700 All uses changed.
9701
e32a5799
PE
97022012-07-28 Paul Eggert <eggert@cs.ucla.edu>
9703
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.
9713
df81cd29
EZ
97142012-07-28 Eli Zaretskii <eliz@gnu.org>
9715
01bd1b0d
EZ
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.
9726
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.
9731
9732 * w32inevt.h: Declare w32_console_unicode_input.
9733
df81cd29
EZ
9734 * xdisp.c (init_iterator): Don't reference tip_frame in a build
9735 --without-x. (Bug#11742)
9736
c20fdd9e
PE
97372012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9738
9739 Adjust GDB to reflect pvec_type changes (Bug#12036).
9740 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
9741 2012-07-04 changes to pseudovector representation.
9742 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 9743
32770973 97442012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
9745
9746 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
9747 bus address.
9748 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
9749
3438fe21
EZ
97502012-07-27 Eli Zaretskii <eliz@gnu.org>
9751
bcfbc9de
EZ
9752 * alloc.c (listn): Fix the order the arguments are consed onto the
9753 list.
9754
3438fe21
EZ
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.
9759
eeaea515
DA
97602012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9761
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>.
9765
073c88c2
DA
97662012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9767
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.
eeaea515 9771 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 9772
4706125e
PE
97732012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9774
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.
9789
694b6c97
DA
97902012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9791
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.
9808
6195f384
DA
98092012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9810
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.
9825
5eceb8fb
PE
98262012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9827
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.
562157c8
PE
9835 * emacs.c: Do not include <verify.h>; no longer needed.
9836 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
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.
9847
d6749401
JB
98482012-07-26 Juanma Barranquero <lekktu@gmail.com>
9849
9850 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
9851
1781b9e9
PE
98522012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9853
d89518db 9854 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
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):
9873 Remove.
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.
9888
3628596a
DA
98892012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
9890
9891 Explicitly free restriction data that are not needed anymore.
9892 * editfns.c (save_restriction_restore): Free restriction data.
9893
7abaf5cc
SM
98942012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
9895
9896 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
9897 add argument, tune behavior, and adjust all callers.
9898
71f88e00
PE
98992012-07-25 Paul Eggert <eggert@cs.ucla.edu>
9900
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.
9907
57ec3034
JD
99082012-07-25 Jan Djärv <jan.h.d@swipnet.se>
9909
9910 * nsterm.m (ns_read_socket): Return early if there is a modal
9911 window (Bug#12043).
9912
8137e7b3
MR
99132012-07-25 Martin Rudalics <rudalics@gmx.at>
9914
9915 * frame.c (Fredirect_frame_focus): In doc-string don't mention
9916 that FOCUS-FRAME can be omitted.
9917
04e9897c
DA
99182012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
9919
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).
9926
8a0484e1
EZ
99272012-07-24 Eli Zaretskii <eliz@gnu.org>
9928
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)
9932
fa691a83
DA
99332012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
9934
9935 Simplify copy_overlay.
04e9897c 9936 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
9937 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
9938
436bc8e0
EZ
99392012-07-23 Eli Zaretskii <eliz@gnu.org>
9940
9941 * print.c (print_object): Don't crash when a frame's name is nil
9942 or invalid. (Bug#12025)
9943
9944 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
9945 it signals an error when a tooltip frame is being created.
9946
d7a7fda3
DA
99472012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
9948
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.
9957
99582012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
9959
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.
9964
9d7fa573
JD
99652012-07-22 Jan Djärv <jan.h.d@swipnet.se>
9966
9967 * nsmenu.m (Popdown_data): New struct.
9968 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
9969 free Popdown_data.
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).
9974
0dd6d66d
DA
99752012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9976
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.
9981
d36d71df
DA
99822012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9983
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.
9989
fb9ea40f
PE
99902012-07-22 Paul Eggert <eggert@cs.ucla.edu>
9991
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.
9994
2d5c5f7d
EZ
99952012-07-21 Eli Zaretskii <eliz@gnu.org>
9996
07fb592e
EZ
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
10000 for the reasons.
10001
37a9eac8 10002 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
10003 info.dwItemData. Fixes crashes on 64-bit Windows.
10004 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 10005
c4328746
JD
100062012-07-21 Jan Djärv <jan.h.d@swipnet.se>
10007
fc0c31f8 10008 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 10009 (conversationIdentifier): Return value is NSInteger.
784051c4 10010 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 10011
6e5d1c12
CY
100122012-07-21 Chong Yidong <cyd@gnu.org>
10013
10014 * window.c (decode_any_window): Signal an error if the window is
10015 on a dead frame (Bug#11984).
10016
9928463d
DA
100172012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10018
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.
10027
f8643a6b
DA
100282012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10029
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.
10038
dac616ff
DA
100392012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10040
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.
10050
d7ea76b4
DA
100512012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10052
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.
10061
765e61e3
DA
100622012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
10063
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):
10070 Make them static.
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.
10075
52b852c7
PE
100762012-07-19 Paul Eggert <eggert@cs.ucla.edu>
10077
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.
10084
5db81e33
SM
100852012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
10086
10087 * alloc.c (Fgarbage_collect): Tweak docstring.
10088
5b835e1d
DA
100892012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10090
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
10096 accounting.
10097 (total_free_vector_bytes): Rename to total_free_vector_slots,
10098 adjust accounting.
10099 (Qstring_bytes, Qvector_slots): New symbols.
10100 (syms_of_alloc): DEFSYM them.
10101
9cd47b72
DA
101022012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10103
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.
10110
d17337e5
DA
101112012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
10112
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
10122 for dead buffer.
10123 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
10124
60cfd278
AS
101252012-07-18 Andreas Schwab <schwab@linux-m68k.org>
10126
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>.
10132
d06714cb
PE
101332012-07-18 Paul Eggert <eggert@cs.ucla.edu>
10134
83713154
PE
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.
10138
d06714cb
PE
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 ().
10147
464d5a5e
SM
101482012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
10149
5fbc0409
SM
10150 * eval.c (Fdefvar): Don't check constants since we only set the var if
10151 it's not yet defined anyway (bug#11904).
10152
464d5a5e
SM
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).
10157
8dc2e44a
AS
101582012-07-18 Andreas Schwab <schwab@linux-m68k.org>
10159
10160 * w32font.c (Qsymbol): Remove local definition.
10161 (syms_of_w32font): Don't DEFSYM it.
10162
169925ec
DA
101632012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
10164
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.
10168
5fbfb018
CY
101692012-07-18 Chong Yidong <cyd@gnu.org>
10170
10171 * frame.c (x_set_frame_parameters): Revert bogus change introduced
10172 in 2012-05-25 commit by Paul Eggert (Bug#11738).
10173
3ab6e069
DA
101742012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
10175
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.
10193
6d02fe5b
PE
101942012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10195
10196 * alloc.c (Fmemory_free): Account for memory-free's own storage.
10197 Round up, not down. Improve doc.
10198
b7ffe040
DA
101992012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10200
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.
10206
4dc7c8d5
SM
102072012-07-17 Eli Zaretskii <eliz@gnu.org>
10208
10209 Remove FILE_SYSTEM_CASE.
10210 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
10211
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.
10216
10217 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
10218
102192012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10220
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.
10226
102272012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10228
10229 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
10230 to make the loop interruptible.
10231
102322012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10233
10234 * gnutls.c (emacs_gnutls_handshake): Only retry if
10235 GNUTLS_E_INTERRUPTED.
10236
cce7fefc
DA
102372012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10238
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.
10252
9ea10cc3
CY
102532012-07-17 Chong Yidong <cyd@gnu.org>
10254
10255 * editfns.c (Finsert_char): Doc fix.
10256
3900d5de
DA
102572012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10258
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.
10267
7098646f
DA
102682012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10269
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.
10276
22657b40
DA
102772012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10278
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.
10284
ddfc8813
RK
102852012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
10286
10287 * editfns.c (Finsert_char): Make it interactive, and make the
10288 second arg optional. Copy interactive spec and docstring from
10289 ucs-insert.
10290
7c26cf3c
PE
102912012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10292
10293 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
10294 Unlike the other wrapped functions, fabs has an unspecified
10295 effect on errno.
10296
5d127af9
JD
102972012-07-16 Jan Djärv <jan.h.d@swipnet.se>
10298
10299 * nsterm.m (keyDown): Interpret flags without left/right bits
10300 as the left key (Bug#11670).
10301
6a0dd1d7
DA
103022012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10303
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.
10313
7a6136fd
DA
103142012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10315
10316 * gtkutil.h: Tiny cleanups.
10317 (use_old_gtk_file_dialog): Remove useless declaration.
10318 (xg_uses_old_file_dialog): Add suggested const attribute.
10319
ce811ad9
EZ
103202012-07-15 Eli Zaretskii <eliz@gnu.org>
10321
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)
10326
c9adfeaa
SF
103272012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
10328
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
10332 background.
10333
fff62aa9
DA
103342012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10335
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.
10348
9730daca
DA
103492012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10350
10351 Use zero_vector where appropriate.
10352 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
10353 accordingly.
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.
10359
2e2d2a13
LL
103602012-07-15 Leo Liu <sdl.web@gmail.com>
10361
10362 * fringe.c: Fix typo in comments.
10363
cd276f6e
LL
103642012-07-14 Leo Liu <sdl.web@gmail.com>
10365
10366 * fringe.c: Add a new bitmap exclamation-mark.
10367
5a1131d9
EZ
103682012-07-14 Eli Zaretskii <eliz@gnu.org>
10369
10370 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
10371
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
10374 msdos/sed2v2.inp.
10375 (GMALLOC_INHIBIT_VALLOC): Don't define.
10376 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
10377
22e983b7
JB
103782012-07-14 Juanma Barranquero <lekktu@gmail.com>
10379
10380 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
10381
5b3f250f
GM
103822012-07-14 Glenn Morris <rgm@gnu.org>
10383
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.
10387
33d63ff4
GM
103882012-07-13 Glenn Morris <rgm@gnu.org>
10389
5b633342
GM
10390 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
10391
33d63ff4
GM
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.
10394
b55b9f85
JD
103952012-07-13 Jan Djärv <jan.h.d@swipnet.se>
10396
0dc8cf50
JD
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
10401 where appropriate.
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.
10419
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.
10431
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.
10439
10440 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
10441 appropriate.
10442 (setXBMColor): Remove unused variable len.
10443 (setPixmapData): Put () around assignment in loop statement.
10444
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
10447 where appropriate.
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.
10453
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.
10468
b55b9f85
JD
10469 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
10470 memcpy (Bug#11907).
10471
ed9265fc 104722012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
10473
10474 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
10475 and free it with DestroyExceptionInfo (Bug#11558).
10476
ef099b57
JB
104772012-07-13 Juanma Barranquero <lekktu@gmail.com>
10478
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.
10482
ea814a5d
EZ
104832012-07-13 Eli Zaretskii <eliz@gnu.org>
10484
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)
10488
1a952767
PE
104892012-07-13 Paul Eggert <eggert@cs.ucla.edu>
10490
10491 * xdisp.c (produce_special_glyphs): Now static.
10492 * dispextern.h (produce_special_glyphs): Remove decl.
10493
983188fd
GM
104942012-07-13 Glenn Morris <rgm@gnu.org>
10495
8d7c7eed 10496 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
10497 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
10498
983188fd
GM
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.
10510
d1e68667 105112012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
10512
10513 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 10514
6de0e799
GM
105152012-07-13 Glenn Morris <rgm@gnu.org>
10516
739ae010
GM
10517 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
10518
dbee5793
GM
10519 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
10520
6de0e799
GM
10521 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
10522 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
10523
b82da769
GM
105242012-07-12 Glenn Morris <rgm@gnu.org>
10525
4fae5a7a 10526 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
10527
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
10532 longer needed.
10533
5a979817
EZ
105342012-07-12 Eli Zaretskii <eliz@gnu.org>
10535
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)
10547
3e91a053
GM
105482012-07-12 Glenn Morris <rgm@gnu.org>
10549
ba9e4b84
GM
10550 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
10551
10552 * s/gnu-linux.h, s/hpux10-20.h:
10553 Do not unconditionally define HAVE_XRMSETDATABASE.
10554
3e91a053
GM
10555 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
10556
b300b1f4
PE
105572012-07-12 Paul Eggert <eggert@cs.ucla.edu>
10558
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.
10564
6e777848
GM
105652012-07-12 Glenn Morris <rgm@gnu.org>
10566
3f922c37
GM
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.
10571
0ab7b23a
GM
10572 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
10573 Move PTY_OPEN to configure.
10574
6e777848
GM
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.
10578
4a7edc24
DA
105792012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
10580
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.
10585
308aab79
GM
105862012-07-12 Glenn Morris <rgm@gnu.org>
10587
42bd1719
GM
10588 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
10589 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
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.
10593
10594 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
10595
10596 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
10597
ea0bbd17 10598 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 10599 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
10600
10601 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 10602
308aab79
GM
10603 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
10604 * s/template.h: Move NARROWPROTO to configure.
10605
ee1cf5cf
GM
106062012-07-11 Glenn Morris <rgm@gnu.org>
10607
30fe9bf4
GM
10608 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
10609 unused since 2011-01-17 change to systty.h.
10610
ee1cf5cf
GM
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.
10614
63e47e07
PE
106152012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10616
10617 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
10618
c43fb4c3
GM
106192012-07-11 Glenn Morris <rgm@gnu.org>
10620
10621 * s/darwin.h, s/gnu-linux.h, s/template.h:
10622 Move INTERRUPT_INPUT to configure.
10623
e8df9267
DA
106242012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10625
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.
14ae4239
BT
10630 * lread.c (intern_1, intern_c_string_1, oblookup):
10631 Simplify Vobarray checking.
e8df9267
DA
10632 * font.c (font_intern_prop): Likewise. Adjust comment.
10633 * w32font.c (intern_font_name): Likewise.
10634
34348bd4
AS
106352012-07-11 Andreas Schwab <schwab@linux-m68k.org>
10636
d96a1e0c
AS
10637 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
10638
34348bd4
AS
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.
10648
c8add24e
GM
106492012-07-11 Glenn Morris <rgm@gnu.org>
10650
4b575b3c
GM
10651 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
10652 since nothing has defined it on these platforms.
10653
09f4e3b0
GM
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.
10656
172bedef
GM
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.
10660
249685df
GM
10661 * s/gnu.h: Remove file, which is now empty.
10662
c8add24e
GM
10663 * s/gnu.h, s/gnu-linux.h:
10664 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
10665
b41253a3
JW
106662012-07-11 John Wiegley <johnw@newartisans.com>
10667
10668 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
10669 function attribute, so we only use it if it exists in the
10670 compiler.
10671
d923b542
DA
106722012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10673
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.
10678
5ebbef1d
PE
106792012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10680
bb352260
PE
10681 Assume mkdir, rmdir.
10682 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
10683 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
10684
57054ddd
PE
10685 Assume rename.
10686 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
10687
b747d3f7
PE
10688 Assume perror.
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.
10692
5ebbef1d
PE
10693 Assume strerror.
10694 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
10695
984e7f30
DA
106962012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10697
10698 Avoid calls to strlen in font processing functions.
10699 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
10700 (font_open_by_name): Change to use length argument.
10701 Adjust users accordingly.
d923b542
DA
10702 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
10703 Adjust prototypes.
10704 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
10705 Change to return ptrdiff_t.
984e7f30
DA
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.
10709
20e94fdd
GM
107102012-07-11 Glenn Morris <rgm@gnu.org>
10711
9d596af3
GM
10712 * s/darwin.h, s/freebsd.h, s/netbsd.h:
10713 Move DONT_REOPEN_PTY to configure.
10714
20e94fdd
GM
10715 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
10716 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
10717
e99a530f
PE
107182012-07-10 Paul Eggert <eggert@cs.ucla.edu>
10719
22ffb973
PE
10720 Remove "#define unix" that is no longer needed (Bug#11905).
10721 * s/aix4-2.h (unix): Remove; no longer needed.
10722
e9a9ae03
PE
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,
10731 not macros.
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.
ed9265fc 10745 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
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.
10749
ffacb126
PE
10750 * bytecode.c (targets): Suppress -Woverride-init warnings.
10751
e99a530f
PE
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):
10757 * lread.c (openp):
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>.
10767 (ns_get_color):
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.
10783
c59592b3
GM
107842012-07-10 Glenn Morris <rgm@gnu.org>
10785
10786 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
10787 Clarify fallback case.
10788
7d7bbefd
DA
107892012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10790
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,
d923b542 10794 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
10795 where argument type is known to be a Lisp_Cons.
10796
3a4c8000
TT
107972012-07-10 Tom Tromey <tromey@redhat.com>
10798
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.
10804
2a0213a6
DA
108052012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10806
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
10814 appropriate.
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.
10818
cb1caeaf
DA
108192012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10820
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.
10825
c293e30c
DA
108262012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10827
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
10831 accordingly.
10832 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
10833 swap 1st and 2nd arguments to obey the common convention.
10834 Adjust users accordingly.
c293e30c
DA
10835 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
10836
9e059e3f
GM
108372012-07-10 Glenn Morris <rgm@gnu.org>
10838
d02eb359
GM
10839 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
10840 Move PENDING_OUTPUT_COUNT definition to configure.
10841
882cf227
GM
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.
10845
af6e839f
GM
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.
10848
40289a12
GM
10849 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
10850 O_RDONLY already includes it).
10851
9e059e3f
GM
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.
10859
7c4e8ec0
GM
108602012-07-09 Glenn Morris <rgm@gnu.org>
10861
d4f600ff
GM
10862 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
10863 since the included bsd-common.h does so.
10864
cbb31951
GM
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]:
10870 Use ns_exec_path.
10871
7c4e8ec0
GM
10872 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
10873
26bccfae
PE
108742012-07-09 Paul Eggert <eggert@cs.ucla.edu>
10875
a0bee46f
PE
10876 * process.c (wait_reading_process_output): 'waitchannels' was unset
10877 when read_kbd || !NILP (wait_for_cell); fix this.
10878
5994c183
PE
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.
10892
26bccfae
PE
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.
10897
a8290ec3
DA
108982012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10899
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.
220cb2bd 10904 * dbusbind.c (syms_of_dbusbind): Likewise.
a8290ec3
DA
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.
10915
d01ba2f1
GM
109162012-07-09 Glenn Morris <rgm@gnu.org>
10917
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.
10924
f1f924b6
DA
109252012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10926
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.
10933
ab531b66
PE
109342012-07-08 Paul Eggert <eggert@cs.ucla.edu>
10935
10936 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
10937 See <http://bugs.gnu.org/11825#29>.
10938
c4b3bc8a
EZ
109392012-07-08 Eli Zaretskii <eliz@gnu.org>
10940
10941 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
10942 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
10943 (display_line): Add commentary about displaying truncation glyphs
10944 on GUI frames.
10945 (produce_special_glyphs): Move here from term.c.
10946
10947 * term.c (produce_special_glyphs): Move to xdisp.c.
10948
10949 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
10950 section.
c4b3bc8a 10951
b676b881
AS
109522012-07-07 Andreas Schwab <schwab@linux-m68k.org>
10953
f17c5273
AS
10954 * xdisp.c (display_line): Avoid warning about implicit declaration
10955 of FRAME_FONT.
10956
298819b9
AS
10957 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
10958
b676b881
AS
10959 * lisp.h: Remove empty conditional.
10960
6045c4fd
PE
109612012-07-07 Paul Eggert <eggert@cs.ucla.edu>
10962
b3350bf9
PE
10963 * lread.c (load_path_check): Now static.
10964
6045c4fd
PE
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.
10981
929e7845
GM
109822012-07-07 Glenn Morris <rgm@gnu.org>
10983
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.
10992
58dd0aa4
EZ
109932012-07-07 Eli Zaretskii <eliz@gnu.org>
10994
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
14ae4239
BT
10998 continuation glyphs even if on GUI frames.
10999 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
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
11003 glyphs.
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.
11011
11012 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
11013 produce_glyphs, to support GUI sessions.
11014
31571fd7
PE
110152012-07-07 Paul Eggert <eggert@cs.ucla.edu>
11016
5a16b9bc
PE
11017 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
11018
f3047c75
PE
11019 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
11020
31571fd7
PE
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.
11032
4516fbef
GM
110332012-07-07 Glenn Morris <rgm@gnu.org>
11034
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).
11038
07adc2c6
JB
110392012-07-07 Juanma Barranquero <lekktu@gmail.com>
11040
11041 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
11042 Update dependencies.
11043
11044 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
11045
fd573f31
PE
110462012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11047
fee5959d
PE
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.
11054
fd573f31
PE
11055 * xfont.c (compare_font_names): Redo to omit the need for casts.
11056
ddadbc0e
AS
110572012-07-06 Andreas Schwab <schwab@linux-m68k.org>
11058
fca8d6b6
AS
11059 * xfns.c (Fx_change_window_property): Doc fix.
11060 * w32fns.c (Fx_change_window_property): Doc fix.
11061
ddadbc0e
AS
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)
11065
ed9265fc 110662012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
11067 Eli Zaretskii <eliz@gnu.org>
11068
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.
11072
216ee680
PE
110732012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11074
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.
11079
bdd091e4
JD
110802012-07-06 Jan Djärv <jan.h.d@swipnet.se>
11081
11082 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
11083 is defined (Bug#11768).
11084
9d44f8ce
DA
110852012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11086
11087 Fix marker debugging code.
11088 * marker.c (byte_char_debug_check): Do not perform the check
11089 if buffer is not multibyte.
090bd7cb
JB
11090 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
11091 Call byte_char_debug_check with correct arguments.
9d44f8ce 11092
90fc4786
DA
110932012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11094
11095 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
11096 * marker.c (byte_char_debug_check, count_markers):
11097 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
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.
11101
7b7ae965
DA
111022012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11103
4e57b342
DA
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.
11112
111132012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11114
11115 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 11116 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 11117 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 11118
657924ff
DA
111192012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11120
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.
11131
041a49a6
DA
111322012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
11133
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.
11139
7dca65a4
PE
111402012-07-06 Paul Eggert <eggert@cs.ucla.edu>
11141
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.
11149
8eb876e2
GM
111502012-07-06 Glenn Morris <rgm@gnu.org>
11151
11152 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
11153
38182d90
PE
111542012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11155
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:
11166 * xterm.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
11175 growing it.
11176 * keyboard.c (apply_modifiers_uncached): Prefer local array to
11177 alloca of a constant.
11178
6dd5a677
EZ
111792012-07-05 Eli Zaretskii <eliz@gnu.org>
11180
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.
11185
6b312f0f
DA
111862012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
11187
11188 * marker.c (set_marker_restricted_both): Simplify by using
11189 clip_to_bounds.
11190
f520ef9b
PE
111912012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11192
11193 * editfns.c (region_limit): Simplify by using clip_to_bounds.
11194
383b7c95
JD
111952012-07-05 Jan Djärv <jan.h.d@swipnet.se>
11196
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).
090bd7cb
JB
11204 (update_theme_scrollbar_width, xg_create_scroll_bar):
11205 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
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.
5293d758 11209 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
11210 with default display (Bug#11768).
11211
d6e7bf45
EZ
112122012-07-05 Eli Zaretskii <eliz@gnu.org>
11213
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)
11218
431391ec
JB
112192012-07-05 Juanma Barranquero <lekktu@gmail.com>
11220
11221 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
11222 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
11223
23f86fce
DA
112242012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
11225
11226 Cleanup xmalloc.
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.
11245 * ccl.c: Likewise.
11246 * coding.c: Likewise.
11247 * composite.c: Likewise.
11248 * doc.c: Likewise.
11249 * doprnt.c: Likewise.
11250 * editfns.c: Likewise.
11251 * emacs.c: Likewise.
11252 * eval.c: Likewise.
11253 * filelock.c: Likewise.
11254 * fns.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.
11270 * w32.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.
11279
0497dc44
PE
112802012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11281
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>.
11285
356e7178
PE
112862012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11287
4e71fd89
PE
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.
11292
f0941253
PE
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>.
11296
065c9eb4
PE
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.
11301
356e7178
PE
11302 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
11303 that causes compilation to fail on pre-C99 compilers.
11304
ed9265fc 113052012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
11306
11307 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
11308 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
11309
3884d954
DA
113102012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11311
d209e2fb 11312 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
11313 headers for buffer_defaults and buffer_local_symbols.
11314 Reported by Juanma Barranquero <lekktu@gmail.com>.
11315
ee28be33
SM
113162012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11317
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.
11336
c7f2cd7f
PE
113372012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11338
11339 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
11340 Tighten new eassert a bit.
11341
8ce70ed2
DA
113422012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11343
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.
11350
dea7f1e5
PE
113512012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11352
24a212eb
PE
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.
11363
dea7f1e5
PE
11364 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
11365
76046526
DA
113662012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11367
11368 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
11369
39adff0d
PE
113702012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11371
63807d47
PE
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.
11375
39adff0d
PE
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.
11383
dbeed9a6
PE
113842012-07-03 Paul Eggert <eggert@cs.ucla.edu>
11385
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.
11390
636334d6
AS
113912012-07-03 Andreas Schwab <schwab@linux-m68k.org>
11392
11393 * fileio.c (Finsert_file_contents): Properly handle st_mtime
11394 marker for non-existing file. (Bug#11852)
11395
e2017fe2
GM
113962012-07-03 Glenn Morris <rgm@gnu.org>
11397
11398 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
11399 and did not make it into globals.h).
11400
404dbd37
TT
114012012-07-03 Tom Tromey <tromey@redhat.com>
11402
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
11408 static.
11409 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
11410 * keyboard.c (Fcommand_execute): No longer static.
11411 Remove EXFUN.
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.
d209e2fb
JB
11417 * doc.c (Fdocumentation_property, Fsnarf_documentation):
11418 No longer static.
404dbd37
TT
11419 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
11420 static.
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.
11424
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.
11438
8e4fd1e1
GM
114392012-07-03 Glenn Morris <rgm@gnu.org>
11440
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)
11444
ca95b3eb
DA
114452012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11446
11447 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
11448 values which aren't power of 2.
14ae4239 11449 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
1f9f395d 11450 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
11451 accordingly.
11452
7555c33f
SM
114532012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
11454
11455 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
11456
11457 * alloc.c (mark_object): Revert part of last patch to use `switch'.
11458
d12e8f5a
DA
114592012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11460
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.
11465
296094c3
DA
114662012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11467
11468 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
11469 is enabled, avoid dereferencing NULL current_sblock if
11470 running undumped.
11471
36429c89
DA
114722012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11473
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.
11491
3b3e4cac
PE
114922012-07-02 Paul Eggert <eggert@cs.ucla.edu>
11493
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.
11498
cf5c0175
DA
114992012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
11500
11501 * alloc.c (mark_buffer): Simplify. Remove prototype.
11502 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 11503 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
11504 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
11505 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 11506
ca26824c
GM
115072012-06-30 Glenn Morris <rgm@gnu.org>
11508
2e4c5312
GM
11509 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
11510
ca26824c
GM
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)
11515
0d23c240
EZ
115162012-06-30 Eli Zaretskii <eliz@gnu.org>
11517
c9240d7a
EZ
11518 * w32proc.c (sys_select): Accept and ignore one more argument.
11519
11520 * w32.c (emacs_gnutls_pull): Call select with one more argument.
11521
0d23c240 11522 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 11523 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
11524
11525 * sysdep.c: Don't include dos.h and dosfns.h.
11526
11527 * process.c (sys_select):
11528 * msdos.c (sys_select): Accept one more argument and ignore it.
11529
11530 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
11531 adapt data types and code to that.
11532
11533 * dosfns.c:
11534 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
11535 which clashes with the gnulib function of the same name.
11536
af5a5a98
AS
115372012-06-30 Andreas Schwab <schwab@linux-m68k.org>
11538
c5e4379c
AS
11539 * font.c (font_style_to_value, font_style_symbolic)
11540 (font_prop_validate_style): Add type checks for values in
11541 font_style_table.
11542
af5a5a98
AS
11543 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
11544 argument.
11545 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
11546 uses.
11547
8d38f461
EZ
115482012-06-29 Eli Zaretskii <eliz@gnu.org>
11549
2e5a6631
EZ
11550 * xdisp.c (try_window_id): Undo last change.
11551
8d38f461
EZ
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.
11562
2af3565e
DA
115632012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11564
11565 * window.h (struct window): Change type of 'fringes_outside_margins'
11566 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 11567 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
11568 Adjust comment.
11569 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
11570 to ptrdiff_t.
11571
c8d3a25c 115722012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 11573
c8d3a25c
GM
11574 * gnutls.c (emacs_gnutls_handshake):
11575 Add QUIT to make the loop interruptible.
57570cd3 11576
c8d3a25c 115772012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 11578
c8d3a25c
GM
11579 * charset.c (init_charset): Make lack of etc/charsets fatal.
11580
3e984ee8
DA
115812012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11582
11583 * editfns.c (region_limit): Fix type mismatch.
11584
ef884f23
DA
115852012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11586
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.
11591
7d7e0027
SM
115922012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
11593
11594 * editfns.c (region_limit): Clip to narrowing (bug#11770).
11595
aa754e6a
PE
115962012-06-28 Paul Eggert <eggert@cs.ucla.edu>
11597
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.
11602
80b00b08
DA
116032012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11604
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.
11613
62b2bcf6
JB
116142012-06-28 Juanma Barranquero <lekktu@gmail.com>
11615
11616 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
11617
45942c7d
DA
116182012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11619
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.
11626
e509cfa6
DA
116272012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11628
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.
11643
a54e2c05
DA
116442012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11645
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.
11653 * fns.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.
11673
1ec4b7b2
SM
116742012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
11675
11676 * fns.c (maybe_resize_hash_table): Output message when growing the
11677 purify-hashtable.
11678
2014308a
DA
116792012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11680
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.
11684
246155eb
DA
116852012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11686
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.
11690
43184b7b
DA
116912012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11692
d209e2fb 11693 * alloc.c (allocate_string): Fix last change.
43184b7b 11694
3fe6dd74
DA
116952012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11696
d209e2fb 11697 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
11698 to memset, add explicit initialization where appropriate.
11699
1ba6038a
GM
117002012-06-27 Glenn Morris <rgm@gnu.org>
11701
11702 * lisp.mk (lisp): Remove paths.elc.
11703
c89926a5
CY
117042012-06-27 Chong Yidong <cyd@gnu.org>
11705
11706 * doc.c (Fsubstitute_command_keys): Fix punctuation.
11707
ed6b3510
JW
117082012-06-26 John Wiegley <johnw@newartisans.com>
11709
1ec4b7b2 11710 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
11711 on Mac OS X Lion: __mod_init_func and __mod_term_func.
11712
ed6b3510
JW
11713 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
11714 when building with Clang.
11715
8edd4a2b
SM
117162012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
11717
11718 * eval.c (Fapply): Allow calling it with a single argument.
11719
f6f62d1b
EZ
117202012-06-26 Eli Zaretskii <eliz@gnu.org>
11721
11722 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
11723 _stricmp and _strnicmp.
11724 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
11725
62efea5e
DA
117262012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11727
11728 * alloc.c (allocate_window): Zero out non-Lisp part of newly
11729 allocated window.
11730 (allocate_process): Likewise for new process.
8edd4a2b 11731 (allocate_terminal): Change to use offsetof.
62efea5e
DA
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.
11738
42997f4d
DA
117392012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11740
11741 * term.c (delete_tty): Remove redundant call to memset.
11742
1130ecfc
DA
117432012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11744
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.
11752
cf38a720
PE
117532012-06-26 Paul Eggert <eggert@cs.ucla.edu>
11754
99027bdd
PE
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.
11774
cf38a720
PE
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.
11779
3511c784
DA
117802012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11781
0a08eb21 11782 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
11783 strcasecmp if available.
11784 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
11785
fb7da12e
AS
117862012-06-25 Andreas Schwab <schwab@linux-m68k.org>
11787
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.
11793
afa2ffd8
DA
117942012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11795
11796 * xfns.c (xic_create_fontsetname): Remove redundant calls
11797 to memset.
11798
b3b4476b
PE
117992012-06-25 Paul Eggert <eggert@cs.ucla.edu>
11800
4495ff38
PE
11801 * gtkutil.c (get_utf8_string): Remove redundant assignment.
11802 sprintf already null-terminates its output.
11803
b3b4476b
PE
11804 * xfns.c (x_window): Remove redundant cast.
11805
b00876c9
DA
118062012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11807
11808 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
11809 `const char *' to `char *' to avoid compiler warning.
11810
d188e26b
PE
118112012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11812
885d1d74
PE
11813 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
11814 instead of truncating it to 63 (admittedly a generous limit).
11815
d188e26b
PE
11816 * process.c: Fix spelling and caps in comments.
11817
e2f560b1
DN
118182012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
11819
e86db54b 11820 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
11821 * sysdep.c (setpgrp): Remove definition, not used in this file.
11822
7583a3a1
JB
118232012-06-24 Juanma Barranquero <lekktu@gmail.com>
11824
11825 * makefile.w32-in: Update dependencies.
11826
696056c2
EZ
118272012-06-24 Eli Zaretskii <eliz@gnu.org>
11828
11829 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
11830 (SYSTIME_H): Add nt/inc/sys/time.h.
11831
11832 * systime.h [WINDOWSNT]: Include sys/time.h.
11833
11834 * s/ms-w32.h (struct timespec): Definition moved from
11835 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11836
845ca893
PE
118372012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11838
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)
11851 (fatal):
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.
11868
f1dd8073
PE
118692012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11870
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>.
11880
b82c1755
EZ
118812012-06-23 Eli Zaretskii <eliz@gnu.org>
11882
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.
11887
ca300656
JB
118882012-06-23 Juanma Barranquero <lekktu@gmail.com>
11889
049ec95b
JB
11890 * makefile.w32-in: Update dependencies.
11891
ca300656
JB
11892 * w32.c (ltime): Add return type and declare static.
11893 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
11894
db7b8d06
PE
118952012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11896
11897 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
11898 Privately reported by Herbert J. Skuhra.
11899 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
11900 All uses changed.
11901 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
11902 not make_lisp_timeval, when the argument is of type EMACS_TIME.
11903
0bd8297f
EZ
119042012-06-23 Eli Zaretskii <eliz@gnu.org>
11905
96512555
EZ
11906 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
11907 last argument of make_unibyte_string.
11908
0bd8297f
EZ
11909 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
11910 language ID in the event parameters.
11911
11912 * w32term.c (w32_read_socket): Put the new keyboard codepage into
11913 event.code, not the obscure "character set ID".
11914
63def6b6
CY
119152012-06-23 Chong Yidong <cyd@gnu.org>
11916
11917 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
11918
e8a02204
EZ
119192012-06-23 Eli Zaretskii <eliz@gnu.org>
11920
388cdec0
EZ
11921 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
11922 * w32.c (fdutimens): New function.
11923
11924 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
11925
11926 * s/ms-w32.h (pselect): Redirect to sys_select.
11927
11928 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
11929
e8a02204
EZ
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.
11933
d054f3fb
PE
119342012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11935
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.
11943
d35af63c
PE
119442012-06-22 Paul Eggert <eggert@cs.ucla.edu>
11945
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.
11951
11952 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
11953 (LIBES): Use it.
11954
11955 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
11956 Don't get current time unless it's needed.
11957
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.
11963
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.
11967
11968 * dired.c: Include stat-time.h.
11969 (Ffile-attributes): File times now have higher resolution.
11970
11971 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
11972 (struct image): Timestamp now has higher resolution.
11973
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.
927c7216 11978 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
11979
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
11984 time stamps.
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
11990 do that.
11991
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.
11999
12000 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
12001
12002 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
12003
12004 * image.c (prepare_image_for_display, clear_image_cache)
12005 (lookup_image): Port to higer-resolution time stamps.
12006
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.
12016
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.
12023
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.
12027
12028 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
12029
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.
12033
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
12037 EMACS_HAS_USECS.
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.
12045
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.
12056
12057 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
12058 provides a substitute now.
12059
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):
12070 New macros.
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.
12083
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.
12087
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.
12091
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
12096 for callers.
12097
12098 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
12099
12100 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
12101 for compatibility with pselect. Support ns-resolution time stamps.
12102
12103 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
12104
12105 * xselect.c (wait_for_property_change, x_get_foreign_selection):
12106 Check for time stamp overflow, and support ns-resolution time stamps.
12107
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.
12113
b6a92dfe
CY
121142012-06-22 Chong Yidong <cyd@gnu.org>
12115
12116 * xdisp.c (x_consider_frame_title): Revert last change.
12117
d251c37c
EZ
121182012-06-22 Eli Zaretskii <eliz@gnu.org>
12119
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.)
12124
f10deafb
PE
121252012-06-20 Paul Eggert <eggert@cs.ucla.edu>
12126
12127 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
12128 Otherwise, the umask might be mistakenly 0 while handling input signals.
12129
ec6de1e2
SM
121302012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
12131
12132 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
12133
28be1ada
DA
121342012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
12135
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
12140 where appropriate.
12141
c6bf3022
CY
121422012-06-19 Chong Yidong <cyd@gnu.org>
12143
12144 * frame.c (delete_frame): When selecting a frame on a different
12145 text terminal, do not alter the terminal's top-frame.
12146
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):
12151 Callers changed.
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.
12155
12156 * term.c (Ftty_top_frame): New function.
12157
defd4196
PE
121582012-06-18 Paul Eggert <eggert@cs.ucla.edu>
12159
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
8b5257e1 12163 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
12164 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
12165 (METER_1, METER_2): Simplify.
12166
1053a871
SM
121672012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
12168
12169 * data.c (Fdefalias): Return `symbol' (bug#11686).
12170
b7e8d081
MR
121712012-06-18 Martin Rudalics <rudalics@gmx.at>
12172
12173 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
12174 gets killed during executing of this function (Bug#11665).
12175 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
12176 (Vkill_buffer_query_functions): In doc-string say that functions
12177 run by this hook should not change the current buffer.
12178
7ea2b339
PE
121792012-06-18 Paul Eggert <eggert@cs.ucla.edu>
12180
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.
12186
96a313a1
CY
121872012-06-17 Chong Yidong <cyd@gnu.org>
12188
12189 * xdisp.c (redisplay_internal): No need to redisplay terminal
12190 frames that are not on top.
12191
20ca2e94
TN
121922012-06-17 Troels Nielsen <bn.troels@gmail.com>
12193
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).
12198
9a900ca9
PE
121992012-06-17 Paul Eggert <eggert@cs.ucla.edu>
12200
310fbfa8
PE
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
12205 its argument.
12206
27bb1ca4
PE
12207 * coding.c (produce_chars): Use ptrdiff_t, not int.
12208
9a900ca9
PE
12209 * xterm.c (x_draw_underwave): Check for integer overflow.
12210 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
12211
41b7f8bc 122122012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
12213
12214 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
12215 referenced (Bug#11583).
12216
9b0e3eba
AA
122172012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
12218
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):
12225 New functions.
12226 (x_draw_glyph_string): Use them.
12227 * xfaces.c (Qline, Qwave): New Lisp objects.
12228 (check_lface_attrs, merge_face_ref)
1053a871
SM
12229 (Finternal_set_lisp_face_attribute, realize_x_face):
12230 Handle wave-style underline face attributes.
9b0e3eba
AA
12231 * xterm.c (x_draw_underwave): New function.
12232 (x_draw_glyph_string): Use it.
12233
0fb52f11
JB
122342012-06-16 Juanma Barranquero <lekktu@gmail.com>
12235
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.
12241
e5560ff7
AS
122422012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12243
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.
12261 * doc.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.
12298 * xml.c: Likewise.
12299 * xselect.c: Likewise.
12300
2f07e6af
EZ
123012012-06-16 Eli Zaretskii <eliz@gnu.org>
12302
1053a871
SM
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
2f07e6af 12305 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
12306 row.
12307 (handle_face_prop): Use chunk-relative overlay string index when
12308 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
12309 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
12310 the rightmost. (Bug#11720)
2f07e6af 12311
29b83cec
AS
123122012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12313
12314 * category.h (CHAR_HAS_CATEGORY): Define as inline.
12315 (CATEGORY_MEMBER): Enforce 1/0 value.
12316 * category.c (_temp_category_set): Remove.
12317
4c5501e9
EZ
123182012-06-16 Eli Zaretskii <eliz@gnu.org>
12319
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)
12323
2b570124
PE
123242012-06-14 Paul Eggert <eggert@cs.ucla.edu>
12325
e93864f9
PE
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.
12329
2b570124
PE
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.
1053a871
SM
12337 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
12338 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
12339 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
12340 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
12341
81755f69
JB
123422012-06-13 Juanma Barranquero <lekktu@gmail.com>
12343
12344 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
12345
16192a57
GM
123462012-06-13 Glenn Morris <rgm@gnu.org>
12347
12348 * s/bsd-common.h (BSD4_3):
12349 * s/usg5-4-common.h (USG5_4): No longer define; unused.
12350
646b5f55
AS
123512012-06-13 Andreas Schwab <schwab@linux-m68k.org>
12352
12353 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
12354 instead of union.
12355 (XLI, XIL): Define.
1053a871
SM
12356 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
12357 Use them.
12358 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 12359 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 12360 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
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.
12373
1d3823c9
GM
123742012-06-13 Glenn Morris <rgm@gnu.org>
12375
c62ff706
GM
12376 * s/usg5-4-common.h, src/s/unixware.h:
12377 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
12378
1d3823c9
GM
12379 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
12380
bfe3e0a2
PE
123812012-06-13 Paul Eggert <eggert@cs.ucla.edu>
12382
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.
12393 All uses changed.
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
12400 within Emacs now.
12401 (LISP_INITIALLY_ZERO): New macro.
12402 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
12403 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
12404
45fa9c0f
GM
124052012-06-12 Glenn Morris <rgm@gnu.org>
12406
b4492cba
GM
12407 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
12408
12409 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 12410
45fa9c0f
GM
12411 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
12412 Move BROKEN_SIGIO to configure.
12413
12414 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
12415 Move NO_TERMIO to configure.
12416
0e25d334
CY
124172012-06-12 Chong Yidong <cyd@gnu.org>
12418
12419 * image.c (imagemagick_load_image): Use MagickFlattenImage if
12420 MagickMergeImageLayers is undefined. Use pixel pusher loop if
12421 MagickExportImagePixels is undefined.
12422
43682bb6
PE
124232012-06-12 Paul Eggert <eggert@cs.ucla.edu>
12424
12425 * image.c (imagemagick_load_image): Remove unused label.
12426
a9be7d2b
GM
124272012-06-11 Glenn Morris <rgm@gnu.org>
12428
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.
12433
3017f87f
SM
124342012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
12435
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.
12439
1b9b4cf4
CY
124402012-06-11 Chong Yidong <cyd@gnu.org>
12441
12442 * image.c (imagemagick_load_image): Implement transparency.
12443
95988fcf
AS
124442012-06-10 Andreas Schwab <schwab@linux-m68k.org>
12445
12446 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
12447 account for preceding backslashes. (Bug#11663)
12448
cd4eb164
CY
124492012-06-09 Chong Yidong <cyd@gnu.org>
12450
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.
12458
12459 * termchar.h (struct tty_display_info): Add field for italics.
12460 Remove unused blink field.
12461
12462 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
12463 Handle slant.
12464
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.
12468
ff88beb8
MA
124692012-06-09 Michael Albinus <michael.albinus@gmx.de>
12470
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.
12475
44286096
CY
124762012-06-09 Chong Yidong <cyd@gnu.org>
12477
1682701f
CY
12478 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
12479
44286096
CY
12480 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
12481 case (Bug#9752).
12482
d86feb17
PE
124832012-06-08 Paul Eggert <eggert@cs.ucla.edu>
12484
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
12488 let-bound!".
12489
d5c20fe8
EZ
124902012-06-08 Eli Zaretskii <eliz@gnu.org>
12491
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.
12496
513749ee
SM
124972012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12498
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.
12502
d4a8f5c1
JB
125032012-06-08 Juanma Barranquero <lekktu@gmail.com>
12504
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).
12507
8bbbc977
EZ
125082012-06-08 Eli Zaretskii <eliz@gnu.org>
12509
12510 * alloc.c (allocate_vectorlike): Fix last change.
12511
f3372c87
DA
125122012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
12513
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'
fc0c31f8 12518 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
12519 mark_maybe_pointer, valid_lisp_object_p) accordingly.
12520 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
f4ad7ea1
JB
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)
f3372c87
DA
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.
513749ee 12528 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
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
fc0c31f8 12532 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
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.
12536
4f18a4ed
SM
125372012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12538
12539 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
12540
86f158bc
PE
125412012-06-07 Paul Eggert <eggert@cs.ucla.edu>
12542
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.
12548
c5cfcbe0
CY
125492012-06-06 Chong Yidong <cyd@gnu.org>
12550
12551 * buffer.c (word_wrap): Doc fix.
12552
c05cf390
PE
125532012-06-04 Paul Eggert <eggert@cs.ucla.edu>
12554
12555 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
12556
0c3461de
GM
125572012-06-03 Glenn Morris <rgm@gnu.org>
12558
12559 * xdisp.c (tool-bar-style): Doc fix.
12560
c71232db
UM
125612012-06-03 Ulrich Müller <ulm@gentoo.org>
12562
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)
12568
383f7350
CY
125692012-06-03 Chong Yidong <cyd@gnu.org>
12570
12571 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
12572 buffer (Bug#11226).
12573
5f2c76c6
CY
125742012-06-03 Chong Yidong <cyd@gnu.org>
12575
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.
12580
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.
12585
773d47f6
PE
125862012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12587
12588 * sysdep.c (system_process_attributes): Improve comment.
12589
f2d6a3df
SM
125902012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
12591
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.
12595
63810350
PE
125962012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12597
7bd5c1f4
PE
12598 * minibuf.c (Fassoc_string): Remove duplicate declaration.
12599
63810350
PE
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.
12603
a2821611
AS
126042012-06-02 Andreas Schwab <schwab@linux-m68k.org>
12605
12606 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
12607 cons_block.
12608
5fceba1d
PE
126092012-06-01 Paul Eggert <eggert@cs.ucla.edu>
12610
12611 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
12612
c98ff5dd
DA
126132012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
12614
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',
1f9f395d 12619 change its type from Lisp_Object to bitfield.
c98ff5dd
DA
12620 Change type of 'force_start', 'optional_new_start',
12621 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 12622 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 12623
ca34e0be
PE
126242012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12625
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.
12631
efc00ab1 126322012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
12633
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)
12638
efc00ab1 126392012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
12640
12641 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
12642
12643 * doc.c (Fsubstitute_command_keys): Doc fix.
12644
efc00ab1 126452012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
12646
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
12650 in bug#11519.
12651
efc00ab1 126522012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
12653
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
12657 pointers.
12658
12659 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
12660 decrement the inhibition flag, instead of just setting or
12661 resetting it.
12662
ba93a187
PE
126632012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12664
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".
12673
9e4bf381
PE
126742012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12675
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
12686 and not pointers.
12687 * lisp.h (__executable_start): New decl.
12688
32d72c2f
GM
126892012-05-31 Glenn Morris <rgm@gnu.org>
12690
12691 * image.c (Fimagemagick_types): Doc fix.
12692
baac5bc7
JM
126932012-05-30 Jim Meyering <meyering@redhat.com>
12694
12695 * callproc.c (Fcall_process_region): Include directory component
12696 in mkstemp error message (Bug#11586).
12697
72cb32cf
PE
126982012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12699
12700 * alloc.c, lisp.h (make_pure_vector): Now static.
12701
61b108cc
SM
127022012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
12703
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.
12711
471fe23d
TN
127122012-05-29 Troels Nielsen <bn.troels@gmail.com>
12713
934f3f58 12714 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
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.
12720
85d0efd1
EZ
127212012-05-28 Eli Zaretskii <eliz@gnu.org>
12722
12723 * w32term.c (my_bring_window_to_top): New function.
12724 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
12725 could be different from the original one.
12726 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
12727 (Bug#11513)
12728
12729 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
12730 by calling BringWindowToTop.
12731
12732 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
12733 (WM_EMACS_END): Increase by one.
12734
da92a98c
PE
127352012-05-28 Paul Eggert <eggert@cs.ucla.edu>
12736
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.
12740
74d1f848
JB
127412012-05-28 Juanma Barranquero <lekktu@gmail.com>
12742
12743 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
12744 Update dependencies.
12745
9e1a06fc
EZ
127462012-05-27 Eli Zaretskii <eliz@gnu.org>
12747
12748 * bidi.c (bidi_mirror_char): Fix last change.
12749
f3dd7312
AS
127502012-05-27 Andreas Schwab <schwab@linux-m68k.org>
12751
12752 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
12753 when referring to sectname field in printf format.
12754
81899c91
PE
127552012-05-27 Paul Eggert <eggert@cs.ucla.edu>
12756
57b81a9f
PE
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.
12760
81899c91
PE
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
12763 eassert. See
12764 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
12765
33017faf 127662012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
12767
12768 * callproc.c (Fcall_process): Restore a line that was accidentally
12769 commented out in the 2011-02-13 change (bug#11547).
12770
33017faf 127712012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
12772
12773 * lisp.h [REL_ALLOC]: Add prototypes for external functions
12774 defined on ralloc.c.
12775
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.
12779
12780 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
12781
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)
12785
23415acf
EZ
12786 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
12787 Update value to 24.
12788
44e27368
EZ
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
12792 entire line.
12793 (pos_visible_p): Revert the comparison against bottom_y to what it
12794 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
12795 (Bug#11464)
12796
c1892f11
PE
127972012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12798
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.
12809
eb7afdad
GM
128102012-05-26 Glenn Morris <rgm@gnu.org>
12811
12812 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
12813
f12fdf02
EZ
128142012-05-26 Eli Zaretskii <eliz@gnu.org>
12815
53a63be6 12816 Extend mouse support on W32 text-mode console.
61b108cc
SM
12817 * xdisp.c (draw_row_with_mouse_face):
12818 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 12819
eb3f6f01 12820 * w32console.c: Include window.h.
61b108cc
SM
12821 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
12822 New functions.
eb3f6f01
EZ
12823 (initialize_w32_display): Initialize mouse-highlight data.
12824
53a63be6
EZ
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
12830 highlight info.
12831
4cfd81f6
PE
128322012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12833
12834 * lread.c (read1): Simplify slightly to avoid an overflow warning
12835 with GCC 4.7.0 on x86-64.
12836
4446092a
EZ
128372012-05-26 Eli Zaretskii <eliz@gnu.org>
12838
12839 * bidi.c (bidi_mirror_char): Revert last change: an int is
12840 definitely wide enough here.
12841
42b2a986 128422012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 12843
42b2a986 12844 Fix integer width and related bugs (Bug#9874).
eb106a49 12845 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
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)
12853 (mark_vectorlike):
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.
977b0e45
PE
12879 (validate_region): Omit unnecessary test for b <= e,
12880 since that's guaranteed by the previous test.
d311d28c
PE
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.
02481186 12888 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
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.
39b5db3b
PE
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.
d311d28c
PE
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
45c2afd6 12915 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
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.
12920 (ccl_driver):
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.
c801946a
PE
12923 (ccl_driver, Fregister_code_conversion_map):
12924 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
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.
a14e1568 12945 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
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):
3c7649c1 12953 Don't assume fixnum fits in int.
d311d28c
PE
12954 (load_charset_map_from_vector, Fmap_charset_chars):
12955 Remove now-unnecessary CHECK_NATNUMs.
12956 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
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
12963 to INT_MAX.
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.
60ad3eab
PE
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.
d311d28c
PE
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.
c96e5d6a 12982 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
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)
8f50130c 12989 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
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)
8f50130c
PE
13009 (Fdefine_coding_system_internal)
13010 (coding_set_source, coding_set_destination):
d311d28c
PE
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)
5895d7b9 13016 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
13017 (Funencodable_char_position, Fcheck_coding_systems_region)
13018 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 13019 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 13020 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 13021 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 13022 Don't access memory outside of the args array.
d311d28c 13023 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
13024 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
13025 result of ENCODE_CHAR.
d311d28c
PE
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.
13047 (Faref, Faset):
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.
42b2a986 13054 (extract_signed, extract_unsigned): New functions.
243e0530
PE
13055 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
13056 (xd_get_connection_references): Return ptrdiff_t, not int.
13057 All uses changed.
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.
d311d28c
PE
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)
13071 (struct 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.
54e1617f 13079 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
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.
13087 (get_doc_string):
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.
3f4eabd1
PE
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.
c8d5c857
PE
13118 (Fformat_time_string): Remove now-unnecessary check.
13119 lisp_time_argument checks for out-of-range usec now.
243e0530 13120 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
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.
856bbc81 13139 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
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.
125b3835 13153 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
13154 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
13155 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
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.
13170 (Frequire):
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
13197 integer overflow.
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.
d311d28c
PE
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.
5895d7b9 13232 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
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):
13243 (Fcompute_motion):
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.
13251 (struct position):
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;
13255 all uses removed.
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.
13285 (struct interval):
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.
d311d28c
PE
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.
6efdadfd 13346 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
13347 (read_filtered_event): Use duration_to_sec_usec
13348 to do proper overflow checking on durations.
d311d28c
PE
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.
61b108cc 13360 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
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
13391 wide enough.
17fdb222 13392 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
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)
13398 (print_object):
13399 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13400 (PRINTDECLARE):
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.
d311d28c 13404 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 13405 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
13406 (print_error_message): Use SAFE_ALLOCA, not alloca.
13407 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
13408 (print_depth, new_backquote_output, print_number_index):
13409 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
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)
d44287d4 13413 (sigchld_handler):
d311d28c 13414 Check that fixnums are in proper range for system types.
d44287d4 13415 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
13416 Check for process-ids out of pid_t range rather than relying on
13417 undefined behavior.
e4d81efc 13418 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
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.
dde14581
PE
13428 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
13429 Don't assume pid_t fits in int.
02481186
PE
13430 * process.h (struct Lisp_Process): Members tick and update_tick
13431 are now of type EMACS_INT, not int.
b62b53e8
PE
13432 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
13433 configured --with-wide-int.
d311d28c
PE
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):
13442 (Freplace_match):
13443 (Fmatch_data):
13444 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13445 (string_match_1, search_buffer, set_search_regs):
13446 (Fmatch_data):
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.
eacd378d 13457 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
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.
13472 (Fforward_word):
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.
e4ecdc9c
PE
13480 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
13481 MOST_POSITIVE_FIXNUM.
d311d28c
PE
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.
225a2cff
PE
13487 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
13488 and double all fit in int.
d311d28c
PE
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.
5895d7b9
PE
13503 (copy_text_properties):
13504 Check for integer overflow in index calculation.
d311d28c
PE
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)
5895d7b9 13522 (Fscroll_other_window, Frecenter):
d311d28c
PE
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)
5895d7b9
PE
13533 (face_before_or_after_it_pos, handle_invisible_prop)
13534 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
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)
5895d7b9
PE
13573 (redisplay_window, dump_glyph_row, display_mode_line)
13574 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 13575 (handle_display_spec, display_prop_string_p):
d311d28c
PE
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.
13601 (Fx_family_fonts):
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)
13611 (Fx_show_tip):
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.
13643
c6574eb5
GM
136442012-05-25 Glenn Morris <rgm@gnu.org>
13645
13646 * lisp.mk (lisp): Update for more files being compiled now.
13647
e8d32c7e
SM
136482012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
13649
48def666
SM
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.
13656
e8d32c7e
SM
13657 * fileio.c, character.h: Minor style tweaks.
13658
4b2addb7
DA
136592012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
13660
13661 * window.h (clip_changed): Remove useless declaration.
13662
584461b2
JB
136632012-05-22 Juanma Barranquero <lekktu@gmail.com>
13664
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.
13667
34374650
PE
136682012-05-22 Paul Eggert <eggert@cs.ucla.edu>
13669
13670 Remove src/m/*.
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.
13689 (VALMASK): Use it.
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.
13699
261cb4bb
PE
137002012-05-21 Paul Eggert <eggert@cs.ucla.edu>
13701
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)
13705 (xrealloc):
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.
13714
ff23cd9f
KB
137152012-05-21 Ken Brown <kbrown@cornell.edu>
13716
13717 * xgselect.c (xg_select): Fix first argument in call to 'select'
13718 (bug#11508).
13719
1b170bc6
KB
137202012-05-20 Ken Brown <kbrown@cornell.edu>
13721
13722 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 13723 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 13724
b2f4d39f
KB
137252012-05-19 Ken Brown <kbrown@cornell.edu>
13726
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).
13732
003fdae2
PE
137332012-05-19 Paul Eggert <eggert@cs.ucla.edu>
13734
9232a6d9
PE
13735 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
13736
003fdae2
PE
13737 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
13738 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
13739
784b56e2
EZ
137402012-05-18 Eli Zaretskii <eliz@gnu.org>
13741
13742 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
13743
13744 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 13745 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
13746
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.
13750
a0a79cde
JL
137512012-05-17 Juri Linkov <juri@jurta.org>
13752
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).
13757
b0572523
PE
137582012-05-16 Paul Eggert <eggert@cs.ucla.edu>
13759
13760 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
13761
9660f5fc
SM
137622012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
13763
13764 * lread.c (init_obarray): Declare Qt and Qnil as special.
13765
4374de83
GM
137662012-05-14 Glenn Morris <rgm@gnu.org>
13767
13768 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 13769 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 13770
dc44c39a
PE
137712012-05-14 Paul Eggert <eggert@cs.ucla.edu>
13772
078c97cb
PE
13773 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
13774
dc44c39a
PE
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.
13780
e18afed7 137812012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
13782
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)
c8fb9dc6
EZ
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)
ac268e67 13800
e18afed7 138012012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
13802
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
61b108cc
SM
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,
82f9b393
EZ
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
13809 are on a TTY.
13810
e18afed7 138112012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
13812
13813 * unexaix.c (make_hdr): Fix typo in prototype.
13814 This bug broke the build on AIX. Problem reported by Gilles Pion.
13815
9d0a235a
MA
138162012-05-14 Michael Albinus <michael.albinus@gmx.de>
13817
13818 * keyboard.c (kbd_buffer_get_event): Read special events also in
13819 batch mode. (Bug#11415)
13820
9e6b06ed
GM
138212012-05-12 Glenn Morris <rgm@gnu.org>
13822
13823 * ns.mk: Update for ns_appbindir no longer having trailing "/".
13824
c1a1d7a3
EZ
138252012-05-12 Eli Zaretskii <eliz@gnu.org>
13826
13827 * lisp.mk (lisp): Add newcomment.elc.
13828
3fe7cdc8
GM
138292012-05-12 Glenn Morris <rgm@gnu.org>
13830
13831 * Makefile.in (MKDIR_P): New, set by configure.
13832 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
13833
53f7d2c0
PE
138342012-05-11 Paul Eggert <eggert@cs.ucla.edu>
13835
13836 Remove unused function hourglass_started.
13837 * dispextern.h (hourglass_started):
13838 * w32fns.c (hourglass_started):
13839 * xdisp.c (hourglass_started): Remove.
13840
75aafb17
JB
138412012-05-10 Juanma Barranquero <lekktu@gmail.com>
13842
13843 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
13844 Update dependencies.
13845
12959e8e
PE
138462012-05-10 Paul Eggert <eggert@cs.ucla.edu>
13847
97107e2e
PE
13848 * xgselect.c (xg_select): Put maxfds+1 into a var.
13849 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
13850
12959e8e
PE
13851 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
13852
836d29b3
DA
138532012-05-10 Dave Abrahams <dave@boostpro.com>
13854
13855 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
13856 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
13857
5cb67954
MA
138582012-05-09 Michael Albinus <michael.albinus@gmx.de>
13859
13860 * dbusbind.c (xd_registered_buses): New internal Lisp object.
cccaebd2 13861 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
5cb67954
MA
13862 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
13863 Initialize xd_registered_buses.
13864
3478ec45
PE
138652012-05-09 Paul Eggert <eggert@cs.ucla.edu>
13866
b263a6b0
PE
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.
13880
3478ec45
PE
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
13884 dbus_uint32_t.
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.
13888
666b903b 138892012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
13890
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.
13896
b120cc17
JC
138972012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
13898
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
13901 message to clear.
13902 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 13903 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 13904
9a4b36f8
MA
139052012-05-07 Michael Albinus <michael.albinus@gmx.de>
13906
13907 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
13908 batch mode.
13909
e5f9458f
CY
139102012-05-06 Chong Yidong <cyd@gnu.org>
13911
13912 * lisp.mk (lisp): Update.
13913
eceeb5fc 139142012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
13915
13916 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
13917
71873e2b
SM
139182012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
13919
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.
13927
ab0fa4e4
PE
139282012-05-03 Paul Eggert <eggert@cs.ucla.edu>
13929
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.
13935
7ed806a7
PE
139362012-05-02 Paul Eggert <eggert@cs.ucla.edu>
13937
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 **,
71873e2b
SM
13949 so that the struct tm is saved in the critical section.
13950 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
13951 motivated by the fact that memory allocation needs to be outside
13952 the critical section.
13953
0c16dfed
DA
139542012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
13955
13956 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
13957 with RESET_INTERVAL.
13958
13959 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
13960 Remove duplicated buffer name initialization.
13961
3f83ace8
JM
139622012-05-02 Jim Meyering <jim@meyering.net>
13963
13964 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
13965
c7b8541e
JM
13966 * xfns.c (x_window): Use xstrdup (Bug#11375).
13967
90207a15 139682012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
13969
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)
13974
b593d6a9
AH
139752012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
13976
13977 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
13978 Move to simple.el.
13979
4737362e
GM
139802012-05-01 Glenn Morris <rgm@gnu.org>
13981
99cf43f9
GM
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.
13986
9311dcff
GM
13987 * dispnew.c: Remove HAVE_LIBNCURSES test;
13988 it is always true on relevant platforms.
13989
4d5c6349
GM
13990 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
13991 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
13992
4737362e
GM
13993 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
13994
74dd3a6b
AS
139952012-04-30 Andreas Schwab <schwab@linux-m68k.org>
13996
13997 * .gdbinit (xpr): Remove checks for no longer existing misc types.
13998 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
13999 Remove.
14000
13c379ee
PE
140012012-04-28 Paul Eggert <eggert@cs.ucla.edu>
14002
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.
14009
a8e7d6d7 140102012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
14011
14012 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
14013
a8e7d6d7 140142012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
14015
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.
14020
14021 * window.c (window_scroll_pixel_based): Likewise.
14022
a8e7d6d7 140232012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
14024
14025 * keymap.c (where_is_internal): Doc fix (Bug#10872).
14026
a8e7d6d7 140272012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
14028
14029 * fileio.c (Fcopy_file, Fset_file_selinux_context):
14030 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
14031
a8e7d6d7 140322012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 14033
b593d6a9
AH
14034 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
14035 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 14036
1c6900d9
EZ
140372012-04-26 Eli Zaretskii <eliz@gnu.org>
14038
4c3fa1d9
EZ
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)
14042
1c6900d9
EZ
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.
14047
42bf8205
AS
140482012-04-24 Andreas Schwab <schwab@linux-m68k.org>
14049
14050 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
14051 (xgetint): Add missing shift for LSB tags.
14052
b1bac16e
MR
140532012-04-24 Martin Rudalics <rudalics@gmx.at>
14054
14055 * keyboard.c (read_char): Don't wipe echo area for select window
14056 events: These might get delayed via `mouse-autoselect-window'
14057 (Bug#11304).
14058
d69621cc
JB
140592012-04-24 Juanma Barranquero <lekktu@gmail.com>
14060
14061 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
14062 manipulation of :loaded-from data.
14063
02fd101b
JB
140642012-04-23 Juanma Barranquero <lekktu@gmail.com>
14065
14066 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
14067 now a cons (bug#11311).
14068
888bec30
PE
140692012-04-23 Paul Eggert <eggert@cs.ucla.edu>
14070
89a438bd
PE
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.
14078
1068fe4d
PE
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.
14093
888bec30
PE
14094 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
14095 Problem reported by Juanma Barranquero for Windows -Wunused-function.
14096
de85e130
PE
140972012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14098
d0baac98 14099 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 14100 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
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.
14125
de85e130
PE
14126 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
14127
dcbf5805
MA
141282012-04-22 Michael Albinus <michael.albinus@gmx.de>
14129
14130 Move functions from C to Lisp. Make non-blocking method calls
14131 the default. Implement further D-Bus standard interfaces.
14132
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.
b593d6a9
AH
14151 (xd_get_connection_address): Rename from xd_initialize.
14152 Return cached address.
dcbf5805
MA
14153 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
14154 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
14155 level.
14156 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 14157 Return number of refcounts.
dcbf5805
MA
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.
b593d6a9
AH
14170 (Vdbus_registered_buses, Vdbus_registered_objects_table):
14171 Adapt docstring.
dcbf5805 14172
52828e02
PE
141732012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14174
da05bc4c
PE
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'.
14178
52828e02
PE
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
14183 is defined.
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.
14187
f01769f9
LL
141882012-04-22 Leo Liu <sdl.web@gmail.com>
14189
14190 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
14191
5790543d
PE
141922012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14193
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'.
14198
b91b7e4d
EW
141992012-04-21 Eduard Wiebe <usenet@pusto.de>
14200
b593d6a9
AH
14201 * sysdep.c (list_system_processes, system_process_attributes):
14202 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 14203
6114eb15
AS
142042012-04-21 Andreas Schwab <schwab@linux-m68k.org>
14205
14206 * lisp.mk (lisp): Update.
14207
2f38dff7
PE
142082012-04-20 Paul Eggert <eggert@cs.ucla.edu>
14209
14210 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
14211 It is never used otherwise.
14212
4ae29f89
SM
142132012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
14214
14215 * print.c (print_preprocess): Only check print_depth if print-circle
14216 is nil.
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.
14219
f30d612a
CY
142202012-04-20 Chong Yidong <cyd@gnu.org>
14221
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.
14224
c07a4c0b 142252012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
14226
14227 * process.c (Fset_process_inherit_coding_system_flag)
14228 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 14229 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 14230
c07a4c0b 142312012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
14232
14233 * xdisp.c (string_buffer_position_lim): Limit starting position to
14234 BEGV.
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
4ae29f89
SM
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
20a68157
EZ
14240 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
14241
c07a4c0b 142422012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 14243
4ae29f89
SM
14244 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
14245 (bug#11238).
ad3a2b41 14246
c07a4c0b 142472012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 142482012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
14249
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.
14260
aba027e8
PE
142612012-04-17 Paul Eggert <eggert@cs.ucla.edu>
14262
14263 * dired.c (Fsystem_groups): Remove unused local.
14264
e5a36063
GM
142652012-04-17 Glenn Morris <rgm@gnu.org>
14266
14267 * dired.c (Fsystem_users): Doc fix.
14268
316411f0
DA
142692012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
14270
14271 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
14272 (syms_of_dired): Add them.
14273
9426aba4
PE
142742012-04-16 Paul Eggert <eggert@cs.ucla.edu>
14275
b62a57be
PE
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.
4b5afbb0 14284 Remove one incorrect comment and fix another.
b62a57be 14285
3539f31f
PE
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.
14291
a041960a
PE
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!".
14300
9426aba4
PE
14301 * alloc.c (which_symbols): Fix alignment issue / type clash.
14302
d55c12ed
AS
143032012-04-15 Andreas Schwab <schwab@linux-m68k.org>
14304
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.
4ae29f89 14314 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 14315
b948ce8b
PE
143162012-04-14 Paul Eggert <eggert@cs.ucla.edu>
14317
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.
14327
35dc09a1 143282012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 14329
35dc09a1
GM
14330 * lread.c (lisp_file_lexically_bound_p):
14331 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 14332
35dc09a1
GM
143332012-04-14 Eli Zaretskii <eliz@gnu.org>
14334
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)
14337
143382012-04-14 Jan Djärv <jan.h.d@swipnet.se>
14339
14340 * nsterm.m (constrainFrameRect): Always constrain when there is only
14341 one screen (Bug#10962).
14342
bcd86815
KB
143432012-04-13 Ken Brown <kbrown@cornell.edu>
14344
14345 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
14346
c25df26e
RT
143472012-04-13 Reuben Thomas <rrt@sc3d.org>
14348
14349 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
14350
0fc59f1e
DC
143512012-04-11 Daniel Colascione <dancol@dancol.org>
14352
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).
14356
de8c03dc
SM
143572012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14358
14359 * window.c (save_window_save): Obey window-point-insertion-type.
14360
2f097256
GM
143612012-04-11 Glenn Morris <rgm@gnu.org>
14362
14363 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
14364
453b951e
SM
143652012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14366
14367 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
14368
75f1671a 143692012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
14370
14371 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
14372 (force_quit_count): New var.
14373 (handle_interrupt): Use it.
14374
2a8ce227
JB
143752012-04-10 Juanma Barranquero <lekktu@gmail.com>
14376
14377 * w32.c (w32_delayed_load): Record the full path of the library
14378 being loaded (bug#10424).
14379
935396c0
GM
143802012-04-09 Glenn Morris <rgm@gnu.org>
14381
05920a43
GM
14382 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
14383 not just in the obarray, before snarfing them. (Bug#11036)
14384
935396c0
GM
14385 * Makefile.in ($(leimdir)/leim-list.el):
14386 Pass EMACS rather than BUILT_EMACS.
14387
a18ecafa
TZ
143882012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
14389
14390 * process.c (make_process):
14391 * process.h: Add integer `gnutls_handshakes_tried' member to
14392 process struct.
14393
6bbef4e5
JC
14394 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
14395 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
14396
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).
14402
b4d3bc10
CY
144032012-04-09 Chong Yidong <cyd@gnu.org>
14404
14405 * eval.c (Fuser_variable_p, user_variable_p_eh)
14406 (lisp_indirect_variable): Functions deleted.
14407 (Fdefvar): Caller changed.
14408
14409 * callint.c (Finteractive, Fcall_interactively):
14410 * minibuf.c (Fread_variable): Callers changed.
14411
70f4d973
EZ
144122012-04-09 Eli Zaretskii <eliz@gnu.org>
14413
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)
14419
cb3c2e3e
PE
144202012-04-09 Paul Eggert <eggert@cs.ucla.edu>
14421
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.
14426
fd06db5d
GM
144272012-04-09 Glenn Morris <rgm@gnu.org>
14428
50fe702a
GM
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.
14434
fd06db5d
GM
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.
14438
55c131ee
AS
144392012-04-08 Andreas Schwab <schwab@linux-m68k.org>
14440
14441 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
14442 proper alignment.
14443
9209588f
JB
144442012-04-07 Juanma Barranquero <lekktu@gmail.com>
14445
14446 * xml.c (init_libxml2_functions) [WINDOWSNT]:
14447 Remove unused local variable.
14448
e3fb2efb
PE
144492012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14450
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.
14457
b5385551
PE
144582012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14459
14460 Fix typo that broke non-Windows builds.
14461 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
14462
9078ead6
EZ
144632012-04-07 Eli Zaretskii <eliz@gnu.org>
14464
14465 Support building on MS-Windows with libxml2.
14466
14467 * makefile.w32-in (OBJ2): Add xml.$(O).
14468 (GLOBAL_SOURCES): Add xml.c.
14469 ($(BLD)/xml.$(O)): New dependency list.
14470
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
14480 linked in).
6bbef4e5
JC
14481 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
14482 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
14483 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
14484
14485 * emacs.c: Don't include libxml/parser.h.
14486 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
14487 xmlCleanupParser directly.
14488
14489 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
14490
3811fdf3
EZ
144912012-04-07 Eli Zaretskii <eliz@gnu.org>
14492
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)
14496
2f8e16b2
EZ
144972012-04-06 Eli Zaretskii <eliz@gnu.org>
14498
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.
14505
3d439cd1
CY
145062012-04-04 Chong Yidong <cyd@gnu.org>
14507
14508 * keyboard.c (Vdelayed_warnings_list): Doc fix.
14509
8bc53d00
EZ
145102012-04-01 Eli Zaretskii <eliz@gnu.org>
14511
14512 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
14513 instead of alloca. (Bug#11138)
14514
3b0512a3
AS
145152012-04-01 Andreas Schwab <schwab@linux-m68k.org>
14516
14517 * w32menu.c (is_simple_dialog): Properly check lisp types.
14518 (Bug#11141)
14519
8427ddd2
EZ
145202012-03-31 Eli Zaretskii <eliz@gnu.org>
14521
979022ef
EZ
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)
14526
a6b1c7cc
EZ
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)
14530
8427ddd2
EZ
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
14534 the row's glyphs.
697ba24b
EZ
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.
14538 (Bug#11063)
8427ddd2 14539
65a0a738
EZ
145402012-03-30 Eli Zaretskii <eliz@gnu.org>
14541
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)
14548
581355cc
EZ
145492012-03-29 Eli Zaretskii <eliz@gnu.org>
14550
14551 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
14552
e8fc049f
SM
145532012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
14554
14555 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
14556
4fb9a543
GM
145572012-03-27 Glenn Morris <rgm@gnu.org>
14558
14559 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
14560 Doc fixes.
14561
679910f1
KH
145622012-03-26 Kenichi Handa <handa@m17n.org>
14563
14564 * dispextern.h (struct glyph): Fix previous change. Change the
14565 bit length of glyphless.ch to 25 (Bug#11082).
14566
90d49b7f
CY
145672012-03-26 Chong Yidong <cyd@gnu.org>
14568
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).
14572
f514f6f0
FP
145732012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
14574
e8fc049f 14575 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 14576
bf43fa51
KH
145772012-03-25 Kenichi Handa <handa@m17n.org>
14578
14579 * dispextern.h (struct glyph): Change the bit length of
14580 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
14581
8a0c01dd
EZ
145822012-03-24 Eli Zaretskii <eliz@gnu.org>
14583
14584 * s/ms-w32.h (tzname): Include time.h before redirecting to
14585 _tzname. Fixes the MSVC build. (Bug#9960)
14586
7d1c3a76
AS
145872012-03-24 Andreas Schwab <schwab@linux-m68k.org>
14588
8ed79523
AS
14589 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
14590 characters.
14591
7d1c3a76
AS
14592 * xterm.c (XTread_socket): Only modify handling_signal if
14593 !SYNC_INPUT. (Bug#11080)
14594
e99a9b8b
EZ
145952012-03-23 Eli Zaretskii <eliz@gnu.org>
14596
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)
14602
5063c0e1
TN
146032012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
14604
14605 * process.c (wait_reading_process_output): Handle pty disconnect
14606 by refraining from sending oneself a SIGCHLD (bug#10933).
14607
9f851fbd
CY
146082012-03-22 Chong Yidong <cyd@gnu.org>
14609
14610 * dispextern.h (struct it): New member string_from_prefix_prop_p.
14611
5063c0e1 14612 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
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.
14616
fb5b8aca
CY
146172012-03-21 Chong Yidong <cyd@gnu.org>
14618
14619 * xfaces.c (Vface_remapping_alist): Doc fix.
14620
62356a1b
EZ
146212012-03-20 Eli Zaretskii <eliz@gnu.org>
14622
14623 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
14624 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
14625 Doc fixes.
62356a1b 14626
025de85b
CY
146272012-03-20 Chong Yidong <cyd@gnu.org>
14628
14629 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
14630 to reflect default non-nil value of redisplay-dont-pause.
14631
4827f94e
KH
146322012-03-19 Kenichi Handa <handa@m17n.org>
14633
14634 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
14635 it fit in a valid range (Bug#11003).
14636
e50a24a2
EZ
146372012-03-18 Eli Zaretskii <eliz@gnu.org>
14638
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)
14644
9af5ed87
PE
146452012-03-12 Paul Eggert <eggert@cs.ucla.edu>
14646
14647 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
14648
d1f55f16
CY
146492012-03-12 Chong Yidong <cyd@gnu.org>
14650
14651 * eval.c (inhibit_lisp_code): Rename from
14652 inhibit_window_configuration_change_hook; move from window.c.
14653
14654 * xfns.c (unwind_create_frame_1, Fx_create_frame):
14655 * window.c (run_window_configuration_change_hook)
14656 (syms_of_window): Callers changed.
14657
66c5eebd
CY
146582012-03-11 Chong Yidong <cyd@gnu.org>
14659
413df973
CY
14660 * keymap.c (Fkey_description): Doc fix (Bug#9700).
14661
66c5eebd
CY
14662 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
14663
1de11f56
CY
146642012-03-10 Chong Yidong <cyd@gnu.org>
14665
14666 * frame.c (other_visible_frames): Don't assume the selected frame
14667 is visible (Bug#10955).
14668
cae07000
SM
146692012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
14670
14671 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
14672
89c94350
JD
146732012-03-08 Jan Djärv <jan.h.d@swipnet.se>
14674
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
14677 zero (Bug#10954).
14678
999dd333
GM
146792012-03-03 Glenn Morris <rgm@gnu.org>
14680
01a6dcc8 14681 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 14682
de0100f2
EZ
146832012-03-02 Eli Zaretskii <eliz@gnu.org>
14684
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)
b8456c5c
EZ
14687 (redisplay_window, next_element_from_string): Fix typos in
14688 comments.
3e441275
EZ
14689 (redisplay_window): Pass to move_it_vertically the margin in
14690 pixels, not in screen lines.
de0100f2 14691
96a72ee9
GM
146922012-03-02 Glenn Morris <rgm@gnu.org>
14693
14694 * buffer.c (buffer-list-update-hook): Doc fix.
14695
312508d7
EZ
146962012-02-29 Eli Zaretskii <eliz@gnu.org>
14697
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)
14703
27f3c637
PE
147042012-02-25 Paul Eggert <eggert@cs.ucla.edu>
14705
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.
14714
3c9dfce6
CY
147152012-02-25 Chong Yidong <cyd@gnu.org>
14716
fa74b241
CY
14717 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
14718 Doc fix.
14719
3c9dfce6
CY
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.
14723
9486df08
CY
147242012-02-24 Chong Yidong <cyd@gnu.org>
14725
14726 * keyboard.c (process_special_events): Handle all X selection
14727 requests in kbd_buffer, not just the next one (Bug#8869).
14728
f01d3321
CY
147292012-02-23 Chong Yidong <cyd@gnu.org>
14730
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.
14734
14735 * window.c (inhibit_window_configuration_change_hook): New var.
14736 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 14737 (syms_of_window): Initialize it.
f01d3321 14738
86b847b6
CY
147392012-02-22 Chong Yidong <cyd@gnu.org>
14740
14741 * xterm.c (x_draw_image_relief): Add missing type check for
14742 Vtool_bar_button_margin (Bug#10743).
14743
a59225b1
CY
147442012-02-21 Chong Yidong <cyd@gnu.org>
14745
14746 * fileio.c (Vfile_name_handler_alist): Doc fix.
14747
14748 * buffer.c (Fget_file_buffer): Protect against invalid file
14749 handler return value.
14750
310f5bd4
PE
147512012-02-20 Paul Eggert <eggert@cs.ucla.edu>
14752
cb3a28cc
PE
14753 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
14754 when computing $valmask.
14755
310f5bd4
PE
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.
14767
2375c96a
CY
147682012-02-19 Chong Yidong <cyd@gnu.org>
14769
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).
14775
3eb49e71
EZ
147762012-02-18 Eli Zaretskii <eliz@gnu.org>
14777
14778 * .gdbinit (pitx): Fix incorrect references to fields of the
14779 iterator stack.
14780
7b926f3f
CY
147812012-02-17 Chong Yidong <cyd@gnu.org>
14782
14783 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
14784
11273115
PE
147852012-02-15 Paul Eggert <eggert@cs.ucla.edu>
14786
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>.
14789
c3a70e2b
CY
147902012-02-15 Chong Yidong <cyd@gnu.org>
14791
14792 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
14793 marked as special. Also, starting docstrings with * is obsolete.
14794
0ca43699
AS
147952012-02-13 Andreas Schwab <schwab@linux-m68k.org>
14796
14797 * gnutls.c (emacs_gnutls_write): Fix last change.
14798
2e8f3c56
LI
147992012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
14800
14801 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
14802 send_process.
14803
af70074f
SM
148042012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
14805
14806 * keymap.c (Fsingle_key_description): Handle char ranges.
14807
95986d52
CY
148082012-02-12 Chong Yidong <cyd@gnu.org>
14809
afd83bd1
CY
14810 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
14811 as that creates a dangerous corner case.
14812
95986d52
CY
14813 * window.c (Fdelete_window_internal): Invalidate the mouse
14814 highlight (Bug#9904).
14815
bd7da63e
GM
148162012-02-12 Glenn Morris <rgm@gnu.org>
14817
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.
14825
77abcbc2
LI
148262012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
14827
14828 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
14829
90b671e2
EZ
148302012-02-11 Eli Zaretskii <eliz@gnu.org>
14831
1c0ca0b7
EZ
14832 * w32select.c (Fx_selection_exists_p): Sync doc string and
14833 argument list with xselect.c. (Bug#10783)
14834
14835 * w16select.c (Fx_selection_exists_p): Sync doc string and
14836 argument list with xselect.c. (Bug#10783)
90b671e2 14837
49241268
GM
148382012-02-10 Glenn Morris <rgm@gnu.org>
14839
14840 * fns.c (Fsecure_hash): Doc fix.
14841
f998bbe7 148422012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
14843
14844 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
14845
0992bd9c
CY
148462012-02-07 Chong Yidong <cyd@gnu.org>
14847
14848 * buffer.c (Fbuffer_local_variables)
14849 (buffer_lisp_local_variables): Handle unbound vars correctly;
14850 don't let Qunbound leak into Lisp.
14851
af008560
GM
148522012-02-07 Glenn Morris <rgm@gnu.org>
14853
dd605cc4
GM
14854 * image.c (Fimagemagick_types): Doc fix.
14855
af008560
GM
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.
14859
1449fa1d
CY
148602012-02-06 Chong Yidong <cyd@gnu.org>
14861
14862 * doc.c (store_function_docstring): Avoid applying docstring of
14863 alias to base function (Bug#2603).
14864
3723ec07
AS
148652012-02-04 Andreas Schwab <schwab@linux-m68k.org>
14866
14867 * .gdbinit (pp1, pv1): Remove redundant defines.
14868 (pr): Use pp.
14869
79c1cc1e
CY
148702012-02-04 Chong Yidong <cyd@gnu.org>
14871
14872 * nsterm.m: Declare a global (Bug#10694).
14873
d7f29f8e
EZ
148742012-02-04 Eli Zaretskii <eliz@gnu.org>
14875
cae07000
SM
14876 * w32.c (get_emacs_configuration_options):
14877 Include --enable-checking, if specified, in the return value.
d7f29f8e 14878
3b95a6f9
MR
148792012-02-04 Martin Rudalics <rudalics@gmx.at>
14880
14881 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
14882 after rounding frame sizes. (Bug#9723)
14883
d6fa96a6
EZ
148842012-02-04 Eli Zaretskii <eliz@gnu.org>
14885
14886 * keyboard.c (adjust_point_for_property): Don't position point
14887 before BEGV. (Bug#10696)
14888
df0b2940
PE
148892012-02-03 Paul Eggert <eggert@cs.ucla.edu>
14890
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.
14897
6bee44d6
MA
148982012-02-02 Michael Albinus <michael.albinus@gmx.de>
14899
14900 * dbusbind.c (Fdbus_register_method): Mention the return value
14901 :ignore in the docstring.
14902
44f92739
GM
149032012-02-02 Glenn Morris <rgm@gnu.org>
14904
1b9f60cc
GM
14905 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
14906
44f92739
GM
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.
14912
c5d3843c
KH
149132012-02-02 Kenichi Handa <handa@m17n.org>
14914
14915 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
14916 0, do not call append_composite_glyph.
14917
159462d4 149182012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
14919
14920 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
14921 NULL (Bug#6988).
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.
14924
78cef877
EZ
149252012-02-01 Eli Zaretskii <eliz@gnu.org>
14926
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.
14931
97897668
GM
149322012-01-31 Glenn Morris <rgm@gnu.org>
14933
14934 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 14935 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
14936 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
14937
31fd3586
GM
149382012-01-29 Glenn Morris <rgm@gnu.org>
14939
14940 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
14941
0e24a8b2
CY
149422012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
14943
14944 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
14945
cc0adcb0
CY
149462012-01-28 Chong Yidong <cyd@gnu.org>
14947
14948 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
14949
acc28cb9
CY
149502012-01-26 Chong Yidong <cyd@gnu.org>
14951
9c69cfb7
CY
14952 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
14953
acc28cb9
CY
14954 * search.c (Fsearch_forward, Fsearch_backward): Document negative
14955 repeat counts (Bug#10507).
14956
48da7392
GM
149572012-01-26 Glenn Morris <rgm@gnu.org>
14958
14959 * lread.c (syms_of_lread): Doc fix.
14960
14af5f7f
CY
149612012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
14962
14963 * coding.c (encode_designation_at_bol): Change return value to
14964 EMACS_INT.
14965
0b21c100
CY
149662012-01-25 Chong Yidong <cyd@gnu.org>
14967
14968 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
14969
3c2907f7
CY
149702012-01-21 Chong Yidong <cyd@gnu.org>
14971
14972 * floatfns.c (Fcopysign): Make the second argument non-optional,
14973 since nil is not allowed anyway.
14974
959ad23f
AS
149752012-01-21 Andreas Schwab <schwab@linux-m68k.org>
14976
14977 * process.c (read_process_output): Use p instead of XPROCESS (proc).
14978 (send_process): Likewise.
14979
34a02f46
MR
149802012-01-19 Martin Rudalics <rudalics@gmx.at>
14981
14982 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
14983 (Vwindow_persistent_parameters): Do not use Qstate.
14984 Rewrite doc-strings.
34a02f46 14985
1259009a 149862012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
14987
14988 * character.c (char_width): New function.
70d4fdf6
GM
14989 (Fchar_width, c_string_width, lisp_string_width):
14990 Use char_width (Bug#9496).
25ed9e61 14991
6a6ee00d
MR
149922012-01-16 Martin Rudalics <rudalics@gmx.at>
14993
14994 * window.c (Vwindow_persistent_parameters): New variable.
14995 (Fset_window_configuration, save_window_save): Handle persistent
14996 window parameters.
14997
c85efaf7
EZ
149982012-01-14 Eli Zaretskii <eliz@gnu.org>
14999
15000 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
15001 thrashing the stack of the thread. (Bug#9087)
15002
5944709e
PE
150032012-01-12 Paul Eggert <eggert@cs.ucla.edu>
15004
15005 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
15006
e71f5d99
EZ
150072012-01-11 Eli Zaretskii <eliz@gnu.org>
15008
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
15013 before a R2L line.
15014
ce316182
GM
150152012-01-11 Glenn Morris <rgm@gnu.org>
15016
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)
15019
5b43da69
GM
150202012-01-10 Glenn Morris <rgm@gnu.org>
15021
74cc8ff9
GM
15022 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
15023
7d8d6e4e
GM
15024 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
15025 Update template values to be closer to their typical values these days.
5b43da69 15026
a0db8d43
EZ
150272012-01-09 Eli Zaretskii <eliz@gnu.org>
15028
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)
15033
9a0115ab 150342012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 15035
b9110d6a 15036 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
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.
b9110d6a 15043 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
15044 that the var is always cleared.
15045
6c1bd3f3
EZ
150462012-01-07 Eli Zaretskii <eliz@gnu.org>
15047
15048 * search.c (scan_buffer): Pass character positions to
15049 know_region_cache, not byte positions. (Bug#6540)
15050
069d2b50
L
150512012-01-07 LynX <_LynX@bk.ru> (tiny change)
15052
15053 * w32.c (sys_rename): Report EXDEV when rename of a directory
15054 fails because the target is on another logical disk. (Bug#10284)
15055
75bf0d33
DB
150562012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
15057
15058 * xterm.c (x_embed_request_focus): New function.
15059
15060 * xterm.h: Add prototype.
15061
15062 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
15063
1c6e5a32
GM
150642012-01-05 Glenn Morris <rgm@gnu.org>
15065
15066 * emacs.c (emacs_copyright): Update short copyright year to 2012.
15067
651e947e
EZ
150682012-01-01 Eli Zaretskii <eliz@gnu.org>
15069
15070 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
15071 Load gnutls_transport_set_lowat only if GnuTLS version is below
15072 2.11.1.
15073 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
15074 GnuTLS versions below 2.11.1.
15075
3778cdd8
AL
150762011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
15077
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.
15081
0e5317f7
KH
150822011-12-28 Kenichi Handa <handa@m17n.org>
15083
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).
15087
93d5ca1f
JD
150882011-12-26 Jan Djärv <jan.h.d@swipnet.se>
15089
15090 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
15091 can scroll.
15092 (create_and_show_popup_menu): Always use menu_position_func for
15093 Gtk3 (Bug#10361).
15094
ca22b785
AS
150952011-12-24 Andreas Schwab <schwab@linux-m68k.org>
15096
15097 * callint.c (Fcall_interactively): Don't truncate prompt string.
15098
d048e1e6
EZ
150992011-12-23 Eli Zaretskii <eliz@gnu.org>
15100
15101 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
15102 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 15103 resumed from there (after widening). (Bug#10360)
d048e1e6 15104
5ccaba1f
JD
151052011-12-22 Jan Djärv <jan.h.d@swipnet.se>
15106
15107 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
15108
204ee57f
JD
151092011-12-21 Jan Djärv <jan.h.d@swipnet.se>
15110
b81d40f0
JB
15111 * nsterm.m (x_free_frame_resources):
15112 Release f->output_data.ns->miniimage.
204ee57f
JD
15113 (ns_index_color): Fix indentation. Do not retain
15114 color_table->colors[i].
15115
15116 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
15117 before returning.
15118
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.
15123
15124 * emacs.c (ns_pool): New variable.
15125 (main): Assign ns_pool.
15126 (Fkill_emacs): Call ns_release_autorelease_pool.
15127
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.
15134
c803b2b7
JD
151352011-12-18 Jan Djärv <jan.h.d@swipnet.se>
15136
678f4426
JD
15137 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
15138 and NS_IMPL_COCOA.
15139 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
15140 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
15141
cd394be1 151422011-12-18 David Reitter <reitter@cmu.edu>
678f4426 15143
5fecd5fc
JD
15144 * nsterm.m (ns_term_init): Subscribe for notifications
15145 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
15146 to method trackingNotification in EmacsMenu.
15147
15148 * nsmenu.m (trackingMenu): New variable.
3771cb17 15149 (trackingNotification): New method (from Aquamacs).
5fecd5fc 15150 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 15151 from Aquamacs (Bug#7030).
678f4426
JD
15152
151532011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 15154
c803b2b7
JD
15155 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
15156 (symbol_to_nsstring): Fix indentation.
15157 (ns_symbol_to_pb): New function.
cae07000
SM
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
c803b2b7
JD
15161 Fns_store_cut_buffer_internal.
15162 (ns_get_foreign_selection, Fx_own_selection_internal)
15163 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
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
c803b2b7
JD
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
15174 here.
15175
e1b01a3a
KB
151762011-12-17 Ken Brown <kbrown@cornell.edu>
15177
15178 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
15179 GID is unknown (Bug#10257).
15180
2adb6e85
PE
151812011-12-17 Paul Eggert <eggert@cs.ucla.edu>
15182
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.
15187
d1d7b339
JL
151882011-12-15 Juri Linkov <juri@jurta.org>
15189
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
15193 `MagickFalse'.
15194 (Fimagemagick_types): Add `Fnreverse' to return the list in the
15195 proper order.
15196
100d5755
KH
151972011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15198
15199 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
15200 fill background (Bug#8992).
15201
454592a6
MR
152022011-12-13 Martin Rudalics <rudalics@gmx.at>
15203
15204 * window.c (Vwindow_combination_resize)
15205 (Vwindow_combination_limit): Use t instead of non-nil in
15206 doc-strings.
61d4b438
MR
15207 (Vrecenter_redisplay): Add first sentence of doc-string on
15208 separate line.
53524d93 15209 (Frecenter): Fix doc-string typo.
454592a6 15210
3633e3aa
KH
152112011-12-11 Kenichi Handa <handa@m17n.org>
15212
15213 * coding.c (Funencodable_char_position): Pay attention to the
15214 buffer text relocation (Bug#9389).
15215
7b9d523a 152162011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 15217
7b9d523a
JD
15218 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
15219 gtk_init (Bug#10100).
15220
b73189c6
EZ
152212011-12-10 Eli Zaretskii <eliz@gnu.org>
15222
15223 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
15224 IT->string is nil. (Bug#10263)
15225
f7dfe5d6
JD
152262011-12-10 Jan Djärv <jan.h.d@swipnet.se>
15227
83faebb4
JD
15228 * nsterm.h (x_free_frame_resources): Declare.
15229
f7dfe5d6
JD
15230 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
15231 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
15232
15233 * nsterm.h (ns_get_defaults_value): Declare.
15234
15235 * nsterm.m (ns_default): Call ns_get_defaults_value.
15236
7cd4e72c
EZ
152372011-12-09 Eli Zaretskii <eliz@gnu.org>
15238
15239 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
15240 (Bug#10170)
15241
b34d7317
YM
152422011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15243
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).
15247
76470ad1
KH
152482011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15249
15250 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 15251 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 15252
745fff94
KH
152532011-12-08 Kenichi Handa <handa@m17n.org>
15254
15255 * ftfont.c (get_adstyle_property): Fix previous change
15256 (Bug#10233).
15257
6e44397c
JB
152582011-12-07 Juanma Barranquero <lekktu@gmail.com>
15259
15260 * w32.c (init_environment): If no_site_lisp, remove site-lisp
15261 dirs from the default value of EMACSLOADPATH (bug#10208).
15262
7efa6272
GM
152632011-12-07 Glenn Morris <rgm@gnu.org>
15264
15265 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
15266 installation and source directories as well. (Bug#10208)
15267
f6fc4d87
CY
152682011-12-06 Chong Yidong <cyd@gnu.org>
15269
15270 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
15271
2bf26180
GM
152722011-12-06 Glenn Morris <rgm@gnu.org>
15273
15274 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
15275 as an error, not just -1. (Bug#10217)
15276
3a6ad4f0
CY
152772011-12-05 Chong Yidong <cyd@gnu.org>
15278
15279 * keyboard.c (process_special_events): New function.
15280 (swallow_events, Finput_pending_p): Use it (Bug#10195).
15281
75a3b399
PE
152822011-12-05 Paul Eggert <eggert@cs.ucla.edu>
15283
15284 * coding.c (encode_designation_at_bol): Don't use uninitialized
15285 local variable (Bug#9318).
15286
c3c9e25e
KH
152872011-12-05 Kenichi Handa <handa@m17n.org>
15288
15289 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
15290 return Qnil (Bug#8046, Bug#10193).
15291
5eb05ea3
KH
152922011-12-05 Kenichi Handa <handa@m17n.org>
15293
15294 * coding.c (encode_designation_at_bol): New args charbuf_end and
15295 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
15296 (coding_set_source): Return how many bytes coding->source was
15297 relocated.
15298 (coding_set_destination): Return how many bytes
15299 coding->destination was relocated.
15300 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 15301 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
15302
153032011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15304
15305 * coding.c (CODING_CHAR_CHARSET_P): New macro.
15306 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
15307 macro (Bug#9318).
15308
153092011-12-05 Andreas Schwab <schwab@linux-m68k.org>
15310
15311 The following changes are to fix Bug#9318.
15312
a79703f5 15313 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
15314 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
15315 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 15316 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 15317
7dbda6df
JB
153182011-12-05 Juanma Barranquero <lekktu@gmail.com>
15319
15320 * lisp.h (process_quit_flag): Fix external declaration.
15321
6d5eb5b0
SM
153222011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
15323
15324 Don't macro-inline non-performance-critical code.
15325 * eval.c (process_quit_flag): New function.
15326 * lisp.h (QUIT): Use it.
15327
a0c3fad0
JD
153282011-12-04 Jan Djärv <jan.h.d@swipnet.se>
15329
15330 * nsfns.m (get_geometry_from_preferences): New function.
15331 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
15332
6c07aac2
AS
153332011-12-04 Andreas Schwab <schwab@linux-m68k.org>
15334
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.
6d5eb5b0
SM
15339 (quit_throw_to_read_char): Add parameter `from_signal'.
15340 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
15341 * lisp.h (QUIT): Call Fkill_emacs if requested.
15342
c052ead4
JD
153432011-12-03 Jan Djärv <jan.h.d@swipnet.se>
15344
15345 * widget.c (update_wm_hints): Return if wmshell is null.
15346 (widget_update_wm_size_hints): New function.
15347
15348 * widget.h (widget_update_wm_size_hints): Declare.
15349
15350 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
15351 widget_update_wm_size_hints (Bug#10104).
15352
9e49252b
EZ
153532011-12-03 Eli Zaretskii <eliz@gnu.org>
15354
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)
e9a49426 15358 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 15359
02b16839
JL
153602011-12-02 Juri Linkov <juri@jurta.org>
15361
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)
15368
0068070e
SM
153692011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
15370
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
15374 (bug#10117).
15375
3360a3fc
AS
153762011-12-01 Andreas Schwab <schwab@linux-m68k.org>
15377
15378 * keyboard.c (interrupt_signal): Don't call kill-emacs when
15379 waiting for input. (Bug#10169)
15380
73d6c093
EZ
153812011-11-30 Eli Zaretskii <eliz@gnu.org>
15382
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)
15386
febe6bea
JB
153872011-11-30 Juanma Barranquero <lekktu@gmail.com>
15388
15389 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
15390
801a4313
EZ
153912011-11-30 Eli Zaretskii <eliz@gnu.org>
15392
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)
15396
2b56b87e
JD
153972011-11-29 Jan Djärv <jan.h.d@swipnet.se>
15398
15399 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
15400
15401 * xterm.c (handle_one_xevent): Only set async_visible and friends
15402 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 15403 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
15404 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
15405
dbf31225
PE
154062011-11-28 Paul Eggert <eggert@cs.ucla.edu>
15407
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).
15415
1305621b
YM
154162011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15417
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.
15421
8c9afb46
EZ
154222011-11-27 Eli Zaretskii <eliz@gnu.org>
15423
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
15428 compiling Emacs.
15429
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.
15434
15435 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
15436 _MSC_VER.
15437
54e9e3bf
JD
154382011-11-27 Jan Djärv <jan.h.d@swipnet.se>
15439
6d5eb5b0
SM
15440 * gtkutil.c (xg_create_frame_widgets):
15441 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
15442 present with Gtk+ 2.0.
15443
83aca1cb
PE
154442011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15445
15446 * fileio.c (Finsert_file_contents): Undo previous change; see
15447 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
15448
5b76caa4
PE
154492011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15450
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.
15457
8c535114
EZ
154582011-11-25 Eli Zaretskii <eliz@gnu.org>
15459
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)
91b4a718
EZ
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)
8c535114 15467
fa4fdb5c
JL
154682011-11-24 Juri Linkov <juri@jurta.org>
15469
15470 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
15471 after the `MagickPingImage' call. (Bug#10112)
15472
90ec88df
CY
154732011-11-23 Chong Yidong <cyd@gnu.org>
15474
15475 * window.c (Fcoordinates_in_window_p): Accept only live windows.
15476
56e2e794
MR
154772011-11-23 Martin Rudalics <rudalics@gmx.at>
15478
15479 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
15480 making another buffer current. (Bug#10114)
15481
b6e64c41
GM
154822011-11-23 Glenn Morris <rgm@gnu.org>
15483
15484 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
15485
6b21de18
CY
154862011-11-23 Chong Yidong <cyd@gnu.org>
15487
15488 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
15489 using it (Bug#5984).
15490
b12cd789
EZ
154912011-11-22 Eli Zaretskii <eliz@gnu.org>
15492
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.
15495 (Bug#10098)
15496
15497 * .gdbinit (prow): Make displayed values more self-explaining.
15498 Add row's hash code.
15499
261b6fd4
LMI
155002011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
15501
15502 * process.c (wait_reading_process_output): Fix asynchrounous
15503 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 15504 (wait_reading_process_output): Add comment and URL.
261b6fd4 15505
e7cfd277
JD
155062011-11-21 Jan Djärv <jan.h.d@swipnet.se>
15507
15508 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
15509
a9b9b7f5
CY
155102011-11-21 Chong Yidong <cyd@gnu.org>
15511
15512 * window.c (Fnext_window, Fprevious_window): Doc fix.
15513
b0d15b4f
SM
155142011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15515
15516 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
15517
fe7a3057
JB
155182011-11-20 Juanma Barranquero <lekktu@gmail.com>
15519
15520 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
15521
d2999b1a
MR
155222011-11-20 Martin Rudalics <rudalics@gmx.at>
15523
15524 * window.c (Fset_window_combination_limit): Rename argument
15525 STATUS to LIMIT.
15526 (Vwindow_combination_limit): Remove "status" from doc-string.
15527
d5ff9cd0
AS
155282011-11-20 Andreas Schwab <schwab@linux-m68k.org>
15529
15530 * m/ibms390.h: Remove.
15531 * m/ibms390x.h: Don't include "ibms390.h".
15532
a5bb9bd3
SM
155332011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15534
15535 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
15536 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
15537
cd1181db
JB
155382011-11-20 Juanma Barranquero <lekktu@gmail.com>
15539
15540 * casetab.c (Fset_case_table):
15541 * charset.c (Fcharset_after): Fix typos.
15542
615a3b8d 155432011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 15544
17e845af
PE
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
6a0bf43d
PE
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.
15562
f8fe6f96
EZ
155632011-11-19 Eli Zaretskii <eliz@gnu.org>
15564
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.
15569
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)
15573
df05a53c
CY
155742011-11-18 Chong Yidong <cyd@gnu.org>
15575
15576 * window.c (Fwindow_combination_limit): Make first argument
15577 non-optional, since it is meaningless for live windows like the
15578 selected window.
61ccba97 15579
2071918e
DA
155802011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
15581
15582 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
15583
b50a28de
SM
155842011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
15585
15586 * intervals.c: Fix grafting over the whole buffer (bug#10071).
15587 (graft_intervals_into_buffer): Simplify.
15588
015137db
EZ
155892011-11-18 Eli Zaretskii <eliz@gnu.org>
15590
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)
68c95424 15595 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
15596
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
15600 hash code inline.
15601
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.
15604
15605 * dispextern.h (row_hash): Add prototype.
15606
a2addb04
TH
156072011-11-18 Tassilo Horn <tassilo@member.fsf.org>
15608
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.
15611
df85d315
JB
156122011-11-17 Juanma Barranquero <lekktu@gmail.com>
15613
15614 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
15615
a0c2d0ae
MR
156162011-11-17 Martin Rudalics <rudalics@gmx.at>
15617
15618 * window.c (Vwindow_splits): Rename to
15619 Vwindow_combination_resize. Suggested by Juri Linkov.
15620 (Fsplit_window_internal): Use Vwindow_combination_resize instead
15621 of Vwindow_splits.
15622
58179cce
JB
156232011-11-16 Juanma Barranquero <lekktu@gmail.com>
15624
7877f373
JB
15625 * nsfns.m (Fns_font_name):
15626 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 15627
b6f67890
MR
156282011-11-16 Martin Rudalics <rudalics@gmx.at>
15629
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.
15638
c7015153
JB
156392011-11-15 Juanma Barranquero <lekktu@gmail.com>
15640
15641 * image.c (imagemagick_load_image): Fix typo.
15642
322ad6ec
EZ
156432011-11-14 Eli Zaretskii <eliz@gnu.org>
15644
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
6d5eb5b0
SM
15648 faces of all the glyphs to compute ROW's hash value.
15649 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 15650
f067b8ec
JB
156512011-11-14 Juanma Barranquero <lekktu@gmail.com>
15652
15653 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
15654 just return (bug#10044).
15655
1e5b2111
EZ
156562011-11-12 Eli Zaretskii <eliz@gnu.org>
15657
7ef3cbd5
EZ
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.
15662
1e5b2111
EZ
15663 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
15664 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
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.
1e5b2111 15668
89d61221
MR
156692011-11-12 Martin Rudalics <rudalics@gmx.at>
15670
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.
15679
97f18cc8
JD
156802011-11-11 Jan Djärv <jan.h.d@swipnet.se>
15681
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).
15686
22a648b4
DA
156872011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
15688
0b381c7e 15689 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 15690
659afede
KH
156912011-11-11 Kenichi Handa <handa@m17n.org>
15692
15693 * callproc.c (Fcall_process): Set the member dst_multibyte of
15694 process_coding.
15695
9ac0394b
KH
156962011-11-11 Johan Bockgård <bojohan@gnu.org>
15697
15698 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
15699 avoid a crash (bug#9496).
15700
2fbdc249
CY
157012011-11-09 Chong Yidong <cyd@gnu.org>
15702
15703 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
15704 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
15705
ac6b1f81
PE
157062011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15707
15708 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
15709
09db192c
PE
157102011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15711
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>
15715 et seq.
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.
15729
105216ed
CY
157302011-11-08 Chong Yidong <cyd@gnu.org>
15731
15732 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
15733 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
15734 Signal an error if not a live window.
105216ed
CY
15735 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
15736 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
15737
ae9e237f
JB
157382011-11-07 Juanma Barranquero <lekktu@gmail.com>
15739
15740 * lisp.h (syms_of_abbrev): Remove declaration.
15741 Reported by CHENG Gao <chenggao@royau.me>.
15742
c7aa8333
EZ
157432011-11-07 Eli Zaretskii <eliz@gnu.org>
15744
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.
15748
be7f5545
MR
157492011-11-07 Martin Rudalics <rudalics@gmx.at>
15750
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.
15761
ca78dc43
PE
157622011-11-07 Paul Eggert <eggert@cs.ucla.edu>
15763
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.
15768
a0241d01
KH
157692011-11-07 Kenichi Handa <handa@m17n.org>
15770
15771 * coding.c (coding_set_destination): Check coding->src_pos only
15772 when coding->src_object is a buffer (bug#9910).
15773
15774 * process.c (send_process): Set the member src_multibyte of coding
15775 to 0 (bug#9911) when sending a unibyte text.
15776
15777 * callproc.c (Fcall_process): Set the member src_multibyte of
15778 process_coding to 0 (bug#9912).
15779
a64bfdfa 157802011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
15781
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).
15785
cb41b32a
PE
157862011-11-06 Paul Eggert <eggert@cs.ucla.edu>
15787
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.
15803
b7041366
AS
158042011-11-06 Andreas Schwab <schwab@linux-m68k.org>
15805
15806 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
15807 GC.
15808
88a37c4d
EZ
158092011-11-06 Eli Zaretskii <eliz@gnu.org>
15810
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.
15815
49745b39
CY
158162011-11-06 Chong Yidong <cyd@gnu.org>
15817
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.
15828
1f05cd82
CS
158292011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
15830
15831 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
15832 support MSVC.
15833
22610910
JR
158342011-11-05 Jason Rumney <jasonr@gnu.org>
15835
15836 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
15837 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
15838 fonts (Bug#6029).
15839 (add_font_entity_to_list): Fix logic errors in mixed boolean and
15840 bitwise arithmetic preventing use of unicode-sip and non-truetype
15841 opentype fonts.
15842
a06776b2
EZ
158432011-11-05 Eli Zaretskii <eliz@gnu.org>
15844
3ad924ba
EZ
15845 * s/ms-w32.h (fstat, stat, utime): Move redirections to
15846 "emacs"-only part.
15847
a06776b2
EZ
15848 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
15849 initialization code to keep similarity to xfns.c after changes
15850 from 2011-11-05.
15851
c9e7db78
JD
158522011-11-05 Jan Djärv <jan.h.d@swipnet.se>
15853
a97f8f3f
JD
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
15860 (Bug#9943).
15861
15862 * nsterm.m (x_free_frame_resources): New function.
15863 (x_destroy_window): Move code to x_free_frame_resources.
15864
c9e7db78 15865 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
15866 (Fx_create_frame, x_create_tip_frame):
15867 Move terminal->reference_count++ just before making the frame
75f1671a 15868 official. Move initialization of image_cache_refcount and
c9e7db78
JD
15869 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
15870
a6fc3b5c
EZ
158712011-11-05 Eli Zaretskii <eliz@gnu.org>
15872
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
15876 nt/gmake.defs.
15877
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
15882 bitfields.
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.
15886
15887 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
15888
58179cce 158892011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
15890
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.
15894
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
15899 e_* cousins.
15900 (alloca) [_MSC_VER]: Define to _alloca.
15901
15902 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
15903
15904 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
15905
a58c13ed
EZ
159062011-11-04 Eli Zaretskii <eliz@gnu.org>
15907
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)
15911
fe0b6370
JD
159122011-11-04 Jan Djärv <jan.h.d@swipnet.se>
15913
a58c13ed 15914 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
15915 label is not null (Bug#9951).
15916 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
15917 may be NULL.
15918
89bd5ee1
EZ
159192011-11-04 Eli Zaretskii <eliz@gnu.org>
15920
15921 * window.c (Fwindow_body_size): Mention in the doc string that the
15922 return value is in frame's canonical units. (Bug#9949)
15923
84c3edb9
EZ
159242011-11-03 Eli Zaretskii <eliz@gnu.org>
15925
4e2fb5c7
EZ
15926 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
15927
84c3edb9 15928 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 15929 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 15930 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 15931
bc17a887
EZ
159322011-11-01 Eli Zaretskii <eliz@gnu.org>
15933
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.
6d5eb5b0
SM
15937 (mouse_face_from_buffer_pos, note_mouse_highlight):
15938 Rename cover_string to disp_string.
bc17a887 15939
4ee88440
MR
159402011-11-01 Martin Rudalics <rudalics@gmx.at>
15941
15942 * window.c (temp_output_buffer_show): Don't use
15943 Vtemp_buffer_show_specifiers.
15944 (Vtemp_buffer_show_specifiers): Remove unused variable.
15945
c2ff3c02
EZ
159462011-10-30 Eli Zaretskii <eliz@gnu.org>
15947
15948 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
15949 past the beginning of the current glyph matrix.
15950
58179cce 159512011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
15952
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).
b77a6a7f 15956
3b574623
JD
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).
15959
b77a6a7f
JD
15960 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
15961
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.
15970
196e41e4
PE
159712011-10-29 Paul Eggert <eggert@cs.ucla.edu>
15972
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.
15976
021f2e1a
AS
159772011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15978
15979 * frame.h (MOUSE_HL_INFO): Remove excess parens.
15980
8b058d44
EZ
159812011-10-29 Eli Zaretskii <eliz@gnu.org>
15982
15983 Fix the `xbytecode' command.
15984 * .gdbinit (xprintbytestr): New command.
b50a28de 15985 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
15986 (xbytecode): Print the byte-code string as well.
15987
4452fb80
EZ
159882011-10-29 Kim Storm <storm@cua.dk>
15989
8b058d44
EZ
15990 * alloc.c (which_symbols): New function.
15991
21b72067
AS
159922011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15993
15994 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
15995 line. (Bug#9903)
15996
83ed7b5c
GM
159972011-10-29 Glenn Morris <rgm@gnu.org>
15998
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)
16001
5a7a728b
EZ
160022011-10-28 Eli Zaretskii <eliz@gnu.org>
16003
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.
16007
d3d0842f
CY
160082011-10-28 Chong Yidong <cyd@gnu.org>
16009
16010 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
16011
31b39d13
DN
160122011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
16013
16014 * window.c (make_window): Initialize phys_cursor_on_p.
16015
9aba6043
SM
160162011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
16017
16018 * lisp.h (struct Lisp_Symbol): Update comments.
16019
c20992f4
JB
160202011-10-28 Juanma Barranquero <lekktu@gmail.com>
16021
16022 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
16023
db4f02f2
EZ
160242011-10-28 Eli Zaretskii <eliz@gnu.org>
16025
16026 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
16027 <oslsachem@gmail.com> for helping to debug this.
16028
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)
9aba6043
SM
16035 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
16036 New functions.
16037 (w32font_open_internal, compute_metrics):
16038 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
16039 instead of calling the "wide" APIs directly.
16040
16041 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
16042
16043 * w32.h (syms_of_w32font): Add prototype.
16044
87e68db4
JB
160452011-10-27 Juanma Barranquero <lekktu@gmail.com>
16046
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.
16051
435c1d67
CY
160522011-10-27 Chong Yidong <cyd@gnu.org>
16053
16054 * process.c (make_process): Set gnutls_state to NULL.
16055
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.
16060
16061 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
16062
9c6c6f49
CY
160632011-10-27 Chong Yidong <cyd@gnu.org>
16064
9aba6043
SM
16065 * gnutls.c (emacs_gnutls_deinit): New function.
16066 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
16067 (Fgnutls_deinit, Fgnutls_boot): Use it.
16068
16069 * process.c (make_process): Initialize GnuTLS credentials to NULL.
16070 (deactivate_process): Call emacs_gnutls_deinit.
16071
657d08d3
JB
160722011-10-27 Juanma Barranquero <lekktu@gmail.com>
16073
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.
16078
5430d399
JB
160792011-10-26 Juanma Barranquero <lekktu@gmail.com>
16080
16081 * w32fns.c (w32_default_color_map): New function,
16082 extracted from Fw32_default_color_map.
a7ef684b 16083 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 16084
fe0055fa
PE
160852011-10-25 Paul Eggert <eggert@cs.ucla.edu>
16086
16087 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
16088
e6346438
SM
160892011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
16090
16091 * keyboard.c (test_undefined): New function (bug#9751).
16092 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
16093
e112cc37
ET
160942011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
16095
16096 * sysdep.c (init_sys_modes): Fix the check for the controlling
16097 terminal (Bug#6649).
16098
7b5d6677
EZ
160992011-10-20 Eli Zaretskii <eliz@gnu.org>
16100
16101 * dispextern.h (struct bidi_it): New member next_en_type.
16102
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.
16111
7da0b018
PE
161122011-10-20 Paul Eggert <eggert@cs.ucla.edu>
16113
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
16130 didn't fix it.
16131 * systime.h (tzname, timezone): Remove no-longer-used declarations.
16132
8547b010
EZ
161332011-10-19 Eli Zaretskii <eliz@gnu.org>
16134
16135 * xdisp.c (start_display): If the character at POS is displayed
16136 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
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.
8547b010
EZ
16141 (Bug#9771, part 2)
16142
4e948d15
CY
161432011-10-18 Chong Yidong <cyd@gnu.org>
16144
16145 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
16146 with nobreak-char-display too.
16147
4787455f
EZ
161482011-10-18 Eli Zaretskii <eliz@gnu.org>
16149
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
16163 that follows it.
16164 (bidi_level_of_next_char): Set next_en_pos to zero when
16165 invalidating its info.
16166
2c91f553
EZ
161672011-10-17 Eli Zaretskii <eliz@gnu.org>
16168
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)
f2ff9e88
EZ
16172 (move_it_vertically_backward): Don't look for character position
16173 immediately after the newline when in a continuation line.
16174 (Bug#9771, part 1)
2c91f553 16175
c7b08b0d
MR
161762011-10-15 Martin Rudalics <rudalics@gmx.at>
16177
16178 * window.c (coordinates_in_window): Rewrite and delabelize
16179 vertical border check. (Bug#5357) (Bug#9618)
16180
6b02f655
SM
161812011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
16182
16183 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
16184 errors in XSetWindowBorder (bug#9310).
16185
81d40c92
DA
161862011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
16187
16188 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
16189 avoid crash when xmalloc overrun checking is enabled.
16190
d4172c3b
EZ
161912011-10-13 Eli Zaretskii <eliz@gnu.org>
16192
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.
16196
16197 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
16198 some callers set that themselves.
16199
b00eea75
EZ
162002011-10-12 Eli Zaretskii <eliz@gnu.org>
16201
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)
16205
8fe012c4
SM
162062011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
16207
16208 * doc.c (get_doc_string): Encode file name (bug#9735).
16209
0074aef2
EZ
162102011-10-12 Eli Zaretskii <eliz@gnu.org>
16211
79beb178
EZ
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.
16215
0074aef2
EZ
16216 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
16217
6e4b3fbe
DA
162182011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
16219
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.
16223
0324f3af
PE
162242011-10-12 Paul Eggert <eggert@cs.ucla.edu>
16225
b5525cac
PE
16226 * xdisp.c (set_cursor_from_row): Simplify conditionals,
16227 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
16228
0324f3af
PE
16229 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
16230 Some packages use them to denote characters with modifiers.
16231
e9b5f888
AS
162322011-10-11 Andreas Schwab <schwab@linux-m68k.org>
16233
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.
16237
127827c0
SM
162382011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
16239
16240 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
16241
c8fd3bd0
GM
162422011-10-08 Glenn Morris <rgm@gnu.org>
16243
16244 * callint.c (Fcall_interactively): Give a more explicit error for the
16245 'c' case with a non-character input. (Bug#8479)
16246
352ec8ff
EZ
162472011-10-08 Eli Zaretskii <eliz@gnu.org>
16248
03669ccb
EZ
16249 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
16250 lines.
7061c986
EZ
16251 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
16252 lines that are hscrolled on the left.
03669ccb 16253
352ec8ff
EZ
16254 * dispnew.c (buffer_posn_from_coords): Account for a possible
16255 presence of header-line. (Bug#4426)
16256
a66cfb1c
SM
162572011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
16258
6b02f655
SM
16259 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
16260 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 16261
7c5ee88e
PE
162622011-10-07 Paul Eggert <eggert@cs.ucla.edu>
16263
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.
16273
df1bbe5b
SM
162742011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
16275
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.
16279
51553db6
SM
162802011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
16281
32c1fffd
SM
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.
16285
51553db6
SM
16286 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
16287 they've been requested explicitly (bug#9591).
16288
b6bd1599 162892011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
16290
16291 * keymap.c (Fsingle_key_description): Use make_specified_string
16292 instead of build_string to build string from push_key_description.
16293 (Bug#5193)
16294
f701dc2a
PE
162952011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16296
4222c55d
PE
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.
16304
f701dc2a
PE
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.
16318
9ceebf39
JD
163192011-09-30 Jan Djärv <jan.h.d@swipnet.se>
16320
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).
16324
cb993c58
PE
163252011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16326
3930c88b
PE
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.
16330
cb993c58
PE
16331 Port --enable-checking=all to Fedora 14 x86.
16332 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16333 Move to lisp.h.
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.
16348
31bed486
EZ
163492011-09-29 Eli Zaretskii <eliz@gnu.org>
16350
04c70788 16351 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
16352 use EDOM.
16353
fbcaa2f3
EZ
163542011-09-28 Eli Zaretskii <eliz@gnu.org>
16355
16356 * xdisp.c (compute_display_string_end): If there's no display
16357 string at CHARPOS, return -1.
16358
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)
16362
a239d4e9
JB
163632011-09-28 Juanma Barranquero <lekktu@gmail.com>
16364
16365 * lread.c (Fread_from_string): Fix typo in docstring.
16366
88652fd5
EZ
163672011-09-27 Eli Zaretskii <eliz@gnu.org>
16368
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)
32c1fffd
SM
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.
88652fd5 16374
ed497dd4
AS
163752011-09-27 Andreas Schwab <schwab@linux-m68k.org>
16376
16377 * lread.c (readevalloop): Use correct code for NBSP.
16378 (read1): Likewise. (Bug#9608)
16379
b2bf61aa
MA
163802011-09-25 Michael Albinus <michael.albinus@gmx.de>
16381
16382 * dbusbind.c (Fdbus_register_signal): When service is not
16383 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
16384
32bbb17c
GM
163852011-09-25 Glenn Morris <rgm@gnu.org>
16386
16387 * buffer.c (truncate-lines): Doc fix.
16388
94e0933e
CY
163892011-09-24 Chong Yidong <cyd@stupidchicken.com>
16390
16391 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
16392 (Fset_window_next_buffers): Doc fix.
16393
cddde921
GM
163942011-09-24 Glenn Morris <rgm@gnu.org>
16395
16396 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
16397
1260aef1
PE
163982011-09-24 Paul Eggert <eggert@cs.ucla.edu>
16399
25b4bfa0
PE
16400 Fix minor problems found by static checking.
16401 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
16402 * indent.c (Fvertical_motion): Fix == vs = typo.
16403
e3cbd34b
EZ
164042011-09-24 Eli Zaretskii <eliz@gnu.org>
16405
a66cfb1c
SM
16406 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
16407 Default value is now t. Doc fix.
6bf7006f 16408
e3cbd34b 16409 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 16410 logic when moving up, not only when moving down. Fix the
e3cbd34b 16411 confusing name and values of the it_overshoot_expected variable;
32c1fffd 16412 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
16413
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.
16418
a3de0cbd
MA
164192011-09-24 Michael Albinus <michael.albinus@gmx.de>
16420
16421 * dbusbind.c (Fdbus_register_signal): Add match rule to
16422 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
16423 (Fdbus_register_method, Vdbus_registered_objects_table):
16424 Fix docstring.
a3de0cbd 16425
b260039d
JM
164262011-09-24 Jim Meyering <meyering@redhat.com>
16427
32c1fffd 16428 do not ignore write error for any output size
b260039d
JM
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)
16440
8eca8a7c
AS
164412011-09-23 Andreas Schwab <schwab@linux-m68k.org>
16442
16443 * emacs.c (Fkill_emacs): In noninteractive mode exit
16444 non-successfully if a write error occurred on stdout. (Bug#9574)
16445
3341db62
EZ
164462011-09-21 Eli Zaretskii <eliz@gnu.org>
16447
16448 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
16449 the xassert test.
16450
16451 * dispextern.h (struct it): Update the comment documenting what
16452 can it->OBJECT be.
16453
8c203dbf
EZ
164542011-09-20 Eli Zaretskii <eliz@gnu.org>
16455
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.
fd317ddf
EZ
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.
8c203dbf 16464
a4824228
LMI
164652011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
16466
16467 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
16468 (bug#9493).
16469
33ed493b
CY
164702011-09-18 Chong Yidong <cyd@stupidchicken.com>
16471
16472 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
16473 boolean (Bug#9154).
16474
56cd55c8
EZ
164752011-09-18 Eli Zaretskii <eliz@gnu.org>
16476
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
16481 they don't fit.
c02dcedf
EZ
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.
3e62b7e0
EZ
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)
56cd55c8 16488
5ed99d36 164892011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
16490
16491 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
16492 and turn window cursor on if cleared (Bug#9415).
16493
5ed99d36 164942011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
16495
16496 * search.c (boyer_moore): Take unibyte characters from pattern
16497 literally. (Bug#9458)
16498
9bade7b2
EZ
164992011-09-18 Eli Zaretskii <eliz@gnu.org>
16500
16501 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
16502
e5e9d610
PE
165032011-09-18 Paul Eggert <eggert@cs.ucla.edu>
16504
87e4427a
PE
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.
16508
e5e9d610
PE
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.
16513
a1674f0b
EZ
165142011-09-18 Eli Zaretskii <eliz@gnu.org>
16515
16516 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
16517
fbfb6dd4
EZ
165182011-09-17 Eli Zaretskii <eliz@gnu.org>
16519
16520 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
16521 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
16522
bb187662
EZ
165232011-09-17 Eli Zaretskii <eliz@gnu.org>
16524
1137e8b8 16525 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 16526 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
16527
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)
16534
bb187662
EZ
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)
16537
2e621251
PE
165382011-09-16 Paul Eggert <eggert@cs.ucla.edu>
16539
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.
16545
91a15bc6
SM
165462011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
16547
16548 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
16549
b41c3a35
EZ
165502011-09-16 Eli Zaretskii <eliz@gnu.org>
16551
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.
16554
7812ba2d
PE
165552011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16556
16557 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
16558 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
16559
cf7edc2a
AS
165602011-09-15 Andreas Schwab <schwab@linux-m68k.org>
16561
16562 * editfns.c (Fformat): Correctly handle text properties on "%%".
16563
bd01620e
EZ
165642011-09-15 Eli Zaretskii <eliz@gnu.org>
16565
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.
16573
a02719a3
PE
165742011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16575
16576 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
16577 This occurs when processing a multibyte format.
16578 Problem reported by Wolfgang Jenker.
a02719a3 16579
72589a3c
JB
165802011-09-15 Johan Bockgård <bojohan@gnu.org>
16581
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)
16584
1c14176c
PE
165852011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16586
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.
16594
d2eea5b5
PE
165952011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16596
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.
16604
46888499
EZ
166052011-09-14 Eli Zaretskii <eliz@gnu.org>
16606
16607 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
16608 computation of loop end. Reported by Johan Bockgård
16609 <bojohan@gnu.org>.
16610
ef8ef9fb
CY
166112011-09-13 Chong Yidong <cyd@stupidchicken.com>
16612
16613 * frame.c (Fother_visible_frames_p): Function deleted.
16614
fa819fed
EZ
166152011-09-12 Eli Zaretskii <eliz@gnu.org>
16616
16617 * indent.c (compute_motion): Process display vector front to back
16618 rather than the other way around. (Bug#2496)
16619
2ba8e008
SM
166202011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
16621
16622 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
16623
20f53c69
CY
166242011-09-11 Chong Yidong <cyd@stupidchicken.com>
16625
16626 * minibuf.c (Fread_from_minibuffer): Doc fix.
16627
d562d7a4
EZ
166282011-09-11 Eli Zaretskii <eliz@gnu.org>
16629
16630 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
16631 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
16632
1c4d7f3d
LMI
166332011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
16634
16635 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
16636 value for non-existent files.
16637
b885bf36
EZ
166382011-09-11 Eli Zaretskii <eliz@gnu.org>
16639
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.
16644 (Bug#9139)
16645
6612f0bf
PE
166462011-09-11 Paul Eggert <eggert@cs.ucla.edu>
16647
16648 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
16649 here ...
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.
16654
dfb3f755
PE
166552011-09-10 Paul Eggert <eggert@cs.ucla.edu>
16656
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.
16660
3134906c
LMI
166612011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
16662
16663 * xml.c (parse_region): Make the parsing work for
16664 non-comment-starting XML files again (bug#9144).
16665
8d903f4e
AS
166662011-09-10 Andreas Schwab <schwab@linux-m68k.org>
16667
16668 * image.c (gif_load): Fix calculation of bottom and right corner.
16669 (Bug#9468)
16670
80ad64f4
EZ
166712011-09-10 Eli Zaretskii <eliz@gnu.org>
16672
16673 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
16674 redisplay in small windows.
16675
208a048d
EZ
166762011-09-09 Eli Zaretskii <eliz@gnu.org>
16677
16678 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
16679
9b1c252e
MR
166802011-09-08 Martin Rudalics <rudalics@gmx.at>
16681
16682 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
16683 Operate on live windows only.
16684
2949f33b
JB
166852011-09-08 Juanma Barranquero <lekktu@gmail.com>
16686
16687 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
16688
e08dcafd
EZ
166892011-09-07 Eli Zaretskii <eliz@gnu.org>
16690
16691 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
16692 only under bidi iteration.
16693
115b96bd
JD
166942011-09-07 Jan Djärv <jan.h.d@swipnet.se>
16695
16696 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
16697
c8199d0f
PE
166982011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16699
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
16706 a __builtin_isnan.
16707 * floatfns.c (isnan): #undef, and then #define to a clone of
16708 what's in data.c.
16709 (Fisnan): Always define, since it's always available now.
16710 (syms_of_floatfns): Always define isnan at the Lisp level.
16711
e39b275c 167122011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
16713
16714 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
16715
b2db44d9 167162011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 16717
f4af5137 16718 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
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.
16734
ecfc0a49
MA
167352011-09-05 Michael Albinus <michael.albinus@gmx.de>
16736
16737 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
16738
6511acf2 167392011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 16740
0999621a 16741 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
16742
16743 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 16744 (esprintf, exprintf, evxprintf): New functions.
62f19c19 16745 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 16746 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
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.
8666506e 16758 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
16759 * window.h (command_loop_level, minibuf_level): Reflect API changes.
16760
2be7d702
PE
16761 * dbusbind.c (signature_cat): New function.
16762 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
16763 Do not overrun buffer; instead, report string overflow.
16764
9d1df220
PE
16765 * dispnew.c (add_window_display_history): Don't overrun buffer.
16766 Truncate instead; this is OK since it's just a log.
16767
33ef5c64
PE
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.
16771
66c6fdd5
PE
16772 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
16773 when creating daemon; the previous buffer-overflow check was incorrect.
16774
d749b01b
PE
16775 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
16776 which has the guts of the old verror function.
16777
b5cd1905
PE
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.
16780
6e1a67fb
PE
16781 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
16782 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 16783 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 16784 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
16785 length of string rather than counting it via multiple sprintfs;
16786 that's simpler and more reliable.
c21721cc
PE
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.
16790
c57b67fc
PE
16791 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
16792 (fontset_from_font): Print it.
16793
8a401434
PE
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
16802 not fit in int.
16803
6e1a67fb
PE
16804 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
16805 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
16806 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
16807
0df02bf3
PE
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.
16810
48e30793
PE
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.
16816
a66ff6d8
PE
16817 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
16818 in case result does not fit in int.
16819
aca216ff
PE
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'.
16827
31c286f7
PE
16828 * process.c (make_process): Use printmax_t, not int, to format
16829 process-name gensyms.
16830
55e5faa1
PE
16831 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
16832
80f2e268
PE
16833 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
16834 to avoid potential buffer overrun.
16835
670741ab
PE
16836 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
16837 if X resource line is longer than 512 bytes.
16838
b7163a50
PE
16839 * xfns.c (x_window): Make sprintf buffer a bit bigger
16840 to avoid potential buffer overrun.
16841
ae58ff1f
PE
16842 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
16843
c43c8a6a
PE
16844 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
16845
3f8236f4
PE
168462011-09-04 Paul Eggert <eggert@cs.ucla.edu>
16847
53e9fe90 16848 Integer overflow fixes for scrolling, etc.
6511acf2
PE
16849 Without these, Emacs silently mishandles large integers sometimes.
16850 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
16851 it were "C-u 1 M-x recenter" on a typical 64-bit host.
16852
6511acf2
PE
16853 * xdisp.c (try_window_id): Check Emacs fixnum range before
16854 converting to 'int'.
806add1d 16855
6511acf2 16856 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
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.
16864
6511acf2
PE
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.
a0efffc8
PE
16868 (match_limit): Don't assume that a fixnum can fit in 'int'.
16869
6511acf2 16870 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
16871 exceed INT_MAX.
16872
6511acf2 16873 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
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.
16877
fcb901a7
LMI
168782011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
16879
0f2f6b6d
LMI
16880 * Require libxml/parser.h to avoid compilation warning.
16881
fcb901a7
LMI
16882 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
16883
16884 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
16885 since this reportedly can destroy thread storage.
16886
6e20a0d4
CY
168872011-08-30 Chong Yidong <cyd@stupidchicken.com>
16888
16889 * syntax.c (find_defun_start): Update all cache variables if
16890 exiting early (Bug#9401).
16891
148ae00e
EZ
168922011-08-30 Eli Zaretskii <eliz@gnu.org>
16893
f6cfbd8f
EZ
16894 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
16895
148ae00e
EZ
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)
16899
16900 * term.c (tty_append_glyph): New function.
16901 (produce_stretch_glyph): Static function and its prototype deleted.
16902
a66cfb1c
SM
16903 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
16904 Add prototypes.
148ae00e 16905
c4a07a4c
PE
169062011-08-29 Paul Eggert <eggert@cs.ucla.edu>
16907
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):
a66cfb1c 16911 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
16912 so that the name doesn't mislead. All uses changed.
16913
6bc8cd65
JB
169142011-08-28 Johan Bockgård <bojohan@gnu.org>
16915
16916 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
16917 set_tty_hooks.
16918
dca4927e
EZ
169192011-08-27 Eli Zaretskii <eliz@gnu.org>
16920
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.
16925
f2cad773
PE
169262011-08-27 Paul Eggert <eggert@cs.ucla.edu>
16927
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.
16935
0cae2cdb
JB
169362011-08-27 Juanma Barranquero <lekktu@gmail.com>
16937
16938 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
16939
5fc295a4 169402011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 16941
70c60eb2 16942 Integer and memory overflow issues (Bug#9196).
726e0ab1 16943
d31850da
PE
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
16947 convenient.
16948
a69fbedb
PE
16949 * image.c (x_allocate_bitmap_record, cache_image):
16950 * xselect.c (Fx_register_dnd_atom):
16951 Simplify previous changes by using xpalloc.
16952
fe5c5d37
PE
16953 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
16954 since either will do and ptrdiff_t is convenient with xpalloc.
16955
0065d054
PE
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.
16963
16964 * cmds.c (internal_self_insert): Check for size-calculation overflow.
16965
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.
16969
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.
16973
16974 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
16975
16976 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
16977 (SAFE_NALLOCA): New macro.
16978
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.
16990
16991 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
16992 EMACS_INT, since either will do, for xpalloc.
16993
16994 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
16995 (xnmalloc, xnrealloc, xpalloc): New functions.
16996
726e0ab1
PE
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.
17000
51f30bc5 17001 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
17002 * buffer.c (overlays_at, overlays_in, record_overlay_string)
17003 (overlay_strings):
17004 Don't update size of array until after memory allocation succeeds,
17005 because xmalloc/xrealloc may not return.
0065d054
PE
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.
726e0ab1 17010
0065d054
PE
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.
726e0ab1
PE
17016
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.
0065d054 17020 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
17021
17022 * character.c (Fstring): Check for size-calculation overflow.
17023
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.
17027
17028 * composite.c (get_composition_id): Check for overflow in glyph
17029 length calculations.
17030
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.
17045
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.
17052
17053 * editfns.c (set_time_zone_rule): Don't assume environment length
17054 fits in int.
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.
17059
0065d054
PE
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.
726e0ab1
PE
17064
17065 * eval.c (init_eval_once, grow_specpdl): Don't update size until
17066 alloc succeeds.
17067 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
17068
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.
17073
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.
17077
17078 * fringe.c (Fdefine_fringe_bitmap):
17079 Don't update size until alloc works.
17080
17081 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
17082 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
17083
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.
17095
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)
17102 (x_detect_edges):
3256efce 17103 Check for size calculation overflow.
726e0ab1
PE
17104 (ct_colors_allocated_max): New constant.
17105 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
17106 overflow.
3256efce 17107
726e0ab1
PE
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
a66cfb1c
SM
17113 calculations. Don't update size until allocation succeeds.
17114 Redo calculations to avoid overflow.
726e0ab1
PE
17115 * keyboard.h: Change prototypes to match the above.
17116
17117 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
17118 to count maps.
17119 (current_minor_maps): Check for size calculation overflow.
17120 * keymap.h: Change prototypes to match the above.
17121
17122 * lread.c (read1, init_obarray): Don't update size until alloc done.
17123
17124 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
17125 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
17126
726e0ab1
PE
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.
17131
17132 * process.c (Fnetwork_interface_list): Check for overflow
17133 in size calculation.
17134
17135 * region-cache.c (move_cache_gap): Check for size calculation overflow.
17136
17137 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
17138 overflow. Don't bother calling xmalloc when xrealloc will do.
17139
17140 * search.c (Freplace_match): Check for size calculation overflow.
17141 (Fset_match_data): Don't assume list lengths fit in 'int'.
17142
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.
17146
17147 * term.c (max_frame_lines): Remove; unused.
17148 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
17149 not int.
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.
17156
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
17160 until alloc done.
17161
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.
0065d054 17166 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
17167
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.
17171
0065d054
PE
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.
726e0ab1
PE
17178
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.
17183
0065d054
PE
17184 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
17185 (xg_select): Check for size calculation overflow.
726e0ab1
PE
17186 Don't update size until alloc done.
17187
0065d054 17188 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 17189 as sprintf is limited to int lengths.
1d526e2f 17190
252c5ee1
PE
17191 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
17192 (X_LONG_MIN): New macros.
864d7ce7
PE
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.
17199 All uses changed.
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
252c5ee1 17211 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
17212 something.
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.
17236
726e0ab1 17237 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 17238
0065d054
PE
17239 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
17240 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
17241 (x_color_cells): Don't store size until memory allocation succeeds.
17242 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 17243 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
17244 (x_term_init): Don't assume length fits in int (sprintf is limited
17245 to int size).
bc18e09d 17246
ebfa62c0
PE
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.
17257
d3411f89
PE
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).
17272
e097a6fa
PE
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.
17276
5637687f
PE
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.
a66cfb1c 17283 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
17284 now that we have two such functions. All uses changed.
17285 (sanitize_char_width): New inline function.
17286
a2271ba2
PE
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.
17294
18c52557
PE
17295 * fileio.c: Integer overflow issues with file modes.
17296 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
17297
caeeedc1
PE
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.
17301
6df6ae42 17302 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
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.
17307
b13995db
PE
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.
17320
13464394
PE
17321 Overflow, signedness and related fixes for images.
17322
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.
17335
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
a66cfb1c
SM
17349 old tiff_error_handler and tiff_warning_handler.
17350 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
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.
17363
c11821d4
EZ
173642011-08-26 Eli Zaretskii <eliz@gnu.org>
17365
17366 * xdisp.c (redisplay_window): Don't force window start if point
17367 will be invisible in the resulting window. (Bug#9324)
17368
0c95fcf7
EZ
173692011-08-25 Eli Zaretskii <eliz@gnu.org>
17370
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
17377 rather than 1.
fee65a97 17378 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
17379 accurately, and prefer exact match for point under bidi.
17380 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
17381
17382 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
17383 into disp_prop; all users changed.
17384
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.
17388
e4ed06f1
CY
173892011-08-25 Chong Yidong <cyd@stupidchicken.com>
17390
17391 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
17392 Change return value to nil.
17393 (Frecord_buffer): Delete unused function.
17394
f67cdd7f
EZ
173952011-08-24 Eli Zaretskii <eliz@gnu.org>
17396
5980d4c6
EZ
17397 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
17398 buffers, return left-to-right.
8610fe8b
EZ
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.
5980d4c6 17412
f67cdd7f
EZ
17413 * bidi.c (bidi_check_type): Use xassert.
17414 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
17415 members.
17416
bca633fb
EZ
174172011-08-23 Eli Zaretskii <eliz@gnu.org>
17418
17419 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
17420 a character.
17421
4a5885a7
CY
174222011-08-23 Chong Yidong <cyd@stupidchicken.com>
17423
17424 * nsfont.m (ns_otf_to_script): Fix typo.
17425
0902a04e
KH
174262011-08-22 Kenichi Handa <handa@m17n.org>
17427
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.
17430
1a2e6670
EZ
174312011-08-23 Eli Zaretskii <eliz@gnu.org>
17432
8ddde651
EZ
17433 * xdisp.c (redisplay_window): When computing centering_position,
17434 account for the height of the header line. (Bug#8874)
17435
425cc014
EZ
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.
17440
1a2e6670
EZ
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.
17444
8b76d6f8
SM
174452011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
17446
17447 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
17448
dac347dd
EZ
174492011-08-22 Eli Zaretskii <eliz@gnu.org>
17450
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.
17454
e013fb34
CY
174552011-08-22 Chong Yidong <cyd@stupidchicken.com>
17456
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).
17460
bd1ba3e8
CY
174612011-08-20 Chong Yidong <cyd@stupidchicken.com>
17462
17463 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 17464 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 17465
54a1215b
EZ
174662011-08-19 Eli Zaretskii <eliz@gnu.org>
17467
823564e5
EZ
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.
17471
54a1215b
EZ
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.
17476
9778ebcc
EZ
174772011-08-18 Eli Zaretskii <eliz@gnu.org>
17478
0be6ee06
EZ
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'.
17482
9778ebcc
EZ
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.
17487
156bffbe
AS
174882011-08-18 Andreas Schwab <schwab@linux-m68k.org>
17489
6b02f655 17490 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 17491
72ad093b
CY
174922011-08-17 Chong Yidong <cyd@stupidchicken.com>
17493
17494 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
17495 (internal_condition_case_2, internal_condition_case_n):
17496 Remove unnecessary aborts (Bug#9081).
72ad093b 17497
35774242
EZ
174982011-08-17 Eli Zaretskii <eliz@gnu.org>
17499
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)
17502
db76dd85
KB
175032011-08-16 Ken Brown <kbrown@cornell.edu>
17504
17505 * gmalloc.c: Expand comment.
17506
b215eee5
EZ
175072011-08-16 Eli Zaretskii <eliz@gnu.org>
17508
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.
17511
a4579d33
KB
175122011-08-16 Ken Brown <kbrown@cornell.edu>
17513
17514 Fix memory allocation problems in Cygwin build (Bug#9273).
17515
17516 * unexcw.c ( __malloc_initialized): Declare external variable.
17517 (fixup_executable): Force the dumped emacs to reinitialize malloc.
17518
8b76d6f8
SM
17519 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
17520 New variables.
a4579d33
KB
17521 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
17522 dumped emacs.
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.
17528
3ebec551
PE
175292011-08-15 Paul Eggert <eggert@cs.ucla.edu>
17530
17531 * bidi.c (bidi_initialize): Remove unused local.
17532
9fd8be00
EZ
175332011-08-15 Eli Zaretskii <eliz@gnu.org>
17534
6b02f655
SM
17535 * bidimirror.h:
17536 * biditype.h: Remove file.
17537 * makefile.w32-in ($(BLD)/bidi.$(O)):
17538 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
17539
17540 * dispextern.h: Fix a typo in the comment to bidi_type_t.
17541
17542 * chartab.c: Improve commentary for the uniprop_table API.
17543
32413314
EZ
17544 * bidi.c (bidi_paragraph_init): Support zero value of
17545 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
17546 (bidi_initialize): Use uniprop_table instead of including
17547 biditype.h and bidimirror.h.
32413314 17548
9fd8be00
EZ
17549 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
17550 coordinates of the iterator when restoring from ppos_it.
17551 (Bug#9296)
17552
5cf2b69b
KH
175532011-08-14 Kenichi Handa <handa@m17n.org>
17554
17555 * process.c (create_process): Call setup_process_coding_systems
72ad093b 17556 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 17557
daf17d00
EZ
175582011-08-14 Eli Zaretskii <eliz@gnu.org>
17559
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)
17564
08e3161a
JD
175652011-08-14 Jan Djärv <jan.h.d@swipnet.se>
17566
17567 * nsterm.h (ns_run_ascript): Declare.
17568 (NSAPP_DATA2_RUNASSCRIPT): Define.
17569
17570 * nsfns.m (as_script, as_result, as_status): New static variables.
17571 (ns_run_ascript): New function.
5e617bc2 17572 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
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).
17575
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).
17579
a3720aa2
AS
175802011-08-14 Andreas Schwab <schwab@linux-m68k.org>
17581
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.
17590
17591 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
17592 uses changed.
17593
0a0d27fb
PE
175942011-08-14 Paul Eggert <eggert@cs.ucla.edu>
17595
19d5c50c
PE
17596 * xfaces.c (Qframe_set_background_mode): Now static.
17597 * dispextern.h (Qframe_set_background_mode): Remove decl.
17598
0a0d27fb
PE
17599 * process.c (Fnetwork_interface_info): Declare local only if needed.
17600
377538cb
JD
176012011-08-13 Jan Djärv <jan.h.d@swipnet.se>
17602
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
17607 sockaddr.
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.
17611
08fff70c
EZ
176122011-08-12 Eli Zaretskii <eliz@gnu.org>
17613
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
8b76d6f8
SM
17617 when IT->position is set up wrongly due to some bug.
17618 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
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)
17625
7be1c708 176262011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 17627
7be1c708
CY
17628 * fontset.c (fontset_get_font_group): Add proper type checks.
17629 (Bug#9172)
aac0c6e3 17630
7be1c708 176312011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 17632
7be1c708
CY
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.
aac0c6e3 17637
97bb72a6
EZ
176382011-08-08 Eli Zaretskii <eliz@gnu.org>
17639
17640 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
17641 no-display-properties-and-no-overlays under bidi display.
17642 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 17643 properties and overlays.
97bb72a6 17644
d5617611
CY
176452011-08-08 Chong Yidong <cyd@stupidchicken.com>
17646
37e11a63
CY
17647 * editfns.c (Fset_time_zone_rule): Document relationship with the
17648 setenv function.
17649
d5617611
CY
17650 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
17651 the font entity extracted from the cache (Bug#8109).
17652
58872834
CY
176532011-08-07 Chong Yidong <cyd@stupidchicken.com>
17654
17655 * composite.c (autocmp_chars): Don't reset point. That is done by
17656 restore_point_unwind (Bug#5984).
17657
75bfc667
JL
176582011-08-07 Juri Linkov <juri@jurta.org>
17659
17660 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
17661 to show the arg `TIME' instead of `TIMEVAL'.
17662
d1410150
EZ
176632011-08-06 Eli Zaretskii <eliz@gnu.org>
17664
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)
75b771e4
EZ
17668 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
17669 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
17670
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)
17674
35928349
EZ
176752011-08-05 Eli Zaretskii <eliz@gnu.org>
17676
ec7cc85b
EZ
17677 * bidi.c <bidi_cache_total_alloc>: Now static.
17678 (bidi_initialize): Initialize bidi_cache_total_alloc.
17679
8b76d6f8 17680 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
17681 cache. (Bug#9221)
17682
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.
17688
17689 * dispextern.h (bidi_unshelve_cache): Update prototype.
17690
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
412b6358 17696 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 17697
e2e2423b
EZ
176982011-08-05 Eli Zaretskii <eliz@gnu.org>
17699
17700 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
17701 came from a string character with a `cursor' property. (Bug#9229)
17702
ae9e757a
JD
177032011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17704
17705 * Makefile.in (LIB_PTHREAD): New variable.
17706 (LIBES): Add LIB_PTHREAD (Bug#9216).
17707
17708 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
17709 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
17710
213bd7f2
AS
177112011-08-04 Andreas Schwab <schwab@linux-m68k.org>
17712
6b02f655 17713 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 17714
99aaf75f
JD
177152011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17716
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.
17721
c74e9d86
PE
177222011-08-04 Paul Eggert <eggert@cs.ucla.edu>
17723
17724 * callproc.c (Fcall_process): Avoid vfork clobbering
17725 the local vars buffer, coding_systems, current_dir.
17726
640c8776
SM
177272011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
17728
17729 * keymap.c (Fmake_composed_keymap): Move to subr.el.
17730
f26d0e4c
PE
177312011-08-03 Paul Eggert <eggert@cs.ucla.edu>
17732
8a10d76c
PE
17733 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
17734 so that it is not optimized away.
17735
f26d0e4c
PE
17736 * xdisp.c (compute_display_string_pos): Remove unused local.
17737
55439c61
EZ
177382011-08-02 Eli Zaretskii <eliz@gnu.org>
17739
17740 Fix slow cursor motion and scrolling in large buffers with
17741 selective display, like Org Mode buffers. (Bug#9218)
17742
17743 * dispextern.h (struct bidi_it): New member disp_prop_p.
17744
17745 * xdisp.c: Remove one-slot cache of display string positions.
17746 (compute_display_string_pos): Accept an additional argument
5e617bc2 17747 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
17748 for a display string or property. If found, set DISP_PROP_P
17749 non-zero.
17750
17751 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
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
55439c61
EZ
17754 non-zero. All callers of bidi_fetch_char changed.
17755
fb33fa43
SM
177562011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
17757
17758 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
17759
b099e063
DM
177602010-12-03 Don March <don@ohspite.net>
17761
17762 * keymap.c (Fdefine_key): Fix non-prefix key error message when
17763 last character M-[char] is translated to ESC [char] (bug#7541).
17764
5cc7f7af
KH
177652011-08-02 Kenichi Handa <handa@m17n.org>
17766
d0fffa3f 17767 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
17768
17769 * chartab.c (uniprop_table): Make it non-static.
17770
525d5e6e
EZ
177712011-08-01 Eli Zaretskii <eliz@gnu.org>
17772
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
17775 on the newline.
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)
17779
31011111
AS
177802011-07-30 Andreas Schwab <schwab@linux-m68k.org>
17781
17782 * regex.c (re_comp): Protoize.
17783 (re_exec): Fix return type.
17784 (regexec): Fix type of `ret'. (Bug#9203)
17785
476371c4
PE
177862011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17787
e5d76069
PE
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.
17790
9a79b20c
AS
177912011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17792
17793 * print.c (print_object): Print empty symbol as ##.
17794
17795 * lread.c (read1): Read ## as empty symbol.
17796
d8c2fa78
AA
177972011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
17798
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.
17802
ffe57a7a
AA
17803 * nsmenu.m (-setText): Size tooltip dimensions precisely to
17804 contents (Bug#9176).
17805 (EmacsTooltip -init): Remove bezels and add shadows to
17806 tooltip windows.
17807
bf3492a5
AA
17808 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
17809 or scroll bar (Bug#8470).
17810
d55e9c53
AA
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).
17814
17815 * nsterm.h (nsfont_info): Remove voffset field.
17816
d8c2fa78 178172011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
17818
17819 Implement strike-through and overline on NextStep (Bug#8863).
17820
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.
17824
17825 * nsterm.h: Add declaration for ns_draw_text_decoration.
17826
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
8d5ed899 17831 accommodate underlining, etc.
4843aac3 17832
4cc60b9b
EZ
178332011-07-28 Eli Zaretskii <eliz@gnu.org>
17834
bc7ece87
EZ
17835 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
17836 default.
4cc60b9b 17837
476371c4
PE
178382011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17839
66606eea
PE
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.
17843
476371c4
PE
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.
17847
f3fcc40d
AS
178482011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17849
17850 * regex.c (re_iswctype): Convert return values to boolean.
17851
350c992f
EZ
178522011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
17853
17854 * xdisp.c (compute_display_string_pos): Don't use cached display
17855 string position if the buffer had its restriction changed.
17856 (Bug#9184)
17857
5266b4bb
PE
178582011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17859
17860 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
17861
2573a837 178622011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 17863
41f55ccd 17864 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 17865
39e378da
PE
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
17877 might not return.
17878 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
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>.
39e378da 17882
5e927815
PE
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>.
17886
ca4aa935
PE
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.
17905
5f8f9cc2
PE
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.
17909
5adf60bc
PE
17910 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
17911
c8907a93
PE
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.
17915
e3c25c68
PE
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.
17920
3f791afe
PE
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'.
17947
3cc5a532
PE
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.
17957
b312a492
PE
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.
17962
dfd153ae
PE
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.
17966 All uses changed.
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.
17975
a81d11a3
PE
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.
17985
3300e6fd
PE
17986 * keyboard.h (num_input_events): Now uintmax_t.
17987 This is (very slightly) less likely to mess up due to wraparound.
17988 All uses changed.
17989
fd05c7e9
PE
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
17993 signed integers.
17994
903fe15d
PE
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
18001 signed integers.
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
18005 is signed.
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
18012 in rest of code.
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.
18018
ac82cc6a
PE
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.
18025
c2d1e36d
PE
18026 * doprnt.c: Prefer signed to unsigned when either works.
18027 * eval.c (verror):
18028 * doprnt.c (doprnt):
18029 * lisp.h (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.
18036
0e926e56
PE
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.
18048
9cfdb3ec
PE
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.
18053
18054 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
18055 (__malloc_safe_bcopy): Remove; no longer needed.
18056
cf950e6b 18057 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
18058 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
18059 well either way, and we prefer signed to unsigned.
18060
dbf38e02
LMI
180612011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
18062
18063 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
18064 closes the connection while we're reading (bug#9182).
18065
d6f0886c 180662011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 18067
d6f0886c
JD
18068 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
18069 are specified (Bug#9168).
24e0f6b1 18070
2eb1f9e6
PE
180712011-07-25 Paul Eggert <eggert@cs.ucla.edu>
18072
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.
18075
22381272 180762011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
18077
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.
18081
f25e39b4
EZ
180822011-07-24 Eli Zaretskii <eliz@gnu.org>
18083
18084 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
18085 for attrs[LFACE_FONTSET_INDEX].
18086
04c4b52e
PE
180872011-07-23 Paul Eggert <eggert@cs.ucla.edu>
18088
18089 * xml.c (parse_region): Remove unused local
18090 that was recently introduced.
18091
c1734fbd
EZ
180922011-07-23 Eli Zaretskii <eliz@gnu.org>
18093
be18c5a5
EZ
18094 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
18095 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
18096
c1734fbd
EZ
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
640c8776
SM
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
a9269c18
EZ
18101 when exact match is impossible due to invisible text, and the
18102 lines are truncated.
18103
a258d627
JD
181042011-07-23 Jan Djärv <jan.h.d@swipnet.se>
18105
18106 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
18107 for OSX >= 10.7.
18108
b6d5a689
EZ
181092011-07-22 Eli Zaretskii <eliz@gnu.org>
18110
0f74f785
EZ
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.
b6d5a689 18114 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
18115 (next_element_from_buffer): Call compute_stop_pos_backwards to
18116 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
18117 base_level_stop.
18118 (reseat): Don't look for prev_stop, as that could mean a very long
18119 run.
18120 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
18121 <cached_disp_overlay_modiff>: Cache for last found display string
18122 position.
551918c1 18123 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
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.
551918c1 18127
b2d0c91a
EZ
181282011-07-22 Eli Zaretskii <eliz@gnu.org>
18129
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)
18132
043604ee
CY
181332011-07-22 Chong Yidong <cyd@stupidchicken.com>
18134
18135 * frame.c (Fmodify_frame_parameters): In tty case, update the
18136 default face if necessary (Bug#4238).
18137
da4adb04
CY
181382011-07-21 Chong Yidong <cyd@stupidchicken.com>
18139
18140 * editfns.c (Fstring_to_char): No need to explain what a character
18141 is in the docstring (Bug#6576).
18142
9abd0532
LMI
181432011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
18144
18145 * xml.c (parse_region): Make sure we always return a tree.
18146
36881d16
HK
181472011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
18148
18149 * xml.c (parse_region): If a document contains only comments,
18150 return that, too.
18151
1e98674d
LMI
181522011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
18153
18154 * xml.c (make_dom): Return comments, too.
18155
590bd467
PE
181562011-07-19 Paul Eggert <eggert@cs.ucla.edu>
18157
18158 Port to OpenBSD.
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
18164 timer goes off.
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.
18168
f41628b2
LMI
181692011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
18170
18171 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
18172 (bug#8460).
18173
b59b67c5
PE
181742011-07-18 Paul Eggert <eggert@cs.ucla.edu>
18175
15e3a074
PE
18176 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
18177 This fixes some race conditions on the permissions of any newly
18178 created file.
18179
41bed37d
PE
18180 * alloc.c (valid_pointer_p): Use pipe, not open.
18181 This fixes some permissions issues when debugging.
18182
b59b67c5
PE
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.
18187
925a6be7
SM
181882011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
18189
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.
18195
52968808
AS
181962011-07-17 Andreas Schwab <schwab@linux-m68k.org>
18197
0a6a104b
AS
18198 * lread.c (read_integer): Unread even EOF character.
18199 (read1): Likewise. Properly record start position of symbol.
18200
52968808
AS
18201 * lread.c (read1): Read `#:' as empty uninterned symbol if no
18202 symbol character follows.
18203
9e381cdd
PE
182042011-07-17 Paul Eggert <eggert@cs.ucla.edu>
18205
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.
18211
b5641435
JB
182122011-07-16 Juanma Barranquero <lekktu@gmail.com>
18213
18214 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
18215
a8031457
PE
182162011-07-16 Paul Eggert <eggert@cs.ucla.edu>
18217
18218 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
18219
dd889327
LMI
182202011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
18221
750c33f7
LMI
18222 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
18223 it's used from the C level.
18224
dd889327
LMI
18225 * process.c: Use the same condition for POLL_FOR_INPUT in both
18226 keyboard.c and process.c (bug#1858).
18227
87e86684
LM
182282011-07-09 Lawrence Mitchell <wence@gmx.li>
18229
18230 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
18231 (Fgnutls_boot): Use it.
18232
64348f40
AS
182332011-07-15 Andreas Schwab <schwab@linux-m68k.org>
18234
18235 * doc.c (Fsubstitute_command_keys): Revert last change.
18236
1d698799
LMI
182372011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
18238
f863868c
LMI
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).
18242
1d698799
LMI
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).
18246
aa4b6df6
EZ
182472011-07-15 Eli Zaretskii <eliz@gnu.org>
18248
18249 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 18250 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 18251
5d856da6
PE
182522011-07-14 Paul Eggert <eggert@cs.ucla.edu>
18253
ad6042bb
PE
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
18260 of the confusion.
f00bbb22 18261 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
18262 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
18263
6468f31c
LMI
182642011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18265
49080b10
LMI
18266 * search.c (Fre_search_backward): Mention `case-fold-search' in
18267 all the re_search_* functions (bug#8138).
18268
6468f31c
LMI
18269 * keyboard.c (Fopen_dribble_file): Document when the file is
18270 closed (bug#8056).
18271
c965adc5
EZ
182722011-07-14 Eli Zaretskii <eliz@gnu.org>
18273
df9733bf
EZ
18274 * bidi.c (bidi_dump_cached_states): Fix format of displaying
18275 bidi_cache_idx.
18276
0bb23927
EZ
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
640c8776
SM
18284 NULL (avoids a crash in bidi_paragraph_init).
18285 Initialize itb.string.lstring.
0bb23927
EZ
18286 (init_iterator): Call bidi_init_it only of a valid
18287 buffer position was specified. Initialize paragraph_embedding to
18288 L2R.
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
18295 Lisp strings.
18296 (compute_display_string_end): Support display properties on Lisp
18297 strings.
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).
640c8776
SM
18301 (compute_display_string_pos, compute_display_string_end):
18302 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
18303 arrow keys.
18304 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
18305 base_level_stop; instead, set base_level_stop to BEGV.
18306 Fixes crashes in vertical-motion.
0bb23927
EZ
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
18315 Lisp strings.
18316 (next_element_from_string): Support bidi reordering of Lisp
18317 strings.
18318 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
18319 (display_string): Support display of R2L glyph rows.
18320 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
18321 (init_iterator): Don't initialize it->bidi_p for strings
18322 here.
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
18327 structure.
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
18340 well.
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
18348 bidi-iterating.
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
18355 the same effect.
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
18373 iterator.
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
18401 TO_CHARPOS.
640c8776
SM
18402 (pos_visible_p): Support positions in bidi-reordered lines.
18403 Save and restore bidi cache.
0bb23927
EZ
18404
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
18410 to zero.
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)
640c8776
SM
18423 (bidi_level_of_next_char, bidi_move_to_visually_next):
18424 Support iteration over a string.
0bb23927
EZ
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
18435 values.
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
18439 iterating.
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)
c965adc5
EZ
18453 (bidi_cache_find_level_change, bidi_cache_ensure_space)
18454 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
18455 (bidi_find_other_level_edge, bidi_cache_start_stack):
18456 All variables related to cache indices are now EMACS_INT.
c965adc5 18457
0bb23927
EZ
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.
640c8776
SM
18461 (compute_display_string_pos, compute_display_string_end):
18462 Update prototypes.
0bb23927
EZ
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.
640c8776
SM
18467 (bidi_shelve_cache, bidi_unshelve_cache):
18468 Declare prototypes.
0bb23927
EZ
18469
18470 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
18471 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
18472 and vector-like objects.
18473
18474 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
18475 cache around display iteration.
18476
18477 * window.c (Fwindow_end, window_scroll_pixel_based)
18478 (displayed_window_lines, Frecenter): Save and restore the bidi
18479 cache around display iteration.
18480
3bbd2265
LMI
184812011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18482
18483 * editfns.c (Fdelete_region): Clarify the use of the named
18484 parameters (bug#6788).
18485
adc47434
MR
184862011-07-14 Martin Rudalics <rudalics@gmx.at>
18487
18488 * indent.c (Fvertical_motion): Set and restore w->pointm when
18489 saving and restoring the window's buffer (Bug#9006).
18490
837c31f8
LMI
184912011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
18492
18493 * editfns.c (Fstring_to_char): Clarify just what is returned
18494 (bug#6576). Text by Eli Zaretskii.
18495
ac389d0c
JB
184962011-07-13 Juanma Barranquero <lekktu@gmail.com>
18497
18498 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
18499
0be0ce47
EZ
185002011-07-13 Eli Zaretskii <eliz@gnu.org>
18501
18502 * buffer.c (mmap_find): Fix a typo.
18503
cd18e7e3
JB
185042011-07-13 Johan Bockgård <bojohan@gnu.org>
18505
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.
18515
47ea7f44
PE
185162011-07-13 Paul Eggert <eggert@cs.ucla.edu>
18517
ac389d0c 18518 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
18519 The old code sometimes used this field without initializing it.
18520
47ea7f44
PE
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.
18524
bc985c87
AS
185252011-07-12 Andreas Schwab <schwab@linux-m68k.org>
18526
18527 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 18528 argument. (Bug#4026)
bc985c87 18529
0cf34688
LMI
185302011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
18531
b3dadd76
LMI
18532 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
18533 key" (bug#4257).
18534
0cf34688
LMI
18535 * window.c (Fset_window_start): Doc fix (bug#4199).
18536 (Fset_window_hscroll): Ditto.
18537
270768cd
PE
185382011-07-12 Paul Eggert <eggert@cs.ucla.edu>
18539
077e3dda 18540 Fix minor new problems caught by GCC 4.6.1.
270768cd 18541 * term.c (init_tty): Remove unused local.
490011a6 18542 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 18543 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 18544 not used otherwise.
270768cd 18545
b1f58454
CY
185462011-07-12 Chong Yidong <cyd@stupidchicken.com>
18547
18548 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
18549
22b9578d
LMI
185502011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
18551
6e70ab07
LMI
18552 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
18553 are the mini-buffer and the echo area (bug#3320).
18554
22b9578d
LMI
18555 * term.c (init_tty): Remove support for supdup, c10 and perq
18556 terminals, which are no longer supported (bug#1482).
18557
8974cc9f
JB
185582011-07-10 Johan Bockgård <bojohan@gnu.org>
18559
18560 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
18561
a560d974
JD
185622011-07-10 Jan Djärv <jan.h.d@swipnet.se>
18563
18564 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
18565 for non-popups (Bug#3642).
18566
1dae0f0a
AS
185672011-07-10 Andreas Schwab <schwab@linux-m68k.org>
18568
268c2c36 18569 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 18570 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
18571 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
18572 * cm.c (losecursor): Likewise.
1dae0f0a
AS
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):
18580 Likewise.
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.
268c2c36 18587 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
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):
18597 Likewise.
18598 * xdisp.c (check_it): Likewise.
18599 * xfaces.c (register_color, unregister_color, unregister_colors):
18600 Likewise.
18601 * xfns.c (print_fontset_result): Likewise.
18602 * xrdb.c (member, fatal, main): Likewise.
18603
99033785
PE
186042011-07-10 Paul Eggert <eggert@cs.ucla.edu>
18605
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.
18611
9cb2ac56
JB
186122011-07-09 Juanma Barranquero <lekktu@gmail.com>
18613
18614 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
18615
f25661f0
JD
186162011-07-09 Jan Djärv <jan.h.d@swipnet.se>
18617
18618 * gtkutil.c (qttip_cb): Remove code without function.
18619
8278c4fe
EZ
186202011-07-09 Eli Zaretskii <eliz@gnu.org>
18621
18622 * w32.c (pthread_sigmask): New stub.
18623
1692ae2d 186242011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 18625
8a6ebd58 18626 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
18627 sigprocmask is portable only for single-threaded applications, and
18628 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
18629 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
18630 (LIBES): Use it.
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.
123403e4 18635
1b854618
JD
186362011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18637
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
18640 wrong (Bug#8591).
18641
3fe4b549
JD
186422011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18643
0ce7e563
JD
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.
18647
3fe4b549
JD
18648 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
18649 in registerServicesMenuSendTypes.
18650 (validRequestorForSendType): Don't check ns_return_types.
18651
18652 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
18653 ns_return_type.
18654
5df75e47
JR
186552011-07-08 Jason Rumney <jasonr@gnu.org>
18656
22610910
JR
18657 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
18658 SH_SHOW for hidden windows (Bug#5482).
18659
5df75e47
JR
18660 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
18661 frame struct members of non-existent frames (Bug#6284).
18662
699c10bd
JD
186632011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18664
4393663b
JD
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.
18669
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.
18675
18676 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 18677 cString and lossyCString on OSX >= 10.4.
4393663b 18678
58179cce 18679 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
18680 sizeToFit on OSX >= 10.2.
18681
18682 * nsimage.m (allocInitFromFile): Don't use deprecated method
18683 bestRepresentationForDevice on OSX >= 10.6.
18684
18685 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
18686 to avoid warning.
18687
18688 * emacs.c: Declare unexec_init_emacs_zone.
18689
a63e0781
JD
18690 * nsgui.h: Fix compiler warning about gnulib redefining verify.
18691
699c10bd
JD
18692 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
18693
18694 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
18695 on svcsMenu (Bug#8842).
18696
18697 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
18698 ns_return_types.
18699 (Fns_list_services): Just return Qnil on 10.6, code not working there.
18700
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.
18709
18710 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
18711 (ns_get_local_selection): Declare.
18712
54e10184
LMI
187132011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
18714
9888ff71
LMI
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
18717 something.
18718
54e10184
LMI
18719 * callint.c (Fcall_interactively): Change "reading args" to
18720 "providing args" to try to clarify what it does (bug#1010).
18721
15fa4783
KH
187222011-07-07 Kenichi Handa <handa@m17n.org>
18723
18724 * composite.c (composition_compute_stop_pos): Ignore a static
18725 composition starting before CHARPOS (Bug#8915).
18726
18727 * xdisp.c (handle_composition_prop): Likewise.
18728
a8815b00
EZ
187292011-07-07 Eli Zaretskii <eliz@gnu.org>
18730
18731 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
18732 (Bug#9015)
18733
ef7b981d 187342011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
18735
18736 * character.h (unicode_category_t): New enum type.
18737
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.
ac389d0c 18745 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
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.
640c8776 18753 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
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):
18760 New functions.
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,
5e617bc2 18767 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
18768 char-code-property-alist.
18769
640c8776 18770 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
18771 Vunicode_category_table.
18772
640c8776 18773 * font.c (font_range): Adjust for the change of
c805dec0
KH
18774 Vunicode_category_table.
18775
76b397fb
DN
187762011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
18777
18778 * m/iris4d.h: Remove file, move contents ...
18779 * s/irix6-5.h: ... here.
18780
22b4128e
PE
187812011-07-06 Paul Eggert <eggert@cs.ucla.edu>
18782
18783 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
18784 * alloc.c (mark_buffer):
18785 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
18786 (clone_per_buffer_values): Don't assume that
22b4128e
PE
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.
18792
869795d6
JD
187932011-07-05 Jan Djärv <jan.h.d@swipnet.se>
18794
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.
5e617bc2 18799 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
18800 (struct xsettings): Move font inside HAVE_XFT.
18801 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 18802 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 18803 Move inside HAVE_XFT.
640c8776 18804 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
18805 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
18806 also.
18807 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 18808 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 18809 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
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.
640c8776
SM
18822 (xsettings_get_system_font, xsettings_get_system_normal_font):
18823 Add comment.
869795d6 18824
d8ed26bd
PE
188252011-07-05 Paul Eggert <eggert@cs.ucla.edu>
18826
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.
18836
cabf1cac
SM
188372011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
18838
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.
18844
6e9b2be9
PE
188452011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18846
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.
18849
90186c68
LMI
188502011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
18851
7c301272
LMI
18852 * buffer.c (Foverlay_put): Say what the return value is
18853 (bug#7835).
18854
c4f2d8d4
LMI
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
18857 (bug#7564).
ad637907
LMI
18858 (barf_or_query_if_file_exists): Make the "File is a directory"
18859 error be more correct.
c4f2d8d4 18860
90186c68
LMI
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'.
18864
da64016e
PE
188652011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18866
18867 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
18868 Report string overflow if the output is too long.
18869
7d47b580
JB
188702011-07-04 Juanma Barranquero <lekktu@gmail.com>
18871
a555cb87
JB
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).
18876
7d47b580
JB
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.
18880
1e49bfab
LMI
188812011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18882
18883 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
18884
1485f4c0
CY
188852011-07-03 Chong Yidong <cyd@stupidchicken.com>
18886
18887 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
18888 and background color parameters if they have been changed.
18889
a9ab721e
LMI
188902011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18891
18892 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
18893
cf7cff57
PE
188942011-07-03 Paul Eggert <eggert@cs.ucla.edu>
18895
2e13213d
PE
18896 * xsettings.c (SYSTEM_FONT): Define only when used.
18897 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
18898
cf7cff57
PE
18899 * keymap.c (access_keymap_1): Now static.
18900
7a8e04f7
CY
189012011-07-02 Chong Yidong <cyd@stupidchicken.com>
18902
18903 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
18904 leave any prefix arg for the up event (Bug#1586).
18905
61352f62
LMI
189062011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
18907
69bb1ef7
LMI
18908 * lread.c (syms_of_lread): Mention single symbols defined by
18909 `defvar' or `defconst' (bug#7154).
18910
61352f62 18911 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 18912 (Frequire): Mention get-load-suffixes.
61352f62 18913
28545e04
MR
189142011-07-02 Martin Rudalics <rudalics@gmx.at>
18915
18916 * window.h (window): Remove clone_number slot.
18917 * window.c (Fwindow_clone_number, Fset_window_clone_number):
18918 Remove.
18919 (make_parent_window, make_window, saved_window)
18920 (Fset_window_configuration, save_window_save): Don't deal with
18921 clone numbers.
18922 * buffer.c (Qclone_number): Remove declaration.
18923 (sort_overlays, overlay_strings): Don't deal with clone numbers.
18924
3349e122
SM
189252011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
18926
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.
18945
3279eb87
GM
189462011-07-01 Glenn Morris <rgm@gnu.org>
18947
18948 * Makefile.in (SETTINGS_LIBS): Fix typo.
18949
39cb9e56 189502011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
18951
18952 * coding.c (Fencode_coding_string): Record the last coding system
18953 used, as the function doc string says (bug#8738).
18954
0949d2b6
JD
189552011-07-01 Jan Djärv <jan.h.d@swipnet.se>
18956
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.
9173deec 18968 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
18969 "changed".
18970
18971 * xgselect.c: Add defined (HAVE_GSETTINGS).
18972 (xgselect_initialize): Ditto.
18973
18974 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
18975 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
18976 xg_select.
18977
bbc6b304
PE
189782011-07-01 Paul Eggert <eggert@cs.ucla.edu>
18979
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.
18987
9851bfc5
JD
189882011-06-30 Jan Djärv <jan.h.d@swipnet.se>
18989
51bb811f 18990 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
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):
18997 New functions.
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
19004 to NULL.
19005
640c8776 19006 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
19007 GCONF_CFLAGS/LIBS.
19008
5386012d
MR
190092011-06-29 Martin Rudalics <rudalics@gmx.at>
19010
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.
19015
f13e0b08
PE
190162011-06-28 Paul Eggert <eggert@cs.ucla.edu>
19017
19018 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
19019
94515237
JB
190202011-06-27 Juanma Barranquero <lekktu@gmail.com>
19021
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.
19025
e43b6e43
MR
190262011-06-27 Martin Rudalics <rudalics@gmx.at>
19027
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.
19032
d68443dc
MR
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.
d615d6d2
MR
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.
d68443dc 19044
c7e73be5
JD
190452011-06-26 Jan Djärv <jan.h.d@swipnet.se>
19046
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.
19050
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).
19063
19064 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
19065 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
19066 Fix indentation.
c7e73be5 19067
cf99dcf8
EZ
190682011-06-26 Eli Zaretskii <eliz@gnu.org>
19069
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
19072 called at ZV.
19073
029529ac
CY
190742011-06-26 Chong Yidong <cyd@stupidchicken.com>
19075
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).
19079
7a7ef429
PE
190802011-06-25 Paul Eggert <eggert@cs.ucla.edu>
19081
19082 Use gnulib's dup2 module instead of rolling our own.
19083 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
19084
11fdef7d 190852011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
19086
19087 * dispnew.c (scrolling_window): Before scrolling, turn off a
19088 mouse-highlight in the window being scrolled.
19089
cd3520a4
JB
190902011-06-24 Juanma Barranquero <lekktu@gmail.com>
19091
19092 Move DEFSYM to lisp.h and use everywhere.
19093
19094 * character.h (DEFSYM): Move declaration...
19095 * lisp.h (DEFSYM): ...here.
19096
19097 * gnutls.c:
19098 * minibuf.c:
19099 * w32menu.c:
19100 * w32proc.c:
19101 * w32select.c: Don't include character.h.
19102
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.
19145
4228cf16
TZ
191462011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
19147
cd3520a4 19148 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 19149
7fcccf1e
PE
191502011-06-23 Paul Eggert <eggert@cs.ucla.edu>
19151
7efb4e0e
PE
19152 Integer and buffer overflow fixes (Bug#8873).
19153
ff5844ad
PE
19154 * print.c (printchar, strout): Check for string overflow.
19155 (PRINTPREPARE, printchar, strout):
19156 Don't set size unless allocation succeeds.
19157
90532f02
PE
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.
19161
6d84508d
PE
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.
19169
437b2cb4
PE
19170 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
19171
8b9ac8b4
PE
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.
82cb60d3
PE
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.
20270765 19183 Check for size overflow.
8b9ac8b4 19184
7fcccf1e
PE
19185 * image.c (cache_image): Check for size arithmetic overflow.
19186
bfbbd7e7
PE
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.
39019e54 19194 (read_escape): Check for hex character overflow.
bfbbd7e7 19195
4e323265
LL
191962011-06-22 Leo Liu <sdl.web@gmail.com>
19197
19198 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
19199 Move to minibuffer.el.
19200
85fece3e
PE
192012011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19202
20b84ce9 19203 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
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):
19219 Now static.
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.
19228
0766b489
PE
192292011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19230
31fd4b32
PE
19231 Integer overflow and signedness fixes (Bug#8873).
19232 A few related buffer overrun fixes, too.
19233
b79e8648
PE
19234 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
19235
0766b489
PE
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)
19244 (.bitmaps_last):
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.
19252
b081724f
PE
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):
21514da7
PE
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):
b081724f 19263 Use ptrdiff_t, not int, for sizes.
21514da7 19264 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 19265
3de73e5e
PE
19266 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
19267
2606c57b
PE
19268 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
19269 (x_session_initialize): Do not assume string length fits in int.
19270
aaafe47a
PE
19271 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
19272 This is unlikely, but can occur if DPI is outlandish.
19273
2674ddc8 19274 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
19275 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
19276
28154962
PE
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.
19281
7de51af5
PE
19282 * xfont.c (xfont_match): Avoid need for strlen.
19283
25ed6cc3
PE
19284 * xfns.c: Don't assume strlen fits in int.
19285 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
19286
4eab31dd
PE
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.
df1f27af 19291 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 19292
171e2a58
PE
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.
19296
ad39faca 19297 * minibuf.c (Fread_buffer):
6e5bb2dc 19298 * lread.c (intern, intern_c_string):
74ca2eb3
PE
19299 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
19300 Don't assume string length fits in int.
19301
52c61c22 19302 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
19303 * gtkutil.c (style_changed_cb): Avoid need for strlen.
19304
b5b8c9e5
PE
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.
ccd6111c
PE
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.
b5b8c9e5 19311
882f0d81 19312 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 19313 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
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.
19324
93f4cf88
PE
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.
19331
f3e92b69
PE
19332 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
19333
1bfdaf10
PE
19334 * coding.c (make_subsidiaries): Don't assume string length fits in int.
19335
35016e9a
PE
19336 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
19337
3d1e65a1
PE
19338 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
19339 We prefer signed integers, even for size calculations.
19340
0b963a93
PE
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.
19344
573f4b54
PE
19345 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
19346 (XD_DEBUG_MESSAGE): Don't waste a byte.
19347
989f33ba
PE
19348 * callproc.c (getenv_internal_1, getenv_internal)
19349 (Fgetenv_internal):
965d34eb
PE
19350 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
19351
e4d29b33
PE
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.
51cab52b 19356 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 19357
eb49b136
PE
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.
9f62aeb1 19362 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 19363 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 19364
15375a22
PE
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,
19367 implementation.
b61cc01c
PE
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).
9a8e8d9b
PE
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.
15375a22 19374
53b2623d
PE
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.
8fcaf9cc 19378 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 19379
51cab52b 19380 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 19381
f2ed8a70
PE
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.
19385
abe80cc6
PE
19386 * editfns.c, insdel.c:
19387 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 19388
b02c740e
PE
19389 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
19390
ebc96716
PE
19391 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
19392
b4e50fa0 19393 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 19394 Use much-faster test for byte-length change.
311d5d7c 19395 Don't assume string byte-length fits in 'int'.
a4cf38e4 19396 Check that character arg fits in 'int'.
85461888 19397 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 19398
c0c1ee9f
PE
19399 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
19400
a498d7f4
PE
19401 * fns.c (concat): Catch string overflow earlier.
19402 Do not rely on integer wraparound.
19403
51cab52b
PE
19404 * dispextern.h (struct it.overlay_strings_charpos)
19405 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
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.
19410
76031fad
PE
19411 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
19412
5eb55db9
PE
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.
7d100a81
PE
19416 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
19417 not EMACS_UINT, for indexes.
5eb55db9 19418
0703a717
PE
19419 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
19420
d6202519
PE
19421 * buffer.c: Include <verify.h>.
19422 (struct sortvec.priority, struct sortstr.priority):
8961a454 19423 Now EMACS_INT, not int.
c20998a7 19424 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
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.
d6202519 19429 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 19430
d5a19415
JM
194312011-06-22 Jim Meyering <meyering@redhat.com>
19432
029529ac 19433 Don't leak an XBM-image-sized buffer
d5a19415
JM
19434 * image.c (xbm_load): Free the image buffer after using it.
19435
a9041e6c
PE
194362011-06-21 Paul Eggert <eggert@cs.ucla.edu>
19437
19438 Port to Sun C.
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.
19444
7f3f739f
LL
194452011-06-21 Leo Liu <sdl.web@gmail.com>
19446
19447 * deps.mk (fns.o):
19448 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
19449 sha512.h.
19450
19451 * fns.c (secure_hash): Rename from crypto_hash_function and change
19452 the first arg to accept symbols.
5b66d427 19453 (Fsecure_hash): New primitive.
7f3f739f
LL
19454 (syms_of_fns): New symbols.
19455
76147d94
DD
194562011-06-20 Deniz Dogan <deniz@dogan.se>
19457
19458 * process.c (Fset_process_buffer): Clarify return value in
19459 docstring.
19460
7d7d0045
CY
194612011-06-18 Chong Yidong <cyd@stupidchicken.com>
19462
19463 * dispnew.c (add_window_display_history): Use BVAR.
19464
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.
19468
19469 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
19470 Likewise.
19471
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.
19474
ff2bc410
SM
194752011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
19476
19477 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
19478
28177add
PE
194792011-06-16 Paul Eggert <eggert@cs.ucla.edu>
19480
dd3482fe
PE
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".
19484
393d71f3 19485 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
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.
19494
2e6813b0 19495 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
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.
2e6813b0 19498
599a9e4f
PE
19499 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
19500
99561444
PE
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.
19506
28177add
PE
19507 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
19508
e69dafad
PE
195092011-06-15 Paul Eggert <eggert@cs.ucla.edu>
19510
4baa020d 19511 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 19512
b1c46f02
PE
19513 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
19514 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
19515
e69dafad
PE
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.
19520
566684ea
PE
19521 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
19522
e6966cd6
PE
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.
6346d301 19532 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 19533 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 19534
dd0b0efb
PE
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.
19541
86fe5cfe
PE
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?
19547
80e88859
PE
19548 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
19549
4a2f0ad6
PE
19550 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
19551
f66c7cf8
PE
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
4a2f0ad6
PE
19556 were being counted with int, which may truncate counts on 64-bit
19557 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
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.
19574
a1759b76
PE
19575 * callint.c (Fcall_interactively): Don't use index var as event count.
19576
d96be9fc
PE
19577 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
19578 * mem-limits.h (SIZE): Remove; no longer used.
19579
a690a978 19580 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 19581
578c21e6
PE
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.
19587
96f53c6c
PE
19588 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
19589 It's more likely to cause problems (due to unsigned overflow)
19590 than to cure them.
19591
83c77d31
PE
19592 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
19593
ee2079f1
PE
19594 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
19595
6da65536
PE
19596 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
19597
7147c4a4
PE
19598 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
19599
193e32d9
PE
19600 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
19601
e5533da6
PE
19602 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
19603
9910e595
PE
19604 GLYPH_CODE_FACE returns EMACS_INT, not int.
19605 * dispextern.h (merge_faces):
19606 * xfaces.c (merge_faces):
01103c44
PE
19607 * xdisp.c (get_next_display_element, next_element_from_display_vector):
19608 Don't assume EMACS_INT fits in int.
9910e595 19609
2638320e
PE
19610 * character.h (CHAR_VALID_P): Remove unused parameter.
19611 * fontset.c, lisp.h, xdisp.c: All uses changed.
19612
045eb8d9
PE
19613 * editfns.c (Ftranslate_region_internal): Omit redundant test.
19614
c1f134b5
PE
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.
19620
395fcb93 19621 * floatfns.c (Fexpt):
327eeec8
PE
19622 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
19623
abbd3d23
PE
19624 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
19625 for characters.
19626
684a03ef
PE
19627 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
19628
0fed43f3
PE
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.
19633
8fd02eb7
PE
19634 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
19635 Otherwise, an out-of-range integer could cause undefined behavior
19636 on a 64-bit host.
19637
f8c86b69
PE
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.
19643
34206dd2
PE
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
19650 in this area.
19651
c5958d4c 19652 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
19653
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.
19662 * data.c (Faset):
01103c44 19663 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
19664 (Fsubst_char_in_region):
19665 * fns.c (concat):
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.
19672
d37ca623
PE
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.
19677
ea204efb
PE
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):
01103c44 19682 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
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.
19687
41cb286c
PE
19688 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
19689 not to EMACS_INT, to avoid GCC warning.
19690
4a1b9832
PE
19691 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
19692
55daad71
PE
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.
8f95c75c 19696
01103c44
PE
19697 * buffer.c (Fgenerate_new_buffer_name):
19698 Use EMACS_INT for count, not int.
0ceccced 19699 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
19700
19701 * data.c (Qcompiled_function): Now static.
19702
c6f072e7
PE
19703 * window.c (window_body_lines): Now static.
19704
20ce5912
PE
19705 * image.c (gif_load): Rename local to avoid shadowing.
19706
9c4c5f81
PE
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.
19714
c0c5c8ae
PE
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)
01103c44
PE
19718 (total_free_floats, total_floats, total_free_intervals)
19719 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
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.
5a25e253
PE
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.
211a0b2a 19728 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
19729 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
19730 Previously, this ceilinged at INT_MAX, but that doesn't work on
19731 64-bit machines.
e46bb31a 19732 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 19733
c78baabf 19734 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 19735 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
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.
c78baabf 19739
c9d624c6
PE
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.
c78baabf 19750
c9d624c6
PE
19751 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
19752 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 19753 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 19754
353032ce
PE
19755 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
19756
2bccce07
PE
19757 * alloc.c (Fmake_string): Check for out-of-range init.
19758
0ac30604
SM
197592011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
19760
19761 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
19762
c195f2de
JD
197632011-06-14 Jan Djärv <jan.h.d@swipnet.se>
19764
19765 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
19766 xg_get_default_scrollbar_width.
19767
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.
19782
19783 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
19784
19785 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
19786
e10ac9f1
MR
197872011-06-12 Martin Rudalics <rudalics@gmx.at>
19788
19789 * frame.c (make_frame): Call other_buffer_safely instead of
19790 other_buffer.
19791
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
19798 doc-strings.
19799
2d3c217e 198002011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 19801
7b7f97e8 19802 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
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
19812 if HAVE_GPM.
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.
4475bec4
PE
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.
19829
1384b89e
JB
198302011-06-12 Juanma Barranquero <lekktu@gmail.com>
19831
19832 * makefile.w32-in: Update dependencies.
19833 (LISP_H): Add lib/intprops.h.
19834
1100a63c
CY
198352011-06-11 Chong Yidong <cyd@stupidchicken.com>
19836
19837 * image.c (gif_load): Add animation frame delay to the metadata.
19838 (syms_of_image): Use DEFSYM. New symbol `delay'.
19839
6198ccd0
MR
198402011-06-11 Martin Rudalics <rudalics@gmx.at>
19841
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
19846 window.el.
19847 (compare_window_configurations): Simplify code.
19848
b6e3633c
AS
198492011-06-11 Andreas Schwab <schwab@linux-m68k.org>
19850
1ab0dee5
AS
19851 * image.c (imagemagick_load_image): Fix type mismatch.
19852 (Fimagemagick_types): Likewise.
19853
b6e3633c
AS
19854 * window.h (replace_buffer_in_windows): Declare.
19855
9397e56f
MR
198562011-06-11 Martin Rudalics <rudalics@gmx.at>
19857
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
19861 code.
640c8776
SM
19862 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
19863 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
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
19870 if allowed.
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.
640c8776
SM
19874 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
19875 Move switch-to-buffer to window.el.
9397e56f
MR
19876 (bury-buffer): Move to window.el.
19877 (Vbuffer_list_update_hook): New variable.
19878
19879 * lisp.h (other_buffer_safely): Add prototype in buffer.c
19880 section.
19881
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.
19886
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
19894 window.el.
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
19902 declarations.
640c8776
SM
19903 (Fset_window_buffer): Rewrite doc-string.
19904 Call Qrecord_window_buffer.
9397e56f
MR
19905 (keys_of_window): Move binding for other-window to window.el.
19906
b50691aa
CY
199072011-06-11 Chong Yidong <cyd@stupidchicken.com>
19908
19909 * dispextern.h (struct image): Replace data member, whose int_val
19910 and ptr_val fields were not used by anything, with a single
19911 lisp_val object.
19912
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.
19916
3f754b86
PE
199172011-06-10 Paul Eggert <eggert@cs.ucla.edu>
19918
cca69397
PE
19919 * buffer.h: Include <time.h>, for time_t.
19920 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
19921
109e28d0
PE
19922 Fix minor problems found by static checking.
19923
60737f02
PE
19924 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
19925
4b66faf3
PE
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.
19932
109e28d0
PE
19933 * window.c (window_deletion_count, delete_deletable_window):
19934 Remove; unused.
46a4ce9e
PE
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.
19941
109e28d0 19942 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
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.
f7e13da3 19949 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 19950
3f754b86
PE
19951 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
19952
2547adb1
CY
199532011-06-10 Chong Yidong <cyd@stupidchicken.com>
19954
19955 * image.c (gif_load): Fix omitted cast error introduced by
19956 2011-06-06 change.
19957
2c8e37d4
MR
199582011-06-10 Martin Rudalics <rudalics@gmx.at>
19959
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.
19965
440a42e3
EZ
199662011-06-10 Eli Zaretskii <eliz@gnu.org>
19967
19968 * window.h (resize_frame_windows, resize_window_check)
19969 (delete_deletable_window, resize_root_window)
19970 (resize_frame_windows): Declare prototypes.
19971
19972 * window.c (resize_window_apply): Make definition be "static" to
19973 match the prototype.
19974
562dd5e9
MR
199752011-06-10 Martin Rudalics <rudalics@gmx.at>
19976
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
19983 orig_total_lines.
19984 (Fdelete_window, delete_window): Remove. Window deletion is
19985 handled by window.el.
640c8776
SM
19986 (window_loop): Remove DELETE_OTHER_WINDOWS case.
19987 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
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.
640c8776
SM
20010 (saved_window, Fset_window_configuration, save_window_save):
20011 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
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.
20016
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).
20020
20021 * frame.c (set_menu_bar_lines_1): Remove code handling
20022 orig_top_line and orig_total_lines.
20023
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.
20027
20028 * xdisp.c (init_xdisp): Don't use set_window_height but set
20029 heights directly.
20030
640c8776
SM
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
562dd5e9
MR
20033 run_window_configuration_change_hook.
20034
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.
20038
1a13852e
MR
200392011-06-09 Martin Rudalics <rudalics@gmx.at>
20040
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
20044 third argument 1.
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)
640c8776
SM
20054 (Fdelete_window_internal, Fresize_mini_window_internal):
20055 New functions.
1a13852e
MR
20056 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
20057
f3d1777e
MR
200582011-06-08 Martin Rudalics <rudalics@gmx.at>
20059
496e208e
MR
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.
b9e809c2 20064 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 20065
f3d1777e
MR
20066 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
20067 Remove.
496e208e
MR
20068 (make_dummy_parent): Set new members of windows structure.
20069 (make_window): Move down in code. Handle new members of window
20070 structure.
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)
640c8776
SM
20075 (Fset_window_next_buffers, Fset_window_clone_number):
20076 New functions.
496e208e
MR
20077 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
20078 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
20079 Doc-string fixes.
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.
b9e809c2
MR
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.
f3d1777e 20095
abde8f8c
MR
200962011-06-07 Martin Rudalics <rudalics@gmx.at>
20097
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.
640c8776
SM
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.
fa8a67e6
MR
20106 (delete_all_subwindows): Take a window as argument and not a
20107 structure. Rewrite.
190b47e6
MR
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.
abde8f8c
MR
20111
20112 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
20113 window_box_text_cols. delete_all_subwindows now takes a
20114 Lisp_Object as argument.
abde8f8c 20115
640c8776
SM
20116 * indent.c (compute_motion, Fcompute_motion):
20117 Use window_body_cols instead of window_box_text_cols.
abde8f8c 20118
fa8a67e6
MR
20119 * frame.c (delete_frame): Call delete_all_subwindows with root
20120 window as argument.
20121
a54e3482
DC
201222011-06-07 Daniel Colascione <dan.colascione@gmail.com>
20123
20124 * fns.c (Fputhash): Document return value.
20125
60002bf5
CY
201262011-06-06 Chong Yidong <cyd@stupidchicken.com>
20127
20128 * image.c (gif_load): Implement gif89a spec "no disposal" method.
20129
0c671da6 201302011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 20131
b862a52a 20132 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 20133
be44ca6c
PE
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.
20163
d1f3d2af
PE
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):
20172 * eval.c (verror):
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.
20178
dd52fcea
PE
20179 * image.c: Use ptrdiff_t, not int, for sizes.
20180 (slurp_file): Switch from int to ptrdiff_t.
20181 All uses changed.
20182 (slurp_file): Check that file size fits in both size_t (for
20183 malloc) and ptrdiff_t (for sanity and safety).
20184
7f9bbdbb
PE
20185 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
20186 if b->modtime has its maximal value.
20187
dfe18f82
PE
20188 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
20189
84acfcf0
PE
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.
20194
ccd9a01a
PE
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
20207 nonnegative.
20208
d6d100dd
SM
202092011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
20210
20211 * window.h (Fwindow_frame): Declare.
20212
2b6148e4
PE
202132011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20214
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.
20219
f230ecc9
MR
202202011-06-06 Martin Rudalics <rudalics@gmx.at>
20221
727e958e
MR
20222 * lisp.h: Move EXFUNS for Fframe_root_window,
20223 Fframe_first_window and Fset_frame_selected_window to window.h.
20224
20225 * window.h: Move EXFUNS for Fframe_root_window,
20226 Fframe_first_window and Fset_frame_selected_window here from
20227 lisp.h.
20228
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.
20234
20235 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
20236
f230ecc9
MR
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.
bf60a96b
MR
20240 (Fwindow_buffer): Move up and rewrite doc-string.
20241 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
20242 (Fwindow_prev): New functions.
727e958e
MR
20243 (Fwindow_frame): Move here from frame.c. Accept any window as
20244 argument.
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.
d6d100dd
SM
20250 (Fset_frame_selected_window): Move here from frame.c.
20251 Marginal rewrite.
727e958e
MR
20252 (Fselected_window, select_window, Fselect_window): Move up in
20253 code. Minor doc-string fixes.
f230ecc9 20254
4d09bcf6
PE
202552011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20256
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.
20262
810928a2
AS
202632011-06-05 Andreas Schwab <schwab@linux-m68k.org>
20264
172418ad
AS
20265 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
20266 format. (Bug#8806)
20267
43f862f7
AS
20268 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
20269
810928a2
AS
20270 * xfns.c (x_set_scroll_bar_default_width): Move declarations
20271 before statements.
20272
a059fe24
JD
202732011-06-05 Jan Djärv <jan.h.d@swipnet.se>
20274
20275 * gtkutil.c (xg_get_default_scrollbar_width): New function.
20276
20277 * gtkutil.h: Declare xg_get_default_scrollbar_width.
20278
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).
20281
989bf368
JB
202822011-06-05 Juanma Barranquero <lekktu@gmail.com>
20283
20284 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
20285
4b80f674
CY
202862011-06-04 Chong Yidong <cyd@stupidchicken.com>
20287
20288 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
20289 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
20290 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
20291 New error handlers.
4b80f674
CY
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.
de65b42c 20296 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 20297
99a33b77 202982011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
20299
20300 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
20301
99a33b77 203022011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
20303
20304 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
20305 in the current matrix if keep_current_p is non-zero.
20306
8264569d
EZ
203072011-06-04 Eli Zaretskii <eliz@gnu.org>
20308
20309 * bidi.c (bidi_level_of_next_char): Fix last change.
20310
57f97249
EZ
203112011-06-03 Eli Zaretskii <eliz@gnu.org>
20312
fec2107c 20313 Support bidi reordering of text covered by display properties.
57f97249 20314
fec2107c
EZ
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)
d6d100dd
SM
20319 (bidi_level_of_next_char, bidi_move_to_visually_next):
20320 Support character positions inside a run of characters covered by a
fec2107c
EZ
20321 display string.
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
20328 definitions.
20329 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
20330 instead of using explicit *_CHAR codes.
d6d100dd
SM
20331 (bidi_resolve_explicit, bidi_resolve_weak):
20332 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
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.
c40e2fb2 20343
0e14fe90
EZ
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.
d6d100dd
SM
20350 Accept 3 additional arguments needed by handle_display_spec.
20351 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
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.
fec2107c 20357 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
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.
d6d100dd
SM
20368 (compute_display_string_pos, compute_display_string_end):
20369 New functions.
fec2107c
EZ
20370 (push_it): Accept second argument POSITION, where pop_it should
20371 jump to continue iteration.
20372 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 20373
fec2107c
EZ
20374 * keyboard.c (adjust_point_for_property): Adjust the call to
20375 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
20376
20377 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
20378 (bidi_init_it): Update prototypes.
20379 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
20380 (compute_display_string_pos, compute_display_string_end):
20381 Declare prototypes.
fec2107c
EZ
20382 (struct bidi_it): New members nchars and disp_pos. ch_len is now
20383 EMACS_INT.
fc6f18ce 20384
40087514 203852011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 20386
57f53182
PE
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)
20392
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.
20402
ac32cd99 20403 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
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):
0de4bb68 20422 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 20423 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 20424 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
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.
0de4bb68
PE
20429 * fns.c, image.c: Remove unnecessary static decls that would otherwise
20430 need to be updated by these changes.
40087514
PE
20431 * fns.c (make_hash_table, maybe_resize_hash_table):
20432 Check for integer overflow with large hash tables.
0de4bb68
PE
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.
40087514
PE
20441 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
20442 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
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.
20447
698d32e2
DN
204482011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
20449
20450 Make it possible to build with GCC-4.6+ -O2 -flto.
20451
20452 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
20453
fd6fa53f
SM
204542011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
20455
20456 * minibuf.c (get_minibuffer, read_minibuf_unwind):
20457 Call minibuffer-inactive-mode.
20458
864db017
JB
204592011-05-31 Juanma Barranquero <lekktu@gmail.com>
20460
20461 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
20462 Update dependencies.
20463
2ad0baf4
DN
204642011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20465
20466 * data.c (init_data): Remove code for UTS, this system is not
20467 supported anymore.
20468
4fcc2638
DN
204692011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20470
20471 Don't force ./temacs to start in terminal mode.
20472
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.
20476
c56e0fd5
DN
204772011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20478
20479 * dispnew.c (add_window_display_history): Use const for the string
20480 pointer. Remove declaration, not needed.
20481
333d54da 204822011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 20483
55d4c1b2 20484 Use 'inline', not 'INLINE'.
333d54da 20485 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
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__.
20492
738db178
DN
204932011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20494
20495 Make it possible to run ./temacs.
20496
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.
20501
620c53a6
SM
205022011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
20503
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.
20510
e003a292
PE
205112011-05-31 Paul Eggert <eggert@cs.ucla.edu>
20512
20513 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
20514 (CCL_CODE_MIN): New macro.
20515
ed008a6d
PE
205162011-05-30 Paul Eggert <eggert@cs.ucla.edu>
20517
3687c2ef
PE
20518 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
20519
ed008a6d
PE
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.
20524
d66c4c7c
CY
205252011-05-29 Chong Yidong <cyd@stupidchicken.com>
20526
20527 * image.c: Various fixes to ImageMagick code comments.
20528 (Fimagemagick_types): Doc fix.
20529
5fbc2025
PE
205302011-05-29 Paul Eggert <eggert@cs.ucla.edu>
20531
0196f88a
PE
20532 Minor fixes prompted by GCC 4.6.0 warnings.
20533
20534 * xselect.c (converted_selections, conversion_fail_tag): Now static.
20535
5fbc2025
PE
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.
20539
1dd3c2d9
CY
205402011-05-29 Chong Yidong <cyd@stupidchicken.com>
20541
20542 * xselect.c (x_clipboard_manager_save_frame)
20543 (x_clipboard_manager_save_all): New functions.
20544 (Fx_clipboard_manager_save): Lisp function deleted.
20545
20546 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
20547 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
20548
20549 * xterm.h: Update prototype.
20550
5ba6571d
WX
205512011-05-28 William Xu <william.xwl@gmail.com>
20552
20553 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
20554 exiting (Bug#8239).
20555
3eaff834
JM
205562011-05-28 Jim Meyering <meyering@redhat.com>
20557
e1900994 20558 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
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
e1900994 20565 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 20566
0f6990a7
PE
205672011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20568
20569 Integer overflow fixes.
c8a9ca5a 20570
08686060
PE
20571 * dbusbind.c: Serial number integer overflow fixes.
20572 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
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
59568bf0 20577 that was so large that it became a float. (Bug#8722)
08686060 20578
2d1fc3c7
PE
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
59568bf0 20585 silently wrapping negative numbers around. (Bug#8722)
30217ff0 20586 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 20587 (Bug#8722)
2d1fc3c7 20588
c8a9ca5a
PE
20589 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
20590
519e1d69
PE
20591 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
20592
6df6ae42 20593 ccl: Add integer overflow checks.
30569699
PE
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
847044ea 20600 improvement. (Bug#8719)
30569699 20601
c11285dc
PE
20602 * alloc.c (make_event_array): Use XINT, not XUINT.
20603 There's no need for unsigned here.
20604
fdccd48e
PE
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.
20608
37910ab2
PE
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
9173deec 20627 formats. (Bug#8668)
37910ab2 20628
2e6578fb
PE
20629 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
20630
0ae6bdee
PE
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.
20639
de883a70
PE
20640 merge count_size_as_multibyte, parse_str_to_multibyte
20641 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 20642 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
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.
20648
2ff916cb
PE
206492011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
20650
20651 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
20652
f1b54466
PE
206532011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20654
fb1ac845
PE
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.
20659
f1b54466
PE
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.
20663
a9f737ee
CY
206642011-05-27 Chong Yidong <cyd@stupidchicken.com>
20665
20666 * termhooks.h (Vselection_alist): Make it terminal-local.
20667
20668 * terminal.c (create_terminal): Initialize it.
20669
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.
620c53a6
SM
20677 (x_own_selection, x_get_local_selection, x_convert_selection):
20678 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
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.
20687
20688 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
20689
20690 * xterm.h: Add support for those atoms.
20691
e067f0c1
CY
206922011-05-26 Chong Yidong <cyd@stupidchicken.com>
20693
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
620c53a6
SM
20699 of converted selections stored in converted_selections.
20700 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
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.
20709
0f4aebc0
LL
207102011-05-26 Leo Liu <sdl.web@gmail.com>
20711
20712 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
20713
e61124cd
YM
207142011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20715
20716 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
20717
20718 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
20719 for fringe update if it has periodic bitmap.
ac389d0c 20720 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
20721 and fringe_bitmap_periodic_p.
20722
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.
20727
20728 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
20729 for fringe update unless it has periodic bitmap.
20730
f16d9837
KH
207312011-05-25 Kenichi Handa <handa@m17n.org>
20732
20733 * xdisp.c (get_next_display_element): Set correct it->face_id for
20734 a static composition.
20735
e1b90ef6
LL
207362011-05-24 Leo Liu <sdl.web@gmail.com>
20737
20738 * deps.mk (fns.o):
20739 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
20740
20741 * fns.c (crypto_hash_function, Fsha1): New function.
20742 (Fmd5): Use crypto_hash_function.
20743 (syms_of_fns): Add Ssha1.
20744
7400048f
PE
207452011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20746
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).
20752
abb71cf4
CY
207532011-05-22 Chong Yidong <cyd@stupidchicken.com>
20754
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
20758 select.el.
20759
6307db39
PE
207602011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20761
20762 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
20763
f3d4e0a4
CY
207642011-05-22 Chong Yidong <cyd@stupidchicken.com>
20765
20766 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
20767
4d8ade89
YM
207682011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20769
20770 * dispnew.c (scrolling_window): Don't exclude the case that the
20771 last enabled row in the desired matrix touches the bottom boundary.
20772
32078c8d
GM
207732011-05-21 Glenn Morris <rgm@gnu.org>
20774
20775 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
20776 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
20777 and add some more files.
32078c8d 20778
7285dc67
EZ
207792011-05-20 Eli Zaretskii <eliz@gnu.org>
20780
20781 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
20782 report_file_error introduced by the change from 2011-05-07.
20783
89d1bd22
PE
207842011-05-20 Paul Eggert <eggert@cs.ucla.edu>
20785
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>.
20790
cd394be1 207912011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
20792
20793 * composite.c (find_automatic_composition): Fix previous change.
20794
b9704ad9
GM
207952011-05-20 Glenn Morris <rgm@gnu.org>
20796
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.
20801
4a720484
GM
208022011-05-19 Glenn Morris <rgm@gnu.org>
20803
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.
20812
a28d4396
KH
208132011-05-18 Kenichi Handa <handa@m17n.org>
20814
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.
20818
a2b1fa8e
JB
208192011-05-18 Juanma Barranquero <lekktu@gmail.com>
20820
20821 * makefile.w32-in: Update dependencies.
20822
8e1f5610
CS
208232011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
20824
20825 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 20826 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 20827
7025ee00 208282011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 20829
cdfa6eab
PE
20830 Fix some integer overflow issues, such as string length overflow.
20831
06d6db33
PE
20832 * insdel.c (count_size_as_multibyte): Check for string overflow.
20833
2b4560a8
PE
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.
20842
cb93f9be
PE
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.
20848
1a1f3366
PE
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.
9fbd6841
PE
20852 * msdos.c (mouse_get_pos): Likewise.
20853 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
20854 * w32gui.h (Time): Define by including "systime.h" rather than by
20855 declaring it ourselves. (Bug#8664)
20856
d4e3e4d3
PE
20857 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
20858 * image.c (clear_image_cache): Likewise.
20859
f6a24d19
PE
20860 * term.c (term_mouse_position): Don't assume time_t wraparound.
20861
08dc5ae6
PE
20862 Be more systematic about user-interface timestamps.
20863 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
20864 and sometimes 'EMACS_UINT', to represent these timestamps.
20865 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
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.
20884
8e55734a
PE
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
86db42d2 20892 apart (about 25 days). (Bug#8664)
8e55734a 20893
841f1b75 20894 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 20895 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 20896
3e26f69c
PE
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.
d230cb74
PE
20900 * frame.h (struct frame): Use int for menu_bar_items_used
20901 instead of EMACS_INT, since it always fits in int.
3e26f69c 20902
5cc152c0
PE
20903 * menu.c (grow_menu_items): Check for int overflow.
20904
d89eb65e
PE
20905 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
20906
5235bd3e
PE
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
20913 as modifiers.
20914 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
20915
bc827e23
PE
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.
20920
78eb494e
PE
20921 * window.c (size_window): Avoid needless test at loop start.
20922
04f2d78b
CB
209232011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
20924
20925 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
20926
d2fc7e3d 209272011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
20928
20929 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
20930
d2fc7e3d 209312011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
20932
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.
20936
04f2d78b
CB
20937 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
20938 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
20939 `bar_area_width', respectively.
20940 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
20941 background extension.
20942
79b70037
GM
209432011-05-10 Jim Meyering <meyering@redhat.com>
20944
20945 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
20946
2f142cc5
JB
209472011-05-10 Juanma Barranquero <lekktu@gmail.com>
20948
20949 * image.c (Finit_image_library): Return t for built-in image types,
20950 like pbm and xbm. (Bug#8640)
20951
57679c86
AS
209522011-05-09 Andreas Schwab <schwab@linux-m68k.org>
20953
20954 * w32menu.c (set_frame_menubar): Fix submenu allocation.
20955
888c9e86
EZ
209562011-05-07 Eli Zaretskii <eliz@gnu.org>
20957
b0512a1d
EZ
20958 * w32console.c (Fset_screen_color): Doc fix.
20959 (Fget_screen_color): New function.
20960 (syms_of_ntterm): Defsubr it.
20961
7285dc67
EZ
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
20964 first place.
20965 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
20966 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
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.
20969
4d3fcc8e
BK
209702011-05-07 Ben Key <bkey76@gmail.com>
20971
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
20979 variable.
20980
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
20985 sh as the shell.
20986
b4289b64
MA
209872011-05-06 Michael Albinus <michael.albinus@gmx.de>
20988
20989 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
20990 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
20991 is a constant.
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.
20996
af4c0e28
JB
209972011-05-06 Juanma Barranquero <lekktu@gmail.com>
20998
20999 * makefile.w32-in: Update dependencies.
21000 (LISP_H): Add inttypes.h and stdin.h.
21001 (PROCESS_H): Add unistd.h.
21002
c51453d9
EZ
210032011-05-06 Eli Zaretskii <eliz@gnu.org>
21004
21005 * lread.c: Include limits.h (fixes the MS-Windows build broken by
21006 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
21007
8ff0ac3c 210082011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 21009
4c4b566b
PE
21010 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
21011
aab2b9b5
PE
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.
21014
c378da0b
PE
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)
21017
288b08c7
PE
21018 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
21019 bytes.
21020
e3601888
PE
21021 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
21022
db6c0e74
PE
21023 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
21024
dd5963ea
PE
21025 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
21026
88c9450f
PE
21027 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
21028
2f9442b8
PE
21029 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
21030
c032b5f8
PE
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
2d38271b 21034 32-bit int (Bug#8600).
a108c10b
PE
21035
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
48e400f0 21042 not a digit in any supported base. (Bug#8602)
a108c10b 21043
ad5f9eea
PE
21044 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
21045
aec1708a
PE
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.
21049
47be4ab5
PE
21050 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
21051
371cac43
PE
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>.
04f2d78b
CB
21055 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
21056 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 21057
d01a7826
PE
21058 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
21059 (EMACS_UINTPTR): Likewise, with uintptr_t.
21060
7fd47d5c
PE
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
21064 large files.
122b0c86
PE
21065 However, temporarily disable this change unless the temporary
21066 symbol WIDE_EMACS_INT is defined.
7fd47d5c 21067
8727937b
PE
21068 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
21069
8ac068ac
PE
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.
21099
ede49d71
PE
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
21103 the sign bit.
21104 * lisp.h (get_random): Change signature to match.
21105
2f30ecd0
PE
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.
21113
2a866e7b
PE
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 *.
21118
51639eac
PE
21119 * eval.c (Fautoload): Don't double-shift a pointer.
21120
92394119
PE
21121 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
21122
dbdb9a7c
JB
211232011-05-06 Juanma Barranquero <lekktu@gmail.com>
21124
21125 * gnutls.c (DEF_GNUTLS_FN):
21126 * image.c (DEF_IMGLIB_FN): Make function pointers static.
21127
db7a0b4f
AS
211282011-05-05 Andreas Schwab <schwab@linux-m68k.org>
21129
21130 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
21131 marker. (Bug#8610)
21132
cd394be1 211332011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
21134
21135 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
21136 New version that can reserve upto 2GB of heap space.
21137
f7ff1b0f 211382011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
21139
21140 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
21141
639c109b
TZ
211422011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
21143
21144 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
21145 `gnutls_certificate_set_x509_key_file'.
21146
d2127135
JB
211472011-05-05 Juanma Barranquero <lekktu@gmail.com>
21148
21149 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
21150 Update dependencies.
21151
e968f4f3
JB
211522011-05-04 Juanma Barranquero <lekktu@gmail.com>
21153
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.
21158
84d358f0
JB
211592011-05-04 Juanma Barranquero <lekktu@gmail.com>
21160
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".
21164
0898ca10
JB
211652011-05-04 Juanma Barranquero <lekktu@gmail.com>
21166
21167 Implement dynamic loading of GnuTLS on Windows.
21168
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):
21172 Declare.
21173
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.
21188
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.
21194
21195 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
21196
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.
21203
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.
21207
21208 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
21209
ff4de4aa
TZ
212102011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
21211
21212 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
21213 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
21214 as passed in.
21215
abe95abb
JD
212162011-05-03 Jan Djärv <jan.h.d@swipnet.se>
21217
21218 * xterm.c (x_set_frame_alpha): Do not set property on anything
21219 else than FRAME_X_OUTER_WINDOW (Bug#8608).
21220
e16e55d4
JB
212212011-05-02 Juanma Barranquero <lekktu@gmail.com>
21222
21223 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
21224
bafcf6a5
JB
212252011-05-02 Juanma Barranquero <lekktu@gmail.com>
21226
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.
21236
e7a6747f
AS
212372011-05-01 Andreas Schwab <schwab@linux-m68k.org>
21238
19ed11ba
AS
21239 * callproc.c: Indentation fixup.
21240
e7a6747f 21241 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
21242 (wait_for_termination, interruptible_wait_for_termination):
21243 Move after wait_for_termination_1.
e7a6747f 21244
1ef14cb4
LMI
212452011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
21246
21247 * sysdep.c (interruptible_wait_for_termination): New function
21248 which is like wait_for_termination, but allows keyboard
21249 interruptions.
21250
21251 * callproc.c (Fcall_process): Add (:file "file") as an option for
21252 the STDOUT buffer.
21253 (Fcall_process_region): Ditto.
21254
330d880c
EZ
212552011-04-30 Eli Zaretskii <eliz@gnu.org>
21256
8db90b73
EZ
21257 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
21258 rather than `XVECTOR (FOO)->size'.
21259
330d880c
EZ
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
21262 system headers.
21263
15cbd324
EZ
212642011-04-21 Eli Zaretskii <eliz@gnu.org>
21265
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)
21269
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.
21277
212782011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 21279
ae940cca
EZ
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)
21284
03ab8921
EZ
21285 * window.c (window_scroll_line_based): Use a marker instead of
21286 simple variables to record original value of point. (Bug#7952)
21287
afda1437
EZ
21288 * doprnt.c (doprnt): Fix the case where a multibyte sequence
21289 produced by %s or %c overflows available buffer space. (Bug#8545)
21290
f76dee0c
PE
212912011-04-28 Paul Eggert <eggert@cs.ucla.edu>
21292
21293 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 21294 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 21295
fdc5744d
JB
212962011-04-28 Juanma Barranquero <lekktu@gmail.com>
21297
21298 * w32.c (init_environment): Warn about defaulting HOME to C:\.
21299
638f053a
JB
213002011-04-28 Juanma Barranquero <lekktu@gmail.com>
21301
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.
21307
d178f871
EZ
213082011-04-28 Eli Zaretskii <eliz@gnu.org>
21309
21310 * doprnt.c (doprnt): Don't return value smaller than the buffer
21311 size if the message was truncated. (Bug#8545).
21312
b124fd93
JB
213132011-04-28 Juanma Barranquero <lekktu@gmail.com>
21314
21315 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
21316 (Fx_window_property): #if-0 the whole functions, not just the bodies.
21317
e810457d
PE
213182011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21319
21320 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
21321
ea51cceb
JB
213222011-04-27 Juanma Barranquero <lekktu@gmail.com>
21323
21324 * makefile.w32-in: Update dependencies.
21325
94dcfacf
EZ
213262011-04-27 Eli Zaretskii <eliz@gnu.org>
21327
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.
21333
21334 * eval.c (verror): Simplify calculation of size_t.
21335
21336 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
21337 messages.
21338
f61f41d7
PE
213392011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
21340
21341 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
21342 change.
21343
96fb4434
PE
213442011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21345
21346 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
21347 This makes this file independent of the recent pseudovector change.
21348
671875da 213492011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 21350
69e9b5a3
PE
21351 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
21352
b5f869a7 21353 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 21354 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 21355 Remove unused local.
c8926152 21356 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 21357
841a1577 21358 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
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
eab3844f
PE
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
f904488f 21366 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
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.
f904488f
PE
21370 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
21371 the size member.
eab3844f
PE
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.
f904488f 21377 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
21378 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
21379 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
21380 (ASIZE): Now uses header.size rather than size.
21381 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
21382 to avoid the hassle of writing XVECTOR (foo)->header.size.
21383 (struct vectorlike_header): New type.
eab3844f
PE
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
f904488f 21391 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
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
21404 special case.
21405 * process.c (Fformat_network_address): Use local var for size,
21406 for brevity.
21407
0df1eac5
PE
21408 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
21409
847ab9d1 21410 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
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.
bc0a5c13 21421 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 21422 (read1): Do not accept +. and -. as integers; this
452f4150
PE
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.
04f2d78b 21430 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
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
bc0a5c13 21436 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
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.
452f4150 21439
67769ffc
PE
21440 * textprop.c (set_text_properties_1): Rewrite for clarity,
21441 and to avoid GCC warning about integer overflow.
21442
c20db43f
PE
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.
21448 All uses changed.
37aa2f85
PE
21449 (offset_intervals): Tell GCC not to worry about length overflow
21450 when negating a negative length.
c20db43f 21451
2538aa2f
PE
21452 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
21453 (overrun_check_free): Likewise.
21454
f2d3008d
PE
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
21457 word size.
21458
ec8df744
PE
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.
21464
640ee02d
PE
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.
21468
6048fb2a
PE
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.
21473
fa3c87e1
PE
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.
21476
2172544b
PE
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.
21480
9b821a21
PE
21481 * fns.c (internal_equal): Don't assume size_t fits in int.
21482
3c616cfa
PE
21483 * alloc.c (compact_small_strings): Tighten assertion a little.
21484
c2982e87
PE
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.
61bdb816 21490 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
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
21497 64-bit hosts.
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
21502 to int.
6f04d126
PE
21503 Use pI instead of if-then-else-abort. Use %p to avoid casts,
21504 avoiding the 0 flag, which is not portable.
c2982e87
PE
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.
6f04d126 21510 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
21511 (x_stop_queuing_selection_requests): Likewise.
21512 (x_get_window_property): Don't truncate byte count to an 'int'
21513 when tracing.
0b432f21 21514
5e073ec7
PE
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.
21519
36372bf9
PE
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.
21528
0b432f21
PE
21529 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
21530 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
21531 (string_overrun_cookie): Now const. Use initializers that
21532 don't formally overflow signed char, to avoid warnings.
000098c1
PE
21533 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
21534 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
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).
d0f4e1f5 21538 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 21539
895009e1
JB
215402011-04-26 Juanma Barranquero <lekktu@gmail.com>
21541
21542 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
21543
6a7a1b0b
TZ
215442011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
21545
21546 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 21547 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
21548 Reported by Paul Eggert <eggert@cs.ucla.edu>.
21549
841a1577 215502011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
21551
21552 * lisp.h (Qdebug): List symbol.
895009e1 21553 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
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.
21557
f2d3ba6f
DN
215582011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
21559
21560 * alloc.c (check_sblock, check_string_bytes)
21561 (check_string_free_list): Convert to standard C.
21562
42ce4c63
TZ
215632011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
21564
21565 * w32.c (emacs_gnutls_push): Fix typo.
21566
825cd63c
EZ
215672011-04-25 Eli Zaretskii <eliz@gnu.org>
21568
fb11d64d
EZ
21569 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
21570 "cast to pointer from integer of different size".
21571
825cd63c
EZ
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
21575 using `alloca'.
21576
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
21579 xmalloc anew.
21580
e061a11b
TZ
215812011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
21582
21583 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
21584 callbacks stage.
21585
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.
9173deec
JB
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.
e061a11b
TZ
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.
21599
21600 * w32.h (emacs_gnutls_pull): Add prototype.
21601 (emacs_gnutls_push): Likewise.
21602
21603 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
21604 (emacs_gnutls_push): Likewise.
21605
216062011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
21607
21608 * process.c (wait_reading_process_output): Check if GnuTLS
21609 buffered some data internally if no FDs are set for TLS
21610 connections.
21611
21612 * makefile.w32-in (OBJ2): Add gnutls.$(O).
21613 (LIBS): Link to USER_LIBS.
21614 ($(BLD)/gnutls.$(0)): New target.
21615
fa6996bc
EZ
216162011-04-24 Eli Zaretskii <eliz@gnu.org>
21617
eb35682e
EZ
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
21621 commentary.
21622
e2ad650c
EZ
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
21626 of arguments.
21627
1b2de274
EZ
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 **';
21632 adjust.
21633
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 **'.
21637
21638 * xfaces.c <Qunspecified>: Make extern again.
21639
21640 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 21641 required by POSIX.
1b2de274 21642
762b15be
EZ
21643 * doc.c (get_doc_string): Improve the format passed to `error'.
21644
21645 * doprnt.c (doprnt): Improve commentary.
21646
21647 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
21648
21649 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
21650 them with etags.
21651
f1052e5d
EZ
21652 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
21653 changes in globals.h immediately force recompilation.
762b15be
EZ
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.
f1052e5d 21657
fa6996bc
EZ
21658 * character.c (Fchar_direction): Function deleted.
21659 (syms_of_character): Don't defsubr it.
21660 <char-direction-table>: Deleted.
21661
e6c3da20
EZ
216622011-04-23 Eli Zaretskii <eliz@gnu.org>
21663
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.
04f2d78b
CB
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.
e6c3da20
EZ
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.
21672
21673 * lisp.h (doprnt): Restore prototype.
21674
21675 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
21676 $(SRC)/character.h.
21677
21678 * Makefile.in (base_obj): Add back doprnt.o.
21679
21680 * deps.mk (doprnt.o): Add back prerequisites.
21681 (callint.o): Depend on character.h.
21682
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.
21687
21688 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
21689
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.
21694
21695 * character.c (char_string): Use %x to display the (unsigned)
21696 codepoint of an invalid character, to avoid displaying a bogus
21697 negative value.
21698
21699 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
21700 `error', not SYMBOL_NAME itself.
21701
21702 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
21703 character arguments to `error'.
21704
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'.
21709
4ffd0d6b 217102011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
21711
21712 * s/ms-w32.h (localtime): Redirect to sys_localtime.
21713
21714 * w32.c: Include <time.h>.
21715 (sys_localtime): New function.
21716
4ffd0d6b 217172011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
21718
21719 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
21720
4ffd0d6b 21721 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 21722
4ffd0d6b 217232011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 21724
4ffd0d6b
GM
21725 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
21726 zombies (Bug#8467).
aac0c6e3 21727
04c56954
EZ
217282011-04-19 Eli Zaretskii <eliz@gnu.org>
21729
21730 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
21731 gl_state.e_property when gl_state.object is Qt.
21732
21733 * insdel.c (make_gap_larger): Remove limitation of buffer size
21734 to <= INT_MAX.
21735
16a43933
CY
217362011-04-18 Chong Yidong <cyd@stupidchicken.com>
21737
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.
21742
21743 * term.c (produce_glyphless_glyph): Handle cons cell entry in
21744 glyphless-char-display.
21745
4581706e
CY
217462011-04-17 Chong Yidong <cyd@stupidchicken.com>
21747
21748 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
21749
21750 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
21751
21752 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
21753 definition for no-X builds.
21754
4887c6e2 217552011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 21756
fd35b6f9
PE
21757 Static checks with GCC 4.6.0 and non-default toolkits.
21758
5c1ccb01
PE
21759 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
21760
006c5daa
PE
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.
21764
efc736d3
PE
21765 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
21766
4e2fe2e6
PE
21767 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
21768
f97334a2
PE
21769 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
21770
4e75f29d
PE
21771 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
21772 Define only if needed.
21773
90efadd1
PE
21774 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
21775 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 21776 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 21777
3c647824
PE
21778 * dispextern.h (struct redisplay_interface): Rename param
21779 to avoid shadowing.
e264f262 21780 * termhooks.h (struct terminal): Likewise.
761383f4 21781 * xterm.c (xembed_send_message): Likewise.
3c647824 21782
b58c5c4a
PE
21783 * insdel.c (make_gap_smaller): Define only if
21784 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
21785
cad59032
PE
21786 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
21787 it.
21788
c339dc2e
PE
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.
21791
91a3e27b
PE
21792 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
21793
399c71d3 21794 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 21795
8ffc96f5
PE
21796 * xfns.c (x_real_positions): Mark locals as initialized.
21797
eef9bc79
PE
21798 * xmenu.c (xmenu_show): Don't use uninitialized vars.
21799
098db9dd
PE
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.
dda3aedd
PE
21802 (x_dispatch_event): Declare static if USE_GTK, and
21803 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 21804 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 21805 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
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.
098db9dd 21808
eb18f6cc
PE
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.
21814
1fe72bf8
PE
21815 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
21816
60d9e1db
PE
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.
21820
39261c26
PE
21821 * keyboard.c (make_lispy_event): Remove unused local var.
21822
018c5e19
PE
21823 * frame.c, frame.h (x_get_resource_string): Bring this back, but
21824 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
21825
63d2b86e
PE
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
21829 than 0xab.
21830
aefd87e1
PE
21831 * xgselect.c (xgselect_initialize): Check vs interface
21832 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
21833
bf501fb9
PE
21834 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
21835
e9829fdf
PE
21836 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
21837 to read-only memory.
21838
1086c095
PE
21839 * fns.c (vector): Remove; this old hack is no longer needed.
21840
2baccd04 21841 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 21842 Remove unused var.
dde42981 21843 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 21844
72391843 21845 * xrdb.c (x_load_resources): Omit unused local.
3565b346 21846
436c16df 21847 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 21848 (x_window): Rename locals to avoid shadowing.
dc5ddd85 21849 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 21850
92bb796d 21851 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 21852 (x_term_init): Remove local to avoid shadowing.
92bb796d 21853
764430a3 21854 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
21855
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.
21858
d1dfb56c
EZ
218592011-04-16 Eli Zaretskii <eliz@gnu.org>
21860
c4354cb4
EZ
21861 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
21862
d1dfb56c
EZ
21863 Fix regex.c, syntax.c and friends for buffers > 2GB.
21864 * syntax.h (struct gl_state_s): Declare character position members
21865 EMACS_INT.
21866
21867 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
21868
04f2d78b
CB
21869 * textprop.c (verify_interval_modification, interval_of):
21870 Declare arguments EMACS_INT.
d1dfb56c
EZ
21871
21872 * intervals.c (adjust_intervals_for_insertion): Declare arguments
21873 EMACS_INT.
21874
21875 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
21876
21877 * indent.c (Fvertical_motion): Local variable it_start is now
21878 EMACS_INT.
21879
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
21885 appropriate.
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'.
21889
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.
21894
613052cd
BK
218952011-04-16 Ben Key <bkey76@gmail.com>
21896
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.
21904
4170f62f 219052011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 21906
71b41406
PE
21907 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
21908
9587a89d
PE
21909 emacs_write: Accept and return EMACS_INT for sizes.
21910 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
21911 et seq.
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
21915 partial writes.
21916 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
21917 (emacs_read, emacs_write): Remove check for negative size, as the
21918 Emacs source code has been audited now.
9587a89d
PE
21919 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
21920 (emacs_read, emacs_write): Use it.
273a5f82
PE
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.
9587a89d 21924 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 21925
3e047f51
PE
21926 * sound.c: Don't assume sizes fit in 'int'.
21927 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 21928 Return EMACS_INT, not int.
3e047f51 21929 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
21930 Accept EMACS_INT, not int.
21931 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
21932 record read return values.
21933
cc39a9db
BK
219342011-04-15 Ben Key <bkey76@gmail.com>
21935
c9d0ec6d
JB
21936 * keyboard.c (Qundefined): Don't declare static since it is used
21937 in nsfns.m.
21938 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
21939 static since they are used in nsfont.m.
cc39a9db 21940
6c60eb9f
SM
219412011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
21942
21943 * process.c (Qprocessp): Don't declare static.
21944 * lisp.h (Qprocessp): Declare again.
21945
7990b61a
JB
219462011-04-15 Juanma Barranquero <lekktu@gmail.com>
21947
21948 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
21949
5d4cb038
PE
219502011-04-14 Paul Eggert <eggert@cs.ucla.edu>
21951
8bd7b830 21952 Improve C-level modularity by making more things 'static'.
cd64ea1d 21953
e3b27b31
PE
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
21957 that need them.
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.
21961
5d4cb038
PE
21962 * sysdep.c (croak): Now static, if
21963 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
21964 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
21965
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.
93ea6e8f 21969
e87b6180
PE
21970 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
21971 Define only if USE_LUCID.
21972
ac64929e
PE
21973 * xrdb.c (x_customization_string, x_rm_string): Now static.
21974
6f37259d
PE
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.
21977
1683e3ab
PE
21978 * xdisp.c (draw_row_with_mouse_face): Now static.
21979 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
21980
de9c2632
PE
21981 * window.h (check_all_windows): Mark externally visible.
21982
2b96acb7
PE
21983 * window.c (window_deletion_count): Now static.
21984
21985 * undo.c: Make symbols static if they're not exported.
21986 (last_undo_buffer, last_boundary_position, pending_boundary):
21987 Now static.
21988
50436f33
PE
21989 * textprop.c (interval_insert_behind_hooks): Now static.
21990 (interval_insert_in_front_hooks): Likewise.
21991
64520e5c
PE
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
8bd7b830 21999 HAVE_WINDOW_SYSTEM.
64520e5c
PE
22000 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
22001 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
22002
1fa53021
PE
22003 * sysdep.c: Make symbols static if they're not exported.
22004 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
22005 Now static.
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.
22010
d4b43b22
PE
22011 * syntax.c (syntax_temp): Define only if !__GNUC__.
22012
b7c513d0
PE
22013 * sound.c (current_sound_device, current_sound): Now static.
22014
989b29ad
PE
22015 * search.c (searchbufs, searchbuf_head): Now static.
22016
13a55a78
PE
22017 * scroll.c (scroll_cost): Remove; unused.
22018 * dispextern.h (scroll_cost): Remove decl.
22019
de68a1fc
PE
22020 * region-cache.h (pp_cache): Mark as externally visible.
22021
40ccffa6
PE
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.
22029
ad64fc97
PE
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):
22034 Now static.
22035 * lisp.h (Fprinc): Remove decl.
22036 (debug_output_compilation_hack): Mark as externally visible.
22037
adddb265
PE
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.
22041
1717ede2
PE
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.
22045
fa5fb2bc
PE
22046 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
22047
1e3890d1
PE
22048 * lread.c: Make symbols static if they're not exported.
22049 (read_objects, initial_obarray, oblookup_last_bucket_number):
22050 Now static.
22051 (make_symbol): Remove; unused.
22052 * lisp.h (initial_obarray, make_symbol): Remove decls.
22053
8a1414fa
PE
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):
22062 Now static.
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.
22076
93ea6e8f
PE
22077 * intervals.c: Make symbols static if they're not exported.
22078 (merge_properties_sticky, merge_interval_right, delete_interval):
22079 Now static.
22080 * intervals.h (merge_interval_right, delete_interval): Remove decls.
22081
77382fcc
PE
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):
4889fc82 22086 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
22087 (adjust_after_replace_noundo): Remove; unused.
22088 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 22089 (signal_before_change): Remove decls.
77382fcc 22090
9306c32e
PE
22091 * indent.c (val_compute_motion, val_vmotion): Now static.
22092
cd44d2eb
PE
22093 * image.c: Make symbols static if they're not exported.
22094 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
22095 if USE_GTK.
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.
22098
ad9a7a06
PE
22099 * fringe.c (standard_bitmaps): Now static.
22100 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
22101
81626931
PE
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.
22111
239f9db9
PE
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.
04f2d78b
CB
22121 * xfaces.c (face_at_string_position):
22122 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
22123 since 0 is always ASCII.
22124
dfcf3579
PE
22125 * fns.c (weak_hash_tables): Now static.
22126
5045092b
PE
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.
22130
57a96f5c
PE
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.
22134
35f08c38
PE
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):
22138 Now static.
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.
22144
f44bd759
PE
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.
22149
b532497d
PE
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):
22154 Now static.
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):
22160 Remove decls.
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 &&
22164 USE_X_TOOLKIT.
22165
1675728f
PE
22166 * ftxfont.c: Make symbols static if they're not exported.
22167 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
22168 HAVE_FREETYPE.
22169 * font.h (ftxfont_driver): Likewise.
22170
e4cebfca
PE
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.
22183
5bf46f05
PE
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):
22189 Now static.
22190 (redraw_garbaged_frames): Remove; unused.
22191
435f4c28
PE
22192 * xfaces.c: Make symbols static if they're not exported.
22193 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
22194 Remove decls.
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.
22201
8524aef3
PE
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):
22210 Likewise.
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.
22219
16390cd2
PE
22220 * dired.c (file_name_completion): Now static.
22221
22222 * dbusbind.c (xd_in_read_queued_messages): Now static.
22223
a25f4dfa
PE
22224 * lisp.h (circular_list_error, FOREACH): Remove; unused.
22225 * data.c (circular_list_error): Remove.
22226
14a9c8df
PE
22227 * commands.h (last_point_position, last_point_position_buffer):
22228 (last_point_position_window): Remove decls.
22229 * keyboard.c: Make these variables static.
22230
04f2d78b
CB
22231 * coding.h (coding, code_convert_region, encode_coding_gap):
22232 Remove decls.
74ab6df5
PE
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.
22236
38dfbee1
PE
22237 * chartab.c (chartab_chars, chartab_bits): Now static.
22238
a2cb4e63
PE
22239 * charset.h (charset_iso_8859_1): Remove decl.
22240 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
22241 Now static.
22242
127198fd
PE
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.
22246
d85b608f
PE
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.
22250
31cd66f3
PE
22251 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
22252 * lisp.h: Remove these decls.
22253
c358e587
PE
22254 * buffer.c (buffer_count): Remove unused var.
22255
e78aecca
PE
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.
22261
e192d7d3 22262 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 22263 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 22264
92470028
PE
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.
22270
244ed907
PE
22271 alloc.c: Import and export fewer symbols, and remove unused items.
22272 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
22273 is defined.
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):
22285 Now static.
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.
22290
61c2b50e 22291 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
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.
22306
95c82688
PE
22307 * lisp.h (DEFINE_FUNC): Make sname 'static'.
22308
16a97296
PE
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.
8bd7b830
PE
22314 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
22315 (Finit_image_library):
16a97296
PE
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.
95c82688 22322
16a97296
PE
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):
22360 Now internal.
22361 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
22362 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
22363
785bbd42
PE
22364 * editfns.c (Fformat): Remove unreachable code.
22365
8b913b57
AS
223662011-04-14 Andreas Schwab <schwab@linux-m68k.org>
22367
22368 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
22369 change. (Bug#8496)
22370
a6744a35
EZ
223712011-04-13 Eli Zaretskii <eliz@gnu.org>
22372
22373 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
22374 when at ZV. (Bug#8487)
22375
e7974947
AS
223762011-04-12 Andreas Schwab <schwab@linux-m68k.org>
22377
baad03f0
AS
22378 * charset.c (Fclear_charset_maps): Use xfree instead of free.
22379 (Bug#8437)
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.
22385
e7974947
AS
22386 * alloc.c (overrun_check_malloc, overrun_check_realloc)
22387 (overrun_check_free): Protoize.
22388
28272684
PE
223892011-04-12 Paul Eggert <eggert@cs.ucla.edu>
22390
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.
22396
11997c76
EZ
223972011-04-11 Eli Zaretskii <eliz@gnu.org>
22398
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
e896f03c 22401 is outside the buffer's accessible region. (Bug#8468)
11997c76 22402
8a2cbd72
EZ
224032011-04-10 Eli Zaretskii <eliz@gnu.org>
22404
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.
22409
22410 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
22411 argument, local variables, and return value.
22412
22413 * lisp.h: Update prototypes of emacs_write and emacs_read.
22414
22415 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
22416
4073e537 224172011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 22418
1ebfdcb6
PE
22419 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
22420
b2ded58d
PE
22421 Fix more problems found by GCC 4.6.0's static checks.
22422
7d66342c
PE
22423 * xdisp.c (vmessage): Use a better test for character truncation.
22424
bbf47d44
PE
22425 * charset.c (load_charset_map): <, not <=, for optimization,
22426 and to avoid potential problems with integer overflow.
9248994d 22427 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 22428 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 22429 * editfns.c (Fformat): Likewise.
1e69125e 22430 * syntax.c (skip_chars): Likewise.
3befa583 22431
e3019616
PE
22432 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
22433 This also lets GCC 4.6.0 generate slightly better loop code.
22434
becfa255
PE
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.
22439
dae0cd48
PE
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.
22447
76032d70
PE
22448 * keyboard.c (read_char): Remove unused var.
22449
eb3f1cc8
PE
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.
22458
70476b54
PE
22459 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
22460
12020a9e
PE
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).
ea6c7ae6
PE
22464 * lisp.h (doprnt): Remove.
22465 * Makefile.in (base_obj): Remove doprnt.o.
22466 * deps.mk (doprnt.o): Remove.
22467
5fdb398c
PE
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.
61bdb816 22472 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
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
22479 do that.
22480 * charset.c (check_iso_charset_parameter): Convert internal
22481 character to string before calling 'error', since %c now has the
22482 printf meaning.
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.
22488
b189fa66
PE
22489 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
22490
bff87ef0
PE
22491 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
22492
7e2cac20
PE
22493 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
22494
ce4d90b5
PE
22495 * xterm.c (x_catch_errors): Remove duplicate declaration.
22496
266c9547
PE
22497 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
22498
79c49ad2
PE
22499 * xdisp.c, lisp.h (message_nolog): Remove; unused.
22500
368f4090
JM
225012011-04-10 Jim Meyering <meyering@redhat.com>
22502
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.
22510
a32d4040
CY
225112011-04-09 Chong Yidong <cyd@stupidchicken.com>
22512
22513 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
22514
8546720e 225152011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 22516
04f2d78b
CB
22517 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
22518 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 22519
8546720e
GM
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.
aac0c6e3 22524
0a2f5c1a 225252011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
22526
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.
22533
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.
22537
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>:
22553 Declare EMACS_INT.
22554 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
22555 (encode_invocation_designation): Last argument P_NCHARS is now
22556 EMACS_INT.
22557 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
22558 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
22559
22560 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
22561 All users changed.
22562
22563 * ccl.c (Fccl_execute_on_string): Declare some variables
22564 EMACS_INT.
22565
8546720e 225662011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
22567
22568 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
22569
4e19a977
CS
225702011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
22571
22572 * process.c (Fformat_network_address): Doc fix.
22573
87302331
R
225742011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
22575
ee7683eb 22576 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 22577
cbb59342
CY
225782011-04-08 Chong Yidong <cyd@stupidchicken.com>
22579
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.
e0d38eeb 22583 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
22584
22585 * print.c (internal_with_output_to_temp_buffer): Function deleted.
22586
22587 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
22588
e67a13ab
CY
225892011-04-06 Chong Yidong <cyd@stupidchicken.com>
22590
04f2d78b
CB
22591 * process.c (Flist_processes): Remove to Lisp.
22592 (list_processes_1): Delete.
e67a13ab 22593
973f782d
EZ
225942011-04-06 Eli Zaretskii <eliz@gnu.org>
22595
7c106b1e
EZ
22596 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
22597
973f782d
EZ
22598 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
22599
41cf7d1a 226002011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 22601
ca23cc88
PE
22602 Fix more problems found by GCC 4.6.0's static checks.
22603
f390e2d5
PE
22604 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
22605
42eea0d0
PE
22606 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
22607
b69769da 22608 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 22609
f9541e84
PE
22610 * xdisp.c (vmessage): Mark as a printf-like function.
22611
13841b55
PE
22612 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
22613
c136c10f
PE
22614 * sound.c (sound_warning): Don't crash if arg contains a printf format.
22615
5e2d4a30
PE
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.
22620
583f48b9
PE
22621 * eval.c (Fsignal): Remove excess argument to 'fatal'.
22622
b25d760e
PE
22623 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
22624 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
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.
b25d760e 22631
bc7b6697 22632 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 22633 (xfont_open): Avoid unnecessary tests.
bc7b6697 22634
27ccc379
PE
22635 * composite.c (composition_gstring_put_cache): Use unsigned integer.
22636
dcd5c89a
PE
22637 * composite.h, composite.c (composition_gstring_put_cache):
22638 Use EMACS_INT, not int, for length.
22639
b13a45c6
PE
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.
22645
1e792e4d
PE
22646 * textprop.c (set_text_properties_1): Change while to do-while,
22647 since the condition is always true at first.
22648
dc6c6455 22649 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
22650 (interval_deletion_adjustment): Return unsigned value.
22651 All uses changed.
dc6c6455 22652
aba7731a
PE
22653 * process.c (list_processes_1, create_pty, read_process_output):
22654 (exec_sentinel): Remove vars that were set but not used.
afd4052b 22655 (create_pty): Remove unnecessary "volatile"s.
bc57d757 22656 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 22657 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 22658 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 22659
fdfc4bf3
PE
22660 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
22661
fca8fe46 22662 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 22663 (update_syntax_table): Use unsigned instead of int.
fca8fe46 22664
06a0259a 22665 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 22666 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 22667 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 22668
e7b9e80f
PE
22669 * print.c (print_error_message): Avoid int overflow.
22670
56201685
PE
22671 * font.c (font_list_entities): Redo for clarity,
22672 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
22673
78834453 22674 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 22675 (font_score): Avoid potential overflow in diff calculation.
78834453 22676
0bc0b309 22677 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 22678 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 22679
e610eaca
PE
22680 * eval.c (funcall_lambda): Rename local to avoid shadowing.
22681
b895abce
PE
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.
22685
1f1d9321 22686 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 22687 (wordify): Omit three unnecessary tests.
1f1d9321 22688
c59478bc
PE
22689 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
22690 All callers changed. This avoids the need for an unused var.
22691
79b73827
PE
22692 * casefiddle.c (casify_region): Remove var that is set but not used.
22693
a4db5dfe
PE
22694 * dired.c (file_name_completion): Remove var that is set but not used.
22695
43aae36e
PE
22696 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
22697
2a47c44d 22698 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 22699 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 22700
a37c69bf
PE
22701 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
22702 Check for integer overflow on size calculations.
22703
328ab8e7
PE
22704 * buffer.c (Fprevious_overlay_change): Remove var that is set
22705 but not used.
22706
e5a2a5cb
PE
22707 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
22708 Remove vars that are set but not used.
8d84a6eb 22709 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 22710 (timer_check_2): Mark vars as initialized.
e5a2a5cb 22711
a60e5f68
PE
22712 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
22713
f661cb61 22714 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 22715 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 22716
f0397f5a
PE
22717 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
22718 that are set but not used.
22719
8664db06 22720 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 22721 if XCreateBitmapFromData fails (Bug#8410).
8664db06 22722
6abdaa4a
PE
22723 * xselect.c (x_get_local_selection, x_handle_property_notify):
22724 Remove vars that are set but not used.
22725
0ce7538d 22726 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 22727 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 22728
9ae848fc
PE
22729 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
22730 Remove var that is set but not used.
0b918413
PE
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.
9ae848fc 22734
a5a62657
PE
22735 * xfaces.c (realize_named_face): Remove vars that are set but not used.
22736 (map_tty_color) [!defined MSDOS]: Likewise.
22737
5c5cdd39
PE
22738 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
22739
66ebf983
PE
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.
22746
1be4d761
PE
22747 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
22748 that is set but not used.
22749
47553fa8
PE
22750 * print.c (print_object): Remove var that is set but not used.
22751
1f7196bf 22752 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
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.
fdb61804
PE
22761 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
22762 ../lib/careadlinkat.h.
d1fdcab7 22763
f84c17c7
SM
227642011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
22765
22766 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
22767 first non-nil return value).
22768
ef3862ad
JD
227692011-04-03 Jan Djärv <jan.h.d@swipnet.se>
22770
22771 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
22772 if not defined (Bug#8403).
22773
376a7006
JB
227742011-04-02 Juanma Barranquero <lekktu@gmail.com>
22775
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.
22785
6ca3801d
JM
227862011-04-02 Jim Meyering <meyering@redhat.com>
22787
22788 do not dereference NULL upon failed strdup
22789 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
22790 (ns_get_family): Likewise.
22791
d8e2b5ba
JB
227922011-04-02 Juanma Barranquero <lekktu@gmail.com>
22793
22794 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
22795
8c74fcbd
JD
227962011-04-02 Jan Djärv <jan.h.d@swipnet.se>
22797
22798 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
22799 later (Bug#8403).
22800
7200d79c
SM
228012011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
22802
03408648 22803 Add lexical binding.
7200d79c 22804
03408648
SM
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.
22808
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):
22815 Mark as dynamic.
22816 (syms_of_lread): Declare `lexical-binding'.
22817
22818 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
22819
22820 * keyboard.c (eval_dyn): New fun.
22821 (menu_item_eval_property): Use it.
ca105506
SM
22822
22823 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 22824
03408648
SM
22825 * fns.c (concat, mapcar1): Accept byte-code-functions.
22826
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.
22835 Handle closures.
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.
23aba0ea 22843
23aba0ea 22844 * doc.c (Fdocumentation, store_function_docstring):
03408648 22845 * data.c (Finteractive_form): Handle closures.
23aba0ea 22846
03408648
SM
22847 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
22848 interactive spec.
ba83908c 22849
04f2d78b
CB
22850 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
22851 New byte-codes.
03408648
SM
22852 (exec_byte_code): New function extracted from Fbyte_code to handle new
22853 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 22854
03408648 22855 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 22856
03408648 22857 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 22858
e2abce01
JB
228592011-03-31 Juanma Barranquero <lekktu@gmail.com>
22860
22861 * xdisp.c (redisplay_internal): Fix prototype.
22862
63696a73 228632011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 22864
63696a73 22865 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
22866 (try_scrolling): Use it when setting scroll_limit.
22867 Limit scrolling to 100 screen lines.
63696a73
EZ
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)
22871
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
09725d26
EZ
22882 threshold of 100 lines for never-recentering scrolling.
22883
e4cc2dfc
JB
228842011-03-31 Juanma Barranquero <lekktu@gmail.com>
22885
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.
22893
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'.
22897
1c470562
SM
228982011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
22899
44f230aa
SM
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.
22904
1c470562
SM
22905 * bytecode.c (Fbyte_code): CAR and CDR can GC.
22906
888adce9
ZK
229072011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
22908
22909 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
22910 binding" message (bug#7967).
22911
f838ed7b
PE
229122011-03-30 Paul Eggert <eggert@cs.ucla.edu>
22913
77861b95
PE
22914 Fix more problems found by GCC 4.6.0's static checks.
22915
de6dbc14
PE
22916 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
22917 Remove unused local var.
22918
f838ed7b
PE
22919 * editfns.c (Fmessage_box): Remove unused local var.
22920
792c7b2b
PE
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.
c499e557 22924 * window.c (shrink_windows): Omit unused local var.
b01a1c29 22925 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
22926 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
22927 Omit unused local var.
22928
ba0165e1
PE
22929 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
22930 Don't assume string length fits in int.
32ad8845 22931 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 22932 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 22933
3c59b4c9
PE
22934 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
22935 instead of alloca (Bug#8344).
22936
a3eed478 22937 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 22938 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 22939
eb4d412d
PE
22940 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
22941
1658b401
PE
22942 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
22943 concerns.
22944
22945 * term.c (produce_glyphless_glyph): Remove unnecessary test.
22946
22947 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 22948
9a2c6e05
PE
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.
22952
03d0a109
PE
22953 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
22954
44f730c8
PE
22955 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
22956
fe75f926
PE
22957 * chartab.c (sub_char_table_ref_and_range): Redo for slight
22958 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
22959
ffa8c828
PE
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.
22963
c5101a77
PE
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.
77861b95 22969 All variadic functions and their callers changed accordingly.
c5101a77
PE
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.
22980
dd3f25f7
PE
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.
22984
461c2ab9
JB
229852011-03-28 Juanma Barranquero <lekktu@gmail.com>
22986
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.
22990
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.
23000
f6d62986
SM
230012011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
23002
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.
23009
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.
23017
1db5b1ad
JB
230182011-03-28 Juanma Barranquero <lekktu@gmail.com>
23019
23020 * dispextern.h (string_buffer_position): Remove declaration.
23021
23022 * print.c (strout): Remove parameter `multibyte', unused since
23023 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
23024
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.
23028
23029 * w32.c (_wsa_errlist): Use braces for struct initializers.
23030
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.
23041
5ffb62aa
JD
230422011-03-27 Jan Djärv <jan.h.d@swipnet.se>
23043
23044 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
23045
461c2ab9 230462011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
23047
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.
23056
5c380ffb
JD
230572011-03-27 Jan Djärv <jan.h.d@swipnet.se>
23058
23059 * nsmenu.m (runDialogAt): Remove argument to timer_check.
23060
9af30bdf
GM
230612011-03-27 Glenn Morris <rgm@gnu.org>
23062
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.
23069
e2abce01
JB
230702011-03-26 Eli Zaretskii <eliz@gnu.org>
23071
23072 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
23073 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
23074
f868cd8a
JB
230752011-03-26 Juanma Barranquero <lekktu@gmail.com>
23076
59eb0929
JB
23077 * w32.c (read_unc_volume): Use parameter `henum', instead of
23078 global variable `wget_enum_handle'.
23079
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'.
23083
f868cd8a
JB
23084 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
23085
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.
23090
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'.
23095
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'.
23100
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.
23104
2ecf6fdb
CY
231052011-03-25 Chong Yidong <cyd@stupidchicken.com>
23106
23107 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
23108 incurred during fontification.
23109
6b1f9ba4
JB
231102011-03-25 Juanma Barranquero <lekktu@gmail.com>
23111
23112 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
23113 (DEFVAR_PER_BUFFER): Don't pass it.
23114
23115 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
23116 (scrolling_window): Don't pass it.
23117
0f4a96b5
JB
231182011-03-25 Juanma Barranquero <lekktu@gmail.com>
23119
23120 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
23121
23122 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
23123 and `suffix'.
23124 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
23125 of variables specific to SELinux and computation of `encoded_absname'.
23126
23127 * image.c (XPutPixel): Remove unused variable `height'.
23128
23129 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
23130
23131 * unexw32.c (get_section_info): Remove unused variable `section'.
23132
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'.
23136
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'.
23142
23143 * w32inevt.c (w32_console_read_socket):
23144 Remove unused variable `no_events'.
23145
23146 * w32term.c (x_draw_composite_glyph_string_foreground):
23147 Remove unused variable `width'.
23148
1149507c
JB
231492011-03-24 Juanma Barranquero <lekktu@gmail.com>
23150
23151 * w32term.c (x_set_glyph_string_clipping):
23152 Don't pass uninitialized region to CombineRgn.
23153
9c88f339
JB
231542011-03-23 Juanma Barranquero <lekktu@gmail.com>
23155
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'.
23159
23160 * w32font.c (w32font_draw): Return number of glyphs.
23161 (w32font_open_internal): Remove unused variable `i'.
23162 (w32font_driver): Add missing initializer.
23163
23164 * w32menu.c (utf8to16): Remove unused variable `utf16'.
23165 (fill_in_menu): Remove unused variable `items_added'.
23166
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'.
23170
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.
23175
dee091a3
JD
231762011-03-23 Julien Danjou <julien@danjou.info>
23177
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):
23190 Use Frun_hooks.
0f4a96b5 23191 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 23192 unconditionally since it does the check itself.
dee091a3 23193
2c520ab5 231942011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 23195
c9c49752
PE
23196 Fix more problems found by GCC 4.5.2's static checks.
23197
8abc3f12
PE
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.
23201
a2d26660
PE
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
b12ef411 23205 of objects (Bug#8318).
a2d26660 23206
916c72e9
PE
23207 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
23208 that could (at least in theory) be that large.
23209
19ab8a18
PE
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.
b7cbbd6f
PE
23214 (pint2hrstr): Simplify and tune code slightly.
23215 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 23216
f0641eff
PE
23217 * scroll.c (do_scrolling): Work around GCC bug 48228.
23218 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
23219
7f650bb9
PE
23220 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
23221 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
23222 (validate_x_resource_name): Simplify count usage.
23223 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 23224
37dd57d1
PE
23225 * fileio.c (Fcopy_file): Report error if fchown or fchmod
23226 fail (Bug#8306).
81e56e61 23227
699979fc 23228 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 23229
401bf9b4
PE
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
591b2973 23233 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
23234 (Fmake_network_process, server_accept_connection):
23235 (wait_reading_process_output, read_process_output):
23236 Likewise.
23237
b93aacde
PE
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.
4dc343ee 23242 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 23243 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 23244 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 23245 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 23246 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 23247
af8a867c 23248 Make tparam.h and terminfo.c consistent.
44f230aa
SM
23249 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
23250 Include tparam.h instead, since it declares them.
af8a867c
PE
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.
23259
0248044d 23260 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 23261 (xftfont_open): Rename locals to avoid shadowing.
0248044d 23262
8ff096c1 23263 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
23264 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
23265 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 23266 (ftfont_list): Remove unused local.
49eaafba
PE
23267 (get_adstyle_property, ftfont_pattern_entity):
23268 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
23269 Rename locals to avoid shadowing.
8ff096c1 23270
e2be39f6
PE
23271 * xfont.c (xfont_list_family): Mark var as initialized.
23272
c9735e30
PE
23273 * xml.c (make_dom): Now static.
23274
8f5201ae
PE
23275 * composite.c (composition_compute_stop_pos): Rename local to
23276 avoid shadowing.
b246f932
PE
23277 (composition_reseat_it): Remove unused locals.
23278 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 23279 (composition_update_it): Mark var as initialized.
11b61122
PE
23280 (find_automatic_composition): Mark vars as initialized,
23281 with a FIXME (Bug#8290).
8f5201ae 23282
760fbc2c
PE
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.
23289
ff08eb85
PE
23290 * textprop.c (property_change_between_p): Remove; unused.
23291
fc7bf025
PE
23292 * intervals.c (interval_start_pos): Now static.
23293
235d7abc
PE
23294 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
23295
44f230aa
SM
23296 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
23297 Rename locals to avoid shadowing.
3e7d6594 23298
50060332
PE
23299 * sound.c (wav_play, au_play, Fplay_sound_internal):
23300 Fix pointer signedness.
d01f234b 23301 (alsa_choose_format): Remove unused local var.
c83b8872
PE
23302 (wav_play): Initialize a variable to 0, to prevent undefined
23303 behavior (Bug#8278).
50060332 23304
c4fc4e30
PE
23305 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
23306
918436ed
PE
23307 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
23308
c939f91b
PE
23309 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
23310 clobbering (Bug#8298).
b9c7f648
PE
23311 * sysdep.c (sys_subshell): Likewise.
23312 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 23313
6bd8c144
PE
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.
23317
7710357c 23318 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 23319 (relocate_fd): Rename locals to avoid shadowing.
7710357c 23320
c59da222
CY
233212011-03-22 Chong Yidong <cyd@stupidchicken.com>
23322
23323 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
23324 not to be necessary, and produces flickering.
23325
66b87493
GM
233262011-03-20 Glenn Morris <rgm@gnu.org>
23327
23328 * config.in: Remove file.
23329
45b6f6d5
JB
233302011-03-20 Juanma Barranquero <lekktu@gmail.com>
23331
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.
23335
cd394be1 233362011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
23337
23338 * minibuf.c (completing-read-function): New variable.
23339 (completing-read-default): Rename from completing-read.
23340 (completing-read): Call completing-read-function.
23341
b14e3e21
CY
233422011-03-19 Juanma Barranquero <lekktu@gmail.com>
23343
23344 * xfaces.c (Fx_load_color_file):
23345 Read color file from absolute filename (bug#8250).
23346
f2b726e6
JB
233472011-03-19 Juanma Barranquero <lekktu@gmail.com>
23348
23349 * makefile.w32-in: Update dependencies.
23350
09f6ff02
EZ
233512011-03-17 Eli Zaretskii <eliz@gnu.org>
23352
23353 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
23354
29a6015a
PE
233552011-03-17 Paul Eggert <eggert@cs.ucla.edu>
23356
a3a6c54e
PE
23357 Fix more problems found by GCC 4.5.2's static checks.
23358
b766f867
PE
23359 * process.c (make_serial_process_unwind, send_process_trap):
23360 (sigchld_handler): Now static.
23361
be02381c
PE
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.
23368
57048744
PE
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.
23371
7914961c 23372 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
23373 (CONSTANTLIM): Remove; unused.
23374 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
23375 Define only if needed.
7914961c 23376
b3967b18
PE
23377 * unexelf.c (unexec): Name an expression,
23378 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
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.
73366a00 23381 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 23382
29a6015a
PE
23383 * deps.mk (unexalpha.o): Remove; unused.
23384
43cfc33e 23385 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 23386 * unexec.h: New file.
ce701a33
PE
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.
381259ef 23393 Change as necessary to match prototype in unexec.h.
ce701a33 23394
01f44d5a
PE
23395 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
23396 shadowing.
4f63c6bb 23397 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 23398
a6670b0b
PE
23399 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
23400 Rename locals to avoid shadowing.
23401
cef2010d 23402 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 23403 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 23404
d4d7173a
PE
23405 * print.c (Fredirect_debugging_output): Fix pointer signedess.
23406
f08b802a
PE
23407 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
23408 warning when compiling print.c.
23409
3ddb0639
PE
23410 * font.c (font_unparse_fcname): Abort in an "impossible" situation
23411 instead of using an uninitialized var.
5ad03b97 23412 (font_sort_entities): Mark var as initialized.
3ddb0639 23413
170a2692
PE
23414 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
23415
e663c700
PE
23416 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
23417 pointers to constants.
89bc529a 23418 (font_parse_fcname): Remove unused vars.
7b81e2d0 23419 (font_delete_unmatched): Now static.
ea838e10 23420 (font_get_spec): Remove; unused.
13a547c6
PE
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.
e663c700 23424
2a80c887 23425 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 23426 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 23427
1384fa33 23428 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 23429 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 23430
8b2c52e9
PE
23431 * alloc.c (mark_backtrace): Move decl from here ...
23432 * lisp.h: ... to here, so that it can be checked.
23433
475545b5 23434 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 23435 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
23436 (lisp_indirect_variable): Name an expression,
23437 to avoid gcc -Wbad-function-cast warning.
1faed8ae 23438 (Fdefvar): Rename locals to avoid shadowing.
475545b5 23439
b1349114 23440 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 23441 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 23442 Use const pointer when appropriate.
b1349114 23443
a2928364
PE
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.
63c5d10b
PE
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.
545b49b4
PE
23451 (Fformat_time_string, Fencode_time, Finsert_char):
23452 (Ftranslate_region_internal, Fformat):
23453 Rename or remove local vars to avoid shadowing.
9710023e 23454 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 23455
a415e694
PE
23456 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
23457 avoid shadowing.
23458
8ef4622d
PE
23459 * lisp.h (eassert): Check that the argument compiles, even if
23460 ENABLE_CHECKING is not defined.
23461
946f9a5b
PE
23462 * data.c (Findirect_variable): Name an expression, to avoid
23463 gcc -Wbad-function-cast warning.
112396d6 23464 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 23465 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
23466 (Fmake_variable_buffer_local, Fmake_local_variable):
23467 Mark variables as initialized.
52746918 23468 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 23469
e5aab7e7 23470 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
23471 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
23472 Rename locals to avoid shadowing.
dff45157
PE
23473 (mark_stack): Move local variables into the #ifdef region where
23474 they're used.
7bc26fdb
PE
23475 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
23476 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
23477 needed otherwise.
23478 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
23479 (GC_STRING_CHARS): Remove; not used.
d40d4be1 23480 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 23481
e5aab7e7
PE
23482 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
23483 avoids undefined behavior in theory.
23484
4da60324
PE
23485 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
23486
88043301
PE
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.
0da09c43 23495 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 23496 the race-condition problem in the old DOWNCASE.
88043301 23497
19ed5445
PE
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.
abbd1bcf
PE
23501 (regex_compile, re_search_2, re_match_2_internal):
23502 Remove unused local vars.
952db0d7
PE
23503 (FREE_VAR): Rewrite so as not to use empty "else",
23504 which gcc can warn about.
da053e48 23505 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
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):
23512 Remove; unused.
19ed5445 23513
1f3561e4 23514 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
23515 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
23516 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 23517
ded6f8f7
PE
23518 * search.c (simple_search): Remove unused var.
23519
dbd37a95
PE
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.
23523
7e47afad
PE
23524 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
23525
85f24f61
PE
23526 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
23527 All uses changed.
23528 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
23529 Rename locals to avoid shadowing.
5671df8f 23530 (Fvertical_motion): Mark locals as initialized.
85f24f61 23531
181aa2be 23532 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 23533 (casify_region): Mark local as initialized.
181aa2be 23534
930d429c
PE
23535 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
23536
7082eac6
PE
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
23541 of the new macros.
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
23545 changed.
38b2c076
PE
23546 * dired.c (directory_files_internal, file_name_completion):
23547 Rename locals to avoid shadowing.
23548
15206ed9
PE
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
23557 are used.
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.
23569
4a6bea26
PE
23570 * dired.c (directory_files_internal_unwind): Now static.
23571
f14b7e14
PE
23572 * fileio.c (file_name_as_directory, directory_file_name):
23573 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
23574 Now static.
2893f146
PE
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.
fd4ead52 23578 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
23579 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
23580 signedness issues.
f839df0c
PE
23581 (Fset_file_times, Finsert_file_contents, auto_save_error):
23582 Rename locals to avoid shadowing.
f14b7e14 23583
5716756e 23584 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
23585 (Ftry_completion, Fall_completions): Rename or remove locals
23586 to avoid shadowing.
5716756e 23587
b4c3046a
PE
23588 * marker.c (bytepos_to_charpos): Remove; unused.
23589
b45db522
PE
23590 * lisp.h (verify_bytepos, count_markers): New decls,
23591 so that gcc does not warn that these functions aren't declared.
23592
85876d07
PE
23593 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
23594 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 23595 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 23596 (copy_text): Remove unused local var.
85876d07 23597
03d78a21 23598 * filelock.c (within_one_second): Now static.
b3dd38ab 23599 (lock_file_1): Rename local to avoid shadowing.
03d78a21 23600
5df8f01b
PE
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
23604 matter.
b1d876f1 23605 (switch_to_buffer_1): Now static.
8f54f30a
PE
23606 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
23607 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 23608
a70072c9 23609 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 23610 Fix pointer signedness issue.
edced198
PE
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.
15dfd3d9 23613 (MAXPATHLEN): Define only if needed.
a70072c9 23614
a0977c44
PE
23615 * process.c (serial_open, serial_configure): Move decls from here ...
23616 * systty.h: ... to here, so that they can be checked.
23617
a884fdcc
PE
23618 * fns.c (get_random, seed_random): Move extern decls from here ...
23619 * lisp.h: ... to here, so that they can be checked.
23620
604efe86 23621 * sysdep.c (reset_io): Now static.
b8950c94 23622 (wait_for_termination_signal): Remove; unused.
604efe86 23623
38fc62d9
PE
23624 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
23625 (copy_keymap_item, append_key, push_text_char_description):
23626 Now static.
1004a21a 23627 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 23628 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
23629 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
23630 (describe_map_tree):
23631 Rename locals to avoid shadowing.
38fc62d9 23632
2f2650da
PE
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.
69a058fa
PE
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.
c8a06054 23641 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 23642 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 23643
a053e86c 23644 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
23645 (mark_kboards): Move decl here ...
23646 * alloc.c (mark_kboards): ... from here.
a053e86c 23647
4752793e
PE
23648 * lisp.h (force_auto_save_soon): New decl.
23649
74f10ca7 23650 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
23651 (DEFINE_DUMMY_FUNCTION): New macro.
23652 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
23653 Use it.
c03cd23f
PE
23654 (main): Add casts to avoid warnings
23655 if GCC considers string literals to be constants.
74f10ca7 23656
022e70d4
PE
23657 * lisp.h (fatal_error_signal): Add decl, since it's exported.
23658
59d6fe83
PE
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 *.
23665
78320123
PE
23666 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
23667 if GCC considers string literals to be constants.
49cebcca 23668 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 23669
35ac2a97
SM
236702011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
23671
fb103ca9
SM
23672 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
23673 (print_preprocess, print_object): New macro to fix last change.
23674
35ac2a97
SM
23675 * print.c (print_preprocess): Don't forget font objects.
23676
62973b41
JB
236772011-03-16 Juanma Barranquero <lekktu@gmail.com>
23678
23679 * emacs.c (USAGE3): Doc fixes.
23680
0e48bb22
AS
236812011-03-15 Andreas Schwab <schwab@linux-m68k.org>
23682
23683 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
23684 structure.
23685
7684e57b
JB
236862011-03-14 Juanma Barranquero <lekktu@gmail.com>
23687
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.
23692
23693 * w32select.c: Don't #include "keyboard.h".
c96bbc66 23694 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
23695
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.
23710
2aa46d6c
CY
237112011-03-14 Chong Yidong <cyd@stupidchicken.com>
23712
c96bbc66 23713 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 23714
cffc6f3b
CY
237152011-03-13 Chong Yidong <cyd@stupidchicken.com>
23716
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.
23720
44f230aa
SM
23721 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
23722 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
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.
23726
23727 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
23728
23729 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
23730
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.
23733
23734 * xdisp.c (hscroll_window_tree):
23735 (reconsider_clip_changes): Use PT instead of BUF_PT.
23736
d251f04b
EZ
237372011-03-13 Eli Zaretskii <eliz@gnu.org>
23738
23739 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
23740 $(EMACS_ROOT)/lib/intprops.h.
23741
f0c77cd1
PE
237422011-03-13 Paul Eggert <eggert@cs.ucla.edu>
23743
3eca4629
PE
23744 Fix more problems found by GCC 4.5.2's static checks.
23745
7c86ee98
PE
23746 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
23747 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
23748 (xg_free_frame_widgets): Make it clear that a local variable is
23749 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
23750 (gdk_window_get_screen): Make it clear that this macro is needed
23751 only if USE_GTK_TOOLTIP.
1e5524e7
PE
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.
65dc836c
PE
23757 (get_utf8_string, xg_get_file_with_chooser):
23758 Rename locals to avoid shadowing.
23759 (create_dialog): Move locals to avoid shadowing.
7c86ee98 23760
41729b81
PE
23761 * xgselect.c (xg_select): Remove unused var.
23762
f0c77cd1
PE
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.
ec6cf4c6 23766 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 23767
ce0ad53d 23768 * image.c (clear_image_cache): Now static.
d5d5a617 23769 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 23770 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
23771 (x_edge_detection): Remove unnecessary cast that
23772 gcc -Wbad-function-cast diagnoses.
2037898d 23773 (gif_load): Fix pointer signedness.
6ae141d6
PE
23774 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
23775 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 23776
33383987 237772011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 23778
d32df629
PE
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>.
b8d9bd41
PE
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.
d32df629
PE
23797 (lisp_time_argument): Don't rely on undefined left-shift and
23798 right-shift behavior when checking for time stamp overflow.
8be6f318 23799
fe31d94c
PE
23800 * editfns.c (time_overflow): New function, refactoring common code.
23801 (Fformat_time_string, Fdecode_time, Fencode_time):
23802 (Fcurrent_time_string): Use it.
23803
8be6f318
PE
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.
23808
09d9db2c 238092011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 23810
126bc0dc
YM
23811 * fringe.c (update_window_fringes): Remove unused variables.
23812
c47cbdfd
YM
23813 * unexmacosx.c (copy_data_segment): Also copy __got section.
23814 (Bug#8223)
23815
7ac80be9
EZ
238162011-03-12 Eli Zaretskii <eliz@gnu.org>
23817
c96bbc66 23818 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
23819 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
23820 Constify `char *' arguments and their references according to
23821 prototypes in tparam.h.
23822
ecb0f94d 23823 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 23824
7ac80be9
EZ
23825 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
23826 Adapt all references accordingly.
23827
23828 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
23829
ef1fd07e
TT
238302011-03-11 Tom Tromey <tromey@redhat.com>
23831
23832 * buffer.c (syms_of_buffer): Remove obsolete comment.
23833
7ef4b50c
EZ
238342011-03-11 Eli Zaretskii <eliz@gnu.org>
23835
23836 * termhooks.h (encode_terminal_code): Declare prototype.
23837
23838 * msdos.c (encode_terminal_code): Don't declare prototype.
23839
23840 * term.c (encode_terminal_code): Now external again, used by
23841 w32console.c and msdos.c.
23842
44f230aa
SM
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.
7ef4b50c 23845
4b1ec863 238462011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 23847
1714f52b 23848 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 23849
4b1ec863
PE
23850 * fringe.c (update_window_fringes): Mark locals as initialized
23851 (Bug#8227).
23852 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 23853
524c7aa6
PE
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.
23858
a5c0af81 23859 * fontset.c (free_realized_fontset): Now static.
7519b8cd 23860 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 23861 (fontset_font): Mark local as initialized.
a9a06e0b 23862 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 23863
b4716021
PE
23864 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
23865
811e9bac 23866 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 23867 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
23868 (x_own_selection, Fx_disown_selection_internal): Rename locals
23869 to avoid shadowing.
23870 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 23871
7e3ab302
PE
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.
58d2d479
PE
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.
6b437900 23879 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 23880 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
23881 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
23882 Remove unused locals.
7e3ab302
PE
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
23886 macros.
f78faa98 23887
e2b13473
PE
23888 * xterm.h (x_mouse_leave): New decl.
23889
77f23912
PE
23890 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
23891 Remove unused functions.
cdf4ba58
PE
23892 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
23893 (x_calc_absolute_position): Now static.
7411c686 23894 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 23895 Don't declare local "event" unless it's used.
ed7bf3a5
PE
23896 (x_iconify_frame, x_free_frame_resources): Don't declare locals
23897 unless they are used.
38d0b34a
PE
23898 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
23899 (x_fatal_error_signal): Remove; not used.
a6067996
PE
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.
28f1c698 23905 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 23906 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 23907
44f230aa
SM
23908 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
23909 Rename or move locals to avoid shadowing.
6b463e58 23910 (tty_defined_color, merge_face_heights): Now static.
5967d051 23911 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
23912 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
23913 does not deduce is never used uninitialized.
73719eba
PE
23914 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
23915 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 23916
426994c3 23917 * terminal.c (store_terminal_param): Now static.
5489860b 23918
032f1620 23919 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 23920 (set_frame_menubar): Remove unused local.
d4323972 23921 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
23922 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
23923 since they might point to immutable storage.
281585b0
PE
23924 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
23925 since it's unused otherwise.
032f1620 23926
367c19e5 23927 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 23928 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
23929 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
23930 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 23931 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
23932 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
23933 does not deduce are never used uninitialized.
70739cbe 23934
07b48fa9
PE
23935 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
23936
8868a238 23937 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
23938 * window.c (window_loop, size_window):
23939 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 23940
7e5cf297 23941 * window.c (display_buffer): Now static.
d6550a9f
PE
23942 (size_window): Mark variables that gcc -Wuninitialized
23943 does not deduce are never used uninitialized.
a586633d
PE
23944 * window.h (check_all_windows): New decl, to forestall
23945 gcc -Wmissing-prototypes diagnostic.
5b555da1 23946 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 23947
f6095868
PE
23948 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
23949 shadowing.
23950 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
23951 Include <limits.h>.
23952 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
23953 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
23954 (load_charset_map): Mark variables that gcc -Wuninitialized
23955 does not deduce are never used uninitialized.
53df7c11 23956 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 23957
f38b440c
PE
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.
2735d060
PE
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.
e2f1bab9
PE
23970 * coding.c (emacs_mule_char, encode_invocation_designation):
23971 Now static, since they're not used elsewhere.
413bb2db 23972 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 23973 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
23974 (decode_coding_emacs_mule): Mark variables that gcc
23975 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
23976 (detect_coding_iso_2022): Initialize a local variable that might
23977 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 23978 this initialization is needed. (Bug#8211)
5f58e762
PE
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.
f38b440c 23984
232b38b9 23985 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 23986 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 23987 * character.c (string_count_byte8): Likewise.
232b38b9 23988
fb90da1b
PE
23989 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
23990 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
23991
fb93dbc2
PE
23992 * chartab.c (copy_sub_char_table): Now static, since it's not used
23993 elsewhere.
5c156ace
PE
23994 (sub_char_table_ref_and_range, char_table_ref_and_range):
23995 Rename locals to avoid shadowing.
bbcd0949 23996 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 23997
7d3b3862 23998 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 23999 (BIDI_BOB): Remove unused macro.
7d3b3862 24000
6be7d3da
PE
24001 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
24002 deduce are never used uninitialized.
c2ed9c8b 24003 * term.c (encode_terminal_code): Likewise.
6be7d3da 24004
75f8807f 24005 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 24006
50938595
PE
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.
24017
fbceeba2
PE
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.
fbceeba2 24026
7f3f1250
PE
24027 * term.c (term_mouse_position): Rename local to avoid shadowing.
24028
e6ca6543
PE
24029 * alloc.c (mark_ttys): Move decl from here ...
24030 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
24031
c40f8d15
AS
240322011-03-11 Andreas Schwab <schwab@linux-m68k.org>
24033
24034 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
24035
cfe0661d
JB
240362011-03-09 Juanma Barranquero <lekktu@gmail.com>
24037
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.
24041
0afb4571
J
240422011-03-08 Jan Djärv <jan.h.d@swipnet.se>
24043
24044 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
24045 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
24046 for ! HAVE_GTK3.
24047 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
24048
24049 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
24050
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
24063 for HAVE_GTK3.
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)
44f230aa
SM
24067 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
24068 Call gtk_widget_get_preferred_size.
0afb4571
J
24069 (xg_frame_resized): gdk_window_get_geometry only takes 5
24070 parameters.
44f230aa
SM
24071 (xg_win_to_widget, xg_event_is_for_menubar):
24072 Call gdk_x11_window_lookup_for_display.
0afb4571
J
24073 (xg_set_widget_bg): New function.
24074 (delete_cb): New function.
895009e1 24075 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 24076 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
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
24082 if ! HAVE_GTK3.
24083 (update_frame_tool_bar): Call gtk_widget_hide.
24084 (xg_initialize): Use GDK_KEY_g.
24085
24086 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
24087 if ! HAVE_GTK3
24088 (x_session_initialize): Call gdk_x11_set_sm_client_id.
24089
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.
24093
1c2cc4ef
JB
240942011-03-08 Juanma Barranquero <lekktu@gmail.com>
24095
24096 * w32xfns.c (select_palette): Check success of RealizePalette against
24097 GDI_ERROR, not zero.
24098
33383987 24099See ChangeLog.11 for earlier changes.
aac0c6e3
MR
24100
24101;; Local Variables:
24102;; coding: utf-8
aac0c6e3
MR
24103;; End:
24104
ab422c4d 24105 Copyright (C) 2011-2013 Free Software Foundation, Inc.
aac0c6e3
MR
24106
24107 This file is part of GNU Emacs.
24108
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.
24113
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.
24118
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/>.