gui_xim.c included even in Vim without GUI — is this normal ?

39 views
Skip to first unread message

Tony Mechelynck

unread,
Aug 23, 2024, 1:23:31 PM8/23/24
to Christian Brabandt, vim_dev
Hello, I just noticed that the module gui_xim.c is included even in
Vim without GUI, where AFAICT no other GUI module is compiled-in. Is
this normal ?

Here is the configuration for my Tiny build without GUI (the
src/Makefile is unchanged from the distribution and the
src/shadow-tiny/Makefile resends to it by means of a soft link):

export CONF_OPT_ACL='--disable-acl'
export CONF_OPT_GUI='--disable-gui'
export CONF_OPT_PERL='--disable-perlinterp'
export CONF_OPT_PYTHON='--disable-pythoninterp'
export CONF_OPT_PYTHON3='--disable-python3interp'
export CONF_OPT_TCL='--disable-tclinterp'
export CONF_OPT_RUBY='--disable-rubyinterp'
export CONF_OPT_LUA='--disable-luainterp'
export CONF_OPT_MZSCHEME='--disable-mzschemeinterp'
#export CONF_OPT_PLTHOME='--with-plthome=/usr/local/plt'
export CONF_OPT_CSCOPE='--disable-cscope'
#export CONF_OPT_MULTIBYTE='--disable-multibyte'
export CONF_OPT_FEAT='--with-features=tiny'
export CONF_OPT_COMPBY='"--with-compiledby=antoine.m...@gmail.com"'
export CONF_ARGS2='--with-vim-name=vi'

and here is the corresponding "link" command-line:

gcc -L/usr/local/lib -Wl,--as-needed -o vi objects/alloc.o
objects/arabic.o objects/arglist.o objects/autocmd.o objects/beval.o
objects/buffer.o objects/change.o objects/blob.o objects/blowfish.o
objects/cindent.o objects/clientserver.o objects/clipboard.o
objects/cmdexpand.o objects/cmdhist.o objects/crypt.o
objects/crypt_zip.o objects/debugger.o objects/dict.o objects/diff.o
objects/digraph.o objects/drawline.o objects/drawscreen.o
objects/edit.o objects/eval.o objects/evalbuffer.o objects/evalfunc.o
objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o
objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o
objects/ex_getln.o objects/fileio.o objects/filepath.o
objects/findfile.o objects/float.o objects/fold.o objects/getchar.o
objects/gc.o objects/gui_xim.o objects/hardcopy.o objects/hashtab.o
objects/help.o objects/highlight.o objects/if_cscope.o
objects/if_xcmdsrv.o objects/indent.o objects/insexpand.o
objects/list.o objects/locale.o objects/logfile.o objects/map.o
objects/mark.o objects/match.o objects/mbyte.o objects/memline.o
objects/menu.o objects/misc1.o objects/misc2.o objects/mouse.o
objects/move.o objects/normal.o objects/ops.o objects/option.o
objects/optionstr.o objects/os_unix.o objects/pathdef.o
objects/popupmenu.o objects/popupwin.o objects/profiler.o
objects/pty.o objects/quickfix.o objects/regexp.o objects/register.o
objects/screen.o objects/scriptfile.o objects/search.o
objects/session.o objects/sha256.o objects/sign.o objects/sound.o
objects/spell.o objects/spellfile.o objects/spellsuggest.o
objects/strings.o objects/syntax.o objects/tag.o objects/term.o
objects/terminal.o objects/testing.o objects/textformat.o
objects/textobject.o objects/textprop.o objects/time.o
objects/typval.o objects/ui.o objects/undo.o objects/usercmd.o
objects/userfunc.o objects/version.o objects/vim9class.o
objects/vim9cmds.o objects/vim9compile.o objects/vim9execute.o
objects/vim9expr.o objects/vim9instr.o objects/vim9script.o
objects/vim9type.o objects/viminfo.o objects/window.o
objects/bufwrite.o objects/charset.o objects/json.o
objects/main.o objects/memfile.o objects/message.o -lSM -lICE -lXpm
-lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lgpm

Best regards,
Tony.

Christian Brabandt

unread,
Aug 24, 2024, 10:24:53 AM8/24/24
to vim_dev

On Fr, 23 Aug 2024, Tony Mechelynck wrote:

> Hello, I just noticed that the module gui_xim.c is included even in
> Vim without GUI, where AFAICT no other GUI module is compiled-in. Is
> this normal ?

It seems this is mainly for 'imactivatefunc' and for switching the input
method e.g. using `Ctrl-^`.

Thanks,
Christian
--
The only difference between a car salesman and a computer salesman is
that the car salesman knows he's lying.

Tony Mechelynck

unread,
Aug 25, 2024, 9:16:00 PM8/25/24
to vim...@googlegroups.com
On Sat, Aug 24, 2024 at 4:24 PM Christian Brabandt <cbl...@256bit.org> wrote:
>
>
> On Fr, 23 Aug 2024, Tony Mechelynck wrote:
>
> > Hello, I just noticed that the module gui_xim.c is included even in
> > Vim without GUI, where AFAICT no other GUI module is compiled-in. Is
> > this normal ?
>
> It seems this is mainly for 'imactivatefunc' and for switching the input
> method e.g. using `Ctrl-^`.
>
> Thanks,
> Christian

I never use 'imactivatefunc' and I only use 'iminsert' (or the
equivalent) to switch a keymap on or off.

I've tried adding
export CONF_OPT_INPUT='--disable-xim'
to my configurations according to what is said in the src/Makefile at
lines 496 sqq. and as a result (after "make reconfig") my builds are
now compiled with -xim but they can still use my keymaps correctly
(including those with a pluricharacter {lhs} which is tantamount to a
dead key). gui_xim.c is still compiled-in though.

Well, if you tell me that it is normal I won't lose sleep over it.

Best regards,
Tony.

Tony Mechelynck

unread,
Aug 25, 2024, 9:20:57 PM8/25/24
to vim...@googlegroups.com
P.S. My keymaps work but the X11 dead keys present on my Belgian
keyboard don't. I'll have to re-enable XIM.

Best regards,
Tony.

Christian Brabandt

unread,
Aug 26, 2024, 2:01:21 AM8/26/24
to vim...@googlegroups.com

On Mo, 26 Aug 2024, Tony Mechelynck wrote:

> P.S. My keymaps work but the X11 dead keys present on my Belgian
> keyboard don't. I'll have to re-enable XIM.

I never use those, so I cannot say more about it. But I tried to disable
gui_xim.c but the Makefile will always compile it, even if it is not
used, because it is defined in BASIC_SRC.

Perhaps we should rename it to just xim.c instead?

Mit freundlichen Grüßen
Christian
--
An optimist is a guy that has never had much experience.
-- Don Marquis
Reply all
Reply to author
Forward
0 new messages