Eli Zaretskii [Fri, 19 Oct 2012 10:05:09 +0000 (12:05 +0200)]
Increase the value of BASE_PURESIZE to avoid pure space overflow.
src/puresize.h (BASE_PURESIZE): Bump the base value to 1700000. See
http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
for the reasons.
Stefan Monnier [Thu, 18 Oct 2012 15:37:57 +0000 (11:37 -0400)]
* lisp/emacs-lisp/advice.el: Clean up commentary a bit.
(ad-do-advised-functions, ad-with-originals): Use `declare'.
(byte-code-function-p): Never redefine.
Kenichi Handa [Wed, 17 Oct 2012 23:59:24 +0000 (08:59 +0900)]
international/mule.el (set-keyboard-coding-system): Recover input meta mode when the new coding system doesn not use 8-bit. Supply TERMINAL arg to set-input-meta-mode.
Eli Zaretskii [Wed, 17 Oct 2012 15:37:55 +0000 (17:37 +0200)]
Fix bug #12661 with w32 and cygw32 builds under --enable-check-lisp-object-type.
src/cygw32.c (Fcygwin_convert_path_to_windows)
(Fcygwin_convert_path_from_windows): Use EQ to compare 2
Lisp_Object values.
src/w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
to Lisp_Object.
When renaming a file with wdired move point with file and don't lose mark status (Bug#11795).
* wdired.el (wdired-old-marks): New variable.
(wdired-change-to-wdired-mode): Locally set wdired-old-marks.
(wdired-do-renames): Move point with renamed file and don't lose
mark status (Bug#11795).
Dmitry Antipov [Wed, 17 Oct 2012 04:58:15 +0000 (08:58 +0400)]
Do not verify indirection counters of killed buffers (Bug#12579).
* buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
* buffer.c (compact_buffer, set_buffer_internal_1): Use it.
Dmitry Antipov [Tue, 16 Oct 2012 07:56:44 +0000 (11:56 +0400)]
* alloc.c (Fmake_byte_code): Fix typo in comment.
* print.c (print_interval): Define as static to match prototype.
* indent.c (disptab_matches_widthtab, recompute_width_table):
Convert to eassert.
Stefan Monnier [Mon, 15 Oct 2012 16:49:57 +0000 (12:49 -0400)]
* lisp/erc/erc.el (erc-log): Make it into a defsubst.
(erc-with-server-buffer, define-erc-module, erc-with-buffer)
(erc-with-all-buffers-of-server): Use `declare'.
* lisp/erc/erc-backend.el (erc-log): Adjust autoload accordingly.
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.