1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-08 20:58:58 +00:00

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.
This commit is contained in:
Juanma Barranquero 2011-03-29 00:41:01 +02:00
parent f6d6298639
commit 461c2ab9a5
10 changed files with 31 additions and 22 deletions

View File

@ -1,3 +1,19 @@
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.
@ -43,7 +59,7 @@
* nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
2011-03-27 Anders Lindgren <andlind@gmail.com>
2011-03-27 Anders Lindgren <andlind@gmail.com>
* nsterm.m (ns_menu_bar_is_hidden): New variable.
(ns_constrain_all_frames, ns_menu_bar_should_be_hidden)

View File

@ -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;

View File

@ -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. */

View File

@ -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)

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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
{

View File

@ -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);
}
}