gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calendar hack: Displaying ISO weeks, update for emacs 22


From: Glenn Morris
Subject: Re: Calendar hack: Displaying ISO weeks, update for emacs 22
Date: Fri, 01 Dec 2006 15:48:09 -0800
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

This patch against the current CVS seems less intrusive, and will not
b0rk your display in the same way.


*** calendar.el 28 Oct 2006 21:53:34 -0000 1.192
--- calendar.el 1 Dec 2006 23:45:25 -0000
***************
*** 2093,2098 ****
--- 2093,2100 ----
         (generate-calendar-month month year (+ 5 (* 25 i)))
         (increment-calendar-month month year 1)))
  
+ (autoload 'calendar-iso-from-absolute "cal-iso")
+ 
  (defun generate-calendar-month (month year indent)
    "Produce a calendar for MONTH, YEAR on the Gregorian calendar.
  The calendar is inserted at the top of the buffer in which point is
    currently
***************
*** 2129,2136 ****
        (insert (format "%2d " i))
        (add-text-properties
         (- (point) 3) (1- (point))
!        '(mouse-face highlight
!         help-echo "mouse-2: menu of operations for this date"))
        (and (zerop (mod (+ i blank-days) 7))
             (/= i last)
             (calendar-insert-indented "" 0 t)    ;; Force onto
    following line
--- 2131,2141 ----
        (insert (format "%2d " i))
        (add-text-properties
         (- (point) 3) (1- (point))
!        `(mouse-face highlight
!          help-echo ,(format "ISO week: %2d " (extract-calendar-month
!                                 (calendar-iso-from-absolute
!                                  (calendar-absolute-from-gregorian
!                                   (list month i year)))))))
    operations for this date"))
        (and (zerop (mod (+ i blank-days) 7))
             (/= i last)
             (calendar-insert-indented "" 0 t)    ;; Force onto
    following line


reply via email to

[Prev in Thread] Current Thread [Next in Thread]