diff lisp/subr.el @ 772:d682c0f82a71

[xemacs-hg @ 2002-03-13 10:00:06 by ben] a few bytecomp warning fixes, run autoconf just in case
author ben
date Wed, 13 Mar 2002 10:00:09 +0000
parents 943eaba38521
children e65d9cf16707
line wrap: on
line diff
--- a/lisp/subr.el	Wed Mar 13 08:54:06 2002 +0000
+++ b/lisp/subr.el	Wed Mar 13 10:00:09 2002 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc.
 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
 ;; Copyright (C) 1995 Sun Microsystems.
-;; Copyright (C) 2000, 2001 Ben Wing.
+;; Copyright (C) 2000, 2001, 2002 Ben Wing.
 
 ;; Maintainer: XEmacs Development Team
 ;; Keywords: extensions, dumped
@@ -516,9 +516,10 @@
       (let ((col 0)
 	    (len (length string))
 	    (i 0))
-	(while (< i len)
-	  (setq col (+ col (charset-width (char-charset (aref string i)))))
-	  (setq i (1+ i)))
+	(with-fboundp '(charset-width char-charset)
+	  (while (< i len)
+	    (setq col (+ col (charset-width (char-charset (aref string i)))))
+	    (setq i (1+ i))))
 	col)
     (length string)))