summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward M. Reingold <reingold@emr.cs.iit.edu>1996-04-07 22:31:50 +0000
committerEdward M. Reingold <reingold@emr.cs.iit.edu>1996-04-07 22:31:50 +0000
commit754cfb691846c63687e7029f5edde32b7a1b893c (patch)
tree379223d01fb0f4294bc04e45cec32989ad729469
parentd928736d013c7735459b6c0b3698018ecc495efc (diff)
downloademacs-754cfb691846c63687e7029f5edde32b7a1b893c.tar.gz
Fix length of separator string.
-rw-r--r--lisp/calendar/diary-lib.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index b83a24494d9..7d09c1e0ceb 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -176,6 +176,10 @@ The holidays are those in the list `calendar-holidays'."
"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 @@ This function is provided for optional use as the `diary-display-hook'."
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))))