Skip to content

Instantly share code, notes, and snippets.

@rzl24ozi
rzl24ozi / emacs-25.3-disable-w32-ime.diff
Last active Sep 13, 2017
add disable-w32-ime function to emacs with Windows GUI
View emacs-25.3-disable-w32-ime.diff
--- ./src/w32fns.c.orig 2017-04-15 00:02:47.000000000 +0900
+++ ./src/w32fns.c 2017-09-13 21:00:14.888905300 +0900
@@ -78,6 +78,8 @@
extern const char *map_w32_filename (const char *, const char **);
extern char * w32_strerror (int error_no);
+static int ime_disabled = 0;
+
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
@rzl24ozi
rzl24ozi / emacs-25.3-mingw-imagemagick.diff
Last active Oct 6, 2017
add imagemagick support to Windows version emacs
View emacs-25.3-mingw-imagemagick.diff
--- ./lisp/loadup.el.orig 2017-04-15 00:02:47.000000000 +0900
+++ ./lisp/loadup.el 2017-10-06 21:05:28.835848400 +0900
@@ -271,6 +271,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-25.3-cygwin-rsvg.diff
Last active Sep 13, 2017
add svg support to cygwin emacs-w32
View emacs-25.3-cygwin-rsvg.diff
--- ./configure.ac.orig 2017-09-12 01:55:00.000000000 +0900
+++ ./configure.ac 2017-09-13 21:00:13.353677900 +0900
@@ -2382,7 +2382,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-25.3-image-fit.diff
Last active Sep 13, 2017
add image fit option to emacs
View emacs-25.3-image-fit.diff
--- ./lisp/image-mode.el.orig 2017-04-15 00:02:47.000000000 +0900
+++ ./lisp/image-mode.el 2017-09-13 21:00:16.398061300 +0900
@@ -680,9 +680,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-25.3-cmigemo.diff
Last active Sep 13, 2017
add cmigemo support to emacs
View emacs-25.3-cmigemo.diff
--- ./configure.ac.orig 2017-09-12 01:55:00.000000000 +0900
+++ ./configure.ac 2017-09-13 21:00:09.797219300 +0900
@@ -355,6 +355,8 @@
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
OPTION_DEFAULT_OFF([modules],[compile with dynamic modules 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-25.3-w32-ime.diff
Last active Feb 23, 2018
add w32-ime support to emacs with Windows GUI
View emacs-25.3-w32-ime.diff
--- ./configure.ac.orig 2017-09-12 01:55:00.000000000 +0900
+++ ./configure.ac 2017-09-13 21:00:32.623281500 +0900
@@ -346,6 +346,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-24.5-ImmDisableIME.diff
Last active Aug 29, 2015
disable w32-ime by using ImmDisableIME()
View emacs-24.5-ImmDisableIME.diff
--- ./src/w32fns.c.orig 2015-04-02 16:23:06.000000000 +0900
+++ ./src/w32fns.c 2015-04-25 20:00:47.429173300 +0900
@@ -8664,6 +8664,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 / emacs-master-diffs
Last active Apr 18, 2018
patches for emacs master branch
View emacs-master-diffs
emacs master branch へのパッチ
.tar.xz を展開
*-w32-ime.diff : IME 関連
*-cmigemo.diff : cmigemo 組み込み
cmigemo.el を migemo.el を require して変更が必要な関数だけ変更するようにしてみました。
(変更点が分かりやすくなるかと思いましたがあまりかわらんか^^;)
なので migemo.el を melpa package から、あるいは 手動で load-path の通っている場所に置くなどして
インストールしておく必要があるのでご注意。
@rzl24ozi
rzl24ozi / emacs-24.5-x64.diff
Last active Aug 29, 2015
add w32-ime support to emacs with Windows GUI and various modifications
View emacs-24.5-x64.diff
--- ./configure.ac.orig 2015-04-02 16:23:06.000000000 +0900
+++ ./configure.ac 2015-04-11 07:27:30.430112300 +0900
@@ -263,6 +263,12 @@
OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
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-24.5-cmigemo.diff
Last active Aug 29, 2015
add cmigemo support to emacs
View emacs-24.5-cmigemo.diff
--- ./configure.ac.orig 2015-04-02 16:23:06.000000000 +0900
+++ ./configure.ac 2015-04-11 07:32:09.938337400 +0900
@@ -271,6 +271,8 @@
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression 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, gfile, inotify, w32, no)])],
You can’t perform that action at this time.