arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
32 stars 14 forks source link

Setting c-default-style to a string causes error. #73

Closed ghost closed 8 years ago

ghost commented 8 years ago

Following the guide here https://www.emacswiki.org/emacs/IndentingC I set the c-default-style to "linux" which causes an error because of a bug in drupal-mode.

Debugger entered--Lisp error: (wrong-type-argument listp "linux")
  cc-choose-style-for-mode(c-mode ((drupal-mode . "drupal") . "linux"))
  c-basic-common-init(c-mode ((drupal-mode . "drupal") . "linux"))
  c-common-init(c-mode)
  c-mode()
  set-auto-mode-0(c-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer main.c<017>> "~/work/projects/the-c-programming-language/c1/017/main.c" nil nil "~/work/projects/the-c-programming-language/c1/017/main.c" (6816699 2052))
  find-file-noselect("/home/ico/work/projects/the-c-programming-language/c1/017/main.c" nil nil nil)
  find-file("/home/ico/work/projects/the-c-programming-language/c1/017/main.c")
  dired-find-file()
  call-interactively(dired-find-file nil nil)
  command-execute(dired-find-file)
arnested commented 8 years ago

Thank you for catching and reporting this, @ivegotasthma.

I have committed a fix and build a new release.