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))
......
This diff is collapsed.
......@@ -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
car is the number of outstanding dependencies of vertex
and whose cdr is a list of dependants of vertex."
(or (gethash v entries)
(puthash v (cons 0 '()) entries))))
;; populate entries initially
(dolist (gvertex graph)
(destructuring-bind (vertex &rest dependencies) gvertex
(let ((ventry (entry vertex)))
(dolist (dependency dependencies)
(let ((dentry (entry dependency)))
(unless (funcall test dependency vertex)
(incf (car ventry))
(push vertex (cdr dentry))))))))
;; L is the list of sorted elements, and S the set of vertices
;; with no outstanding dependencies.
(let ((L '())
(S (loop for entry being each hash-value of entries
using (hash-key vertex)
when (zerop (car entry)) collect vertex)))
;; Until there are no vertices with no outstanding dependencies,
;; process vertices from S, adding them to L.
(do* () ((endp S))
(let* ((v (pop S)) (ventry (entry v)))
(remhash v entries)
(dolist (dependant (cdr ventry) (push v L))
(when (zerop (decf (car (entry dependant))))
(push dependant S)))))
;; return (1) the list of sorted items, (2) whether all items
;; were sorted, and (3) if there were unsorted vertices, the
;; hash table mapping these vertices to their dependants
(let ((all-sorted-p (zerop (hash-table-count entries))))
(values (nreverse L)
all-sorted-p
(unless all-sorted-p
entries)))))))
(or (gethash v entries)
(puthash v (cons 0 '()) entries))))
;; populate entries initially
(dolist (gvertex graph)
(destructuring-bind (vertex &rest dependencies) gvertex
(let ((ventry (entry vertex)))
(dolist (dependency dependencies)
(let ((dentry (entry dependency)))
(unless (funcall test dependency vertex)
(incf (car ventry))
(push vertex (cdr dentry))))))))
;; L is the list of sorted elements, and S the set of vertices
;; with no outstanding dependencies.
(let ((L '())
(S (loop for entry being each hash-value of entries
using (hash-key vertex)
when (zerop (car entry)) collect vertex)))
;; Until there are no vertices with no outstanding dependencies,
;; process vertices from S, adding them to L.
(do* () ((endp S))
(let* ((v (pop S)) (ventry (entry v)))
(remhash v entries)
(dolist (dependant (cdr ventry) (push v L))
(when (zerop (decf (car (entry dependant))))
(push dependant S)))))
;; return (1) the list of sorted items, (2) whether all items
;; were sorted, and (3) if there were unsorted vertices, the
;; hash table mapping these vertices to their dependants
(let ((all-sorted-p (zerop (hash-table-count entries))))
(values (nreverse L)
all-sorted-p
(unless all-sorted-p
entries)))))))
(provide 'el-get-dependencies)
......@@ -18,8 +18,8 @@
(let ((el-get-root
(file-name-as-directory
(or (bound-and-true-p el-get-dir)
(concat (file-name-as-directory user-emacs-directory) "el-get")))))
(or (bound-and-true-p el-get-dir)
(concat (file-name-as-directory user-emacs-directory) "el-get")))))
(when (file-directory-p el-get-root)
(add-to-list 'load-path el-get-root))
......@@ -30,22 +30,22 @@
(make-directory el-get-root t))
(let* ((package "el-get")
(buf (switch-to-buffer "*el-get bootstrap*"))
(pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find "git")
(error "Unable to find `git'")))
(url (or (bound-and-true-p el-get-git-install-url)
"http://github.com/dimitri/el-get.git"))
(default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress)
(buf (switch-to-buffer "*el-get bootstrap*"))
(pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find "git")
(error "Unable to find `git'")))
(url (or (bound-and-true-p el-get-git-install-url)
"http://github.com/dimitri/el-get.git"))
(default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress)
;; First clone el-get
(status
(call-process
git nil `(,buf t) t "--no-pager" "clone" "-v" url package)))
;; First clone el-get
(status
(call-process
git nil `(,buf t) t "--no-pager" "clone" "-v" url package)))
(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
(let* ((branch (cond
......@@ -64,19 +64,19 @@
(remote-branch (format "origin/%s" branch))
(default-directory pdir)
(bstatus
(if (string-equal branch "master")
0
(call-process git nil (list buf t) t "checkout" "-t" remote-branch))))
(if (string-equal branch "master")
0
(call-process git nil (list buf t) t "checkout" "-t" remote-branch))))
(unless (zerop bstatus)
(error "Couldn't `git checkout -t %s`" branch)))
(add-to-list 'load-path pdir)
(load package)
(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"))
(unless (boundp 'el-get-install-skip-emacswiki-recipes)
(el-get-emacswiki-build-local-recipes))
(with-current-buffer buf
(goto-char (point-max))
(insert "\nCongrats, el-get is installed and ready to serve!")))))
(goto-char (point-max))
(insert "\nCongrats, el-get is installed and ready to serve!")))))
This diff is collapsed.
......@@ -17,9 +17,9 @@
;; NOTE: this will probably benefit from some autoloading magic, later.
;;
(add-to-list 'load-path
(expand-file-name
"methods"
(file-name-directory (or load-file-name buffer-file-name))))
(expand-file-name
"methods"
(file-name-directory (or load-file-name buffer-file-name))))
(require 'el-get-apt-get)
(require 'el-get-builtin)
......
......@@ -26,12 +26,12 @@
;; notify user with emacs notifications API (new in 24)
;;
(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)
"Send a message to growl, that implements notifications for darwin"
(let* ((name "*growl*")
(proc
(start-process name name el-get-growl-notify-path title "-a" "Emacs")))
(proc
(start-process name name el-get-growl-notify-path title "-a" "Emacs")))
(process-send-string proc (concat message "\n"))
(process-send-eof proc))))
......@@ -87,25 +87,25 @@ fallback."
(defun el-get-post-install-notification (package)
"Notify the PACKAGE has been installed."
(el-get-notify (format "%s installed" package)
"This package has been installed successfully by el-get."))
"This package has been installed successfully by el-get."))
(add-hook 'el-get-post-install-hooks 'el-get-post-install-notification)
(defun el-get-post-update-notification (package)
"Notify the PACKAGE has been updated."
(el-get-notify (format "%s updated" package)
"This package has been updated successfully by el-get."))
"This package has been updated successfully by el-get."))
(add-hook 'el-get-post-update-hooks 'el-get-post-update-notification)
(defun el-get-post-remove-notification (package)
"Notify the PACKAGE has been removed."
(el-get-notify (format "%s removed" package)
"This package has been removed successfully by el-get."))
"This package has been removed successfully by el-get."))
(add-hook 'el-get-post-remove-hooks 'el-get-post-remove-notification)
(defun el-get-post-error-notification (package info)
"Notify the PACKAGE has failed to install."
(el-get-notify (format "%s failed to install" package)
(format "%s" info)))
(format "%s" info)))
(add-hook 'el-get-post-error-hooks 'el-get-post-error-notification)
;;
......
......@@ -69,15 +69,15 @@ Will automatically compile the init file as needed and load the
compiled version."
(when el-get-user-package-directory
(let* ((init-file-name (format "init-%s.el" package))
(package-init-file
(expand-file-name init-file-name el-get-user-package-directory))
(file-name-no-extension (file-name-sans-extension package-init-file))
(compiled-init-file (concat file-name-no-extension ".elc")))
(package-init-file
(expand-file-name init-file-name el-get-user-package-directory))
(file-name-no-extension (file-name-sans-extension package-init-file))
(compiled-init-file (concat file-name-no-extension ".elc")))
(when (file-exists-p package-init-file)
(when el-get-byte-compile
(el-get-byte-compile-file package-init-file))
(el-get-verbose-message "el-get: load %S" file-name-no-extension)
(load file-name-no-extension 'noerror)))))
(when el-get-byte-compile
(el-get-byte-compile-file package-init-file))
(el-get-verbose-message "el-get: load %S" file-name-no-extension)
(load file-name-no-extension 'noerror)))))
(defun el-get-recipe-dirs ()
"Return the elements of `el-get-recipe-path' that actually exist.
......@@ -107,18 +107,18 @@ Used to avoid errors when exploring the path for recipes"
(defun el-get-recipe-filename (package)
"Return the name of the file that contains the recipe for PACKAGE, if any."
(let ((package-el (concat (el-get-as-string package) ".el"))
(package-rcp (concat (el-get-as-string package) ".rcp")))
(package-rcp (concat (el-get-as-string package) ".rcp")))
(loop for dir in el-get-recipe-path
for recipe-el = (expand-file-name package-el dir)
for recipe-rcp = (expand-file-name package-rcp dir)
if (file-exists-p recipe-el) return recipe-el
if (file-exists-p recipe-rcp) return recipe-rcp)))
for recipe-el = (expand-file-name package-el dir)
for recipe-rcp = (expand-file-name package-rcp dir)
if (file-exists-p recipe-el) return recipe-el
if (file-exists-p recipe-rcp) return recipe-rcp)))
(defun el-get-read-recipe (package)
"Return the source definition for PACKAGE, from the recipes."
(let ((filename (el-get-recipe-filename package)))
(if filename
(el-get-read-recipe-file filename)
(el-get-read-recipe-file filename)
(error "El-get can not find a recipe for package \"%s\"" package))))
(defun el-get-read-all-recipe-files ()
......@@ -154,23 +154,23 @@ in `el-get-recipe-path' in order."
(defun el-get-package-def (package)
"Return a single `el-get-sources' entry for PACKAGE."
(let ((source (loop for src in el-get-sources
when (string= package (el-get-source-name src))
return src)))
when (string= package (el-get-source-name src))
return src)))
(cond ((or (null source) (symbolp source))
;; not in `el-get-sources', or only mentioned by name
;; (compatibility from pre 3.1 era)
(el-get-read-recipe package))
;; not in `el-get-sources', or only mentioned by name
;; (compatibility from pre 3.1 era)
(el-get-read-recipe package))
((null (plist-get source :type))
;; we got a list with no :type, that's an override plist
(loop with def = (el-get-read-recipe package)
for (prop override) on source by 'cddr
do (plist-put def prop override)
finally return def))
((null (plist-get source :type))
;; we got a list with no :type, that's an override plist
(loo