I an new to emacs...so i was trying to install ya-snippets for this first i downloaded the ya-snippet tar file and then uzipped it and then kept it .emacs.d/packages/ and then added the following code to my .emacs file
;; yasnippet
(add-to-list 'load-path
"~/.emacs.d/packages/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)
but my obtaining the following error ...
Warning (initialization): An error occurred while loading `/home/nitesh/.emacs':
Symbol's function definition is void: yas-global-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
please tell me the error and as i am new to emacs and please tell what each line is doing my .emacs file written to configure yasnippet ? and please tell me what to add to .emacs file for ya -snippet to use all c/c++ snippets that comes default with it?
Step One: Place the following two lines near the top of your
.emacsfile and restart Emacs:Step Two:
M-x list-packagesStep Three: Select
Yasnippetwith the left mouse click and then clickInstall, and clickYes.Step Four: Open up your
.emacsfile and place this underneathpackage-initializeStep Five: Restart Emacs and have fun coding. The mode-line will display
yaswhen that minor mode is active.