   "Remove white spaces in beginning and ending of STRING.
 White space here is any of: space, tab, emacs newline (line feed, ASCII 10)."
   (replace-regexp-in-string "\\`[ \t\n]*" "" (replace-regexp-in-string "[ \t\n]*\\'" "" string)))
-
-(defun ke/reset-path ()
-  "Reset the path to the original one"
-  (when ke/original-path (setenv "PATH" ke/original-path)))
 
 (defun ke/find-root-dir (path look-for-member &optional discarded)
   "Recursively finds for a directory in the given path"

(defun ke/compile (argument &optional parallel-jobs silent alternative-compiler pre-make)
  "KE Compilation System, calls 'compile without cluttering the default values"
  (interactive "sTarget: ")
  (ke/setup-path)
  (let* ((full-path (ke/find-where-to-compile (if (eq major-mode 'dired-mode)
                                                  (dired-current-directory)
                                                (file-name-directory buffer-file-name))))
         (compile-command (concat pre-make " make -C \""
                                  full-path
                                  "\" "
                                  (when parallel-jobs (concat "-j" (number-to-string parallel-jobs)))
                                  " "
                                  (when silent "--silent")
                                  " "
                                  (when alternative-compiler (concat "CXX=\"" alternative-compiler "\""))
                                  " "
                                  argument)))
    (call-interactively 'compile)
    (ke/reset-path)))

;; Set the bear command
(defun ke/generate-bear-command ()

                  "/ke/local/toolchain3-x86_64-nptl/tools/java/jdk1.6.0_13/bin:"
                  "/ke/local/toolchain3-x86_64-nptl/tools/java/ant-1.7.0/bin:"
                  (getenv "PATH"))))

(defmacro ke/with-compilation-path (&rest body)
  (let ((current-path (getenv "PATH")))
    (ke/setup-path)
    `(unwind-protect
         (progn ,@body)
       (setenv "PATH" ,current-path))))

(defun ke/notify (text)
  (interactive "sInsert the text of the notification: ")
