mirror of
https://github.com/correl/melpa.git
synced 2024-12-29 03:00:16 +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)) "/"))
|
||||
|
||||
(defun pb/remove-prefix (prefix string)
|
||||
"Strip PREFIX (a regexp) from STRING."
|
||||
(if (string-match (concat "^" prefix) string)
|
||||
(replace-match "" nil nil string)
|
||||
"Strip PREFIX from STRING."
|
||||
(if (string-prefix-p prefix string)
|
||||
(substring string (length prefix))
|
||||
string))
|
||||
|
||||
;;; Public interface
|
||||
|
|
Loading…
Reference in a new issue