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 = \
2020 purescript-simple-indent.el \
2121 purescript-sort-imports.el \
2222 purescript-str.el \
23- purescript-string.el \
2423 purescript-unicode-input-method.el \
2524 purescript-utils.el \
2625 purescript-decl-scan.el \
Original file line number Diff line number Diff line change 8989; ;; Code:
9090
9191(require 'purescript-vars )
92- (require 'purescript-string )
9392(require 'cl-lib )
93+ (eval-when-compile
94+ (when (< emacs-major-version 28 )
95+ (require 'subr-x )))
9496
9597(defgroup purescript-indent nil
9698 " PureScript indentation."
@@ -655,8 +657,8 @@ symbols in the sexp."
655657 (string-match " where[ \t ]*" purescript-indent-current-line-first-ident))
656658 (diff-first ; not a function def with the same name
657659 (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)))))
660662
661663 ; ; (is-type-def
662664 ; ; (and rpurs-sign (eq (char-after rpurs-sign) ?\:)))
Original file line number Diff line number Diff line change 3737(require 'purescript-vars )
3838(require 'purescript-align-imports )
3939(require 'purescript-sort-imports )
40- (require 'purescript-string )
4140(require 'purescript-font-lock )
4241(require 'cl-lib )
4342(cl-eval-when 'compile (require 'find-file ))
@@ -419,14 +418,20 @@ Brings up the documentation for purescript-mode-hook."
419418 (goto-char (+ (line-beginning-position )
420419 col))))
421420
421+ (defun purescript-string-take (string n )
422+ " Take n chars from string."
423+ (substring string
424+ 0
425+ (min (length string) n)))
426+
422427(defun purescript-mode-message-line (str )
423428 " Message only one line, multiple lines just disturbs the programmer."
424429 (let ((lines (split-string str " \n " t )))
425430 (when (and (car lines) (stringp (car lines)))
426431 (message " %s "
427432 (concat (car lines)
428433 (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 ))
430435 " " ))))))
431436
432437(defun purescript-current-line-string ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments