comparison lisp/calendar/cal-hebrew.el @ 92611:297952467e34

(mark-hebrew-calendar-date-pattern): Use zerop.
author Glenn Morris <rgm@gnu.org>
date Sat, 08 Mar 2008 04:24:24 +0000
parents f82da83f1b8a
children abf9226ae6c9
comparison
equal deleted inserted replaced
92610:6f4bd17c2adc 92611:297952467e34
1 ;;; cal-hebrew.el --- calendar functions for the Hebrew calendar 1 ;;; cal-hebrew.el --- calendar functions for the Hebrew calendar
2 2
3 ;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 3 ;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 ;; Free Software Foundation, Inc. 4 ;; 2008 Free Software Foundation, Inc.
5 5
6 ;; Author: Nachum Dershowitz <nachum@cs.uiuc.edu> 6 ;; Author: Nachum Dershowitz <nachum@cs.uiuc.edu>
7 ;; Edward M. Reingold <reingold@cs.uiuc.edu> 7 ;; Edward M. Reingold <reingold@cs.uiuc.edu>
8 ;; Maintainer: Glenn Morris <rgm@gnu.org> 8 ;; Maintainer: Glenn Morris <rgm@gnu.org>
9 ;; Keywords: calendar 9 ;; Keywords: calendar
597 (defun mark-hebrew-calendar-date-pattern (month day year) 597 (defun mark-hebrew-calendar-date-pattern (month day year)
598 "Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR. 598 "Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR.
599 A value of 0 in any position is a wildcard." 599 A value of 0 in any position is a wildcard."
600 (save-excursion 600 (save-excursion
601 (set-buffer calendar-buffer) 601 (set-buffer calendar-buffer)
602 (if (and (/= 0 month) (/= 0 day)) 602 (if (and (not (zerop month)) (not (zerop day)))
603 (if (/= 0 year) 603 (if (not (zerop year))
604 ;; Fully specified Hebrew date. 604 ;; Fully specified Hebrew date.
605 (let ((date (calendar-gregorian-from-absolute 605 (let ((date (calendar-gregorian-from-absolute
606 (calendar-absolute-from-hebrew 606 (calendar-absolute-from-hebrew
607 (list month day year))))) 607 (list month day year)))))
608 (if (calendar-date-is-visible-p date) 608 (if (calendar-date-is-visible-p date)