Skip to content

Commit 65bdfd8

Browse files
committed
Convert all tabs to spaces
1 parent 923e3f1 commit 65bdfd8

15 files changed

+209
-209
lines changed

haskell-cabal.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ file), then this function returns nil."
204204
(let* ((file (haskell-cabal-find-file))
205205
(dir (if file (file-name-directory file) default-directory)))
206206
(if use-defaults
207-
dir
208-
(haskell-utils-read-directory-name
209-
(format "Cabal dir%s: " (if file (format " (guessed from %s)" (file-relative-name file)) ""))
210-
dir))))
207+
dir
208+
(haskell-utils-read-directory-name
209+
(format "Cabal dir%s: " (if file (format " (guessed from %s)" (file-relative-name file)) ""))
210+
dir))))
211211

212212
(defun haskell-cabal-compute-checksum (dir)
213213
"Compute MD5 checksum of package description file in DIR.

haskell-commands.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ of which the latter defaults to the current buffer."
527527
(or (haskell-session-get session 'current-dir)
528528
(haskell-session-get session 'cabal-dir)
529529
(if (buffer-file-name buffer)
530-
(file-name-directory (buffer-file-name buffer))
531-
"~/")))
530+
(file-name-directory (buffer-file-name buffer))
531+
"~/")))
532532

