emacselispaquamacs

Aquamacs File mode specification error


I'm not sure what I did, but all of the sudden, I am getting a bunch of errors when I perform various operations in Aquamacs. For example, when I try to open a C file, I get the error "File mode specification error: (wrong-type-argument number-or-marker-p nil)". If I turn on the debugger, I get the following stack trace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  define-abbrev([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 else 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] "else" "else" c-electric-continued-statement 0 t)
  apply(define-abbrev [## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 else 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] ("else" "else" c-electric-continued-statement 0 t))
  byte-code("\302\303\304  @\305\"#\207" [table defs apply define-abbrev append (t)] 6)
  c-define-abbrev-table(c-mode-abbrev-table (("else" "else" c-electric-continued-statement 0) ("while" "while" c-electric-continued-statement 0)) "Abbreviation table used in c-mode buffers.")
  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 EventLog.h> "~/repositories/ghc/rts/eventlog/EventLog.h" nil nil "~/repositories/ghc/rts/eventlog/EventLog.h" (12100462 16777218))
  find-file-noselect("~/.cabal/../repositories/ghc/rts/eventlog/EventLog.h" nil nil t)
  find-file("~/.cabal/../repositories/ghc/rts/eventlog/EventLog.h" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

Anyone have any ideas as to what might be going on here?


Solution

  • OK, so I have no idea what happened, but I was able to fix it by doing a (very) clean reinstall. I first deleted the application folder, and then did a recursive find for any Aquamacs folder in the file system.

    find . -regex "Aquamacs.*" -maxdepth 5
    

    was able to give me a listing of all such files. There are a bunch of cached preference directories that do not get deleted when the application is uninstalled. I first tried using App Cleaner, which wasn't able to get all of these. After I deleted every Aquamacs related directory, and reinstalled, it worked just fine.