225 |
"Bind the symbol as a function during compilation of the file, |
"Bind the symbol as a function during compilation of the file, |
226 |
to silence the byte compiler. Don't use within `eval-when-compile'." |
to silence the byte compiler. Don't use within `eval-when-compile'." |
227 |
`(eval-when-compile |
`(eval-when-compile |
228 |
(if (not (assq ',fun cc-bytecomp-original-functions)) |
(if (fboundp ',fun) |
229 |
(setq cc-bytecomp-original-functions |
nil |
230 |
(cons (list ',fun |
(if (not (assq ',fun cc-bytecomp-original-functions)) |
231 |
nil |
(setq cc-bytecomp-original-functions |
232 |
(if (fboundp ',fun) |
(cons (list ',fun nil 'unbound) |
233 |
(symbol-function ',fun) |
cc-bytecomp-original-functions))) |
234 |
'unbound)) |
(if (and (cc-bytecomp-is-compiling) |
235 |
cc-bytecomp-original-functions))) |
(= cc-bytecomp-load-depth 0)) |
236 |
(if (and (cc-bytecomp-is-compiling) |
(fset ',fun 'cc-bytecomp-ignore))))) |
|
(= cc-bytecomp-load-depth 0) |
|
|
(not (fboundp ',fun))) |
|
|
(fset ',fun 'cc-bytecomp-ignore)))) |
|
237 |
|
|
238 |
(put 'cc-bytecomp-defmacro 'lisp-indent-function 'defun) |
(put 'cc-bytecomp-defmacro 'lisp-indent-function 'defun) |
239 |
(defmacro cc-bytecomp-defmacro (fun &rest temp-macro) |
(defmacro cc-bytecomp-defmacro (fun &rest temp-macro) |
266 |
Don't use within `eval-when-compile'." |
Don't use within `eval-when-compile'." |
267 |
`(eval-when-compile |
`(eval-when-compile |
268 |
(if (get ',symbol 'byte-obsolete-variable) |
(if (get ',symbol 'byte-obsolete-variable) |
269 |
(cc-bytecomp-put ',symbol 'byte-obsolete-variable nil)))) |
(cc-bytecomp-put ',symbol 'byte-obsolete-variable nil) |
270 |
|
;; This avoids a superfluous compiler warning |
271 |
|
;; about calling `get' for effect. |
272 |
|
t))) |
273 |
|
|
274 |
(defun cc-bytecomp-ignore-obsolete (form) |
(defun cc-bytecomp-ignore-obsolete (form) |
275 |
;; Wraps a call to `byte-compile-obsolete' that suppresses the warning. |
;; Wraps a call to `byte-compile-obsolete' that suppresses the warning. |