Commits

Anonymous committed 3c9f311

committing fixes for bugs found by Dr. Volker Zell

Comments (0)

Files changed (8)

+2007-07-10  Jeff Miller  <jeff.miller@xemacs.org>
+
+	* cal-coptic.el (coptic-prompt-for-date): fix typo
+	(cal-assoc-ignore -> cal-assoc-string) 
+	* cal-dst.el, cal-html.el,
+	cal-tex.el, icalendar.el: indentation fixes.
+
+	* calendar.el: added autoload for calendar-goto-bahai-date
+	* diary-lib.el (diary-mode): use make-hook-local to really make
+	after-save-hook buffer local
+
 2007-04-16  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.32 released.
                    (calendar-absolute-from-gregorian today))))))
          (completion-ignore-case t)
          ;; XEmacs change, we don't have assoc-string
-         (month (cdr (cal-assoc-ignore
+         (month (cdr (cal-assoc-string
                       (completing-read
                        (format "%s calendar month name: " coptic-name)
                        (mapcar 'list
 current date apply to all years.  This is faster, but not always
 correct, since the dates of daylight saving transitions sometimes
 change."
-:type 'boolean
-:version "22.1"
-:group 'calendar)
+  :type 'boolean
+  :version "22.1"
+  :group 'calendar)
 
 (defvar calendar-current-time-zone-cache nil
   "Cache for result of `calendar-current-time-zone'.")
 
 (defgroup calendar-html nil
   "Options for HTML calendars."
-:prefix "cal-html-"
-:group 'calendar)
+  :prefix "cal-html-"
+  :group 'calendar)
 
 (defcustom cal-html-directory "~/public_html"
   "Directory for HTML pages generated by cal-html."
-:type 'string
-:group 'calendar-html)
+  :type 'string
+  :group 'calendar-html)
 
 (defcustom cal-html-print-day-number-flag nil
   "Non-nil means print the day-of-the-year number in the monthly cal-html page."
-:type 'boolean
-:group 'calendar-html)
+  :type 'boolean
+  :group 'calendar-html)
 
 (defcustom cal-html-year-index-cols 3
   "Number of columns in the cal-html yearly index page."
-:type 'integer
-:group 'calendar-html)
+  :type 'integer
+  :group 'calendar-html)
 
 (defcustom cal-html-day-abbrev-array
   (calendar-abbrev-construct calendar-day-abbrev-array
                              calendar-day-name-array)
   "Array of seven strings for abbreviated day names (starting with Sunday)."
-:type '(vector string string string string string string string)
-:group 'calendar-html)
+  :type '(vector string string string string string string string)
+  :group 'calendar-html)
 
 (defcustom cal-html-css-default
   (concat
    "  SPAN.BLOCK    { color: #048; font-style: italic; }\n"
    "</STYLE>\n\n")
   "Default cal-html css style.  You can override this with a \"cal.css\" file."
-:type 'string
-:group 'calendar-html)
+  :type 'string
+  :group 'calendar-html)
 
 ;;; End customizable variables.
 
 
 (defcustom cal-tex-rules nil
   "*If t, pages will be ruled in some styles."
-:type 'boolean
-:group 'calendar-tex)
+  :type 'boolean
+  :group 'calendar-tex)
 
 (defcustom cal-tex-daily-string
   '(let* ((year (extract-calendar-year date))
   "A string giving extra LaTeX commands to insert in the calendar preamble.
 For example, to include extra packages:
 \"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"."
-:type 'string
-:group 'calendar-tex
-:version "22.1")
+  :type 'string
+  :group 'calendar-tex
+  :version "22.1")
 
 (defcustom cal-tex-hook nil
   "*List of functions called after any LaTeX calendar buffer is generated.
 characters with diacritical marks to their LaTeX equivalents, use
      (add-hook 'cal-tex-hook
                '(lambda () (iso-iso2tex (point-min) (point-max))))"
-:type 'hook
-:group 'calendar-tex)
+  :type 'hook
+  :group 'calendar-tex)
 
 (defcustom cal-tex-year-hook nil
   "*List of functions called after a LaTeX year calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+  :type 'hook
+  :group 'calendar-tex)
 
 (defcustom cal-tex-month-hook nil
   "*List of functions called after a LaTeX month calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+  :type 'hook
+  :group 'calendar-tex)
 
 (defcustom cal-tex-week-hook nil
   "*List of functions called after a LaTeX week calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+  :type 'hook
+  :group 'calendar-tex)
 
 (defcustom cal-tex-daily-hook nil
   "*List of functions called after a LaTeX daily calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+  :type 'hook
+  :group 'calendar-tex)
 
 ;;;
 ;;; Definitions for LaTeX code
   (insert ", ")
   (cal-tex-large-bf (cal-tex-month-name month))
   (insert " ")
+
   (cal-tex-large-bf (number-to-string day))
   (if (not (string= "" (cal-tex-latexify-list holidays date)))
       (progn
    "Move cursor to Persian date."
    t)
 
+(autoload 'calendar-goto-bahai-date "cal-bahai"
+   "Move cursor to Baha'i date."
+   t)
+
 (autoload 'calendar-print-persian-date "cal-persia"
  "Show the Persian date equivalents of date."
  t)
   (set (make-local-variable 'font-lock-defaults)
        '(diary-font-lock-keywords t))
   (add-to-invisibility-spec '(diary . nil))
+  ;; XEmacs change - the "local" option for add-hook does not work the
+  ;; same as Emacs, we need to use make-local-hook to make the hook
+  ;; local.
+  (make-local-hook 'after-save-hook)
   (add-hook 'after-save-hook 'diary-redraw-calendar nil t)
   (if diary-header-line-flag
       (setq header-line-format diary-header-line-format)))
 ;; ======================================================================
 (defgroup icalendar nil
   "Icalendar support."
-:prefix "icalendar-"
-:group 'calendar)
+  :prefix "icalendar-"
+  :group 'calendar)
 
 (defcustom icalendar-import-format
   "%s%d%l%o"
 %s Summary, see `icalendar-import-format-summary'
 %t Status, see `icalendar-import-format-status'
 %u URL, see `icalendar-import-format-url'"
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-summary
   "%s"
   "Format string defining how the summary element is formatted.
 This applies only if the summary is not empty! `%s' is replaced
 by the summary."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-description
   "\n Desc: %s"
   "Format string defining how the description element is formatted.
 This applies only if the description is not empty! `%s' is
 replaced by the description."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-location
   "\n Location: %s"
   "Format string defining how the location element is formatted.
 This applies only if the location is not empty! `%s' is replaced
 by the location."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-organizer
   "\n Organizer: %s"
   "Format string defining how the organizer element is formatted.
 This applies only if the organizer is not empty! `%s' is
 replaced by the organizer."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-url
   "\n URL: %s"
   "Format string defining how the URL element is formatted.
 This applies only if the URL is not empty! `%s' is replaced by
 the URL."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-status
   "\n Status: %s"
   "Format string defining how the status element is formatted.
 This applies only if the status is not empty! `%s' is replaced by
 the status."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defcustom icalendar-import-format-class
   "\n Class: %s"
   "Format string defining how the class element is formatted.
 This applies only if the class is not empty! `%s' is replaced by
 the class."
-:type 'string
-:group 'icalendar)
+  :type 'string
+  :group 'icalendar)
 
 (defvar icalendar-debug nil
   "Enable icalendar debug messages.")