emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] byte compile warnings...
@ 2010-11-18 20:37 Achim Gratz
  2010-11-22 20:34 ` David Maus
  0 siblings, 1 reply; 4+ messages in thread
From: Achim Gratz @ 2010-11-18 20:37 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] byte compile warnings...
  2010-11-18 20:37 [PATCH] byte compile warnings Achim Gratz
@ 2010-11-22 20:34 ` David Maus
  2010-11-23 22:27   ` Achim Gratz
  0 siblings, 1 reply; 4+ messages in thread
From: David Maus @ 2010-11-22 20:34 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 374 bytes --]

At Thu, 18 Nov 2010 21:37:01 +0100,
Achim Gratz wrote:
>
> [1  <text/plain (7bit)>]
>
> Current master produces the following warnings during byte-compile with
> Emacs 23.1 (some of those had already been introduced in 7.01trans):
>

Accepted and pushed to master.

Thanks,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] byte compile warnings...
  2010-11-22 20:34 ` David Maus
@ 2010-11-23 22:27   ` Achim Gratz
  2010-12-12 19:17     ` David Maus
  0 siblings, 1 reply; 4+ messages in thread
From: Achim Gratz @ 2010-11-23 22:27 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi David,

this patch had already been partially applied by Carsten and Eric (in
slightly a different way than I suggested).  The changes to ob.el and
ob-ref.el (the require statements) are therefore superfluous and should
probably be backed out.  There was also a superfluous whitespace change
in org.el (a closing paren that was broken onto the next line).  Patch
to this effect is attached.  You've already cleaned up org-agenda.el and
the conditions in org-macs...


[-- Attachment #2: Cleanup --]
[-- Type: Patch, Size: 1215 bytes --]

From 49e753e1e9c660c4d62fecb2b78b4abea9679026 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Tue, 23 Nov 2010 23:18:48 +0100
Subject: [PATCH] Keep byte compiler happy

* org.el: remove spurious linebreak introduced by earlier patch
* ob.el, ob-ref.el: remove double fix of the same problem
---
 lisp/ob-ref.el |    1 -
 lisp/ob.el     |    1 -
 lisp/org.el    |    3 +--
 3 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el
index a8a18ed..f350d61 100644
--- a/lisp/ob-ref.el
+++ b/lisp/ob-ref.el
@@ -51,7 +51,6 @@
 ;;; 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 a7ebdf9..d6e638c 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -30,7 +30,6 @@
 
 ;;; Code:
 (eval-when-compile
-  (require 'org-list)
   (require 'cl))
 (require 'org-macs)
 
diff --git a/lisp/org.el b/lisp/org.el
index 71e9428..eff4faa 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -72,8 +72,7 @@
 
 (eval-when-compile
   (require 'cl)
-  (require 'gnus-sum)
-)
+  (require 'gnus-sum))
 
 (require 'calendar)
 (require 'pcomplete)
-- 
1.7.1


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


It was unwise to bundle these fixes into a single patch, I'll put them
into seperate commits should the occasion arise again.


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH] byte compile warnings...
  2010-11-23 22:27   ` Achim Gratz
@ 2010-12-12 19:17     ` David Maus
  0 siblings, 0 replies; 4+ messages in thread
From: David Maus @ 2010-12-12 19:17 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 678 bytes --]

At Tue, 23 Nov 2010 23:27:06 +0100,
Achim Gratz wrote:
>
> Hi David,
>
> this patch had already been partially applied by Carsten and Eric (in
> slightly a different way than I suggested).  The changes to ob.el and
> ob-ref.el (the require statements) are therefore superfluous and should
> probably be backed out.  There was also a superfluous whitespace change
> in org.el (a closing paren that was broken onto the next line).  Patch
> to this effect is attached.  You've already cleaned up org-agenda.el and
> the conditions in org-macs...

Okay, I applied the fixup.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-12 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 20:37 [PATCH] byte compile warnings Achim Gratz
2010-11-22 20:34 ` David Maus
2010-11-23 22:27   ` Achim Gratz
2010-12-12 19:17     ` David Maus

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