From: Phil Hagelberg Date: Sat, 12 Feb 2011 01:18:15 +0000 (-0500) Subject: Allow packages to be reinstalled. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~924 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6affbdeb9d11bfcd10aa804cb8f4b65baa3cd28;p=emacs.git Allow packages to be reinstalled. * emacs-lisp/package.el (package--write-file-no-coding): Remove EXCL arg. (package-unpack-single): Don't use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d97d7cee4b6..e8308059963 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-02-12 Phil Hagelberg + + * emacs-lisp/package.el: Allow packages to be reinstalled. + (package--write-file-no-coding): Remove EXCL arg. + (package-unpack-single): Don't use it. + 2011-02-12 Karl Pflästerer (tiny change) * vc/vc-svn.el: Adapt to Subversion change, with no .svn directory diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index af97bb1bd21..20b6514a02a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -577,23 +577,22 @@ Otherwise it uses an external `tar' program. (let ((load-path (cons pkg-dir load-path))) (byte-recompile-directory pkg-dir 0 t))))) -(defun package--write-file-no-coding (file-name excl) +(defun package--write-file-no-coding (file-name) (let ((buffer-file-coding-system 'no-conversion)) - (write-region (point-min) (point-max) file-name nil nil nil excl))) + (write-region (point-min) (point-max) file-name))) (defun package-unpack-single (file-name version desc requires) "Install the contents of the current buffer as a package." ;; Special case "package". (if (string= file-name "package") (package--write-file-no-coding - (expand-file-name (concat file-name ".el") package-user-dir) - nil) + (expand-file-name (concat file-name ".el") package-user-dir)) (let* ((pkg-dir (expand-file-name (concat file-name "-" version) package-user-dir)) (el-file (expand-file-name (concat file-name ".el") pkg-dir)) (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) (make-directory pkg-dir t) - (package--write-file-no-coding el-file 'excl) + (package--write-file-no-coding el-file) (let ((print-level nil) (print-length nil)) (write-region