533533
(defun haskell-session-prompt-set-current-dir (session &optional use-default)
534534
"Prompt for the current directory.
@@ -537,8 +537,8 @@ Return current working directory for SESSION."
537537
(haskell-session-set-current-dir
538538
session
539539
(if use-default
540-
default
541-
(haskell-utils-read-directory-name "Set current directory: " default))))
540+
default
541+
(haskell-utils-read-directory-name "Set current directory: " default))))
542542
(haskell-session-get session 'current-dir))
543543

544544
(defun haskell-process-change-dir (session process dir)
@@ -813,8 +813,8 @@ output. If CMD fails the buffer remains unchanged."
813813
(setq str (replace-match "" t t str)))
814814
str))
815815
(_errout (lambda (fmt &rest args)
816-
(let* ((warning-fill-prefix " "))
817-
(display-warning cmd (apply 'format fmt args) :warning))))
816+
(let* ((warning-fill-prefix " "))
817+
(display-warning cmd (apply 'format fmt args) :warning))))
818818
(filename (buffer-file-name (current-buffer)))
819819
(cmd-prefix (replace-regexp-in-string " .*" "" cmd))
820820
(tmp-file (make-temp-file cmd-prefix))
@@ -824,8 +824,8 @@ output. If CMD fails the buffer remains unchanged."
824824
(haskell-session-cabal-dir haskell-session)
825825
default-directory))
826826
(_errcode (with-temp-file tmp-file
827-
(call-process cmd filename
828-
(list (current-buffer) err-file) nil)))
827+
(call-process cmd filename
828+
(list (current-buffer) err-file) nil)))
829829
(stderr-output
830830
(with-temp-buffer
831831
(insert-file-contents err-file)

haskell-font-lock.el

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ Regexp match data 0 points to the chars."
198198

199199
(defun haskell-font-lock-symbols-keywords ()
200200
(when (and haskell-font-lock-symbols
201-
haskell-font-lock-symbols-alist)
201+
haskell-font-lock-symbols-alist)
202202
`((,(regexp-opt (mapcar 'car haskell-font-lock-symbols-alist) t)
203203
(0 (haskell-font-lock-compose-symbol ',haskell-font-lock-symbols-alist)
204-
;; In Emacs-21, if the `override' field is nil, the face
205-
;; expressions is only evaluated if the text has currently
206-
;; no face. So force evaluation by using `keep'.
207-
keep)))))
204+
;; In Emacs-21, if the `override' field is nil, the face
205+
;; expressions is only evaluated if the text has currently
206+
;; no face. So force evaluation by using `keep'.
207+
keep)))))
208208

209209
(defun haskell-font-lock-keywords ()
210210
;; this has to be a function because it depends on global value of
@@ -437,13 +437,13 @@ Regexp match data 0 points to the chars."
437437
((save-excursion
438438
(goto-char (nth 8 state))
439439
(or (looking-at-p "\\(?:{- ?\\|-- \\)[|^*$]")
440-
(and (looking-at-p "--") ; are we at double dash comment
441-
(forward-line -1) ; this is nil on first line
442-
(eq (get-text-property (line-end-position) 'face)
443-
'font-lock-doc-face) ; is a doc face
444-
(forward-line)
445-
(skip-syntax-forward "-") ; see if there is only whitespace
446-
(eq (point) (nth 8 state))))) ; we are back in position
440+
(and (looking-at-p "--") ; are we at double dash comment
441+
(forward-line -1) ; this is nil on first line
442+
(eq (get-text-property (line-end-position) 'face)
443+
'font-lock-doc-face) ; is a doc face
444+
(forward-line)
445+
(skip-syntax-forward "-") ; see if there is only whitespace
446+
(eq (point) (nth 8 state))))) ; we are back in position
447447
'font-lock-doc-face)
448448
(t 'font-lock-comment-face)))
449449

haskell-interactive-mode.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ SESSION, otherwise operate on the current buffer."
337337
(with-current-buffer (haskell-session-interactive-buffer session)
338338
(goto-char (point-max))
339339
(insert (ansi-color-apply
340-
(propertize text
341-
'font-lock-face 'haskell-interactive-face-result
340+
(propertize text
341+
'font-lock-face 'haskell-interactive-face-result
342342
'front-sticky t
343-
'prompt t
344-
'read-only t
345-
'rear-nonsticky t
346-
'result t)))
343+
'prompt t
344+
'read-only t
345+
'rear-nonsticky t
346+
'result t)))
347347
(haskell-interactive-mode-handle-h)
348348
(let ((marker (set (make-local-variable 'haskell-interactive-mode-result-end)
349349
(make-marker))))

haskell-lexeme.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
(and (consp key) (> (car key) 128))
3030
(and (numberp key) (> key 128)))
3131
(if (member val '(Pc Pd Po Sm Sc Sk So))
32-
(modify-category-entry key ?P))))
32+
(modify-category-entry key ?P))))
3333
unicode-category-table)
3434

3535
(dolist (key (string-to-list "!#$%&*+./<=>?@^|~\\-"))

haskell-navigate-imports.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
(haskell-navigate-imports-line)))
100100
(forward-line))
101101
(if (haskell-navigate-imports-line)
102-
(point)
102+
(point)
103103
nil)))
104104

105105
(defun haskell-navigate-imports-line ()

haskell-process.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
8686
(apply haskell-process-wrapper-function
8787
(list
8888
(append (haskell-process-path-to-list haskell-process-path-ghci)
89-
haskell-process-args-ghci)))))
89+
haskell-process-args-ghci)))))
9090
('cabal-repl
9191
(append (list (format "Starting inferior `cabal repl' process using %s ..."
9292
haskell-process-path-cabal)
@@ -95,7 +95,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
9595
(apply haskell-process-wrapper-function
9696
(list
9797
(append
98-
(haskell-process-path-to-list haskell-process-path-cabal)
98+
(haskell-process-path-to-list haskell-process-path-cabal)
9999
(list "repl")
100100
haskell-process-args-cabal-repl
101101
(let ((target (haskell-session-target session)))
@@ -107,7 +107,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
107107
(apply haskell-process-wrapper-function
108108
(list
109109
(append
110-
(haskell-process-path-to-list haskell-process-path-stack)
110+
(haskell-process-path-to-list haskell-process-path-stack)
111111
(list "ghci")
112112
(let ((target (haskell-session-target session)))
113113
(if target (list target) nil))

haskell-session.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
(let ((dir (haskell-session-get a 'cabal-dir)))
6666
(if dir
6767
(if (string-prefix-p dir
68-
(file-name-directory (buffer-file-name)))
68+
(file-name-directory (buffer-file-name)))
6969
(if acc
7070
(if (and
7171
(> (length (haskell-session-get a 'cabal-dir))
@@ -155,9 +155,9 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
155155
(let* ((maybe-target (haskell-session-get s 'target))
156156
(target (if maybe-target maybe-target
157157
(let ((new-target
158-
(if haskell-process-load-or-reload-prompt
159-
(read-string "build target (empty for default):")
160-
"")))
158+
(if haskell-process-load-or-reload-prompt
159+
(read-string "build target (empty for default):")
160+
"")))
161161
(haskell-session-set-target s new-target)))))
162162
(if (not (string= target "")) target nil)))
163163

@@ -198,10 +198,10 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
198198
"Get the session cabal-dir."
199199
(or (haskell-session-get s 'cabal-dir)
200200
(let ((set-dir (haskell-cabal-get-dir (not haskell-process-load-or-reload-prompt))))
201-
(if set-dir
202-
(progn (haskell-session-set-cabal-dir s set-dir)
203-
set-dir)
204-
(haskell-session-cabal-dir s)))))
201+
(if set-dir
202+
(progn (haskell-session-set-cabal-dir s set-dir)
203+
set-dir)
204+
(haskell-session-cabal-dir s)))))
205205

206206
(defun haskell-session-modify (session key update)
207207
"Update the value at KEY in SESSION with UPDATE."

haskell-sort-imports.el

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ within that region."
5656
(haskell-sort-imports-goto-import-start))
5757
(haskell-sort-imports-goto-group-start))
5858
(let* ((start (point))
59-
(imports (haskell-sort-imports-collect-imports))
60-
(sorted (sort (cl-copy-list imports)
61-
(lambda (a b)
62-
(string< (haskell-sort-imports-normalize a)
63-
(haskell-sort-imports-normalize b))))))
64-
(when (not (equal imports sorted))
65-
(delete-region start (point))
66-
(mapc (lambda (import) (insert import "\n")) sorted))
67-
(goto-char start)
68-
(when (search-forward current-string nil t 1)
69-
(forward-char (- (length current-string)))
70-
(forward-char current-offset))))))
59+
(imports (haskell-sort-imports-collect-imports))
60+
(sorted (sort (cl-copy-list imports)
61+
(lambda (a b)
62+
(string< (haskell-sort-imports-normalize a)
63+
(haskell-sort-imports-normalize b))))))
64+
(when (not (equal imports sorted))
65+
(delete-region start (point))
66+
(mapc (lambda (import) (insert import "\n")) sorted))
67+
(goto-char start)
68+
(when (search-forward current-string nil t 1)
69+
(forward-char (- (length current-string)))
70+
(forward-char current-offset))))))
7171

7272
(defun haskell-sort-imports-normalize (i)
7373
"Normalize an import, if possible, so that it can be sorted."

haskell.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"A `completion-at-point' function using the current haskell process."
7474
(when (haskell-session-maybe)
7575
(let ((process (haskell-process))
76-
symbol-bounds)
76+
symbol-bounds)
7777
(cond
7878
;; ghci can complete module names, but it needs the "import "
7979
;; string at the beginning

tests/haskell-cabal-tests.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
(with-temp-buffer
1010
(haskell-cabal-mode)
1111
(let ((scriptDir
12-
(file-name-directory
13-
(or (symbol-file 'haskell-cabal-enum-targets-1)
14-
(buffer-file-name)))))
12+
(file-name-directory
13+
(or (symbol-file 'haskell-cabal-enum-targets-1)
14+
(buffer-file-name)))))
1515
(setq default-directory (expand-file-name "test-data" scriptDir)))
1616
(should (equal '("Test" "test-1" "bench-1" "bin-1")
17-
(haskell-cabal-enum-targets)))))
17+
(haskell-cabal-enum-targets)))))
1818

1919
(ert-deftest haskell-cabal-get-field-1 ()
2020
(with-temp-buffer
2121
(let ((scriptDir
22-
(file-name-directory
23-
(or (symbol-file 'haskell-cabal-get-field-1)
24-
(buffer-file-name)))))
22+
(file-name-directory
23+
(or (symbol-file 'haskell-cabal-get-field-1)
24+
(buffer-file-name)))))
2525
(set-visited-file-name (expand-file-name "test-data/Source.hs" scriptDir) t t))
2626
(should (equal "Simple"
27-
(haskell-cabal-get-field "build-type")))))
27+
(haskell-cabal-get-field "build-type")))))
2828

2929
(ert-deftest haskell-cabal-compute-checksum-1 ()
3030
(let ((scriptDir

0 commit comments

Comments
 (0)