From 88bddb2d430179e621345fef17ba1214543cc45a Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Thu, 23 Dec 2010 15:28:08 +0330 Subject: [PATCH] Adding current path to load-path done --- src/shitty.el | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/shitty.el b/src/shitty.el index 9b2be3d..c489040 100644 --- a/src/shitty.el +++ b/src/shitty.el @@ -14,13 +14,29 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . +(setq shit-mode 0) +(setq DEBUG 1) -(defun shitty-mode (active) - "A peace of shit configuration that tune emacs to be easier to develop with it." - (interactive "n") - (if (= active 1) - ;; if +(defun log (ARG) "print a log on message buffer." + (if (= DEBUG 1) (message "[SHIT] DEBUG >>> %s" ARG)) +) + + +(defun start-shit () + "A peace of shit configuration that tune emacs to be an IDE." + (interactive) + (if (/= shit-mode 1) (progn - () + (setq shit-mode 1) + (log "Starting shit mode . . .") + (setq cur-path-list (split-string load-file-name "/")) + (nbutlast cur-path-list) + (setq curpath (mapconcat 'identity cur-path-list "/")) + (log curpath) + (add-to-list 'load-path curpath) + ) - ) \ No newline at end of file + ) + ) + +(start-shit)