emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112651: Silence some compiler warnin


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112651: Silence some compiler warnings
Date: Tue, 21 May 2013 00:25:14 -0700
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112651
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-05-21 00:25:14 -0700
message:
  Silence some compiler warnings
  
  * calculator.el (electric, ehelp): No need to load when compiling.
  (Electric-command-loop, electric-describe-mode): Declare.
  
  * doc-view.el (doc-view-current-converter-processes): Move before use.
  
  * files.el (dired-unmark):
  * progmodes/gud.el (gdb-input): Update declarations.
  
  * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
  Move MODE-set-explicitly definition before use.
  
  * erc/erc-log.el (erc-network-name): Declare.
  
  * erc/erc-notify.el (pcomplete--here): Declare.
  (pcomplete/erc-mode/NOTIFY): Require pcomplete.
  
  * international/mule-diag.el (mule-diag):
  Don't use obsolete window-system-version.
  
  * mail/feedmail.el (smtpmail): No need to load when compiling.
  (smtpmail-via-smtp, smtpmail-smtp-server): Declare.
  
  * mail/mail-utils.el (rfc822): No need to load when compiling.
  (rfc822-addresses): Autoload it.
  (mail-strip-quoted-names): Trivial simplification.
  
  * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare.
  (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm.
  
  * net/snmp-mode.el (tempo): Don't duplicate requires.
  
  * progmodes/prolog.el (info): No need to load when compiling.
  (comint): Require before shell requires it.
  (Info-goto-node): Autoload it.
  (Info-follow-nearest-node): Declare.
  (prolog-help-info, prolog-goto-predicate-info): No need to require info.
  
  * textmodes/artist.el (picture-mode-exit): Declare.
  
  * textmodes/reftex-parse.el (reftex-parse-from-file):
  Trivial rewrite so the compiler can parse it better.
  
  * url/url-dav.el (url-http): Require it.
  (url-http-head-file-attributes): Don't autoload it.
  
  * url/url-proxy.el (url-http): Autoload it.
modified:
  lisp/ChangeLog
  lisp/calculator.el
  lisp/doc-view.el
  lisp/emacs-lisp/easy-mmode.el
  lisp/erc/ChangeLog
  lisp/erc/erc-log.el
  lisp/erc/erc-notify.el
  lisp/files.el
  lisp/international/mule-diag.el
  lisp/mail/feedmail.el
  lisp/mail/mail-utils.el
  lisp/mail/rmail.el
  lisp/net/snmp-mode.el
  lisp/progmodes/gud.el
  lisp/progmodes/prolog.el
  lisp/textmodes/artist.el
  lisp/textmodes/reftex-parse.el
  lisp/url/ChangeLog
  lisp/url/url-dav.el
  lisp/url/url-proxy.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-20 22:52:40 +0000
+++ b/lisp/ChangeLog    2013-05-21 07:25:14 +0000
@@ -1,3 +1,42 @@
+2013-05-21  Glenn Morris  <address@hidden>
+
+       * files.el (dired-unmark):
+       * progmodes/gud.el (gdb-input): Update declarations.
+
+       * calculator.el (electric, ehelp): No need to load when compiling.
+       (Electric-command-loop, electric-describe-mode): Declare.
+
+       * doc-view.el (doc-view-current-converter-processes): Move before use.
+
+       * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
+       Move MODE-set-explicitly definition before use.
+
+       * international/mule-diag.el (mule-diag):
+       Don't use obsolete window-system-version.
+
+       * mail/feedmail.el (smtpmail): No need to load when compiling.
+       (smtpmail-via-smtp, smtpmail-smtp-server): Declare.
+
+       * mail/mail-utils.el (rfc822): No need to load when compiling.
+       (rfc822-addresses): Autoload it.
+       (mail-strip-quoted-names): Trivial simplification.
+
+       * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare.
+       (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm.
+
+       * net/snmp-mode.el (tempo): Don't duplicate requires.
+
+       * progmodes/prolog.el (info): No need to load when compiling.
+       (comint): Require before shell requires it.
+       (Info-goto-node): Autoload it.
+       (Info-follow-nearest-node): Declare.
+       (prolog-help-info, prolog-goto-predicate-info): No need to require info.
+
+       * textmodes/artist.el (picture-mode-exit): Declare.
+
+       * textmodes/reftex-parse.el (reftex-parse-from-file):
+       Trivial rewrite so the compiler can parse it better.
+
 2013-05-20  Leo Liu  <address@hidden>
 
        * progmodes/octave.el (octave-help-mode-map)

=== modified file 'lisp/calculator.el'
--- a/lisp/calculator.el        2013-01-01 09:11:05 +0000
+++ b/lisp/calculator.el        2013-05-21 07:25:14 +0000
@@ -668,7 +668,9 @@
 
 \\{calculator-mode-map}")
 
-(eval-when-compile (require 'electric) (require 'ehelp))
+(declare-function Electric-command-loop "electric"
+                  (return-tag &optional prompt inhibit-quitting
+                              loop-function loop-state))
 
 ;;;###autoload
 (defun calculator ()
@@ -1667,6 +1669,8 @@
   (interactive "cRegister to get value from: ")
   (calculator-put-value (cdr (assq reg calculator-registers))))
 
+(declare-function electric-describe-mode "ehelp" ())
+
 (defun calculator-help ()
   ;; this is used as the quick reference screen you get with `h'
   "Quick reference:
@@ -1697,7 +1701,7 @@
       (if (or (not calculator-electric-mode)
               ;; XEmacs has a problem with electric-describe-mode
               (featurep 'xemacs))
-        (describe-mode)
+          (describe-mode)
         (electric-describe-mode))
       (if calculator-electric-mode
         (use-global-map g-map))

=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el  2013-04-16 00:51:46 +0000
+++ b/lisp/doc-view.el  2013-05-21 07:25:14 +0000
@@ -1,6 +1,5 @@
 ;;; doc-view.el --- View PDF/PostScript/DVI files in Emacs -*- 
lexical-binding: t -*-
 
-
 ;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
 ;;
 ;; Author: Tassilo Horn <address@hidden>
@@ -306,6 +305,10 @@
 
 ;;;; Internal Variables
 
+(defvar doc-view-current-converter-processes nil
+  "Only used internally.")
+(make-variable-buffer-local 'doc-view-current-converter-processes)
+
 (defun doc-view-new-window-function (winprops)
   ;; (message "New window %s for buf %s" (car winprops) (current-buffer))
   (cl-assert (or (eq t (car winprops))
@@ -348,10 +351,6 @@
   "Only used internally.")
 (make-variable-buffer-local 'doc-view-current-files)
 
-(defvar doc-view-current-converter-processes nil
-  "Only used internally.")
-(make-variable-buffer-local 'doc-view-current-converter-processes)
-
 (defvar doc-view-current-timer nil
   "Only used internally.")
 (make-variable-buffer-local 'doc-view-current-timer)

=== modified file 'lisp/emacs-lisp/easy-mmode.el'
--- a/lisp/emacs-lisp/easy-mmode.el     2013-02-26 01:50:45 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el     2013-05-21 07:25:14 +0000
@@ -419,6 +419,13 @@
        ;; up-to-here.
        :autoload-end
 
+       ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by
+       ;; kill-all-local-variables.
+       (defvar-local ,MODE-set-explicitly nil)
+       (defun ,MODE-set-explicitly ()
+         (setq ,MODE-set-explicitly t))
+       (put ',MODE-set-explicitly 'definition-name ',global-mode)
+
        ;; A function which checks whether MODE has been disabled in the major
        ;; mode hook which has just been run.
        (add-hook ',minor-MODE-hook ',MODE-set-explicitly)
@@ -451,13 +458,7 @@
        (defun ,MODE-cmhh ()
         (add-to-list ',MODE-buffers (current-buffer))
         (add-hook 'post-command-hook ',MODE-check-buffers))
-       (put ',MODE-cmhh 'definition-name ',global-mode)
-       ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by
-       ;; kill-all-local-variables.
-       (defvar-local ,MODE-set-explicitly nil)
-       (defun ,MODE-set-explicitly ()
-         (setq ,MODE-set-explicitly t))
-       (put ',MODE-set-explicitly 'definition-name ',global-mode))))
+       (put ',MODE-cmhh 'definition-name ',global-mode))))
 
 ;;;
 ;;; easy-mmode-defmap

=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2013-05-21 07:15:59 +0000
+++ b/lisp/erc/ChangeLog        2013-05-21 07:25:14 +0000
@@ -1,5 +1,10 @@
 2013-05-21  Glenn Morris  <address@hidden>
 
+       * erc-log.el (erc-network-name): Declare.
+
+       * erc-notify.el (pcomplete--here): Declare.
+       (pcomplete/erc-mode/NOTIFY): Require pcomplete.
+
        * erc.el (erc-quit-reason-various-alist)
        (erc-part-reason-various-alist): Don't mention zippy.
        (erc-quit-reason, erc-part-reason): Remove zippy options.

=== modified file 'lisp/erc/erc-log.el'
--- a/lisp/erc/erc-log.el       2013-01-02 16:13:04 +0000
+++ b/lisp/erc/erc-log.el       2013-05-21 07:25:14 +0000
@@ -378,6 +378,8 @@
     ;; we need a make-safe-file-name function.
     (convert-standard-filename file)))
 
+(declare-function erc-network-name "erc-networks" ())
+
 (defun erc-generate-log-file-name-network (buffer target nick server port)
   "Generates a log-file name using the network name rather than server name.
 This results in a file name of the form address@hidden

=== modified file 'lisp/erc/erc-notify.el'
--- a/lisp/erc/erc-notify.el    2013-01-02 16:13:04 +0000
+++ b/lisp/erc/erc-notify.el    2013-05-21 07:25:14 +0000
@@ -235,8 +235,13 @@
 
 (autoload 'pcomplete-erc-all-nicks "erc-pcomplete")
 
+;; "--" is not a typo.
+(declare-function pcomplete--here "pcomplete"
+                 (&optional form stub paring form-only))
+
 ;;;###autoload
 (defun pcomplete/erc-mode/NOTIFY ()
+  (require 'pcomplete)
   (pcomplete-here (pcomplete-erc-all-nicks)))
 
 (erc-notify-install-message-catalogs)

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2013-04-27 17:07:01 +0000
+++ b/lisp/files.el     2013-05-21 07:25:14 +0000
@@ -206,7 +206,7 @@
 (declare-function msdos-long-file-names "msdos.c")
 (declare-function w32-long-file-name "w32proc.c")
 (declare-function dired-get-filename "dired" (&optional localp 
no-error-if-not-filep))
-(declare-function dired-unmark "dired" (arg))
+(declare-function dired-unmark "dired" (arg &optional interactive))
 (declare-function dired-do-flagged-delete "dired" (&optional nomessage))
 (declare-function dos-8+3-filename "dos-fns" (filename))
 (declare-function dosified-file-name "dos-fns" (file-name))

=== modified file 'lisp/international/mule-diag.el'
--- a/lisp/international/mule-diag.el   2013-01-01 09:11:05 +0000
+++ b/lisp/international/mule-diag.el   2013-05-21 07:25:14 +0000
@@ -1104,8 +1104,7 @@
 
       (insert-section 2 "Display")
       (if window-system
-         (insert (format "Window-system: %s, version %s"
-                         window-system window-system-version))
+         (insert (format "Window-system: %s" window-system))
        (insert "Terminal: " (getenv "TERM")))
       (insert "\n\n")
 

=== modified file 'lisp/mail/feedmail.el'
--- a/lisp/mail/feedmail.el     2013-02-09 12:52:01 +0000
+++ b/lisp/mail/feedmail.el     2013-05-21 07:25:14 +0000
@@ -370,9 +370,6 @@
 
 (require 'mail-utils)               ; pick up mail-strip-quoted-names
 
-(eval-when-compile
-  (require 'smtpmail))
-
 (autoload 'mail-do-fcc "sendmail")
 
 (defgroup feedmail nil
@@ -1619,6 +1616,10 @@
                 ;; These mean "report errors by mail" and "deliver in 
background".
                 (if (null mail-interactive) '("-oem" "-odb")))))
 
+(declare-function smtpmail-via-smtp "smtpmail"
+                 (recipient smtpmail-text-buffer &optional ask-for-password))
+(defvar smtpmail-smtp-server)
+
 ;; provided by address@hidden (James A. McLaughlin);
 ;; simplified by WJC after more feedmail development;
 ;; idea (but not implementation) of copying smtpmail trace buffer to

=== modified file 'lisp/mail/mail-utils.el'
--- a/lisp/mail/mail-utils.el   2013-01-01 09:11:05 +0000
+++ b/lisp/mail/mail-utils.el   2013-05-21 07:25:14 +0000
@@ -183,17 +183,15 @@
                   (error "Malformed MIME quoted-printable message"))))
          (not failed))))))
 
-(eval-when-compile (require 'rfc822))
+(autoload 'rfc822-addresses "rfc822")
 
 (defun mail-strip-quoted-names (address)
   "Delete comments and quoted strings in an address list ADDRESS.
 Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
 Return a modified address list."
-  (if (null address)
-      nil
+  (when address
     (if mail-use-rfc822
-       (progn (require 'rfc822)
-              (mapconcat 'identity (rfc822-addresses address) ", "))
+       (mapconcat 'identity (rfc822-addresses address) ", ")
       (let (pos)
 
         ;; Strip comments.

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2013-05-05 17:41:09 +0000
+++ b/lisp/mail/rmail.el        2013-05-21 07:25:14 +0000
@@ -4105,6 +4105,9 @@
 
 (autoload 'mail-position-on-field "sendmail")
 
+(declare-function rmail-mime-message-p "rmailmm" ())
+(declare-function rmail-mime-toggle-raw "rmailmm" (&optional state))
+
 (defun rmail-retry-failure ()
   "Edit a mail message which is based on the contents of the current message.
 For a message rejected by the mail system, extract the interesting headers and
@@ -4117,7 +4120,13 @@
 specifying headers which should not be copied into the new message."
   (interactive)
   (require 'mail-utils)
-  (if rmail-enable-mime
+  ;; FIXME This does not handle rmail-mime-feature != 'rmailmm.
+  ;; There is no API defined for rmail-mime-feature to provide
+  ;; rmail-mime-message-p, rmail-mime-toggle-raw equivalents.
+  ;; But does anyone actually use rmail-mime-feature != 'rmailmm?
+  (if (and rmail-enable-mime
+          (eq rmail-mime-feature 'rmailmm)
+          (featurep rmail-mime-feature))
       (with-current-buffer rmail-buffer
        (if (rmail-mime-message-p)
            (let ((rmail-mime-mbox-buffer rmail-view-buffer)

=== modified file 'lisp/net/snmp-mode.el'
--- a/lisp/net/snmp-mode.el     2013-01-01 09:11:05 +0000
+++ b/lisp/net/snmp-mode.el     2013-05-21 07:25:14 +0000
@@ -85,8 +85,9 @@
 ;;; Code:
 
 (eval-when-compile
-  (require 'imenu)   ; Need this stuff when compiling for imenu macros, etc.
-  (require 'tempo))
+  (require 'imenu))   ; Need this stuff when compiling for imenu macros, etc.
+
+(require 'tempo)
 
 ;;;----------------------------------------------------------------------------
 ;;
@@ -540,8 +541,6 @@
 ;;
 ;;;----------------------------------------------------------------------------
 
-(require 'tempo)
-
 ;; Perform a completing-read with info given
 ;;
 (defun snmp-completing-read (prompt table &optional pred require init hist)

=== modified file 'lisp/progmodes/gud.el'
--- a/lisp/progmodes/gud.el     2013-05-08 15:06:28 +0000
+++ b/lisp/progmodes/gud.el     2013-05-21 07:25:14 +0000
@@ -3429,7 +3429,7 @@
     ((or `xdb `pdb) (concat "p " expr))
     (`sdb (concat expr "/"))))
 
-(declare-function gdb-input "gdb-mi" (command handler))
+(declare-function gdb-input "gdb-mi" (command handler &optional trigger))
 (declare-function tooltip-expr-to-print "tooltip" (event))
 (declare-function tooltip-event-buffer "tooltip" (event))
 

=== modified file 'lisp/progmodes/prolog.el'
--- a/lisp/progmodes/prolog.el  2013-05-08 16:27:53 +0000
+++ b/lisp/progmodes/prolog.el  2013-05-21 07:25:14 +0000
@@ -278,16 +278,16 @@
 
 ;;; Code:
 
+(require 'comint)
+
 (eval-when-compile
   (require 'font-lock)
   ;; We need imenu everywhere because of the predicate index!
   (require 'imenu)
   ;)
-  (require 'info)
   (require 'shell)
   )
 
-(require 'comint)
 (require 'easymenu)
 (require 'align)
 
@@ -3030,11 +3030,14 @@
         (error "Sorry, no help method defined for this Prolog system."))))
    ))
 
+
+(autoload 'Info-goto-node "info" nil t)
+(declare-function Info-follow-nearest-node "info" (&optional FORK))
+
 (defun prolog-help-info (predicate)
   (let ((buffer (current-buffer))
         oldp
         (str (concat "^\\* " (regexp-quote predicate) " */")))
-    (require 'info)
     (pop-to-buffer nil)
     (Info-goto-node prolog-info-predicate-index)
     (if (not (re-search-forward str nil t))
@@ -3123,7 +3126,6 @@
 (defun prolog-goto-predicate-info (predicate)
   "Go to the info page for PREDICATE, which is a PredSpec."
   (interactive)
-  (require 'info)
   (string-match "\\(.*\\)/\\([0-9]+\\).*$" predicate)
   (let ((buffer (current-buffer))
         (name (match-string 1 predicate))

=== modified file 'lisp/textmodes/artist.el'
--- a/lisp/textmodes/artist.el  2013-02-23 21:54:00 +0000
+++ b/lisp/textmodes/artist.el  2013-05-21 07:25:14 +0000
@@ -1449,6 +1449,8 @@
        (message "")))
   (artist-mode-line-show-curr-operation artist-key-is-drawing))
 
+(declare-function picture-mode-exit "picture" (&optional nostrip))
+
 (defun artist-mode-exit ()
   "Exit Artist mode.  This will call the hook `artist-mode-hook'."
   (if (and artist-picture-compatibility (eq major-mode 'picture-mode))

=== modified file 'lisp/textmodes/reftex-parse.el'
--- a/lisp/textmodes/reftex-parse.el    2013-04-25 12:01:09 +0000
+++ b/lisp/textmodes/reftex-parse.el    2013-05-21 07:25:14 +0000
@@ -238,12 +238,13 @@
                           ;; \label{} defs should always be honored,
                           ;; just no keyval style [label=foo] defs.
                           (string-equal "\label{" (substring 
(reftex-match-string 0) 0 7))
-                          (not (fboundp 'TeX-current-macro))
-                          (not (fboundp 'LaTeX-current-environment))
-                          (not (or (member (save-match-data 
(TeX-current-macro))
-                                           
reftex-label-ignored-macros-and-environments)
-                                   (member (save-match-data 
(LaTeX-current-environment))
-                                           
reftex-label-ignored-macros-and-environments))))
+                           (if (and (fboundp 'TeX-current-macro)
+                                    (fboundp 'LaTeX-current-environment))
+                               (not (or (member (save-match-data 
(TeX-current-macro))
+                                                
reftex-label-ignored-macros-and-environments)
+                                        (member (save-match-data 
(LaTeX-current-environment))
+                                                
reftex-label-ignored-macros-and-environments)))
+                             t))
                   (push (reftex-label-info (reftex-match-string 1) file bound)
                         docstruct)))
 

=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2013-05-15 23:55:41 +0000
+++ b/lisp/url/ChangeLog        2013-05-21 07:25:14 +0000
@@ -1,3 +1,10 @@
+2013-05-21  Glenn Morris  <address@hidden>
+
+       * url-dav.el (url-http): Require it.
+       (url-http-head-file-attributes): Don't autoload it.
+
+       * url-proxy.el (url-http): Autoload it.
+
 2013-05-15  Glenn Morris  <address@hidden>
 
        * url-news.el (url-news): Remove empty custom group.

=== modified file 'lisp/url/url-dav.el'
--- a/lisp/url/url-dav.el       2013-01-01 09:11:05 +0000
+++ b/lisp/url/url-dav.el       2013-05-21 07:25:14 +0000
@@ -32,10 +32,12 @@
 (require 'xml)
 (require 'url-util)
 (require 'url-handlers)
+(require 'url-http)
 
 (defvar url-dav-supported-protocols '(1 2)
   "List of supported DAV versions.")
 
+;; Dynamically bound.
 (defvar url-http-content-type)
 (defvar url-http-response-status)
 (defvar url-http-end-of-headers)
@@ -621,8 +623,6 @@
         (url-debug 'dav "Unrecognized DAV:locktype (%S)" (car lock)))))
     modes))
 
-(autoload 'url-http-head-file-attributes "url-http")
-
 (defun url-dav-file-attributes (url &optional id-format)
   (let ((properties (cdar (url-dav-get-properties url))))
     (if (and properties

=== modified file 'lisp/url/url-proxy.el'
--- a/lisp/url/url-proxy.el     2013-01-01 09:11:05 +0000
+++ b/lisp/url/url-proxy.el     2013-05-21 07:25:14 +0000
@@ -63,6 +63,8 @@
       (url-warn 'url (format "Unknown proxy directive: %s" proxy) 'critical)
       nil))))
 
+(autoload 'url-http "url-http")
+
 (defun url-proxy (url callback &optional cbargs)
   ;; Retrieve URL from a proxy.
   ;; Expects `url-using-proxy' to be bound to the specific proxy to use."
@@ -73,7 +75,7 @@
     (url-http url callback cbargs))
    (t
     (error "Don't know how to use proxy `%s'" url-using-proxy))))
-  
+
 (provide 'url-proxy)
 
 ;;; url-proxy.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]