mm-view.el (mm-display-inline-fontify): Use font-lock-ensure.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 29 May 2014 05:54:00 +0000 (05:54 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 29 May 2014 05:54:00 +0000 (05:54 +0000)
gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush.

lisp/ChangeLog
lisp/gnus-cite.el
lisp/lpath.el
lisp/mm-view.el

index bc14853..08ae8b1 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mm-view.el (mm-display-inline-fontify): Use font-lock-ensure.
+       * gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush.
+
 2014-05-15  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Don't
index db6a0f6..5a6d6f8 100644 (file)
@@ -1204,7 +1204,8 @@ When enabled, it automatically turns on `font-lock-mode'."
   nil ;; init-value
   "" ;; lighter
   nil ;; keymap
-  (when (eq major-mode 'message-mode)
+  (when (eq major-mode 'message-mode)   ;FIXME: Use derived-mode-p.
+    ;; FIXME: Use font-lock-add-keywords!
     (let ((defaults (car (if (featurep 'xemacs)
                             (get 'message-mode 'font-lock-defaults)
                           font-lock-defaults)))
@@ -1233,8 +1234,10 @@ When enabled, it automatically turns on `font-lock-mode'."
                font-lock-keywords nil))
       (setq font-lock-set-defaults nil))
     (font-lock-set-defaults)
-    (cond ((symbol-value 'font-lock-mode)
-          (font-lock-fontify-buffer))
+    (cond (font-lock-mode
+           (if (fboundp 'font-lock-flush)
+               (font-lock-flush)
+             (font-lock-fontify-buffer)))
          (gnus-message-citation-mode
           (font-lock-mode 1)))))
 
index 3988046..2433b4f 100644 (file)
      display-time-event-handler epg-check-configuration event-click-count
      event-end event-start find-coding-systems-for-charsets
      find-coding-systems-region find-coding-systems-string find-image
-     float-time gnutls-negotiate help-buffer ido-completing-read image-size
-     image-type-available-p insert-image jka-compr-get-compression-info
-     jka-compr-info-uncompress-args jka-compr-info-uncompress-message
-     jka-compr-info-uncompress-program jka-compr-installed-p
-     jka-compr-make-temp-name libxml-parse-html-region mail-abbrevs-setup
-     make-mode-line-mouse-map make-network-process make-term
+     float-time gnutls-negotiate font-lock-ensure font-lock-flush help-buffer
+     ido-completing-read image-size image-type-available-p insert-image
+     jka-compr-get-compression-info jka-compr-info-uncompress-args
+     jka-compr-info-uncompress-message jka-compr-info-uncompress-program
+     jka-compr-installed-p jka-compr-make-temp-name libxml-parse-html-region
+     mail-abbrevs-setup make-mode-line-mouse-map make-network-process make-term
      mouse-minibuffer-check mouse-movement-p mouse-scroll-subr overlay-lists
      pgg-display-output-buffer posn-point posn-window process-type put-image
      read-char-choice read-event recenter-top-bottom
index 2bee260..c565d0e 100644 (file)
@@ -520,9 +520,11 @@ If MODE is not set, try to find mode automatically."
              (set-auto-mode)))
          ;; The mode function might have already turned on font-lock.
          ;; Do not fontify if the guess mode is fundamental.
-         (unless (or (symbol-value 'font-lock-mode)
+         (unless (or font-lock-mode
                      (eq major-mode 'fundamental-mode))
-           (font-lock-fontify-buffer))))
+            (if (fboundp 'font-lock-ensure)
+                (font-lock-ensure)
+              (font-lock-fontify-buffer)))))
       ;; By default, XEmacs font-lock uses non-duplicable text
       ;; properties.  This code forces all the text properties
       ;; to be copied along with the text.