aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2019-08-10 08:44:31 -0700
committerGlenn Morris2019-08-10 08:44:31 -0700
commitf47fc426df57aef9f5d9b52578bf183ef9c8d47f (patch)
tree242f2bc9dd6f696c48465789ea8b2e25838b7d41
parentce26bb35391c82f4aadc557e22a504a60d0c19d7 (diff)
parente7818cb73ff042cb557332c7ea954fd512c87f69 (diff)
downloademacs-f47fc426df57aef9f5d9b52578bf183ef9c8d47f.tar.gz
emacs-f47fc426df57aef9f5d9b52578bf183ef9c8d47f.zip
Merge from origin/emacs-26
e7818cb Fix nnmail-expiry-wait docs and custom :types 8b7c776 * lisp/simple.el (kill-do-not-save-duplicates): Doc fix. (Bu...
-rw-r--r--doc/misc/gnus.texi50
-rw-r--r--lisp/gnus/gnus-cus.el8
-rw-r--r--lisp/gnus/nnmail.el35
-rw-r--r--lisp/simple.el2
4 files changed, 51 insertions, 44 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index dcba47aca05..32d98abd7e3 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -2916,9 +2916,9 @@ See also @code{gnus-total-expirable-newsgroups}.
2916If the group parameter has an element that looks like 2916If the group parameter has an element that looks like
2917@code{(expiry-wait . 10)}, this value will override any 2917@code{(expiry-wait . 10)}, this value will override any
2918@code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function} 2918@code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2919(@pxref{Expiring Mail}) when expiring expirable messages. The value 2919settings (@pxref{Expiring Mail}) when expiring expirable messages.
2920can either be a number of days (not necessarily an integer) or the 2920The value can be either a number of days (not necessarily an integer),
2921symbols @code{never} or @code{immediate}. 2921or one of the symbols @code{never} or @code{immediate}.
2922 2922
2923@item expiry-target 2923@item expiry-target
2924@cindex expiry-target 2924@cindex expiry-target
@@ -15878,40 +15878,46 @@ don't really mix very well.
15878 15878
15879@vindex nnmail-expiry-wait 15879@vindex nnmail-expiry-wait
15880The @code{nnmail-expiry-wait} variable supplies the default time an 15880The @code{nnmail-expiry-wait} variable supplies the default time an
15881expirable article has to live. Gnus starts counting days from when the 15881expirable article has to live. The value of this variable can be
15882message @emph{arrived}, not from when it was sent. The default is seven 15882either a number of days (not necessarily an integer), or one of the
15883days. 15883symbols @code{immediate} or @code{never}, meaning an article is
15884immediately or never expirable, respectively.
15884 15885
15885Gnus also supplies a function that lets you fine-tune how long articles 15886Gnus starts counting days from when the message @emph{arrived}, not
15886are to live, based on what group they are in. Let's say you want to 15887from when it was sent. The default is seven days.
15887have one month expiry period in the @samp{mail.private} group, a one day
15888expiry period in the @samp{mail.junk} group, and a six day expiry period
15889everywhere else:
15890 15888
15891@vindex nnmail-expiry-wait-function 15889@vindex nnmail-expiry-wait-function
15890The @code{nnmail-expiry-wait-function} variable lets you fine-tune how
15891long articles are to live, based on what group they are in. When set
15892to a function, its returned value, if non-@code{nil}, overrides that
15893of @code{nnmail-expiry-wait}. Otherwise, the value of
15894@code{nnmail-expiry-wait} is used instead.
15895
15896For example, let's say you want to have a one month expiry period in
15897the @samp{mail.private} group, a one day expiry period in the
15898@samp{mail.junk} group, and a six day expiry period everywhere else.
15899This can be achieved as follows:
15900
15892@lisp 15901@lisp
15893(setq nnmail-expiry-wait-function 15902(setq nnmail-expiry-wait-function
15894 (lambda (group) 15903 (lambda (group)
15895 (cond ((string= group "mail.private") 15904 (cond ((string= group "mail.private")
15896 31) 15905 31)
15897 ((string= group "mail.junk") 15906 ((string= group "mail.junk")
15898 1) 15907 1)
15899 ((string= group "important") 15908 ((string= group "important")
15900 'never) 15909 'never)
15901 (t 15910 (t
15902 6)))) 15911 6))))
15903@end lisp 15912@end lisp
15904 15913
15905The group names this function is fed are ``unadorned'' group 15914The group names this function is fed are ``unadorned'' group
15906names---no @samp{nnml:} prefixes and the like. 15915names---no @samp{nnml:} prefixes and the like.
15907 15916
15908The @code{nnmail-expiry-wait} variable and 15917As an alternative to the variables @code{nnmail-expiry-wait} or
15909@code{nnmail-expiry-wait-function} function can either be a number (not 15918@code{nnmail-expiry-wait-function}, you can also use the
15910necessarily an integer) or one of the symbols @code{immediate} or 15919@code{expiry-wait} group parameter to selectively change the expiry
15911@code{never}. 15920period (@pxref{Group Parameters}).
15912
15913You can also use the @code{expiry-wait} group parameter to selectively
15914change the expiry period (@pxref{Group Parameters}).
15915 15921
15916@vindex nnmail-expiry-target 15922@vindex nnmail-expiry-target
15917The normal action taken when expiring articles is to delete them. 15923The normal action taken when expiring articles is to delete them.
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index 3598ead7613..a4daf8cf483 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -140,10 +140,10 @@ rules as described later).")
140 :format "%v")) "\ 140 :format "%v")) "\
141When to expire. 141When to expire.
142 142
143Overrides any `nnmail-expiry-wait' and `nnmail-expiry-wait-function' 143Overrides any `nnmail-expiry-wait' or `nnmail-expiry-wait-function'
144when expiring expirable messages. The value can either be a number of 144settings when expiring expirable messages. The value can be
145days (not necessarily an integer) or the symbols `never' or 145either a number of days (not necessarily an integer), or one of
146`immediate'.") 146the symbols `never' or `immediate'.")
147 147
148 (expiry-target (choice :tag "Expiry Target" 148 (expiry-target (choice :tag "Expiry Target"
149 :value delete 149 :value delete
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index de6b01774d6..33912f8cfa2 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -157,32 +157,33 @@ If nil, groups like \"mail.misc\" will end up in directories like
157 157
158(defcustom nnmail-expiry-wait 7 158(defcustom nnmail-expiry-wait 7
159 "Expirable articles that are older than this will be expired. 159 "Expirable articles that are older than this will be expired.
160This variable can either be a number (which will be interpreted as a 160This variable can be either a number of days (not necessarily an
161number of days) -- this doesn't have to be an integer. This variable 161integer), or one of the symbols `immediate' or `never', meaning
162can also be `immediate' and `never'." 162an article is immediately or never expirable, respectively.
163For more granular control, see `nnmail-expiry-wait-function'."
163 :group 'nnmail-expire 164 :group 'nnmail-expire
164 :type '(choice (const immediate) 165 :type '(choice (const :tag "Immediate" immediate)
165 (number :tag "days") 166 (const :tag "Never" never)
166 (const never))) 167 (number :tag "Days")))
167 168
168(defcustom nnmail-expiry-wait-function nil 169(defcustom nnmail-expiry-wait-function nil
169 "Variable that holds function to specify how old articles should be before they are expired. 170 "Function to determine how old articles should be before they are expired.
170The function will be called with the name of the group that the expiry 171The function is called with the name of the group that the expiry
171is to be performed in, and it should return an integer that says how 172is to be performed in, and should return a value supported by
172many days an article can be stored before it is considered \"old\". 173`nnmail-expiry-wait', which it overrides. If this variable is
173It can also return the values `never' and `immediate'. 174nil, the value of `nnmail-expiry-wait' is used instead.
174 175
175E.g.: 176E.g.:
176 177
177\(setq nnmail-expiry-wait-function 178\(setq nnmail-expiry-wait-function
178 (lambda (newsgroup) 179 (lambda (group)
179 (cond ((string-match \"private\" newsgroup) 31) 180 (cond ((string-match-p \"private\" group) 31)
180 ((string-match \"junk\" newsgroup) 1) 181 ((string-match-p \"junk\" group) 1)
181 ((string-match \"important\" newsgroup) \\='never) 182 ((string-match-p \"important\" group) \\='never)
182 (t 7))))" 183 (t 7))))"
183 :group 'nnmail-expire 184 :group 'nnmail-expire
184 :type '(choice (const :tag "nnmail-expiry-wait" nil) 185 :type '(choice (const :tag "nnmail-expiry-wait" nil)
185 (function :format "%v" nnmail-))) 186 (function :tag "Custom function")))
186 187
187(defcustom nnmail-expiry-target 'delete 188(defcustom nnmail-expiry-target 'delete
188 "Variable that says where expired messages should end up. 189 "Variable that says where expired messages should end up.
diff --git a/lisp/simple.el b/lisp/simple.el
index da20de4ad9c..3c5ea1ca75a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4461,7 +4461,7 @@ retrieved via \\[yank] \\[yank-pop]."
4461 :version "23.2") 4461 :version "23.2")
4462 4462
4463(defcustom kill-do-not-save-duplicates nil 4463(defcustom kill-do-not-save-duplicates nil
4464 "Do not add a new string to `kill-ring' if it duplicates the last one. 4464 "If non-nil, don't add a string to `kill-ring' if it duplicates the last one.
4465The comparison is done using `equal-including-properties'." 4465The comparison is done using `equal-including-properties'."
4466 :type 'boolean 4466 :type 'boolean
4467 :group 'killing 4467 :group 'killing