matlab-compat.el:
(matlab-string-trim): Check for subr-x existing. If it exists, require and set this as alias. If it doesn't exist, define our own impl.
This commit is contained in:
parent
f953647884
commit
4de27bf944
|
@ -128,9 +128,11 @@
|
|||
(nconc keymap comint-mode-map)))
|
||||
|
||||
;; String trim
|
||||
(if (fboundp 'string-trim)
|
||||
|
||||
(defalias 'matlab-string-trim 'string-trim)
|
||||
(if (locate-library "subr-x")
|
||||
(progn
|
||||
(require 'subr-x)
|
||||
(defalias 'matlab-string-trim 'string-trim)
|
||||
)
|
||||
|
||||
(defsubst matlab-string-trim (string &optional regexp)
|
||||
"Trim STRING of leading string matching REGEXP.
|
||||
|
|
Loading…
Reference in New Issue