]> git.eshelyaron.com Git - emacs.git/commitdiff
Assume font-lock-mode variable is not void
authorStefan Kangas <stefan@marxist.se>
Fri, 5 Feb 2021 00:14:17 +0000 (01:14 +0100)
committerStefan Kangas <stefan@marxist.se>
Fri, 5 Feb 2021 00:15:02 +0000 (01:15 +0100)
* lisp/align.el (align-rules-list):
* lisp/cedet/semantic/idle.el
(semantic-idle-summary-useful-context-p):
* lisp/org/org-table.el (org-table-edit-field):
* lisp/org/org.el (org-restart-font-lock):
* lisp/progmodes/antlr-mode.el (antlr-language-option-extra):
* lisp/progmodes/idlwave.el (idlwave-choose):
* lisp/progmodes/sql.el (sql-product-font-lock):
* lisp/progmodes/verilog-mode.el
(verilog-save-font-no-change-functions, verilog-preprocess):
* lisp/vc/cvs-status.el:
* lisp/vc/smerge-mode.el (smerge-mode):
* lisp/woman.el (woman-decode-buffer): Assume font-lock-mode variable
is not void; it is preloaded.

lisp/align.el
lisp/cedet/semantic/idle.el
lisp/org/org-table.el
lisp/org/org.el
lisp/progmodes/antlr-mode.el
lisp/progmodes/idlwave.el
lisp/progmodes/sql.el
lisp/progmodes/verilog-mode.el
lisp/vc/cvs-status.el
lisp/vc/smerge-mode.el
lisp/woman.el

