elpa2nix: fix packages with DOS line endings
This commit is contained in:
parent
decb5802c9
commit
9dfd9fe0bf
@ -21,7 +21,10 @@
|
|||||||
(defun elpa2nix-install-file (file)
|
(defun elpa2nix-install-file (file)
|
||||||
"Install a package from a file.
|
"Install a package from a file.
|
||||||
The file can either be a tar file or an Emacs Lisp file."
|
The file can either be a tar file or an Emacs Lisp file."
|
||||||
(with-temp-buffer
|
(let ((is-tar (string-match "\\.tar\\'" file)))
|
||||||
(insert-file-contents-literally file)
|
(with-temp-buffer
|
||||||
(when (string-match "\\.tar\\'" file) (tar-mode))
|
(if is-tar
|
||||||
(elpa2nix-install-from-buffer)))
|
(insert-file-contents-literally file)
|
||||||
|
(insert-file-contents file))
|
||||||
|
(when is-tar (tar-mode))
|
||||||
|
(elpa2nix-install-from-buffer))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user