From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: [PATCH] byte compile warnings... Date: Thu, 18 Nov 2010 21:37:01 +0100 Message-ID: <87k4kas70y.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=59415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJBEN-0000sD-6a for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 15:37:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJBEL-0007qB-OC for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 15:37:19 -0500 Received: from lo.gmane.org ([80.91.229.12]:35477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJBEL-0007pz-9O for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 15:37:17 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PJBEI-0001bh-9q for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 21:37:14 +0100 Received: from p57aabb60.dip.t-dialin.net ([87.170.187.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Nov 2010 21:37:14 +0100 Received: from Stromeko by p57aabb60.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Nov 2010 21:37:14 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Current master produces the following warnings during byte-compile with Emacs 23.1 (some of those had already been introduced in 7.01trans): In end of data: org.el:19709:1:Warning: the function `orgtbl-send-table' is not known to be defined. ==> forward declaration for this function is missing In org-agenda-time-of-day-to-ampm: org-agenda.el:936:10:Warning: reference to free variable `org-agenda-time-leading-zero' ==> used before declaration, which can be moved up a bit In org-freemind-from-org-mode-node: org-freemind.el:924:42:Warning: called-interactively-p called with 1 argument, but accepts only 0 org-freemind.el:927:10:Warning: called-interactively-p called with 1 argument, but accepts only 0 In org-freemind-from-org-mode: org-freemind.el:955:10:Warning: called-interactively-p called with 1 argument, but accepts only 0 org-freemind.el:960:10:Warning: called-interactively-p called with 1 argument, but accepts only 0 In org-freemind-from-org-sparse-tree: org-freemind.el:980:42:Warning: called-interactively-p called with 1 argument, but accepts only 0 org-freemind.el:986:10:Warning: called-interactively-p called with 1 argument, but accepts only 0 In org-freemind-to-org-mode: org-freemind.el:1217:10:Warning: called-interactively-p called with 1 argument, but accepts only 0 ==> that is actually a missing "with-no-warnings" in a defmacro in org-macs In end of data: org-indent.el:301:1:Warning: the function `with-silent-modifications' is not known to be defined. ==> macro does not exist in Emacs 23.1 (and earlier). There's been an earlier thread on that commit: it should probably be aliased to org-unmodified for <23.2. In end of data: ob.el:1921:1:Warning: the following functions are not known to be defined: org-in-item-p, org-list-parse-list, org-list-to-generic, org-list-bottom-point In end of data: ob-ref.el:228:1:Warning: the function `org-in-item-p' is not known to be defined. ==> require org-list during compile The attached patch takes care of the warnings, but please check carefully - I don't really know if that macro definition does what I think it should do... --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Keep-byte-compiler-happy.patch Content-Description: Keep byte compiler happy >From 23fa9dab05cfb34a1aa676273435188807d7c0aa Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Thu, 18 Nov 2010 21:19:36 +0100 Subject: [PATCH] Keep byte compiler happy --- lisp/ob-ref.el | 1 + lisp/ob.el | 1 + lisp/org-agenda.el | 12 ++++++------ lisp/org-macs.el | 8 +++++++- lisp/org.el | 4 +++- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index e482cb8..83a4a75 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -51,6 +51,7 @@ ;;; Code: (require 'ob) (eval-when-compile + (require 'org-list) (require 'cl)) (declare-function org-remove-if-not "org" (predicate seq)) diff --git a/lisp/ob.el b/lisp/ob.el index 96c2744..0beed86 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -30,6 +30,7 @@ ;;; Code: (eval-when-compile + (require 'org-list) (require 'cl)) (require 'org-macs) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b7de45a..dfc70ca 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -921,6 +921,12 @@ This function makes sure that dates are aligned for easy reading." :group 'org-agenda :type 'boolean) +(defcustom org-agenda-time-leading-zero nil + "Non-nil means use leading zero for military times in agenda. +For example, 9:30am would become 09:30 rather than 9:30." + :group 'org-agenda-daily/weekly + :type 'boolean) + (defun org-agenda-time-of-day-to-ampm (time) "Convert TIME of a string like '13:45' to an AM/PM style time string." (let* ((hour-number (string-to-number (substring time 0 -3))) @@ -945,12 +951,6 @@ based on `org-agenda-timegrid-use-ampm'" (org-agenda-time-of-day-to-ampm time) time)) -(defcustom org-agenda-time-leading-zero nil - "Non-nil means use leading zero for military times in agenda. -For example, 9:30am would become 09:30 rather than 9:30." - :group 'org-agenda-daily/weekly - :type 'boolean) - (defcustom org-agenda-weekend-days '(6 0) "Which days are weekend? These days get the special face `org-agenda-date-weekend' in the agenda diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 5a56123..c63b1b0 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -46,9 +46,15 @@ (if (or (> emacs-major-version 23) (and (>= emacs-major-version 23) (>= emacs-minor-version 2))) - (called-interactively-p ,kind) + (with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1 (interactive-p)))) +(if (or (<= emacs-major-version 23) + (and (<= emacs-major-version 23) + (< emacs-minor-version 2))) + (defmacro with-silent-modifications + (org-unmodified))) + (defmacro org-bound-and-true-p (var) "Return the value of symbol VAR if it is bound, else nil." `(and (boundp (quote ,var)) ,var)) diff --git a/lisp/org.el b/lisp/org.el index 023e019..1c70ec8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -72,7 +72,8 @@ (eval-when-compile (require 'cl) - (require 'gnus-sum)) + (require 'gnus-sum) +) (require 'calendar) ;; Emacs 22 calendar compatibility: Make sure the new variables are available @@ -3569,6 +3570,7 @@ Normal means no org-mode-specific context." (declare-function parse-time-string "parse-time" (string)) (declare-function org-attach-reveal "org-attach" (&optional if-exists)) (declare-function org-export-latex-fix-inputenc "org-latex" ()) +(declare-function orgtbl-send-table "org-table" (&optional maybe)) (defvar remember-data-file) (defvar texmathp-why) (declare-function speedbar-line-directory "speedbar" (&optional depth)) -- 1.7.1 --=-=-= Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--