open an editor with the macro data in a file
(self,mname,macro)
| 535 | return filename, lineno, use_temp |
| 536 | |
| 537 | def _edit_macro(self,mname,macro): |
| 538 | """open an editor with the macro data in a file""" |
| 539 | filename = self.shell.mktempfile(macro.value) |
| 540 | self.shell.hooks.editor(filename) |
| 541 | |
| 542 | # and make a new macro object, to replace the old one |
| 543 | mvalue = Path(filename).read_text(encoding="utf-8") |
| 544 | self.shell.user_ns[mname] = Macro(mvalue) |
| 545 | |
| 546 | @skip_doctest |
| 547 | @line_magic |
no test coverage detected