mirror of
https://github.com/correl/melpa.git
synced 2024-11-28 11:09:55 +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 "/"))
|
(mapcar (lambda (path) (split-string path "/"))
|
||||||
files)) "/"))
|
files)) "/"))
|
||||||
|
|
||||||
(defun pb/remove-prefix (pfx str)
|
(defun pb/remove-prefix (prefix string)
|
||||||
"Strip PFX from STR."
|
"Strip PREFIX (a regexp) from STRING."
|
||||||
(if (string-match (concat "^" pfx) str)
|
(if (string-match (concat "^" prefix) string)
|
||||||
(setq str (replace-match "" nil nil str))
|
(replace-match "" nil nil string)
|
||||||
str))
|
string))
|
||||||
|
|
||||||
;;; Public interface
|
;;; Public interface
|
||||||
(defun package-build-archive (name)
|
(defun package-build-archive (name)
|
||||||
|
|
Loading…
Reference in a new issue