diff options
-rw-r--r-- | basic.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -657,6 +657,15 @@ The remaining CONFIGS are evaluated after the package is loaded." (require ,package-name) ,@configs)) +;;; Test internet connection + +(defun durand-internet-on (&optional host) + "Test if the internet connection is working. +If HOST is non-nil, ping HOST, otherwise ping Google." + (interactive nil) + (setq host (cond (host) ("www.google.com"))) + (= 0 (call-process "ping" nil nil nil "-c" "1" "-W" "1" host))) + ;;; Go to parent in the file name completion map (defun durand-delete-goto-parent-dir (n &optional kill-flag) |