Martin Rudalics [Mon, 15 Oct 2012 09:03:56 +0000 (11:03 +0200)]
Fix Fwindow_end's handling of cached position (Bug#12600).
* window.c (Fwindow_end): Rewrite check whether cached position
can be used (Bug#12600).
(resize_frame_windows, grow_mini_window, shrink_mini_window):
Set windows_or_buffers_changed.
Chong Yidong [Mon, 15 Oct 2012 04:03:04 +0000 (12:03 +0800)]
More documentation fixes for changes to defun, defmacro, etc.
* doc/lispref/functions.texi (Anonymous Functions): Explicitly list the
docstring, declare, and interactive arguments to lambda.
(Defining Functions): Likewise for defun.
(Inline Functions): Likewise for defsubst.
(Declare Form): Tweak description.
* doc/lispref/macros.texi (Defining Macros): defmacro is now a macro.
Explicitly list the docstring and declare arguments.
* image.c (init_tiff_functions, init_imagemagick_functions)
(init_svg_functions): Fix cygw32 build break by using these
functions only when WINDOWSNT _and_ HAVE_NTGUI.
David Engster [Sun, 14 Oct 2012 19:20:28 +0000 (21:20 +0200)]
Merge changes from CEDET upstream.
* semantic.el (semantic-error-if-unparsed): New function. Raise
error if buffer was not parsed by Semantic (bug #12045).
(navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
only if buffer was parsed. Also, replace ':active' with ':enable'
where necessary.
* semantic/wisent/python.el
(semantic-python-get-system-include-path): Use
`python-shell-internal-send-string' if available to query Python
for system paths.
* semantic/senator.el (senator-next-tag):
(senator-previous-tag):
(senator-go-to-up-reference): Use `semantic-error-if-unparsed'.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions): Check if buffer was
parsed. Only raise an error if function was called interactively,
otherwise silently return nil.
* cedet.el (cedet-menu-map): Fix copy&paste typo in menu creation.
Eli Zaretskii [Sun, 14 Oct 2012 07:40:05 +0000 (09:40 +0200)]
Adapt compile.el to changes in MSVC diagnostics format.
lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Adjust the msft regexp to the output of Studio 2010, and move msft
before edg-1. See the discussion on emacs-devel,
http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00579.html,
for the details.
etc/compilation.txt (msft): Add error messages in new Studio 2010
format.
test/automated/compile-tests.el (compile-tests--test-regexps-data):
Add data for msft's new format.
Paul Eggert [Sat, 13 Oct 2012 00:52:01 +0000 (17:52 -0700)]
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.
Stefan Monnier [Fri, 12 Oct 2012 20:11:50 +0000 (16:11 -0400)]
* 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.
Jan Djärv [Fri, 12 Oct 2012 17:50:39 +0000 (19:50 +0200)]
* 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).
Eli Zaretskii [Fri, 12 Oct 2012 15:19:54 +0000 (17:19 +0200)]
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.
* progmodes/python.el (python-mode-map): Replace
subtitute-key-definition with proper command remapping.
(python-nav--up-list): Fix behavior for blocks on the same level.
Stefan Monnier [Thu, 11 Oct 2012 20:08:38 +0000 (16:08 -0400)]
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.
Paul Eggert [Wed, 10 Oct 2012 20:09:47 +0000 (13:09 -0700)]
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.
Jan Djärv [Tue, 9 Oct 2012 18:33:01 +0000 (20:33 +0200)]
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
Michael Albinus [Tue, 9 Oct 2012 12:49:02 +0000 (14:49 +0200)]
* net/tramp.el (tramp-debug-message): Remove
"tramp-with-progress-reporter" from regexp of ignored functions.
(with-tramp-progress-reporter): Rename from
`tramp-with-progress-reporter'.
(with-tramp-file-property, with-tramp-connection-property): Move
from tramp-cache.el, rename from `with-file-property' and
`with-connection-property', respectively.
* net/tramp-cache.el: Remove `with-file-property' and
`with-connection-property'.
Fix shell handling of unbalanced quotes and parens in output.
* progmodes/python.el (python-rx-constituents): Added
string-delimiter.
(python-syntax-propertize-function): Use it.
(python-shell-output-syntax-table): New var.
(inferior-python-mode): Prevent unbalanced parens/quotes from
previous output mess with current input context.
David Engster [Mon, 8 Oct 2012 19:40:50 +0000 (21:40 +0200)]
* semantic/bovine/el.el: Add `semantic-default-elisp-setup' to
`emacs-lisp-mode-hook'. This was accidentally removed during the
CEDET update (2012-10-01T18:10:29Z!cyd@gnu.org).
* 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.
* 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).
Jan Djärv [Mon, 8 Oct 2012 18:31:39 +0000 (20:31 +0200)]
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.