Mercurial > hg > xemacs-beta
diff src/keymap.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | 2b6fa2618f76 |
children | 79c6ff3eef26 |
line wrap: on
line diff
--- a/src/keymap.c Tue Jun 04 17:40:00 2002 +0000 +++ b/src/keymap.c Wed Jun 05 09:58:45 2002 +0000 @@ -440,8 +440,8 @@ "9" as its name. */ /* !!#### I'm not sure how correct this is. */ - Intbyte str [1 + MAX_EMCHAR_LEN]; - Bytecount count = set_charptr_emchar (str, XCHAR (keysym)); + Ibyte str [1 + MAX_ICHAR_LEN]; + Bytecount count = set_itext_ichar (str, XCHAR (keysym)); str[count] = 0; keysym = intern_int (str); } @@ -478,7 +478,7 @@ if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1) { Lisp_Object i_fart_on_gcc = - make_char (string_emchar (XSYMBOL (keysym)->name, 0)); + make_char (string_ichar (XSYMBOL (keysym)->name, 0)); keysym = i_fart_on_gcc; } @@ -654,7 +654,7 @@ /* If the keysym is a one-character symbol, use the char code instead. */ if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1) - keysym = make_char (string_emchar (XSYMBOL (keysym)->name, 0)); + keysym = make_char (string_ichar (XSYMBOL (keysym)->name, 0)); if (modifiers & XEMACS_MOD_META) /* Utterly hateful ESC lossage */ { @@ -1264,7 +1264,7 @@ if (string_char_length (XSYMBOL (*keysym)->name) == 1) { Lisp_Object ream_gcc_up_the_ass = - make_char (string_emchar (XSYMBOL (*keysym)->name, 0)); + make_char (string_ichar (XSYMBOL (*keysym)->name, 0)); *keysym = ream_gcc_up_the_ass; goto fixnum_keysym; } @@ -1291,7 +1291,7 @@ if (SYMBOLP (*keysym)) { - Intbyte *name = XSTRING_DATA (XSYMBOL (*keysym)->name); + Ibyte *name = XSTRING_DATA (XSYMBOL (*keysym)->name); /* FSFmacs uses symbols with the printed representation of keysyms in their names, like 'M-x, and we use the syntax '(meta x). So, to avoid @@ -1899,7 +1899,7 @@ struct key_data raw_key2; if (STRINGP (keys)) - c = make_char (string_emchar (keys, idx)); + c = make_char (string_ichar (keys, idx)); else c = XVECTOR_DATA (keys) [idx]; @@ -2225,7 +2225,7 @@ for (i = 0; i < length; i++) { - Emchar n = string_emchar (keys, i); + Ichar n = string_ichar (keys, i); define_key_parser (make_char (n), &(raw_keys[i])); } return raw_lookup_key (keymap, raw_keys, length, 0, @@ -2922,8 +2922,8 @@ /* otherwise, string-sort them. */ { - Intbyte *s1 = XSTRING_DATA (XSYMBOL (obj1)->name); - Intbyte *s2 = XSTRING_DATA (XSYMBOL (obj2)->name); + Ibyte *s1 = XSTRING_DATA (XSYMBOL (obj1)->name); + Ibyte *s2 = XSTRING_DATA (XSYMBOL (obj2)->name); return 0 > qxestrcmp (s1, s2) ? 1 : -1; } } @@ -3240,7 +3240,7 @@ { Lisp_Object s2 = Fsingle_key_description (STRINGP (keys) - ? make_char (string_emchar (keys, i)) + ? make_char (string_ichar (keys, i)) : XVECTOR_DATA (keys)[i]); if (i == 0) @@ -3338,12 +3338,12 @@ */ (chr)) { - Intbyte buf[200]; - Intbyte *p; - Emchar c; + Ibyte buf[200]; + Ibyte *p; + Ichar c; Lisp_Object ctl_arrow = current_buffer->ctl_arrow; int ctl_p = !NILP (ctl_arrow); - Emchar printable_min = (CHAR_OR_CHAR_INTP (ctl_arrow) + Ichar printable_min = (CHAR_OR_CHAR_INTP (ctl_arrow) ? XCHAR_OR_CHAR_INT (ctl_arrow) : ((EQ (ctl_arrow, Qt) || NILP (ctl_arrow)) ? 256 : 160)); @@ -3366,7 +3366,7 @@ if (c >= printable_min) { - p += set_charptr_emchar (p, c); + p += set_itext_ichar (p, c); } else if (c < 040 && ctl_p) { @@ -3399,7 +3399,7 @@ } else { - p += set_charptr_emchar (p, c); + p += set_itext_ichar (p, c); } *p = 0; @@ -4149,7 +4149,7 @@ struct describe_map_closure describe_map_closure; Lisp_Object list = Qnil; struct buffer *buf = XBUFFER (buffer); - Emchar printable_min = (CHAR_OR_CHAR_INTP (buf->ctl_arrow) + Ichar printable_min = (CHAR_OR_CHAR_INTP (buf->ctl_arrow) ? XCHAR_OR_CHAR_INT (buf->ctl_arrow) : ((EQ (buf->ctl_arrow, Qt) || EQ (buf->ctl_arrow, Qnil)) @@ -4197,8 +4197,8 @@ if (SYMBOLP (keysym)) { Lisp_Object code = Fget (keysym, Vcharacter_set_property, Qnil); - Emchar c = (CHAR_OR_CHAR_INTP (code) - ? XCHAR_OR_CHAR_INT (code) : (Emchar) -1); + Ichar c = (CHAR_OR_CHAR_INTP (code) + ? XCHAR_OR_CHAR_INT (code) : (Ichar) -1); /* Calling Fsingle_key_description() would cons more */ #if 0 /* This is bogus */ if (EQ (keysym, QKlinefeed)) @@ -4417,7 +4417,7 @@ staticpro (&Vcurrent_global_map); - Vsingle_space_string = make_string ((const Intbyte *) " ", 1); + Vsingle_space_string = make_string ((const Ibyte *) " ", 1); staticpro (&Vsingle_space_string); }