Gnus development mailing list
 help / color / mirror / Atom feed
From: Didier Verna <didier@lrde.epita.fr>
Subject: [PATCH] select-method widget
Date: 22 May 2000 15:16:28 +0200	[thread overview]
Message-ID: <muxln12n2s3.fsf@uzeb.lrde.epita.fr> (raw)


	Dear folks,

If there's no objection, I will apply the following patch to the CVS archive.

When using personal backends and notably loading them after gnus itself, the
select-method widget should be recomputed in order to know the new backend and
avoid mismatches in custom buffers.


2000-05-22  Didier Verna  <didier@lrde.epita.fr>

	* gnus.el (gnus-redefine-select-method-widget): new function, call
	it once.
	* gnus-start.el (gnus-declare-backend): use it.


Index: lisp/gnus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v
retrieving revision 5.136
diff -u -w -r5.136 gnus.el
--- lisp/gnus.el	2000/05/06 21:43:18	5.136
+++ lisp/gnus.el	2000/05/22 13:14:13
@@ -1288,6 +1288,9 @@
 				   (const :format "%v " virtual)
 				   (const respool)))))

+(defun gnus-redefine-select-method-widget ()
+  "Recomputes the select-method widget based on the value of
+`gnus-valid-select-methods'."
 (define-widget 'gnus-select-method 'list
   "Widget for entering a select method."
   :value '(nntp "")
@@ -1302,8 +1305,11 @@
 		  :inline t
 		  (list :format "%v"
 			variable
-			(sexp :tag "Value")))))
+			  (sexp :tag "Value"))))
+    ))

+(gnus-redefine-select-method-widget)
+
 (defcustom gnus-updated-mode-lines '(group article summary tree)
   "List of buffers that should update their mode lines.
 The list may contain the symbols `group', `article', `tree' and
Index: lisp/gnus-start.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-start.el,v
retrieving revision 5.53
diff -u -w -r5.53 gnus-start.el
--- lisp/gnus-start.el	2000/05/17 04:18:53	5.53
+++ lisp/gnus-start.el	2000/05/22 13:14:18
@@ -2651,7 +2651,8 @@
   "Declare backend NAME with ABILITIES as a Gnus backend."
   (setq gnus-valid-select-methods
 	(nconc gnus-valid-select-methods
-	       (list (apply 'list name abilities)))))
+	       (list (apply 'list name abilities))))
+  (gnus-redefine-select-method-widget))

 (defun gnus-set-default-directory ()
   "Set the default directory in the current buffer to `gnus-default-directory'.

--
    /     /   _   _       Didier Verna        http://www.inf.enst.fr/~verna/
 - / / - / / /_/ /        EPITA / LRDE         mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ /      14-16 rue Voltaire        Tel. +33 (1) 44 08 01 77
                   94276 Kremlin-Bicêtre cedex   Fax. +33 (1) 44 08 01 99



             reply	other threads:[~2000-05-22 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-22 13:16 Didier Verna [this message]
2000-05-22 14:24 ` Per Abrahamsen
2000-05-22 15:13   ` Didier Verna

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=muxln12n2s3.fsf@uzeb.lrde.epita.fr \
    --to=didier@lrde.epita.fr \
    /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).