Skip to content

Commit 2c20426

Browse files
committed
Un-globalize purescript-string-take
It's a small utility function used in one place, and is unlikely used by anyone else. There's no need to keep it autoloaded and in a separate file.
1 parent 0b351a3 commit 2c20426

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

purescript-mode.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ Brings up the documentation for purescript-mode-hook."
432432
(goto-char (+ (line-beginning-position)
433433
col))))
434434

435+
(defun purescript-string-take (string n)
436+
"Take n chars from string."
437+
(substring string
438+
0
439+
(min (length string) n)))
440+
435441
(defun purescript-mode-message-line (str)
436442
"Message only one line, multiple lines just disturbs the programmer."
437443
(let ((lines (split-string str "\n" t)))

purescript-string.el

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
;;; purescript-string.el --- string manipulation utilties -*- lexical-binding: t -*-
2-
;;;###autoload
3-
(defun purescript-string-take (string n)
4-
"Take n chars from string."
5-
(substring string
6-
0
7-
(min (length string) n)))
8-
92
;;;###autoload
103
(defun purescript-is-prefix-of (x y)
114
"Is x string a prefix of y string?"

0 commit comments

Comments
 (0)