equal
deleted
inserted
replaced
88 |
88 |
89 local |
89 local |
90 val default = {indent = default_indent}; |
90 val default = {indent = default_indent}; |
91 val modes = ref (Symtab.make [("", default)]); |
91 val modes = ref (Symtab.make [("", default)]); |
92 in |
92 in |
93 fun add_mode name indent = |
93 fun add_mode name indent = CRITICAL (fn () => |
94 change modes (Symtab.update_new (name, {indent = indent})); |
94 change modes (Symtab.update_new (name, {indent = indent}))); |
95 fun get_mode () = |
95 fun get_mode () = |
96 the_default default (Library.get_first (Symtab.lookup (! modes)) (! print_mode)); |
96 the_default default (Library.get_first (Symtab.lookup (! modes)) (! print_mode)); |
97 end; |
97 end; |
98 |
98 |
99 fun mode_indent x y = #indent (get_mode ()) x y; |
99 fun mode_indent x y = #indent (get_mode ()) x y; |