General TODO:
------------
- handle X11 window manager close window event and exit cleanly 
- rewrite TODO file with more sections
- remember X11 window positions and restore layout ?
- improve image viewer.
- regex search/replace (use glibc 2.1 regex.c file)
- tab cursor displayed size
- current path in compile set to current buffer path
- avoid problems with popups (kill_buffer, delete_window, split_window)
- avoid error in new file
- faster video handling (generalize invalidate region system)
- check file permissions.
- faster search
- distribute libqhtml as a separate project
- integrate tinySVG renderer based on the new libraster.
- improve speed of text renderer / improve truncate mode (merge some
  good parts with CSS renderer ?). Suppress CRC hack (not reliable).
- set_input_method() and set_buffer_file_coding_system() in config file.
- add custom memory handling functions.
- fix kana input method
- charset: add JIS missing encoding functions
- display alternate cursor in non activate column in hex mode.
- implement wheel mode in CSS display.
- test Hebrew keymap support.
- indent-with-tabs
- fix crash bug on fragments longer than MAX_SCREEN_WIDTH.

C mode TODO:
-----------

- add TAGS support:
  * recursive search of QTAGS file.
  * C decl parser
  * global QTAGS file indexed with global includes
- see if java/javascript/c++ is OK.
- autocomplete
- forward-ifdef, backward-ifdef, show-ifdefs
- automatic indentation detection

HTML mode TODO:
--------------

- OPTIMIZE eb_nextc et al or always duplicate box content (big speed
  improvement).
- polish end of line offset/cursor displacement support.
- handle implicit TR
- add file referencing (<?xml-stylesheet type="text/css" href="xxx"?>,
  <link>, etc...)
- fix LI numbering with VALUE attribute (cannot use CSS). Verify
  counter-reset semantics.
- (z-index) floats must be displayed after all other stuff.
- <NOBR> is sometimes incorrect.
- more font style synthesis in html2ppm.
- add xml CDATA parsing

Ideas
-----

- vi mode.
- vertical scroll bar
- add auto close buffer flag (for list mode)
- improve layout scheme for better scalability.
- make dired and bufed left windows temporary popleft windows
- improve dired (file commands, nicer display)
- rethink mode specific commands -> add inheritance for all commands ?
- add command help in declarations
- make command declaration macros standalone
- dpy_open_font should never return NULL, must have a system font.
- other coloring modes
- scripting
- expression evaluator
- dos/mac translation modes
- minor modes with key override such as "preview" mode
- redefine KEY_Fx to make them sequential
- use failsafe memory allocator and longjmp recover.
- scroll up/down with argument should scroll by screen row.
- simplify C-z A-z accordingly
- fix bof/eof shell mode
- merge hex-mode and ascii mode
- fix configure for missing support: x11 xv png ...
- add configure --disable-graphics
- timers for esc key disambiguation
- move ungot_key to key_context
- allow recursive main loop, and remove input callbacks
- abbreviate lines in file completion list popup
- use trick for entering spaces in filename prompts without completion
- enlarge-window-interactively
- enlarge-window-horizontally
- enlarge-window
- show modified status and mode in bufed
- doctor command should create and show *trace* buffer, remove eb_new kludge
- fix column computation based on display properties:
  (variable pitch, tabs, ^x and \uxxxx stuff -- emacs behaviour) ?
- allow quoting of special keys : let do_char insert xterm/vt100 
  key sequence to allow typing special keys into shell process
- fix scroll up/down to move point if already at end
- fix terminal size inside shell window ?
- cmdline arg to force lines and columns to test shell.
- dired left window delete sometimes doesn't fix layout.

Clean window deletion mess:
---------------------------

detach window from tree and keep attached to buffer if last
detach window from tree and put in delayed free tree otherwise

edit_close(s)
do_delete_window(s)
  bufed_select(s) if vertical split
  dired_select(s) if vertical split
do_less_quit(s)
do_delete_other_windows(s) deletes other windows (!)
do_minibuffer_exit(s) also deletes completion_popup
insert_window_left()  deletes some left-most windows
  do_list_buffers()
  do_dired()

add colorized buffers using shell buffer method
make shell buffer a colorized UCS2 buffer
use colorized buffer for *trace* buffer to flag tty input, shell output,
  supported and unsupported escapes.

.mailfilter should be in maildrop mode (a direct descendent of C mode)
