* mh-e/mh-comp.el (mh-send-letter):
[bpt/emacs.git] / lisp / mh-e / mh-letter.el
index 7eae03f..dcb8d85 100644 (file)
@@ -1,7 +1,8 @@
 ;;; mh-letter.el --- MH-Letter mode
 
 ;; Copyright (C) 1993, 1995, 1997,
-;;  2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -310,7 +311,8 @@ order).
   (mh-do-in-gnu-emacs
     (unless mh-letter-tool-bar-map
       (mh-tool-bar-letter-buttons-init))
-    (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
+    (if (boundp 'tool-bar-map)
+        (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)))
   (mh-do-in-xemacs
     (mh-tool-bar-init :letter))
   ;; Set the local value of mh-mail-header-separator according to what is
@@ -616,7 +618,7 @@ a copy of the draft."
                                   mh-default-folder-for-message-function)))
                           "")
                       t)))
-  (let ((last-input-char ?\C-f))
+  (let ((last-input-event ?\C-f))
     (expand-abbrev)
     (save-excursion
       (mh-to-field)
@@ -646,10 +648,10 @@ Create the field if it does not exist.
 Set the mark to point before moving."
   (interactive)
   (expand-abbrev)
-  (let ((target (cdr (or (assoc (char-to-string (logior last-input-char ?`))
+  (let ((target (cdr (or (assoc (char-to-string (logior last-input-event ?`))
                                 mh-to-field-choices)
                          ;; also look for a char for version 4 compat
-                         (assoc (logior last-input-char ?`)
+                         (assoc (logior last-input-event ?`)
                                 mh-to-field-choices))))
         (case-fold-search t))
     (push-mark)
@@ -657,7 +659,7 @@ Set the mark to point before moving."
            (let ((eol (point)))
              (skip-chars-backward " \t")
              (delete-region (point) eol))
-           (if (and (not (eq (logior last-input-char ?`) ?s))
+           (if (and (not (eq (logior last-input-event ?`) ?s))
                     (save-excursion
                       (backward-char 1)
                       (not (looking-at "[:,]"))))
@@ -874,7 +876,7 @@ downcasing the field name."
 
 ;;;###mh-autoload
 (defun mh-complete-word (word choices begin end)
-  "Complete WORD at from CHOICES.
+  "Complete WORD from CHOICES.
 Any match found replaces the text from BEGIN to END."
   (let ((completion (try-completion word choices))
         (completions-buffer "*Completions*"))