Gnus development mailing list
 help / color / mirror / Atom feed
* *Group* last line behavior
@ 2003-02-24  0:07 Martin Thornquist
  2003-02-24  3:26 ` Jesper Harder
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin Thornquist @ 2003-02-24  0:07 UTC (permalink / raw)


Something that has bugged me for a while is that RET on the last
(empty) line in *Group* signals an error, while the same in *Summary*
selects the last article. So I fixed it. The following patches gives
*Group* (what I think is) consistent behavior with *Summary*, both in
topic and non-topic view. I have been using these patches for about a
week now without discovering any unforeseen consequences, but there
could of course always be some.

This is little enough not to require paperwork if included in Gnus,
right?


Index: lisp/gnus-group.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-group.el,v
retrieving revision 6.101
diff -u -r6.101 gnus-group.el
--- lisp/gnus-group.el	14 Feb 2003 20:28:13 -0000	6.101
+++ lisp/gnus-group.el	24 Feb 2003 00:20:51 -0000
@@ -1876,6 +1876,9 @@
 If ALL is non-nil, already read articles become readable.
 If ALL is a number, fetch this number of articles."
   (interactive "P")
+  (when (and (= (point) (point-max))
+	     (not (gnus-group-group-name)))
+    (forward-line -1))
   (gnus-group-read-group all t))
 
 (defun gnus-group-quick-select-group (&optional all)


Index: lisp/gnus-topic.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
retrieving revision 6.36
diff -u -r6.36 gnus-topic.el
--- lisp/gnus-topic.el	19 Feb 2003 23:45:34 -0000	6.36
+++ lisp/gnus-topic.el	24 Feb 2003 00:21:17 -0000
@@ -1180,7 +1180,10 @@
 
 If performed over a topic line, toggle folding the topic."
   (interactive "P")
-  (if (gnus-group-topic-p)
+  (when (and (= (point) (point-max))
+	     (not (gnus-group-group-name)))
+    (forward-line -1))
+ (if (gnus-group-topic-p)
       (let ((gnus-group-list-mode
 	     (if all (cons (if (numberp all) all 7) t) gnus-group-list-mode)))
 	(gnus-topic-fold all)


Martin
-- 
"An ideal world is left as an exercise to the reader."
                                                 -Paul Graham, On Lisp




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-24 21:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24  0:07 *Group* last line behavior Martin Thornquist
2003-02-24  3:26 ` Jesper Harder
2003-02-24 13:54 ` Kai Großjohann
2003-02-24 21:54 ` Lars Magne Ingebrigtsen

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).