]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/gnus-msg.el
; Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / gnus-msg.el
index b95bec2ace6879cce2fc082b11a37ed43fe36f82..8cabe01168b67861bb3732462ce1c9a79460ae8b 100644 (file)
@@ -28,7 +28,6 @@
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
-(require 'gnus-ems)
 (require 'message)
 (require 'gnus-art)
 (require 'gnus-util)
@@ -496,8 +495,6 @@ Thank you for your help in stamping out bugs.
             (let ((mbl1 mml-buffer-list))
               (setq mml-buffer-list mbl)  ;; Global value
               (set (make-local-variable 'mml-buffer-list) mbl1);; Local value
-              (gnus-make-local-hook 'kill-buffer-hook)
-              (gnus-make-local-hook 'change-major-mode-hook)
               (add-hook 'change-major-mode-hook 'mml-destroy-buffers nil t)
               (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))
           (mml-destroy-buffers)
@@ -594,11 +591,9 @@ instead."
 (defun gnus-inews-add-send-actions (winconf buffer article
                                            &optional config yanked
                                            winconf-name)
-  (gnus-make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
   (when gnus-agent
-    (gnus-make-local-hook 'message-header-hook)
     (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
   (setq message-post-method
        `(lambda (&optional arg)
@@ -1139,9 +1134,9 @@ See the variable `gnus-user-agent'."
           (gnus-v
            (when (memq 'gnus gnus-user-agent)
              (concat "Gnus/"
-                     (gnus-replace-in-string
-                      (format "%1.8f" (gnus-continuum-version gnus-version))
-                      "0+\\'" "")
+                     (replace-regexp-in-string
+                      "0+\\'" ""
+                      (format "%1.8f" (gnus-continuum-version gnus-version)))
                      " (" gnus-version ")")))
           (emacs-v (gnus-emacs-version)))
       (concat gnus-v (when (and gnus-v emacs-v) " ")
@@ -1347,7 +1342,7 @@ For the \"inline\" alternatives, also see the variable
   (gnus-inews-insert-gcc)
   (let ((gcc (mapcar
              (lambda (group)
-               (mm-encode-coding-string
+               (encode-coding-string
                 group
                 (gnus-group-name-charset (gnus-inews-group-method group)
                                          group)))
@@ -1364,7 +1359,7 @@ For the \"inline\" alternatives, also see the variable
             (insert "Gcc: \"" gnus-newsgroup-name "\"\n"))
            ((stringp self)
             (insert "Gcc: "
-                    (mm-encode-coding-string
+                    (encode-coding-string
                      (if (string-match " " self)
                          (concat "\"" self "\"")
                        self)
@@ -1403,7 +1398,7 @@ For the \"inline\" alternatives, also see the variable
        tem)
     (dolist (style styles)
       (when (stringp (cadr style))
-       (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
+       (setcdr style (list (decode-coding-string (cadr style) 'utf-8)))))
     (dolist (style (if styles
                       (append gnus-posting-styles (list (cons ".*" styles)))
                     gnus-posting-styles))
@@ -1496,7 +1491,7 @@ See `gnus-summary-mail-forward' for ARG."
        (message-goto-subject)
        (re-search-forward " *$")
        (replace-match " (crosspost notification)" t t)
-       (gnus-deactivate-mark)
+       (deactivate-mark)
        (when (gnus-y-or-n-p "Send this complaint? ")
          (message-send-and-exit))))))
 
@@ -1642,7 +1637,7 @@ this is a reply."
          ;; Copy the article over to some group(s).
          (while (setq group (pop groups))
            (setq method (gnus-inews-group-method group)
-                 group (mm-encode-coding-string
+                 group (encode-coding-string
                         group
                         (gnus-group-name-charset method group)))
            (unless (gnus-check-server method)
@@ -1663,8 +1658,7 @@ this is a reply."
              (run-hooks 'gnus-gcc-post-body-encode-hook)
              (save-restriction
                (message-narrow-to-headers)
-               (let* ((mail-parse-charset message-default-charset)
-                      (newsgroups-field (save-restriction
+               (let* ((newsgroups-field (save-restriction
                                           (message-narrow-to-headers-or-head)
                                           (message-fetch-field "Newsgroups")))
                       (followup-field (save-restriction
@@ -1845,8 +1839,8 @@ this is a reply."
          (when tmp-style
            (dolist (style tmp-style)
              (when (stringp (cadr style))
-               (setcdr style (list (mm-decode-coding-string (cadr style)
-                                                            'utf-8)))))
+               (setcdr style (list (decode-coding-string (cadr style)
+                                                         'utf-8)))))
            (setq styles (append styles (list (cons ".*" tmp-style)))))))
       ;; Go through all styles and look for matches.
       (dolist (style styles)
@@ -1909,10 +1903,10 @@ this is a reply."
                  (cond
                   ((stringp value)
                    (if (and matched-string
-                            (gnus-string-match-p "\\\\[&[:digit:]]" value)
+                            (string-match-p "\\\\[&[:digit:]]" value)
                             (match-beginning 1))
-                       (gnus-match-substitute-replacement value nil nil
-                                                          matched-string)
+                       (match-substitute-replacement value nil nil
+                                                     matched-string)
                      value))
                   ((or (symbolp value)
                        (functionp value))
@@ -1954,7 +1948,6 @@ this is a reply."
       (setq name (assq 'name results)
            address (assq 'address results))
       (setq results (delq name (delq address results)))
-      (gnus-make-local-hook 'message-setup-hook)
       (setq results (sort results (lambda (x y)
                                    (string-lessp (car x) (car y)))))
       (dolist (result results)
@@ -2006,10 +1999,6 @@ this is a reply."
                         (insert "From: " (message-make-from) "\n"))))
                  nil 'local)))))
 
-;;; Allow redefinition of functions.
-
-(gnus-ems-redefine)
-
 (provide 'gnus-msg)
 
 ;;; gnus-msg.el ends here