Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 0 additions & 142 deletions TeXmacs/plugins/mgs/progs/data/mgs.scm

This file was deleted.

1 change: 0 additions & 1 deletion TeXmacs/progs/init-research.scm
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@
(lazy-format (data image) postscript pdf svg gif jpeg png ppm tif webp xpm)

(lazy-format (convert rewrite init-rewrite) texmacs verbatim)
(lazy-format (data mgs) mgs)
(lazy-format (data stm) stm)
(lazy-format (data stem) stem)
(lazy-format (data tmu) tmu)
Expand Down
5 changes: 1 addition & 4 deletions TeXmacs/progs/texmacs/menus/edit-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
(with l
(filter (lambda (x)
(or (with-developer-tool?)
(and (not (string=? x "mgs"))
(not (string=? x "stm"))
(not (string=? x "stem"))
) ;and
(and (not (string=? x "stm")) (not (string=? x "stem")))
) ;or
) ;lambda
(cvs "texmacs-snippet" "-snippet" #t)
Expand Down
10 changes: 2 additions & 8 deletions TeXmacs/progs/texmacs/menus/file-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@
(filter (lambda (x)
(and (not (in? x (image-formats)))
(or (with-developer-tool?)
(and (not (string=? x "mgs"))
(not (string=? x "stm"))
(not (string=? x "stem"))
) ;and
(and (not (string=? x "stm")) (not (string=? x "stem")))
) ;or
) ;and
) ;lambda
Expand Down Expand Up @@ -221,10 +218,7 @@
(not (string=? x "latex"))
(not (string=? x "latex-class"))
(or (with-developer-tool?)
(and (not (string=? x "mgs"))
(not (string=? x "stm"))
(not (string=? x "stem"))
) ;and
(and (not (string=? x "stm")) (not (string=? x "stem")))
) ;or
) ;and
) ;lambda
Expand Down
4 changes: 1 addition & 3 deletions TeXmacs/progs/texmacs/menus/preferences-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@
("1.4" "1.4")
("1.5" "1.5")
("1.6" "1.6")
("1.7" "1.7"))))
(-> "TeXmacs -> Mogan Scheme"
(toggle "Formatted Mogan Scheme" "texmacs->mgs:formatted")))
("1.7" "1.7")))))
(-> "Mathematics"
(-> "Keyboard"
(item ("Enforce brackets to match" (toggle-matching-brackets)))
Expand Down
15 changes: 0 additions & 15 deletions TeXmacs/progs/texmacs/menus/preferences-widgets.scm
Original file line number Diff line number Diff line change
Expand Up @@ -856,18 +856,6 @@

;; Mogan Scheme ----------

(tm-widget (mogan-scheme-preferences-widget)
======
(bold (text "TeXmacs -> Mogan Scheme"))
===
(aligned (meti (hlist // (text "Use the Formatted Mogan Scheme"))
(toggle (set-boolean-preference "texmacs->mgs:formatted" answer)
(get-boolean-preference "texmacs->mgs:formatted")
) ;toggle
) ;meti
) ;aligned
) ;tm-widget

;; All converters ----------

(tm-widget (conversion-preferences-widget)
Expand All @@ -880,9 +868,6 @@
(tab (text "Pdf") (centered (dynamic (pdf-preferences-widget))))
) ;assuming
(tab (text "Image") (centered (dynamic (image-preferences-widget))))
(tab (text "Mogan Scheme")
(centered (dynamic (mogan-scheme-preferences-widget)))
) ;tab
) ;tabs
) ;padded
===
Expand Down
4 changes: 2 additions & 2 deletions TeXmacs/progs/texmacs/texmacs/tm-files.scm
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@
;;
;; 逻辑
;; ----
;; 只允许本地、非 tmfs、非 web 且格式为 texmacs/stm/mgs/tmu 的文档备份;
;; 只允许本地、非 tmfs、非 web 且格式为 texmacs/stm/tmu 的文档备份;
;; 位于 get-texmacs-path 目录或子目录下的内置只读文件直接跳过。
;;
;; 注意
Expand All @@ -752,7 +752,7 @@
(not (url-rooted-web? name))
(not (url-rooted-tmfs? name))
(not (auto-backup-texmacs-path-buffer? name))
(in? (auto-backup-format name) '("texmacs" "stm" "mgs" "tmu" "stem"))
(in? (auto-backup-format name) '("texmacs" "stm" "tmu" "stem"))
) ;and
) ;tm-define

Expand Down
29 changes: 29 additions & 0 deletions devel/1131.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,32 @@ S-expression 解析器 `moebius/moebius/data/scheme_der.cpp` 中的 `string_to_s
- `moebius/moebius/data/scheme_der.cpp`
- `TeXmacs/plugins/python/packages/code/python.stem`
- `TeXmacs/tests/stem_python_equiv.scm`(新增等价性测试)

## 2026/06/29 移除 mgs 格式

### What
彻底移除 `mgs` 文件格式及相关 UI 配置,`stem` 作为继任格式继续保留。

### Why
- `stem` 已完全替代 `mgs`,两者功能重叠。
- `mgs` 的格式化转换逻辑不成熟,且已在 `stem` 中去除。
- 减少菜单、偏好设置和格式白名单中的冗余条目。

### How
- 删除 `TeXmacs/plugins/mgs/progs/data/mgs.scm` 及空目录 `TeXmacs/plugins/mgs`。
- 在 `TeXmacs/progs/init-research.scm` 中移除 `(lazy-format (data mgs) mgs)`。
- 在 `src/Texmacs/Data/new_buffer.cpp` 的 `attach_subformat` 中移除 `"mgs"` 判断。
- 在 `TeXmacs/progs/texmacs/texmacs/tm-files.scm` 的自动备份白名单与注释中移除 `mgs`。
- 在 `TeXmacs/progs/texmacs/menus/file-menu.scm`、`edit-menu.scm` 的开发者工具隐藏列表中移除 `"mgs"`。
- 在 `TeXmacs/progs/texmacs/menus/preferences-menu.scm` 中移除 "TeXmacs -> Mogan Scheme" 子菜单。
- 在 `TeXmacs/progs/texmacs/menus/preferences-widgets.scm` 中移除 `mogan-scheme-preferences-widget` 及其在 Conversion 标签页中的 Tab。

### 涉及文件
- `TeXmacs/plugins/mgs/progs/data/mgs.scm`(删除)
- `TeXmacs/progs/init-research.scm`
- `src/Texmacs/Data/new_buffer.cpp`
- `TeXmacs/progs/texmacs/texmacs/tm-files.scm`
- `TeXmacs/progs/texmacs/menus/file-menu.scm`
- `TeXmacs/progs/texmacs/menus/edit-menu.scm`
- `TeXmacs/progs/texmacs/menus/preferences-menu.scm`
- `TeXmacs/progs/texmacs/menus/preferences-widgets.scm`
3 changes: 1 addition & 2 deletions src/Texmacs/Data/new_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ attach_buffer_notifier (url name) {

tree
attach_subformat (tree t, url u, string fm) {
if ((fm == "texmacs") || (fm == "stm") || (fm == "mgs") || (fm == "stem"))
return t;
if ((fm == "texmacs") || (fm == "stm") || (fm == "stem")) return t;
if (!format_exists (fm)) return t;

string s = suffix (u);
Expand Down
Loading