"Basil L. Contovounesios" writes: > @@ -250,7 +250,7 @@ string-remove-prefix > (defsubst string-remove-suffix (suffix string) > "Remove SUFFIX from STRING if present." > (if (string-suffix-p suffix string) > - (substring string 0 (- (length string) (length suffix))) > + (substring string 0 (- (length suffix))) > string)) Running the new subr-x-test-string-remove-suffix revealed that there is a bug here when the length of SUFFIX is equal to zero. I reattach the patches with this "simplification" reverted. Sorry about the hassle. Thanks, -- Basil