From 461c2ab9a5a244ec9a1b253d07c1a8bdfbd8c573 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 29 Mar 2011 00:41:01 +0200 Subject: [PATCH] src/*.c: Remove some additional unused parameters. * lisp.h (multibyte_char_to_unibyte): * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. * character.h (CHAR_TO_BYTE8): * cmds.c (internal_self_insert): * editfns.c (general_insert_function): * keymap.c (push_key_description): * search.c (Freplace_match): * xdisp.c (message_dolog, set_message_1): All callers changed. * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. All callers changed. --- src/ChangeLog | 18 +++++++++++++++++- src/character.c | 7 ++----- src/character.h | 2 +- src/cmds.c | 2 +- src/coding.c | 7 +++---- src/editfns.c | 2 +- src/keymap.c | 2 +- src/lisp.h | 2 +- src/search.c | 7 ++----- src/xdisp.c | 4 ++-- 10 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index be55ef369b3..1e77a6439e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2011-03-28 Juanma Barranquero + + * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', + unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + All callers changed. + + * lisp.h (multibyte_char_to_unibyte): + * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', + unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + * character.h (CHAR_TO_BYTE8): + * cmds.c (internal_self_insert): + * editfns.c (general_insert_function): + * keymap.c (push_key_description): + * search.c (Freplace_match): + * xdisp.c (message_dolog, set_message_1): All callers changed. + 2011-03-28 Stefan Monnier * keyboard.c (safe_run_hook_funcall): New function. @@ -43,7 +59,7 @@ * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. -2011-03-27 Anders Lindgren +2011-03-27 Anders Lindgren * nsterm.m (ns_menu_bar_is_hidden): New variable. (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) diff --git a/src/character.c b/src/character.c index fdaf22f04f8..41c692e7483 100644 --- a/src/character.c +++ b/src/character.c @@ -232,13 +232,10 @@ translate_char (Lisp_Object table, int c) } /* Convert ASCII or 8-bit character C to unibyte. If C is none of - them, return (C & 0xFF). - - The argument REV_TBL is now ignored. It will be removed in the - future. */ + them, return (C & 0xFF). */ int -multibyte_char_to_unibyte (int c, Lisp_Object rev_tbl) +multibyte_char_to_unibyte (int c) { if (c < 0x80) return c; diff --git a/src/character.h b/src/character.h index 91020cadedc..7a75ac186fa 100644 --- a/src/character.h +++ b/src/character.h @@ -69,7 +69,7 @@ along with GNU Emacs. If not, see . */ #define CHAR_TO_BYTE8(c) \ (CHAR_BYTE8_P (c) \ ? (c) - 0x3FFF00 \ - : multibyte_char_to_unibyte (c, Qnil)) + : multibyte_char_to_unibyte (c)) /* Return the raw 8-bit byte for character C, or -1 if C doesn't correspond to a byte. */ diff --git a/src/cmds.c b/src/cmds.c index ebbb223c2db..1cf7ff24fec 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -352,7 +352,7 @@ internal_self_insert (int c, EMACS_INT n) { str[0] = (SINGLE_BYTE_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); len = 1; } if (!NILP (overwrite) diff --git a/src/coding.c b/src/coding.c index 0596d16bf46..fd812148a26 100644 --- a/src/coding.c +++ b/src/coding.c @@ -853,8 +853,7 @@ static unsigned char *alloc_destination (struct coding_system *, EMACS_INT, unsigned char *); static void setup_iso_safe_charsets (Lisp_Object); static unsigned char *encode_designation_at_bol (struct coding_system *, - int *, int *, - unsigned char *); + int *, unsigned char *); static int detect_eol (const unsigned char *, EMACS_INT, enum coding_category); static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); @@ -4299,7 +4298,7 @@ encode_invocation_designation (struct charset *charset, static unsigned char * encode_designation_at_bol (struct coding_system *coding, int *charbuf, - int *charbuf_end, unsigned char *dst) + unsigned char *dst) { struct charset *charset; /* Table of charsets to be designated to each graphic register. */ @@ -4390,7 +4389,7 @@ encode_coding_iso_2022 (struct coding_system *coding) unsigned char *dst_prev = dst; /* We have to produce designation sequences if any now. */ - dst = encode_designation_at_bol (coding, charbuf, charbuf_end, dst); + dst = encode_designation_at_bol (coding, charbuf, dst); bol_designation = 0; /* We are sure that designation sequences are all ASCII bytes. */ produced_chars += dst - dst_prev; diff --git a/src/editfns.c b/src/editfns.c index 009e1d34bde..b04414e1ae6 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2226,7 +2226,7 @@ general_insert_function (void (*insert_func) { str[0] = (ASCII_CHAR_P (XINT (val)) ? XINT (val) - : multibyte_char_to_unibyte (XINT (val), Qnil)); + : multibyte_char_to_unibyte (XINT (val))); len = 1; } (*insert_func) ((char *) str, len); diff --git a/src/keymap.c b/src/keymap.c index 440df06ba4e..10000b935aa 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2387,7 +2387,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi /* Now we are sure that C is a valid character code. */ if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! force_multibyte) - *p++ = multibyte_char_to_unibyte (c, Qnil); + *p++ = multibyte_char_to_unibyte (c); else p += CHAR_STRING (c, (unsigned char *) p); } diff --git a/src/lisp.h b/src/lisp.h index 1e255df1ecc..a3c4d48b49c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2403,7 +2403,7 @@ EXFUN (Fchar_width, 1); EXFUN (Fstring, MANY); extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT); extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT); -extern int multibyte_char_to_unibyte (int, Lisp_Object); +extern int multibyte_char_to_unibyte (int); extern int multibyte_char_to_unibyte_safe (int); extern void init_character_once (void); extern void syms_of_character (void); diff --git a/src/search.c b/src/search.c index 59a530eff61..682fa185bbb 100644 --- a/src/search.c +++ b/src/search.c @@ -2634,11 +2634,8 @@ since only regular expressions have distinguished subexpressions. */) EMACS_INT substed_alloc_size, substed_len; int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); int str_multibyte = STRING_MULTIBYTE (newtext); - Lisp_Object rev_tbl; int really_changed = 0; - rev_tbl = Qnil; - substed_alloc_size = length * 2 + 100; substed = (unsigned char *) xmalloc (substed_alloc_size + 1); substed_len = 0; @@ -2658,7 +2655,7 @@ since only regular expressions have distinguished subexpressions. */) { FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); if (!buf_multibyte) - c = multibyte_char_to_unibyte (c, rev_tbl); + c = multibyte_char_to_unibyte (c); } else { @@ -2681,7 +2678,7 @@ since only regular expressions have distinguished subexpressions. */) FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); if (!buf_multibyte && !ASCII_CHAR_P (c)) - c = multibyte_char_to_unibyte (c, rev_tbl); + c = multibyte_char_to_unibyte (c); } else { diff --git a/src/xdisp.c b/src/xdisp.c index 148c7bc5ec6..308588101e2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7962,7 +7962,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) c = string_char_and_length (msg + i, &char_bytes); work[0] = (ASCII_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); insert_1_both (work, 1, 1, 1, 0, 0); } } @@ -9223,7 +9223,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby c = string_char_and_length (msg + i, &n); work[0] = (ASCII_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); insert_1_both (work, 1, 1, 1, 0, 0); } } -- 2.39.5