From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: loading spam.el and gnus-registry.el with set variables only
Date: Thu, 09 Oct 2003 14:00:43 -0400 [thread overview]
Message-ID: <4n8ynutho4.fsf@lockgroove.bwh.harvard.edu> (raw)
In-Reply-To: <v9brsq2xc3.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Thu, 09 Oct 2003 18:24:28 +0200")
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On Thu, 09 Oct 2003, 4.uce.03.r.s@nurfuerspam.de wrote:
> The importance of the order seems quite fragile to me, isn't it?
Definitely, that's why I'd like to make it simpler and more robust.
> I'd use functions, say `gnus-registry-initialize' and
> `spam-initialize' (or -install?) and autoload those functions:
Excellent, I don't know why I didn't think of something so obvious.
Thanks a lot, Reiner! Let me know if the attached patch looks OK.
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: autoloading-registry-and-spam.patch --]
[-- Type: text/x-patch, Size: 1776 bytes --]
? autoloading-registry-and-spam.patch
Index: gnus-registry.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-registry.el,v
retrieving revision 6.33
diff -u -r6.33 gnus-registry.el
--- gnus-registry.el 8 Sep 2003 18:25:57 -0000 6.33
+++ gnus-registry.el 9 Oct 2003 18:00:31 -0000
@@ -569,6 +569,14 @@
(setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
(setq gnus-registry-dirty t))
+;;;###autoload
+(defun gnus-registry-initialize ()
+ (interactive)
+ (setq gnus-registry-install t)
+ (gnus-registry-install-hooks)
+ (gnus-registry-read))
+
+;;;###autoload
(defun gnus-registry-install-hooks ()
"Install the registry hooks."
(interactive)
Index: spam.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/spam.el,v
retrieving revision 6.116
diff -u -r6.116 spam.el
--- spam.el 3 Oct 2003 18:58:33 -0000 6.116
+++ spam.el 9 Oct 2003 18:00:32 -0000
@@ -370,13 +370,6 @@
"Msx" gnus-summary-mark-as-spam
"\M-d" gnus-summary-mark-as-spam)
-;;; How to highlight a spam summary line.
-
-;; TODO: How do we redo this every time spam-face is customized?
-
-(push '((eq mark gnus-spam-mark) . spam-face)
- gnus-summary-highlight)
-
;; convenience functions
(defun spam-group-ham-mark-p (group mark &optional spam)
(when (stringp group)
@@ -1222,6 +1215,15 @@
nil))
\f
;;;; Hooks
+
+;;;###autoload
+(defun spam-initialize ()
+ (interactive)
+ (setq spam-install-hooks t)
+ (spam-install-hooks-function)
+ ;; TODO: How do we redo this every time spam-face is customized?
+ (push '((eq mark gnus-spam-mark) . spam-face)
+ gnus-summary-highlight))
;;;###autoload
(defun spam-install-hooks-function ()
next prev parent reply other threads:[~2003-10-09 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 18:44 Ted Zlatanov
2003-10-09 14:42 ` Ted Zlatanov
2003-10-09 16:24 ` Reiner Steib
2003-10-09 18:00 ` Ted Zlatanov [this message]
2003-10-09 19:37 ` Reíner Steib
2003-10-09 19:51 ` Ted Zlatanov
2003-10-10 16:05 ` Ted Zlatanov
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=4n8ynutho4.fsf@lockgroove.bwh.harvard.edu \
--to=tzz@lifelogs.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).