Mercurial > emacs
changeset 47676:fadbf61035e1
(unload-feature): When undefining a variable, delete its buffer-local bindings.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 29 Sep 2002 03:34:12 +0000 |
parents | cb548fe4bcdb |
children | 8ed8d9b28086 |
files | lisp/loadhist.el |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/loadhist.el Sun Sep 29 03:31:15 2002 +0000 +++ b/lisp/loadhist.el Sun Sep 29 03:34:12 2002 +0000 @@ -167,8 +167,14 @@ ;; Remove any feature names that this file provided. (if (eq (car x) 'provide) (setq features (delq (cdr x) features))) - (if (eq (car x) 'defvar) - (makunbound (cdr x)))) + (when (eq (car x) 'defvar) + ;; Kill local values as much as possible. + (dolist (buf (buffer-list)) + (with-current-buffer buf + (kill-local-variable (cdr x)))) + ;; Get rid of the default binding if we can. + (unless (local-variable-if-set-p (cdr x)) + (makunbound (cdr x))))) (t (when (fboundp x) (if (fboundp 'ad-unadvise)