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.
This commit is contained in:
Glenn Morris 2013-05-21 00:25:14 -07:00
parent dc2f2f9988
commit f440830d60
20 changed files with 119 additions and 44 deletions

View file

@ -1,3 +1,42 @@
2013-05-21 Glenn Morris <rgm@gnu.org>
* 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 <sdl.web@gmail.com>
* progmodes/octave.el (octave-help-mode-map)

View file

@ -668,7 +668,9 @@ more information.
\\{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 @@ Used by `calculator-paste' and `get-register'."
(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 @@ Used by `calculator-paste' and `get-register'."
(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))

View file

@ -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 <tsdh@gnu.org>
@ -306,6 +305,10 @@ of the page moves to the previous page."
;;;; 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 @@ of the page moves to the previous page."
"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)

View file

@ -419,6 +419,13 @@ See `%s' for more information on %s."
;; 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 @@ See `%s' for more information on %s."
(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

View file

@ -1,5 +1,10 @@
2013-05-21 Glenn Morris <rgm@gnu.org>
* 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.

View file

@ -378,6 +378,8 @@ This function is a possible value for `erc-generate-log-file-name-function'."
;; 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 #channel!nick@network.txt.

View file

@ -235,8 +235,13 @@ with args, toggle notify status of people."
(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)

View file

@ -206,7 +206,7 @@ have fast storage with limited space, such as a RAM disk."
(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))

View file

@ -1104,8 +1104,7 @@ system which uses fontsets)."
(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")

View file

@ -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 @@ local gurus."
;; 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 jam@austin.asc.slb.com (James A. McLaughlin);
;; simplified by WJC after more feedmail development;
;; idea (but not implementation) of copying smtpmail trace buffer to

View file

@ -183,17 +183,15 @@ as Rmail does."
(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.

View file

@ -4105,6 +4105,9 @@ The message should be narrowed to just the headers."
(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 @@ The variable `rmail-retry-ignored-headers' is a regular expression
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)

View file

@ -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 @@ lines for the purposes of this function."
;;
;;;----------------------------------------------------------------------------
(require 'tempo)
;; Perform a completing-read with info given
;;
(defun snmp-completing-read (prompt table &optional pred require init hist)

View file

@ -3429,7 +3429,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference."
((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))

View file

@ -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 @@ The rest of the elements are undefined."
(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 @@ Only for internal use by `prolog-find-documentation'")
(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))

View file

@ -1449,6 +1449,8 @@ Keymap summary
(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))

View file

@ -238,12 +238,13 @@ of master file."
;; \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)))

View file

@ -1,3 +1,10 @@
2013-05-21 Glenn Morris <rgm@gnu.org>
* 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 <rgm@gnu.org>
* url-news.el (url-news): Remove empty custom group.

View file

@ -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 @@ Returns t if the lock was successfully released."
(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

View file

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