]> git.eshelyaron.com Git - emacs.git/commitdiff
Assume that font-lock is preloaded
authorStefan Kangas <stefankangas@gmail.com>
Sat, 19 Aug 2023 09:48:58 +0000 (11:48 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 25 Aug 2023 18:35:38 +0000 (20:35 +0200)
* lisp/org/ox-beamer.el (org-mode): Assume that font-lock is
preloaded, which it has been since Emacs 22.1.
* lisp/textmodes/reftex.el (reftex-use-fonts): Make function obsolete
in favor of variable.  Update all callers.

lisp/cedet/semantic/fw.el
lisp/cedet/semantic/grammar.el
lisp/org/ox-beamer.el
lisp/textmodes/reftex-cite.el
lisp/textmodes/reftex-index.el
lisp/textmodes/reftex-sel.el
lisp/textmodes/reftex-toc.el
lisp/textmodes/reftex-vars.el
lisp/textmodes/reftex.el
lisp/vc/cvs-status.el

index 30704760c1db4f7ac36f37c872d4f15ca4e74108..184a74c8c2efe28333443223b6bbddde811fe257 100644 (file)
@@ -434,9 +434,8 @@ FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'."
 ;;       ))
 ;;   "Highlighted Semantic keywords.")
 
-;; (when (fboundp 'font-lock-add-keywords)
-;;   (font-lock-add-keywords 'emacs-lisp-mode
-;;                           semantic-fw-font-lock-keywords))
+;; (font-lock-add-keywords 'emacs-lisp-mode
+;;                         semantic-fw-font-lock-keywords)
 \f
 
 (provide 'semantic/fw)
index 2dccd87a710556c37e66aa47321a2334c3519ad4..60c57210b8f6e0cad4b95b7d5320566bc1b75ebd 100644 (file)
@@ -1156,18 +1156,13 @@ END is the limit of the search."
     ("^\\(\\(\\sw\\|\\s_\\)+\\)[ \n\r\t]*:"
      1 font-lock-function-name-face)
     (semantic--grammar-macros-matcher
-     1 ,(if (boundp 'font-lock-builtin-face)
-            'font-lock-builtin-face
-          'font-lock-preprocessor-face))
+     1 font-lock-builtin-face)
     ("\\$\\(\\sw\\|\\s_\\)*"
      0 font-lock-variable-name-face)
     ("<\\(\\(\\sw\\|\\s_\\)+\\)>"
      1 font-lock-type-face)
     (,semantic-grammar-lex-c-char-re
-     0 ,(if (boundp 'font-lock-constant-face)
-            'font-lock-constant-face
-          'font-lock-string-face)
-     t)
+     0 font-lock-constant-face t)
     ;; Must highlight :keyword here, because ':' is a punctuation in
     ;; grammar mode!
     ("[\r\n\t ]+:\\sw+\\>"
index 689bf1559b4c040a98be9ef878a806be99edcbc8..2590bd5fa722d5bc4103d49ae4bd1d8e15a3e0cd 100644 (file)
@@ -924,11 +924,10 @@ holding export options."
   "Support for editing Beamer oriented Org mode files."
   :lighter " Bm")
 
-(when (fboundp 'font-lock-add-keywords)
-  (font-lock-add-keywords
-   'org-mode
-   '((":\\(B_[a-z]+\\|BMCOL\\):" 1 'org-beamer-tag prepend))
-   'prepend))
+(font-lock-add-keywords
+ 'org-mode
+ '((":\\(B_[a-z]+\\|BMCOL\\):" 1 'org-beamer-tag prepend))
+ 'prepend)
 
 (defface org-beamer-tag '((t (:box (:line-width 1 :color grey40))))
   "The special face for beamer tags."
index 6beae8162579f26c7f7af8edc5fde95ae39f16b2..eaa03c96fe9e3fdbc2d713bc2cf9b1c2bc35b8d9 100644 (file)
@@ -566,7 +566,7 @@ If FORMAT is non-nil `format' entry accordingly."
           (reftex-get-bib-field "booktitle" entry "in: %s"))
          (t ""))))
     (setq authors (reftex-truncate authors 30 t t))
-    (when (reftex-use-fonts)
+    (when reftex-use-fonts
       (put-text-property 0 (length key)     'face reftex-label-face
                          key)
       (put-text-property 0 (length authors) 'face reftex-bib-author-face
@@ -609,7 +609,7 @@ If FORMAT is non-nil `format' entry accordingly."
     (push text lines)
     (setq text (mapconcat #'identity (nreverse lines) "\n     "))
 
-    (when (reftex-use-fonts)
+    (when reftex-use-fonts
       (put-text-property 0 (length text) 'face reftex-bib-author-face text))
     (concat key "\n     " text "\n\n")))
 
index c8a45f068d1374d63800a2b5b8083e788a9ef03e..7cb15c7e99a5cce017b2f890a4e27ca175f62742 100644 (file)
@@ -536,7 +536,7 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help
                    (nth 2 (car reftex-index-restriction-data))
                  reftex-index-restriction-indicator)))
 
-      (if (reftex-use-fonts)
+      (if reftex-use-fonts
           (put-text-property (point-min) (point)
                              'face reftex-index-header-face))
       (cursor-intangible-mode 1)
@@ -567,7 +567,7 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help
          (context-indent (concat indent "  "))
          (section-chars (mapcar #'identity reftex-index-section-letters))
          (this-section-char 0)
-         (font (reftex-use-fonts))
+         (font reftex-use-fonts)
          (bor (car reftex-index-restriction-data))
          (eor (nth 1 reftex-index-restriction-data))
          (mouse-face
index 3c9f9ca94c840e0b1b0445459952c50f138af408..61baf9408c21e26e74be05872a820343a74c43b9 100644 (file)
@@ -204,7 +204,7 @@ During a selection process, these are the local bindings.
   ;;           a used member near to this one, as a possible starting point.
   ;; XR-PREFIX is the prefix to put in front of labels.
   ;; TOC-BUFFER means this is to fill the toc buffer.
-  (let* ((font (reftex-use-fonts))
+  (let* ((font reftex-use-fonts)
          (cnt 0)
          (index -1)
          (toc-indent " ")
index de49b7c6c708781a7b7f0a90bb17646a826f9978..312ccb0f2be45c37c5971bac71ded3ab917fdc5e 100644 (file)
@@ -263,7 +263,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 ------------------------------------------------------------------------------
 " (abbreviate-file-name reftex-last-toc-master)))
 
-      (if (reftex-use-fonts)
+      (if reftex-use-fonts
           (put-text-property (point-min) (point) 'font-lock-face reftex-toc-header-face))
       (cursor-intangible-mode 1)
       (add-text-properties (point-min) (point)
index 60ee40180d12c592530f828ecbd2723fd59d385f..ebe49ae9fef29270fa23bd55e48e8a876524e991 100644 (file)
@@ -1933,7 +1933,6 @@ The value of this variable will only have any effect when
 
 (defcustom reftex-use-fonts t
   "Non-nil means, use fonts in *toc* and selection buffers.
-Font-lock must be loaded as well to actually get fontified display.
 When changing this option, a rescan may be necessary to activate the change."
   :group 'reftex-fontification-configurations
   :type 'boolean)
index 50bec6ef1720aa10bab789d4c4e68d24db697272..22efb52774005e74c9150942c0885896562b98b6 100644 (file)
@@ -2027,15 +2027,9 @@ IGNORE-WORDS List of words which should be removed from the string."
 ;;;
 ;;; Fontification and Highlighting
 
-(defun reftex-use-fonts ()
-  ;; Return t if we can and want to use fonts.
-  (and ; window-system
-       reftex-use-fonts
-       (featurep 'font-lock)))
-
 (defun reftex-refontify ()
   ;; Return t if we need to refontify context
-  (and (reftex-use-fonts)
+  (and reftex-use-fonts
        (or (eq t reftex-refontify-context)
            (and (eq 1 reftex-refontify-context)
                 ;; Test of we use the font-lock version of x-symbol
@@ -2342,6 +2336,10 @@ Your bug report will be posted to the AUCTeX bug reporting list.
 
 (define-obsolete-function-alias 'reftex-window-height #'window-height "30.1")
 
+(defun reftex-use-fonts ()
+  (declare (obsolete "use variable `reftex-use-fonts' instead." "30.1"))
+  reftex-use-fonts)
+
 (provide 'reftex)
 
 ;;; reftex.el ends here
index 7982cd89efc06addb6cd7225045a79733914202f..30296573796fa6e07e4da40624c1f2131835069f 100644 (file)
@@ -354,8 +354,7 @@ the list is a three-string list TAG, KIND, REV."
 
 (defvar font-lock-mode)
 ;; (defun cvs-refontify (beg end)
-;;   (when (and font-lock-mode
-;;             (fboundp 'font-lock-fontify-region))
+;;   (when font-lock-mode
 ;;     (font-lock-fontify-region (1- beg) (1+ end))))
 
 (defun cvs-status-trees ()