mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-11 15:13:29 +08:00
Split emacs out
This commit is contained in:
17
src/chsrc.c
17
src/chsrc.c
@@ -1713,21 +1713,7 @@ wr_tex_setsrc (char *option)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
wr_emacs_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_source (wr_emacs);
|
||||
chsrc_confirm_source (&source);
|
||||
|
||||
chsrc_note2 ("Emacs换源涉及Elisp,需要手动查阅并换源:");
|
||||
puts (source.url);
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeManual);
|
||||
}
|
||||
|
||||
#include "recipe/ware/emacs.c"
|
||||
|
||||
|
||||
void
|
||||
@@ -2091,7 +2077,6 @@ def_target_noget (wr_cocoapods);
|
||||
def_target_noget (wr_flathub);
|
||||
def_target_noget (wr_nix);
|
||||
def_target_noget (wr_guix);
|
||||
def_target_noget (wr_emacs);
|
||||
def_target_noget (wr_anaconda);
|
||||
def_target(wr_tex);
|
||||
|
||||
|
42
src/recipe/ware/emacs.c
Normal file
42
src/recipe/ware/emacs.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* -------------------------------------------------------------
|
||||
* Contributors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Created on : <2023-10-10>
|
||||
* Last modified : <2024-08-09>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static MirrorSite
|
||||
EmacsChina = {"emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", NULL};
|
||||
|
||||
/**
|
||||
* @time 2023-09-10 更新
|
||||
* @note Emacs用户往往只需要一次性换源,只会极少次调用 chsrc,我们只给用户提供文档
|
||||
*/
|
||||
SourceInfo
|
||||
wr_emacs_sources[] = {
|
||||
{&Upstream, NULL},
|
||||
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/help/elpa.html"},
|
||||
{&Zju, "https://mirrors.zju.edu.cn/docs/elpa/"},
|
||||
{&EmacsChina, "https://elpamirror.emacs-china.org/"}
|
||||
};
|
||||
def_sources_n(wr_emacs);
|
||||
|
||||
|
||||
void
|
||||
wr_emacs_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_source (wr_emacs);
|
||||
chsrc_confirm_source (&source);
|
||||
|
||||
chsrc_note2 ("Emacs换源涉及Elisp,需要手动查阅并换源:");
|
||||
puts (source.url);
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeManual);
|
||||
}
|
||||
|
||||
def_target_noget (wr_emacs);
|
Reference in New Issue
Block a user