From b7c76a30f9717dccc396fd4fc7493cbbf589a8e8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 9 Nov 2007 15:57:46 +0000 Subject: [PATCH] (byte-compile-file-form-define-abbrev-table): New function. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/bytecomp.el | 7 +++++++ 2 files changed, 12 insertions(+) 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) -- 2.39.2