Prechádzať zdrojové kódy

silence byte compiler warnings about european-calendar-style

I've investigated further and defvaralias doesn't silence the warnings,
but "with-no-warnings" does.
Achim Gratz 14 rokov pred
rodič
commit
c4644b9e00
2 zmenil súbory, kde vykonal 6 pridanie a 4 odobranie
  1. 2 1
      lisp/org-agenda.el
  2. 4 3
      lisp/org.el

+ 2 - 1
lisp/org-agenda.el

@@ -7279,7 +7279,8 @@ the resulting entry will not be shown.  When TEXT is empty, switch to
       (let ((calendar-date-display-form
 	     (if (if (boundp 'calendar-date-style)
 		     (eq calendar-date-style 'european)
-		   (org-bound-and-true-p european-calendar-style)) ; Emacs 22
+		   (with-no-warnings ;; european-calendar-style is obsolete as of version 23.1
+		     (org-bound-and-true-p european-calendar-style))) ; Emacs 22
 		 '(day " " month " " year)
 	       '(month " " day " " year))))
 

+ 4 - 3
lisp/org.el

@@ -14604,9 +14604,10 @@ user function argument order change dependent on argument order."
 	(list arg2 arg1 arg3))
        ((eq calendar-date-style 'iso)
 	(list arg2 arg3 arg1)))
-    (if (org-bound-and-true-p european-calendar-style)
-	(list arg2 arg1 arg3)
-      (list arg1 arg2 arg3))))
+    (with-no-warnings ;; european-calendar-style is obsolete as of version 23.1
+      (if (org-bound-and-true-p european-calendar-style)
+	  (list arg2 arg1 arg3)
+	(list arg1 arg2 arg3)))))
 
 (defun org-eval-in-calendar (form &optional keepdate)
   "Eval FORM in the calendar window and return to current window.