Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
We can't rely on network-interfaces-list; it's not defined on w32.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Dec 27, 2008
1 parent 0a1719d commit c54067d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions starter-kit-elpa.el
Expand Up @@ -43,10 +43,16 @@
(package-install package))))

(defun esk-online? ()
(some (lambda (iface) (unless (equal "lo" (car iface))
(member 'up (first (last (network-interface-info
(car iface)))))))
(network-interface-list)))
"See if we're online.
Windows does not have the network-interface-list function, so we
just have to assume it's online."
(if (functionp 'network-interface-list)
(some (lambda (iface) (unless (equal "lo" (car iface))
(member 'up (first (last (network-interface-info
(car iface)))))))
(network-interface-list))
t))

;; On your first run, this should pull in all the base packages.
(when (esk-online?) (starter-kit-elpa-install))
Expand Down

0 comments on commit c54067d

Please sign in to comment.