------------------------------------------------------------ revno: 343 author: Stephen Berman <stephen.ber...@gmx.net> committer: Leo Liu <sdl....@gmail.com> branch nick: elpa timestamp: Fri 2013-02-01 00:09:34 +0800 message: Fix error during redisplay: (wrong-type-argument stringp nil) modified: packages/adaptive-wrap/adaptive-wrap.el
=== modified file 'packages/adaptive-wrap/adaptive-wrap.el' --- a/packages/adaptive-wrap/adaptive-wrap.el 2012-12-06 01:21:13 +0000 +++ b/packages/adaptive-wrap/adaptive-wrap.el 2013-01-31 16:09:34 +0000 @@ -58,7 +58,9 @@ (defun adaptive-wrap-fill-context-prefix (beg en) "Like `fill-context-prefix', but with length adjusted by `adaptive-wrap-extra-indent'." - (let* ((fcp (fill-context-prefix beg en)) + ;; Note: fill-context-prefix may return nil; See: + ;; http://article.gmane.org/gmane.emacs.devel/156285 + (let* ((fcp (or (fill-context-prefix beg en) "")) (fcp-len (string-width fcp)) (fill-char (if (< 0 fcp-len) (string-to-char (substring fcp -1))