1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/97140cfdeca7/
Changeset: 97140cfdeca7
User: kehoea
Date: 2017-06-28 21:41:35+00:00
Summary: Move #'char-width to C, implement it in terms of ichar_columns().
src/ChangeLog addition:
2017-06-28 Aidan Kehoe <kehoea(a)parhasard.net>
* text.c (Fchar_width):
* text.c (syms_of_text):
Move #'char-width to C, to allow it to be implemented in terms of
ichar_columns(), since with unicode-internal (charset-width
(char-charset X)) can now error.
lisp/ChangeLog addition:
2017-06-28 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (char-width): Move this to C, necessary as part of the
unicode-internal support.
Affected #: 4 files
diff -r b803128e420963ce405b3ac51c7f9a80183c496b -r
97140cfdeca785747a13192343cf357ea21a3dc1 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-28 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (char-width): Move this to C, necessary as part of the
+ unicode-internal support.
+
2017-05-30 Aidan Kehoe <kehoea(a)parhasard.net>
* about.el (about-xemacs):
diff -r b803128e420963ce405b3ac51c7f9a80183c496b -r
97140cfdeca785747a13192343cf357ea21a3dc1 lisp/subr.el
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1076,10 +1076,6 @@
simply returns the length of the string."
(reduce #'+ (the string string) :initial-value 0 :key #'char-width))
-(defun char-width (character)
- "Return number of columns a CHARACTER occupies when displayed."
- (charset-width (char-charset character)))
-
;; The following several functions are useful in GNU Emacs 20 because
;; of the multibyte "characters" the internal representation of which
;; leaks into Lisp. In XEmacs/Mule they are trivial and unnecessary.
diff -r b803128e420963ce405b3ac51c7f9a80183c496b -r
97140cfdeca785747a13192343cf357ea21a3dc1 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2017-06-28 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * text.c (Fchar_width):
+ * text.c (syms_of_text):
+ Move #'char-width to C, to allow it to be implemented in terms of
+ ichar_columns(), since with unicode-internal (charset-width
+ (char-charset X)) can now error.
+
2017-05-30 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (vars_of_emacs):
diff -r b803128e420963ce405b3ac51c7f9a80183c496b -r
97140cfdeca785747a13192343cf357ea21a3dc1 src/text.c
--- a/src/text.c
+++ b/src/text.c
@@ -5950,6 +5950,17 @@
return list2 (XCHARSET_NAME (charset), make_fixnum (c1));
}
+DEFUN ("char-width", Fchar_width, 1, 1, 0, /*
+Return number of columns a CHARACTER occupies when displayed.
+*/
+ (character))
+{
+ CHECK_CHAR_COERCE_INT (character);
+
+ /* #### Consider having this take a graphical context--a buffer or frame or
+ #### whatever. Ditto with #'string-width. */
+ return make_fixnum (ichar_columns (XCHAR (character)));
+}
/************************************************************************/
/* composite character functions */
@@ -6057,6 +6068,7 @@
DEFSUBR (Fchar_charset);
DEFSUBR (Fchar_octet);
DEFSUBR (Fsplit_char);
+ DEFSUBR (Fchar_width);
/* Qfail, Qsubstitute, Qsucceed in general.c */
DEFSYMBOL (Qsubstitute_negated); /* #### what's this used for? */
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.