emacs-devel
[Top][All Lists]
Advanced

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

Re: Towards a cleaner build: calendar


From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build: calendar
Date: Thu, 13 Jun 2019 02:18:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

22% of the remaining byte-compilation warnings (if we ignore CEDET; I
swoon every time I have a peek at it) are from calendar:

    78:calendar/cal-bahai.el:316:1:Warning: global/dynamic var `date' lacks a 
prefix
     82:calendar/cal-china.el:635:1:Warning: global/dynamic var `date' lacks a 
prefix
     83:calendar/cal-china.el:653:1:Warning: global/dynamic var `entry' lacks a 
prefix
     86:calendar/cal-coptic.el:171:1:Warning: global/dynamic var `date' lacks a 
prefix
     91:calendar/cal-french.el:246:1:Warning: global/dynamic var `date' lacks a 
prefix
     97:calendar/cal-hebrew.el:751:1:Warning: global/dynamic var `date' lacks a 
prefix
     98:calendar/cal-hebrew.el:759:1:Warning: global/dynamic var `entry' lacks a
    103:calendar/cal-islam.el:308:1:Warning: global/dynamic var `date' lacks a 
prefix
    107:calendar/cal-iso.el:132:1:Warning: global/dynamic var `date' lacks a 
prefix
    111:calendar/cal-julian.el:186:1:Warning: global/dynamic var `date' lacks a 
prefix
    115:calendar/cal-mayan.el:356:1:Warning: global/dynamic var `date' lacks a 
prefix
    121:calendar/cal-persia.el:199:1:Warning: global/dynamic var `date' lacks a 
prefix
    129:calendar/lunar.el:244:1:Warning: global/dynamic var `date' lacks a 
prefix

And they're apparently used to pass in values to specific functions; not
user-defined ones which are usually the problem with these things:

;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-bahai-date ()
  "Bahá’í calendar equivalent of date diary entry."
  (format "Bahá’í date: %s" (calendar-bahai-date-string date)))

;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-french-date ()
  "French calendar equivalent of date diary entry."
  (let ((f (calendar-french-date-string date)))
    (if (string-equal f "")
        "Date is pre-French Revolution"
      (format "French Revolutionary date: %s" f))))

So...  I'm probably missing something here, because can't we just change
the calling convention of these functions to take a `date' parameter?

I don't use the calendar myself, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

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