+(eval-when-compile (require 'cl))
(let ((beg (nth 8 (syntax-ppss)))) ;; 8. character address of start of comment or string; nil if not in one.
- (narrow-to-region beg (point))))))
+ (narrow-to-region beg (point)))))))
(defun sage-send-doctest-line-and-forward (&optional noshow)
"If looking at a 'sage:' prompt, send this line and move to the next prompt
(unless (looking-at sage-test-prompt)
(error "Not at a sage: prompt"))
;; (sage-send-command (sage-test-doctest-at-point) t)
(unless noshow (display-buffer sage-buffer)))
+ ;; What must be a bug in Emacs 23.1.1 causes a problem unless we
+ ;; force redisplay. I'm not sure what other versions it affects,
+ ;; but it's fixed by 24.1.
+ (when (<= emacs-major-version 23)
(unless (re-search-forward sage-test-prompt (point-max) t)
(defun sage-retest (buffer)
- "Retest only failing files scraped from an existing *sage-test* buffer.
+ "Retest only failing files scraped from an existing *sage-test* buffer."
(interactive "bRetest failing files from buffer: ")
(let* ((files (sage-retest-failing-files-from-buffer buffer))
(files-str (mapconcat #'identity files " ")))