Permalink
Browse files

tabs to spaces

  • Loading branch information...
1 parent 6937396 commit 95569a6b4ee32935d38e2ac97c82aa4846b11cbd @timcharper timcharper committed Jan 17, 2010
Showing with 50 additions and 50 deletions.
  1. +50 −50 textmate.el
View
@@ -99,65 +99,65 @@ the project root and will be surrounded by double-quotes.")
(defvar *textmate-mode-map*
(let ((map (make-sparse-keymap)))
(cond ((featurep 'aquamacs)
- (define-key map [A-return] 'textmate-next-line)
- (define-key map (kbd "A-M-t") 'textmate-clear-cache)
- (define-key map (kbd "A-M-]") 'align)
- (define-key map (kbd "A-M-[") 'indent-according-to-mode)
- (define-key map (kbd "A-]") 'textmate-shift-right)
- (define-key map (kbd "A-[") 'textmate-shift-left)
- (define-key map (kbd "A-/") 'comment-or-uncomment-region-or-line)
- (define-key map (kbd "A-L") 'textmate-select-line)
- (define-key map (kbd "A-t") 'textmate-goto-file)
- (define-key map (kbd "A-T") 'textmate-goto-symbol)
+ (define-key map [A-return] 'textmate-next-line)
+ (define-key map (kbd "A-M-t") 'textmate-clear-cache)
+ (define-key map (kbd "A-M-]") 'align)
+ (define-key map (kbd "A-M-[") 'indent-according-to-mode)
+ (define-key map (kbd "A-]") 'textmate-shift-right)
+ (define-key map (kbd "A-[") 'textmate-shift-left)
+ (define-key map (kbd "A-/") 'comment-or-uncomment-region-or-line)
+ (define-key map (kbd "A-L") 'textmate-select-line)
+ (define-key map (kbd "A-t") 'textmate-goto-file)
+ (define-key map (kbd "A-T") 'textmate-goto-symbol)
(define-key map (kbd "M-<up>") 'textmate-column-up)
(define-key map (kbd "M-<down>") 'textmate-column-down)
(define-key map (kbd "M-S-<up>") 'textmate-column-up-with-select)
(define-key map (kbd "M-S-<down>") 'textmate-column-down-with-select))
- ((and (featurep 'mac-carbon) (eq window-system 'mac) mac-key-mode)
- (define-key map [(alt meta return)] 'textmate-next-line)
- (define-key map [(alt meta t)] 'textmate-clear-cache)
- (define-key map [(alt meta \])] 'align)
- (define-key map [(alt meta \[)] 'indent-according-to-mode)
- (define-key map [(alt \])] 'textmate-shift-right)
- (define-key map [(alt \[)] 'textmate-shift-left)
- (define-key map [(meta /)] 'comment-or-uncomment-region-or-line)
- (define-key map [(alt t)] 'textmate-goto-file)
+ ((and (featurep 'mac-carbon) (eq window-system 'mac) mac-key-mode)
+ (define-key map [(alt meta return)] 'textmate-next-line)
+ (define-key map [(alt meta t)] 'textmate-clear-cache)
+ (define-key map [(alt meta \])] 'align)
+ (define-key map [(alt meta \[)] 'indent-according-to-mode)
+ (define-key map [(alt \])] 'textmate-shift-right)
+ (define-key map [(alt \[)] 'textmate-shift-left)
+ (define-key map [(meta /)] 'comment-or-uncomment-region-or-line)
+ (define-key map [(alt t)] 'textmate-goto-file)
(define-key map [(alt shift l)] 'textmate-select-line)
- (define-key map [(alt shift t)] 'textmate-goto-symbol)
+ (define-key map [(alt shift t)] 'textmate-goto-symbol)
(define-key map [(alt up)] 'textmate-column-up)
(define-key map [(alt down)] 'textmate-column-down)
(define-key map [(alt shift up)] 'textmate-column-up-with-select)
(define-key map [(alt shift down)] 'textmate-column-down-with-select))
- ((featurep 'ns) ;; Emacs.app
- (define-key map [(super meta return)] 'textmate-next-line)
- (define-key map [(super meta t)] 'textmate-clear-cache)
- (define-key map [(super meta \])] 'align)
- (define-key map [(super meta \[)] 'indent-according-to-mode)
- (define-key map [(super \])] 'textmate-shift-right)
- (define-key map [(super \[)] 'textmate-shift-left)
- (define-key map [(super /)] 'comment-or-uncomment-region-or-line)
- (define-key map [(super t)] 'textmate-goto-file)
- (define-key map [(super shift l)] 'textmate-select-line)
- (define-key map [(super shift t)] 'textmate-goto-symbol)
+ ((featurep 'ns) ;; Emacs.app
+ (define-key map [(super meta return)] 'textmate-next-line)
+ (define-key map [(super meta t)] 'textmate-clear-cache)
+ (define-key map [(super meta \])] 'align)
+ (define-key map [(super meta \[)] 'indent-according-to-mode)
+ (define-key map [(super \])] 'textmate-shift-right)
+ (define-key map [(super \[)] 'textmate-shift-left)
+ (define-key map [(super /)] 'comment-or-uncomment-region-or-line)
+ (define-key map [(super t)] 'textmate-goto-file)
+ (define-key map [(super shift l)] 'textmate-select-line)
+ (define-key map [(super shift t)] 'textmate-goto-symbol)
(define-key map [(meta up)] 'textmate-column-up)
(define-key map [(meta down)] 'textmate-column-down)
(define-key map [(meta shift up)] 'textmate-column-up-with-select)
(define-key map [(meta shift down)] 'textmate-column-down-with-select))
- (t ;; Any other version
- (define-key map [(meta return)] 'textmate-next-line)
- (define-key map [(control c)(control t)] 'textmate-clear-cache)
- (define-key map [(control c)(control a)] 'align)
- (define-key map [(control tab)] 'textmate-shift-right)
- (define-key map [(control shift tab)] 'textmate-shift-left)
- (define-key map [(control c)(control k)] 'comment-or-uncomment-region-or-line)
- (define-key map [(meta t)] 'textmate-goto-file)
- (define-key map [(meta shift l)] 'textmate-select-line)
- (define-key map [(meta shift t)] 'textmate-goto-symbol)
+ (t ;; Any other version
+ (define-key map [(meta return)] 'textmate-next-line)
+ (define-key map [(control c)(control t)] 'textmate-clear-cache)
+ (define-key map [(control c)(control a)] 'align)
+ (define-key map [(control tab)] 'textmate-shift-right)
+ (define-key map [(control shift tab)] 'textmate-shift-left)
+ (define-key map [(control c)(control k)] 'comment-or-uncomment-region-or-line)
+ (define-key map [(meta t)] 'textmate-goto-file)
+ (define-key map [(meta shift l)] 'textmate-select-line)
+ (define-key map [(meta shift t)] 'textmate-goto-symbol)
(define-key map [(alt up)] 'textmate-column-up)
(define-key map [(alt down)] 'textmate-column-down)
(define-key map [(alt shift up)] 'textmate-column-up-with-select)
(define-key map [(alt shift down)] 'textmate-column-down-with-select)))
- map))
+ map))
(defvar *textmate-project-root* nil
"Used internally to cache the project root.")
@@ -357,22 +357,22 @@ Symbols matching the text at point are put first in the completion list."
*textmate-project-root*)
(defun root-match(root names)
- (member (car names) (directory-files root)))
+ (member (car names) (directory-files root)))
(defun root-matches(root names)
- (if (root-match root names)
- (root-match root names)
- (if (eq (length (cdr names)) 0)
- 'nil
- (root-matches root (cdr names))
- )))
+ (if (root-match root names)
+ (root-match root names)
+ (if (eq (length (cdr names)) 0)
+ 'nil
+ (root-matches root (cdr names))
+ )))
(defun textmate-find-project-root (&optional root)
"Determines the current project root by recursively searching for an indicator."
(when (null root) (setq root default-directory))
(cond
((root-matches root *textmate-project-roots*)
- (expand-file-name root))
+ (expand-file-name root))
((equal (expand-file-name root) "/") nil)
(t (textmate-find-project-root (concat (file-name-as-directory root) "..")))))

0 comments on commit 95569a6

Please sign in to comment.