Skip to content

Commit 0e7bda4

Browse files
committed
Fix some warnings
This fixes a few warnings Flycheck was showing.
1 parent ea1851b commit 0e7bda4

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

haskell-indentation.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ negative ARG. Handles bird style literate Haskell too."
210210
(defun haskell-indentation-next-indentation (col indentations &optional nofail)
211211
"Find the leftmost indentation which is greater than COL.
212212
Indentations are taken from INDENTATIONS, which should be a
213-
list. Return the last indentation if there are no bigger ones and
213+
list. Return the last indentation if there are no bigger ones and
214214
NOFAIL is non-NIL."
215215
(when (null indentations)
216216
(error "haskell-indentation-next-indentation called with empty list"))
@@ -295,11 +295,11 @@ indentation points to the right, we switch going to the left."
295295
t))
296296
(t nil)))
297297

298-
(defun haskell-indentation-indent-region (start end)
298+
(defun haskell-indentation-indent-region (_start _end)
299299
"This function does nothing.
300300
301301
It is better to do nothing to indent region in Haskell than to
302-
break the semantics of indentation. This function is used for
302+
break the semantics of indentation. This function is used for
303303
`indent-region-function' because the default is to call
304304
`indent-line-function' on every line from START to END and that
305305
also produces catastrophic results.

haskell-interactive-mode.el

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
(make-variable-buffer-local 'haskell-interactive-mode-old-prompt-start)
5454

5555
(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
5858
interference with prompts that look like haskell expressions."
5959
(concat "^" (regexp-quote haskell-interactive-prompt)))
6060

@@ -81,7 +81,7 @@ interference with prompts that look like haskell expressions."
8181
(define-key map (kbd "TAB") 'haskell-interactive-mode-tab)
8282
(define-key map (kbd "<C-S-backspace>") 'haskell-interactive-mode-kill-whole-line)
8383
map)
84-
"Keymap used in `haskell-interactive-mode'")
84+
"Keymap used in `haskell-interactive-mode'.")
8585

8686
(define-derived-mode haskell-interactive-mode fundamental-mode "Interactive-Haskell"
8787
"Interactive mode for Haskell.
@@ -107,8 +107,8 @@ Key bindings:
107107

108108
(defvar haskell-interactive-mode-result-end
109109
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.")
112112

113113
(defvar haskell-interactive-previous-buffer nil
114114
"Records the buffer to which `haskell-interactive-switch-back' should jump.
@@ -181,8 +181,7 @@ be nil.")
181181
(message "No previous buffer.")))
182182

183183
(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."
186185
(interactive)
187186
(let ((l (buffer-substring-no-properties (line-beginning-position)
188187
(line-end-position))))
@@ -206,7 +205,7 @@ prompt."
206205
(self-insert-command n))))
207206

208207
(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."
210209
(if (>= (point)
211210
haskell-interactive-mode-prompt-start)
212211
haskell-interactive-mode-prompt-start
@@ -252,14 +251,13 @@ prompt."
252251
out)))
253252

254253
(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:
256255
257256
:{
258257
do the
259258
multi-liner
260259
expr
261-
:}
262-
"
260+
:}"
263261
(if (not (string-match "\n" expr))
264262
expr
265263
(let* ((i 0)
@@ -277,7 +275,7 @@ do the
277275
"\n"))))
278276

279277
(defun haskell-interactive-trim (line)
280-
"Trim indentation off of lines in the REPL."
278+
"Trim indentation off of LINE in the REPL."
281279
(if (and (string-match "^[ ]+" line)
282280
(> (length line)
283281
(length haskell-interactive-prompt)))
@@ -412,12 +410,12 @@ SESSION, otherwise operate on the current buffer."
412410
'rear-nonsticky t)))))
413411

414412
(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)."
416414
(goto-char haskell-interactive-mode-prompt-start)
417415
(goto-char (line-beginning-position)))
418416

419417
(defun haskell-interactive-mode-history-add (input)
420-
"Add item to the history."
418+
"Add INPUT to the history."
421419
(setq haskell-interactive-mode-history
422420
(cons ""
423421
(cons input
@@ -552,7 +550,7 @@ FILE-NAME only."
552550
nil)
553551

554552
(defun haskell-process-parse-error (string)
555-
"Parse the line number from the error."
553+
"Parse the line number from the error string STRING."
556554
(let ((span nil))
557555
(cl-loop for regex
558556
in haskell-compilation-error-regexp-alist
@@ -751,8 +749,9 @@ wrapped in compiler directive at the top of FILE."
751749
buffer. Maybe run M-x haskell-process-restart?")))
752750

753751
(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."
756755
(let ((p (haskell-interactive-process)))
757756
;; If Present.code isn't available, we probably need to run the
758757
;; setup.
@@ -797,7 +796,7 @@ to be installed. Will automatically import it qualified as Present."
797796
reply)))
798797

799798
(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."
801800
(let ((id (button-get btn 'presentation-id))
802801
(hash (button-get btn 'hash))
803802
(parent-rep (button-get btn 'parent-rep))
@@ -962,7 +961,7 @@ don't care when the thing completes as long as it's soonish."
962961
'help-echo "Click to expand…")
963962

964963
(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."
966965
(unless (null haskell-interactive-mode-history)
967966
(setq haskell-interactive-mode-history-index
968967
(mod (+ haskell-interactive-mode-history-index n)
@@ -1044,8 +1043,8 @@ This completion function is used in interactive REPL buffer itself."
10441043
(list (- (point) rlen) (point) coll))))
10451044

10461045
(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'."
10491048
(when (and haskell-interactive-types-for-show-ambiguous
10501049
(string-match "^\n<interactive>:[-0-9]+:[-0-9]+:" response)
10511050
(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."
10891088
'rear-nonsticky t))))))
10901089

10911090
(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."
10931092
(get-buffer-create (haskell-interactive-mode-splices-buffer-name session)))
10941093

10951094
(defun haskell-interactive-mode-splices-buffer-name (session)

haskell.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@
7474
(make-obsolete 'haskell-process-completions-at-point
7575
'haskell-completions-sync-repl-completion-at-point
7676
"June 19, 2015")
77+
7778
(defun haskell-process-completions-at-point ()
78-
"A completion-at-point function using the current haskell process."
79+
"A `completion-at-point' function using the current haskell process."
7980
(when (haskell-session-maybe)
8081
(let ((process (haskell-process))
8182
symbol-bounds)
@@ -461,9 +462,9 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
461462
(list "build --ghc-options=-fforce-recomp"))))))
462463

463464
(defun haskell-process-file-loadish (command reload-p module-buffer)
464-
"Run a loading-ish COMMAND that wants to pick up type errors
465-
and things like that. RELOAD-P indicates whether the notification
466-
should say 'reloaded' or 'loaded'. MODULE-BUFFER may be used
465+
"Run a loading-ish COMMAND that wants to pick up type errors\
466+
and things like that. RELOAD-P indicates whether the notification
467+
should say 'reloaded' or 'loaded'. MODULE-BUFFER may be used
467468
for various things, but is optional."
468469
(let ((session (haskell-session)))
469470
(haskell-session-current-dir session)

0 commit comments

Comments
 (0)