changeset 14954:a9102c34a5b6

Fix length of separator string.
author Edward M. Reingold <reingold@emr.cs.iit.edu>
date Sun, 07 Apr 1996 22:31:50 +0000
parents 36e4b3043730
children da70e30f73b9
files lisp/calendar/diary-lib.el
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el	Sun Apr 07 16:44:38 1996 +0000
+++ b/lisp/calendar/diary-lib.el	Sun Apr 07 22:31:50 1996 +0000
@@ -176,6 +176,10 @@
   "Ethiopic calendar equivalent of date diary entry."
   t)
 
+(autoload 'diary-persian-date "cal-persian"
+  "Persian calendar equivalent of date diary entry."
+  t)
+
 (autoload 'diary-phases-of-moon "lunar" "Moon phases diary entry." t)
 
 (autoload 'diary-sunrise-sunset "solar"
@@ -478,11 +482,15 @@
                           d)))
                   (insert (if (= (point) (point-min)) "" ?\n) date-string)
                   (if date-holiday-list (insert ":  "))
-                  (let ((l (current-column)))
-                    (insert (mapconcat 'identity date-holiday-list
-                                       (concat "\n" (make-string l ? )))))
-                  (let ((l (current-column)))
-                    (insert ?\n (make-string l ?=) ?\n)))))
+                  (let* ((l (current-column))
+                         (longest 0))
+                    (insert (mapconcat '(lambda (x)
+                                          (if (< longest (length x))
+                                              (setq longest (length x)))
+                                          x)
+                                       date-holiday-list
+                                       (concat "\n" (make-string l ? ))))
+                    (insert ?\n (make-string (+ l longest) ?=) ?\n)))))
           (if (< 0 (length (car (cdr (car entry-list)))))
               (insert (car (cdr (car entry-list))) ?\n))
           (setq entry-list (cdr entry-list))))