changeset 85766:68503cda7180

(message-check-news-body-syntax): Avoid mm-string-as-multibyte. (message-hide-headers): Don't assume (point-min)==1.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 29 Oct 2007 20:07:57 +0000
parents f1a78e8d37f0
children 906201ddd466
files lisp/gnus/ChangeLog lisp/gnus/message.el
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Mon Oct 29 18:32:32 2007 +0000
+++ b/lisp/gnus/ChangeLog	Mon Oct 29 20:07:57 2007 +0000
@@ -1,3 +1,8 @@
+2007-10-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* message.el (message-check-news-body-syntax): Avoid mm-string-as-multibyte.
+	(message-hide-headers): Don't assume (point-min)==1.
+
 2007-10-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus.el: Bump version to Gnus v5.13.
--- a/lisp/gnus/message.el	Mon Oct 29 18:32:32 2007 +0000
+++ b/lisp/gnus/message.el	Mon Oct 29 20:07:57 2007 +0000
@@ -2877,6 +2877,8 @@
   ;; solution would be not to use `define-derived-mode', and run
   ;; `text-mode-hook' ourself at the end of the mode.
   ;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-19.
+  ;; This kludge is unneeded in Emacs>=21 since define-derived-mode is
+  ;; now careful to run parent hooks after the body.  --Stef
   (when auto-fill-function
     (setq auto-fill-function normal-auto-fill-function)))
 
@@ -4952,7 +4954,7 @@
    ;; Check for control characters.
    (message-check 'control-chars
      (if (re-search-forward
-	  (mm-string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]")
+	  (mm-string-to-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]")
 	  nil t)
 	 (y-or-n-p
 	  "The article contains control characters.  Really post? ")
@@ -7672,7 +7674,7 @@
 		   message-hidden-headers))
 	(inhibit-point-motion-hooks t)
 	(after-change-functions nil)
-	(end-of-headers 0))
+	(end-of-headers (point-min)))
     (when regexps
       (save-excursion
 	(save-restriction
@@ -7687,11 +7689,11 @@
 		(setq header (buffer-substring begin (point))
 		      header-len (- (point) begin))
 		(delete-region begin (point))
-		(goto-char (1+ end-of-headers))
+		(goto-char end-of-headers)
 		(insert header)
 		(setq end-of-headers
 		      (+ end-of-headers header-len))))))))
-    (narrow-to-region (1+ end-of-headers) (point-max))))
+    (narrow-to-region end-of-headers (point-max))))
 
 (defun message-hide-header-p (regexps)
   (let ((result nil)