emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] byte compile warnings...
Date: Thu, 18 Nov 2010 21:37:01 +0100	[thread overview]
Message-ID: <87k4kas70y.fsf@Rainer.invalid> (raw)

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]


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...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Keep byte compiler happy --]
[-- Type: text/x-patch, Size: 3591 bytes --]

From 23fa9dab05cfb34a1aa676273435188807d7c0aa Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
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


[-- Attachment #3: Type: text/plain, Size: 193 bytes --]



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

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

             reply	other threads:[~2010-11-18 20:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 20:37 Achim Gratz [this message]
2010-11-22 20:34 ` [PATCH] byte compile warnings David Maus
2010-11-23 22:27   ` Achim Gratz
2010-12-12 19:17     ` David Maus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4kas70y.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).