mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Assume font-lock is provided; it's preloaded since 22.1
* lisp/cedet/semantic/format.el (semantic--format-colorize-text): * lisp/eshell/em-ls.el (eshell-ls--insert-directory): * lisp/net/dig.el (dig-mode): * lisp/progmodes/cperl-mode.el (cperl-pod-here-fontify): * lisp/progmodes/idlw-help.el (idlwave-help-fontify): * lisp/progmodes/idlwave.el (idlwave-completion-fontify-classes): Don't check for feature 'font-lock; it has been preloaded since 22.1. * lisp/cedet/semantic/format.el (font-lock): * lisp/epa.el (font-lock): * lisp/erc/erc.el (font-lock): * lisp/generic-x.el (font-lock): * lisp/net/sieve-mode.el (font-lock): * lisp/progmodes/prolog.el (font-lock): * lisp/textmodes/rst.el (font-lock): Remove unnecessary require.
This commit is contained in:
parent
7cda88250f
commit
51b9acbecc
@ -32,7 +32,6 @@
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
(eval-when-compile (require 'font-lock))
|
||||
(require 'semantic)
|
||||
(require 'semantic/tag-ls)
|
||||
(require 'ezimage)
|
||||
@ -119,12 +118,10 @@ be used unless font lock is a feature.")
|
||||
"Apply onto TEXT a color associated with FACE-CLASS.
|
||||
FACE-CLASS is a tag type found in `semantic-format-face-alist'.
|
||||
See that variable for details on adding new types."
|
||||
(if (featurep 'font-lock)
|
||||
(let ((face (cdr-safe (assoc face-class semantic-format-face-alist)))
|
||||
(newtext (concat text)))
|
||||
(put-text-property 0 (length text) 'face face newtext)
|
||||
newtext)
|
||||
text))
|
||||
(let ((face (cdr-safe (assoc face-class semantic-format-face-alist)))
|
||||
(newtext (concat text)))
|
||||
(put-text-property 0 (length text) 'face face newtext)
|
||||
newtext))
|
||||
|
||||
(defun semantic--format-colorize-merge-text (precoloredtext face-class)
|
||||
"Apply onto PRECOLOREDTEXT a color associated with FACE-CLASS.
|
||||
|
@ -24,7 +24,6 @@
|
||||
;;; Dependencies
|
||||
|
||||
(require 'epg)
|
||||
(require 'font-lock)
|
||||
(eval-when-compile (require 'subr-x))
|
||||
(require 'derived)
|
||||
|
||||
|
@ -58,7 +58,6 @@
|
||||
(load "erc-loaddefs" nil t)
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'font-lock)
|
||||
(require 'format-spec)
|
||||
(require 'pp)
|
||||
(require 'thingatpt)
|
||||
|
@ -270,8 +270,7 @@ instead."
|
||||
eshell-current-subjob-p
|
||||
font-lock-mode)
|
||||
;; use the fancy highlighting in `eshell-ls' rather than font-lock
|
||||
(when (and eshell-ls-use-colors
|
||||
(featurep 'font-lock))
|
||||
(when eshell-ls-use-colors
|
||||
(font-lock-mode -1)
|
||||
(setq font-lock-defaults nil)
|
||||
(if (boundp 'font-lock-buffers)
|
||||
|
@ -107,8 +107,6 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'font-lock))
|
||||
|
||||
(defgroup generic-x nil
|
||||
"A collection of generic modes."
|
||||
:prefix "generic-"
|
||||
|
@ -127,10 +127,8 @@ Buffer should contain output generated by `dig-invoke'."
|
||||
"Major mode for displaying dig output."
|
||||
(buffer-disable-undo)
|
||||
(setq-local font-lock-defaults '(dig-font-lock-keywords t))
|
||||
(when (featurep 'font-lock)
|
||||
;; FIXME: what is this for?? --Stef
|
||||
(font-lock-set-defaults))
|
||||
)
|
||||
;; FIXME: what is this for?? --Stef M
|
||||
(font-lock-set-defaults))
|
||||
|
||||
(defun dig-exit ()
|
||||
"Quit dig output buffer."
|
||||
|
@ -43,8 +43,6 @@
|
||||
|
||||
(autoload 'sieve-manage "sieve")
|
||||
(autoload 'sieve-upload "sieve")
|
||||
(eval-when-compile
|
||||
(require 'font-lock))
|
||||
|
||||
(defgroup sieve nil
|
||||
"Sieve."
|
||||
|
@ -400,7 +400,7 @@ Font for POD headers."
|
||||
:version "21.1"
|
||||
:group 'cperl-faces)
|
||||
|
||||
(defcustom cperl-pod-here-fontify '(featurep 'font-lock)
|
||||
(defcustom cperl-pod-here-fontify t
|
||||
"Not-nil after evaluation means to highlight POD and here-docs sections."
|
||||
:type 'boolean
|
||||
:group 'cperl-faces)
|
||||
|
@ -1173,17 +1173,16 @@ When DING is non-nil, ring the bell as well."
|
||||
Useful when source code is displayed as help. See the option
|
||||
`idlwave-help-fontify-source-code'."
|
||||
(interactive)
|
||||
(if (featurep 'font-lock)
|
||||
(let ((major-mode 'idlwave-mode)
|
||||
(font-lock-verbose
|
||||
(if (called-interactively-p 'interactive) font-lock-verbose nil)))
|
||||
(with-syntax-table idlwave-mode-syntax-table
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
idlwave-font-lock-defaults)
|
||||
(if (fboundp 'font-lock-ensure) ; Emacs >= 25.1
|
||||
(font-lock-ensure)
|
||||
;; Silence "interactive use only" warning on Emacs >= 25.1.
|
||||
(with-no-warnings (font-lock-fontify-buffer)))))))
|
||||
(let ((major-mode 'idlwave-mode)
|
||||
(font-lock-verbose
|
||||
(if (called-interactively-p 'interactive) font-lock-verbose nil)))
|
||||
(with-syntax-table idlwave-mode-syntax-table
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
idlwave-font-lock-defaults)
|
||||
(if (fboundp 'font-lock-ensure) ; Emacs >= 25.1
|
||||
(font-lock-ensure)
|
||||
;; Silence "interactive use only" warning on Emacs >= 25.1.
|
||||
(with-no-warnings (font-lock-fontify-buffer))))))
|
||||
|
||||
|
||||
(defun idlwave-help-error (name type class keyword)
|
||||
|
@ -7642,14 +7642,13 @@ associated TAG, if any."
|
||||
|
||||
(defun idlwave-completion-fontify-classes ()
|
||||
"Goto the *Completions* buffer and fontify the class info."
|
||||
(when (featurep 'font-lock)
|
||||
(with-current-buffer "*Completions*"
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((buffer-read-only nil))
|
||||
(while (re-search-forward "\\.*<[^>]+>" nil t)
|
||||
(put-text-property (match-beginning 0) (match-end 0)
|
||||
'face 'font-lock-string-face)))))))
|
||||
(with-current-buffer "*Completions*"
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((buffer-read-only nil))
|
||||
(while (re-search-forward "\\.*<[^>]+>" nil t)
|
||||
(put-text-property (match-beginning 0) (match-end 0)
|
||||
'face 'font-lock-string-face))))))
|
||||
|
||||
(defun idlwave-uniquify (list)
|
||||
(let ((ht (make-hash-table :size (length list) :test 'equal)))
|
||||
|
@ -261,7 +261,6 @@
|
||||
(require 'comint)
|
||||
|
||||
(eval-when-compile
|
||||
(require 'font-lock)
|
||||
;; We need imenu everywhere because of the predicate index!
|
||||
(require 'imenu)
|
||||
;)
|
||||
@ -1883,8 +1882,6 @@ Argument BOUND is a buffer position limiting searching."
|
||||
;; Set everything up
|
||||
(defun prolog-font-lock-keywords ()
|
||||
"Set up font lock keywords for the current Prolog system."
|
||||
;;(when window-system
|
||||
(require 'font-lock)
|
||||
|
||||
;; Define Prolog faces
|
||||
(defface prolog-redo-face
|
||||
|
@ -3578,8 +3578,6 @@ Region is from BEG to END. With WITH-EMPTY prefix empty lines too."
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Font lock
|
||||
|
||||
(require 'font-lock)
|
||||
|
||||
;; FIXME: The obsolete variables need to disappear.
|
||||
|
||||
;; The following versions have been done inside Emacs and should not be
|
||||
|
Loading…
Reference in New Issue
Block a user