Skip to content

Commit

Permalink
move function definition before first use
Browse files Browse the repository at this point in the history
  • Loading branch information
eschulte committed Jan 2, 2014
1 parent 9a9edc8 commit ed58615
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions starter-kit.org
Expand Up @@ -265,6 +265,21 @@ interested in the actual code implementing the starter kit.
(require 'recentf)
#+end_src

- Function to check if a packages exist in the load path. This may be
used to preempt the installation of ELPA versions of packages whose
source may already be found in the load path.
#+name: starter-kit-loadable
#+begin_src emacs-lisp
(defun starter-kit-loadable-p (package)
"Check if PACKAGE is loadable from a directory in `load-path'."
(let ((load-file (concat (symbol-name package) ".el")))
(catch 'file-found
(dolist (dir load-path)
(let ((path (expand-file-name load-file dir)))
(when (file-exists-p path)
(throw 'file-found path)))))))
#+end_src

- ELPA archive repositories and two packages to install by default.
#+begin_src emacs-lisp
(setq package-archives
Expand Down Expand Up @@ -347,21 +362,6 @@ interested in the actual code implementing the starter kit.
file))))
#+end_src

- Function to check if a packages exist in the load path. This may be
used to preempt the installation of ELPA versions of packages whose
source may already be found in the load path.
#+name: starter-kit-loadable
#+begin_src emacs-lisp
(defun starter-kit-loadable-p (package)
"Check if PACKAGE is loadable from a directory in `load-path'."
(let ((load-file (concat (symbol-name package) ".el")))
(catch 'file-found
(dolist (dir load-path)
(let ((path (expand-file-name load-file dir)))
(when (file-exists-p path)
(throw 'file-found path)))))))
#+end_src

- Work around a bug on OS X where system-name is FQDN.
#+name: starter-kit-osX-workaround
#+begin_src emacs-lisp
Expand Down

0 comments on commit ed58615

Please sign in to comment.