mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-22 05:51:11 -07:00
(mh-insert-letter): If a message number isn't given, throw an error
rather than using a potentially incorrect message number (closes SF #1473729). In addition, use the cur message if mh-sent-from-msg is nil (when sending a message, in contrast to replying). Move conversion of int to string into interactive stanza so body can assume variables are of proper type.
This commit is contained in:
parent
6ac3c7bb02
commit
15855f8f78
2 changed files with 20 additions and 8 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-letter.el (mh-insert-letter): If a message number isn't
|
||||
given, throw an error rather than using a potentially incorrect
|
||||
message number (closes SF #1473729). In addition, use the cur
|
||||
message if mh-sent-from-msg is nil (when sending a message, in
|
||||
contrast to replying). Move conversion of int to string into
|
||||
interactive stanza so body can assume variables are of proper
|
||||
type.
|
||||
|
||||
2006-04-20 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-tool-bar.el (image-load-path): Define to shush compiler.
|
||||
|
|
|
|||
|
|
@ -393,24 +393,26 @@ message is not indented, and \"> \" is not inserted before each line.
|
|||
This command leaves the mark before the letter and point after it."
|
||||
(interactive
|
||||
(let* ((folder
|
||||
(mh-prompt-for-folder "Message from"
|
||||
mh-sent-from-folder nil))
|
||||
(mh-prompt-for-folder "Message from" mh-sent-from-folder nil))
|
||||
(default
|
||||
(if (and (equal folder mh-sent-from-folder)
|
||||
(numberp mh-sent-from-msg))
|
||||
mh-sent-from-msg
|
||||
(if (equal folder mh-sent-from-folder)
|
||||
(or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur")))
|
||||
(nth 0 (mh-translate-range folder "cur"))))
|
||||
(message
|
||||
(read-string (concat "Message number"
|
||||
(or (and default
|
||||
(format " (default %d): " default))
|
||||
": ")))))
|
||||
": "))
|
||||
nil nil
|
||||
(if (numberp default)
|
||||
(int-to-string default)
|
||||
default))))
|
||||
(list folder message current-prefix-arg)))
|
||||
(if (equal message "")
|
||||
(error "No message number given"))
|
||||
(save-restriction
|
||||
(narrow-to-region (point) (point))
|
||||
(let ((start (point-min)))
|
||||
(if (and (equal message "") (numberp mh-sent-from-msg))
|
||||
(setq message (int-to-string mh-sent-from-msg)))
|
||||
(insert-file-contents
|
||||
(expand-file-name message (mh-expand-file-name folder)))
|
||||
(when (not verbatim)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue