Specify filetype in modelines
Check availability of cdspell shopt before setting

Otherwise this will display "invalid shell option" error on shell
startup.
Use "." command instead of "source" in profile

The "." command is more portable.
Load profile from bashrc if it wasn't loaded yet

This is the case for Windows, where login shell is usually not run.
Prevent bashrc from being sourced twice
Check availability of autocd shopt before setting

Otherwise this might display "invalid shell option" error on shell
startup.
Disable new line helper for Windows

/dev/tty file doesn't work as on Linux.
Add .lesskey file