Commit 81df110a authored by Romain Francoise's avatar Romain Francoise
Browse files

2005-09-24 Emilio C. Lopes <eclig@gmx.net>

	* smime.el (smime-sign-buffer, smime-decrypt-buffer):
	* mm-view.el (mm-view-pkcs7-decrypt):
	* gnus-sum.el (gnus-summary-limit-to-extra)
	(gnus-summary-respool-article, gnus-read-move-group-name):
	* gnus-score.el (gnus-summary-increase-score):
	* gnus-util.el (gnus-completing-read-with-default):
	* gnus-art.el (gnus-read-save-file-name)
	(gnus-summary-save-in-rmail, gnus-summary-save-in-mail)
	(gnus-summary-save-in-file, gnus-summary-save-body-in-file):
	* message.el (message-check-news-header-syntax):
	Follow convention for reading with the minibuffer.
parent d88a70a0
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
* smime.el (smime-sign-buffer, smime-decrypt-buffer):
* mm-view.el (mm-view-pkcs7-decrypt):
* gnus-sum.el (gnus-summary-limit-to-extra)
(gnus-summary-respool-article, gnus-read-move-group-name):
* gnus-score.el (gnus-summary-increase-score):
* gnus-util.el (gnus-completing-read-with-default):
* gnus-art.el (gnus-read-save-file-name)
(gnus-summary-save-in-rmail, gnus-summary-save-in-mail)
(gnus-summary-save-in-file, gnus-summary-save-body-in-file):
* message.el (message-check-news-header-syntax):
Follow convention for reading with the minibuffer.
2005-09-18 D Goel <deego@gnufans.org> 2005-09-18 D Goel <deego@gnufans.org>
* sieve.el (sieve-help): Fix `message' call: first arg should be a * sieve.el (sieve-help): Fix `message' call: first arg should be a
......
...@@ -3255,7 +3255,7 @@ This format is defined by the `gnus-article-time-format' variable." ...@@ -3255,7 +3255,7 @@ This format is defined by the `gnus-article-time-format' variable."
((null split-name) ((null split-name)
(read-file-name (read-file-name
(concat prompt " (default " (concat prompt " (default "
(file-name-nondirectory default-name) ") ") (file-name-nondirectory default-name) "): ")
(file-name-directory default-name) (file-name-directory default-name)
default-name)) default-name))
;; A single group name is returned. ;; A single group name is returned.
...@@ -3265,7 +3265,7 @@ This format is defined by the `gnus-article-time-format' variable." ...@@ -3265,7 +3265,7 @@ This format is defined by the `gnus-article-time-format' variable."
(symbol-value variable))) (symbol-value variable)))
(read-file-name (read-file-name
(concat prompt " (default " (concat prompt " (default "
(file-name-nondirectory default-name) ") ") (file-name-nondirectory default-name) "): ")
(file-name-directory default-name) (file-name-directory default-name)
default-name)) default-name))
;; A single split name was found ;; A single split name was found
...@@ -3278,7 +3278,7 @@ This format is defined by the `gnus-article-time-format' variable." ...@@ -3278,7 +3278,7 @@ This format is defined by the `gnus-article-time-format' variable."
((file-exists-p name) name) ((file-exists-p name) name)
(t gnus-article-save-directory)))) (t gnus-article-save-directory))))
(read-file-name (read-file-name
(concat prompt " (default " name ") ") (concat prompt " (default " name "): ")
dir name))) dir name)))
;; A list of splits was found. ;; A list of splits was found.
(t (t
...@@ -3289,7 +3289,7 @@ This format is defined by the `gnus-article-time-format' variable." ...@@ -3289,7 +3289,7 @@ This format is defined by the `gnus-article-time-format' variable."
(setq result (setq result
(expand-file-name (expand-file-name
(read-file-name (read-file-name
(concat prompt " (`M-p' for defaults) ") (concat prompt " (`M-p' for defaults): ")
gnus-article-save-directory gnus-article-save-directory
(car split-name)) (car split-name))
gnus-article-save-directory))) gnus-article-save-directory)))
...@@ -3323,7 +3323,7 @@ This format is defined by the `gnus-article-time-format' variable." ...@@ -3323,7 +3323,7 @@ This format is defined by the `gnus-article-time-format' variable."
Optional argument FILENAME specifies file name. Optional argument FILENAME specifies file name.
Directory to save to is default to `gnus-article-save-directory'." Directory to save to is default to `gnus-article-save-directory'."
(setq filename (gnus-read-save-file-name (setq filename (gnus-read-save-file-name
"Save %s in rmail file:" filename "Save %s in rmail file" filename
gnus-rmail-save-name gnus-newsgroup-name gnus-rmail-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-rmail)) gnus-current-headers 'gnus-newsgroup-last-rmail))
(gnus-eval-in-buffer-window gnus-save-article-buffer (gnus-eval-in-buffer-window gnus-save-article-buffer
...@@ -3338,7 +3338,7 @@ Directory to save to is default to `gnus-article-save-directory'." ...@@ -3338,7 +3338,7 @@ Directory to save to is default to `gnus-article-save-directory'."
Optional argument FILENAME specifies file name. Optional argument FILENAME specifies file name.
Directory to save to is default to `gnus-article-save-directory'." Directory to save to is default to `gnus-article-save-directory'."
(setq filename (gnus-read-save-file-name (setq filename (gnus-read-save-file-name
"Save %s in Unix mail file:" filename "Save %s in Unix mail file" filename
gnus-mail-save-name gnus-newsgroup-name gnus-mail-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-mail)) gnus-current-headers 'gnus-newsgroup-last-mail))
(gnus-eval-in-buffer-window gnus-save-article-buffer (gnus-eval-in-buffer-window gnus-save-article-buffer
...@@ -3357,7 +3357,7 @@ Directory to save to is default to `gnus-article-save-directory'." ...@@ -3357,7 +3357,7 @@ Directory to save to is default to `gnus-article-save-directory'."
Optional argument FILENAME specifies file name. Optional argument FILENAME specifies file name.
Directory to save to is default to `gnus-article-save-directory'." Directory to save to is default to `gnus-article-save-directory'."
(setq filename (gnus-read-save-file-name (setq filename (gnus-read-save-file-name
"Save %s in file:" filename "Save %s in file" filename
gnus-file-save-name gnus-newsgroup-name gnus-file-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-file)) gnus-current-headers 'gnus-newsgroup-last-file))
(gnus-eval-in-buffer-window gnus-save-article-buffer (gnus-eval-in-buffer-window gnus-save-article-buffer
...@@ -3381,7 +3381,7 @@ The directory to save in defaults to `gnus-article-save-directory'." ...@@ -3381,7 +3381,7 @@ The directory to save in defaults to `gnus-article-save-directory'."
Optional argument FILENAME specifies file name. Optional argument FILENAME specifies file name.
The directory to save in defaults to `gnus-article-save-directory'." The directory to save in defaults to `gnus-article-save-directory'."
(setq filename (gnus-read-save-file-name (setq filename (gnus-read-save-file-name
"Save %s body in file:" filename "Save %s body in file" filename
gnus-file-save-name gnus-newsgroup-name gnus-file-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-file)) gnus-current-headers 'gnus-newsgroup-last-file))
(gnus-eval-in-buffer-window gnus-save-article-buffer (gnus-eval-in-buffer-window gnus-save-article-buffer
......
...@@ -652,7 +652,7 @@ file for the command instead of the current score file." ...@@ -652,7 +652,7 @@ file for the command instead of the current score file."
(intern ; need symbol (intern ; need symbol
(gnus-completing-read-with-default (gnus-completing-read-with-default
(symbol-name (car gnus-extra-headers)) ; default response (symbol-name (car gnus-extra-headers)) ; default response
"Score extra header:" ; prompt "Score extra header" ; prompt
(mapcar (lambda (x) ; completion list (mapcar (lambda (x) ; completion list
(cons (symbol-name x) x)) (cons (symbol-name x) x))
gnus-extra-headers) gnus-extra-headers)
......
...@@ -7696,8 +7696,8 @@ articles that are younger than AGE days." ...@@ -7696,8 +7696,8 @@ articles that are younger than AGE days."
(gnus-completing-read-with-default (gnus-completing-read-with-default
(symbol-name (car gnus-extra-headers)) (symbol-name (car gnus-extra-headers))
(if current-prefix-arg (if current-prefix-arg
"Exclude extra header:" "Exclude extra header"
"Limit extra header:") "Limit extra header")
(mapcar (lambda (x) (mapcar (lambda (x)
(cons (symbol-name x) x)) (cons (symbol-name x) x))
gnus-extra-headers) gnus-extra-headers)
...@@ -9218,7 +9218,7 @@ latter case, they will be copied into the relevant groups." ...@@ -9218,7 +9218,7 @@ latter case, they will be copied into the relevant groups."
gnus-newsgroup-name))))) gnus-newsgroup-name)))))
(method (method
(gnus-completing-read-with-default (gnus-completing-read-with-default
methname "What backend do you want to use when respooling?" methname "Backend to use when respooling"
methods nil t nil 'gnus-mail-method-history)) methods nil t nil 'gnus-mail-method-history))
ms) ms)
(cond (cond
...@@ -11044,7 +11044,7 @@ save those articles instead." ...@@ -11044,7 +11044,7 @@ save those articles instead."
(let* ((split-name (gnus-get-split-value gnus-move-split-methods)) (let* ((split-name (gnus-get-split-value gnus-move-split-methods))
(minibuffer-confirm-incomplete nil) ; XEmacs (minibuffer-confirm-incomplete nil) ; XEmacs
(prom (prom
(format "%s %s to:" (format "%s %s to"
prompt prompt
(if (> (length articles) 1) (if (> (length articles) 1)
(format "these %d articles" (length articles)) (format "these %d articles" (length articles))
......
...@@ -335,8 +335,8 @@ is slower." ...@@ -335,8 +335,8 @@ is slower."
(defun gnus-completing-read-with-default (default prompt &rest args) (defun gnus-completing-read-with-default (default prompt &rest args)
;; Like `completing-read', except that DEFAULT is the default argument. ;; Like `completing-read', except that DEFAULT is the default argument.
(let* ((prompt (if default (let* ((prompt (if default
(concat prompt " (default " default ") ") (concat prompt " (default " default "): ")
(concat prompt " "))) (concat prompt ": ")))
(answer (apply 'completing-read prompt args))) (answer (apply 'completing-read prompt args)))
(if (or (null answer) (zerop (length answer))) (if (or (null answer) (zerop (length answer)))
default default
......
...@@ -4197,7 +4197,7 @@ Otherwise, generate and save a value for `canlock-password' first." ...@@ -4197,7 +4197,7 @@ Otherwise, generate and save a value for `canlock-password' first."
(zerop (zerop
(length (length
(setq to (completing-read (setq to (completing-read
"Followups to (default: no Followup-To header) " "Followups to (default no Followup-To header): "
(mapcar #'list (mapcar #'list
(cons "poster" (cons "poster"
(message-tokenize-header (message-tokenize-header
......
...@@ -576,9 +576,10 @@ ...@@ -576,9 +576,10 @@
(cadar smime-keys) (cadar smime-keys)
(smime-get-key-by-email (smime-get-key-by-email
(gnus-completing-read-maybe-default (gnus-completing-read-maybe-default
(concat "Decipher using which key? " (concat "Decipher using key"
(if smime-keys (concat "(default " (caar smime-keys) ") ") (if smime-keys
"")) (concat " (default " (caar smime-keys) "): ")
": "))
smime-keys nil nil nil nil (car-safe (car-safe smime-keys)))))) smime-keys nil nil nil nil (car-safe (car-safe smime-keys))))))
(goto-char (point-min)) (goto-char (point-min))
(while (search-forward "\r\n" nil t) (while (search-forward "\r\n" nil t)
......
...@@ -341,9 +341,10 @@ KEYFILE should contain a PEM encoded key and certificate." ...@@ -341,9 +341,10 @@ KEYFILE should contain a PEM encoded key and certificate."
keyfile keyfile
(smime-get-key-with-certs-by-email (smime-get-key-with-certs-by-email
(completing-read (completing-read
(concat "Sign using which key? " (concat "Sign using key"
(if smime-keys (concat "(default " (caar smime-keys) ") ") (if smime-keys
"")) (concat " (default " (caar smime-keys) "): ")
": "))
smime-keys nil nil (car-safe (car-safe smime-keys)))))) smime-keys nil nil (car-safe (car-safe smime-keys))))))
(error "Signing failed")))) (error "Signing failed"))))
...@@ -472,9 +473,9 @@ in the buffer specified by `smime-details-buffer'." ...@@ -472,9 +473,9 @@ in the buffer specified by `smime-details-buffer'."
(or keyfile (or keyfile
(smime-get-key-by-email (smime-get-key-by-email
(completing-read (completing-read
(concat "Decipher using which key? " (concat "Decipher using key"
(if smime-keys (concat "(default " (caar smime-keys) ") ") (if smime-keys (concat " (default " (caar smime-keys) "): ")
"")) ": "))
smime-keys nil nil (car-safe (car-safe smime-keys))))))))) smime-keys nil nil (car-safe (car-safe smime-keys)))))))))
;; Various operations ;; Various operations
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment