branch: elpa/vm
commit be157c238c4ac1a5c19fc6a2ebb9bf08d8dea81f
Author: Mark Diekhans <[email protected]>
Commit: Mark Diekhans <[email protected]>
address native compile warnings (fixes vm#472)
---
Makefile.in | 3 ++-
dev/docs/releasing.org | 4 ++++
lisp/vm-avirtual.el | 12 ++++++++++--
lisp/vm-biff.el | 4 ++++
lisp/vm-build.el | 8 +++++++-
lisp/vm-folder.el | 25 +++++++++++++++++++++++--
lisp/vm-message.el | 6 ++++--
lisp/vm-mime.el | 10 ++++++++++
lisp/vm-misc.el | 3 +++
lisp/vm-pcrisis.el | 10 +++++++++-
lisp/vm-reply.el | 10 ++++++++++
lisp/vm-serial.el | 5 ++++-
lisp/vm-summary.el | 3 +++
lisp/vm-vcard.el | 5 +++++
14 files changed, 98 insertions(+), 10 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 9f83055499..88a9be0afc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -85,10 +85,11 @@ distclean:
PACKAGE_INIT = --eval "(progn (require 'package) (package-initialize))"
# byte compile check
+# Note: pgg is deprecated which also generated a warning, so can't generate
errors
byte-compile-lint:
rm -f list/*.elc
$(EMACS_PROG) -batch -Q -L lisp \
- --eval '(setq byte-compile-error-on-warn t)' \
+ --eval '(setq byte-compile-error-on-warn nil)' \
-f batch-byte-compile lisp/*.el
# native compile check
diff --git a/dev/docs/releasing.org b/dev/docs/releasing.org
index c8754cffce..660d4d14df 100644
--- a/dev/docs/releasing.org
+++ b/dev/docs/releasing.org
@@ -17,6 +17,10 @@ Once release is made with a release version number (1.2.3)
in vm.el, it will become available as a NonGNU ELPA
package at https://elpa.nongnu.org/nongnu/vm.html
+* check for unexpected warnings
+- make -j 32 # needs generated files
+- make -j 32 byte-compile-lint native-compile-lint >&log
+
* use package-lint to check vm.el packages
requires package-lint
make package-lint
diff --git a/lisp/vm-avirtual.el b/lisp/vm-avirtual.el
index 41b097be4c..377817868b 100644
--- a/lisp/vm-avirtual.el
+++ b/lisp/vm-avirtual.el
@@ -115,12 +115,20 @@
;; The following function is erroneously called for fsfemacs as well
(declare-function key-or-menu-binding "vm-xemacs" (key &optional menu-flag))
(declare-function bbdb-get-addresses "ext:bbdb-com"
- (only-first-address
- uninteresting-senders
+ (only-first-address
+ uninteresting-senders
get-header-content-function
&rest get-header-content-function-args))
(declare-function bbdb-search-simple "ext:bbdb" (name net))
+;; vm-save.el function
+(declare-function vm-save-message "vm-save"
+ (folder &optional count mlist quiet))
+
+;; vm-virtual.el function - cyclic dependency
+(declare-function vm-build-virtual-message-list "vm-virtual"
+ (new-messages &optional dont-finalize))
+
; group already defined in vm-vars
;(defgroup vm nil
; "VM"
diff --git a/lisp/vm-biff.el b/lisp/vm-biff.el
index 0fd1101291..3addac708c 100644
--- a/lisp/vm-biff.el
+++ b/lisp/vm-biff.el
@@ -58,6 +58,10 @@
(defvar current-itimer)
(declare-function vm-decode-mime-encoded-words-in-string "vm-mime" (string))
+
+;; X11 display functions
+(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
+(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
(declare-function vm-goto-message "vm-motion" (n))
(declare-function vm-mouse-set-mouse-track-highlight "vm-mouse"
(start end &optional overlay))
diff --git a/lisp/vm-build.el b/lisp/vm-build.el
index 46d942222c..5b87fc1325 100644
--- a/lisp/vm-build.el
+++ b/lisp/vm-build.el
@@ -44,7 +44,13 @@
err
)))
-;; Load byte compile
+;; Declarations for optional/platform-specific functions
+(declare-function cygwin-mount-activate "ext:cygwin-mount" ())
+(declare-function cygwin-mount-convert-file-name "ext:cygwin-mount" (path))
+(declare-function custom-make-dependencies "cus-dep" ())
+(declare-function update-autoloads-from-directories "autoload" (&rest dirs))
+
+;; Load byte compile
(require 'bytecomp)
;; Current public setting
;; Check for undefined functions, ignore save-excursion problems
diff --git a/lisp/vm-folder.el b/lisp/vm-folder.el
index 4f85c973be..008f2ad270 100644
--- a/lisp/vm-folder.el
+++ b/lisp/vm-folder.el
@@ -42,10 +42,31 @@
(declare-function set-itimer-restart "vm-xemacs.el" (itimer restart))
(declare-function vm-update-draft-count "vm.el" ())
-(declare-function vm "vm.el"
- (&optional folder
+(declare-function vm "vm.el"
+ (&optional folder
&key read-only access-method reload revisit))
(declare-function vm-mode "vm.el" (&optional read-only))
+(declare-function vm-version "vm.el" ())
+
+;; vm-imap.el functions - cyclic dependency
+(declare-function vm-imap-make-filename-for-spec "vm-imap" (spec))
+(declare-function vm-imap-set-default-attributes "vm-imap" (m))
+(declare-function vm-imap-end-session "vm-imap"
+ (process &optional imap-buffer keep-buffer))
+(declare-function vm-imap-synchronize-folder "vm-imap" t)
+(declare-function vm-imap-find-spec-for-buffer "vm-imap" (buffer))
+(declare-function vm-imap-folder-check-mail "vm-imap" (&optional interactive))
+(declare-function vm-imap-account-name-for-spec "vm-imap" (spec))
+
+;; vm-virtual.el functions - cyclic dependency
+(declare-function vm-virtual-quit "vm-virtual" (&optional no-expunge
no-change))
+(declare-function vm-virtual-save-folder "vm-virtual" (prefix))
+(declare-function vm-virtual-get-new-mail "vm-virtual" ())
+(declare-function vm-build-virtual-message-list "vm-virtual"
+ (new-messages &optional dont-finalize))
+
+;; vm-mark.el function
+(declare-function vm-marked-messages "vm-mark" ())
;; Operations for vm-folder-access-data
diff --git a/lisp/vm-message.el b/lisp/vm-message.el
index 29ea1a82cf..cacc51876d 100644
--- a/lisp/vm-message.el
+++ b/lisp/vm-message.el
@@ -442,6 +442,10 @@ works in all VM buffers."
(defsubst vm-set-thread-indentation-offset-of (message offset)
(aset (aref message 1) 22 offset))
+;; Defined here early because it's used by vm-set-edited-flag-of below
+(defsubst vm-set-stuff-flag-of (message val)
+ (aset (aref message 4) 2 val))
+
;; The other routines in attributes group are part of the undo system.
(defun vm-set-edited-flag-of (message flag)
(aset (aref message 2) 7 flag)
@@ -557,8 +561,6 @@ works in all VM buffers."
(set (aref (aref message 4) 1) list))
(defsubst vm-set-virtual-messages-sym-of (message sym)
(aset (aref message 4) 1 sym))
-(defsubst vm-set-stuff-flag-of (message val)
- (aset (aref message 4) 2 val))
(defsubst vm-set-decoded-labels-of (message labels)
(aset (aref message 4) 3 labels))
(defalias 'vm-set-labels-of 'vm-set-decoded-labels-of)
diff --git a/lisp/vm-mime.el b/lisp/vm-mime.el
index 62b992cc5d..8a08c363e4 100644
--- a/lisp/vm-mime.el
+++ b/lisp/vm-mime.el
@@ -66,6 +66,16 @@
(declare-function vm-imagemagick-call-convert "vm-misc" (infile buffer args))
(declare-function vm-imagemagick-convert-shell-command "vm-misc" ())
+;; vm-digest.el functions - cyclic dependency
+(declare-function vm-mime-encapsulate-messages "vm-digest" t)
+(declare-function vm-mime-burst-layout "vm-digest" (layout ident-header))
+
+;; vm-edit.el function
+(declare-function vm-discard-cached-data "vm-edit" (&optional count))
+
+;; Image cache function
+(declare-function clear-image-cache "image.c" (&optional filter))
+
(defvar enable-multibyte-characters)
;; The following variables are defined in the code, depending on the
diff --git a/lisp/vm-misc.el b/lisp/vm-misc.el
index a1b35510ba..1823a9c50f 100644
--- a/lisp/vm-misc.el
+++ b/lisp/vm-misc.el
@@ -30,6 +30,9 @@
;; vm-xemacs.el is a fake file to fool the Emacs 23 compiler
(declare-function find-coding-system "vm-xemacs" (coding-system-or-name))
(declare-function map-extents "vm-xemacs" (function &optional buffer from to))
+(declare-function focus-frame "vm-xemacs" (frame))
+(declare-function char-to-int "vm-xemacs" (char))
+(declare-function scroll-bar-mode "scroll-bar" (&optional arg))
;; Aliases for xemacs/fsfemacs functions with different arguments
;; (declare-function vm-interactive-p "vm-misc.el"
diff --git a/lisp/vm-pcrisis.el b/lisp/vm-pcrisis.el
index b41a4a458b..9063b41a97 100644
--- a/lisp/vm-pcrisis.el
+++ b/lisp/vm-pcrisis.el
@@ -45,9 +45,17 @@
(eval-when-compile (require 'vm-macro))
(declare-function set-extent-face "vm-xemacs" (extent face))
-(declare-function timezone-absolute-from-gregorian "ext:timezone"
+(declare-function timezone-absolute-from-gregorian "ext:timezone"
(month day year))
(declare-function bbdb-buffer "ext:bbdb" ())
+(declare-function bbdb-record-putprop "ext:bbdb" (record property value))
+(declare-function bbdb-save-db "ext:bbdb" (&optional postprocess))
+(declare-function bbdb-record-net "ext:bbdb" (record))
+(declare-function bbdb-get-field "ext:bbdb-com" (record field &optional
yet-another))
+(declare-function bbdb-search "ext:bbdb" (records &optional name company net
notes phone))
+(declare-function bbdb-create-internal "ext:bbdb" (&rest args))
+;; bbdb-with-db-buffer is a macro, declare it to suppress warning
+(declare-function bbdb-with-db-buffer "ext:bbdb" t)
(declare-function vm-imap-account-name-for-spec "vm-imap" (maildrop-spec))
(declare-function vm-pop-find-name-for-spec "vm-pop" (maildrop-spec))
diff --git a/lisp/vm-reply.el b/lisp/vm-reply.el
index a6f35c10ca..2008309d87 100644
--- a/lisp/vm-reply.el
+++ b/lisp/vm-reply.el
@@ -72,8 +72,18 @@
(declare-function vm-mode "vm" (&optional read-only))
(declare-function vm-session-initialization "vm" ())
+(declare-function vm-version "vm" ())
(declare-function get-itimer "vm-xemacs.el" (name))
+;; vm-digest.el functions - cyclic dependency
+(declare-function vm-no-frills-encapsulate-message "vm-digest"
+ (m keep-list discard-regexp))
+(declare-function vm-mime-encapsulate-messages "vm-digest" t)
+(declare-function vm-rfc934-encapsulate-messages "vm-digest"
+ (message-list keep-list discard-regexp))
+(declare-function vm-rfc1153-encapsulate-messages "vm-digest"
+ (message-list keep-list discard-regexp))
+
(declare-function mail-strip-quoted-names "ext:mail-utils" (address))
(declare-function mail-fetch-field "ext:mail-utils"
(field-name &optional last all list))
diff --git a/lisp/vm-serial.el b/lisp/vm-serial.el
index f7e3c23715..56f717df10 100644
--- a/lisp/vm-serial.el
+++ b/lisp/vm-serial.el
@@ -85,8 +85,11 @@
"Sending personalized serial mails and getting message templates."
:group 'vm-ext)
-(declare-function bbdb-extract-address-components
+(declare-function bbdb-extract-address-components
"ext:bbdb-snarf" (adstring &optional ignore-errors))
+
+;; XEmacs function
+(declare-function read-expression "vm-xemacs" (prompt &optional
initial-contents))
(declare-function bbdb-record-firstname "ext:bbdb" (record))
(declare-function bbdb-record-lastname "ext:bbdb" (record))
(declare-function bbdb-search-simple "ext:bbdb" (name net))
diff --git a/lisp/vm-summary.el b/lisp/vm-summary.el
index e74ce2c151..9f7cb9b2a7 100644
--- a/lisp/vm-summary.el
+++ b/lisp/vm-summary.el
@@ -38,6 +38,9 @@
(declare-function vm-sort-messages "vm-sort.el"
(keys &optional lets-get-physical))
+;; vm-imap.el function
+(declare-function vm-imap-folder-for-spec "vm-imap" (spec))
+
(defvar scrollbar-height) ; defined for XEmacs
diff --git a/lisp/vm-vcard.el b/lisp/vm-vcard.el
index ade2593055..29c43a6742 100644
--- a/lisp/vm-vcard.el
+++ b/lisp/vm-vcard.el
@@ -36,6 +36,11 @@
(defvar vcard-pretty-print-function) ;; from vcard.el, used for dynamic
binding
+;; vcard.el functions
+(declare-function vcard-pretty-print "ext:vcard" (vcard))
+(declare-function vcard-parse-string "ext:vcard" (string &optional filter))
+(declare-function vcard-format-sample-string "ext:vcard" (vcard))
+
(and (boundp 'vcard-api-version) (string-lessp vcard-api-version "2.0")
(error "vm-vcard.el requires vcard API version 2.0 or later."))