Reputation: 14226
I'm trying to set up an emacs environment like this guy, but I keep getting this darn error:
Syntax read error: )
Here's what my init.el file looks like, it's not long, but I have NO idea what any of it means. I'm brand spankin new to lisp.
(add-to-list 'load-path' "~/.emacs.d/auto-complete-1.3.1")
;Load the default configuration
(require 'auto-complete-config')
;Make sure we can find the dictionaries
(add-to-list 'ac-dictionary-directories' "~/.emacs.d/auto-complete-1.3.1/dict")
;Use dictionaries by default
(setq-default ac-sources (add-to-list 'ac-sources' 'ac-source-dictionary'))
(global-auto-complete-mode t)
;Start auto completion after two characters of a word
(setq ac-auto-start 2)
; case sensitivity is important when finding matches
(setq ac-ignore-case nil)
(add-hook 'js-mode-hook'
(lambda ()
;;Scan the file for nested code blocks
(imenu-add-menubar-index)
;;Activate folding mode
(hs-minor-mode t))
Upvotes: 0
Views: 125
Reputation: 9417
You have extra quotes at the end of some symbols. In lisp, you quote an expression by putting a single quote (') immediately before it and nowhere else: 'correct
, 'incorrect'
. String literals are like many other languages, with double quotes both before and after: "a string literal"
.
Also, the missing paren as pointed out by phils.
In general, you can start emacs with --debug-init to make it do a backtrace on any errors in your init file. In this case it's not very useful because the code isn't even evaluated.
Upvotes: 2
Reputation: 73256
You have unbalanced parentheses in the call to add-hook
at the end.
Basically, add an extra )
to the two at the end.
If you type M-x show-paren-mode
RET and then position the cursor after a closing parenthesis, it'll highlight the matching opening parenthesis (and vice-versa if you position the cursor on an opening paren).
Upvotes: 2