aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-06-21 04:10:26 +0000
committerStefan Monnier2008-06-21 04:10:26 +0000
commit0e90a43c1860e00dea1fee0973017abc401f18d9 (patch)
treeefd7405dc2a362a53d47b1795372c0dd52380c3a
parentfb38e9c96ec49dfd7855d274a5f4e91f412c8568 (diff)
downloademacs-0e90a43c1860e00dea1fee0973017abc401f18d9.tar.gz
emacs-0e90a43c1860e00dea1fee0973017abc401f18d9.zip
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/rst.el15
2 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 817dc58ecdd..5011a6e93d7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12008-06-21 Stefan Monnier <monnier@iro.umontreal.ca> 12008-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * textmodes/rst.el: Run rst-define-level-faces when loading.
4 (rst-mode): Don't set the font-lock-multiline var.
5 (rst-font-lock-find-unindented-line, rst-font-lock-handle-adornment):
6 Set the font-lock-multiline property by hand.
7
3 * loadup.el: Don't add emacs-<VERS> name when bootstrapping. 8 * loadup.el: Don't add emacs-<VERS> name when bootstrapping.
4 9
5 * Makefile.in (emacs-deps): Remove. 10 * Makefile.in (emacs-deps): Remove.
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 0d6771ec793..fdd3585b599 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -406,7 +406,6 @@ blocks."
406 (set (make-local-variable 'font-lock-defaults) 406 (set (make-local-variable 'font-lock-defaults)
407 '(rst-font-lock-keywords-function 407 '(rst-font-lock-keywords-function
408 t nil nil nil 408 t nil nil nil
409 (font-lock-multiline . t)
410 (font-lock-mark-block-function . mark-paragraph))) 409 (font-lock-mark-block-function . mark-paragraph)))
411 ;; `jit-lock-mode' has been the default since Emacs-21.1, so there's no 410 ;; `jit-lock-mode' has been the default since Emacs-21.1, so there's no
412 ;; point messing around with font-lock-support-mode any more. 411 ;; point messing around with font-lock-support-mode any more.
@@ -2749,6 +2748,7 @@ details check the Rst Faces Defaults group."
2749 (set sym sym) 2748 (set sym sym)
2750 (setq i (1+ i)))))) 2749 (setq i (1+ i))))))
2751 2750
2751(rst-define-level-faces)
2752 2752
2753 2753
2754;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2754;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -3044,15 +3044,21 @@ point is not moved."
3044 ;; Always succeeds because the limit set by PRE-MATCH-FORM is the 3044 ;; Always succeeds because the limit set by PRE-MATCH-FORM is the
3045 ;; ultimate point to find 3045 ;; ultimate point to find
3046 (goto-char (or (rst-forward-indented-block nil limit) limit)) 3046 (goto-char (or (rst-forward-indented-block nil limit) limit))
3047 (save-excursion
3048 ;; Include subsequent empty lines in the font-lock block,
3049 ;; in case the user subsequently changes the indentation of the next
3050 ;; non-empty line to move it into the indented element.
3051 (skip-chars-forward " \t\n")
3052 (put-text-property beg-pnt (point) 'font-lock-multiline t))
3047 (set-match-data (list beg-pnt (point))) 3053 (set-match-data (list beg-pnt (point)))
3048 t))) 3054 t)))
3049 3055
3050;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3056;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3051;; Adornments 3057;; Adornments
3052 3058
3053;; Stores the point where the current adornment ends. Also used as a trigger 3059(defvar rst-font-lock-adornment-point nil
3054;; for `rst-font-lock-handle-adornment'. 3060 "Stores the point where the current adornment ends. Also used as a trigger
3055(defvar rst-font-lock-adornment-point nil) 3061for `rst-font-lock-handle-adornment'.")
3056 3062
3057;; Here `rst-font-lock-handle-adornment' stores the section level of the 3063;; Here `rst-font-lock-handle-adornment' stores the section level of the
3058;; current adornment or t for a transition. 3064;; current adornment or t for a transition.
@@ -3174,6 +3180,7 @@ entered.")
3174 (mtc (cdr ado))) 3180 (mtc (cdr ado)))
3175 (setq rst-font-lock-level (rst-adornment-level key t)) 3181 (setq rst-font-lock-level (rst-adornment-level key t))
3176 (goto-char (nth 1 mtc)) 3182 (goto-char (nth 1 mtc))
3183 (put-text-property (nth 0 mtc) (nth 1 mtc) 'font-lock-multiline t)
3177 (set-match-data mtc) 3184 (set-match-data mtc)
3178 t)))) 3185 t))))
3179 3186