From: Stefan Monnier Date: Fri, 9 Nov 2007 15:57:46 +0000 (+0000) Subject: (byte-compile-file-form-define-abbrev-table): New function. X-Git-Tag: emacs-pretest-23.0.90~9816 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b7c76a30f9717dccc396fd4fc7493cbbf589a8e8;p=emacs.git (byte-compile-file-form-define-abbrev-table): New function. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1919f435af7..cbd685727bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index c1f547e215d..7dbeb66db77 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2260,6 +2260,13 @@ list that represents a doc string reference. (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)