Commit cf34f9aa authored by Ryan C. Thompson's avatar Ryan C. Thompson

Clean up whitespace

This commit is the result of running cleanup-whitespace.sh.

Fixes #549.
parent e41a8933
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
(unless (file-exists-p file) (unless (file-exists-p file)
(write-region (write-region
(replace-regexp-in-string ";; no-byte-compile: t\n" "" (replace-regexp-in-string ";; no-byte-compile: t\n" ""
(autoload-rubric file)) nil file))) (autoload-rubric file)) nil file)))
(defun el-get-load-fast (file) (defun el-get-load-fast (file)
"Load the compiled version of FILE if it exists; else load FILE verbatim" "Load the compiled version of FILE if it exists; else load FILE verbatim"
...@@ -123,8 +123,8 @@ is nil, marks all installed packages as needing new autoloads." ...@@ -123,8 +123,8 @@ is nil, marks all installed packages as needing new autoloads."
(concat (file-name-sans-extension el-get-autoload-file) ".elc")))) (concat (file-name-sans-extension el-get-autoload-file) ".elc"))))
(let ((packages (let ((packages
(if package (list package) (if package (list package)
(el-get-list-package-names-with-status "installed")))) (el-get-list-package-names-with-status "installed"))))
(mapc 'el-get-update-autoloads packages))) (mapc 'el-get-update-autoloads packages)))
(provide 'el-get-autoloads) (provide 'el-get-autoloads)
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
;; debian uses ginstall-info and it's compatible to fink's install-info on ;; debian uses ginstall-info and it's compatible to fink's install-info on
;; MacOSX, so: ;; MacOSX, so:
(defvar el-get-install-info (or (executable-find "ginstall-info") (defvar el-get-install-info (or (executable-find "ginstall-info")
(executable-find "install-info"))) (executable-find "install-info")))
(defun el-get-build-commands (package) (defun el-get-build-commands (package)
"Return a list of build commands for the named PACKAGE. "Return a list of build commands for the named PACKAGE.
...@@ -29,8 +29,8 @@ strings, each string representing a single shell argument." ...@@ -29,8 +29,8 @@ strings, each string representing a single shell argument."
(let* ((source (el-get-package-def package)) (let* ((source (el-get-package-def package))
(build-type (intern (format ":build/%s" system-type))) (build-type (intern (format ":build/%s" system-type)))
(raw-build-commands (raw-build-commands
(or (plist-get source build-type) (or (plist-get source build-type)
(plist-get source :build))) (plist-get source :build)))
(build-commands (build-commands
(if (listp raw-build-commands) (if (listp raw-build-commands)
;; If the :build property's car is a symbol, assume that it is an ;; If the :build property's car is a symbol, assume that it is an
...@@ -62,10 +62,10 @@ That will find the program in current $PATH for you, unless given ...@@ -62,10 +62,10 @@ That will find the program in current $PATH for you, unless given
command name is a relative filename beginning with \"./\", or its command name is a relative filename beginning with \"./\", or its
absolute filename obtained with expand-file-name is executable." absolute filename obtained with expand-file-name is executable."
(let ((fullname (expand-file-name name)) (let ((fullname (expand-file-name name))
(exe (executable-find name))) (exe (executable-find name)))
(cond ((string-match "^\./" name) name) (cond ((string-match "^\./" name) name)
((file-executable-p fullname) fullname) ((file-executable-p fullname) fullname)
(t (or exe name))))) (t (or exe name)))))
(defun el-get-build (defun el-get-build
(package commands &optional subdir sync post-build-fun installing-info) (package commands &optional subdir sync post-build-fun installing-info)
...@@ -90,39 +90,39 @@ recursion. ...@@ -90,39 +90,39 @@ recursion.
" "
(el-get-verbose-message "el-get-build %s" package) (el-get-verbose-message "el-get-build %s" package)
(let* ((pdir (el-get-package-directory package)) (let* ((pdir (el-get-package-directory package))
(wdir (if subdir (concat (file-name-as-directory pdir) subdir) pdir)) (wdir (if subdir (concat (file-name-as-directory pdir) subdir) pdir))
(buf (format "*el-get-build: %s*" package)) (buf (format "*el-get-build: %s*" package))
(default-directory (file-name-as-directory wdir)) (default-directory (file-name-as-directory wdir))
(shell-file-name (or (and (eq system-type 'windows-nt) (shell-file-name (or (and (eq system-type 'windows-nt)
(executable-find "cmdproxy.exe")) (executable-find "cmdproxy.exe"))
shell-file-name)) shell-file-name))
(process-list (process-list
(mapcar (lambda (c) (mapcar (lambda (c)
(let* ((split (cond ((stringp c) (let* ((split (cond ((stringp c)
;; `("sh" "-c" ,c) or equivalent ;; `("sh" "-c" ,c) or equivalent
(prog1 (list shell-file-name (prog1 (list shell-file-name
shell-command-switch shell-command-switch
c) c)
(when (not (string= c (shell-quote-argument c))) (when (not (string= c (shell-quote-argument c)))
(warn "Build command %S in package \"%s\" will be shell-interpolated. To bypass shell interpolation, the recipe for \"%s\" should specify build commands as lists of strings instead." c package package)))) (warn "Build command %S in package \"%s\" will be shell-interpolated. To bypass shell interpolation, the recipe for \"%s\" should specify build commands as lists of strings instead." c package package))))
((sequencep c) c) ((sequencep c) c)
(t (error "Invalid command: %S" c)))) (t (error "Invalid command: %S" c))))
(c (mapconcat 'identity split " ")) (c (mapconcat 'identity split " "))
(name (car split)) (name (car split))
(program (el-get-build-command-program name)) (program (el-get-build-command-program name))
(args (cdr split))) (args (cdr split)))
`(:command-name ,name `(:command-name ,name
:buffer-name ,buf :buffer-name ,buf
:default-directory ,wdir :default-directory ,wdir
:shell t :shell t
:sync ,sync :sync ,sync
:program ,program :program ,program
:args (,@args) :args (,@args)
:message ,(format "el-get-build %s: %s ok." package c) :message ,(format "el-get-build %s: %s ok." package c)
:error ,(format :error ,(format
"el-get could not build %s [%s]" package c)))) "el-get could not build %s [%s]" package c))))
commands)) commands))
;; This ensures that post-build-fun is always a lambda, not a ;; This ensures that post-build-fun is always a lambda, not a
;; symbol, which simplifies the following code. ;; symbol, which simplifies the following code.
(post-build-fun (post-build-fun
...@@ -133,7 +133,7 @@ recursion. ...@@ -133,7 +133,7 @@ recursion.
(t (assert (functionp post-build-fun) 'show-args) (t (assert (functionp post-build-fun) 'show-args)
post-build-fun))) post-build-fun)))
;; Do byte-compilation after building, if needed ;; Do byte-compilation after building, if needed
(byte-compile-then-post-build-fun (byte-compile-then-post-build-fun
`(lambda (package) `(lambda (package)
(let ((bytecomp-files (let ((bytecomp-files
(when el-get-byte-compile (when el-get-byte-compile
...@@ -145,13 +145,13 @@ recursion. ...@@ -145,13 +145,13 @@ recursion.
package package
(list (el-get-byte-compile-process package ,buf ,wdir ,sync bytecomp-files)) (list (el-get-byte-compile-process package ,buf ,wdir ,sync bytecomp-files))
,post-build-fun)))) ,post-build-fun))))
;; unless installing-info, post-build-fun should take care of ;; unless installing-info, post-build-fun should take care of
;; building info too ;; building info too
(build-info-then-post-build-fun (build-info-then-post-build-fun
(if installing-info byte-compile-then-post-build-fun (if installing-info byte-compile-then-post-build-fun
`(lambda (package) `(lambda (package)
(el-get-install-or-init-info package 'build) (el-get-install-or-init-info package 'build)
(funcall ,byte-compile-then-post-build-fun package))))) (funcall ,byte-compile-then-post-build-fun package)))))
(el-get-start-process-list (el-get-start-process-list
package process-list build-info-then-post-build-fun))) package process-list build-info-then-post-build-fun)))
...@@ -166,49 +166,49 @@ recursion. ...@@ -166,49 +166,49 @@ recursion.
file when build-or-init is 'build, or `el-get-set-info-path' file when build-or-init is 'build, or `el-get-set-info-path'
when build-or-init is 'init " when build-or-init is 'init "
(let* ((source (el-get-package-def package)) (let* ((source (el-get-package-def package))
(method (el-get-package-method source)) (method (el-get-package-method source))
(infodir (plist-get source :info)) (infodir (plist-get source :info))
(pname (el-get-as-string package)) (pname (el-get-as-string package))
(pdir (el-get-package-directory package))) (pdir (el-get-package-directory package)))
;; apt-get, pacman and ELPA will set up Info-directory-list ;; apt-get, pacman and ELPA will set up Info-directory-list
(unless (member method '(elpa apt-get fink pacman)) (unless (member method '(elpa apt-get fink pacman))
(let* ((infodir-abs-conf (concat pdir infodir)) (let* ((infodir-abs-conf (concat pdir infodir))
(infodir-abs (file-name-as-directory (infodir-abs (file-name-as-directory
(if (file-directory-p infodir-abs-conf) (if (file-directory-p infodir-abs-conf)
infodir-abs-conf infodir-abs-conf
(file-name-directory infodir-abs-conf)))) (file-name-directory infodir-abs-conf))))
(infodir-rel (if (file-directory-p infodir-abs-conf) (infodir-rel (if (file-directory-p infodir-abs-conf)
infodir infodir
(file-name-directory infodir))) (file-name-directory infodir)))
(info-dir (concat infodir-abs "dir")) (info-dir (concat infodir-abs "dir"))
(infofile (if (and (file-exists-p infodir-abs-conf) (infofile (if (and (file-exists-p infodir-abs-conf)
(not (file-directory-p infodir-abs-conf))) (not (file-directory-p infodir-abs-conf)))
infodir-abs-conf infodir-abs-conf
(concat infodir-abs pname)))) (concat infodir-abs pname))))
(cond (cond
((eq build-or-init 'init) ((eq build-or-init 'init)
(when (file-exists-p info-dir) (when (file-exists-p info-dir)
(el-get-set-info-path package infodir-rel))) (el-get-set-info-path package infodir-rel)))
((eq build-or-init 'build) ((eq build-or-init 'build)
;; rebuild each time asked --- e.g. on update ;; rebuild each time asked --- e.g. on update
(when (and infodir el-get-install-info (when (and infodir el-get-install-info
(file-directory-p infodir-abs) (file-directory-p infodir-abs)
(not (file-exists-p info-dir))) (not (file-exists-p info-dir)))
(el-get-set-info-path package infodir-rel) (el-get-set-info-path package infodir-rel)
(el-get-build (el-get-build
package package
(list (list el-get-install-info (list (list el-get-install-info
(convert-standard-filename (convert-standard-filename
(if (string= (substring infofile -5) ".info") (if (string= (substring infofile -5) ".info")
infofile infofile
(concat infofile ".info"))) (concat infofile ".info")))
"dir")) "dir"))
infodir-rel t nil t))) infodir-rel t nil t)))
(t (t
(error (error
"el-get-install-or-init-info: %s not supported" build-or-init))))))) "el-get-install-or-init-info: %s not supported" build-or-init)))))))
(provide 'el-get-build) (provide 'el-get-build)
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
;; Install ;; Install
;; Please see the README.md file from the same distribution ;; Please see the README.md file from the same distribution
(require 'cl) ; yes I like loop (require 'cl) ; yes I like loop
(require 'bytecomp) (require 'bytecomp)
;; byte-recompile-file: ;; byte-recompile-file:
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
Specifically, if the compiled elc file already exists and is Specifically, if the compiled elc file already exists and is
newer, then compilation is skipped." newer, then compilation is skipped."
(let ((elc (concat (file-name-sans-extension el) ".elc")) (let ((elc (concat (file-name-sans-extension el) ".elc"))
;; Byte-compile runs emacs-lisp-mode-hook; disable it ;; Byte-compile runs emacs-lisp-mode-hook; disable it
emacs-lisp-mode-hook byte-compile-warnings) emacs-lisp-mode-hook byte-compile-warnings)
(when (or (not (file-exists-p elc)) (when (or (not (file-exists-p elc))
(not (file-newer-than-file-p elc el))) (not (file-newer-than-file-p elc el)))
(condition-case err (condition-case err
(byte-compile-file el) (byte-compile-file el)
((debug error) ;; catch-all, allow for debugging ((debug error) ;; catch-all, allow for debugging
(message "%S" (error-message-string err))))))) (message "%S" (error-message-string err)))))))
(defun el-get-byte-compile-file-or-directory (file) (defun el-get-byte-compile-file-or-directory (file)
"Byte-compile FILE or all files within it if it is a directory." "Byte-compile FILE or all files within it if it is a directory."
...@@ -60,10 +60,10 @@ newer, then compilation is skipped." ...@@ -60,10 +60,10 @@ newer, then compilation is skipped."
;; nocomp is true only if :compile is explicitly set to nil. ;; nocomp is true only if :compile is explicitly set to nil.
(explicit-nocomp (and (plist-member source :compile) (explicit-nocomp (and (plist-member source :compile)
(not comp-prop))) (not comp-prop)))
(method (el-get-package-method source)) (method (el-get-package-method source))
(pdir (el-get-package-directory package)) (pdir (el-get-package-directory package))
(el-path (el-get-load-path package)) (el-path (el-get-load-path package))
(files '())) (files '()))
(cond (cond
(compile (compile
;; only byte-compile what's in the :compile property of the recipe ;; only byte-compile what's in the :compile property of the recipe
...@@ -74,7 +74,7 @@ newer, then compilation is skipped." ...@@ -74,7 +74,7 @@ newer, then compilation is skipped."
(add-to-list 'files fullpath) (add-to-list 'files fullpath)
;; path is a regexp, so add matching file names in package dir ;; path is a regexp, so add matching file names in package dir
(mapc (apply-partially 'add-to-list 'files) (mapc (apply-partially 'add-to-list 'files)
(directory-files pdir nil path)))))) (directory-files pdir nil path))))))
;; If package has (:compile nil), or package has its own build ;; If package has (:compile nil), or package has its own build
;; instructions, or package is already pre-compiled by the ;; instructions, or package is already pre-compiled by the
...@@ -109,13 +109,13 @@ With optional arg RECURSIVE, do so in all subdirectories as well." ...@@ -109,13 +109,13 @@ With optional arg RECURSIVE, do so in all subdirectories as well."
for localdir = (file-name-nondirectory dir) for localdir = (file-name-nondirectory dir)
if (file-directory-p dir) if (file-directory-p dir)
unless (member localdir '("." ".." unless (member localdir '("." ".."
;; This list of dirs to ignore courtesy of ack ;; This list of dirs to ignore courtesy of ack
;; http://betterthangrep.com/ ;; http://betterthangrep.com/
"autom4te.cache" "blib" "_build" "autom4te.cache" "blib" "_build"
".bzr" ".cdv" "cover_db" "CVS" "_darcs" ".bzr" ".cdv" "cover_db" "CVS" "_darcs"
"~.dep" "~.dot" ".git" ".hg" "_MTN" "~.dep" "~.dot" ".git" ".hg" "_MTN"
"~.nib" ".pc" "~.plst" "RCS" "SCCS" "~.nib" ".pc" "~.plst" "RCS" "SCCS"
"_sgbak" ".svn")) "_sgbak" ".svn"))
do (el-get-clean-stale-compiled-files dir recursive))))) do (el-get-clean-stale-compiled-files dir recursive)))))
(defun el-get-byte-compile-from-stdin () (defun el-get-byte-compile-from-stdin ()
...@@ -161,24 +161,24 @@ whose value is a directory to be cleared of stale elc files." ...@@ -161,24 +161,24 @@ whose value is a directory to be cleared of stale elc files."
(symbol-file subprocess-function 'defun)) (symbol-file subprocess-function 'defun))
"-f" ,(symbol-name subprocess-function)))) "-f" ,(symbol-name subprocess-function))))
`(:command-name "byte-compile" `(:command-name "byte-compile"
:buffer-name ,buffer :buffer-name ,buffer
:default-directory ,working-dir :default-directory ,working-dir
:shell t :shell t
:stdin ,input-data :stdin ,input-data
:sync ,sync :sync ,sync
:program ,(car bytecomp-command) :program ,(car bytecomp-command)
:args ,(cdr bytecomp-command) :args ,(cdr bytecomp-command)
:message ,(format "el-get-build %s: byte-compile ok." package) :message ,(format "el-get-build %s: byte-compile ok." package)
:error ,(format :error ,(format
"el-get could not byte-compile %s" package)))) "el-get could not byte-compile %s" package))))
(defun el-get-byte-compile (package) (defun el-get-byte-compile (package)
"byte compile files for given package" "byte compile files for given package"
(interactive (interactive
(list (el-get-read-package-with-status "Byte compile" "installed"))) (list (el-get-read-package-with-status "Byte compile" "installed")))
(let ((pdir (el-get-package-directory package)) (let ((pdir (el-get-package-directory package))
(buf "*el-get-byte-compile*") (buf "*el-get-byte-compile*")
(files (el-get-assemble-files-for-byte-compilation package))) (files (el-get-assemble-files-for-byte-compilation package)))
(el-get-start-process-list (el-get-start-process-list
package package
(list (el-get-byte-compile-process package buf pdir t files)) (list (el-get-byte-compile-process package buf pdir t files))
......
This diff is collapsed.
...@@ -41,14 +41,14 @@ ...@@ -41,14 +41,14 @@
(define-widget 'el-get-symbol 'symbol (define-widget 'el-get-symbol 'symbol
"A string or a symbol, rendered as a symbol" "A string or a symbol, rendered as a symbol"
:match 'el-get-symbol-match :match 'el-get-symbol-match
) )
;;; END "Fuzzy" data structure support ;;; END "Fuzzy" data structure support
(defconst el-get-build-recipe-body (defconst el-get-build-recipe-body
'(choice :tag "Format" '(choice :tag "Format"
(repeat :tag "List of shell commands" (repeat :tag "List of shell commands"
(string :doc "Note: arguments will not be shell-quoted. (string :doc "Note: arguments will not be shell-quoted.
Choose `Evaluated expression' format for a more portable recipe" :format "%v%h")) Choose `Evaluated expression' format for a more portable recipe" :format "%v%h"))
(sexp :tag "Evaluated expression" :format "%t: %v%h" (sexp :tag "Evaluated expression" :format "%t: %v%h"
:value `(("./configure" ,(concat "--with-emacs=" el-get-emacs)) ("make") ("make" ("install"))) :value `(("./configure" ,(concat "--with-emacs=" el-get-emacs)) ("make") ("make" ("install")))
......
...@@ -18,26 +18,26 @@ ...@@ -18,26 +18,26 @@
(defun el-get-dependencies (packages) (defun el-get-dependencies (packages)
"Return the list of packages to install in order." "Return the list of packages to install in order."
(multiple-value-bind (plist all-sorted-p non-sorted) (multiple-value-bind (plist all-sorted-p non-sorted)
(topological-sort (topological-sort
(apply 'append (mapcar 'el-get-dependencies-graph (el-get-as-list packages)))) (apply 'append (mapcar 'el-get-dependencies-graph (el-get-as-list packages))))
(if all-sorted-p (if all-sorted-p
plist plist
(error "Couldn't sort package dependencies for \"%s\"" package)))) (error "Couldn't sort package dependencies for \"%s\"" package))))
(defun el-get-dependencies-graph (package) (defun el-get-dependencies-graph (package)
"Return the graph of packages on which PACKAGE depends" "Return the graph of packages on which PACKAGE depends"
(let* ((source (el-get-package-def (symbol-name package))) (let* ((source (el-get-package-def (symbol-name package)))
(method (el-get-package-method source)) (method (el-get-package-method source))
(pdeps (el-get-as-list (plist-get source :depends))) (pdeps (el-get-as-list (plist-get source :depends)))
(alldeps (alldeps
;; Make sure all elpa packages depend on the package `package'. ;; Make sure all elpa packages depend on the package `package'.
;; The package `package' is an elpa package, though, so exclude it ;; The package `package' is an elpa package, though, so exclude it
;; to avoid a circular dependency. ;; to avoid a circular dependency.
(if (and (not (eq package 'package)) (eq method 'elpa)) (if (and (not (eq package 'package)) (eq method 'elpa))
(cons 'package pdeps) (cons 'package pdeps)
pdeps))) pdeps)))
(append (list (append (list package) alldeps)) (append (list (append (list package) alldeps))
(loop for p in pdeps append (el-get-dependencies-graph p))))) (loop for p in pdeps append (el-get-dependencies-graph p)))))
;; ;;
;; topological sort, see ;; topological sort, see
...@@ -55,41 +55,41 @@ indicating whether all of the objects in the input graph are present ...@@ -55,41 +55,41 @@ indicating whether all of the objects in the input graph are present
in the topological ordering (i.e., the first value)." in the topological ordering (i.e., the first value)."
(let ((entries (make-hash-table :test test))) (let ((entries (make-hash-table :test test)))
(flet ((entry (v) (flet ((entry (v)
"Return the entry for vertex. Each entry is a cons whose "Return the entry for vertex. Each entry is a cons whose
car is the number of outstanding dependencies of vertex car is the number of outstanding dependencies of vertex
and whose cdr is a list of dependants of vertex." and whose cdr is a list of dependants of vertex."
(or (gethash v entries) (or (gethash v entries)
(puthash v (cons 0 '()) entries)))) (puthash v (cons 0 '()) entries))))
;; populate entries initially ;; populate entries initially
(dolist (gvertex graph) (dolist (gvertex graph)
(destructuring-bind (vertex &rest dependencies) gvertex (destructuring-bind (vertex &rest dependencies) gvertex
(let ((ventry (entry vertex))) (let ((ventry (entry vertex)))
(dolist (dependency dependencies) (dolist (dependency dependencies)
(let ((dentry (entry dependency))) (let ((dentry (entry dependency)))
(unless (funcall test dependency vertex) (unless (funcall test dependency vertex)
(incf (car ventry)) (incf (car ventry))
(push vertex (cdr dentry)))))))) (push vertex (cdr dentry))))))))
;; L is the list of sorted elements, and S the set of vertices ;; L is the list of sorted elements, and S the set of vertices
;; with no outstanding dependencies. ;; with no outstanding dependencies.
(let ((L '()) (let ((L '())
(S (loop for entry being each hash-value of entries (S (loop for entry being each hash-value of entries
using (hash-key vertex) using (hash-key vertex)
when (zerop (car entry)) collect vertex))) when (zerop (car entry)) collect vertex)))
;; Until there are no vertices with no outstanding dependencies, ;; Until there are no vertices with no outstanding dependencies,
;; process vertices from S, adding them to L. ;; process vertices from S, adding them to L.
(do* () ((endp S)) (do* () ((endp S))
(let* ((v (pop S)) (ventry (entry v))) (let* ((v (pop S)) (ventry (entry v)))
(remhash v entries) (remhash v entries)
(dolist (dependant (cdr ventry) (push v L)) (dolist (dependant (cdr ventry) (push v L))
(when (zerop (decf (car (entry dependant)))) (when (zerop (decf (car (entry dependant))))
(push dependant S))))) (push dependant S)))))
;; return (1) the list of sorted items, (2) whether all items ;; return (1) the list of sorted items, (2) whether all items
;; were sorted, and (3) if there were unsorted vertices, the ;; were sorted, and (3) if there were unsorted vertices, the
;; hash table mapping these vertices to their dependants ;; hash table mapping these vertices to their dependants
(let ((all-sorted-p (zerop (hash-table-count entries)))) (let ((all-sorted-p (zerop (hash-table-count entries))))
(values (nreverse L) (values (nreverse L)
all-sorted-p all-sorted-p
(unless all-sorted-p (unless all-sorted-p
entries))))))) entries)))))))
(provide 'el-get-dependencies) (provide 'el-get-dependencies)
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
(let ((el-get-root (let ((el-get-root
(file-name-as-directory (file-name-as-directory
(or (bound-and-true-p el-get-dir) (or (bound-and-true-p el-get-dir)
(concat (file-name-as-directory user-emacs-directory) "el-get"))))) (concat (file-name-as-directory user-emacs-directory) "el-get")))))
(when (file-directory-p el-get-root) (when (file-directory-p el-get-root)
(add-to-list 'load-path el-get-root)) (add-to-list 'load-path el-get-root))
...@@ -30,22 +30,22 @@ ...@@ -30,22 +30,22 @@
(make-directory el-get-root t)) (make-directory el-get-root t))
(let* ((package "el-get") (let* ((package "el-get")
(buf (switch-to-buffer "*el-get bootstrap*")) (buf (switch-to-buffer "*el-get bootstrap*"))
(pdir (file-name-as-directory (concat el-get-root package))) (pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find "git") (git (or (executable-find "git")
(error "Unable to find `git'"))) (error "Unable to find `git'")))
(url (or (bound-and-true-p el-get-git-install-url) (url (or (bound-and-true-p el-get-git-install-url)
"http://github.com/dimitri/el-get.git")) "http://github.com/dimitri/el-get.git"))
(default-directory el-get-root) (default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress) (process-connection-type nil) ; pipe, no pty (--no-progress)
;; First clone el-get ;; First clone el-get
(status (status
(call-process (call-process
git nil `(,buf t) t "--no-pager" "clone" "-v" url package))) git nil `(,buf t) t "--no-pager" "clone" "-v" url package)))
(unless (zerop status) (unless (zerop status)
(error "Couldn't clone el-get from the Git repository: %s" url)) (error "Couldn't clone el-get from the Git repository: %s" url))
;; switch branch if we have to ;; switch branch if we have to
(let* ((branch (cond (let* ((branch (cond
...@@ -64,19 +64,19 @@ ...@@ -64,19 +64,19 @@
(remote-branch (format "origin/%s" branch)) (remote-branch (format "origin/%s" branch))
(default-directory pdir) (default-directory pdir)
(bstatus (bstatus
(if (string-equal branch "master") (if (string-equal branch "master")
0 0
(call-process git nil (list buf t) t "checkout" "-t" remote-branch)))) (call-process git nil (list buf t) t "checkout" "-t" remote-branch))))
(unless (zerop bstatus) (unless (zerop bstatus)
(error "Couldn't `git checkout -t %s`" branch))) (error "Couldn't `git checkout -t %s`" branch)))
(add-to-list 'load-path pdir) (add-to-list 'load-path pdir)
(load package) (load package)
(let ((el-get-default-process-sync t) ; force sync operations for installer (let ((el-get-default-process-sync t) ; force sync operations for installer
(el-get-verbose t)) ; let's see it all (el-get-verbose t)) ; let's see it all
(el-get-post-install "el-get")) (el-get-post-install "el-get"))
(unless (boundp 'el-get-install-skip-emacswiki-recipes) (unless (boundp 'el-get-install-skip-emacswiki-recipes)
(el-get-emacswiki-build-local-recipes)) (el-get-emacswiki-build-local-recipes))
(with-current-buffer buf (with-current-buffer buf
(goto-char (point-max)) (goto-char (point-max))
(insert "\nCongrats, el-get is installed and ready to serve!"))))) (insert "\nCongrats, el-get is installed and ready to serve!")))))
This diff is collapsed.
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
;; NOTE: this will probably benefit from some autoloading magic, later. ;; NOTE: this will probably benefit from some autoloading magic, later.
;; ;;
(add-to-list 'load-path (add-to-list 'load-path
(expand-file-name (expand-file-name
"methods" "methods"
(file-name-directory (or load-file-name buffer-file-name)))) (file-name-directory (or load-file-name buffer-file-name))))
(require 'el-get-apt-get) (require 'el-get-apt-get)
(require 'el-get-builtin) (require 'el-get-builtin)
......
...@@ -26,12 +26,12 @@ ...@@ -26,12 +26,12 @@
;; notify user with emacs notifications API (new in 24) ;; notify user with emacs notifications API (new in 24)
;; ;;
(when (and (eq system-type 'darwin) (when (and (eq system-type 'darwin)
(file-executable-p el-get-growl-notify-path)) (file-executable-p el-get-growl-notify-path))
(defun el-get-growl (title message) (defun el-get-growl (title message)
"Send a message to growl, that implements notifications for darwin" "Send a message to growl, that implements notifications for darwin"
(let* ((name "*growl*") (let* ((name "*growl*")
(proc