mirror of
https://github.com/correl/melpa.git
synced 2024-12-01 03:00:08 +00:00
Don't interpret PREFIX as a regexp in pb/remove-prefix
This commit is contained in:
parent
c5f641f8fb
commit
2bdf9d0a87
1 changed files with 3 additions and 3 deletions
|
@ -498,9 +498,9 @@ of the same-named package which is to be kept."
|
||||||
files)) "/"))
|
files)) "/"))
|
||||||
|
|
||||||
(defun pb/remove-prefix (prefix string)
|
(defun pb/remove-prefix (prefix string)
|
||||||
"Strip PREFIX (a regexp) from STRING."
|
"Strip PREFIX from STRING."
|
||||||
(if (string-match (concat "^" prefix) string)
|
(if (string-prefix-p prefix string)
|
||||||
(replace-match "" nil nil string)
|
(substring string (length prefix))
|
||||||
string))
|
string))
|
||||||
|
|
||||||
;;; Public interface
|
;;; Public interface
|
||||||
|
|
Loading…
Reference in a new issue