Commit 99c2a4e3 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/gnus/message.el (message-expand-name): Don't trust the return value of

bbdb-complete-name.
(message-check-news-header-syntax): Remove unused var `start'.
(message-idna-to-ascii-rhs-1): Remove unused vars `rhs' and `address'.
(message-inhibit-body-encoding): Move to before first use.
(mail-abbrev-mode-regexp, Expires, User-Agent, Lines, Distribution)
(To, References, In-Reply-To, Newsgroups, Subject, Path, From)
(Organization, Message-ID, Date, mh-previous-window-config):
Defvar the vars using dynamic scoping.
parent d76c843e
2011-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
* message.el (message-expand-name): Don't trust the return value of
bbdb-complete-name.
(message-check-news-header-syntax): Remove unused var `start'.
(message-idna-to-ascii-rhs-1): Remove unused vars `rhs' and `address'.
(message-inhibit-body-encoding): Move to before first use.
(mail-abbrev-mode-regexp, Expires, User-Agent, Lines, Distribution)
(To, References, In-Reply-To, Newsgroups, Subject, Path, From)
(Organization, Message-ID, Date, mh-previous-window-config):
Defvar the vars using dynamic scoping.
2011-02-01 Lars Ingebrigtsen <larsi@gnus.org>
 
* shr.el (shr-render-td): Only do colours at the final rendering.
......
......@@ -4345,7 +4345,8 @@ This function could be useful in `message-setup-hook'."
(tembuf (message-generate-new-buffer-clone-locals " message temp"))
(curbuf (current-buffer))
(id (message-make-message-id)) (n 1)
plist total header required-mail-headers)
required-mail-headers ;FIXME: Unused, right? --Stef
plist total header)
(while (not (eobp))
(if (< (point-max) (+ p message-send-mail-partially-limit))
(goto-char (point-max))
......@@ -4677,6 +4678,8 @@ to find out how to use this."
;; should never happen
(t (error "qmail-inject reported unknown failure"))))
(defvar mh-previous-window-config)
(defun message-send-mail-with-mh ()
"Send the prepared message buffer with mh."
(let ((mh-previous-window-config nil)
......@@ -4897,8 +4900,7 @@ Otherwise, generate and save a value for `canlock-password' first."
t))
;; Check long header lines.
(message-check 'long-header-lines
(let ((start (point))
(header nil)
(let ((header nil)
(length 0)
found)
(while (and (not found)
......@@ -4907,7 +4909,6 @@ Otherwise, generate and save a value for `canlock-password' first."
(setq found t
length (- (point) (match-beginning 0)))
(setq header (match-string-no-properties 1)))
(setq start (match-beginning 0))
(forward-line 1))
(if found
(y-or-n-p (format "Your %s header is too long (%d). Really post? "
......@@ -5750,7 +5751,7 @@ subscribed address (and not the additional To and Cc header contents)."
(defun message-idna-to-ascii-rhs-1 (header)
"Interactively potentially IDNA encode domain names in HEADER."
(let ((field (message-fetch-field header))
rhs ace address)
ace)
(when field
(dolist (rhs
(mm-delete-duplicates
......@@ -5799,6 +5800,21 @@ See `message-idna-encode'."
(message-idna-to-ascii-rhs-1 "Mail-Followup-To")
(message-idna-to-ascii-rhs-1 "Cc")))))
(defvar Date)
(defvar Message-ID)
(defvar Organization)
(defvar From)
(defvar Path)
(defvar Subject)
(defvar Newsgroups)
(defvar In-Reply-To)
(defvar References)
(defvar To)
(defvar Distribution)
(defvar Lines)
(defvar User-Agent)
(defvar Expires)
(defun message-generate-headers (headers)
"Prepare article HEADERS.
Headers already prepared in the buffer are not modified."
......@@ -6759,7 +6775,8 @@ Useful functions to put in this list include:
(interactive)
(require 'gnus-sum) ; for gnus-list-identifiers
(let ((cur (current-buffer))
from subject date reply-to to cc
from subject date
reply-to to cc ;FIXME: These 3 seem to be unused? --Stef
references message-id follow-to
(inhibit-point-motion-hooks t)
(message-this-is-mail t)
......@@ -7280,7 +7297,7 @@ Optional DIGEST will use digest to forward."
(defun message-forward-make-body-digest-plain (forward-buffer)
(insert
"\n-------------------- Start of forwarded message --------------------\n")
(let ((b (point)) e)
(let ((b (point)) e) ;FIXME: Not used, right? --Stef
(mml-insert-buffer forward-buffer)
(setq e (point))
(insert
......@@ -7404,6 +7421,8 @@ is for the internal use."
(setq rmail-insert-mime-forwarded-message-function
'message-forward-rmail-make-body))
(defvar message-inhibit-body-encoding nil)
;;;###autoload
(defun message-resend (address)
"Resend the current article to ADDRESS."
......@@ -7790,6 +7809,8 @@ those headers."
(lookup-key global-map "\t")
'indent-relative)))))
(defvar mail-abbrev-mode-regexp)
(defun message-completion-function ()
(let ((alist message-completion-alist))
(while (and alist
......@@ -7867,7 +7888,12 @@ those headers."
(eudc-expand-inline))
((and (memq 'bbdb message-expand-name-databases)
(fboundp 'bbdb-complete-name))
(bbdb-complete-name))
(let ((starttick (buffer-modified-tick)))
(or (bbdb-complete-name)
;; Apparently, bbdb-complete-name can return nil even when
;; completion took place. So let's double check the buffer was
;; not modified.
(/= starttick (buffer-modified-tick)))))
(t
(expand-abbrev))))
......@@ -7928,8 +7954,6 @@ regexp VARSTR."
;;; MIME functions
;;;
(defvar message-inhibit-body-encoding nil)
(defun message-encode-message-body ()
(unless message-inhibit-body-encoding
(let ((mail-parse-charset (or mail-parse-charset
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment