diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-04-30 19:20:12 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-05-01 19:27:14 +0200 |
commit | 2abc85e41edafbb9c1187c5445056cc07759b4c1 (patch) | |
tree | 70cd20a7ada4834c353350015a9cd713d679c88e /doc/misc/gnus-faq.texi | |
parent | ec392ff1a3ce6bd4d32371be454003f642812d5b (diff) | |
download | emacs-2abc85e41edafbb9c1187c5445056cc07759b4c1.tar.gz |
Transform mentions of `eval-after-load' to `with-eval-after-load'
* doc/lispref/loading.texi (Hooks for Loading): Update text to
not mention `eval-after-load' (bug#20038).
(cherry picked from commit 9392193be56eebdfac702a0bbb5e954088371c7a)
Diffstat (limited to 'doc/misc/gnus-faq.texi')
-rw-r--r-- | doc/misc/gnus-faq.texi | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 90bb10f6c35..5a49f4ac325 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -584,10 +584,10 @@ Now we need to tell Gnus, where to get its mail from. If it's a POP3 server, then you need something like this: @example -(eval-after-load "mail-source" - '(add-to-list 'mail-sources '(pop :server "pop.YourProvider.net" - :user "yourUserName" - :password "yourPassword"))) +(with-eval-after-load "mail-source" + (add-to-list 'mail-sources '(pop :server "pop.YourProvider.net" + :user "yourUserName" + :password "yourPassword"))) @end example @noindent @@ -596,8 +596,8 @@ your password there. If you want to read your mail from a traditional spool file on your local machine, it's @example -(eval-after-load "mail-source" - '(add-to-list 'mail-sources '(file :path "/path/to/spool/file")) +(with-eval-after-load "mail-source" + (add-to-list 'mail-sources '(file :path "/path/to/spool/file")) @end example @noindent @@ -605,9 +605,9 @@ If it's a Maildir, with one file per message as used by postfix, Qmail and (optionally) fetchmail it's @example -(eval-after-load "mail-source" - '(add-to-list 'mail-sources '(maildir :path "/path/to/Maildir/" - :subdirs ("cur" "new"))) +(with-eval-after-load "mail-source" + (add-to-list 'mail-sources '(maildir :path "/path/to/Maildir/" + :subdirs ("cur" "new"))) @end example @noindent @@ -616,10 +616,10 @@ in one directory, for example because procmail already split your mail, it's @example -(eval-after-load "mail-source" - '(add-to-list 'mail-sources - '(directory :path "/path/to/procmail-dir/" - :suffix ".prcml"))) +(with-eval-after-load "mail-source" + (add-to-list 'mail-sources + '(directory :path "/path/to/procmail-dir/" + :suffix ".prcml"))) @end example @noindent @@ -850,10 +850,9 @@ text part if it's available. How to do it? Say @example -(eval-after-load "mm-decode" - '(progn - (add-to-list 'mm-discouraged-alternatives "text/html") - (add-to-list 'mm-discouraged-alternatives "text/richtext"))) +(with-eval-after-load "mm-decode" + (add-to-list 'mm-discouraged-alternatives "text/html") + (add-to-list 'mm-discouraged-alternatives "text/richtext")) @end example @noindent @@ -1577,14 +1576,14 @@ if you already use Gnus 5.10, if you still use 5.8.8 or 5.9 try this instead: @example -(eval-after-load "gnus-msg" - '(unless (boundp 'gnus-confirm-mail-reply-to-news) - (defadvice gnus-summary-reply (around reply-in-news activate) - "Request confirmation when replying to news." - (interactive) - (when (or (not (gnus-news-group-p gnus-newsgroup-name)) - (y-or-n-p "Really reply by mail to article author? ")) - ad-do-it)))) +(with-eval-after-load "gnus-msg" + (unless (boundp 'gnus-confirm-mail-reply-to-news) + (defadvice gnus-summary-reply (around reply-in-news activate) + "Request confirmation when replying to news." + (interactive) + (when (or (not (gnus-news-group-p gnus-newsgroup-name)) + (y-or-n-p "Really reply by mail to article author? ")) + ad-do-it)))) @end example @noindent @@ -1599,8 +1598,8 @@ Since 5.10 Gnus doesn't generate a sender header by default. For older Gnus' try this in @file{~/.gnus.el}: @example -(eval-after-load "message" - '(add-to-list 'message-syntax-checks '(sender . disabled))) +(with-eval-after-load "message" + (add-to-list 'message-syntax-checks '(sender . disabled))) @end example @noindent @@ -1665,14 +1664,14 @@ in @file{~/.gnus.el}. If you use Gnus 5.9 or earlier, you can use this instead (works for newer versions as well): @example -(eval-after-load "message" - '(let ((fqdn "yourmachine.yourdomain.tld"));; <-- Edit this! - (if (boundp 'message-user-fqdn) - (setq message-user-fqdn fqdn) - (gnus-message 1 "Redefining `message-make-fqdn'.") - (defun message-make-fqdn () - "Return user's fully qualified domain name." - fqdn)))) +(with-eval-after-load "message" + (let ((fqdn "yourmachine.yourdomain.tld"));; <-- Edit this! + (if (boundp 'message-user-fqdn) + (setq message-user-fqdn fqdn) + (gnus-message 1 "Redefining `message-make-fqdn'.") + (defun message-make-fqdn () + "Return user's fully qualified domain name." + fqdn)))) @end example @noindent @@ -2195,7 +2194,7 @@ An other idea would be to byte compile your @file{~/.gnus.el} (say @samp{M-x byte-compile-file RET ~/.gnus.el RET} to do it). Finally, if you have require statements in your .gnus, you could replace them with -eval-after-load, which loads the stuff not at startup +@code{with-eval-after-load}, which loads the stuff not at startup time, but when it's needed. Say you've got this in your @file{~/.gnus.el}: @@ -2209,8 +2208,8 @@ then as soon as you start Gnus, message.el is loaded. If you replace it with @example -(eval-after-load "message" - '(add-to-list 'message-syntax-checks '(sender . disabled))) +(with-eval-after-load "message" + (add-to-list 'message-syntax-checks '(sender . disabled))) @end example @noindent |