2008-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
+ * textmodes/rst.el: Run rst-define-level-faces when loading.
+ (rst-mode): Don't set the font-lock-multiline var.
+ (rst-font-lock-find-unindented-line, rst-font-lock-handle-adornment):
+ Set the font-lock-multiline property by hand.
+
* loadup.el: Don't add emacs-<VERS> name when bootstrapping.
* Makefile.in (emacs-deps): Remove.
(set (make-local-variable 'font-lock-defaults)
'(rst-font-lock-keywords-function
t nil nil nil
- (font-lock-multiline . t)
(font-lock-mark-block-function . mark-paragraph)))
;; `jit-lock-mode' has been the default since Emacs-21.1, so there's no
;; point messing around with font-lock-support-mode any more.
(set sym sym)
(setq i (1+ i))))))
+(rst-define-level-faces)
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Always succeeds because the limit set by PRE-MATCH-FORM is the
;; ultimate point to find
(goto-char (or (rst-forward-indented-block nil limit) limit))
+ (save-excursion
+ ;; Include subsequent empty lines in the font-lock block,
+ ;; in case the user subsequently changes the indentation of the next
+ ;; non-empty line to move it into the indented element.
+ (skip-chars-forward " \t\n")
+ (put-text-property beg-pnt (point) 'font-lock-multiline t))
(set-match-data (list beg-pnt (point)))
t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Adornments
-;; Stores the point where the current adornment ends. Also used as a trigger
-;; for `rst-font-lock-handle-adornment'.
-(defvar rst-font-lock-adornment-point nil)
+(defvar rst-font-lock-adornment-point nil
+ "Stores the point where the current adornment ends. Also used as a trigger
+for `rst-font-lock-handle-adornment'.")
;; Here `rst-font-lock-handle-adornment' stores the section level of the
;; current adornment or t for a transition.
(mtc (cdr ado)))
(setq rst-font-lock-level (rst-adornment-level key t))
(goto-char (nth 1 mtc))
+ (put-text-property (nth 0 mtc) (nth 1 mtc) 'font-lock-multiline t)
(set-match-data mtc)
t))))