aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-03-14 22:44:17 -0400
committerStefan Monnier2011-03-14 22:44:17 -0400
commitaa2ebce9fc5b7c393d57be41db70d2b3cc087fb8 (patch)
treefef509c71e02106bf742c258efa4b576f8a586a6
parent49c5410a593ad8b162e5c4608e2210f839539f7f (diff)
downloademacs-aa2ebce9fc5b7c393d57be41db70d2b3cc087fb8.tar.gz
emacs-aa2ebce9fc5b7c393d57be41db70d2b3cc087fb8.zip
* lisp/gnus/auth-source.el (auth-source-netrc-create): Use usual format for the
default in prompts.
-rw-r--r--lisp/gnus/ChangeLog53
-rw-r--r--lisp/gnus/auth-source.el20
2 files changed, 41 insertions, 32 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index af0bd1519c7..515a54cd491 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * auth-source.el (auth-source-netrc-create): Use usual format for the
4 default in prompts.
5
12011-03-13 Teodor Zlatanov <tzz@lifelogs.com> 62011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * auth-source.el (auth-source-netrc-create): Show the default in the 8 * auth-source.el (auth-source-netrc-create): Show the default in the
@@ -15,9 +20,9 @@
15 20
162011-03-11 Teodor Zlatanov <tzz@lifelogs.com> 212011-03-11 Teodor Zlatanov <tzz@lifelogs.com>
17 22
18 * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't 23 * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook):
19 install `gnus-sync-read' to any hooks by default. It's buggy. The 24 Don't install `gnus-sync-read' to any hooks by default. It's buggy.
20 user will have to run `gnus-sync-read' manually and wait for Cloudy 25 The user will have to run `gnus-sync-read' manually and wait for Cloudy
21 Gnus. 26 Gnus.
22 27
232011-03-11 Julien Danjou <julien@danjou.info> 282011-03-11 Julien Danjou <julien@danjou.info>
@@ -101,8 +106,8 @@
101 106
1022011-03-05 Antoine Levitt <antoine.levitt@gmail.com> 1072011-03-05 Antoine Levitt <antoine.levitt@gmail.com>
103 108
104 * message.el (message-cite-reply-position, message-cite-style): New 109 * message.el (message-cite-reply-position, message-cite-style):
105 variables. 110 New variables.
106 (message-yank-original): Use the new citation styles. 111 (message-yank-original): Use the new citation styles.
107 112
1082011-03-04 Daiki Ueno <ueno@unixuser.org> 1132011-03-04 Daiki Ueno <ueno@unixuser.org>
@@ -216,14 +221,14 @@
216 221
2172011-02-23 Lars Ingebrigtsen <larsi@gnus.org> 2222011-02-23 Lars Ingebrigtsen <larsi@gnus.org>
218 223
219 * gnus-start.el (gnus-dribble-read-file): Set 224 * gnus-start.el (gnus-dribble-read-file):
220 buffer-save-without-query, since we always want to save the dribble 225 Set buffer-save-without-query, since we always want to save the dribble
221 file, probably. 226 file, probably.
222 227
223 * nnmail.el (nnmail-article-group): Allow a final "" split to work on 228 * nnmail.el (nnmail-article-group): Allow a final "" split to work on
224 nnimap. 229 nnimap.
225 230
226 * gnus-sum.el (gnus-user-date-format-alist): Renamed back again from 231 * gnus-sum.el (gnus-user-date-format-alist): Rename back again from
227 -summary- since it's a user-visible variable. 232 -summary- since it's a user-visible variable.
228 233
229 * nnimap.el (nnimap-retrieve-group-data-early): Don't do QRESYNC the 234 * nnimap.el (nnimap-retrieve-group-data-early): Don't do QRESYNC the
@@ -469,8 +474,8 @@
4692011-02-14 Teodor Zlatanov <tzz@lifelogs.com> 4742011-02-14 Teodor Zlatanov <tzz@lifelogs.com>
470 475
471 * auth-source.el (auth-source-backend-parse-parameters): Don't rely on 476 * auth-source.el (auth-source-backend-parse-parameters): Don't rely on
472 `plist-get' to accept non-list parameters (XEmacs issue). Fix 477 `plist-get' to accept non-list parameters (XEmacs issue).
473 docstring. 478 Fix docstring.
474 (auth-source-secrets-search): Use `delete-dups', `append mapcar', and 479 (auth-source-secrets-search): Use `delete-dups', `append mapcar', and
475 `butlast' instead of `remove-duplicates', `mapcan', and `subseq'. 480 `butlast' instead of `remove-duplicates', `mapcan', and `subseq'.
476 (auth-sources, auth-source-backend-parse, auth-source-secrets-search): 481 (auth-sources, auth-source-backend-parse, auth-source-secrets-search):
@@ -510,8 +515,8 @@
510 515
5112011-02-13 Tassilo Horn <tassilo@member.fsf.org> (tiny change) 5162011-02-13 Tassilo Horn <tassilo@member.fsf.org> (tiny change)
512 517
513 * nnimap.el (nnimap-request-accept-article, nnimap-process-quirk): Fix 518 * nnimap.el (nnimap-request-accept-article, nnimap-process-quirk):
514 Gcc processing on imap. 519 Fix Gcc processing on imap.
515 520
5162011-02-10 Stefan Monnier <monnier@iro.umontreal.ca> 5212011-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
517 522
@@ -599,8 +604,8 @@
599 604
6002011-02-06 Michael Albinus <michael.albinus@gmx.de> 6052011-02-06 Michael Albinus <michael.albinus@gmx.de>
601 606
602 * auth-source.el (top): Require 'eieio unconditionally. Autoload 607 * auth-source.el (top): Require 'eieio unconditionally.
603 `secrets-get-attributes' instead of `secrets-get-attribute'. 608 Autoload `secrets-get-attributes' instead of `secrets-get-attribute'.
604 (auth-source-secrets-search): Limit search when `max' is greater than 609 (auth-source-secrets-search): Limit search when `max' is greater than
605 number of results. 610 number of results.
606 611
@@ -636,7 +641,7 @@
636 (auth-source-protocol-defaults, auth-source-user-or-password-imap) 641 (auth-source-protocol-defaults, auth-source-user-or-password-imap)
637 (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) 642 (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
638 (auth-source-user-or-password-sftp) 643 (auth-source-user-or-password-sftp)
639 (auth-source-user-or-password-smtp): Removed. 644 (auth-source-user-or-password-smtp): Remove.
640 (auth-source-user-or-password): Deprecated and modified to be a wrapper 645 (auth-source-user-or-password): Deprecated and modified to be a wrapper
641 around `auth-source-search'. Not tested thoroughly. 646 around `auth-source-search'. Not tested thoroughly.
642 647
@@ -802,16 +807,16 @@
802 * gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups 807 * gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups
803 that Gnus doesn't know exists again. 808 that Gnus doesn't know exists again.
804 809
805 * gnus-art.el (gnus-article-date-lapsed-new-header): Removed. 810 * gnus-art.el (gnus-article-date-lapsed-new-header): Remove.
806 (gnus-treat-date-ut): Ditto. 811 (gnus-treat-date-ut): Ditto.
807 (gnus-article-update-date-header): Renamed. 812 (gnus-article-update-date-header): Rename.
808 (gnus-treat-date-local): Removed. 813 (gnus-treat-date-local): Remove.
809 (gnus-treat-date-english): Removed. 814 (gnus-treat-date-english): Remove.
810 (gnus-treat-date-lapsed): Removed. 815 (gnus-treat-date-lapsed): Remove.
811 (gnus-treat-date-combined-lapsed): Removed. 816 (gnus-treat-date-combined-lapsed): Remove.
812 (gnus-treat-date-original): Removed. 817 (gnus-treat-date-original): Remove.
813 (gnus-treat-date-iso8601): Removed. 818 (gnus-treat-date-iso8601): Remove.
814 (gnus-treat-date-user-defined): Removed. 819 (gnus-treat-date-user-defined): Remove.
815 (gnus-article-date-headers): New variable to control all the date 820 (gnus-article-date-headers): New variable to control all the date
816 header options. 821 header options.
817 (article-date-ut): Rewrite to allow using the new way to format date 822 (article-date-ut): Rewrite to allow using the new way to format date
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 52f2b92e933..f703fbbd200 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -1093,17 +1093,19 @@ See `auth-source-search' for details on SPEC."
1093 (?h ,(aget printable-defaults 'host)) 1093 (?h ,(aget printable-defaults 'host))
1094 (?p ,(aget printable-defaults 'port)))))) 1094 (?p ,(aget printable-defaults 'port))))))
1095 1095
1096 ;; store the data, prompting for the password if needed 1096 ;; Store the data, prompting for the password if needed.
1097 (setq data 1097 (setq data
1098 (cond 1098 (cond
1099 ((and (null data) (eq r 'secret)) 1099 ((and (null data) (eq r 'secret))
1100 ;; special case prompt for passwords 1100 ;; Special case prompt for passwords.
1101 (read-passwd prompt)) 1101 (read-passwd prompt))
1102 ((null data) 1102 ((null data)
1103 (when default 1103 (when default
1104 (setq 1104 (setq prompt
1105 prompt 1105 (if (string-match ": *\\'" prompt)
1106 (concat prompt (format "(default %s) " default)))) 1106 (concat (substring prompt 0 (match-beginning 0))
1107 " (default " default "): ")
1108 (concat prompt "(default " default ") "))))
1107 (read-string prompt nil nil default)) 1109 (read-string prompt nil nil default))
1108 (t (or data default)))) 1110 (t (or data default))))
1109 1111
@@ -1115,7 +1117,7 @@ See `auth-source-search' for details on SPEC."
1115 (lambda () data)) 1117 (lambda () data))
1116 data)))) 1118 data))))
1117 1119
1118 ;; when r is not an empty string... 1120 ;; When r is not an empty string...
1119 (when (and (stringp data) 1121 (when (and (stringp data)
1120 (< 0 (length data))) 1122 (< 0 (length data)))
1121 ;; this function is not strictly necessary but I think it 1123 ;; this function is not strictly necessary but I think it
@@ -1173,7 +1175,7 @@ Respects `auth-source-save-behavior'. Uses
1173 ;; we want the new data to be found first, so insert at beginning 1175 ;; we want the new data to be found first, so insert at beginning
1174 (goto-char (point-min)) 1176 (goto-char (point-min))
1175 1177
1176 ;; ask AFTER we've successfully opened the file 1178 ;; Ask AFTER we've successfully opened the file.
1177 (let ((prompt (format "Save auth info to file %s? " file)) 1179 (let ((prompt (format "Save auth info to file %s? " file))
1178 (done (not (eq auth-source-save-behavior 'ask))) 1180 (done (not (eq auth-source-save-behavior 'ask)))
1179 (bufname "*auth-source Help*") 1181 (bufname "*auth-source Help*")
@@ -1190,6 +1192,8 @@ Respects `auth-source-save-behavior'. Uses
1190 "(N)o and don't ask to save again\n" 1192 "(N)o and don't ask to save again\n"
1191 "(e)dit the line\n" 1193 "(e)dit the line\n"
1192 "(?) for help as you can see.\n")) 1194 "(?) for help as you can see.\n"))
1195 ;; Why? Doesn't with-output-to-temp-buffer already do
1196 ;; the exact same thing anyway? --Stef
1193 (set-buffer standard-output) 1197 (set-buffer standard-output)
1194 (help-mode)))) 1198 (help-mode))))
1195 (?n (setq add "" 1199 (?n (setq add ""
@@ -1203,7 +1207,7 @@ Respects `auth-source-save-behavior'. Uses
1203 (when (get-buffer-window bufname) 1207 (when (get-buffer-window bufname)
1204 (delete-window (get-buffer-window bufname))) 1208 (delete-window (get-buffer-window bufname)))
1205 1209
1206 ;; make sure the info is not saved 1210 ;; Make sure the info is not saved.
1207 (when (null auth-source-save-behavior) 1211 (when (null auth-source-save-behavior)
1208 (setq add "")) 1212 (setq add ""))
1209 1213