index 4d7839311578218e37e8ce697d98beac5b5c387a..1a1d3dd7ec139ea7fdb815a6b25c808cda75bfc8 100644 (file)
@@ -424,7 +424,7 @@ The possible settings for `align-region-separate' are:
                       (backward-word 1)
                       (looking-at
                        "\\(goto\\|return\\|new\\|delete\\|throw\\)"))
-                    (if (and (boundp 'font-lock-mode) font-lock-mode)
+                    (if font-lock-mode
                         (eq (get-text-property (point) 'face)
                             'font-lock-comment-face)
                       (eq (caar (c-guess-basic-syntax)) 'c)))))))
index 73954f0266b266736acaf142a5895cfba3aaea4f..9f1bcfa6916dfc44c88157e9347e1893d40d36bd 100644 (file)
@@ -716,8 +716,7 @@ specific to a major mode.  For example, in jde mode:
 
 (defun semantic-idle-summary-useful-context-p ()
   "Non-nil if we should show a summary based on context."
-  (if (and (boundp 'font-lock-mode)
-          font-lock-mode
+  (if (and font-lock-mode
           (memq (get-text-property (point) 'face)
                 semantic-idle-summary-out-of-context-faces))
       ;; The best I can think of at the moment is to disable
index ef4672e1b96686069553df573bdd4e68fe0ac392..1248efabc150ed7ec6bea03b057f6ed1731b908d 100644 (file)
@@ -2008,7 +2008,7 @@ toggle `org-table-follow-field-mode'."
     (let ((b (save-excursion (skip-chars-backward "^|") (point)))
          (e (save-excursion (skip-chars-forward "^|\r\n") (point))))
       (remove-text-properties b e '(invisible t intangible t))
-      (if (and (boundp 'font-lock-mode) font-lock-mode)
+      (if font-lock-mode
          (font-lock-fontify-block))))
    (t
     (let ((pos (point-marker))
index 2d21a44fb487315e623ab673b18e9b9bb3e235ea..e6a5cca93918643831840983c793a8ea9a59ea1c 100644 (file)
@@ -5520,7 +5520,7 @@ highlighting was done, nil otherwise."
 
 (defun org-restart-font-lock ()
   "Restart `font-lock-mode', to force refontification."
-  (when (and (boundp 'font-lock-mode) font-lock-mode)
+  (when font-lock-mode
     (font-lock-mode -1)
     (font-lock-mode 1)))
 
index 527cb03cfbe2deb9fe1610a5d8024849c11180c8..e5b9ac0a5373a40ee9b99173cf389346c1e01e30 100644 (file)
@@ -2047,7 +2047,7 @@ Called in PHASE `after-insertion', see `antlr-options-alists'."
     (let ((new-language (antlr-language-option t)))
       (or (null new-language)
          (eq new-language antlr-language)
-         (let ((font-lock (and (boundp 'font-lock-mode) font-lock-mode)))
+          (let ((font-lock font-lock-mode))
            (if font-lock (font-lock-mode 0))
            (antlr-mode)
            (and font-lock (null font-lock-mode) (font-lock-mode 1)))))))
index c11892492def4054cd52d10fd7c0a55d290c2cd0..e8e55ae96d1e73e840a71eb12ea26f09c21b2f4d 100644 (file)
@@ -6876,7 +6876,6 @@ sort the list before displaying."
   (let ((completion-ignore-case t))        ; install correct value
     (apply function args))
   (if (and (derived-mode-p 'idlwave-shell-mode)
-          (boundp 'font-lock-mode)
           (not font-lock-mode))
       ;; For the shell, remove the fontification of the word before point
       (let ((beg (save-excursion
index 4d027f3df5371fd6ef0f6a5001c6f803438c4d56..f1f4d61324b8f7f0959eda7fc12f174be91647c0 100644 (file)
@@ -2829,9 +2829,7 @@ configured."
 
     ;; Force font lock to reinitialize if it is already on
     ;; Otherwise, we can wait until it can be started.
-    (when (and (fboundp 'font-lock-mode)
-              (boundp 'font-lock-mode)
-              font-lock-mode)
+    (when font-lock-mode
       (font-lock-mode-internal nil)
       (font-lock-mode-internal t))
 
index e5c2c8075345f53221756c31bcd826c08b483877..f934ef7a80e9ba560207d198ea980656a80c4db5 100644 (file)
@@ -3442,7 +3442,7 @@ For insignificant changes, see instead `verilog-save-buffer-state'."
     (verilog-run-hooks 'verilog-before-save-font-hook)
     (let* ((verilog-save-font-mod-hooked (- (point-max) (point-min)))
            ;; Significant speed savings with no font-lock properties
-           (fontlocked (when (and (boundp 'font-lock-mode) font-lock-mode)
+           (fontlocked (when font-lock-mode
                          (font-lock-mode 0)
                          t)))
       (run-hook-with-args 'before-change-functions (point-min) (point-max))
@@ -5535,7 +5535,7 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'."
                                 default nil nil
                                 'verilog-preprocess-history default)))))
   (unless command (setq command (verilog-expand-command verilog-preprocessor)))
-  (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
+  (let* ((fontlocked font-lock-mode)
         (dir (file-name-directory (or filename buffer-file-name)))
         (cmd (concat "cd " dir "; " command)))
     (with-output-to-temp-buffer "*Verilog-Preprocessed*"
index ff3a2944a17b6f739084f23aa65a2da5b69fe8f3..26fb6206c80a3b295bd2f8394c8ee63265998df9 100644 (file)
@@ -356,9 +356,8 @@ the list is a three-string list TAG, KIND, REV."
 
 (defvar font-lock-mode)
 ;; (defun cvs-refontify (beg end)
-;;   (when (and (boundp 'font-lock-mode)
-;;          font-lock-mode
-;;          (fboundp 'font-lock-fontify-region))
+;;   (when (and font-lock-mode
+;;             (fboundp 'font-lock-fontify-region))
 ;;     (font-lock-fontify-region (1- beg) (1+ end))))
 
 (defun cvs-status-trees ()
index f50b2540c55bb2d8a8d5858055701cc3deca9972..c66a4fb2d6a539b2bec3bb342cb44f4d2a3de771 100644 (file)
@@ -1410,7 +1410,7 @@ with a \\[universal-argument] prefix, makes up a 3-way conflict."
 
 \\{smerge-mode-map}"
   :group 'smerge :lighter " SMerge"
-  (when (and (boundp 'font-lock-mode) font-lock-mode)
+  (when font-lock-mode
     (save-excursion
       (if smerge-mode
          (font-lock-add-keywords nil smerge-font-lock-keywords 'append)
index 1d3c8d169035db81d5daa6df6cabe4724295ab76..9a03d30bb7f9c6b3c3cfd879d3a960f1333c8c28 100644 (file)
@@ -2114,7 +2114,7 @@ No external programs are used."
   (interactive)                                ; mainly for testing
   (WoMan-log-begin)
   (run-hooks 'woman-pre-format-hook)
-  (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
+  (and font-lock-mode (font-lock-mode -1))
   ;; (fundamental-mode)
   (let ((start-time (current-time))
        time)