+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.
(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))
;; 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)
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)
(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? "
(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
(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."
(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)
(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
(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."
(lookup-key global-map "\t")
'indent-relative)))))
+(defvar mail-abbrev-mode-regexp)
+
(defun message-completion-function ()
(let ((alist message-completion-alist))
(while (and alist
(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))))
;;; 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