diff options
| author | Gnus developers | 2011-09-20 22:14:36 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-09-20 22:14:36 +0000 |
| commit | 5c7f66a032b769051b4ec0dad5e095548889fa75 (patch) | |
| tree | cf4339d25f09dce5a95063ea549f9a1c3304d648 | |
| parent | 3820edebb4037162ddc7b4f6ccf528806185aedc (diff) | |
| download | emacs-5c7f66a032b769051b4ec0dad5e095548889fa75.tar.gz emacs-5c7f66a032b769051b4ec0dad5e095548889fa75.zip | |
Merge changes made in Gnus trunk.
message.el (message-indent-citation): Fix empty line removal at the end of the citation.
auth-source.el (auth-source-netrc-create): Use default value for password if specified. Evaluate default.
(auth-source-plstore-create): Ditto.
(auth-source-plstore-create, auth-source-netrc-create): Fix default value evaluation.
(auth-source-netrc-create): Typo fix.
(auth-source-plstore-create): Ditto.
| -rw-r--r-- | lisp/gnus/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/gnus/auth-source.el | 107 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 7 |
3 files changed, 66 insertions, 61 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4838044b7ac..9d22d52e579 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,18 @@ | |||
| 1 | 2011-09-20 Ćukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> (tiny change) | ||
| 2 | |||
| 3 | * message.el (message-indent-citation): Fix empty line removal at the | ||
| 4 | end of the citation. | ||
| 5 | |||
| 1 | 2011-09-20 Julien Danjou <julien@danjou.info> | 6 | 2011-09-20 Julien Danjou <julien@danjou.info> |
| 2 | 7 | ||
| 8 | * auth-source.el (auth-source-netrc-create): Use default value for | ||
| 9 | password if specified. Evaluate default. | ||
| 10 | (auth-source-plstore-create): Ditto. | ||
| 11 | (auth-source-plstore-create, auth-source-netrc-create): Fix default | ||
| 12 | value evaluation. | ||
| 13 | (auth-source-netrc-create): Typo fix. | ||
| 14 | (auth-source-plstore-create): Ditto. | ||
| 15 | |||
| 3 | * auth-source.el (auth-source-format-cache-entry): New function. | 16 | * auth-source.el (auth-source-format-cache-entry): New function. |
| 4 | 17 | ||
| 5 | 2011-09-20 Katsumi Yamaoka <yamaoka@jpl.org> | 18 | 2011-09-20 Katsumi Yamaoka <yamaoka@jpl.org> |
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index dc9c23131f1..4269b79a6a7 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el | |||
| @@ -1225,49 +1225,46 @@ See `auth-source-search' for details on SPEC." | |||
| 1225 | (?p ,(aget printable-defaults 'port)))))) | 1225 | (?p ,(aget printable-defaults 'port)))))) |
| 1226 | 1226 | ||
| 1227 | ;; Store the data, prompting for the password if needed. | 1227 | ;; Store the data, prompting for the password if needed. |
| 1228 | (setq data | 1228 | (setq data (or data |
| 1229 | (cond | 1229 | (if (eq r 'secret) |
| 1230 | ((and (null data) (eq r 'secret)) | 1230 | ;; Special case prompt for passwords. |
| 1231 | ;; Special case prompt for passwords. | 1231 | ;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg))) |
| 1232 | ;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg))) | 1232 | ;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never) |
| 1233 | ;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never) | 1233 | (let* ((ep (format "Use GPG password tokens in %s?" file)) |
| 1234 | (let* ((ep (format "Use GPG password tokens in %s?" file)) | 1234 | (gpg-encrypt |
| 1235 | (gpg-encrypt | 1235 | (cond |
| 1236 | (cond | 1236 | ((eq auth-source-netrc-use-gpg-tokens 'never) |
| 1237 | ((eq auth-source-netrc-use-gpg-tokens 'never) | 1237 | 'never) |
| 1238 | 'never) | 1238 | ((listp auth-source-netrc-use-gpg-tokens) |
| 1239 | ((listp auth-source-netrc-use-gpg-tokens) | 1239 | (let ((check (copy-sequence |
| 1240 | (let ((check (copy-sequence | 1240 | auth-source-netrc-use-gpg-tokens)) |
| 1241 | auth-source-netrc-use-gpg-tokens)) | 1241 | item ret) |
| 1242 | item ret) | 1242 | (while check |
| 1243 | (while check | 1243 | (setq item (pop check)) |
| 1244 | (setq item (pop check)) | 1244 | (when (or (eq (car item) t) |
| 1245 | (when (or (eq (car item) t) | 1245 | (string-match (car item) file)) |
| 1246 | (string-match (car item) file)) | 1246 | (setq ret (cdr item)) |
| 1247 | (setq ret (cdr item)) | 1247 | (setq check nil))))) |
| 1248 | (setq check nil))))) | 1248 | (t 'never))) |
| 1249 | (t 'never))) | 1249 | (plain (or (eval default) (read-passwd prompt)))) |
| 1250 | (plain (read-passwd prompt))) | 1250 | ;; ask if we don't know what to do (in which case |
| 1251 | ;; ask if we don't know what to do (in which case | 1251 | ;; auth-source-netrc-use-gpg-tokens must be a list) |
| 1252 | ;; auth-source-netrc-use-gpg-tokens must be a list) | 1252 | (unless gpg-encrypt |
| 1253 | (unless gpg-encrypt | 1253 | (setq gpg-encrypt (if (y-or-n-p ep) 'gpg 'never)) |
| 1254 | (setq gpg-encrypt (if (y-or-n-p ep) 'gpg 'never)) | 1254 | ;; TODO: save the defcustom now? or ask? |
| 1255 | ;; TODO: save the defcustom now? or ask? | 1255 | (setq auth-source-netrc-use-gpg-tokens |
| 1256 | (setq auth-source-netrc-use-gpg-tokens | 1256 | (cons `(,file ,gpg-encrypt) |
| 1257 | (cons `(,file ,gpg-encrypt) | 1257 | auth-source-netrc-use-gpg-tokens))) |
| 1258 | auth-source-netrc-use-gpg-tokens))) | 1258 | (if (eq gpg-encrypt 'gpg) |
| 1259 | (if (eq gpg-encrypt 'gpg) | 1259 | (auth-source-epa-make-gpg-token plain file) |
| 1260 | (auth-source-epa-make-gpg-token plain file) | 1260 | plain)) |
| 1261 | plain))) | 1261 | (if (stringp default) |
| 1262 | ((null data) | 1262 | (read-string (if (string-match ": *\\'" prompt) |
| 1263 | (when default | 1263 | (concat (substring prompt 0 (match-beginning 0)) |
| 1264 | (setq prompt | 1264 | " (default " default "): ") |
| 1265 | (if (string-match ": *\\'" prompt) | 1265 | (concat prompt "(default " default ") ")) |
| 1266 | (concat (substring prompt 0 (match-beginning 0)) | 1266 | nil nil default) |
| 1267 | " (default " default "): ") | 1267 | (eval default))))) |
| 1268 | (concat prompt "(default " default ") ")))) | ||
| 1269 | (read-string prompt nil nil default)) | ||
| 1270 | (t (or data default)))) | ||
| 1271 | 1268 | ||
| 1272 | (when data | 1269 | (when data |
| 1273 | (setq artificial (plist-put artificial | 1270 | (setq artificial (plist-put artificial |
| @@ -1671,20 +1668,16 @@ authentication tokens: | |||
| 1671 | (?p ,(aget printable-defaults 'port)))))) | 1668 | (?p ,(aget printable-defaults 'port)))))) |
| 1672 | 1669 | ||
| 1673 | ;; Store the data, prompting for the password if needed. | 1670 | ;; Store the data, prompting for the password if needed. |
| 1674 | (setq data | 1671 | (setq data (or data |
| 1675 | (cond | 1672 | (if (eq r 'secret) |
| 1676 | ((and (null data) (eq r 'secret)) | 1673 | (or (eval default) (read-passwd prompt)) |
| 1677 | ;; Special case prompt for passwords. | 1674 | (if (stringp default) |
| 1678 | (read-passwd prompt)) | 1675 | (read-string (if (string-match ": *\\'" prompt) |
| 1679 | ((null data) | 1676 | (concat (substring prompt 0 (match-beginning 0)) |
| 1680 | (when default | 1677 | " (default " default "): ") |
| 1681 | (setq prompt | 1678 | (concat prompt "(default " default ") ")) |
| 1682 | (if (string-match ": *\\'" prompt) | 1679 | nil nil default) |
| 1683 | (concat (substring prompt 0 (match-beginning 0)) | 1680 | (eval default))))) |
| 1684 | " (default " default "): ") | ||
| 1685 | (concat prompt "(default " default ") ")))) | ||
| 1686 | (read-string prompt nil nil default)) | ||
| 1687 | (t (or data default)))) | ||
| 1688 | 1681 | ||
| 1689 | (when data | 1682 | (when data |
| 1690 | (if (member r base-secret) | 1683 | (if (member r base-secret) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8dac0fd7afe..da91fcb7fd8 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3679,10 +3679,9 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line." | |||
| 3679 | (message-delete-line)) | 3679 | (message-delete-line)) |
| 3680 | ;; Delete blank lines at the end of the buffer. | 3680 | ;; Delete blank lines at the end of the buffer. |
| 3681 | (goto-char (point-max)) | 3681 | (goto-char (point-max)) |
| 3682 | (unless (eolp) | 3682 | (beginning-of-line) |
| 3683 | (insert "\n")) | 3683 | (while (and (looking-at "$") |
| 3684 | (while (and (zerop (forward-line -1)) | 3684 | (zerop (forward-line -1))) |
| 3685 | (looking-at "$")) | ||
| 3686 | (message-delete-line))) | 3685 | (message-delete-line))) |
| 3687 | ;; Do the indentation. | 3686 | ;; Do the indentation. |
| 3688 | (if (null message-yank-prefix) | 3687 | (if (null message-yank-prefix) |