* lisp/progmodes/cc-mode.el (c-advise-fl-for-region): Fix compiler warning
Make sure we macro-expand `defadvice` only when we want to use it.
This commit is contained in:
parent
27ed565ec6
commit
e9672b147f
1 changed files with 11 additions and 11 deletions
|
@ -2723,18 +2723,18 @@ This function is called from `c-common-init', once per mode initialization."
|
|||
;; Emacs < 22 and XEmacs
|
||||
(defmacro c-advise-fl-for-region (function)
|
||||
(declare (debug t))
|
||||
`(defadvice ,function (before get-awk-region activate)
|
||||
;; Make sure that any string/regexp is completely font-locked.
|
||||
(when c-buffer-is-cc-mode
|
||||
(save-excursion
|
||||
(ad-set-arg 1 c-new-END) ; end
|
||||
(ad-set-arg 0 c-new-BEG))))) ; beg
|
||||
(unless (boundp 'font-lock-extend-after-change-region-function)
|
||||
`(defadvice ,function (before get-awk-region activate)
|
||||
;; Make sure that any string/regexp is completely font-locked.
|
||||
(when c-buffer-is-cc-mode
|
||||
(save-excursion
|
||||
(ad-set-arg 1 c-new-END) ; end
|
||||
(ad-set-arg 0 c-new-BEG)))))) ; beg
|
||||
|
||||
(unless (boundp 'font-lock-extend-after-change-region-function)
|
||||
(c-advise-fl-for-region font-lock-after-change-function)
|
||||
(c-advise-fl-for-region jit-lock-after-change)
|
||||
(c-advise-fl-for-region lazy-lock-defer-rest-after-change)
|
||||
(c-advise-fl-for-region lazy-lock-defer-line-after-change))
|
||||
(c-advise-fl-for-region font-lock-after-change-function)
|
||||
(c-advise-fl-for-region jit-lock-after-change)
|
||||
(c-advise-fl-for-region lazy-lock-defer-rest-after-change)
|
||||
(c-advise-fl-for-region lazy-lock-defer-line-after-change)
|
||||
|
||||
;; Connect up to `electric-indent-mode' (Emacs 24.4 and later).
|
||||
(defun c-electric-indent-mode-hook ()
|
||||
|
|
Loading…
Add table
Reference in a new issue