Gnus development mailing list
 help / color / mirror / Atom feed
* [sgnus 0.14] hack to gnus-topic for XEmacs
@ 1995-11-19  5:39 Steven L. Baur
  0 siblings, 0 replies; only message in thread
From: Steven L. Baur @ 1995-11-19  5:39 UTC (permalink / raw)


Gnus-topic loses on XEmacs when unfolding due to the reinserted groups
being given the text properties of the following topic tag.  The
advertised property of start-open that should defeat this behavior
does not appear to work.

The following patch gives some semblance of normal behavior, but will
only act naturally when the entire line is set to mouse highlight.
This patch should be GNU Emacs safe, but I don't have a working GNU
Emacs to test it with.

What this patch does is set the 'start-open and 'end-open properties
on all topic tags (and corrects a bug which made mouse highlighting
not work).  Then when inserting the group lines of a topic, the newly
inserted region boundaries are saved, and the 'face and 'gnus-topic
properties are removed.  On XEmacs this leaves an inherited/unwanted
highlight property as stated above (the highlight property can't be
wiped out indiscriminantly due its being set by the
gnus-group-insert-group-line function).

--- gnus-topic.el.orig	Sat Nov 18 19:40:28 1995
+++ gnus-topic.el	Sat Nov 18 21:18:43 1995
@@ -111,8 +111,10 @@
 	       (progn
 		 (insert topic "\n")
 		 (1- (point)))
-	       (list 'mouse-face gnus-mouse-face
+	       (list gnus-mouse-face-prop gnus-mouse-face
 		     'face gnus-group-topic-face
+		     'start-open t
+		     'end-open t
 		     'gnus-topic topic)))
 
 	    ;; We insert the groups for the topics we want to have. 
@@ -124,15 +126,19 @@
 		  (setq gnus-topics-not-listed
 			(delete topic gnus-topics-not-listed))
 		  (setq tlist (nreverse tlist))
-		  (while tlist
-		    (setq info (car tlist))
-		    (gnus-group-insert-group-line 
-		     nil (gnus-info-group info)
-		     (gnus-info-level info) (gnus-info-marks info) 
-		     (car (gnus-gethash (gnus-info-group info)
-					gnus-newsrc-hashtb))
-		     (gnus-info-method info))
-		    (setq tlist (cdr tlist))))
+		  (let ((beg (point)))
+		    (while tlist
+		      (setq info (car tlist))
+		      (gnus-group-insert-group-line 
+		       nil (gnus-info-group info)
+		       (gnus-info-level info) (gnus-info-marks info) 
+		       (car (gnus-gethash (gnus-info-group info)
+					  gnus-newsrc-hashtb))
+		       (gnus-info-method info))
+		      (setq tlist (cdr tlist)))
+		    (remove-text-properties beg (point)
+					    (list 'face nil
+						  'gnus-topic nil))))
 	      ;; This one is hiddent.
 	      (push topic gnus-topics-not-listed))))))
 


-- 
steve@miranova.com baur


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-11-19  5:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-19  5:39 [sgnus 0.14] hack to gnus-topic for XEmacs Steven L. Baur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).