Skip to content

Commit 4d77a88

Browse files
committed
Switch from the obsolete "prompt2" GHCi option to prompt-cont
Closes #1555, #1689, see #1553.
1 parent 14c6eec commit 4d77a88

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

haskell-commands.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ You can create new session using function `haskell-session-make'."
119119
'(":set +c"))) ; :type-at in GHC 8+
120120
"\n"))
121121
(haskell-process-send-string process ":set prompt \"\\4\"")
122-
(haskell-process-send-string process (format ":set prompt2 \"%s\""
123-
haskell-interactive-prompt2)))
122+
(haskell-process-send-string process (format ":set prompt-cont \"%s\""
123+
haskell-interactive-prompt-cont)))
124124

125125
:live (lambda (process buffer)
126126
(when (haskell-process-consume

haskell-customize.el

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,17 @@ ambiguous class constraint."
332332
:type 'string
333333
:group 'haskell-interactive)
334334

335-
(defcustom haskell-interactive-prompt2 (replace-regexp-in-string
336-
"> $"
337-
"| "
338-
haskell-interactive-prompt)
335+
(defcustom haskell-interactive-prompt-cont (replace-regexp-in-string
336+
"> $"
337+
"| "
338+
haskell-interactive-prompt)
339339
"The multi-line prompt to use.
340340
The default is `haskell-interactive-prompt' with the last > replaced with |."
341341
:type 'string
342342
:group 'haskell-interactive)
343343

344+
(define-obsolete-variable-alias 'haskell-interactive-prompt2 'haskell-interactive-prompt-cont)
345+
344346
(defcustom haskell-interactive-mode-eval-mode
345347
nil
346348
"Use the given mode's font-locking to render some text."

haskell-interactive-mode.el

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,14 @@ be nil.")
130130
:group 'haskell-interactive)
131131

132132
;;;###autoload
133-
(defface haskell-interactive-face-prompt2
133+
(defface haskell-interactive-face-prompt-cont
134134
'((t :inherit font-lock-keyword-face))
135-
"Face for the prompt2 in multi-line mode."
135+
"Face for GHCi's prompt-cont in multi-line mode."
136136
:group 'haskell-interactive)
137137

138+
;;;###autoload
139+
(define-obsolete-face-alias 'haskell-interactive-face-prompt2 'haskell-interactive-face-prompt-cont)
140+
138141
;;;###autoload
139142
(defface haskell-interactive-face-compile-error
140143
'((t :inherit compilation-error))
@@ -266,7 +269,7 @@ do the
266269
":{\n"
267270
(mapconcat #'identity lines "\n")
268271
"\n:}\n"
269-
(format ":set prompt2 \"%s\"" haskell-interactive-prompt2)))))
272+
(format ":set prompt-cont \"%s\"" haskell-interactive-prompt-cont)))))
270273

271274
(defun haskell-interactive-mode-line-is-query (line)
272275
"Is LINE actually a :t/:k/:i?"
@@ -330,10 +333,10 @@ SESSION, otherwise operate on the current buffer."
330333
'result t)))
331334
(save-excursion
332335
(goto-char (point-max))
333-
(when (string= text haskell-interactive-prompt2)
336+
(when (string= text haskell-interactive-prompt-cont)
334337
(setq prop-text
335338
(propertize prop-text
336-
'font-lock-face 'haskell-interactive-face-prompt2
339+
'font-lock-face 'haskell-interactive-face-prompt-cont
337340
'read-only haskell-interactive-prompt-read-only)))
338341
(insert (ansi-color-apply prop-text))
339342
(haskell-interactive-mode-handle-h)

0 commit comments

Comments
 (0)