Gnus development mailing list
 help / color / mirror / Atom feed
* Wrong use of "path" in spam.el
@ 2006-12-26 17:33 Reiner Steib
  2006-12-27 13:53 ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2006-12-26 17:33 UTC (permalink / raw)


Hi,

in GNU, we use the term "path" only for a list of directories to
search, like the value of PATH.  So we should *not* use "path" in in
all those `spam-*-path' variables and doc strings.  We should rename
those variables to `spam-*-program' and mark the former as obsolete.

I'm not 100% sure that it's a good idea to do this now (while Emacs 22
is in pretest), but OTOH spam.el was not part of Emacs 21 so it's
probably better to do it now so that Emacs 22 will have the right
names.  Opinions?

I've installed this change in v5-10 now.  If people think that we
should _not_ do this now, I will install it only in the trunk instead.

Bye, Reiner.

--8<---------------cut here---------------start------------->8---
--- spam.el	21 Mar 2006 12:54:04 +0100	6.146.2.18
+++ spam.el	26 Dec 2006 18:25:37 +0100	
@@ -351,17 +351,21 @@
   "Spam ifile configuration."
   :group 'spam)
 
-(defcustom spam-ifile-path (executable-find "ifile")
-  "File path of the ifile executable program."
+(defcustom spam-ifile-program (executable-find "ifile")
+  "Name of the ifile program."
   :type '(choice (file :tag "Location of ifile")
 		 (const :tag "ifile is not installed"))
   :group 'spam-ifile)
+(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program)
+;; "22.1" ;; Gnus 5.10.9
 
-(defcustom spam-ifile-database-path nil
-  "File path of the ifile database."
+(defcustom spam-ifile-database nil
+  "File name of the ifile database."
   :type '(choice (file :tag "Location of the ifile database")
 		 (const :tag "Use the default"))
   :group 'spam-ifile)
+(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database)
+;; "22.1" ;; Gnus 5.10.9
 
 (defcustom spam-ifile-spam-category "spam"
   "Name of the spam ifile category."
@@ -386,11 +390,13 @@
   "Spam bogofilter configuration."
   :group 'spam)
 
-(defcustom spam-bogofilter-path (executable-find "bogofilter")
-  "File path of the Bogofilter executable program."
+(defcustom spam-bogofilter-program (executable-find "bogofilter")
+  "Name of the Bogofilter program."
   :type '(choice (file :tag "Location of bogofilter")
 		 (const :tag "Bogofilter is not installed"))
   :group 'spam-bogofilter)
+(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program)
+;; "22.1" ;; Gnus 5.10.9
 
 (defcustom spam-bogofilter-header "X-Bogosity"
   "The header that Bogofilter inserts in messages."
@@ -423,7 +429,8 @@
   :group 'spam-bogofilter)
 
 (defcustom spam-bogofilter-database-directory nil
-  "Directory path of the Bogofilter databases."
+  "Location of the Bogofilter database.
+When nil, use the default location."
   :type '(choice (directory
 		  :tag "Location of the Bogofilter database directory")
 		 (const :tag "Use the default"))
@@ -434,8 +441,8 @@
   :group 'spam)
 
 (defcustom spam-spamoracle-database nil
-  "Location of spamoracle database file. When nil, use the default
-spamoracle database."
+  "Location of spamoracle database file.
+When nil, use the default spamoracle database."
   :type '(choice (directory :tag "Location of spamoracle database file.")
 		 (const :tag "Use the default"))
   :group 'spam-spamoracle)
@@ -1370,11 +1377,12 @@
 ;;; check the ifile backend; return nil if the mail was NOT classified
 ;;; as spam
 
+
 (defun spam-get-ifile-database-parameter ()
-  "Get the command-line parameter for ifile's database from
-  spam-ifile-database-path."
-  (if spam-ifile-database-path
-      (format "--db-file=%s" spam-ifile-database-path)
+  "Return the command-line parameter for ifile's database.
+See `spam-ifile-database'."
+  (if spam-ifile-database
+      (format "--db-file=%s" spam-ifile-database)
     nil))
 
 (defun spam-check-ifile ()
@@ -1390,7 +1398,7 @@
 	(save-excursion
 	  (set-buffer article-buffer-name)
 	  (apply 'call-process-region
-		 (point-min) (point-max) spam-ifile-path
+		 (point-min) (point-max) spam-ifile-program
 		 nil temp-buffer-name nil "-c"
 		 (if db-param `(,db-param "-q") `("-q"))))
 	;; check the return now (we're back in the temp buffer)
@@ -1418,7 +1426,7 @@
 	  (when (stringp article-string)
 	    (insert article-string))))
       (apply 'call-process-region
-	     (point-min) (point-max) spam-ifile-path
+	     (point-min) (point-max) spam-ifile-program
 	     nil nil nil
 	     add-or-delete-option category
 	     (if db `(,db "-h") `("-h"))))))
@@ -1702,7 +1710,7 @@
 	  (set-buffer article-buffer-name)
 	  (apply 'call-process-region
 		 (point-min) (point-max)
-		 spam-bogofilter-path
+		 spam-bogofilter-program
 		 nil temp-buffer-name nil
 		 (if db `("-d" ,db "-v") `("-v"))))
 	(setq return (spam-check-bogofilter-headers score))))
@@ -1728,7 +1736,7 @@
 
 	  (apply 'call-process-region
 		 (point-min) (point-max)
-		 spam-bogofilter-path
+		 spam-bogofilter-program
 		 nil nil nil switch
 		 (if db `("-d" ,db "-v") `("-v"))))))))
 
--8<---------------cut here---------------end--------------->8---
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

end of thread, other threads:[~2006-12-28 19:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-26 17:33 Wrong use of "path" in spam.el Reiner Steib
2006-12-27 13:53 ` Ted Zlatanov
2006-12-27 16:50   ` Reiner Steib
2006-12-27 19:24     ` Ted Zlatanov
2006-12-27 21:49       ` Reiner Steib
2006-12-27 23:31         ` Miles Bader
2006-12-28 14:57           ` Reiner Steib
2006-12-28 19:55         ` Reiner Steib

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