Commit 92c15c34 authored by Kenichi Handa's avatar Kenichi Handa

Sync to HEAD.

parent 7fb0741b
......@@ -324,7 +324,7 @@ detailed meanings of these arguments."
(insert "Number of contained characters: ")
(dotimes (i (charset-dimension charset))
(unless (= i 0)
(insert ?×))
(insert ?x))
(insert (format "%d" (charset-chars charset (1+ i)))))
(insert ?\n)
(let ((char (charset-iso-final-char charset)))
......@@ -398,7 +398,7 @@ detailed meanings of these arguments."
(format "%s:%s, and also used by the following:"
(car charset)
(charset-description (car charset)))
"no initial designation, and used by the followings:"))
"no initial designation, and used by the following:"))
(t
"invalid designation information"))))
(when (listp charset)
......@@ -646,7 +646,7 @@ Priority order for recognizing coding systems when reading files:\n")
(setq codings (cons x codings))))
(get (car categories) 'coding-systems))
(if codings
(let ((max-col (frame-width))
(let ((max-col (window-width))
pos)
(princ (format "\
The following are decoded correctly but recognized as %s:\n "
......@@ -784,7 +784,7 @@ but still contains full information about each coding system."
## EOL = 0 (LF), 1 (CRLF), 2 (CR), or 3 (Automatic detection)
## FLAGS =
## if TYPE = 2 then
## comma (`,') separated data of the followings:
## comma (`,') separated data of the following:
## G0, G1, G2, G3, SHORT-FORM, ASCII-EOL, ASCII-CNTL, SEVEN,
## LOCKING-SHIFT, SINGLE-SHIFT, USE-ROMAN, USE-OLDJIS, NO-ISO6429
## else if TYPE = 4 then
......@@ -1269,7 +1269,5 @@ character)")
(provide 'mule-diag)
;; Local Variables:
;; coding: utf-8
;; End:
;;; arch-tag: cd3b607c-2893-45a0-a4fa-a6535754dbee
;;; mule-diag.el ends here
......@@ -42,6 +42,15 @@ Boston, MA 02111-1307, USA. */
#include "intervals.h"
#include "fontset.h"
#include "window.h"
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
#endif
#ifdef WINDOWSNT
#include "w32term.h"
#endif
#ifdef MAC_OS
#include "macterm.h"
#endif
#undef xassert
#ifdef FONTSET_DEBUG
......@@ -1698,9 +1707,16 @@ If the named font is not yet loaded, return nil. */)
}
/* Return the font name for the character at POSITION in the current
/* Return a cons (FONT-NAME . GLYPH-CODE).
FONT-NAME is the font name for the character at POSITION in the current
buffer. This is computed from all the text properties and overlays
that apply to POSITION. It returns nil in the following cases:
that apply to POSITION.
GLYPH-CODE is the glyph code in the font to use for the character.
If the 2nd optional arg CH is non-nil, it is a character to check
the font instead of the character at POSITION.
It returns nil in the following cases:
(1) The window system doesn't have a font for the character (thus
it is displayed by an empty box).
......@@ -1714,10 +1730,10 @@ If the named font is not yet loaded, return nil. */)
POSITION is currently not visible. */
DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 1, 0,
DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
doc: /* For internal use only. */)
(position)
Lisp_Object position;
(position, ch)
Lisp_Object position, ch;
{
int pos, pos_byte, dummy;
int face_id;
......@@ -1734,7 +1750,13 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 1, 0,
if (pos < BEGV || pos >= ZV)
args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
pos_byte = CHAR_TO_BYTE (pos);
c = FETCH_CHAR (pos_byte);
if (NILP (ch))
c = FETCH_CHAR (pos_byte);
else
{
CHECK_CHARACTER (ch);
c = XINT (ch);
}
window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
if (NILP (window))
return Qnil;
......@@ -1749,9 +1771,26 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 1, 0,
charset_id = -1;
rfont_def = fontset_font (FONTSET_FROM_ID (face->fontset),
c, face, charset_id);
return (VECTORP (rfont_def) && STRINGP (AREF (rfont_def, 3))
? AREF (rfont_def, 3)
: Qnil);
if (VECTORP (rfont_def) && STRINGP (AREF (rfont_def, 3)))
{
Lisp_Object font_def;
struct font_info *fontp;
struct charset *charset;
XChar2b char2b;
int code;
font_def = AREF (rfont_def, 2);
charset = CHARSET_FROM_ID (XINT (AREF (font_def, 1)));
code = ENCODE_CHAR (charset, c);
if (code == CHARSET_INVALID_CODE (charset))
return (Fcons (AREF (rfont_def, 3), Qnil));
STORE_XCHAR2B (&char2b, ((code >> 8) & 0xFF), (code & 0xFF));
fontp = (*get_font_info_func) (f, XINT (AREF (rfont_def, 1)));
rif->encode_char (c, &char2b, fontp, charset, NULL);
code = (XCHAR2B_BYTE1 (&char2b) << 8) | XCHAR2B_BYTE2 (&char2b);
return (Fcons (AREF (rfont_def, 3), make_number (code)));
}
return Qnil;
}
......@@ -2096,3 +2135,6 @@ at the vertical center of lines. */);
defsubr (&Sfontset_list_all);
#endif
}
/* arch-tag: ea861585-2f5f-4e5b-9849-d04a9c3a3537
(do not change this comment) */
......@@ -238,3 +238,6 @@ extern Lisp_Object fontset_ascii P_ ((int));
extern int fontset_height P_ ((int));
#endif /* EMACS_FONTSET_H */
/* arch-tag: c27cef7b-3cab-488a-8398-7a4daa96bb77
(do not change this comment) */
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