Overwrite mode added, toggled with INSERTKEY
Fixed unreported bug: Backspace at top of text pushed newline onto undo stack
Whole word operations added:
 * Alt-Left/Right: moves cursor/selection a word to the left/right
 * Alt-/Ctrl-Delete/Backspace deletes whole words at a time
Added file info to header. Also reopen was marking text dirty (different from disk) which it isn't.
Prevent editing of linked library Texts
Fix: Convert to spaces/tabs corrupted syntax
Merged from trunk
svn merge -r14988:15170 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Improvements to whole-word ops (thanks mindrones for suggestions).
Added functions to the BPy Text object for positioning the cursor and inserting text. It seems Text.write() actually inserts *then* moves to the end of the buffer, so it doesn't really append as it says in the docs. However, with these new functions both appending and inserting can be achieved.
Text plugin basis with plugin for suggestions/completions. The suggest plugin works for imported global variables, methods, modules and module members. For example typing:

import Blender
from Blender import *
| <- cursor here suggests globals
Blender.Draw.gl| <- cursor here suggests all Draw members starting gl

Currently suggestions are listed in the console when the space is redrawn but will be presented as a menu-style list soon. Also to add are shortcut/activation keys to allow plugins to respond to certain key strokes.
Added UI for suggestions list. Works with arrow-keys and mouse wheel, accept with Enter, reject with Esc or click elsewhere. Mouse selection not yet supported. The script is called from the File->Text Plugins menu.

Tidied python script, the C suggestions functions and fixed some bugs including suggestions not being freed properly.
Added readline() and reset() for reading lines from a Blender Text Object and resetting the pointer to the beginning of the buffer. readline() will return the '\n' character and return '' when the end of the buffer is reached in accordance with other readline methods.
Modifying a file externally or deleting a file linked with a Blender Text object presents options for reloading, saving or separating the Text object from the external file (like the make local idea).
Missed an include in previous commit
Mouse selection (LMB) and confirmation (MMB) added to suggestions UI. Also fixed the problem of offset text (horizontally scrolled).
Fixed own platform bug with stat/fstat.
Any script can now register a unique key combination as part of its bpy header. For a supported space type, the user may press this shortcut to invoke the script.

Space types that are to support shortcuts like this should call BPY_menu_do_shortcut(...) from the event queue read method (See winqreadtextspace in drawtext.c for example)
Created a BPy module BPyTextPlugin to centralize functions used across the text plugin scripts. Also created two more scripts to handle imports and member suggestions.
make gcc happy
Text plugin script updates: Better error handling, variable parsing, token caching for repeat parsing of the same document. Fixed joining of multiline statements and context detection.