Fix shorter-than-length case for string-limit
* lisp/emacs-lisp/subr-x.el (string-limit): Fix shorter-than-length case.
This commit is contained in:
parent
cf2e832185
commit
fd9431dde4
2 changed files with 2 additions and 1 deletions
|
@ -292,7 +292,7 @@ is a positive number, return a a substring consisting of the
|
|||
first LENGTH characters of STRING. If LENGTH is negative, return
|
||||
a substring consisitng of thelast LENGTH characters of STRING."
|
||||
(cond
|
||||
((<= (length string) length) string)
|
||||
((<= (length string) (abs length)) string)
|
||||
((>= length 0) (substring string 0 length))
|
||||
(t (substring string (+ (length string) length)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue