添加果酱作为包源 [英] Adding Marmalade as Package Source

查看:174
本文介绍了添加果酱作为包源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试添加Marmalade作为包源,但是当我这样做时,我会收到以下错误:符号的变量值为void:package-archives。知道如何解决这个问题?以下是我的 .emacs 文件。

I'm trying to add Marmalade as a package source, but when I do so I get the error:Symbol's value as variable is void: package-archives. Anyone know how to resolve this? Below is my .emacs file.

;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
    (load
     (expand-file-name "~/.emacs.d/elpa/package.el"))
  (package-initialize))

(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path  "~/.emacs.d/plugins")
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(add-to-list 'load-path "~/.emacs.d/plugins/groovy")

(require 'package)
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

要安装package.el

To install package.el

我运行了以下代码:

(let ((buffer (url-retrieve-synchronously
           "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))


推荐答案

使用package.el包含在emacs24中,因为ELPA版本不包括 package-archives 并支持多个存储库。

Use the package.el to be included with emacs24, as the ELPA version doesn't include package-archives and support for multiple repositories.

这里找到(emacs24!): http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/头:/lisp/emacs-lisp/package.el

It is found here (emacs24!): http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/head:/lisp/emacs-lisp/package.el

最后一个emacs23兼容版本: http://repo.or.cz/w/emacs.git/blob/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/ lisp / emacs-lisp / package.el

Last emacs23 compatible version: http://repo.or.cz/w/emacs.git/blob/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/lisp/emacs-lisp/package.el

将其放入您的加载路径并解决一个加载类型(即删除评论后的行)。

Drop it into your loadpath and settle for one type of loading (that is drop the lines after the comment).

这篇关于添加果酱作为包源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