Gnus development mailing list
 help / color / mirror / Atom feed
From: steve@miranova.com (Steven L. Baur)
Subject: [sgnus 0.14] hack to gnus-topic for XEmacs
Date: 18 Nov 1995 21:39:22 -0800	[thread overview]
Message-ID: <m2buq9b1th.fsf@diana.miranova.com> (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


                 reply	other threads:[~1995-11-19  5:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2buq9b1th.fsf@diana.miranova.com \
    --to=steve@miranova.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).