mirror of
https://github.com/correl/melpa.git
synced 2024-12-29 03:00:16 +00:00
Eliminate side effects in pb/remove-prefix, and note that the prefix is a regexp
This commit is contained in:
parent
fa271f3c9a
commit
afb0db688d
1 changed files with 5 additions and 5 deletions
|
@ -497,11 +497,11 @@ of the same-named package which is to be kept."
|
|||
(mapcar (lambda (path) (split-string path "/"))
|
||||
files)) "/"))
|
||||
|
||||
(defun pb/remove-prefix (pfx str)
|
||||
"Strip PFX from STR."
|
||||
(if (string-match (concat "^" pfx) str)
|
||||
(setq str (replace-match "" nil nil str))
|
||||
str))
|
||||
(defun pb/remove-prefix (prefix string)
|
||||
"Strip PREFIX (a regexp) from STRING."
|
||||
(if (string-match (concat "^" prefix) string)
|
||||
(replace-match "" nil nil string)
|
||||
string))
|
||||
|
||||
;;; Public interface
|
||||
(defun package-build-archive (name)
|
||||
|
|
Loading…
Reference in a new issue