From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4045 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: [sgnus 0.14] hack to gnus-topic for XEmacs Date: 18 Nov 1995 21:39:22 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035144850 28380 80.91.224.250 (20 Oct 2002 20:14:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:14:10 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id WAA19089 for ; Sat, 18 Nov 1995 22:19:38 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 19 Nov 1995 06:39:26 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id VAA18709; Sat, 18 Nov 1995 21:39:24 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ Original-Lines: 66 X-Mailer: September Gnus v0.14 Xref: main.gmane.org gmane.emacs.gnus.general:4045 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4045 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