]> code.delx.au - gnu-emacs/commitdiff
Merge from gnus--devo--0
authorMiles Bader <miles@gnu.org>
Fri, 28 Dec 2007 22:26:31 +0000 (22:26 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 28 Dec 2007 22:26:31 +0000 (22:26 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-967

13 files changed:
doc/misc/ChangeLog
doc/misc/gnus.texi
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-draft.el
lisp/gnus/gnus-registry.el
lisp/gnus/message.el
lisp/gnus/mm-decode.el
lisp/gnus/mml-sec.el
lisp/gnus/sieve-manage.el
lisp/gnus/smime.el
lisp/net/imap.el
lisp/net/netrc.el

index a46295c69a293acf98265768162c48d18a5efd46..07d74fc32ed67ef6b7e1f5a37c1c6c8d3aa31871 100644 (file)
@@ -1,3 +1,12 @@
+2007-12-29  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus.texi (Group Parameters): Reorder the text and add a note about
+       `gnus-parameters' near the beginning of the node.
+
+2007-12-29  IRIE Tetsuya  <irie@t.email.ne.jp>  (tiny change)
+
+       * gnus.texi (Score File Editing): Fix function name.
+
 2007-12-23  Michael Albinus  <michael.albinus@gmx.de>
 
        Sync with Tramp 2.1.12.
index 4a165c62b25fb22b16df798ec41504207eec4993..521ac05c6fb7da7d19991abd842a63a6fdf90ebc 100644 (file)
@@ -2741,6 +2741,15 @@ newsgroups.
 @cindex group parameters
 
 The group parameters store information local to a particular group.
+
+Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
+group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
+presents you with a Customize-like interface.  The latter helps avoid
+silly Lisp errors.)  You might also be interested in reading about topic
+parameters (@pxref{Topic Parameters}).
+Additionally, you can set group parameters via the
+@code{gnus-parameters} variable, see below.
+
 Here's an example group parameter list:
 
 @example
@@ -3130,12 +3139,6 @@ expired.
 
 @end table
 
-Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
-group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
-presents you with a Customize-like interface.  The latter helps avoid
-silly Lisp errors.)  You might also be interested in reading about topic
-parameters (@pxref{Topic Parameters}).
-
 @vindex gnus-parameters
 Group parameters can be set via the @code{gnus-parameters} variable too.
 But some variables, such as @code{visible}, have no effect (For this
@@ -20962,9 +20965,9 @@ additional commands:
 
 @item C-c C-c
 @kindex C-c C-c (Score)
-@findex gnus-score-edit-done
+@findex gnus-score-edit-exit
 Save the changes you have made and return to the summary buffer
-(@code{gnus-score-edit-done}).
+(@code{gnus-score-edit-exit}).
 
 @item C-c C-d
 @kindex C-c C-d (Score)
index f3204e344d50dd89d4511852a63d83ae894f91e1..a6b43d7831e7111a1221c7b5bffcb8a33e313c57 100644 (file)
@@ -1,3 +1,38 @@
+2007-12-28  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * message.el (message-send-mail-function): Increase custom version.
+
+       * mml-sec.el, sieve-manage.el, smime.el: Simplify loading of
+       password-cache or password.  Suggested by Glenn Morris <rgm@gnu.org>.
+
+2007-12-21  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * imap.el (imap-authenticate): Use current-buffer instead of buffer,
+       for the cases where imap-authenticate is called with a nil buffer
+       parameter.
+
+2007-12-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-browse-html-parts): Work for two or more
+       html parts correctly; support forwarded messages.
+       (gnus-article-browse-html-article): Remove work buffers.
+
+       * netrc.el: Bind encrypt-file-alist for Emacs 21 and XEmacs when
+       compiling.
+       (netrc-bound-and-true-p): New macro.
+       (netrc-parse): Use it instead of bound-and-true-p that is not available
+       in XEmacs 21.4.
+
+2007-12-19  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-mark-article)
+       (gnus-registry-article-marks): Add functionality to mark articles
+       through the Gnus registry.
+
+       * netrc.el: Autoload encrypt when encrypt-file-alist is set.
+       (netrc-parse): Use encrypt-file-alist to determine if
+       encrypt-find-model or encrypt-insert-file-contents should be used.
+
 2007-12-19  Glenn Morris  <rgm@gnu.org>
 
        * mml.el (message-options-set, message-narrow-to-head)
@@ -9,6 +44,24 @@
        (message-options-set-recipient, message-generate-headers)
        (message-sort-headers): Declare as functions.
 
+2007-12-18  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus-draft.el (gnus-draft-send-message): Mention process/prefix
+       convention in doc string.
+
+2007-12-17  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-browse-html-parts): Add message header and
+       title to html parts.
+       (gnus-article-browse-html-article): Pass message header to it.
+
+       * mm-decode.el (mm-display-external): Use mm-add-meta-html-tag.
+
+2007-12-16  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * mml-sec.el, sieve-manage.el, smime.el: Make loading of password-cache
+       or password compatible with XEmacs.
+
 2007-12-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-art.el (article-verify-x-pgp-sig): Add reference to X-PGP-Sig
 
        * message.el (message-ignored-supersedes-headers): Add "X-ID".
 
+2007-12-03  Nathan J. Williams  <nathanw@MIT.EDU>  (tiny change)
+
+       * imap.el (imap-mailbox-status-asynch): Upcase STATUS items.
+       (imap-parse-status): Upcase status-att for servers that sends them
+       lower-case (e.g., MS Exchange 2007).
+
 2007-12-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-uu-extract-map): Add a command for the yenc
index e984372543d36d64e52dd1d44ffb93f0b0ebb409..8459558b45cdf7398fd7aa6920a713048bd9818d 100644 (file)
@@ -2798,9 +2798,10 @@ summary buffer."
     (setq gnus-article-browse-html-temp-list nil))
   gnus-article-browse-html-temp-list)
 
-(defun gnus-article-browse-html-parts (list)
+(defun gnus-article-browse-html-parts (list &optional header)
   "View all \"text/html\" parts from LIST.
-Recurse into multiparts."
+Recurse into multiparts.  The optional HEADER that should be a decoded
+message header will be added to the bodies of the \"text/html\" parts."
   ;; Internal function used by `gnus-article-browse-html-article'.
   (let (type file charset tmp-file showed)
     ;; Find and show the html-parts.
@@ -2809,10 +2810,11 @@ Recurse into multiparts."
       (cond ((not (listp handle)))
            ((or (equal (car (setq type (mm-handle-type handle))) "text/html")
                 (and (equal (car type) "message/external-body")
-                     (setq file (or (mail-content-type-get type 'name)
-                                    (mail-content-type-get
-                                     (mm-handle-disposition handle)
-                                     'filename)))
+                     (or header
+                         (setq file (or (mail-content-type-get type 'name)
+                                        (mail-content-type-get
+                                         (mm-handle-disposition handle)
+                                         'filename))))
                      (or (mm-handle-cache handle)
                          (condition-case code
                              (progn (mm-extern-cache-contents handle) t)
@@ -2825,24 +2827,111 @@ Recurse into multiparts."
                              type (mm-handle-type handle))
                        (equal (car type) "text/html"))))
             (when (or (setq charset (mail-content-type-get type 'charset))
+                      header
                       (not file))
               (setq tmp-file (mm-make-temp-file
                               ;; Do we need to care for 8.3 filenames?
                               "mm-" nil ".html")))
-            (if charset
-                ;; Add a meta html tag to specify charset.
-                (mm-with-unibyte-buffer
-                  (insert (if (eq charset 'gnus-decoded)
-                              (mm-encode-coding-string (mm-get-part handle)
-                                                       (setq charset 'utf-8))
-                            (mm-get-part handle)))
-                  (if (or (mm-add-meta-html-tag handle charset)
-                          (not file))
-                      (mm-write-region (point-min) (point-max)
-                                       tmp-file nil nil nil 'binary t)
-                    (setq tmp-file nil)))
-              (when tmp-file
-                (mm-save-part-to-file handle tmp-file)))
+            ;; Add a meta html tag to specify charset and a header.
+            (cond
+             (header
+              (let (title eheader body hcharset coding)
+                (with-temp-buffer
+                  (mm-enable-multibyte)
+                  (setq case-fold-search t)
+                  (insert header "\n")
+                  (setq title (message-fetch-field "subject"))
+                  (goto-char (point-min))
+                  (while (re-search-forward "\\(<\\)\\|\\(>\\)\\|&" nil t)
+                    (replace-match (cond ((match-beginning 1) "&lt;")
+                                         ((match-beginning 2) "&gt;")
+                                         (t "&amp;"))))
+                  (goto-char (point-min))
+                  (insert "<pre>\n")
+                  (goto-char (point-max))
+                  (insert "</pre>\n<hr>\n")
+                  ;; We have to examine charset one by one since
+                  ;; charset specified in parts might be different.
+                  (if (eq charset 'gnus-decoded)
+                      (setq charset 'utf-8
+                            eheader (mm-encode-coding-string (buffer-string)
+                                                             charset)
+                            title (when title
+                                    (mm-encode-coding-string title charset))
+                            body (mm-encode-coding-string (mm-get-part handle)
+                                                          charset))
+                    (setq hcharset (mm-find-mime-charset-region (point-min)
+                                                                (point-max)))
+                    (cond ((= (length hcharset) 1)
+                           (setq hcharset (car hcharset)
+                                 coding (mm-charset-to-coding-system
+                                         hcharset)))
+                          ((> (length hcharset) 1)
+                           (setq hcharset 'utf-8
+                                 coding hcharset)))
+                    (if coding
+                        (if charset
+                            (progn
+                              (setq body
+                                    (mm-charset-to-coding-system charset))
+                              (if (eq coding body)
+                                  (setq eheader (mm-encode-coding-string
+                                                 (buffer-string) coding)
+                                        title (when title
+                                                (mm-encode-coding-string
+                                                 title coding))
+                                        body (mm-get-part handle))
+                                (setq charset 'utf-8
+                                      eheader (mm-encode-coding-string
+                                               (buffer-string) charset)
+                                      title (when title
+                                              (mm-encode-coding-string
+                                               title charset))
+                                      body (mm-encode-coding-string
+                                            (mm-decode-coding-string
+                                             (mm-get-part handle) body)
+                                            charset))))
+                          (setq charset hcharset
+                                eheader (mm-encode-coding-string
+                                         (buffer-string) coding)
+                                title (when title
+                                        (mm-encode-coding-string
+                                         title coding))
+                                body (mm-get-part handle)))
+                      (setq eheader (mm-string-as-unibyte (buffer-string))
+                            body (mm-get-part handle))))
+                  (erase-buffer)
+                  (mm-disable-multibyte)
+                  (insert body)
+                  (when charset
+                    (mm-add-meta-html-tag handle charset))
+                  (when title
+                    (goto-char (point-min))
+                    (unless (search-forward "<title>" nil t)
+                      (re-search-forward "<head>\\s-*" nil t)
+                      (insert "<title>" title "</title>\n")))
+                  (goto-char (point-min))
+                  (or (re-search-forward
+                       "<body\\(?:\\s-+[^>]+\\|\\s-*\\)>\\s-*" nil t)
+                      (re-search-forward
+                       "</head\\(?:\\s-+[^>]+\\|\\s-*\\)>\\s-*" nil t))
+                  (insert eheader)
+                  (mm-write-region (point-min) (point-max)
+                                   tmp-file nil nil nil 'binary t))))
+             (charset
+              (mm-with-unibyte-buffer
+                (insert (if (eq charset 'gnus-decoded)
+                            (mm-encode-coding-string
+                             (mm-get-part handle)
+                             (setq charset 'utf-8))
+                          (mm-get-part handle)))
+                (if (or (mm-add-meta-html-tag handle charset)
+                        (not file))
+                    (mm-write-region (point-min) (point-max)
+                                     tmp-file nil nil nil 'binary t)
+                  (setq tmp-file nil))))
+             (tmp-file
+              (mm-save-part-to-file handle tmp-file)))
             (when tmp-file
               (add-to-list 'gnus-article-browse-html-temp-list tmp-file))
             (add-hook 'gnus-summary-prepare-exit-hook
@@ -2854,16 +2943,37 @@ Recurse into multiparts."
             (browse-url-of-file (or tmp-file (expand-file-name file)))
             (setq showed t))
            ;; If multipart, recurse
-           ((and (stringp (car handle))
-                 (string-match "^multipart/" (car handle))
-                 (setq showed
-                       (or showed
-                           (gnus-article-browse-html-parts handle)))))))
+           ((equal (mm-handle-media-supertype handle) "multipart")
+            (when (gnus-article-browse-html-parts handle header)
+              (setq showed t)))
+           ((equal (mm-handle-media-type handle) "message/rfc822")
+            (mm-with-multibyte-buffer
+              (mm-insert-part handle)
+              (setq handle (mm-dissect-buffer t t))
+              (when (and (bufferp (car handle))
+                         (stringp (car (mm-handle-type handle))))
+                (setq handle (list handle)))
+              (when header
+                (article-decode-encoded-words)
+                (let ((gnus-visible-headers
+                       (or (get 'gnus-visible-headers 'standard-value)
+                           gnus-visible-headers)))
+                  (article-hide-headers))
+                (goto-char (point-min))
+                (search-forward "\n\n" nil 'move)
+                (skip-chars-backward "\t\n ")
+                (setq header (buffer-substring (point-min) (point)))))
+            (when (prog1
+                      (gnus-article-browse-html-parts handle header)
+                    (mm-destroy-parts handle))
+              (setq showed t)))))
     showed))
 
 ;; FIXME: Documentation in texi/gnus.texi missing.
-(defun gnus-article-browse-html-article ()
+(defun gnus-article-browse-html-article (&optional arg)
   "View \"text/html\" parts of the current article with a WWW browser.
+The message header is added to the beginning of every html part unless
+the prefix argument ARG is given.
 
 Warning: Spammers use links to images in HTML articles to verify
 whether you have read the message.  As
@@ -2874,20 +2984,36 @@ should only use it for mails from trusted senders.
 If you alwasy want to display HTML part in the browser, set
 `mm-text-html-renderer' to nil."
   ;; Cf. `mm-w3m-safe-url-regexp'
-  (interactive)
-  (save-window-excursion
-    ;; Open raw article and select the buffer
-    (gnus-summary-show-article t)
-    (gnus-summary-select-article-buffer)
-    (let ((parts (mm-dissect-buffer t t)))
+  (interactive "P")
+  (if arg
+      (gnus-summary-show-article)
+    (let ((gnus-visible-headers (or (get 'gnus-visible-headers 'standard-value)
+                                   gnus-visible-headers)))
+      (gnus-summary-show-article)))
+  (with-current-buffer gnus-article-buffer
+    (let ((header (unless arg
+                   (save-restriction
+                     (widen)
+                     (buffer-substring-no-properties
+                      (goto-char (point-min))
+                      (if (search-forward "\n\n" nil t)
+                          (match-beginning 0)
+                        (goto-char (point-max))
+                        (skip-chars-backward "\t\n ")
+                        (point))))))
+         parts)
+      (set-buffer gnus-original-article-buffer)
+      (setq parts (mm-dissect-buffer t t))
       ;; If singlepart, enforce a list.
       (when (and (bufferp (car parts))
                 (stringp (car (mm-handle-type parts))))
        (setq parts (list parts)))
       ;; Process the list
-      (unless (gnus-article-browse-html-parts parts)
+      (unless (gnus-article-browse-html-parts parts header)
        (gnus-error 3 "Mail doesn't contain a \"text/html\" part!"))
-      (gnus-summary-show-article))))
+      (mm-destroy-parts parts)
+      (unless arg
+       (gnus-summary-show-article)))))
 
 (defun article-hide-list-identifiers ()
   "Remove list identifies from the Subject header.
index 344f9c028d68fe50405c3337caed4bd0b5f7cae8..6873c3dcb1e97b296b1e75a1bb8749915bd80cf4 100644 (file)
      message-send-actions)))
 
 (defun gnus-draft-send-message (&optional n)
-  "Send the current draft."
+  "Send the current draft(s).
+Obeys the standard process/prefix convention."
   (interactive "P")
   (let* ((articles (gnus-summary-work-articles n))
         (total (length articles))
index d45cc6c5d6d777144349235c17dcb40a2fdcd8d2..bbc69ea343a6a10338c4c394a4e64d1ecfb99890 100644 (file)
@@ -586,6 +586,54 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
                     (string-match word x))
                   list)))))
 
+(defun gnus-registry-mark-article (article &optional mark remove)
+  "Mark ARTICLE with MARK in the Gnus registry or remove MARK.
+MARK can be any symbol.  If ARTICLE is nil, then the
+`gnus-current-article' will be marked.  If MARK is nil,
+`gnus-registry-flag-default' will be used."
+  (interactive "nArticle number: ")
+  (let ((article (or article gnus-current-article))
+       (mark (or mark 'gnus-registry-flag-default))
+       article-id)
+    (unless article
+      (error "No article on current line"))
+    (setq article-id 
+         (gnus-registry-fetch-message-id-fast gnus-current-article))
+    (unless article-id
+      (error "No article ID could be retrieved"))
+    (let* (
+          ;; all the marks for this article
+          (marks (gnus-registry-fetch-extra-flags article-id))
+          ;; the marks without the mark of interest
+          (cleaned-marks (delq mark marks))
+          ;; the new marks we want to use
+          (new-marks (if remove
+                         cleaned-marks
+                       (cons mark cleaned-marks))))
+    (apply 'gnus-registry-store-extra-flags ; set the extra flags
+     article-id                                    ; for the message ID
+     new-marks)
+    (gnus-registry-fetch-extra-flags article-id))))
+
+(defun gnus-registry-article-marks (article)
+  "Get the Gnus registry marks for ARTICLE.
+If ARTICLE is nil, then the `gnus-current-article' will be
+used."
+  (interactive "nArticle number: ")
+  (let ((article (or article gnus-current-article))
+       article-id)
+    (unless article
+      (error "No article on current line"))
+    (setq article-id 
+         (gnus-registry-fetch-message-id-fast gnus-current-article))
+    (unless article-id
+      (error "No article ID could be retrieved"))
+    (gnus-message 1 
+                 "Message ID %s, Registry flags: %s" 
+                 article-id 
+                 (concat (gnus-registry-fetch-extra-flags article-id)))))
+    
+
 ;;; if this extends to more than 'flags, it should be improved to be more generic.
 (defun gnus-registry-fetch-extra-flags (id)
   "Get the flags of a message, based on the message ID.
index 4fba4fd630e7d7486763bc90f86502246a8647b1..69cb173e9a79338f1a4516b261e25376a459721b 100644 (file)
@@ -666,6 +666,7 @@ See also `send-mail-function'."
                               :tag "Use Mailclient package")
                (function :tag "Other"))
   :group 'message-sending
+  :version "23.0" ;; No Gnus
   :initialize 'custom-initialize-default
   :link '(custom-manual "(message)Mail Variables")
   :group 'message-mail)
index e2c23d9db5aca2d79df6fb32e643d054213b0366..14eb7f3ae952d6b2faff5efed529a856ecae287c 100644 (file)
@@ -751,6 +751,7 @@ external if displayed external."
                  (set-buffer (generate-new-buffer " *mm*"))
                  (setq method nil))
              (mm-insert-part handle)
+             (mm-add-meta-html-tag handle)
              (let ((win (get-buffer-window cur t)))
                (when win
                  (select-window win)))
@@ -774,6 +775,7 @@ external if displayed external."
                  (mm-handle-set-undisplayer handle mm)))))
        ;; The function is a string to be executed.
        (mm-insert-part handle)
+       (mm-add-meta-html-tag handle)
        (let* ((dir (mm-make-temp-file
                     (expand-file-name "emm." mm-tmp-directory) 'dir))
               (filename (or
index e7ecc06164f7f5a1ed42d48d3b2a8535cf2dfd63..c349631f915ea02cd7471ca515955cc39e10b386 100644 (file)
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-(or (require 'password-cache nil t)
-    (require 'password))
+
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
 
 (autoload 'mml2015-sign "mml2015")
 (autoload 'mml2015-encrypt "mml2015")
index a4b763650c807b7a2142d67af10552712979ad61..5e021c26e82ca4d64a48737e70974a2ed0b6d14e 100644 (file)
 ;; For Emacs < 22.2.
 (eval-and-compile
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-(or (require 'password-cache nil t)
-    (require 'password))
+
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
+
 (eval-when-compile
   (require 'sasl)
   (require 'starttls))
index 105cadff08145ea297db7524b9d2a61ebfaba2b2..34c5b410b667bdeedc4c4ab1a3372a1b610027ae 100644 (file)
 (eval-and-compile
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (require 'dig)
-(or (require 'password-cache nil t)
-    (require 'password))
+
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
+
 (eval-when-compile (require 'cl))
 
 (eval-and-compile
index 40e41d79de7fcba1f7e43f8399a219b2e535676a..4f1ef94e01abd91e676be4b3e8742602925e06c3 100644 (file)
@@ -1177,18 +1177,18 @@ password is remembered in the buffer."
       (if passwd (setq imap-password passwd))
       (if imap-auth
          (and (funcall (nth 2 (assq imap-auth
-                                    imap-authenticator-alist)) buffer)
+                                    imap-authenticator-alist)) (current-buffer))
               (setq imap-state 'auth))
        ;; Choose authenticator.
        (let ((auths imap-authenticators)
              auth)
          (while (setq auth (pop auths))
            ;; OK to use authenticator?
-           (when (funcall (nth 1 (assq auth imap-authenticator-alist)) buffer)
+           (when (funcall (nth 1 (assq auth imap-authenticator-alist)) (current-buffer))
              (message "imap: Authenticating to `%s' using `%s'..."
                       imap-server auth)
              (setq imap-auth auth)
-             (if (funcall (nth 2 (assq auth imap-authenticator-alist)) buffer)
+             (if (funcall (nth 2 (assq auth imap-authenticator-alist)) (current-buffer))
                  (progn
                    (message "imap: Authenticating to `%s' using `%s'...done"
                             imap-server auth)
index da9182e7cdd7b18bcb40fa6ce798a9c9633cbdde..67c8dd43b82489d6d980d42a7b773477148aff2b 100644 (file)
 ;;; .netrc and .authinfo rc parsing
 ;;;
 
+;; use encrypt if loaded (encrypt-file-alist has to be set as well)
+(eval-and-compile
+  (autoload 'encrypt-find-model "encrypt")
+  (autoload 'encrypt-insert-file-contents "encrypt"))
 (defalias 'netrc-point-at-eol
   (if (fboundp 'point-at-eol)
       'point-at-eol
     'line-end-position))
+(eval-when-compile
+  (defvar encrypt-file-alist)
+  ;; This is unnecessary in the compiled version as it is a macro.
+  (if (fboundp 'bound-and-true-p)
+      (defalias 'netrc-bound-and-true-p 'bound-and-true-p)
+    (defmacro netrc-bound-and-true-p (var)
+      "Return the value of symbol VAR if it is bound, else nil."
+      `(and (boundp (quote ,var)) ,var))))
 
 (defgroup netrc nil
  "Netrc configuration."
       (let ((tokens '("machine" "default" "login"
                      "password" "account" "macdef" "force"
                      "port"))
+           (encryption-model (when (netrc-bound-and-true-p encrypt-file-alist)
+                               (encrypt-find-model file)))
            alist elem result pair)
-       (insert-file-contents file)
+       (if encryption-model
+           (encrypt-insert-file-contents file encryption-model)
+         (insert-file-contents file))
        (goto-char (point-min))
        ;; Go through the file, line by line.
        (while (not (eobp))