(should (equal (get-text-property (+ (point-min) 3)
'font-lock-face)
'(sweeprolog-built-in-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 9)
'font-lock-face)
- '(sweeprolog-directive-default-face)))
+ '(sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 10)
'font-lock-face)
'(sweeprolog-identifier-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 13)
'font-lock-face)
- '(sweeprolog-directive-default-face)))
+ '(sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 16)
'font-lock-face)
'(sweeprolog-local-default-face
sweeprolog-predicate-indicator-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 23)
'font-lock-face)
'(sweeprolog-fullstop-default-face)))
(should (equal (get-text-property (+ (point-min) 39)
'font-lock-face)
'(sweeprolog-undefined-default-face
- sweeprolog-clause-default-face)))))
+ sweeprolog-body-default-face)))))
(ert-deftest complete-variable ()
((rx bow (group-n 1 "0'" anychar))
(1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
(string-to-syntax "w"))))
- ((rx bow (group-n 1 "!"))
+ ((rx bow (group-n 1 "!") eow)
(1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
(string-to-syntax "w")))))
start end)))
(while (and (not (eobp)) (nth 3 (syntax-ppss)))
(forward-char))
(list 'string beg (point)))
- ((= syn ?.)
+ ((or (= syn ?.)
+ (= syn ?\\))
(skip-syntax-forward ".")
(list 'operator beg (point)))
((= syn ?\()
(= (char-syntax (char-before)) ?_)))
(skip-syntax-backward "w_")
(list 'functor (point) end))
- ((= syn ?.)
+ ((or (= syn ?.)
+ (= syn ?\\)) ; specifically, the backslash character
(skip-syntax-backward ".")
(list 'operator (point) end))
((= syn ?\()