Re: robsta - r23425 - in abiword/trunk: . src/wp/ap/xp

From: J.M. Maurer <uwog_at_uwog.net>
Date: Mon Apr 07 2008 - 12:01:51 CEST

On Mon, 2008-04-07 at 10:58 +0200, cvs@abisource.com wrote:
> Author: robsta
> Date: 2008-04-07 10:58:52 +0200 (Mon, 07 Apr 2008)
> New Revision: 23425
>
> Modified:
> abiword/trunk/config.h.in
> abiword/trunk/configure.in
> abiword/trunk/src/wp/ap/xp/Makefile.am
> abiword/trunk/src/wp/ap/xp/ap_LoadBindings.cpp
> Log:
> Make emacs and vi keybindings compile-time optional. Saves about 0.1M of binary size when excluded.
> Consult `configure --help' for details.

We don't maintain these, adn i doubt anyone uses them. Can't we just
kill this?

Marc

>
> Modified: abiword/trunk/config.h.in
> ===================================================================
> --- abiword/trunk/config.h.in 2008-04-06 21:41:37 UTC (rev 23424)
> +++ abiword/trunk/config.h.in 2008-04-07 08:58:52 UTC (rev 23425)
> @@ -18,6 +18,9 @@
> /* Poky embedded platform */
> #undef EMBEDDED_TARGET_POKY
>
> +/* Define to enable include emacs-compatible keyboard commands */
> +#undef ENABLE_EMACS_KEYBINDING
> +
> /* Define if building printing support */
> #undef ENABLE_MENUBUTTON
>
> @@ -30,6 +33,9 @@
> /* Define if building status bar */
> #undef ENABLE_STATUSBAR
>
> +/* Define to enable include vi-compatible keyboard commands */
> +#undef ENABLE_VI_KEYBINDING
> +
> /* Define to 1 if you have the <asio.hpp> header file. */
> #undef HAVE_ASIO_HPP
>
>
> Modified: abiword/trunk/configure.in
> ===================================================================
> --- abiword/trunk/configure.in 2008-04-06 21:41:37 UTC (rev 23424)
> +++ abiword/trunk/configure.in 2008-04-07 08:58:52 UTC (rev 23425)
> @@ -175,6 +175,22 @@
> abi_cv_statusbar="yes"
> ])
>
> +AC_ARG_ENABLE([emacs-keybinding],
> + [AS_HELP_STRING([--enable-emacs-keybinding], [Enable the use of emacs-compatible keyboard commands])],
> +[
> + abi_cv_emacs_keybinding="$enableval"
> +], [
> + abi_cv_emacs_keybinding="no"
> +])
> +
> +AC_ARG_ENABLE([vi-keybinding],
> + [AS_HELP_STRING([--enable-vi-keybinding], [Enable the use of vi-compatible keyboard commands])],
> +[
> + abi_cv_vi_keybinding="$enableval"
> +], [
> + abi_cv_vi_keybinding="no"
> +])
> +
> # We define EMBEDDED_TARGET to a numerical value so that we can do like
> # #if EMBEDDED_TARGET == EMBEDDED_TARGET_HILDON
> #
> @@ -532,6 +548,16 @@
> fi
> AM_CONDITIONAL(EMBEDDED_HILDON, test "$abi_cv_embedded_target" == "EMBEDDED_TARGET_HILDON")
>
> +if test "$abi_cv_emacs_keybinding" == "yes"; then
> + AC_DEFINE([ENABLE_EMACS_KEYBINDING], [1], [Define to enable include emacs-compatible keyboard commands])
> +fi
> +AM_CONDITIONAL(ENABLE_EMACS_KEYBINDING, test "$abi_cv_emacs_keybinding" == "yes")
> +
> +if test "$abi_cv_vi_keybinding" == "yes"; then
> + AC_DEFINE([ENABLE_VI_KEYBINDING], [1], [Define to enable include vi-compatible keyboard commands])
> +fi
> +AM_CONDITIONAL(ENABLE_VI_KEYBINDING, test "$abi_cv_vi_keybinding" == "yes")
> +
> if test "$abi_cv_debug" == "yes"; then
> AC_DEFINE([DEBUG], [1], [Define to enable debugging functionality])
> else
> @@ -680,6 +706,8 @@
> printing ${abi_cv_print}
> spell checking ${abi_cv_spell}
> status bar ${abi_cv_statusbar}
> + emacs keybinding ${abi_cv_emacs_keybinding}
> + vi keybinding ${abi_cv_vi_keybinding}
>
> Optional dependencies:
> libgnomeui ${abi_cv_gnomeui}
>
> Modified: abiword/trunk/src/wp/ap/xp/Makefile.am
> ===================================================================
> --- abiword/trunk/src/wp/ap/xp/Makefile.am 2008-04-06 21:41:37 UTC (rev 23424)
> +++ abiword/trunk/src/wp/ap/xp/Makefile.am 2008-04-07 08:58:52 UTC (rev 23425)
> @@ -12,8 +12,26 @@
>
> # list all conditional source files here so they end up in the dist tarball
> conditional_src = \
> + ap_LB_Emacs.cpp \
> + ap_LB_EmacsCtrlX.cpp \
> + ap_LB_EmacsCtrlX.h \
> + ap_LB_Emacs.h \
> ap_Dialog_Spell.cpp \
> - ap_StatusBar.cpp
> + ap_StatusBar.cpp \
> + ap_LB_viEdit_c.cpp \
> + ap_LB_viEdit_c.h \
> + ap_LB_viEdit_colon.cpp \
> + ap_LB_viEdit_colon.h \
> + ap_LB_viEdit.cpp \
> + ap_LB_viEdit_d.cpp \
> + ap_LB_viEdit_d.h \
> + ap_LB_viEdit.h \
> + ap_LB_viEdit_r.cpp \
> + ap_LB_viEdit_r.h \
> + ap_LB_viEdit_y.cpp \
> + ap_LB_viEdit_y.h \
> + ap_LB_viInput.cpp \
> + ap_LB_viInput.h
>
> if ENABLE_SPELL
> spell_src = ap_Dialog_Spell.cpp
> @@ -23,9 +41,37 @@
> statusbar_src = ap_StatusBar.cpp
> endif
>
> +if ENABLE_EMACS_KEYBINDING
> +emacs_keybinding_src = \
> + ap_LB_Emacs.cpp \
> + ap_LB_EmacsCtrlX.cpp \
> + ap_LB_EmacsCtrlX.h \
> + ap_LB_Emacs.h
> +endif
> +
> +if ENABLE_VI_KEYBINDING
> +vi_keybinding_src = \
> + ap_LB_viEdit_c.cpp \
> + ap_LB_viEdit_c.h \
> + ap_LB_viEdit_colon.cpp \
> + ap_LB_viEdit_colon.h \
> + ap_LB_viEdit.cpp \
> + ap_LB_viEdit_d.cpp \
> + ap_LB_viEdit_d.h \
> + ap_LB_viEdit.h \
> + ap_LB_viEdit_r.cpp \
> + ap_LB_viEdit_r.h \
> + ap_LB_viEdit_y.cpp \
> + ap_LB_viEdit_y.h \
> + ap_LB_viInput.cpp \
> + ap_LB_viInput.h
> +endif
> +
> libxp_la_SOURCES = \
> $(spell_src) \
> $(statusbar_src) \
> + $(emacs_keybinding_src) \
> + $(vi_keybinding_src) \
> ap_App.cpp \
> ap_App.h \
> ap_Args.cpp \
> @@ -136,24 +182,6 @@
> ap_LB_DeadTilde.h \
> ap_LB_Default.cpp \
> ap_LB_Default.h \
> - ap_LB_Emacs.cpp \
> - ap_LB_EmacsCtrlX.cpp \
> - ap_LB_EmacsCtrlX.h \
> - ap_LB_Emacs.h \
> - ap_LB_viEdit_c.cpp \
> - ap_LB_viEdit_c.h \
> - ap_LB_viEdit_colon.cpp \
> - ap_LB_viEdit_colon.h \
> - ap_LB_viEdit.cpp \
> - ap_LB_viEdit_d.cpp \
> - ap_LB_viEdit_d.h \
> - ap_LB_viEdit.h \
> - ap_LB_viEdit_r.cpp \
> - ap_LB_viEdit_r.h \
> - ap_LB_viEdit_y.cpp \
> - ap_LB_viEdit_y.h \
> - ap_LB_viInput.cpp \
> - ap_LB_viInput.h \
> ap_LeftRuler.cpp \
> ap_LeftRuler.h \
> ap_LoadBindings.cpp \
>
> Modified: abiword/trunk/src/wp/ap/xp/ap_LoadBindings.cpp
> ===================================================================
> --- abiword/trunk/src/wp/ap/xp/ap_LoadBindings.cpp 2008-04-06 21:41:37 UTC (rev 23424)
> +++ abiword/trunk/src/wp/ap/xp/ap_LoadBindings.cpp 2008-04-07 08:58:52 UTC (rev 23425)
> @@ -1,3 +1,5 @@
> +/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
> +
> /* AbiWord
> * Copyright (C) 1998 AbiSource, Inc.
> *
> @@ -25,21 +27,16 @@
> // ********************************************************************************
> // ********************************************************************************
>
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> #include "ut_assert.h"
> #include "ut_types.h"
> #include "ut_string.h"
> #include "ev_EditBinding.h"
> #include "ap_LoadBindings.h"
> #include "ap_LB_Default.h"
> -#include "ap_LB_Emacs.h"
> -#include "ap_LB_EmacsCtrlX.h"
> -#include "ap_LB_viEdit.h"
> -#include "ap_LB_viEdit_colon.h"
> -#include "ap_LB_viEdit_c.h"
> -#include "ap_LB_viEdit_d.h"
> -#include "ap_LB_viEdit_r.h"
> -#include "ap_LB_viEdit_y.h"
> -#include "ap_LB_viInput.h"
> #include "ap_LB_DeadAbovedot.h"
> #include "ap_LB_DeadAcute.h"
> #include "ap_LB_DeadBreve.h"
> @@ -53,6 +50,21 @@
> #include "ap_LB_DeadOgonek.h"
> #include "ap_LB_DeadTilde.h"
>
> +#ifdef ENABLE_EMACS_KEYBINDING
> +#include "ap_LB_Emacs.h"
> +#include "ap_LB_EmacsCtrlX.h"
> +#endif
> +
> +#ifdef ENABLE_VI_KEYBINDING
> +#include "ap_LB_viEdit.h"
> +#include "ap_LB_viEdit_colon.h"
> +#include "ap_LB_viEdit_c.h"
> +#include "ap_LB_viEdit_d.h"
> +#include "ap_LB_viEdit_r.h"
> +#include "ap_LB_viEdit_y.h"
> +#include "ap_LB_viInput.h"
> +#endif
> +
> /****************************************************************/
> /****************************************************************/
> c_lb::c_lb(bool bCycle, const char * name, ap_LoadBindings_pFn pFn, EV_EditBindingMap * pebm ) :
> @@ -127,30 +139,32 @@
> void AP_BindingSet::loadBuiltin(void)
> {
>
> - m_vecBindings.addItem(new c_lb(true,"default",ap_LoadBindings_Default,NULL)); // stock AbiWord bindings
> - m_vecBindings.addItem(new c_lb(true, "emacs",ap_LoadBindings_Emacs, NULL)); // emacs key bindings
> - m_vecBindings.addItem(new c_lb(false, "emacsctrlx",ap_LoadBindings_EmacsCtrlX, NULL)); // emacs ctrl-x key bindings
> -
> - m_vecBindings.addItem(new c_lb(true, "viEdit",ap_LoadBindings_viEdit,NULL)); // vi Edit-Mode bindings
> - m_vecBindings.addItem(new c_lb(false, "viEdit_colon", ap_LoadBindings_viEdit_colon, NULL)); // vi Edit-Mode :-prefix key bindings
> + m_vecBindings.addItem(new c_lb(true, "default", ap_LoadBindings_Default, NULL)); // stock AbiWord bindings
> +#ifdef ENABLE_EMACS_KEYBINDING
> + m_vecBindings.addItem(new c_lb(true, "emacs", ap_LoadBindings_Emacs, NULL)); // emacs key bindings
> + m_vecBindings.addItem(new c_lb(false, "emacsctrlx", ap_LoadBindings_EmacsCtrlX, NULL)); // emacs ctrl-x key bindings
> +#endif
> +#ifdef ENABLE_VI_KEYBINDING
> + m_vecBindings.addItem(new c_lb(true, "viEdit", ap_LoadBindings_viEdit, NULL)); // vi Edit-Mode bindings
> + m_vecBindings.addItem(new c_lb(false, "viEdit_colon", ap_LoadBindings_viEdit_colon, NULL)); // vi Edit-Mode :-prefix key bindings
> m_vecBindings.addItem(new c_lb(false, "viEdit_c", ap_LoadBindings_viEdit_c, NULL)); // vi Edit-Mode c-prefix key bindings
> m_vecBindings.addItem(new c_lb(false, "viEdit_d", ap_LoadBindings_viEdit_d, NULL)); // vi Edit-Mode d-prefix key bindings
> m_vecBindings.addItem(new c_lb(false, "viEdit_y", ap_LoadBindings_viEdit_y, NULL)); // vi Edit-Mode y-prefix key bindings
> m_vecBindings.addItem(new c_lb(false, "viEdit_r", ap_LoadBindings_viEdit_r, NULL)); // vi Edit-Mode r-prefix key bindings
> m_vecBindings.addItem(new c_lb(false, "viInput", ap_LoadBindings_viInput, NULL)); // vi Input-Mode bindings
> -
> +#endif
> m_vecBindings.addItem(new c_lb(false, "deadabovedot", ap_LoadBindings_DeadAbovedot, NULL)); // subordinate maps for 'dead'
> - m_vecBindings.addItem(new c_lb(false, "deadacute", ap_LoadBindings_DeadAcute, NULL)); // key prefixes.
> - m_vecBindings.addItem(new c_lb(false, "deadbreve", ap_LoadBindings_DeadBreve, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadcaron", ap_LoadBindings_DeadCaron, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadacute", ap_LoadBindings_DeadAcute, NULL)); // key prefixes.
> + m_vecBindings.addItem(new c_lb(false, "deadbreve", ap_LoadBindings_DeadBreve, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadcaron", ap_LoadBindings_DeadCaron, NULL));
> m_vecBindings.addItem(new c_lb(false, "deadcedilla", ap_LoadBindings_DeadCedilla, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadcircumflex", ap_LoadBindings_DeadCircumflex, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deaddiaeresis", ap_LoadBindings_DeadDiaeresis, NULL));
> -m_vecBindings.addItem(new c_lb(false, "deaddoubleacute", ap_LoadBindings_DeadDoubleacute, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadgrave", ap_LoadBindings_DeadGrave, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadmacron", ap_LoadBindings_DeadMacron, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadogonek", ap_LoadBindings_DeadOgonek, NULL));
> - m_vecBindings.addItem(new c_lb(false, "deadtilde", ap_LoadBindings_DeadTilde, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadcircumflex", ap_LoadBindings_DeadCircumflex, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deaddiaeresis", ap_LoadBindings_DeadDiaeresis, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deaddoubleacute", ap_LoadBindings_DeadDoubleacute, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadgrave", ap_LoadBindings_DeadGrave, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadmacron", ap_LoadBindings_DeadMacron, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadogonek", ap_LoadBindings_DeadOgonek, NULL));
> + m_vecBindings.addItem(new c_lb(false, "deadtilde", ap_LoadBindings_DeadTilde, NULL));
> }
>
> EV_EditBindingMap * AP_BindingSet::getMap(const char * szName)
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
Received on Mon Apr 7 12:12:29 2008

This archive was generated by hypermail 2.1.8 : Mon Apr 07 2008 - 12:12:29 CEST