(defun sacha/laptop-net-profile () "Return the current network profile." (with-temp-buffer (call-process "/etc/init.d/laptop-net" nil t nil "profile") (goto-char (point-min)) (buffer-substring (point) (line-end-position)))) (defun sacha/laptop-net-profile-school () "Set the environment for school." (setenv "http_proxy" "http://proxy.admu.edu.ph:3128") (setenv "ftp_proxy" "http://proxy.admu.edu.ph:3128")) (cond ((string= (sacha/laptop-net-profile) "school") (sacha/laptop-net-profile-school)))