I want to add C auto-completion at least so that I can use Emacs on a regular basis as my C editor. I am new to Emacs, and I had already it installed in my system, because it came with the OS (I think). It's version is 22.1.1.
I'm trying to follow the following tutorial:
To add auto-completion to Emacs, and we started by adding the following code to the
; start package.el with emacs (require 'package) ; add MELPA to repository list (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) ; initialize package.el (package-initialize)
But when I save the file
~/.emacs and start Emacs again, I get the following message:
An error has occurred while loading `/Users/cell/.emacs':
File error: Cannot open load file, package
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.
Loading find-func...done find-library-name: Can't find library package
I don't know anything about Lisp, but from my understanding the problem is that the package called
'package does not exist. Indeed if I try to search it with
and then I type
package, it tells me:
Can't find library package
According to this answer:
It might be that my Emacs does not have
package. How can I solve this, and mostly, how can I add auto-completion to C programs?
Note: I would prefer to stick with this version of Emacs terminal since it came with the OS, apparently. I've also installed another Emacs using a
.dmg file, but I would like to work on the terminal also (or mostly).