Hello,
I have come across a situation where SKIP-LEADING-WHITESPACE
(HTML-TEMPLATE's internal function) throws an error while trying to
create a template printer. I have narrowed it down to the following -
CL-USER> (let ((html-template:*ignore-empty-lines* t))
(html-template::skip-leading-whitespace
(make-array 4 :element-type 'character :fill-pointer 0)))
This throws an error. Here's the debugger output -
Index(s) to array function is/are out of the range of the array.
[Condition of type TYPE-ERROR]
Restarts:
0: [ABORT-REQUEST] Abort handling SLIME request.
1: [ABORT] Abort entirely from this (lisp) process.
Backtrace:
0: (SWANK::DEBUG-IN-EMACS #<TYPE-ERROR @ #x1143b6d2>)
1: (SWANK:SWANK-DEBUGGER-HOOK #<TYPE-ERROR @ #x1143b6d2> #<Function
SWANK-DEBUGGER-HOOK>)
2: (ERROR TYPE-ERROR :DATUM NIL :EXPECTED-TYPE FIXNUM :FORMAT-CONTROL
"Index(s) to array function is/are out of the range of the array."
:FORMAT-ARGUMENTS (NIL))
3: (HTML-TEMPLATE::SKIP-LEADING-WHITESPACE "")
4: (LET ((HTML-TEMPLATE:*IGNORE-EMPTY-LINES* T))
(HTML-TEMPLATE::SKIP-LEADING-WHITESPACE (MAKE-ARRAY 4 :ELEMENT-TYPE
(QUOTE CHARACTER) :FILL-POINTER 0)))
5: (EVAL (LET ((HTML-TEMPLATE:*IGNORE-EMPTY-LINES* T))
(HTML-TEMPLATE::SKIP-LEADING-WHITESPACE (MAKE-ARRAY 4 :ELEMENT-TYPE #
:FILL-POINTER 0))))
6: (SWANK::EVAL-REGION "(let ((html-template:*ignore-empty-lines* t))
(html-template::skip-leading-whitespace
(make-array 4 :element-type 'character :fill-pointer 0)))
" T)
...
[snipped remaining frames]
Is the above behaviour for SKIP-LEADING-WHITESPACE correct?
Thanks,
Chaitanya