Closed mattiase closed 3 years ago
- ;; Move before the comment, if we are in one.
- (let ((ppss (syntax-ppss)))
- (if (nth 4 ppss) (goto-char (- (nth 8 ppss) 1))))
Use
(1- (nth 8 ppss))
(I know it wasn't done in the code you replace, here we get the chance! 😀)
Actually, I was wondering: why decrement by 1? I think we should either not decrement by 1 or add a comment explaining why we decrement.
- ((region-active-p)
- (setq start (min (point) (mark)))
- (setq end (max (point) (mark)))
- ;; Extend the region at the endpoints if they are in a phrase.
- (dolist (pos (list start end))
You could just do
(dolist (pos (list (point) (mark)))
right? — they do not need to be ordered. One can initializestart
andend
with(point)
.
There's also region-beginning
and region-end
if you want them in-order.
Patch rebased to master and fixed according to review comments (many thanks) and some bug fixes.
Thanks for your work!
Always a pleasure to have an experienced reviewer!
Update it to match error messages from recent OCaml versions, and fix related problems.
See #248, #273 and #231.