+2012-03-13 Glenn Morris <rgm@gnu.org>
+
+ * calendar/calendar.el (calendar-string-spread):
+ Handle non-unit-width characters a bit better. (Bug#10978)
+
2012-03-13 Leo Liu <sdl.web@gmail.com>
* vc/vc-hg.el (vc-hg-working-revision): Rework to work with both
(if (< (length strings) 2)
(append (list "") strings (list ""))
strings)))
- (n (- length (length (apply 'concat strings))))
- (m (1- (length strings)))
+ (n (- length (string-width (apply 'concat strings))))
+ (m (* (1- (length strings)) (char-width char)))
(s (car strings))
(strings (cdr strings))
(i 0))
(make-string (max 0 (/ (+ n i) m)) char)
string)
i (1+ i)))
- (substring s 0 length)))
+ (truncate-string-to-width s length)))
(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."