changeset 85989:89ba7e228a5b

(byte-compile-file-form-define-abbrev-table): New function.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 09 Nov 2007 15:57:46 +0000
parents 915f18d633ac
children f1e0811b8c83
files lisp/ChangeLog lisp/emacs-lisp/bytecomp.el
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/bytecomp.el (byte-compile-file-form-define-abbrev-table):
+	New function.
+
 2007-11-09  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
 	* ps-print.el: Clean the code for checking suitable Emacs version.
--- 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)