From 32fe5377a352fe554a9bf95f87aaf862abc18794 Mon Sep 17 00:00:00 2001
From: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Tue, 24 Nov 2009 21:36:10 +0000
Subject: [PATCH] (list-load-path-shadows): Setup a major mode for the
 displayed buffer (bug#4887).

---
 lisp/ChangeLog            | 3 +++
 lisp/emacs-lisp/shadow.el | 1 +
 2 files changed, 4 insertions(+)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 65e2dff9e2c..b0cc109162b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2009-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* emacs-lisp/shadow.el (list-load-path-shadows): Setup a major mode
+	for the displayed buffer (bug#4887).
+
 	* man.el (Man-completion-table): New function.
 	(man): Use it.
 
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 9111dde7de7..5087822444c 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -234,6 +234,7 @@ function, `find-emacs-lisp-shadows'."
 	      ;; Create the *Shadows* buffer and display shadowings there.
 	      (let ((string (buffer-string)))
 		(with-current-buffer (get-buffer-create "*Shadows*")
+                  (fundamental-mode)    ;run after-change-major-mode-hook.
 		  (display-buffer (current-buffer))
 		  (setq buffer-undo-list t
 			buffer-read-only nil)
-- 
2.39.5