Bladeren bron

fix fetch-library

pull/1/head
10sr 12 jaren geleden
bovenliggende
commit
20c67eb22c
1 gewijzigde bestanden met toevoegingen van 17 en 20 verwijderingen
  1. +17
    -20
      emacs.el

+ 17
- 20
emacs.el Bestand weergeven

@@ -48,26 +48,23 @@ otherwise the path where the library installed."
(lpath (concat dir lib ".el"))
(locate-p (locate-library lib)))
(if (or force-download-p (not locate-p))
(progn (condition-case nil
(progn (message "Downloading %s..." url)
(or (download-file url
lpath
t)
(error "Download failed"))
(message "Downloading %s...done")
(when (and byte-compile-p
(require 'bytecomp nil t))
(and (file-exists-p (byte-compile-dest-file lpath))
(delete-file (byte-compile-dest-file lpath)))
(byte-compile-file lpath))
)
(error (and (file-writable-p lpath)
(delete-file lpath))
(message "Downloading %s...failed"
url)
nil))
(locate-library lib))
locate-p)))
(if (progn (message "Downloading %s..."
url)
(download-file url
lpath
t))
(progn (message "Downloading %s...done"
url)
(when (and byte-compile-p
(require 'bytecomp nil t))
(and (file-exists-p (byte-compile-dest-file lpath))
(delete-file (byte-compile-dest-file lpath)))
(byte-compile-file lpath)))
(progn (and (file-writable-p lpath)
(delete-file lpath))
(message "Downloading %s...failed"
url))))
(locate-library lib)))

(defun download-file (url path &optional ok-if-already-exists)
"Download file from URL and output to PATH."


Laden…
Annuleren
Opslaan