在打发时间阅读 ZWEI (zwei-lambda) 的代码的时候发现了下面的代码:
(DEFUN FORWARD-LINE (BP &OPTIONAL (TIMES 1) FIXUP-P)
"Return a bp which is TIMES lines forward from BP.
Zero means the front of the same line.
Otherwise the result is at the beginning of a line.
TIMES may be negative meaning go up.
FIXUP-P non-NIL means if go past beginning or end return a bp
to there; otherwise return NIL in that case."
(COND ((ZEROP TIMES) (COPY-BP BP))
((PLUSP TIMES)
(DO ((LAST-LINE (BP-LINE (INTERVAL-LAST-BP *INTERVAL*)))
(LINE (BP-LINE BP) (LINE-NEXT LINE))
(I 0 (1+ I)))
(( I TIMES)
(CREATE-BP LINE 0))
(COND ((EQ LINE LAST-LINE)
(RETURN (IF FIXUP-P
(CREATE-BP LINE 0)
NIL))))))
(T
(DO ((FIRST-LINE (BP-LINE (INTERVAL-FIRST-BP *INTERVAL*)))
(LINE (BP-LINE BP) (LINE-PREVIOUS LINE))
(I 0 (1- I)))
(( I TIMES)
(UNLESS LINE (FERROR NIL "Report this ZWEI bug thoroughly! Get RMS if he's here."))
(CREATE-BP LINE (IF (EQ LINE FIRST-LINE)
(BP-INDEX (INTERVAL-FIRST-BP *INTERVAL*))
0)))
(COND ((EQ LINE FIRST-LINE)
(RETURN (IF FIXUP-P
(CREATE-BP LINE (BP-INDEX (INTERVAL-FIRST-BP *INTERVAL*)))
NIL))))))))
在 forward-line 反向的时候报错会提示 Report this ZWEI bug thoroughly! Get RMS if he's here..
古早的代码 Issue 管理真是简单又粗暴啊…
注: 在 TI Explorer 的代码中 (archive.org_ti-explorer.zip), 这句话被删掉了 www