Skip to content

Commit

Permalink
Backport PR #3117: propagate automagic change to shell
Browse files Browse the repository at this point in the history
Automagic toggling was broken.

this should fix it. Need to check for backport on 0.13.x
  • Loading branch information
minrk committed Mar 31, 2013
1 parent d31ebe2 commit 64d6e0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/interactiveshell.py
Expand Up @@ -2009,7 +2009,7 @@ def set_completer_frame(self, frame=None):
def init_magics(self):
from IPython.core import magics as m
self.magics_manager = magic.MagicsManager(shell=self,
confg=self.config,
config=self.config,
user_magics=m.UserMagics(self))
self.configurables.append(self.magics_manager)

Expand Down
3 changes: 3 additions & 0 deletions IPython/core/magic.py
Expand Up @@ -303,6 +303,9 @@ class MagicsManager(Configurable):

auto_magic = Bool(True, config=True, help=
"Automatically call line magics without requiring explicit % prefix")

def _auto_magic_changed(self, name, value):
self.shell.automagic = value

_auto_status = [
'Automagic is OFF, % prefix IS needed for line magics.',
Expand Down

0 comments on commit 64d6e0d

Please sign in to comment.