Commit graph

33704 commits

Author SHA1 Message Date
Kenichi Handa
2e58893d16 merge trunk 2012-10-13 22:11:40 +09:00
Kenichi Handa
0ba06a77fd coding.c (detect_coding): Set coding->id before calling this->detector. 2012-10-13 21:58:52 +09:00
Andreas Schwab
ce2fe65ae1 * fileio.c: Formatting fixes. 2012-10-13 10:55:26 +02:00
Paul Eggert
d6453ce497 Fix some stat-related races.
* fileio.c (Fwrite_region): Avoid race condition if a file is
removed or renamed by some other process immediately after Emacs
writes it but before Emacs stats it.  Do not assume that stat (or
fstat) succeeds.
* image.c (slurp_file): Resolve the file name with fopen + fstat
rather than stat + fopen.
(pbm_read_file) [0]: Remove unused code with stat race.
* process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
Remove ineffective code with stat race.
2012-10-12 17:52:01 -07:00
Stefan Monnier
06485aa821 * src/doc.c (get_doc_string): Don't signal an error if the file is missing.
* lisp/help-fns.el (describe-variable, describe-function-1):
* lisp/help-mode.el (help-make-xrefs): Remove error handler, made unneeded.
2012-10-12 16:11:50 -04:00
Jan Djärv
167e3640f1 * nsterm.m (hold_event_q): New static variable.
(EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
! q_event_ptr.
(hold_event): New function.
(ns_read_socket): If hold_event_q have events, store them and
return.
(setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
is zero (Bug#12384).
2012-10-12 19:50:39 +02:00
Juanma Barranquero
c40239dff9 src/makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies. 2012-10-12 18:32:40 +02:00
Eli Zaretskii
99b1553e07 Fix typo in last change. 2012-10-12 17:30:06 +02:00
Eli Zaretskii
2a9f109915 Update dependencies in src/makefile.w32-in.
src/makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
2012-10-12 17:22:50 +02:00
Eli Zaretskii
bb385a92ec Fix bug #12587 with slow startup on MS-Windows with Netlogon service.
src/fileio.c (check_existing): New function.
 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
 instead of calling 'stat', when what's needed is to check whether
 a file exists.  This avoids expensive system calls on MS-Windows.
 src/w32.c (init_environment): Call 'check_existing' instead of 'stat'.
 src/lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
 determine whether a file exists and is not a directory.
 src/lisp.h (check_existing): Add prototype.
2012-10-12 17:19:54 +02:00
Eli Zaretskii
605a3df681 Add comments about how non-GUI input works on MS-Windows. 2012-10-12 16:14:35 +02:00
Jan Djärv
2b9c2e6850 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct. 2012-10-12 12:01:05 +02:00
Glenn Morris
81749a2374 * src/buffer.c (Fset_buffer): Doc fix. (Bug#12624) 2012-10-11 21:47:40 -04:00
Stefan Monnier
389a94a53d * src/buffer.c (Fkill_buffer): Null out the overlay list(s) as well. 2012-10-11 16:32:11 -04:00
Stefan Monnier
5253a5fd75 Fix spurious "cl--defsubst-expand might not be defined at runtime"
* lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to long-ago
changes to the format of load-history.
* src/eval.c (Fautoload): Remember previous autoload status in load-history.
2012-10-11 16:08:38 -04:00
Paul Eggert
7cded46f2b lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
* lread.c (load_each_byte, new_backquote_flag, readchar)
(read_filtered_event, lisp_file_lexically_bound_p)
(safe_to_load_version, Fload, complete_filename_p, openp)
(build_load_history, readevalloop, read_escape, read1)
(string_to_number, read_vector, read_list):
* macros.c (Fstart_kbd_macro):
* marker.c (CONSIDER):
* menu.c (parse_single_submenu, digest_single_submenu)
(find_and_return_menu_selection, Fx_popup_menu):
* minibuf.c (read_minibuf_noninteractive, read_minibuf)
(Ftry_completion):
* nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
(ns_menu_show):
* xmenu.c (set_frame_menubar, create_and_show_popup_menu)
(xmenu_show, xdialog_show):
Use bool for booleans.
* lread.c (safe_to_load_version): Rename from safe_to_load_p,
as it's not a predicate.  All uses changed.  Omit unnecessary
buffer termination.
2012-10-11 09:23:37 -07:00
Dmitry Antipov
549c3414d9 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
(save_excursion_restore): Do not restore mark if it was not saved.
2012-10-11 17:23:12 +04:00
Paul Eggert
fd2f90cf5c * marker.c (cached_modiff): EMACS_INT, not int. 2012-10-10 21:33:12 -07:00
Paul Eggert
c1af190b72 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
instead of having a wrong decl.
2012-10-10 17:32:25 -07:00
Paul Eggert
e85aafe7bd * nsmenu.m (waiting_for_input): Remove wrong decl. 2012-10-10 17:26:58 -07:00
Paul Eggert
9fa1de305a keyboard.c, keymap.c: Use bool for booleans.
* dispnew.c (sit_for): Distinguish between 3-way display_option
and boolean do_display.
* keyboard.c (single_kboard, this_command_key_count_reset)
(waiting_for_input, echoing, immediate_quit, input_pending)
(interrupt_input, interrupts_deferred, pop_kboard)
(temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
(command_loop_1, adjust_point_for_property)
(safe_run_hooks_error, input_polling_used, read_char):
(help_char_p, readable_events, kbd_buffer_events_waiting)
(kbd_buffer_get_event, timer_check_2, make_lispy_event)
(lucid_event_type_list_p, get_input_pending):
(gobble_input, menu_separator_name_p, menu_bar_item)
(parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
(read_char_minibuf_menu_prompt, access_keymap_keyremap)
(keyremap_step, test_undefined, read_key_sequence)
(detect_input_pending, detect_input_pending_ignore_squeezables)
(detect_input_pending_run_timers, requeued_events_pending_p)
(quit_throw_to_read_char, Fset_input_interrupt_mode):
* keymap.c (get_keymap, keymap_parent, keymap_memberp)
(access_keymap_1, access_keymap, map_keymap, get_keyelt)
(Fdefine_key, Flookup_key, struct accessible_keymaps_data)
(accessible_keymaps_1, Fkey_description, push_key_description):
(shadow_lookup, struct where_is_internal_data)
(where_is_internal, Fwhere_is_internal, where_is_internal_1)
(Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
(describe_map, describe_vector):
* menu.c (single_menu_item):
* nsmenu.m (ns_update_menubar):
* process.c (wait_reading_process_output):
* search.c (scan_buffer, scan_newline):
Use bool for boolean.
* keyboard.c (timers_run, swallow_events)
(detect_input_pending_run_timers):
* process.c (wait_reading_process_output):
Use unsigned for counter where wraparound-on-overflow is desired,
since unsigned is guaranteed to have that behavior and signed is not.
(read_char): Use ptrdiff_t for string length.
(get_input_pending): Remove first argument, since it was always
the same pointer-to-int (now pointer-to-boolean) &input_pending,
and behave as if it had that value.  Return new value of
input_pending.  All callers changed.
* keyboard.h (struct kboard): Use unsigned : 1 for boolean member
immediate_echo.  Use ptrdiff_t for echo_after_prompt, since it's
a string length.
* keymap.c (push_key_description): Omit last arg, which was always 1.
All callers changed.
2012-10-10 13:09:47 -07:00
Paul Eggert
e738ca5624 * regex.c (immediate_quit) [emacs]: Remove duplicate decl. 2012-10-10 12:53:26 -07:00
Juanma Barranquero
29f21cdf23 src/makefile.w32-in: Update dependencies. 2012-10-10 17:59:49 +02:00
Dmitry Antipov
6aea752802 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
* lisp.h (enum pvec_type): Adjust comments and omit explicit
initializer for PVEC_NORMAL_VECTOR.
2012-10-10 19:31:21 +04:00
Paul Eggert
5f3f57be38 Clean out old termopts cruft.
* termopts.h (flow_control, meta_key): Remove unused decls.
* dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
Don't include termopts.h.
2012-10-10 08:10:57 -07:00
Dmitry Antipov
3e98c68e76 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers. 2012-10-10 18:45:07 +04:00
Paul Eggert
77e344e50a * commands.h (immediate_quit): Remove duplicate decl. 2012-10-09 23:39:16 -07:00
Jan Djärv
5683d7cd9d Remove caching in nsfont.m, the general code does it (I misunderstood).
* nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
caching.
(nsfont_open): Remove setting of Vfonts_in_cache.
(syms_of_nsfont): Remove initialization of Vfonts_in_cache
2012-10-09 20:33:01 +02:00
Eli Zaretskii
b15736e6e3 Fix return type of w32_last_error.
src/w32fns.c (w32_last_error): Change the return value to DWORD, to
 match what GetLastError returns.  Explain better why the function is
 needed.
2012-10-09 20:10:16 +02:00
Eli Zaretskii
cf5fc6dbea Avoid shadowing a global variable by a local one in frame.c.
src/frame.c (delete_frame): Rename local variable 'tooltip_frame' to
 'is_tooltip_frame', to avoid confusion with its global namesake.
2012-10-09 19:58:18 +02:00
Glenn Morris
fd59cb292f ChangeLog fixes 2012-10-08 23:33:51 -07:00
Paul Eggert
a9e7a9d543 Minor tweaks to recently-changed code.
Space before paren, avoid overparenthesization, etc.
2012-10-08 15:14:39 -07:00
Eli Zaretskii
2b1f11ed71 Fix wording in src/ChangeLog entries from last commits. 2012-10-08 21:58:54 +02:00
Daniel Colascione
f99714cef2 * xdisp.c (start_hourglass): Call w32_note_current_window when
HAVE_NTGUI but not WINDOWSNT, resolving a problem that caused Emacs to
display the hourglass cursor forever.
2012-10-08 11:22:42 -08:00
Daniel Colascione
61af95a53c Merge into trunk 2012-10-08 10:47:29 -08:00
Daniel Colascione
821812e247 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
which is broke under remote desktop, calculating the number of
colors available for a display based on the display's number of
planes and number of bits per pixel per plane.  (bug#10397).
2012-10-08 10:44:42 -08:00
Jan Djärv
62c480c90a Fix wide-int related error and cache error in NS font handling.
* nsfont.m (Vfonts_in_cache): New variable.
(nsfont_open): Use unsignedLongLongValue for cache in case wide ints
are used.  Add cached fonts to Vfonts_in_cache.
(syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
2012-10-08 20:31:39 +02:00
Glenn Morris
6b49792308 Add 2012 to copyright years 2012-10-08 09:11:41 -07:00
Juanma Barranquero
46979e0b4e src/makefile.w32-in: Update dependencies. 2012-10-08 16:37:04 +02:00
Juanma Barranquero
fd5125adfe nt/config.nt: Sync with autogen/config.in.
(HAVE_NTGUI): New macro.

src/makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI,
it's now in nt/config.nt.
2012-10-08 16:14:22 +02:00
Juanma Barranquero
607446ba2c src/w32term.c: Remove leftover declaration of keyboard_codepage. 2012-10-08 15:46:03 +02:00
Eli Zaretskii
15c720a360 Fix w32 dependencies due to introduction of w32common.h.
src/makefile.w32-in ($(BLD)/unexw32.$(O)): 
 ($(BLD)/w32.$(O)): 
 ($(BLD)/w32console.$(O)): 
 ($(BLD)/w32fns.$(O)): 
 ($(BLD)/w32heap.$(O)): 
 ($(BLD)/w32menu.$(O)): 
 ($(BLD)/w32proc.$(O)): Add w32common.h.
2012-10-08 15:31:14 +02:00
Daniel Colascione
501199a3db Code cleanup for cygw32 2012-10-08 04:53:18 -08:00
Eli Zaretskii
c54ebba4e0 Update w32 dependencies in the wake of cygw32 changes.
src/makefile.w32-in (FONT_H): Add $(FRAME_H).
 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
 (GLOBAL_SOURCES): Add cygw32.c.

 lib-src/makefile.w32-in (obj): Add cygw32.o.
2012-10-08 14:21:04 +02:00
Eli Zaretskii
b6f4e30044 Avoid compiler warnings on w32, caused by cygw32 changes.
src/w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
 'const char *'.
 (x_to_w32_color): Don't modify the argument, modify a copy instead.
2012-10-08 13:19:35 +02:00
Eli Zaretskii
303cc1d110 Fix wording of comments in w32fns.c. 2012-10-08 13:03:00 +02:00
Daniel Colascione
93aa5c811f Improve fix for jpeglib build break 2012-10-08 02:26:10 -08:00
Eli Zaretskii
8ee4c6ce76 Commit ChangeLog for last change. 2012-10-08 12:07:16 +02:00
Eli Zaretskii
a1d638346f Remove CHECK_LIB_AVAILABLE from image.c, mistakenly reintroduced by cygw32.
src/image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
2012-10-08 12:05:50 +02:00
Eli Zaretskii
d424f3d8f5 Fix conditional macros in emacs.c, introduced by cygw32 addition.
src/emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on Cygwin.
2012-10-08 12:01:59 +02:00