Synch to No Gnus 200401081739.
[elisp/gnus.git-] / lisp / message.el
index 6784330..c6559e4 100644 (file)
   (require 'smtp)
   (defvar gnus-message-group-art)
   (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
-(eval-and-compile
-  (if (boundp 'MULE)
-      (progn
-       (require 'base64)
-       (require 'canlock-om))
-    (require 'canlock)))
+(require 'canlock)
 (require 'mailheader)
 (require 'nnheader)
 ;; This is apparently necessary even though things are autoloaded.
@@ -667,15 +662,13 @@ Done before generating the new subject of a forward."
   (if (string-match "[[:digit:]]" "1") ;; support POSIX?
       "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|}+]\\)+"
     ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
-    (let ((old-table (syntax-table))
-         non-word-constituents)
-      (set-syntax-table text-mode-syntax-table)
-      (setq non-word-constituents
-           (concat
-            (if (string-match "\\w" "-")  "" "-")
-            (if (string-match "\\w" "_")  "" "_")
-            (if (string-match "\\w" ".")  "" ".")))
-      (set-syntax-table old-table)
+    (let (non-word-constituents)
+      (with-syntax-table text-mode-syntax-table
+       (setq non-word-constituents
+             (concat
+              (if (string-match "\\w" "-")  "" "-")
+              (if (string-match "\\w" "_")  "" "_")
+              (if (string-match "\\w" ".")  "" "."))))
       (if (equal non-word-constituents "")
          "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+"
        (concat "\\([ \t]*\\(\\w\\|["
@@ -1206,9 +1199,6 @@ actually occur."
 (defvar message-user-agent nil
   "String of the form of PRODUCT/VERSION.  Used for User-Agent header field.")
 
-(static-when (boundp 'MULE)
-  (require 'reporter));; `define-mail-user-agent' is here.
-
 ;;;###autoload
 (define-mail-user-agent 'message-user-agent
   'message-mail 'message-send-and-exit
@@ -1752,8 +1742,6 @@ no, only reply back to the author."
   (autoload 'message-setup-toolbar "messagexmas")
   (autoload 'mh-new-draft-name "mh-comp")
   (autoload 'mh-send-letter "mh-comp")
-  (autoload 'gnus-point-at-eol "gnus-util")
-  (autoload 'gnus-point-at-bol "gnus-util")
   (autoload 'gnus-output-to-rmail "gnus-util")
   (autoload 'gnus-output-to-mail "gnus-util")
   (autoload 'nndraft-request-associate-buffer "nndraft")
@@ -3743,10 +3731,9 @@ Instead, just auto-save the buffer and then bury it."
 
 (defun message-delete-frame (frame org-frame)
   "Delete frame for editing message."
-  (when (and (or (static-if (featurep 'xemacs)
-                    (device-on-window-system-p)
-                  window-system)
-                (>= emacs-major-version 20))
+  (when (and (static-if (featurep 'xemacs)
+                (device-on-window-system-p)
+              window-system)
             (or (and (eq message-delete-frame-on-exit t)
                      (select-frame frame)
                      (or (eq frame org-frame)
@@ -3951,7 +3938,7 @@ used to distinguish whether the invisible text is a MIME part or not."
                                           font-lock-face highlight))))
       (when hidden-start
        (goto-char hidden-start)
-       (set-window-start (selected-window) (gnus-point-at-bol))
+       (set-window-start (selected-window) (point-at-bol))
        (unless (yes-or-no-p
                 "Invisible text found and made visible; continue sending? ")
          (error "Invisible text found and made visible")))))
@@ -5023,7 +5010,6 @@ Otherwise, generate and save a value for `canlock-password' first."
   "Process Fcc headers in the current buffer."
   (let ((case-fold-search t)
        (coding-system-for-write 'raw-text)
-       (output-coding-system 'raw-text)
        list file
        (mml-externalize-attachments message-fcc-externalize-attachments))
     (save-excursion
@@ -5665,7 +5651,7 @@ Headers already prepared in the buffer are not modified."
                      (forward-line -1)))
                ;; The value of this header was empty, so we clear
                ;; totally and insert the new value.
-               (delete-region (point) (gnus-point-at-eol))
+               (delete-region (point) (point-at-eol))
                ;; If the header is optional, and the header was
                ;; empty, we can't insert it anyway.
                (unless optionalp
@@ -5899,7 +5885,7 @@ beginning of line."
           (message-point-in-header-p))
       (let* ((here (point))
             (bol (progn (beginning-of-line n) (point)))
-            (eol (gnus-point-at-eol))
+            (eol (point-at-eol))
             (eoh (re-search-forward ": *" eol t)))
        (if (or (not eoh) (equal here eoh))
            (goto-char bol)
@@ -5950,10 +5936,9 @@ beginning of line."
 (defun message-pop-to-buffer (name)
   "Pop to buffer NAME, and warn if it already exists and is modified."
   (let ((buffer (get-buffer name))
-       (pop-up-frames (and (or (static-if (featurep 'xemacs)
-                                   (device-on-window-system-p)
-                                 window-system)
-                               (>= emacs-major-version 20))
+       (pop-up-frames (and (static-if (featurep 'xemacs)
+                               (device-on-window-system-p)
+                             window-system)
                            message-use-multi-frames)))
     (if (and buffer
             (buffer-name buffer))
@@ -6160,9 +6145,7 @@ are not included."
                              message-auto-save-directory))
       (setq buffer-auto-save-file-name (make-auto-save-file-name)))
     (clear-visited-file-modtime)
-    (static-if (boundp 'MULE)
-       (set-file-coding-system message-draft-coding-system)
-      (setq buffer-file-coding-system message-draft-coding-system))))
+    (setq buffer-file-coding-system message-draft-coding-system)))
 
 (defun message-disassociate-draft ()
   "Disassociate the message buffer from the drafts directory."