# HG changeset patch # User Stefan Monnier # Date 1194623866 0 # Node ID 89ba7e228a5b37ffb870b0f7ea81c47cb0f8bfa1 # Parent 915f18d633ac21fe2227e3daa62c7d3675cf8ece (byte-compile-file-form-define-abbrev-table): New function. diff -r 915f18d633ac -r 89ba7e228a5b lisp/ChangeLog --- a/lisp/ChangeLog Fri Nov 09 15:34:03 2007 +0000 +++ b/lisp/ChangeLog Fri Nov 09 15:57:46 2007 +0000 @@ -1,3 +1,8 @@ +2007-11-09 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-file-form-define-abbrev-table): + New function. + 2007-11-09 Vinicius Jose Latorre * ps-print.el: Clean the code for checking suitable Emacs version. diff -r 915f18d633ac -r 89ba7e228a5b lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Fri Nov 09 15:34:03 2007 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Fri Nov 09 15:57:46 2007 +0000 @@ -2260,6 +2260,13 @@ (byte-compile-top-level (nth 2 form) nil 'file)))) form)) +(put 'define-abbrev-table 'byte-hunk-handler 'byte-compile-file-form-define-abbrev-table) +(defun byte-compile-file-form-define-abbrev-table (form) + (when (and (byte-compile-warning-enabled-p 'free-vars) + (eq 'quote (car-safe (car-safe (cdr form))))) + (push (car-safe (cdr (cadr form))) byte-compile-bound-variables)) + (byte-compile-keep-pending form)) + (put 'custom-declare-variable 'byte-hunk-handler 'byte-compile-file-form-custom-declare-variable) (defun byte-compile-file-form-custom-declare-variable (form)