* sweeprolog.el (sweeprolog-next-token-boundaries): Return correct end
of token position for parentheses.
* sweeprolog-tests.el (up-list): New test.
(forward-line)
(should (string= (add-log-current-defun) "f:o//1")))
+(sweeprolog-deftest up-list ()
+ "Test `up-list' support."
+ "
+foo((A,B)) =>
+ ( bar(-!-A)
+ ; baz(B)
+ ).
+"
+ (call-interactively #'up-list)
+ (should (= (point) 30))
+ (call-interactively #'up-list)
+ (should (= (point) 51)))
+
;;; sweeprolog-tests.el ends here
(forward-char -1))
(list 'operator beg (if (= beg (point)) end (point)))))
((= syn ?\()
- (list 'open beg (point)))
+ (list 'open beg (1+ beg)))
((= syn ?\))
- (list 'close beg (point)))
+ (list 'close beg (1+ beg)))
((= syn ?>) nil)
- (t (list 'else beg (point)))))))))
+ (t (list 'else beg (1+ beg)))))))))
(defun sweeprolog-last-token-boundaries (&optional pos)
(let ((point (or pos (point)))