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 @@
(unless (file-exists-p file)
(write-region
(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)
"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."
(concat (file-name-sans-extension el-get-autoload-file) ".elc"))))
(let ((packages
(if package (list package)
(el-get-list-package-names-with-status "installed"))))
(if package (list package)
(el-get-list-package-names-with-status "installed"))))
(mapc 'el-get-update-autoloads packages)))
(provide 'el-get-autoloads)
......@@ -18,7 +18,7 @@
;; debian uses ginstall-info and it's compatible to fink's install-info on
;; MacOSX, so:
(defvar el-get-install-info (or (executable-find "ginstall-info")
(executable-find "install-info")))
(executable-find "install-info")))
(defun el-get-build-commands (package)
"Return a list of build commands for the named PACKAGE.
......@@ -29,8 +29,8 @@ strings, each string representing a single shell argument."
(let* ((source (el-get-package-def package))
(build-type (intern (format ":build/%s" system-type)))
(raw-build-commands
(or (plist-get source build-type)
(plist-get source :build)))
(or (plist-get source build-type)
(plist-get source :build)))
(build-commands
(if (listp raw-build-commands)
;; 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
command name is a relative filename beginning with \"./\", or its
absolute filename obtained with expand-file-name is executable."
(let ((fullname (expand-file-name name))
(exe (executable-find name)))
(exe (executable-find name)))
(cond ((string-match "^\./" name) name)
((file-executable-p fullname) fullname)
(t (or exe name)))))
((file-executable-p fullname) fullname)
(t (or exe name)))))
(defun el-get-build
(package commands &optional subdir sync post-build-fun installing-info)
......@@ -90,39 +90,39 @@ recursion.
"
(el-get-verbose-message "el-get-build %s" package)
(let* ((pdir (el-get-package-directory package))
(wdir (if subdir (concat (file-name-as-directory pdir) subdir) pdir))
(buf (format "*el-get-build: %s*" package))
(default-directory (file-name-as-directory wdir))
(wdir (if subdir (concat (file-name-as-directory pdir) subdir) pdir))
(buf (format "*el-get-build: %s*" package))
(default-directory (file-name-as-directory wdir))
(shell-file-name (or (and (eq system-type 'windows-nt)
(executable-find "cmdproxy.exe"))
shell-file-name))
(process-list
(mapcar (lambda (c)
(let* ((split (cond ((stringp c)
(executable-find "cmdproxy.exe"))
shell-file-name))
(process-list
(mapcar (lambda (c)
(let* ((split (cond ((stringp c)
;; `("sh" "-c" ,c) or equivalent
(prog1 (list shell-file-name
shell-command-switch
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))))
((sequencep c) c)
(t (error "Invalid command: %S" c))))
(c (mapconcat 'identity split " "))
(name (car split))
(program (el-get-build-command-program name))
(args (cdr split)))
`(:command-name ,name
:buffer-name ,buf
:default-directory ,wdir
:shell t
:sync ,sync
:program ,program
:args (,@args)
:message ,(format "el-get-build %s: %s ok." package c)
:error ,(format
"el-get could not build %s [%s]" package c))))
commands))
((sequencep c) c)
(t (error "Invalid command: %S" c))))
(c (mapconcat 'identity split " "))
(name (car split))
(program (el-get-build-command-program name))
(args (cdr split)))
`(:command-name ,name
:buffer-name ,buf
:default-directory ,wdir
:shell t
:sync ,sync
:program ,program
:args (,@args)
:message ,(format "el-get-build %s: %s ok." package c)
:error ,(format
"el-get could not build %s [%s]" package c))))
commands))
;; This ensures that post-build-fun is always a lambda, not a
;; symbol, which simplifies the following code.
(post-build-fun
......@@ -133,7 +133,7 @@ recursion.
(t (assert (functionp post-build-fun) 'show-args)
post-build-fun)))
;; Do byte-compilation after building, if needed
(byte-compile-then-post-build-fun
(byte-compile-then-post-build-fun
`(lambda (package)
(let ((bytecomp-files
(when el-get-byte-compile
......@@ -145,13 +145,13 @@ recursion.
package
(list (el-get-byte-compile-process package ,buf ,wdir ,sync bytecomp-files))
,post-build-fun))))
;; unless installing-info, post-build-fun should take care of
;; building info too
;; unless installing-info, post-build-fun should take care of
;; building info too
(build-info-then-post-build-fun
(if installing-info byte-compile-then-post-build-fun
`(lambda (package)
(el-get-install-or-init-info package 'build)
(funcall ,byte-compile-then-post-build-fun package)))))
(if installing-info byte-compile-then-post-build-fun
`(lambda (package)
(el-get-install-or-init-info package 'build)
(funcall ,byte-compile-then-post-build-fun package)))))
(el-get-start-process-list
package process-list build-info-then-post-build-fun)))
......@@ -166,49 +166,49 @@ recursion.
file when build-or-init is 'build, or `el-get-set-info-path'
when build-or-init is 'init "
(let* ((source (el-get-package-def package))
(method (el-get-package-method source))
(infodir (plist-get source :info))
(pname (el-get-as-string package))
(pdir (el-get-package-directory package)))
(method (el-get-package-method source))
(infodir (plist-get source :info))
(pname (el-get-as-string package))
(pdir (el-get-package-directory package)))
;; apt-get, pacman and ELPA will set up Info-directory-list
(unless (member method '(elpa apt-get fink pacman))
(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)
infodir-abs-conf
(file-name-directory infodir-abs-conf))))
(infodir-rel (if (file-directory-p infodir-abs-conf)
infodir
(file-name-directory infodir)))
(info-dir (concat infodir-abs "dir"))
(infofile (if (and (file-exists-p infodir-abs-conf)
(not (file-directory-p infodir-abs-conf)))
infodir-abs-conf
(concat infodir-abs pname))))
(cond
((eq build-or-init 'init)
(when (file-exists-p info-dir)
(el-get-set-info-path package infodir-rel)))
((eq build-or-init 'build)
;; rebuild each time asked --- e.g. on update
(when (and infodir el-get-install-info
(file-directory-p infodir-abs)
(not (file-exists-p info-dir)))
(el-get-set-info-path package infodir-rel)
(el-get-build
package
(list (list el-get-install-info
(convert-standard-filename
(if (string= (substring infofile -5) ".info")
infofile
(concat infofile ".info")))
"dir"))
infodir-rel t nil t)))
(t
(error
"el-get-install-or-init-info: %s not supported" build-or-init)))))))
(infodir-rel (if (file-directory-p infodir-abs-conf)
infodir
(file-name-directory infodir)))
(info-dir (concat infodir-abs "dir"))
(infofile (if (and (file-exists-p infodir-abs-conf)
(not (file-directory-p infodir-abs-conf)))
infodir-abs-conf
(concat infodir-abs pname))))
(cond
((eq build-or-init 'init)
(when (file-exists-p info-dir)
(el-get-set-info-path package infodir-rel)))
((eq build-or-init 'build)
;; rebuild each time asked --- e.g. on update
(when (and infodir el-get-install-info
(file-directory-p infodir-abs)
(not (file-exists-p info-dir)))
(el-get-set-info-path package infodir-rel)
(el-get-build
package
(list (list el-get-install-info
(convert-standard-filename
(if (string= (substring infofile -5) ".info")
infofile
(concat infofile ".info")))
"dir"))
infodir-rel t nil t)))
(t
(error
"el-get-install-or-init-info: %s not supported" build-or-init)))))))
(provide 'el-get-build)
......@@ -12,7 +12,7 @@
;; Install
;; Please see the README.md file from the same distribution
(require 'cl) ; yes I like loop
(require 'cl) ; yes I like loop
(require 'bytecomp)
;; byte-recompile-file:
......@@ -33,14 +33,14 @@
Specifically, if the compiled elc file already exists and is
newer, then compilation is skipped."
(let ((elc (concat (file-name-sans-extension el) ".elc"))
;; Byte-compile runs emacs-lisp-mode-hook; disable it
emacs-lisp-mode-hook byte-compile-warnings)
;; Byte-compile runs emacs-lisp-mode-hook; disable it
emacs-lisp-mode-hook byte-compile-warnings)
(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
(byte-compile-file el)
((debug error) ;; catch-all, allow for debugging
(message "%S" (error-message-string err)))))))
(byte-compile-file el)
((debug error) ;; catch-all, allow for debugging
(message "%S" (error-message-string err)))))))
(defun el-get-byte-compile-file-or-directory (file)
"Byte-compile FILE or all files within it if it is a directory."
......@@ -60,10 +60,10 @@ newer, then compilation is skipped."
;; nocomp is true only if :compile is explicitly set to nil.
(explicit-nocomp (and (plist-member source :compile)
(not comp-prop)))
(method (el-get-package-method source))
(pdir (el-get-package-directory package))
(el-path (el-get-load-path package))
(files '()))
(method (el-get-package-method source))
(pdir (el-get-package-directory package))
(el-path (el-get-load-path package))
(files '()))
(cond
(compile
;; only byte-compile what's in the :compile property of the recipe
......@@ -74,7 +74,7 @@ newer, then compilation is skipped."
(add-to-list 'files fullpath)
;; path is a regexp, so add matching file names in package dir
(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
;; instructions, or package is already pre-compiled by the
......@@ -109,13 +109,13 @@ With optional arg RECURSIVE, do so in all subdirectories as well."
for localdir = (file-name-nondirectory dir)
if (file-directory-p dir)
unless (member localdir '("." ".."
;; This list of dirs to ignore courtesy of ack
;; http://betterthangrep.com/
"autom4te.cache" "blib" "_build"
".bzr" ".cdv" "cover_db" "CVS" "_darcs"
"~.dep" "~.dot" ".git" ".hg" "_MTN"
"~.nib" ".pc" "~.plst" "RCS" "SCCS"
"_sgbak" ".svn"))
;; This list of dirs to ignore courtesy of ack
;; http://betterthangrep.com/
"autom4te.cache" "blib" "_build"
".bzr" ".cdv" "cover_db" "CVS" "_darcs"
"~.dep" "~.dot" ".git" ".hg" "_MTN"
"~.nib" ".pc" "~.plst" "RCS" "SCCS"
"_sgbak" ".svn"))
do (el-get-clean-stale-compiled-files dir recursive)))))
(defun el-get-byte-compile-from-stdin ()
......@@ -161,24 +161,24 @@ whose value is a directory to be cleared of stale elc files."
(symbol-file subprocess-function 'defun))
"-f" ,(symbol-name subprocess-function))))
`(:command-name "byte-compile"
:buffer-name ,buffer
:default-directory ,working-dir
:shell t
:buffer-name ,buffer
:default-directory ,working-dir
:shell t
:stdin ,input-data
:sync ,sync
:program ,(car bytecomp-command)
:args ,(cdr bytecomp-command)
:message ,(format "el-get-build %s: byte-compile ok." package)
:error ,(format
"el-get could not byte-compile %s" package))))
:sync ,sync
:program ,(car bytecomp-command)
:args ,(cdr bytecomp-command)
:message ,(format "el-get-build %s: byte-compile ok." package)
:error ,(format
"el-get could not byte-compile %s" package))))
(defun el-get-byte-compile (package)
"byte compile files for given package"
(interactive
(list (el-get-read-package-with-status "Byte compile" "installed")))
(let ((pdir (el-get-package-directory package))
(buf "*el-get-byte-compile*")
(files (el-get-assemble-files-for-byte-compilation package)))
(buf "*el-get-byte-compile*")
(files (el-get-assemble-files-for-byte-compilation package)))
(el-get-start-process-list
package
(list (el-get-byte-compile-process package buf pdir t files))
......
......@@ -88,12 +88,12 @@ call for doing the named package action in the given method.")
(intern (format ":%s" required-arg))
(symbol-value required-arg))))
(loop for optional-arg in '(install-hook update-hook remove-hook
compute-checksum guess-website)
if (symbol-value optional-arg)
do (setq method-def
(plist-put method-def
(intern (format ":%s" optional-arg))
(symbol-value optional-arg))))
compute-checksum guess-website)
if (symbol-value optional-arg)
do (setq method-def
(plist-put method-def
(intern (format ":%s" optional-arg))
(symbol-value optional-arg))))
(setq el-get-methods (plist-put el-get-methods name method-def))))
(put 'el-get-register-method 'lisp-indent-function
......@@ -136,13 +136,13 @@ convert it to a string and return that."
"If STRING-OR-SYMBOL is already a symbol, return it. Otherwise
convert it to a symbol and return that."
(if (symbolp string-or-symbol) string-or-symbol
(intern string-or-symbol)))
(intern string-or-symbol)))
(defun el-get-as-list (element-or-list)
"If ELEMENT-OR-LIST is already a list, return it. Otherwise
returning a list that contains it (and only it)."
(if (listp element-or-list) element-or-list
(list element-or-list)))
(list element-or-list)))
(defun el-get-list-of-strings-p (obj)
(or (null obj)
......@@ -179,7 +179,7 @@ entry."
((file-exists-p pdir)
(delete-file pdir)))
(when post-remove-fun
(funcall post-remove-fun package))))
(funcall post-remove-fun package))))
;;
......@@ -188,10 +188,10 @@ entry."
(defun el-get-duplicates (list)
"Return duplicates found in list."
(loop with dups and once
for elt in list
if (member elt once) collect elt into dups
else collect elt into once
finally return dups))
for elt in list
if (member elt once) collect elt into dups
else collect elt into once
finally return dups))
(defun el-get-flatten (arg)
"Return a version of ARG as a one-level list
......@@ -206,7 +206,7 @@ entry."
"Return the list of absolute directory names to be added to
`load-path' by the named PACKAGE."
(let* ((source (el-get-package-def package))
(el-path (if (plist-member source :load-path)
(el-path (if (plist-member source :load-path)
(el-get-flatten (plist-get source :load-path))
'(".")))
(pkg-dir (el-get-package-directory package)))
......@@ -231,16 +231,16 @@ given method."
"Return the absolute directory name of the named PACKAGE."
(file-name-as-directory
(expand-file-name (el-get-as-string package)
(expand-file-name el-get-dir))))
(expand-file-name el-get-dir))))
(defun el-get-add-path-to-list (package list path)
"(add-to-list LIST PATH) checking for path existence within
given package directory."
(let* ((pdir (el-get-package-directory package))
(fullpath (expand-file-name (or path ".") pdir)))
(fullpath (expand-file-name (or path ".") pdir)))
(unless (file-directory-p fullpath)
(error "el-get could not find directory `%s' for package %s, at %s"
path package fullpath))
path package fullpath))
(add-to-list list fullpath)))
(defun el-get-package-exists-p (package)
......@@ -249,7 +249,7 @@ directory or a symlink in el-get-dir."
(let ((pdir (el-get-package-directory package)))
;; seems overkill as file-directory-p will always be true
(or (file-directory-p pdir)
(file-symlink-p pdir))))
(file-symlink-p pdir))))
;;
......@@ -378,74 +378,74 @@ makes it easier to conditionally splice a command into the list.
(setq commands (cdr commands)))
(condition-case err
(if commands
(let* ((c (car commands))
(next (cdr commands))
(cdir (plist-get c :default-directory))
(cname (plist-get c :command-name))
(cbuf (plist-get c :buffer-name))
(killed (when (get-buffer cbuf) (kill-buffer cbuf)))
(filter (plist-get c :process-filter))
(program (plist-get c :program))
(shell (plist-get c :shell))
(args (if shell
(mapcar #'shell-quote-argument (plist-get c :args))
(plist-get c :args)))
(sync (el-get-plist-get-with-default c :sync
el-get-default-process-sync))
(stdin (plist-get c :stdin))
(default-directory (if cdir
(file-name-as-directory
(expand-file-name cdir))
default-directory)))
(unless program (error "el-get: :program argument cannot be nil"))
(if sync
(progn
(el-get-verbose-message "Running commands synchronously: %S" commands)
(let* ((startf (if shell #'call-process-shell-command #'call-process))
(infile (when stdin (make-temp-file "el-get")))
(dummy (when infile
(with-temp-file infile
(insert (el-get-print-to-string stdin)))))
(dummy (message "el-get is waiting for %S to complete" cname))
(status (apply startf program infile cbuf t args))
(message (plist-get c :message))
(errorm (plist-get c :error)))
(when el-get-verbose
(message "%S" (with-current-buffer cbuf (buffer-string))))
(if (eq 0 status)
(message "el-get: %s" message)
(set-window-buffer (selected-window) cbuf)
(error "el-get: %s %s" cname errorm))
(when infile (delete-file infile))
(when cbuf (kill-buffer cbuf))
(if next
;; Prevent stack overflow on very long command
;; lists. This allows
;; `el-get-start-process-list' (but not other
;; functions) to recurse indefinitely.
(let ((max-specpdl-size (+ 100 max-specpdl-size)))
(el-get-start-process-list package next final-func))
(when (functionp final-func)
(funcall final-func package)))))
;; async case
(el-get-verbose-message "Running commands asynchronously: %S" commands)
(let* ((startf (if shell #'start-process-shell-command #'start-process))
(process-connection-type nil) ; pipe, don't pretend we're a pty
(proc (apply startf cname cbuf program args)))
;; add the properties to the process, then set the sentinel
(mapc (lambda (x) (process-put proc x (plist-get c x))) c)
(process-put proc :el-get-sources el-get-sources)
(process-put proc :el-get-package package)
(process-put proc :el-get-final-func final-func)
(process-put proc :el-get-start-process-list next)
(when stdin
(process-send-string proc (el-get-print-to-string stdin))
(process-send-eof proc))
(set-process-sentinel proc 'el-get-start-process-list-sentinel)
(when filter (set-process-filter proc filter)))))
;; no commands, still run the final-func
(when (functionp final-func)
(funcall final-func package)))
(let* ((c (car commands))
(next (cdr commands))
(cdir (plist-get c :default-directory))
(cname (plist-get c :command-name))
(cbuf (plist-get c :buffer-name))
(killed (when (get-buffer cbuf) (kill-buffer cbuf)))
(filter (plist-get c :process-filter))
(program (plist-get c :program))
(shell (plist-get c :shell))
(args (if shell
(mapcar #'shell-quote-argument (plist-get c :args))
(plist-get c :args)))
(sync (el-get-plist-get-with-default c :sync
el-get-default-process-sync))
(stdin (plist-get c :stdin))
(default-directory (if cdir
(file-name-as-directory
(expand-file-name cdir))
default-directory)))
(unless program (error "el-get: :program argument cannot be nil"))
(if sync
(progn
(el-get-verbose-message "Running commands synchronously: %S" commands)
(let* ((startf (if shell #'call-process-shell-command #'call-process))
(infile (when stdin (make-temp-file "el-get")))
(dummy (when infile
(with-temp-file infile
(insert (el-get-print-to-string stdin)))))
(dummy (message "el-get is waiting for %S to complete" cname))
(status (apply startf program infile cbuf t args))
(message (plist-get c :message))
(errorm (plist-get c :error)))
(when el-get-verbose
(message "%S" (with-current-buffer cbuf (buffer-string))))
(if (eq 0 status)
(message "el-get: %s" message)
(set-window-buffer (selected-window) cbuf)
(error "el-get: %s %s" cname errorm))
(when infile (delete-file infile))
(when cbuf (kill-buffer cbuf))
(if next
;; Prevent stack overflow on very long command
;; lists. This allows
;; `el-get-start-process-list' (but not other
;; functions) to recurse indefinitely.
(let ((max-specpdl-size (+ 100 max-specpdl-size)))
(el-get-start-process-list package next final-func))
(when (functionp final-func)
(funcall final-func package)))))
;; async case
(el-get-verbose-message "Running commands asynchronously: %S" commands)
(let* ((startf (if shell #'start-process-shell-command #'start-process))
(process-connection-type nil) ; pipe, don't pretend we're a pty
(proc (apply startf cname cbuf program args)))
;; add the properties to the process, then set the sentinel
(mapc (lambda (x) (process-put proc x (plist-get c x))) c)
(process-put proc :el-get-sources el-get-sources)
(process-put proc :el-get-package package)
(process-put proc :el-get-final-func final-func)
(process-put proc :el-get-start-process-list next)
(when stdin
(process-send-string proc (el-get-print-to-string stdin))
(process-send-eof proc))
(set-process-sentinel proc 'el-get-start-process-list-sentinel)
(when filter (set-process-filter proc filter)))))
;; no commands, still run the final-func
(when (functionp final-func)
(funcall final-func package)))
((debug error)
(el-get-installation-failed package err))))
......@@ -467,7 +467,7 @@ Baring variable named \"el-get-NAME\", it will call
`executable-find' on NAME and use the output of that, or error
out if it's nil."
(let ((fname (intern (format "el-get-%s-executable" name)))
(vname (intern (format "el-get-%s" name))))
(vname (intern (format "el-get-%s" name))))
(cond
((fboundp fname)
(funcall fname))
......@@ -476,21 +476,21 @@ out if it's nil."
;; (bound-and-true-p vname) won't cut it
((ignore-errors (symbol-value vname))
(let ((command (symbol-value vname)))
(unless (and (file-exists-p command)
(file-executable-p command))
(error
(concat "The variable `%s' points to \"%s\", "
"which is not an executable file name on your system.")
name command))
command))
(unless (and (file-exists-p command)
(file-executable-p command))
(error
(concat "The variable `%s' points to \"%s\", "
"which is not an executable file name on your system.")
name command))
command))
(t
(let ((command (executable-find name)))
(unless command
(error
"The command named '%s' can not be found with `executable-find'"
name))
command)))))
(unless command
(error
"The command named '%s' can not be found with `executable-find'"
name))
command)))))
(defun el-get-plist-get-with-default (plist prop def)
"Same as (plist-get PLIST PROP), but falls back to DEF.
......
......@@ -41,14 +41,14 @@
(define-widget 'el-get-symbol 'symbol
"A string or a symbol, rendered as a symbol"
:match 'el-get-symbol-match
)
)
;;; END "Fuzzy" data structure support
(defconst el-get-build-recipe-body
'(choice :tag "Format"
(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"))
(sexp :tag "Evaluated expression" :format "%t: %v%h"
:value `(("./configure" ,(concat "--with-emacs=" el-get-emacs)) ("make") ("make" ("install")))
......
......@@ -18,26 +18,26 @@
(defun el-get-dependencies (packages)
"Return the list of packages to install in order."
(multiple-value-bind (plist all-sorted-p non-sorted)
(topological-sort
(apply 'append (mapcar 'el-get-dependencies-graph (el-get-as-list packages))))
(if all-sorted-p
plist
(error "Couldn't sort package dependencies for \"%s\"" package))))
(topological-sort
(apply 'append (mapcar 'el-get-dependencies-graph (el-get-as-list packages))))
(if all-sorted-p
plist
(error "Couldn't sort package dependencies for \"%s\"" package))))
(defun el-get-dependencies-graph (package)
"Return the graph of packages on which PACKAGE depends"
(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)))
(alldeps
;; Make sure all elpa packages depend on the package `package'.
;; The package `package' is an elpa package, though, so exclude it
;; to avoid a circular dependency.
(if (and (not (eq package 'package)) (eq method 'elpa))
(cons 'package pdeps)
pdeps)))
(alldeps
;; Make sure all elpa packages depend on the package `package'.
;; The package `package' is an elpa package, though, so exclude it
;; to avoid a circular dependency.
(if (and (not (eq package 'package)) (eq method 'elpa))
(cons 'package pdeps)
pdeps)))
(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
......@@ -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)."
(let ((entries (make-hash-table :test test)))
(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