53
53
(make-variable-buffer-local 'haskell-interactive-mode-old-prompt-start )
54
54
55
55
(defun haskell-interactive-prompt-regex ()
56
- " Generate a regex for searching for any occurence of the prompt
57
- at the beginning of the line. This should prevent any
56
+ " Generate a regex for searching for any occurence of the prompt\
57
+ at the beginning of the line. This should prevent any
58
58
interference with prompts that look like haskell expressions."
59
59
(concat " ^" (regexp-quote haskell-interactive-prompt)))
60
60
@@ -81,7 +81,7 @@ interference with prompts that look like haskell expressions."
81
81
(define-key map (kbd " TAB" ) 'haskell-interactive-mode-tab )
82
82
(define-key map (kbd " <C-S-backspace>" ) 'haskell-interactive-mode-kill-whole-line )
83
83
map)
84
- " Keymap used in `haskell-interactive-mode' " )
84
+ " Keymap used in `haskell-interactive-mode' . " )
85
85
86
86
(define-derived-mode haskell-interactive-mode fundamental-mode " Interactive-Haskell"
87
87
" Interactive mode for Haskell.
@@ -107,8 +107,8 @@ Key bindings:
107
107
108
108
(defvar haskell-interactive-mode-result-end
109
109
nil
110
- " Mark used to figure out where the end of the current result
111
- output is. Used to distinguish betwen user input." )
110
+ " Mark used to figure out where the end of the current result output is.
111
+ Used to distinguish betwen user input." )
112
112
113
113
(defvar haskell-interactive-previous-buffer nil
114
114
" Records the buffer to which `haskell-interactive-switch-back' should jump.
@@ -181,8 +181,7 @@ be nil.")
181
181
(message " No previous buffer. " )))
182
182
183
183
(defun haskell-interactive-copy-to-prompt ()
184
- " Copy the current line to the prompt, overwriting the current
185
- prompt."
184
+ " Copy the current line to the prompt, overwriting the current prompt."
186
185
(interactive )
187
186
(let ((l (buffer-substring-no-properties (line-beginning-position )
188
187
(line-end-position ))))
@@ -206,7 +205,7 @@ prompt."
206
205
(self-insert-command n))))
207
206
208
207
(defun haskell-interactive-at-prompt ()
209
- " If at prompt, returns start position of user-input, otherwise returns nil."
208
+ " If at prompt, return start position of user-input, otherwise return nil."
210
209
(if (>= (point )
211
210
haskell-interactive-mode-prompt-start)
212
211
haskell-interactive-mode-prompt-start
@@ -252,14 +251,13 @@ prompt."
252
251
out)))
253
252
254
253
(defun haskell-interactive-mode-multi-line (expr )
255
- " If a multi-line expression has been entered, then reformat it to be:
254
+ " If a multi-line expression EXPR has been entered, then reformat it to be:
256
255
257
256
:{
258
257
do the
259
258
multi-liner
260
259
expr
261
- :}
262
- "
260
+ :}"
263
261
(if (not (string-match " \n " expr))
264
262
expr
265
263
(let* ((i 0 )
@@ -277,7 +275,7 @@ do the
277
275
" \n " ))))
278
276
279
277
(defun haskell-interactive-trim (line )
280
- " Trim indentation off of lines in the REPL."
278
+ " Trim indentation off of LINE in the REPL."
281
279
(if (and (string-match " ^[ ]+" line)
282
280
(> (length line)
283
281
(length haskell-interactive-prompt)))
@@ -412,12 +410,12 @@ SESSION, otherwise operate on the current buffer."
412
410
'rear-nonsticky t )))))
413
411
414
412
(defun haskell-interactive-mode-goto-end-point ()
415
- " Go to the 'end' of the buffer (before the prompt.) "
413
+ " Go to the 'end' of the buffer (before the prompt). "
416
414
(goto-char haskell-interactive-mode-prompt-start)
417
415
(goto-char (line-beginning-position )))
418
416
419
417
(defun haskell-interactive-mode-history-add (input )
420
- " Add item to the history."
418
+ " Add INPUT to the history."
421
419
(setq haskell-interactive-mode-history
422
420
(cons " "
423
421
(cons input
@@ -552,7 +550,7 @@ FILE-NAME only."
552
550
nil )
553
551
554
552
(defun haskell-process-parse-error (string )
555
- " Parse the line number from the error."
553
+ " Parse the line number from the error string STRING ."
556
554
(let ((span nil ))
557
555
(cl-loop for regex
558
556
in haskell-compilation-error-regexp-alist
@@ -751,8 +749,9 @@ wrapped in compiler directive at the top of FILE."
751
749
buffer. Maybe run M-x haskell-process-restart? " )))
752
750
753
751
(defun haskell-interactive-mode-do-presentation (expr )
754
- " Present the given expression. Requires the `present' package
755
- to be installed. Will automatically import it qualified as Present."
752
+ " Present the given expression EXPR.
753
+ Requires the `present' package to be installed.
754
+ Will automatically import it qualified as Present."
756
755
(let ((p (haskell-interactive-process)))
757
756
; ; If Present.code isn't available, we probably need to run the
758
757
; ; setup.
@@ -797,7 +796,7 @@ to be installed. Will automatically import it qualified as Present."
797
796
reply)))
798
797
799
798
(defun haskell-presentation-present-slot (btn )
800
- " The callback to evaluate the slot and present it in place of the button."
799
+ " The callback to evaluate the slot and present it in place of the button BTN ."
801
800
(let ((id (button-get btn 'presentation-id ))
802
801
(hash (button-get btn 'hash ))
803
802
(parent-rep (button-get btn 'parent-rep ))
@@ -962,7 +961,7 @@ don't care when the thing completes as long as it's soonish."
962
961
'help-echo " Click to expand…" )
963
962
964
963
(defun haskell-interactive-mode-history-toggle (n )
965
- " Toggle the history n items up or down."
964
+ " Toggle the history N items up or down."
966
965
(unless (null haskell-interactive-mode-history)
967
966
(setq haskell-interactive-mode-history-index
968
967
(mod (+ haskell-interactive-mode-history-index n)
@@ -1044,8 +1043,8 @@ This completion function is used in interactive REPL buffer itself."
1044
1043
(list (- (point ) rlen) (point ) coll))))
1045
1044
1046
1045
(defun haskell-interactive-mode-trigger-compile-error (state response )
1047
- " Look for an <interactive> compile error; if there is one, pop
1048
- that up in a buffer, similar to `debug-on-error' ."
1046
+ " Look for an <interactive> compile error.
1047
+ If there is one, pop that up in a buffer, similar to `debug-on-error' ."
1049
1048
(when (and haskell-interactive-types-for-show-ambiguous
1050
1049
(string-match " ^\n <interactive>:[-0-9]+:[-0-9]+:" response)
1051
1050
(not (string-match " ^\n <interactive>:[-0-9]+:[-0-9]+:[\n ]+Warning:" response)))
@@ -1089,7 +1088,7 @@ This completion function is used in interactive REPL buffer itself."
1089
1088
'rear-nonsticky t ))))))
1090
1089
1091
1090
(defun haskell-interactive-mode-splices-buffer (session )
1092
- " Get the splices buffer for the current session ."
1091
+ " Get the splices buffer for the current SESSION ."
1093
1092
(get-buffer-create (haskell-interactive-mode-splices-buffer-name session)))
1094
1093
1095
1094
(defun haskell-interactive-mode-splices-buffer-name (session )
0 commit comments