Return non-nil if region was adjusted.
--- a/dict-mode.el Tue Dec 20 23:18:04 2011 +0200
+++ b/dict-mode.el Tue Dec 20 23:28:29 2011 +0200
@@ -29,20 +29,23 @@
(defun dict-c5-font-lock-extend-region ()
"Look for '_____' expression and extend `font-lock-beg' and `font-lock-end'."
- (let (beg end)
+ (let ((changed nil))
(save-excursion
;; (message "%d, %d:%d" point font-lock-beg font-lock-end)
(goto-char font-lock-beg)
(beginning-of-line)
(when (eq (char-after (point)) ?_)
(forward-line 3)
- (setq font-lock-end (point)))
+ (setq font-lock-end (point))
+ (setq changed t))
(goto-char font-lock-beg)
(forward-line -2)
(when (eq (char-after (point)) ?_)
- (setq font-lock-beg (point)))
- )))
-
+ (setq font-lock-beg (point))
+ (setq changed t))
+ )
+ changed
+ ))
;;;###autoload
(define-derived-mode dict-c5-mode fundamental-mode "Dict-c5"