Skip to content

Commit 5a9f807

Browse files
authored
Reformat docstring to satisfy Emacs 28.1 byte compiler
* Fixed build errors. * Fix the first line to be a complete sentence. And more.
1 parent fe3a804 commit 5a9f807

12 files changed

+57
-31
lines changed

haskell-cabal.el

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ file), then this function returns nil."
232232

233233
;;;###autoload
234234
(defun haskell-cabal-get-dir (&optional use-defaults)
235-
"Get the Cabal dir for a new project. Various ways of figuring this out,
236-
and indeed just prompting the user. Do them all."
235+
"Get the Cabal dir for a new project.
236+
Various ways of figuring this out, and indeed just prompting the user. Do them
237+
all."
237238
(let* ((file (haskell-cabal-find-file))
238239
(dir (if file (file-name-directory file) default-directory)))
239240
(if use-defaults
@@ -360,7 +361,9 @@ OTHER-WINDOW use `find-file-other-window'."
360361
(defconst haskell-cabal-conditional-regexp "^[ \t]*\\(\\if\\|else\\|}\\)")
361362

362363
(defun haskell-cabal-classify-line ()
363-
"Classify the current line into 'section-header 'subsection-header 'section-data 'comment and 'empty '"
364+
"Classify the current line's type.
365+
Possible results are 'section-header 'subsection-header 'section-data 'comment
366+
and 'empty '"
364367
(save-excursion
365368
(beginning-of-line)
366369
(cond
@@ -493,7 +496,8 @@ OTHER-WINDOW use `find-file-other-window'."
493496
((equal component-type "benchmark") "bench"))))
494497

