Commit 461c2ab9 authored by Juanma Barranquero's avatar Juanma Barranquero

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.
parent f6d62986
2011-03-28 Juanma Barranquero <lekktu@gmail.com>
* 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 <monnier@iro.umontreal.ca>
* keyboard.c (safe_run_hook_funcall): New function.
......@@ -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;
......
......@@ -69,7 +69,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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. */
......
......@@ -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)
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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
{
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment