Skip to content

Instantly share code, notes, and snippets.

@rzl24ozi
rzl24ozi / README.txt
Last active July 3, 2021 01:37
about patches and how to build emacs on Windows. (Japanese)
■各パッチについて
emacs-26.1-rc1-*.diff は emacs-26.1-rc1 に対するパッチです。
GNU emacs(x64) (http://hp.vector.co.jp/authors/VA052357/emacs.html)
の追加機能の主なものを切り出したものと自作のものをいくつか。
GNU emacs(x64) で独自に実装されていたダイナミックロード機能は私にはうまく動かせなかったので
そのパッチはありませんが、emacs-25 で dynamic module 機能が実装されたので似たようなことは
できるかと思います。
cmigemo を dynamic module で組み込むようにしてみたものを
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-w32-ime.diff
Last active October 21, 2018 05:41
add w32-ime support to emacs with Windows GUI
--- ./configure.ac.orig 2018-04-05 18:55:25.000000000 +0900
+++ ./configure.ac 2018-04-10 23:10:39.762975600 +0900
@@ -368,6 +368,10 @@
On by default on macOS.])],[],[with_ns=maybe])
OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
+OPTION_DEFAULT_ON([w32-ime], [don't compile with W32-IME support])
+OPTION_DEFAULT_ON([reconversion], [don't compile with RECONVERSION support])
+OPTION_DEFAULT_ON([documentfeed], [don't compile with DOCUMENTFEED support])
+
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-image-fit.diff
Last active April 10, 2018 14:38
add image fit option to emacs
--- ./lisp/image-mode.el.orig 2018-01-09 05:23:57.000000000 +0900
+++ ./lisp/image-mode.el 2018-04-10 23:10:36.891658700 +0900
@@ -758,9 +758,12 @@
(edges (and (null image-transform-resize)
(window-inside-pixel-edges
(get-buffer-window (current-buffer)))))
+ (type (image-type file-or-data nil data-p))
(type (if (fboundp 'imagemagick-types)
- 'imagemagick
- (image-type file-or-data nil data-p)))
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-cmigemo.diff
Last active April 10, 2018 14:33
add cmigemo support to emacs
--- ./configure.ac.orig 2018-04-05 18:55:25.000000000 +0900
+++ ./configure.ac 2018-04-10 23:10:26.376568600 +0900
@@ -379,6 +379,8 @@
OPTION_DEFAULT_OFF([modules],[compile with dynamic modules support])
OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support])
+OPTION_DEFAULT_ON([cmigemo], [don't compile with CMIGEMO support])
+
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])],
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-cygwin-rsvg.diff
Last active April 10, 2018 14:35
add svg support to cygwin emacs-w32
--- ./configure.ac.orig 2018-04-05 18:55:25.000000000 +0900
+++ ./configure.ac 2018-04-10 23:10:34.731914900 +0900
@@ -2498,7 +2498,7 @@
### Use -lrsvg-2 if available, unless '--with-rsvg=no' is specified.
HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then
if test "${with_rsvg}" != "no"; then
RSVG_REQUIRED=2.11.0
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-mingw-imagemagick.diff
Last active April 10, 2018 14:40
add imagemagick support to Windows version emacs
--- ./lisp/loadup.el.orig 2018-01-09 05:23:57.000000000 +0900
+++ ./lisp/loadup.el 2018-04-10 23:10:38.764782700 +0900
@@ -284,6 +284,7 @@
(load "term/w32-win")
(load "disp-table")
(when (eq system-type 'windows-nt)
+ (load "image")
(load "w32-fns")
(load "ls-lisp")
(load "dos-w32"))))
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-disable-w32-ime.diff
Last active April 10, 2018 14:36
add disable-w32-ime function to emacs with Windows GUI
--- ./src/w32fns.c.orig 2018-01-09 05:23:58.000000000 +0900
+++ ./src/w32fns.c 2018-04-10 23:10:35.912507500 +0900
@@ -79,6 +79,8 @@
extern void w32_free_menu_strings (HWND);
extern const char *map_w32_filename (const char *, const char **);
+static int ime_disabled = 0;
+
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
@rzl24ozi
rzl24ozi / emacs-26.1-rc1-ImmDisableIME.diff
Last active May 20, 2018 12:55
disable w32-ime by using ImmDisableIME()
--- ./src/w32fns.c.orig 2018-01-09 05:23:58.000000000 +0900
+++ ./src/w32fns.c 2018-04-10 23:10:38.166459500 +0900
@@ -11058,6 +11058,9 @@
{
HMODULE imm32_lib = GetModuleHandle ("imm32.dll");
+ BOOL (WINAPI * disable_ime_fn) (DWORD) = (BOOL (WINAPI *) (DWORD))
+ GetProcAddress (imm32_lib, "ImmDisableIME");
+ if (disable_ime_fn) disable_ime_fn (-1);
get_composition_string_fn = (ImmGetCompositionString_Proc)
@rzl24ozi
rzl24ozi / README.25.3.txt
Last active October 12, 2017 13:51
about patches and how to build emacs on Windows. (Japanese)
※以下は emacs-26 プレテスト前のものなので現在では内容が古くなっているかもしれません。
emacs-26(以降)の README.txt も参照してみてください。
■各パッチについて
emacs-25.3-*.diff は emacs-25.3 に対するパッチです。
GNU emacs(x64) (http://hp.vector.co.jp/authors/VA052357/emacs.html)
の追加機能の主なものを切り出したものと自作のものをいくつか。
@rzl24ozi
rzl24ozi / emacs-25.3-ImmDisableIME.diff
Last active December 11, 2017 07:02
disable w32-ime by using ImmDisableIME()
--- ./src/w32fns.c.orig 2017-04-15 00:02:47.000000000 +0900
+++ ./src/w32fns.c 2017-09-13 21:00:22.787460000 +0900
@@ -9944,6 +9944,9 @@
{
HMODULE imm32_lib = GetModuleHandle ("imm32.dll");
+ BOOL (WINAPI * disable_ime_fn) (DWORD) = (BOOL (WINAPI *) (DWORD))
+ GetProcAddress (imm32_lib, "ImmDisableIME");
+ if (disable_ime_fn) disable_ime_fn (-1);
get_composition_string_fn = (ImmGetCompositionString_Proc)