General TODO:
------------
- remember X11 window positions and restore layout ?
- improve image viewer.
- regex search/replace (use glibc 2.1 regex.c file)
- tab cursor displayed size
- fix kana input method
- 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.
- charset: add JIS missing encoding functions
- display alternate cursor in non activate column in hex mode.
- implement wheel mode in CSS display.
- check console charset support (need to convert input?)
- test Hebrew keymap support.
- kill buffer handling: append next kill as command flag
- delete word should be a kill operation
- indent-with-tabs
DONE	- increase MAX_SCREEN_WIDTH and MAX_SCREEN_HEIGHT beyond 256
- fix crash bug on fragments longer than MAX_SCREEN_WIDTH.

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

- add TAGS support:
  * recursive search of QTAGS file.
  * C decl parser
  * man like mode 
  * global QTAGS file indexed with global includes
- see if java/javascript/c++ is OK.
- autocomplete
- forward-level, backward-level: skipping balanced parentheses
- 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
- better Makefile (select modes)
- 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
- variables ?
- scripting
- expression evaluator
- dos/mac translation modes
- minor modes with key override such as "preview" mode
NOPE	- 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
DONE	- fix control-h mess
- fix bof/eof shell mode
- merge hex-mode and ascii mode
- write-region -> add filename and offsets to save_buffer stuff
DONE	- detect full screen mode in shell buffer and grab all keys until exit
- 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
- *messages* system buffer
- doctor command should create and show *trace* buffer, remove eb_new kludge
- invoking key as intrinsic argument
- fix column computation based on display properties:
  (variable pitch, tabs, ^x and \uxxxx stuff -- emacs behaviour) ?
- check X11 connection at probe time
DONE	- 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()