495498
(defun haskell-cabal-enum-targets (&optional process-type)
496-
"Enumerate .cabal targets. PROCESS-TYPE determines the format of the returned target."
499+
"Enumerate .cabal targets.
500+
PROCESS-TYPE determines the format of the returned target."
497501
(let ((cabal-file (haskell-cabal-find-file))
498502
(process-type (if process-type process-type 'ghci)))
499503
(when (and cabal-file (file-readable-p cabal-file))
@@ -923,9 +927,10 @@ resulting buffer-content. Unmark line at the end."
923927
haskell-cabal-source-bearing-sections))))
924928

925929
(defun haskell-cabal-line-filename ()
926-
"Expand filename in current line according to the subsection type
930+
"Expand filename in current line according to the subsection type.
927931
928-
Module names in exposed-modules and other-modules are expanded by replacing each dot (.) in the module name with a forward slash (/) and appending \".hs\"
932+
Module names in exposed-modules and other-modules are expanded by replacing each
933+
dot (.) in the module name with a forward slash (/) and appending \".hs\"
929934
930935
Example: Foo.Bar.Quux ==> Foo/Bar/Quux.hs
931936

haskell-compile.el

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,40 @@
4141

4242
(defcustom haskell-compile-cabal-build-command
4343
"cabal build --ghc-option=-ferror-spans"
44-
"Default build command to use for `haskell-cabal-build' when a cabal file is detected.
44+
"Default build command to use for `haskell-cabal-build'.
45+
It is used when a cabal file is detected.
4546
For legacy compat, `%s' is replaced by the cabal package top folder."
4647
:group 'haskell-compile
4748
:type 'string)
4849

4950
(defcustom haskell-compile-cabal-build-alt-command
5051
"cabal clean -s && cabal build --ghc-option=-ferror-spans"
51-
"Alternative build command to use when `haskell-cabal-build' is called with a negative prefix argument.
52+
"Alternative build command to use when `haskell-cabal-build'.
53+
It is used when `haskell-cabal-build' is called with a negative prefix argument.
5254
For legacy compat, `%s' is replaced by the cabal package top folder."
5355
:group 'haskell-compile
5456
:type 'string)
5557

5658
(defcustom haskell-compile-stack-build-command
5759
"stack build --fast"
58-
"Default build command to use for `haskell-stack-build' when a stack file is detected.
60+
"Default build command to use for `haskell-stack-build'.
61+
It is used when a stack file is detected.
5962
For legacy compat, `%s' is replaced by the stack package top folder."
6063
:group 'haskell-compile
6164
:type 'string)
6265

6366
(defcustom haskell-compile-stack-build-alt-command
6467
"stack clean && stack build --fast"
65-
"Alternative build command to use when `haskell-stack-build' is called with a negative prefix argument.
68+
"Alternative build command to use when `haskell-stack-build'.
69+
It is used when `haskell-stack-build' is called with a negative prefix argument.
6670
For legacy compat, `%s' is replaced by the stack package top folder."
6771
:group 'haskell-compile
6872
:type 'string)
6973

7074
(defcustom haskell-compile-command
7175
"ghc -Wall -ferror-spans -fforce-recomp -c %s"
72-
"Default build command to use for `haskell-cabal-build' when no cabal or stack file is detected.
76+
"Default build command to use for `haskell-cabal-build'.
77+
It is used when no cabal or stack file is detected.
7378
The `%s' placeholder is replaced by the current buffer's filename."
7479
:group 'haskell-compile
7580
:type 'string)
@@ -83,8 +88,8 @@ The `%s' placeholder is replaced by the current buffer's filename."
8388
(defcustom haskell-compiler-type
8489
'auto
8590
"Controls whether to use cabal, stack, or ghc to compile.
86-
Auto (the default) means infer from the presence of a cabal or stack spec file,
87-
following same rules as haskell-process-type."
91+
Auto (the default) means infer from the presence of a cabal or stack spec file,
92+
following same rules as haskell-process-type."
8893
:type '(choice (const auto) (const ghc) (const stack) (const cabal))
8994
:group 'haskell-compile)
9095
(make-variable-buffer-local 'haskell-compiler-type)

haskell-customize.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ pass additional flags to `ghc'."
172172

173173
(defcustom haskell-process-do-cabal-format-string
174174
":!cd %s && %s"
175-
"The way to run cabal commands. It takes two arguments -- the directory and the command.
175+
"The way to run cabal commands.
176+
It takes two arguments -- the directory and the command.
176177
See `haskell-process-do-cabal' for more details."
177178
:group 'haskell-interactive
178179
:type 'string)
@@ -241,7 +242,8 @@ is a member of the hidden package, blah blah."
241242

242243
(defcustom haskell-process-suggest-overloaded-strings
243244
t
244-
"Suggest adding OverloadedStrings pragma to file when getting type mismatches with [Char]."
245+
"Suggest adding OverloadedStrings pragma to file.
246+
It is used when getting type mismatches with [Char]."
245247
:type 'boolean
246248
:group 'haskell-interactive)
247249

haskell-indent.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ Returns the location of the start of the comment, nil otherwise."
434434
(haskell-indent-skip-blanks-and-newlines-forward end))))
435435

436436
(defun haskell-indent-next-symbol-safe (end)
437-
"Puts point to the next following symbol, or to end if there are no more symbols in the sexp."
437+
"Puts point if there are no more symbols in the sexp.
438+
The point is put to the next following symbol, or to end."
438439
(condition-case _errlist (haskell-indent-next-symbol end)
439440
(error (goto-char end))))
440441

haskell-interactive-mode.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@
4848
"Mark used for the old beginning of the prompt.")
4949

5050
(defun haskell-interactive-prompt-regex ()
51-
"Generate a regex for searching for any occurrence of the prompt\
52-
at the beginning of the line. This should prevent any
53-
interference with prompts that look like haskell expressions."
51+
"Generate a regex for searching whether prompt or not.
52+
The regex is for searching for any occurrence of the prompt at the beginning of
53+
the line. This should prevent any interference with prompts that look like
54+
haskell expressions."
5455
(concat "^" (regexp-quote haskell-interactive-prompt)))
5556

5657
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

haskell-lexeme.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,10 @@ Possible results are:
452452
- 'string: for strings literals
453453
- 'char: for char literals
454454
- 'number: for decimal, float, hexadecimal and octal number literals
455-
- 'template-haskell-quote: for a string of apostrophes for template haskell
456-
- 'template-haskell-quasi-quote: for a string of apostrophes for template haskell
455+
- 'template-haskell-quote: for a string of apostrophes for template
456+
haskell
457+
- 'template-haskell-quasi-quote: for a string of apostrophes for template
458+
haskell
457459
458460
Note that for qualified symbols (match-string 1) returns the
459461
unqualified identifier or symbol. Further qualification for

haskell-mode.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,8 @@ successful, nil otherwise."
11421142
"2015-11-11")
11431143

11441144
(defun haskell-mode-toggle-scc-at-point ()
1145-
"If point is in an SCC annotation, kill the annotation. Otherwise, try to insert a new annotation."
1145+
"If point is in an SCC annotation, kill the annotation.
1146+
Otherwise, try to insert a new annotation."
11461147
(interactive)
11471148
(if (not (haskell-mode-try-kill-scc-at-point))
11481149
(if (not (haskell-mode-try-insert-scc-at-point))
@@ -1181,7 +1182,9 @@ Uses `haskell-guess-module-name-from-file-name'."
11811182

11821183
(defvar haskell-auto-insert-module-format-string
11831184
"-- | \n\nmodule %s where\n\n"
1184-
"Template string that will be inserted in new haskell buffers via `haskell-auto-insert-module-template'.")
1185+
"Template string for the `haskell-auto-insert-module-template' command.
1186+
It will be inserted in new haskell buffers via
1187+
`haskell-auto-insert-module-template'.")
11851188

11861189
(defun haskell-auto-insert-module-template ()
11871190
"Insert a module template for the newly created buffer."

haskell-move-nested.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434

3535
;;;###autoload
3636
(defun haskell-move-nested (cols)
37-
"Shift the nested off-side-rule block adjacent to point by COLS columns to the right.
37+
"Shift the nested off-side-rule block adjacent to point.
38+
It shift the nested off-side-rule block adjacent to point by COLS
39+
columns to the right.
3840
3941
In Transient Mark mode, if the mark is active, operate on the contents
4042
of the region instead.

haskell-process.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
205205
t))
206206

207207
(defun haskell-process-send-string (process string)
208-
"Try to send a string to the process's process. Ask to restart if it's not running."
208+
"Try to send a string to the process's process.
209+
Ask to restart if it's not running."
209210
(let ((child (haskell-process-process process)))
210211
(if (equal 'run (process-status child))
211212
(let ((out (concat string "\n")))

haskell.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,9 @@ Give optional NEXT-P parameter to override value of
446446
(list "build --ghc-options=-fforce-recomp"))))))
447447

448448
(defun haskell-process-file-loadish (command reload-p module-buffer)
449-
"Run a loading-ish COMMAND that wants to pick up type errors\
450-
and things like that. RELOAD-P indicates whether the notification
449+
"Run a loading-ish COMMAND.
450+
For example, a COMMAND that wants to pick up type errors and things like that.
451+
RELOAD-P indicates whether the notification
451452
should say 'reloaded' or 'loaded'. MODULE-BUFFER may be used
452453
for various things, but is optional."
453454
(let ((session (haskell-session)))

0 commit comments

Comments
 (0)