* gnus.el (gnus-version-number): Update version.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Jan 2002 02:21:12 +0000 (02:21 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Jan 2002 02:21:12 +0000 (02:21 +0000)
* message.el (message-text-with-property): Renamed and moved
here.
(message-fix-before-sending): Highlight invisible text and place
point there.

lisp/ChangeLog
lisp/gnus-ems.el
lisp/gnus-util.el
lisp/gnus.el
lisp/message.el

index 7f3b9be..7751f08 100644 (file)
@@ -1,3 +1,12 @@
+2002-01-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus.el (gnus-version-number): Update version.
+
+       * message.el (message-text-with-property): Renamed and moved
+       here. 
+       (message-fix-before-sending): Highlight invisible text and place
+       point there. 
+
 2002-01-01 02:32:53 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no>
 
        * gnus.el: Oort Gnus v0.04 is released. 
index 61ab874..302cffb 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-ems.el --- functions for making Gnus work under different Emacsen
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -302,7 +302,7 @@ for XEmacs."
   (insert-image glyph string))
 
 (defun gnus-remove-image (image)
-  (dolist (position (gnus-text-with-property 'display))
+  (dolist (position (message-text-with-property 'display))
     (when (equal (get-text-property position 'display) image)
       (put-text-property position (1+ position) 'display nil))))
 
index 2193f3b..3d8b9a1 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-util.el --- utility functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
        (delete-char 1))
       (goto-char (next-single-property-change (point) prop nil (point-max))))))
 
-(defun gnus-text-with-property (prop)
-  "Return a list of all points where the text has PROP."
-  (let ((points nil)
-       (point (point-min)))
-    (save-excursion
-      (while (< point (point-max))
-       (when (get-text-property point prop)
-         (push point points))
-       (incf point)))
-    (nreverse points)))
-
 (require 'nnheader)
 (defun gnus-newsgroup-directory-form (newsgroup)
   "Make hierarchical directory name from NEWSGROUP name."
index f20cb00..b17a0a0 100644 (file)
@@ -267,7 +267,7 @@ is restarted, and sometimes reloaded."
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "0.04"
+(defconst gnus-version-number "0.05"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Oort Gnus v%s" gnus-version-number)
index 346461c..e0d489e 100644 (file)
@@ -1,5 +1,5 @@
 ;;; message.el --- composing mail and news messages
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -2600,6 +2600,17 @@ It should typically alter the sending method in some way or other."
 (put 'message-check 'lisp-indent-function 1)
 (put 'message-check 'edebug-form-spec '(form body))
 
+(defun message-text-with-property (prop)
+  "Return a list of all points where the text has PROP."
+  (let ((points nil)
+       (point (point-min)))
+    (save-excursion
+      (while (< point (point-max))
+       (when (get-text-property point prop)
+         (push point points))
+       (incf point)))
+    (nreverse points)))
+
 (defun message-fix-before-sending ()
   "Do various things to make the message nice before sending it."
   ;; Make sure there's a newline at the end of the message.
@@ -2608,11 +2619,15 @@ It should typically alter the sending method in some way or other."
     (insert "\n"))
   ;; Delete all invisible text.
   (message-check 'invisible-text
-    (when (text-property-any (point-min) (point-max) 'invisible t)
-      (put-text-property (point-min) (point-max) 'invisible nil)
-      (unless (yes-or-no-p
-              "Invisible text found and made visible; continue posting? ")
-       (error "Invisible text found and made visible")))))
+    (let ((points (message-text-with-property 'invisible)))
+      (when points
+       (goto-char (car point))
+       (dolist (point points)
+         (add-text-properties point (1+ point)
+                              '(invisible nil highlight t)))
+       (unless (yes-or-no-p
+                "Invisible text found and made visible; continue posting? ")
+         (error "Invisible text found and made visible"))))))
 
 (defun message-add-action (action &rest types)
   "Add ACTION to be performed when doing an exit of type TYPES."