[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110207: * character.h (MAYBE_UNIFY_C
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110207: * character.h (MAYBE_UNIFY_CHAR): Remove. |
Date: |
Wed, 26 Sep 2012 13:00:29 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110207
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2012-09-26 13:00:29 -0700
message:
* character.h (MAYBE_UNIFY_CHAR): Remove.
* charset.c, charset.h (maybe_unify_char): Now static.
* charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
Since this stuff is now private to charset.c, there's no need for
a public macro and no need to inline by hand.
modified:
src/ChangeLog
src/character.h
src/charset.c
src/charset.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-26 15:19:10 +0000
+++ b/src/ChangeLog 2012-09-26 20:00:29 +0000
@@ -1,3 +1,11 @@
+2012-09-26 Paul Eggert <address@hidden>
+
+ * character.h (MAYBE_UNIFY_CHAR): Remove.
+ * charset.c, charset.h (maybe_unify_char): Now static.
+ * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
+ Since this stuff is now private to charset.c, there's no need for
+ a public macro and no need to inline by hand.
+
2012-09-26 Tomohiro Matsuyama <address@hidden>
Stefan Monnier <address@hidden>
Juanma Barranquero <address@hidden>
=== modified file 'src/character.h'
--- a/src/character.h 2012-08-26 08:41:36 +0000
+++ b/src/character.h 2012-09-26 20:00:29 +0000
@@ -554,23 +554,6 @@
} while (0)
-/* If C is a character to be unified with a Unicode character, return
- the unified Unicode character. */
-
-#define MAYBE_UNIFY_CHAR(c) \
- do { \
- if (c > MAX_UNICODE_CHAR && c <= MAX_5_BYTE_CHAR) \
- { \
- Lisp_Object val; \
- val = CHAR_TABLE_REF (Vchar_unify_table, c); \
- if (INTEGERP (val)) \
- c = XFASTINT (val); \
- else if (! NILP (val)) \
- c = maybe_unify_char (c, val); \
- } \
- } while (0)
-
-
/* Return a non-outlandish value for the tab width. */
#define SANE_TAB_WIDTH(buf) \
=== modified file 'src/charset.c'
--- a/src/charset.c 2012-09-15 07:06:56 +0000
+++ b/src/charset.c 2012-09-26 20:00:29 +0000
@@ -1617,7 +1617,7 @@
/* Return a unified character code for C (>= 0x110000). VAL is a
value of Vchar_unify_table for C; i.e. it is nil, an integer, or a
charset symbol. */
-int
+static int
maybe_unify_char (int c, Lisp_Object val)
{
struct charset *charset;
@@ -1723,8 +1723,12 @@
{
c = char_index + CHARSET_CODE_OFFSET (charset);
if (CHARSET_UNIFIED_P (charset)
- && c > MAX_UNICODE_CHAR)
- MAYBE_UNIFY_CHAR (c);
+ && MAX_UNICODE_CHAR < c && c <= MAX_5_BYTE_CHAR)
+ {
+ /* Unify C with a Unicode character if possible. */
+ Lisp_Object val = CHAR_TABLE_REF (Vchar_unify_table, c);
+ c = maybe_unify_char (c, val);
+ }
}
}
=== modified file 'src/charset.h'
--- a/src/charset.h 2012-08-27 16:19:34 +0000
+++ b/src/charset.h 2012-09-26 20:00:29 +0000
@@ -538,7 +538,6 @@
extern struct charset *char_charset (int, Lisp_Object, unsigned *);
extern Lisp_Object charset_attributes (int);
-extern int maybe_unify_char (int, Lisp_Object);
extern int decode_char (struct charset *, unsigned);
extern unsigned encode_char (struct charset *, int);
extern int string_xstring_p (Lisp_Object);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110207: * character.h (MAYBE_UNIFY_CHAR): Remove.,
Paul Eggert <=