(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)))))))
(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
(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))
(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)))
(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)))))))
(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
;; 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))
(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))
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*"
(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 ()
\\{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)
(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)