Do M-x set-variable debug-on-error t and make it happen, then look at the stack trace. It'll probably be obvious from there. It's not directly related to your cygwin config, it's something about font-lock mode. I don't have a font-lock-defaults-alist, I have font-lock-defaults. You may have an out-of-date elisp package somewhere.
-- Gary ----- Original Message ----- > From: "Sivaram Neelakantan" <nsivaram....@gmail.com> > To: help-emacs-windows@gnu.org > Sent: Monday, July 30, 2012 1:13:20 PM > Subject: [h-e-w] Unable to launch cygwin bash (M-x shell) in win 7 64 bit > > I've run into this problem and I don't know where to start. I got a > new laptop and went about installing all the usual bits of software, > Emacs and Cygwin. Things mostly work as advertised....however when I > do M-x shell, I get > > let: Symbol's value as variable is void: font-lock-defaults-alist > Error in post-command-hook (global-font-lock-mode-check-buffers): > (void-variable font-lock-defaults-alist) > > and that's it. I haven't changed anything that I had on my old XP > laptop. The weird thing is, M-! command to call different cygwin > commands work; the moment I launch the shell within Emacs I get the > above errors. > > --8<---------------cut here---------------start------------->8--- > and my cygwin configuration in my .Emacs is > > (setq exec-path (cons "C:/gnu/bin/" exec-path)) > (setq exec-path (cons "C:/cygwin/usr/bin" (cons "C:/cygwin/bin" > exec-path))) > (setq exec-path (cons "C:/MiKTeX2.9/miktex/bin" exec-path)) > (setenv "PATH" (concat > "C:\\MiKTeX2.9\\miktex\\bin;C:\\cygwin\\bin;C:\\cygwin\\usr\\bin;C:\\gnu\\bin\\;" > (getenv "PATH"))) > > ;; NT-emacs assumes a Windows command shell, which you change > ;; here. > ;; > (setq process-coding-system-alist '(("bash" . undecided-unix))) > (setq w32-quote-process-args ?\") > (setq shell-file-name "/usr/bin/bash") > ;;(setq shell-file-name "C:/cygwin/usr/bin/bash") > (setenv "SHELL" shell-file-name) > (setq explicit-shell-file-name shell-file-name) > ;; This removes unsightly ^M characters that would otherwise > ;; appear in the output. > ;; > (add-hook 'comint-output-filter-functions > 'comint-strip-ctrl-m) > --8<---------------cut here---------------end--------------->8--- > > sivaram > -- > > > -- Gary Oberbrunner