File tree Expand file tree Collapse file tree 4 files changed +12
-30
lines changed Expand file tree Collapse file tree 4 files changed +12
-30
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ ELFILES = \
20
20
purescript-simple-indent.el \
21
21
purescript-sort-imports.el \
22
22
purescript-str.el \
23
- purescript-string.el \
24
23
purescript-unicode-input-method.el \
25
24
purescript-utils.el \
26
25
purescript-decl-scan.el \
Original file line number Diff line number Diff line change 89
89
; ;; Code:
90
90
91
91
(require 'purescript-vars )
92
- (require 'purescript-string )
93
92
(require 'cl-lib )
93
+ (eval-when-compile
94
+ (when (< emacs-major-version 28 )
95
+ (require 'subr-x )))
94
96
95
97
(defgroup purescript-indent nil
96
98
" PureScript indentation."
@@ -655,8 +657,8 @@ symbols in the sexp."
655
657
(string-match " where[ \t ]*" purescript-indent-current-line-first-ident))
656
658
(diff-first ; not a function def with the same name
657
659
(or (null valname-string)
658
- (not (string= (purescript -trim valname-string)
659
- (purescript -trim purescript-indent-current-line-first-ident)))))
660
+ (not (string= (string -trim valname-string)
661
+ (string -trim purescript-indent-current-line-first-ident)))))
660
662
661
663
; ; (is-type-def
662
664
; ; (and rpurs-sign (eq (char-after rpurs-sign) ?\:)))
Original file line number Diff line number Diff line change 37
37
(require 'purescript-vars )
38
38
(require 'purescript-align-imports )
39
39
(require 'purescript-sort-imports )
40
- (require 'purescript-string )
41
40
(require 'purescript-font-lock )
42
41
(require 'cl-lib )
43
42
(cl-eval-when 'compile (require 'find-file ))
@@ -419,14 +418,20 @@ Brings up the documentation for purescript-mode-hook."
419
418
(goto-char (+ (line-beginning-position )
420
419
col))))
421
420
421
+ (defun purescript-string-take (string n )
422
+ " Take n chars from string."
423
+ (substring string
424
+ 0
425
+ (min (length string) n)))
426
+
422
427
(defun purescript-mode-message-line (str )
423
428
" Message only one line, multiple lines just disturbs the programmer."
424
429
(let ((lines (split-string str " \n " t )))
425
430
(when (and (car lines) (stringp (car lines)))
426
431
(message " %s "
427
432
(concat (car lines)
428
433
(if (and (cdr lines) (stringp (cadr lines)))
429
- (format " [ %s .. ] " (purescript-string-take (purescript -trim (cadr lines)) 10 ))
434
+ (format " [ %s .. ] " (purescript-string-take (string -trim (cadr lines)) 10 ))
430
435
" " ))))))
431
436
432
437
(defun purescript-current-line-string ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments