]> git.lyx.org Git - lyx.git/blobdiff - src/kbmap.C
"Inter-word Space"
[lyx.git] / src / kbmap.C
index ee1e298527dd76f395aa26d4fd6ad19589f2789f..ba419f3be2109a1e93aff7cb334a05df3472c2de 100644 (file)
@@ -9,12 +9,8 @@
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "kbmap.h"
-#include "commandtags.h"
+#include "lfuns.h"
 #include "kbsequence.h"
 #include "debug.h"
 
@@ -45,7 +41,7 @@ string::size_type kb_keymap::bind(string const & seq, int action)
        if (lyxerr.debugging(Debug::KBMAP)) {
                lyxerr << "BIND: Sequence `"
                       << seq << "' Action `"
-                      << action << "'" << endl;
+                      << action << '\'' << endl;
        }
 
        kb_sequence k(0, 0);
@@ -77,8 +73,8 @@ int kb_keymap::lookup(LyXKeySymPtr key,
                key_modifier::state mask(cit->mod.second);
                key_modifier::state check =
                        static_cast<key_modifier::state>(mod & ~mask);
-               if (*(cit->code) == *(key) && cit->mod.first == check) {
+
+               if (*(cit->code) == *key && cit->mod.first == check) {
                        // match found
                        if (cit->table.get()) {
                                // this is a prefix key - set new map
@@ -115,7 +111,8 @@ string const kb_keymap::print() const
 void kb_keymap::defkey(kb_sequence * seq, int action, unsigned int r)
 {
        LyXKeySymPtr code = seq->sequence[r];
-       if ( ! code->isOK() ) return;
+       if (!code->isOK())
+               return;
 
        key_modifier::state const mod1 = seq->modifiers[r].first;
        key_modifier::state const mod2 = seq->modifiers[r].second;
@@ -176,9 +173,9 @@ string const kb_keymap::findbinding(int act, string const & prefix) const
                        res += cit->table->findbinding(act,
                                                       prefix
                                                       + printKey((*cit))
-                                                      + " ");
+                                                      + ' ');
                } else if (cit->action == act) {
-                       res += "[";
+                       res += '[';
                        res += prefix + printKey((*cit));
                        res += "] ";
                }