Commits

mohammad Efazati committed c679a85

new code

Comments (0)

Files changed (332)

 (tool-bar-mode -1)
 (menu-bar-mode -1)
 
+
 ;(require 'color-theme)
+(add-to-list 'load-path "~/.emacs.d/")
+
 (ido-mode)
 (setq ido-enable-flex-matching t)
 ;(color-theme-initialize)
 ;;(setq color-theme-is-global t)
+;;(require 'color-theme-solarized)
 ;(color-theme-oswald)
 
 
-(add-to-list 'load-path "~/.emacs.d/")
 (require 'tabbar)
 ;(require 'LazyCatTheme)
 ;(load-file "~/.emacs.d/pyte/epy-init.el")
 (require 'sr-speedbar)
 
 
+
+
 ;(sr-speedbar-open)
 (require 'auto-complete-config)
 (add-to-list 'ac-dictionary-directories "/home/efazati/.emacs.d//ac-dict")
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
- '(highlight-current-line-globally t nil (highlight-current-line))
  '(hl-paren-colors (quote ("Cyan" "Gold" "Red")))
  '(imaxima-bg-color "black")
  '(imaxima-equation-color "Green3")
 ;;         ))
 
 (setq-default tab-width 4)
+(require 'highlight-symbol)
+
+(global-set-key [f5] 'highlight-symbol-at-point)
+(global-set-key [f6] 'highlight-symbol-next)
+(global-set-key [f4] 'highlight-symbol-prev)
+
+(require 'highlight-current-line)
+(highlight-current-line-on t)
+ 
+;; To customize the background color
+;; (set-face-background 'highlight-current-line-face "dark slate gray")
+
+
+;(require 'django-html-mode)
+;(require 'django-mode)
+(add-to-list 'auto-mode-alist '("\\.html$" . html-mode))
+
+
+    (defun toggle-fullscreen (&optional f)
+      (interactive)
+      (let ((current-value (frame-parameter nil 'fullscreen)))
+           (set-frame-parameter nil 'fullscreen
+                                (if (equal 'fullboth current-value)
+                                    (if (boundp 'old-fullscreen) old-fullscreen nil)
+                                    (progn (setq old-fullscreen current-value)
+                                           'fullboth)))))
+
+    (global-set-key [f11] 'toggle-fullscreen)
+
+    ; Make new frames fullscreen by default. Note: this hook doesn't do
+    ; anything to the initial frame if it's in your .emacs, since that file is
+    ; read _after_ the initial frame is created.
+    (add-hook 'after-make-frame-functions 'toggle-fullscreen)
+
+(setq x-select-enable-clipboard t)
+
+
+(defun my-literal-tab () (interactive) (insert "\t"))
+(global-set-key [f3] 'my-literal-tab)
+
+(add-hook 'html-mode-hook
+  (lambda ()
+    ;; Default indentation is usually 2 spaces, changing to 4.
+    (set (make-local-variable 'sgml-basic-offset) 4)))
+
+(add-hook 'html-mode-hook
+ (lambda ()
+ (define-key html-mode-map (kbd "<M-left>") 'sgml-skip-tag-backward)
+ (define-key html-mode-map (kbd "<M-right>") 'sgml-skip-tag-forward)
+ )
+)
+
+
+(global-set-key [M-delete] 'backward-kill-word)
+(global-set-key [delete] 'delete-char)
+
+(defun SS-fly-pop () 
+ "CSH: Show error using my popup function." 
+ (interactive) 
+ (let* ((line (count-lines 1 (1+ (point)))) 
+ (err-cdr (car (cdr (assoc line flymake-err-info)))) 
+        next-msg final-msg) 
+   (while err-cdr 
+     (setq next-msg (aref (pop err-cdr) 4)) 
+     (setq final-msg (cons next-msg final-msg))) 
+   (PO-popup-picker final-msg 'show))) 
+
+;(global-set-key [f8] 'scan-buf-next-region)
+;(global-set-key [f7] 'scan-buf-previous-region)
+
+;; for view flymake error in terminal and mainstream
+(defun show-fly-err-at-point ()
+  "If the cursor is sitting on a flymake error, display the
+message in the minibuffer"
+  (interactive)
+  (let ((line-no (line-number-at-pos)))
+    (dolist (elem flymake-err-info)
+      (if (eq (car elem) line-no)
+      (let ((err (car (second elem))))
+        (message "%s" (fly-pyflake-determine-message err)))))))
+
+(defun fly-pyflake-determine-message (err)
+  "pyflake is flakey if it has compile problems, this adjusts the
+message to display, so there is one ;)"
+  (cond ((not (or (eq major-mode 'Python) (eq major-mode 'python-mode) t)))
+    ((null (flymake-ler-file err))
+     ;; normal message do your thing
+     (flymake-ler-text err))
+    (t ;; could not compile err
+     (format "compile error, problem on line %s" (flymake-ler-line err)))))
+
+(defadvice flymake-goto-next-error (after display-message activate compile)
+  "Display the error in the mini-buffer rather than having to mouse over it"
+  (show-fly-err-at-point))
+
+(defadvice flymake-goto-prev-error (after display-message activate compile)
+  "Display the error in the mini-buffer rather than having to mouse over it"
+  (show-fly-err-at-point))
+
+(defadvice flymake-mode (before post-command-stuff activate compile)
+  "Add functionality to the post command hook so that if the
+cursor is sitting on a flymake error the error information is
+displayed in the minibuffer (rather than having to mouse over
+it)"
+  (set (make-local-variable 'post-command-hook)
+       (cons 'show-fly-err-at-point post-command-hook))) 
+
+
+(defun copy-line (&optional arg)
+  "Do a kill-line but copy rather than kill.  This function directly calls
+    kill-line, so see documentation of kill-line for how to use it including prefix
+    argument and relevant variables.  This function works by temporarily making the
+    buffer read-only."
+  (interactive "P")
+  (let ((buffer-read-only t)
+        (kill-read-only-ok t))
+    (kill-line arg)))
+;; optional key binding
+(global-set-key "\C-a" 'copy-line)
+
+
+
+(fset 'yes-or-no-p 'y-or-n-p)
+(setq visible-bell t) 
+
+(defun flymake-html-init ()
+    (let* ((temp-file (flymake-init-create-temp-buffer-copy
+                                            'flymake-create-temp-inplace))
+                    (local-file (file-relative-name
+                                                       temp-file
+                                                                             (file-name-directory buffer-file-name))))
+          (list "tidy" (list local-file))))
+
+(add-to-list 'flymake-allowed-file-name-masks
+                          '("\\.html$\\|\\.ctp" flymake-html-init))
+
+(add-to-list 'flymake-err-line-patterns
+                          '("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
+                                           nil 1 2 4))
+
+;; python-mode settings
+(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
+(setq interpreter-mode-alist(cons '("python" . python-mode)
+                             interpreter-mode-alist))
+;; path to the python interpreter, e.g.: ~rw/python27/bin/python2.7
+(setq py-python-command "python")
+(autoload 'python-mode "python-mode" "Python editing mode." t)
+
+(eval-after-load 'dired '(progn (require 'dired-single)))
+
+    (global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
+    (global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
+    (global-set-key (kbd "S-C-<down>") 'shrink-window)
+    (global-set-key (kbd "S-C-<up>") 'enlarge-window)
+
+
+(add-to-list 'load-path "~/.emacs.d/coffee-mode")
+(require 'coffee-mode)
+(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
+(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))
+
+(global-set-key (kbd "C-|") 'hippie-expand)
+(global-set-key [f2] 'ansi-term)
+;; use setq-default to set it for /all/ modes
+(setq-default mode-line-format
+  (list
+    ;; the buffer name; the file name as a tool tip
+    '(:eval (propertize "%b " 'face 'font-lock-keyword-face
+        'help-echo (buffer-file-name)))
+
+    ;; line and column
+    "(" ;; '%02' to set to 2 chars at least; prevents flickering
+      (propertize "%02l" 'face 'font-lock-type-face) ","
+      (propertize "%02c" 'face 'font-lock-type-face) 
+    ") "
+
+    ;; relative position, size of file
+    "["
+    (propertize "%p" 'face 'font-lock-constant-face) ;; % above top
+    "/"
+    (propertize "%I" 'face 'font-lock-constant-face) ;; size
+    "] "
+
+    ;; the current major mode for the buffer.
+    "["
+
+    '(:eval (propertize "%m" 'face 'font-lock-string-face
+              'help-echo buffer-file-coding-system))
+    "] "
+
+
+    "[" ;; insert vs overwrite mode, input-method in a tooltip
+    '(:eval (propertize (if overwrite-mode "Ovr" "Ins")
+              'face 'font-lock-preprocessor-face
+              'help-echo (concat "Buffer is in "
+                           (if overwrite-mode "overwrite" "insert") " mode")))
+
+    ;; was this buffer modified since the last save?
+    '(:eval (when (buffer-modified-p)
+              (concat ","  (propertize "Mod"
+                             'face 'font-lock-warning-face
+                             'help-echo "Buffer has been modified"))))
+
+    ;; is this buffer read-only?
+    '(:eval (when buffer-read-only
+              (concat ","  (propertize "RO"
+                             'face 'font-lock-type-face
+                             'help-echo "Buffer is read-only"))))  
+    "] "
+
+    ;; add the time, with the date and the emacs uptime in the tooltip
+    '(:eval (propertize (format-time-string "%H:%M")
+              'help-echo
+              (concat (format-time-string "%c; ")
+                      (emacs-uptime "Uptime:%hh"))))
+    " --"
+    ;; i don't want to see minor-modes; but if you want, uncomment this:
+    ;; minor-mode-alist  ;; list of minor modes
+    "%-" ;; fill with '-'
+    ))
+
+     ;; The following lines are always needed.  Choose your own keys.
+     (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
+     (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
+     (global-set-key "\C-cl" 'org-store-link)
+     (global-set-key "\C-ca" 'org-agenda)
+     (global-set-key "\C-cb" 'org-iswitchb)
+(put 'scroll-left 'disabled nil)
+
+
+
+;; -----------------------------------------------------------------------------
+;; autopair
+;; -----------------------------------------------------------------------------
+
+    (setq skeleton-pair t)
+    (setq skeleton-pair-alist
+          '((?\( _ ?\))
+            (?[  _ ?])
+            (?{  _ ?})
+            (?\" _ ?\")))
+
+    (defun autopair-insert (arg)
+      (interactive "P")
+      (let (pair)
+        (cond
+         ((assq last-command-char skeleton-pair-alist)
+          (autopair-open arg))
+         (t
+          (autopair-close arg)))))
+
+    (defun autopair-open (arg)
+      (interactive "P")
+      (let ((pair (assq last-command-char
+                        skeleton-pair-alist)))
+        (cond
+         ((and (not mark-active)
+               (eq (car pair) (car (last pair)))
+               (eq (car pair) (char-after)))
+          (autopair-close arg))
+         (t
+          (skeleton-pair-insert-maybe arg)))))
+
+    (defun autopair-close (arg)
+      (interactive "P")
+      (cond
+       (mark-active
+        (let (pair open)
+          (dolist (pair skeleton-pair-alist)
+            (when (eq last-command-char (car (last pair)))
+              (setq open (car pair))))
+          (setq last-command-char open)
+          (skeleton-pair-insert-maybe arg)))
+       ((looking-at
+         (concat "[ \t\n]*"
+                 (regexp-quote (string last-command-char))))
+        (replace-match (string last-command-char))
+        (indent-according-to-mode))
+       (t
+        (self-insert-command (prefix-numeric-value arg))
+        (indent-according-to-mode))))
+
+    (defadvice delete-backward-char (before autopair activate)
+      (when (and (char-after)
+                 (eq this-command 'delete-backward-char)
+                 (eq (char-after)
+                     (car (last (assq (char-before) skeleton-pair-alist)))))
+        (delete-char 1)))
+
+    (global-set-key "("  'autopair-insert)
+    (global-set-key ")"  'autopair-insert)
+    (global-set-key "["  'autopair-insert)
+    (global-set-key "]"  'autopair-insert)
+    (global-set-key "{"  'autopair-insert)
+    (global-set-key "}"  'autopair-insert)
+    (global-set-key "\"" 'autopair-insert)
+
+;; -----------------------------------------------------------------------------
+;; Face: chiz haie zaheri
+;; -----------------------------------------------------------------------------
 
 
 (custom-set-faces
  '(font-lock-comment-face ((((class color) (min-colors 88) (background dark)) (:foreground "OrangeRed3"))))
  '(font-lock-constant-face ((((class color) (min-colors 88) (background dark)) nil)))
  '(font-lock-doc-face ((t (:inherit font-lock-string-face :foreground "khaki4"))))
- '(font-lock-function-name-face ((((class color) (min-colors 88) (background dark)) nil)))
- '(font-lock-keyword-face ((t (:foreground "white"))))
+ '(font-lock-function-name-face ((((class color) (min-colors 88) (background dark)) (:foreground "magenta"))))
+ '(font-lock-keyword-face ((t (:foreground "cyan"))))
  '(font-lock-preprocessor-face ((t (:inherit font-lock-builtin-face :foreground "Cyan3" :weight bold))))
  '(font-lock-string-face ((((class color) (min-colors 88) (background dark)) (:foreground "cyan"))))
  '(font-lock-type-face ((((class color) (min-colors 88) (background dark)) (:foreground "DeepSkyBlue2"))))
  '(gnus-summary-normal-ancient ((((class color) (background dark)) (:foreground "Grey40"))))
  '(gnus-summary-normal-read ((((class color) (background dark)) (:foreground "khaki2"))))
  '(go-to-char-highlight ((((class color) (background dark)) (:background "Pink" :foreground "Black"))))
- '(header-line ((t (:background "Black" :foreground "Green"))))
+ '(header-line ((t (:background "Black" :foreground "cyan"))))
  '(highlight ((((class color) (min-colors 88) (background dark)) (:background "magenta"))))
  '(highlight-cl ((t (:foreground "#20ABFC" :underline nil))))
  '(highlight-cl-and-other ((t (:foreground "#20ABFC" :underline nil))))
  '(org-special-keyword ((((class color) (min-colors 16) (background dark)) (:foreground "rosybrown1"))))
  '(pabbrev-suggestions-face ((((class color) (background dark)) (:background "Black" :foreground "khaki1"))))
  '(pabbrev-suggestions-label-face ((t (:background "Black" :foreground "Grey" :inverse-video nil))))
+ '(py-builtins-face ((t (:foreground "SpringGreen1"))) t)
  '(py-decorators-face ((t (:foreground "chartreuse" :weight bold))) t)
  '(py-pseudo-keyword-face ((t (:foreground "plum"))) t)
  '(rcirc-bright-nick ((((class color) (min-colors 88) (background dark)) (:foreground "White"))))
 
 
 
-(require 'highlight-symbol)
+;; someday might want to rotate windows if more than 2 of them
+(defun swap-windows ()
+ "If you have 2 windows, it swaps them." (interactive) (cond ((not (= (count-windows) 2)) (message "You need exactly 2 windows to do this."))
+ (t
+ (let* ((w1 (first (window-list)))
+	 (w2 (second (window-list)))
+	 (b1 (window-buffer w1))
+	 (b2 (window-buffer w2))
+	 (s1 (window-start w1))
+	 (s2 (window-start w2)))
+ (set-window-buffer w1 b2)
+ (set-window-buffer w2 b1)
+ (set-window-start w1 s2)
+ (set-window-start w2 s1)))))
 
-(global-set-key [f5] 'highlight-symbol-at-point)
-(global-set-key [f6] 'highlight-symbol-next)
-(global-set-key [f4] 'highlight-symbol-prev)
 
-(require 'highlight-current-line)
-(highlight-current-line-on t)
- 
-;; To customize the background color
-;; (set-face-background 'highlight-current-line-face "dark slate gray")
+;;
+;; Never understood why Emacs doesn't have this function.
+;;
+(defun rename-file-and-buffer (new-name)
+ "Renames both current buffer and file it's visiting to NEW-NAME." (interactive "sNew name: ")
+ (let ((name (buffer-name))
+	(filename (buffer-file-name)))
+ (if (not filename)
+	(message "Buffer '%s' is not visiting a file!" name)
+ (if (get-buffer new-name)
+	 (message "A buffer named '%s' already exists!" new-name)
+	(progn 	 (rename-file name new-name 1) 	 (rename-buffer new-name) 	 (set-visited-file-name new-name) 	 (set-buffer-modified-p nil)))))) ;;
+;; Never understood why Emacs doesn't have this function, either.
+;;
+(defun move-buffer-file (dir)
+ "Moves both current buffer and file it's visiting to DIR." (interactive "DNew directory: ")
+ (let* ((name (buffer-name))
+	 (filename (buffer-file-name))
+	 (dir
+	 (if (string-match dir "\\(?:/\\|\\\\)$")
+	 (substring dir 0 -1) dir))
+	 (newname (concat dir "/" name)))
 
-
-;(require 'django-html-mode)
-;(require 'django-mode)
-(add-to-list 'auto-mode-alist '("\\.html$" . html-mode))
-
-
-    (defun toggle-fullscreen (&optional f)
-      (interactive)
-      (let ((current-value (frame-parameter nil 'fullscreen)))
-           (set-frame-parameter nil 'fullscreen
-                                (if (equal 'fullboth current-value)
-                                    (if (boundp 'old-fullscreen) old-fullscreen nil)
-                                    (progn (setq old-fullscreen current-value)
-                                           'fullboth)))))
-
-    (global-set-key [f11] 'toggle-fullscreen)
-
-    ; Make new frames fullscreen by default. Note: this hook doesn't do
-    ; anything to the initial frame if it's in your .emacs, since that file is
-    ; read _after_ the initial frame is created.
-    (add-hook 'after-make-frame-functions 'toggle-fullscreen)
-
-(setq x-select-enable-clipboard t)
-
-
-(defun my-literal-tab () (interactive) (insert "\t"))
-(global-set-key [f3] 'my-literal-tab)
-
-(add-hook 'html-mode-hook
-  (lambda ()
-    ;; Default indentation is usually 2 spaces, changing to 4.
-    (set (make-local-variable 'sgml-basic-offset) 4)))
-
-(add-hook 'html-mode-hook
- (lambda ()
- (define-key html-mode-map (kbd "<M-left>") 'sgml-skip-tag-backward)
- (define-key html-mode-map (kbd "<M-right>") 'sgml-skip-tag-forward)
- )
-)
-
-
-(global-set-key [M-delete] 'backward-kill-word)
-(global-set-key [delete] 'delete-char)
-
-(defun SS-fly-pop () 
- "CSH: Show error using my popup function." 
- (interactive) 
- (let* ((line (count-lines 1 (1+ (point)))) 
- (err-cdr (car (cdr (assoc line flymake-err-info)))) 
-        next-msg final-msg) 
-   (while err-cdr 
-     (setq next-msg (aref (pop err-cdr) 4)) 
-     (setq final-msg (cons next-msg final-msg))) 
-   (PO-popup-picker final-msg 'show))) 
-
-;(global-set-key [f8] 'scan-buf-next-region)
-;(global-set-key [f7] 'scan-buf-previous-region)
-
-;; for view flymake error in terminal and mainstream
-(defun show-fly-err-at-point ()
-  "If the cursor is sitting on a flymake error, display the
-message in the minibuffer"
-  (interactive)
-  (let ((line-no (line-number-at-pos)))
-    (dolist (elem flymake-err-info)
-      (if (eq (car elem) line-no)
-      (let ((err (car (second elem))))
-        (message "%s" (fly-pyflake-determine-message err)))))))
-
-(defun fly-pyflake-determine-message (err)
-  "pyflake is flakey if it has compile problems, this adjusts the
-message to display, so there is one ;)"
-  (cond ((not (or (eq major-mode 'Python) (eq major-mode 'python-mode) t)))
-    ((null (flymake-ler-file err))
-     ;; normal message do your thing
-     (flymake-ler-text err))
-    (t ;; could not compile err
-     (format "compile error, problem on line %s" (flymake-ler-line err)))))
-
-(defadvice flymake-goto-next-error (after display-message activate compile)
-  "Display the error in the mini-buffer rather than having to mouse over it"
-  (show-fly-err-at-point))
-
-(defadvice flymake-goto-prev-error (after display-message activate compile)
-  "Display the error in the mini-buffer rather than having to mouse over it"
-  (show-fly-err-at-point))
-
-(defadvice flymake-mode (before post-command-stuff activate compile)
-  "Add functionality to the post command hook so that if the
-cursor is sitting on a flymake error the error information is
-displayed in the minibuffer (rather than having to mouse over
-it)"
-  (set (make-local-variable 'post-command-hook)
-       (cons 'show-fly-err-at-point post-command-hook))) 
-
-
-(defun copy-line (&optional arg)
-  "Do a kill-line but copy rather than kill.  This function directly calls
-    kill-line, so see documentation of kill-line for how to use it including prefix
-    argument and relevant variables.  This function works by temporarily making the
-    buffer read-only."
-  (interactive "P")
-  (let ((buffer-read-only t)
-        (kill-read-only-ok t))
-    (kill-line arg)))
-;; optional key binding
-(global-set-key "\C-a" 'copy-line)
-
-
-
-(fset 'yes-or-no-p 'y-or-n-p)
-(setq visible-bell t) 
-
-(defun flymake-html-init ()
-    (let* ((temp-file (flymake-init-create-temp-buffer-copy
-                                            'flymake-create-temp-inplace))
-                    (local-file (file-relative-name
-                                                       temp-file
-                                                                             (file-name-directory buffer-file-name))))
-          (list "tidy" (list local-file))))
-
-(add-to-list 'flymake-allowed-file-name-masks
-                          '("\\.html$\\|\\.ctp" flymake-html-init))
-
-(add-to-list 'flymake-err-line-patterns
-                          '("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
-                                           nil 1 2 4))
-
-;; python-mode settings
-(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
-(setq interpreter-mode-alist(cons '("python" . python-mode)
-                             interpreter-mode-alist))
-;; path to the python interpreter, e.g.: ~rw/python27/bin/python2.7
-(setq py-python-command "python")
-(autoload 'python-mode "python-mode" "Python editing mode." t)
-
-;; pymacs settings
-;; (setq pymacs-python-command py-python-command)
-;; (autoload 'pymacs-load "pymacs" nil t)
-;; (autoload 'pymacs-eval "pymacs" nil t)
-;; (autoload 'pymacs-apply "pymacs")
-;; (autoload 'pymacs-call "pymacs")
-
-;(require 'pycomplete)
-
-;(load-file "~/.emacs.d/cedet/common/cedet.el")
-;(global-ede-mode 1)                      ; Enable the Project management system
-;(semantic-load-enable-code-helpers)      ; Enable prototype help and smart completion 
-;(global-srecode-minor-mode 1)            ; Enable template insertion menu
-;(semantic-load-enable-minimum-features)
-
-;(require 'pymacs)
-;(pymacs-load "ropemacs" "rope-")
-;(setq ropemacs-enable-shortcuts nil)
-;(setq ropemacs-local-prefix "C-c C-p")
-;;(setq ropemacs-global-prefix "C-x /") 
-;;   (defun load-ropemacs ()
- ;; "Load pymacs and ropemacs"
- ;;    (interactive)
- ;;    (pymacs-load "ropemacs" "rope-")
- ;;    ;; Automatically save project python buffers before refactorings
- ;;    (setq ropemacs-confirm-saving 'nil)
- ;;  )
- ;;  (global-set-key "\C-xpl" 'load-ropemacs)
-
-
-;; (require 'anything)
-;; (require 'anything-ipython)
-;; (require 'comint)
-;; (define-key comint-mode-map (kbd "M-") 'comint-next-input)
-;; (define-key comint-mode-map (kbd "M-") 'comint-previous-input)
-;; (define-key comint-mode-map [down] 'comint-next-matching-input-from-input)
-;; (define-key comint-mode-map [up] 'comint-previous-matching-input-from-input)
-
-;;  (add-hook 'python-mode-hook #'(lambda ()
-;;                                  (define-key py-mode-map (kbd "C-x i") 'anything-ipython-complete)))
-;;  (add-hook 'ipython-shell-hook #'(lambda ()
-;;                                     (define-key py-mode-map (kbd "C-x i") 'anything-ipython-complete)))
-
-;; (when (require 'anything-show-completion nil t)
-;;    (use-anything-show-completion 'anything-ipython-complete
-;;                                  '(length initial-pattern)))
-
-(eval-after-load 'dired '(progn (require 'dired-single)))
-
-    (global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
-    (global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
-    (global-set-key (kbd "S-C-<down>") 'shrink-window)
-    (global-set-key (kbd "S-C-<up>") 'enlarge-window)
-
-
-;(autoload 'django-html-mumamo-mode "~/.emacs.d/nxhtml/autostart.el")
-;(setq auto-mode-alist  (append '(("\\.html?$" . django-html-mumamo-mode)) auto-mode-alist))
-;(setq mumamo-background-colors nil) 
-;(add-to-list 'auto-mode-alist '("\\.html$" . django-html-mumamo-mode))
-	
-
-;(load-file "~/.emacs.d/emacs-for-python/epy-init.el")
-;(require 'epy-completion) ;; If you want the autocompletion settings [optional]
-
-(add-to-list 'load-path "~/.emacs.d/coffee-mode")
-(require 'coffee-mode)
-(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
-(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))
-
-(global-set-key (kbd "C-|") 'hippie-expand)
-(global-set-key [f2] 'ansi-term)
-;; use setq-default to set it for /all/ modes
-(setq-default mode-line-format
-  (list
-    ;; the buffer name; the file name as a tool tip
-    '(:eval (propertize "%b " 'face 'font-lock-keyword-face
-        'help-echo (buffer-file-name)))
-
-    ;; line and column
-    "(" ;; '%02' to set to 2 chars at least; prevents flickering
-      (propertize "%02l" 'face 'font-lock-type-face) ","
-      (propertize "%02c" 'face 'font-lock-type-face) 
-    ") "
-
-    ;; relative position, size of file
-    "["
-    (propertize "%p" 'face 'font-lock-constant-face) ;; % above top
-    "/"
-    (propertize "%I" 'face 'font-lock-constant-face) ;; size
-    "] "
-
-    ;; the current major mode for the buffer.
-    "["
-
-    '(:eval (propertize "%m" 'face 'font-lock-string-face
-              'help-echo buffer-file-coding-system))
-    "] "
-
-
-    "[" ;; insert vs overwrite mode, input-method in a tooltip
-    '(:eval (propertize (if overwrite-mode "Ovr" "Ins")
-              'face 'font-lock-preprocessor-face
-              'help-echo (concat "Buffer is in "
-                           (if overwrite-mode "overwrite" "insert") " mode")))
-
-    ;; was this buffer modified since the last save?
-    '(:eval (when (buffer-modified-p)
-              (concat ","  (propertize "Mod"
-                             'face 'font-lock-warning-face
-                             'help-echo "Buffer has been modified"))))
-
-    ;; is this buffer read-only?
-    '(:eval (when buffer-read-only
-              (concat ","  (propertize "RO"
-                             'face 'font-lock-type-face
-                             'help-echo "Buffer is read-only"))))  
-    "] "
-
-    ;; add the time, with the date and the emacs uptime in the tooltip
-    '(:eval (propertize (format-time-string "%H:%M")
-              'help-echo
-              (concat (format-time-string "%c; ")
-                      (emacs-uptime "Uptime:%hh"))))
-    " --"
-    ;; i don't want to see minor-modes; but if you want, uncomment this:
-    ;; minor-mode-alist  ;; list of minor modes
-    "%-" ;; fill with '-'
-    ))
-
-     ;; The following lines are always needed.  Choose your own keys.
-     (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
-     (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
-     (global-set-key "\C-cl" 'org-store-link)
-     (global-set-key "\C-ca" 'org-agenda)
-     (global-set-key "\C-cb" 'org-iswitchb)
-(put 'scroll-left 'disabled nil)
+ (if (not filename)
+	(message "Buffer '%s' is not visiting a file!" name)
+ (progn 	(copy-file filename newname 1) 	(delete-file filename) 	(set-visited-file-name newname) 	(set-buffer-modified-p nil) 	t)))) 

emacs/.emacs.d/ac-comphist.dat

-((("ansi-term" .
+((("pass" .
+   [1 0 0 0])
+  ("split" .
+   [0 0 0 1 0])
+  ("strip" .
+   [1 0 0 0 0])
+  ("save_to_file" .
+   [0 0 0 0 0 0 1 0 0 0 0 0])
+  ("verbose" .
+   [2 0 0 0 0 0 0])
+  ("verbos" .
+   [0 0 0 2 0 0])
+  ("write" .
+   [1 0 0 0 0])
+  ("fileObj" .
+   [0 0 0 0 1 0 0])
+  ("template" .
+   [0 0 0 1 0 0 0 0])
+  ("raw_data" .
+   [0 0 0 0 0 0 0 1])
+  ("return" .
+   [1 0 0 1 1 0])
+  ("replace" .
+   [0 0 0 0 0 1 0])
+  ("s" .
+   [1])
+  ("globalname" .
+   [0 0 0 0 1 0 0 0 0 0])
+  ("provides" .
+   [1 0 0 4 1 2 0 0])
+  ("p" .
+   [1])
+  ("auto_join" .
    [0 0 0 0 1 0 0 0 0])
-  ("FilterForm" .
-   [0 0 0 1 0 0 0 0 0 0])
-  ("jsx" .
-   [1 0 0])
-  ("Model" .
+  ("def" .
+   [2 0 0])
+  ("line" .
+   [1 0 0 0])
+  ("path" .
+   [6 0 0 0])
+  ("options" .
+   [1 0 0 0 2 1 0])
+  ("maker" .
    [1 0 0 0 0])
-  ("c" .
-   [1])
-  ("validate" .
-   [1 0 0 0 0 0 0 0])
-  ("l" .
-   [1])))
+  ("address" .
+   [1 0 0 2 0 1 0])
+  ("print" .
+   [2 0 0 0 0])
+  ("item" .
+   [3 0 0 0])
+  ("open" .
+   [1 0 0 0])
+  ("log" .
+   [1 0 0])))

emacs/.emacs.d/auto-save-list/.saves-10349-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-10704-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-11638-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-12410-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-12958-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-14641-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-15041-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-15562-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-16744-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2211-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2222-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-25193-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-25307-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2547-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2712-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2726-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2739-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2749-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2754-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2756-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2798-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2806-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2808-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2809-debian~

File contents unchanged.

emacs/.emacs.d/auto-save-list/.saves-2843-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2845-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2849-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2850-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2853-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2861-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2877-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2888-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2899-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2908-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2920-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2941-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2956-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-2973-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3026-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3027-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3030-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3050-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3064-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3090-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3096-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3120-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3149-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3177-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3213-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3222-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3280-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3338-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3600-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3687-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-3704-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-4568-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-4603-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-4648-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-5662-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-5693-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-5896-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-6123-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-6447-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-6608-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-6645-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-7049-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-8376-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-8752-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-8928-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-9162-debian~

Empty file added.

emacs/.emacs.d/auto-save-list/.saves-9288-debian~

Empty file added.

emacs/.emacs.d/elpa/archives/gnu/archive-contents

+(1
+ (adaptive-wrap .
+		[(0 1)
+		 nil "Smart line-wrapping with wrap-prefix" single])
+ (all .
+      [(1 0)
+       nil "Edit all lines matching a given regexp" single])
+ (auctex .
+	 [(11 86)
+	  nil "Integrated environment for *TeX*" tar])
+ (company .
+	  [(0 5)
+	   nil "Flexible inline text and code completion" tar])
+ (debbugs .
+	  [(0 3)
+	   nil "SOAP library to access debbugs servers" tar])
+ (djvu .
+       [(0 5)
+	nil "edit and view Djvu files via djvused" single])
+ (ediprolog .
+	    [(1 0)
+	     nil "Emacs Does Interactive Prolog" single])
+ (eldoc-eval .
+	     [(0 1)
+	      nil "Enable eldoc support when minibuffer is in use." single])
+ (epoch-view .
+	     [(0 0 1)
+	      nil "Minor mode to visualize epoch timestamps" single])
+ (jgraph-mode .
+	      [(0 0)
+	       nil "Major mode for Jgraph files" single])
+ (js2-mode .
+	   [(20090814)
+	    nil "Improved JavaScript editing mode" single])
+ (lmc .
+      [(1 0)
+       nil "Little Man Computer in Elisp" single])
+ (load-dir .
+	   [(0 0 3)
+	    nil "Load all Emacs Lisp files in a given directory" single])
+ (markchars .
+	    [(0 2 0)
+	     nil "Mark chars fitting certain characteristics" single])
+ (memory-usage .
+	       [(0 1)
+		nil "Analyze the memory usage of Emacs in various ways" single])
+ (minimap .
+	  [(1 0)
+	   nil "Sidebar showing a \"mini-map\" of a buffer" single])
+ (muse .
+       [(3 20)
+	nil "Authoring and publishing tool" tar])
+ (oauth2 .
+	 [(0 2)
+	  nil "OAuth 2.0 Authorization Protocol" single])
+ (org .
+      [(20120125)
+       nil "Outline-based notes management and organizer" tar])
+ (quarter-plane .
+		[(0 1)
+		 nil "editing using quarter-plane screen model" single])
+ (rainbow-mode .
+	       [(0 2)
+		nil "Colorize color names in buffers" single])
+ (register-list .
+		[(0 1)
+		 nil "Interactively list/edit registers" single])
+ (shen-mode .
+	    [(0 1)
+	     nil "Utilities for working with Shen code." tar])
+ (sisu-mode .
+	    [(3 0 3)
+	     nil "Major mode for SiSU markup text" single])
+ (svg-clock .
+	    [(0 3)
+	     nil "Analog clock using Scalable Vector Graphics" single])
+ (undo-tree .
+	    [(0 3 1)
+	     nil "Treat undo history as a tree" single])
+ (uni-confusables .
+		  [(0 1)
+		   nil "Unicode confusables table" tar])
+ (windresize .
+	     [(0 1)
+	      nil "Resize windows interactively" single]))
+

emacs/.emacs.d/elpa/js2-mode-20090814/js2-mode-autoloads.el

+;;; js2-mode-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+;;;### (autoloads (js2-mode) "js2-mode" "js2-mode.el" (20256 6048))
+;;; Generated autoloads from js2-mode.el
+ (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
+
+(autoload 'js2-mode "js2-mode" "\
+Major mode for editing JavaScript code.
+
+\(fn)" t nil)
+
+;;;***
+
+;;;### (autoloads nil nil ("js2-mode-pkg.el") (20256 6048 367865))
+
+;;;***
+
+(provide 'js2-mode-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; js2-mode-autoloads.el ends here

emacs/.emacs.d/elpa/js2-mode-20090814/js2-mode-pkg.el

+(define-package "js2-mode" "20090814" "Improved JavaScript editing mode" (quote nil))