Merge pull request #4335 from nbfalcon/bugfix/elisp-eldoc-invalid-format-operation

Elisp `eldoc': fix "Invalid format operation %-"
This commit is contained in:
Henrik Lissner 2020-11-29 13:58:50 -05:00 committed by GitHub
commit 3d53497cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,7 +105,7 @@ employed so that flycheck still does *some* helpful linting.")
(str (symbol-value sym))
(str (prin1-to-string str))
(limit (- (frame-width) (length ret) (length truncated) 1)))
(format (format "%%0.%ds%%s" limit)
(format (format "%%0.%ds%%s" (max limit 0))
(propertize str 'face 'warning)
(if (< (length str) limit) "" truncated))))))