modified grep-mode
modified undohist for windows