Article View: gnu.emacs.bug
Article #87988outline-mode adds show-all to change-major-mode-hook
From: bellman
Date: Fri, 19 Aug 1994 15:15
Date: Fri, 19 Aug 1994 15:15
28 lines
1727 bytes
1727 bytes
When running outline-mode, the function show-all is added to
change-major-mode-hook. This is done globally, which means that
changing major mode in any buffer may mutilate the contents of
that buffer.
To repeat:
Create a file "gazonk.c" containing a single ^M character, by
doing e.g. "echo -n ^V^M >gazonk.c"
Start emacs
M-x outline-mode RET
C-x C-f gazonk.c
The buffer contains a single LFD character, not a ^M character.
The problem seems to be the line
(add-hook 'change-major-mode-hook 'show-all)
in outline.el, in the function outline-mode. I'm not sure what
the proper way to fix this is. Perhaps making
change-major-mode-hook into a buffer-local variabel would fix it,
but I'm not sure that would be the proper way to do it.
--
Thomas Bellman, Lysator Academic Computer Club, Linkoping University
"Adde parvum parvo magnus acervus erit" ! Sweden ; +46-13 177780
(From The Mythical Man-Month) ! Bellman@Lysator.LiU.Se
Technical Details
Message-ID:
<199408191509.RAA01523@lysita>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!lysator.liu.se!bellmanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,497f3b3c2c8e470,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-19 09:04:07 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!lysator.liu.se!bellman From: bellman@lysator.liu.se Newsgroups: gnu.emacs.bug Subject: outline-mode adds show-all to change-major-mode-hook Date: 19 Aug 1994 11:15:40 -0400 Organization: GNUs Not Usenet Lines: 28 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199408191509.RAA01523@lysita>