# HG changeset patch # User Oleksandr Gavenko # Date 1324499721 -7200 # Node ID 626114dd8100c536905823829d7736d460e091a5 # Parent 571e98c6d3c2c4964fd5316a457cd076736c879f Fix highlighting near beginning and end of buffer. diff -r 571e98c6d3c2 -r 626114dd8100 dict-mode.el --- a/dict-mode.el Wed Dec 21 21:49:03 2011 +0200 +++ b/dict-mode.el Wed Dec 21 22:35:21 2011 +0200 @@ -29,14 +29,11 @@ (defun dict-c5-font-lock-extend-region () "Look for '_____' expression and extend `font-lock-beg' and `font-lock-end'." - ;; (message "%d, %d:%d" (point) font-lock-beg font-lock-end) - ;; (message "lines: %d" (count-lines font-lock-beg font-lock-end)) + ;; (message "%d:%d, %d lines" font-lock-beg font-lock-end (count-lines font-lock-beg font-lock-end)) (cond ((and (< (count-lines font-lock-beg font-lock-end) 5) - (< font-lock-end (point-max)) - (< (point-min) font-lock-beg)) - (message "XXX") + (not (and (<= (point-max) font-lock-end) (<= font-lock-beg (point-min)) ))) (save-excursion (goto-char font-lock-beg) (forward-line -2)