/[emacs]/emacs/lisp/mh-e/mh-comp.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-comp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by wohler, Mon Oct 17 06:33:31 2005 UTC revision 1.18 by wohler, Sun Oct 23 21:26:17 2005 UTC
# Line 350  See also `mh-send'." Line 350  See also `mh-send'."
350               (mh-forwarded-letter-subject orig-from orig-subject)))               (mh-forwarded-letter-subject orig-from orig-subject)))
351          (mh-insert-fields "Subject:" forw-subject)          (mh-insert-fields "Subject:" forw-subject)
352          (goto-char (point-min))          (goto-char (point-min))
353          ;; If using MML, translate mhn          ;; If using MML, translate MH-style directive
354          (if (equal mh-compose-insertion 'gnus)          (if (equal mh-compose-insertion 'mml)
355              (save-excursion              (save-excursion
356                (goto-char (mh-mail-header-end))                (goto-char (mh-mail-header-end))
357                (while                (while
# Line 527  See also `mh-send'." Line 527  See also `mh-send'."
527                         (group-reply (if (mh-variant-p 'nmh 'mu-mh)                         (group-reply (if (mh-variant-p 'nmh 'mu-mh)
528                                          '("-group" "-nocc" "me")                                          '("-group" "-nocc" "me")
529                                        '("-cc" "all" "-nocc" "me"))))                                        '("-cc" "all" "-nocc" "me"))))
530                   (cond ((or (eq mh-yank-from-start-of-msg 'autosupercite)                   (cond ((or (eq mh-yank-behavior 'autosupercite)
531                              (eq mh-yank-from-start-of-msg 'autoattrib))                              (eq mh-yank-behavior 'autoattrib))
532                          '("-noformat"))                          '("-noformat"))
533                         (includep '("-filter" "mhl.reply"))                         (includep '("-filter" "mhl.reply"))
534                         (t '())))                         (t '())))
# Line 551  See also `mh-send'." Line 551  See also `mh-send'."
551          (message "Composing a reply...done")          (message "Composing a reply...done")
552          (mh-compose-and-send-mail draft "" folder message to subject cc          (mh-compose-and-send-mail draft "" folder message to subject cc
553                                    mh-note-repl "Replied:" config))                                    mh-note-repl "Replied:" config))
554        (when (and (or (eq 'autosupercite mh-yank-from-start-of-msg)        (when (and (or (eq 'autosupercite mh-yank-behavior)
555                       (eq 'autoattrib mh-yank-from-start-of-msg))                       (eq 'autoattrib mh-yank-behavior))
556                   (eq (mh-show-buffer-message-number) mh-sent-from-msg))                   (eq (mh-show-buffer-message-number) mh-sent-from-msg))
557          (undo-boundary)          (undo-boundary)
558          (mh-yank-cur-msg))          (mh-yank-cur-msg))
# Line 788  Returns t if found, nil if not." Line 788  Returns t if found, nil if not."
788      ["Insert Signature"         mh-insert-signature t]      ["Insert Signature"         mh-insert-signature t]
789      ("Encrypt/Sign Message"      ("Encrypt/Sign Message"
790       ["Sign Message"       ["Sign Message"
791        mh-mml-secure-message-sign mh-gnus-pgp-support-flag]        mh-mml-secure-message-sign mh-pgp-support-flag]
792       ["Encrypt Message"       ["Encrypt Message"
793        mh-mml-secure-message-encrypt mh-gnus-pgp-support-flag]        mh-mml-secure-message-encrypt mh-pgp-support-flag]
794       ["Sign+Encrypt Message"       ["Sign+Encrypt Message"
795        mh-mml-secure-message-signencrypt mh-gnus-pgp-support-flag]        mh-mml-secure-message-signencrypt mh-pgp-support-flag]
796       ["Disable Security"       ["Disable Security"
797        mh-mml-unsecure-message mh-gnus-pgp-support-flag]        mh-mml-unsecure-message mh-pgp-support-flag]
798       "--"       "--"
799       "Security Method"       "Security Method"
800       ["PGP (MIME)" (setq mh-mml-method-default "pgpmime")       ["PGP (MIME)" (setq mh-mml-method-default "pgpmime")
# Line 810  Returns t if found, nil if not." Line 810  Returns t if found, nil if not."
810       ["Save Method as Default"       ["Save Method as Default"
811        (customize-save-variable 'mh-mml-method-default mh-mml-method-default) t]        (customize-save-variable 'mh-mml-method-default mh-mml-method-default) t]
812       )       )
813      ["Compose Insertion (MIME)..."      mh-compose-insertion t]      ["Compose Insertion..."      mh-compose-insertion t]
814      ["Compose Compressed tar (MIME)..."      ["Compose Compressed tar (MH)..."
815       mh-mhn-compose-external-compressed-tar t]       mh-mh-compose-external-compressed-tar t]
816      ["Compose Get File (MIME)..."       mh-mhn-compose-anon-ftp t]      ["Compose Get File (MH)..."       mh-mh-compose-anon-ftp t]
817      ["Compose Forward (MIME)..."        mh-compose-forward t]      ["Compose Forward..."        mh-compose-forward t]
818      ;; The next two will have to be merged. But I also need to make sure the      ;; The next two will have to be merged. But I also need to make sure the
819      ;; user can't mix directives of both types.      ;; user can't mix tags of both types.
820      ["Pull in All Compositions (mhn)"      ["Pull in All Compositions (MH)"
821       mh-edit-mhn (mh-mhn-directive-present-p)]       mh-mh-to-mime (mh-mh-directive-present-p)]
822      ["Pull in All Compositions (gnus)"      ["Pull in All Compositions (MML)"
823       mh-mml-to-mime (mh-mml-directive-present-p)]       mh-mml-to-mime (mh-mml-tag-present-p)]
824      ["Revert to Non-MIME Edit (mhn)"      ["Revert to Non-MIME Edit (MH)"
825       mh-revert-mhn-edit (equal mh-compose-insertion 'mhn)]       mh-mh-to-mime-undo (equal mh-compose-insertion 'mh)]
826      ["Kill This Draft"          mh-fully-kill-draft t]))      ["Kill This Draft"          mh-fully-kill-draft t]))
827    
828  ;;; Help Messages  ;;; Help Messages
# Line 878  work better in MH-Letter mode." Line 878  work better in MH-Letter mode."
878  When you have finished composing, type \\[mh-send-letter] to send the message  When you have finished composing, type \\[mh-send-letter] to send the message
879  using the MH mail handling system.  using the MH mail handling system.
880    
881  There are two types of MIME directives used by MH-E: Gnus and MH. The option  There are two types of tags used by MH-E when composing MIME messages: MML and
882  `mh-compose-insertion' controls what type of directives are inserted by MH-E  MH. The option `mh-compose-insertion' controls what type of tags are inserted
883  commands. These directives can be converted to MIME body parts by running  by MH-E commands. These tags can be converted to MIME body parts by running
884  \\[mh-edit-mhn] for mhn directives or \\[mh-mml-to-mime] for Gnus directives.  \\[mh-mh-to-mime] for MH-style directives or \\[mh-mml-to-mime] for MML tags.
 This step is mandatory if these directives are added manually. If the  
 directives are inserted with MH-E commands such as \\[mh-compose-insertion],  
 the directives are expanded automatically when the letter is sent.  
885    
886  Options that control this mode can be changed with  Options that control this mode can be changed with \\[customize-group];
887  \\[customize-group]; specify the \"mh-compose\" group.  specify the \"mh-compose\" group.
888    
889  When a message is composed, the hooks `text-mode-hook' and  When a message is composed, the hooks `text-mode-hook' and
890  `mh-letter-mode-hook' are run.  `mh-letter-mode-hook' are run.
# Line 1016  Header is treated specially by inserting Line 1013  Header is treated specially by inserting
1013    
1014  ;;;###mh-autoload  ;;;###mh-autoload
1015  (defun mh-to-field ()  (defun mh-to-field ()
1016    "Move point to the end of a specified header field.    "Move to specified header field.
1017  The field is indicated by the previous keystroke (the last keystroke  The field is indicated by the previous keystroke (the last keystroke
1018  of the command) according to the list in the variable `mh-to-field-choices'.  of the command) according to the list in the variable `mh-to-field-choices'.
1019  Create the field if it does not exist.  Set the mark to point before moving."  Create the field if it does not exist.  Set the mark to point before moving."
# Line 1047  Create the field if it does not exist. Line 1044  Create the field if it does not exist.
1044    
1045  ;;;###mh-autoload  ;;;###mh-autoload
1046  (defun mh-to-fcc (&optional folder)  (defun mh-to-fcc (&optional folder)
1047    "Insert an Fcc: FOLDER field in the current message.    "Move to \"Fcc:\" header field.
1048  Prompt for the field name with a completion list of the current folders."  This command will prompt you for the FOLDER name in which to file a copy of
1049    the draft."
1050    (interactive)    (interactive)
1051    (or folder    (or folder
1052        (setq folder (mh-prompt-for-folder        (setq folder (mh-prompt-for-folder
# Line 1080  Prompt for the field name with a complet Line 1078  Prompt for the field name with a complet
1078    
1079  ;;;###mh-autoload  ;;;###mh-autoload
1080  (defun mh-insert-signature (&optional file)  (defun mh-insert-signature (&optional file)
1081    "Insert the signature specified by `mh-signature-file-name' or FILE at point.    "Insert signature in message.
1082  A signature separator (`-- ') will be added if the signature block does not  This command inserts your signature at the current cursor location.
1083    
1084    By default, the text of your signature is taken from the file
1085    \"~/.signature\". You can read from other sources by changing the option
1086    `mh-signature-file-name'.
1087    
1088    A signature separator (\"-- \") will be added if the signature block does not
1089  contain one and `mh-signature-separator-flag' is on.  contain one and `mh-signature-separator-flag' is on.
1090    
1091  The value of `mh-letter-insert-signature-hook' is a list of functions to be  The value of `mh-letter-insert-signature-hook' is a list of functions to be
1092  called, with no arguments, after the signature is inserted.  called, with no arguments, after the signature is inserted. These functions
1093  The signature can also be inserted with `mh-identity-list'."  may access the actual name of the file or the function used to insert the
1094  (interactive)  signature with `mh-signature-file-name'.
1095    
1096    The signature can also be inserted using Identities (see `mh-identity-list')"
1097      (interactive)
1098    (save-excursion    (save-excursion
1099      (insert "\n")      (insert "\n")
1100      (let ((mh-signature-file-name (or file mh-signature-file-name))      (let ((mh-signature-file-name (or file mh-signature-file-name))
1101            (mh-mhn-p (mh-mhn-directive-present-p))            (mh-mh-p (mh-mh-directive-present-p))
1102            (mh-mml-p (mh-mml-directive-present-p)))            (mh-mml-p (mh-mml-tag-present-p)))
1103        (save-restriction        (save-restriction
1104          (narrow-to-region (point) (point))          (narrow-to-region (point) (point))
1105          (cond          (cond
1106           ((mh-file-is-vcard-p mh-signature-file-name)           ((mh-file-is-vcard-p mh-signature-file-name)
1107            (if (equal mh-compose-insertion 'gnus)            (if (equal mh-compose-insertion 'mml)
1108                (insert "<#part type=\"text/x-vcard\" filename=\""                (insert "<#part type=\"text/x-vcard\" filename=\""
1109                        mh-signature-file-name                        mh-signature-file-name
1110                        "\" disposition=inline description=VCard>\n<#/part>")                        "\" disposition=inline description=VCard>\n<#/part>")
# Line 1105  The signature can also be inserted with Line 1113  The signature can also be inserted with
1113                      "\" [VCard] " (expand-file-name mh-signature-file-name))))                      "\" [VCard] " (expand-file-name mh-signature-file-name))))
1114           (t           (t
1115            (cond            (cond
1116             (mh-mhn-p             (mh-mh-p
1117              (insert "#\n" "Content-Description: Signature\n"))              (insert "#\n" "Content-Description: Signature\n"))
1118             (mh-mml-p             (mh-mml-p
1119              (mml-insert-tag 'part 'type "text/plain" 'disposition "inline"              (mml-insert-tag 'part 'type "text/plain" 'disposition "inline"
# Line 1124  The signature can also be inserted with Line 1132  The signature can also be inserted with
1132                     mh-signature-separator-flag                     mh-signature-separator-flag
1133                     (> (point-max) (point-min))                     (> (point-max) (point-min))
1134                     (not (mh-signature-separator-p)))                     (not (mh-signature-separator-p)))
1135            (cond (mh-mhn-p            (cond (mh-mh-p
1136                   (forward-line 2))                   (forward-line 2))
1137                  (mh-mml-p                  (mh-mml-p
1138                   (forward-line 1)))                   (forward-line 1)))
# Line 1135  The signature can also be inserted with Line 1143  The signature can also be inserted with
1143    
1144  ;;;###mh-autoload  ;;;###mh-autoload
1145  (defun mh-check-whom ()  (defun mh-check-whom ()
1146    "Verify recipients of the current letter, showing expansion of any aliases."    "Verify recipients, showing expansion of any aliases.
1147    This command expands aliases so you can check the actual address(es) in the
1148    alias. A new buffer named \"*MH-E Recipients*\" is created with the output of
1149    \"whom\"."
1150    (interactive)    (interactive)
1151    (let ((file-name buffer-file-name))    (let ((file-name buffer-file-name))
1152      (save-buffer)      (save-buffer)
# Line 1215  The versions of MH-E, Emacs, and MH are Line 1226  The versions of MH-E, Emacs, and MH are
1226    
1227  ;;;###mh-autoload  ;;;###mh-autoload
1228  (defun mh-insert-auto-fields (&optional non-interactive)  (defun mh-insert-auto-fields (&optional non-interactive)
1229    "Insert custom fields if To or Cc match `mh-auto-fields-list'.    "Insert custom fields if recipient matches `mh-auto-fields-list'.
1230  Sets buffer-local `mh-insert-auto-fields-done-local' when done and inserted  Sets buffer-local `mh-insert-auto-fields-done-local' when done and inserted
1231  something.  If NON-INTERACTIVE is non-nil, do not be verbose and only  something.  If NON-INTERACTIVE is non-nil, do not be verbose and only
1232  attempt matches if `mh-insert-auto-fields-done-local' is nil.  attempt matches if `mh-insert-auto-fields-done-local' is nil.
# Line 1348  there." Line 1359  there."
1359    
1360  ;;;###mh-autoload  ;;;###mh-autoload
1361  (defun mh-send-letter (&optional arg)  (defun mh-send-letter (&optional arg)
1362    "Send the draft letter in the current buffer.    "Save draft and send message.
1363  If optional prefix argument ARG is provided, monitor delivery.  When you are all through editing a message, you send it with this command. You
1364  The value of `mh-before-send-letter-hook' is a list of functions to be called,  can give an argument ARG to monitor the first stage of the delivery\; this
1365  with no arguments, before doing anything.  output can be found in a buffer called \"*MH-E Mail Delivery*\".
1366  Run `\\[mh-edit-mhn]' if mhn directives are present; otherwise  
1367  run `\\[mh-mml-to-mime]' if mml directives are present."  The value of `mh-before-send-letter-hook' is a list of functions to be called
1368    at the beginning of this command. For example, if you want to check your
1369    spelling in your message before sending, add the `ispell-message' function.
1370    
1371    In case the MH \"send\" program is installed under a different name, use
1372    `mh-send-prog' to tell MH-E the name."
1373    (interactive "P")    (interactive "P")
1374    (run-hooks 'mh-before-send-letter-hook)    (run-hooks 'mh-before-send-letter-hook)
1375    (if (and (mh-insert-auto-fields t)    (if (and (mh-insert-auto-fields t)
# Line 1361  run `\\[mh-mml-to-mime]' if mml directiv Line 1377  run `\\[mh-mml-to-mime]' if mml directiv
1377             (goto-char (point-min)))             (goto-char (point-min)))
1378        (if (not (y-or-n-p "Auto fields inserted, send? "))        (if (not (y-or-n-p "Auto fields inserted, send? "))
1379            (error "Send aborted")))            (error "Send aborted")))
1380    (cond ((mh-mhn-directive-present-p)    (cond ((mh-mh-directive-present-p)
1381           (mh-edit-mhn))           (mh-mh-to-mime))
1382          ((or (mh-mml-directive-present-p) (not (mh-ascii-buffer-p)))          ((or (mh-mml-tag-present-p) (not (mh-ascii-buffer-p)))
1383           (mh-mml-to-mime)))           (mh-mml-to-mime)))
1384    (save-buffer)    (save-buffer)
1385    (message "Sending...")    (message "Sending...")
# Line 1419  run `\\[mh-mml-to-mime]' if mml directiv Line 1435  run `\\[mh-mml-to-mime]' if mml directiv
1435    
1436  ;;;###mh-autoload  ;;;###mh-autoload
1437  (defun mh-insert-letter (folder message verbatim)  (defun mh-insert-letter (folder message verbatim)
1438    "Insert a message into the current letter.    "Insert a message.
1439  Removes the header fields according to the variable  This command prompts you for the FOLDER and MESSAGE number and inserts the
1440  `mh-invisible-header-fields-compiled'.  message, indented by `mh-ins-buf-prefix' (\"> \") unless `mh-yank-behavior' is
1441  Prefixes each non-blank line with `mh-ins-buf-prefix', unless  set to one of the supercite flavors in which case supercite is used to format
1442  `mh-yank-from-start-of-msg' is set for supercite in which case supercite is  the message. Certain undesirable header fields (see
1443  used to format the message.  `mh-invisible-header-fields-compiled') are removed before insertion.
1444  Prompts for FOLDER and MESSAGE.  If prefix argument VERBATIM provided, do  
1445  not indent and do not delete headers.  Leaves the mark before the letter  If given a prefix argument VERBATIM, the header is left intact, the message is
1446  and point after it."  not indented, and \"> \" is not inserted before each line. This command leaves
1447    the mark before the letter and point after it."
1448    (interactive    (interactive
1449     (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)     (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
1450           (read-string (concat "Message number"           (read-string (concat "Message number"
# Line 1468  and point after it." Line 1485  and point after it."
1485  ;;;###mh-autoload  ;;;###mh-autoload
1486  (defun mh-yank-cur-msg ()  (defun mh-yank-cur-msg ()
1487    "Insert the current message into the draft buffer.    "Insert the current message into the draft buffer.
1488  Prefix each non-blank line in the message with the string in  
1489  `mh-ins-buf-prefix'.  If a region is set in the message's buffer, then  It is often useful to insert a snippet of text from a letter that someone
1490  only the region will be inserted.  Otherwise, the entire message will  mailed to provide some context for your reply. This command does this by
1491  be inserted if `mh-yank-from-start-of-msg' is non-nil.  If this variable  adding an attribution, yanking a portion of text from the message to which
1492  is nil, the portion of the message following the point will be yanked.  you're replying, and inserting `mh-ins-buf-prefix' (`> ') before each line.
1493  If `mh-delete-yanked-msg-window-flag' is non-nil, any window displaying the  
1494  yanked message will be deleted."  The attribution consists of the sender's name and email address
1495    followed by the content of the `mh-extract-from-attribution-verb'
1496    option.
1497    
1498    You can also turn on the `mh-delete-yanked-msg-window-flag' option to delete
1499    the window containing the original message after yanking it to make more room
1500    on your screen for your reply.
1501    
1502    You can control how the message to which you are replying is yanked
1503    into your reply using `mh-yank-behavior'.
1504    
1505    If this isn't enough, you can gain full control over the appearance of the
1506    included text by setting `mail-citation-hook' to a function that modifies it."
1507    (interactive)    (interactive)
1508    (if (and mh-sent-from-folder    (if (and mh-sent-from-folder
1509             (save-excursion (set-buffer mh-sent-from-folder) mh-show-buffer)             (save-excursion (set-buffer mh-sent-from-folder) mh-show-buffer)
# Line 1491  yanked message will be deleted." Line 1520  yanked message will be deleted."
1520                 (yank-region (mh-mark-active-p nil))                 (yank-region (mh-mark-active-p nil))
1521                 (mh-ins-str                 (mh-ins-str
1522                  (cond ((and yank-region                  (cond ((and yank-region
1523                              (or (eq 'supercite mh-yank-from-start-of-msg)                              (or (eq 'supercite mh-yank-behavior)
1524                                  (eq 'autosupercite mh-yank-from-start-of-msg)                                  (eq 'autosupercite mh-yank-behavior)
1525                                  (eq t mh-yank-from-start-of-msg)))                                  (eq t mh-yank-behavior)))
1526                         ;; supercite needs the full header                         ;; supercite needs the full header
1527                         (concat                         (concat
1528                          (buffer-substring (point-min) (mh-mail-header-end))                          (buffer-substring (point-min) (mh-mail-header-end))
# Line 1501  yanked message will be deleted." Line 1530  yanked message will be deleted."
1530                          (buffer-substring (region-beginning) (region-end))))                          (buffer-substring (region-beginning) (region-end))))
1531                        (yank-region                        (yank-region
1532                         (buffer-substring (region-beginning) (region-end)))                         (buffer-substring (region-beginning) (region-end)))
1533                        ((or (eq 'body mh-yank-from-start-of-msg)                        ((or (eq 'body mh-yank-behavior)
1534                             (eq 'attribution                             (eq 'attribution mh-yank-behavior)
1535                                 mh-yank-from-start-of-msg)                             (eq 'autoattrib mh-yank-behavior))
                            (eq 'autoattrib  
                                mh-yank-from-start-of-msg))  
1536                         (buffer-substring                         (buffer-substring
1537                          (save-excursion                          (save-excursion
1538                            (goto-char (point-min))                            (goto-char (point-min))
1539                            (mh-goto-header-end 1)                            (mh-goto-header-end 1)
1540                            (point))                            (point))
1541                          (point-max)))                          (point-max)))
1542                        ((or (eq 'supercite mh-yank-from-start-of-msg)                        ((or (eq 'supercite mh-yank-behavior)
1543                             (eq 'autosupercite mh-yank-from-start-of-msg)                             (eq 'autosupercite mh-yank-behavior)
1544                             (eq t mh-yank-from-start-of-msg))                             (eq t mh-yank-behavior))
1545                         (buffer-substring (point-min) (point-max)))                         (buffer-substring (point-min) (point-max)))
1546                        (t                        (t
1547                         (buffer-substring (point) (point-max))))))                         (buffer-substring (point) (point-max))))))
# Line 1526  yanked message will be deleted." Line 1553  yanked message will be deleted."
1553              (push-mark)                 ;Needed for sc-cite-original              (push-mark)                 ;Needed for sc-cite-original
1554              (goto-char (point-min))     ;Needed for sc-cite-original              (goto-char (point-min))     ;Needed for sc-cite-original
1555              (mh-insert-prefix-string mh-ins-buf-prefix)              (mh-insert-prefix-string mh-ins-buf-prefix)
1556              (when (or (eq 'attribution mh-yank-from-start-of-msg)              (when (or (eq 'attribution mh-yank-behavior)
1557                        (eq 'autoattrib mh-yank-from-start-of-msg))                        (eq 'autoattrib mh-yank-behavior))
1558                (insert from-attr)                (insert from-attr)
1559                (mh-identity-insert-attribution-verb nil)                (mh-identity-insert-attribution-verb nil)
1560                (insert "\n\n"))                (insert "\n\n"))
# Line 1569  yanked message will be deleted." Line 1596  yanked message will be deleted."
1596    
1597  (defun mh-insert-prefix-string (mh-ins-string)  (defun mh-insert-prefix-string (mh-ins-string)
1598    "Insert prefix string before each line in buffer.    "Insert prefix string before each line in buffer.
1599  The inserted letter is cited using `sc-cite-original' if  The inserted letter is cited using `sc-cite-original' if `mh-yank-behavior' is
1600  `mh-yank-from-start-of-msg' is one of 'supercite or 'autosupercite. Otherwise,  one of 'supercite or 'autosupercite. Otherwise, simply insert MH-INS-STRING
1601  simply insert MH-INS-STRING before each line."  before each line."
1602    (goto-char (point-min))    (goto-char (point-min))
1603    (cond ((or (eq mh-yank-from-start-of-msg 'supercite)    (cond ((or (eq mh-yank-behavior 'supercite)
1604               (eq mh-yank-from-start-of-msg 'autosupercite))               (eq mh-yank-behavior 'autosupercite))
1605           (sc-cite-original))           (sc-cite-original))
1606          (mail-citation-hook          (mail-citation-hook
1607           (run-hooks 'mail-citation-hook))           (run-hooks 'mail-citation-hook))
# Line 1589  simply insert MH-INS-STRING before each Line 1616  simply insert MH-INS-STRING before each
1616    
1617  ;;;###mh-autoload  ;;;###mh-autoload
1618  (defun mh-fully-kill-draft ()  (defun mh-fully-kill-draft ()
1619    "Kill the draft message file and the draft message buffer.    "Quit editing and delete draft message.
1620  Use \\[kill-buffer] if you don't want to delete the draft message file."  If for some reason you are not happy with the draft, you can use the this
1621    command to kill the draft buffer and delete the draft message. Use the
1622    \\[kill-buffer] command if you don't want to delete the draft message."
1623    (interactive)    (interactive)
1624    (if (y-or-n-p "Kill draft message? ")    (if (y-or-n-p "Kill draft message? ")
1625        (let ((config mh-previous-window-config))        (let ((config mh-previous-window-config))
# Line 1618  Use \\[kill-buffer] if you don't want to Line 1647  Use \\[kill-buffer] if you don't want to
1647  ;;;###mh-autoload  ;;;###mh-autoload
1648  (defun mh-open-line ()  (defun mh-open-line ()
1649    "Insert a newline and leave point after it.    "Insert a newline and leave point after it.
1650  In addition, insert newline and quoting characters before text after point.  This command is similar to the \\[open-line] command in that it inserts a
1651  This is useful in breaking up paragraphs in replies."  newline after point. It differs in that it also inserts the right number of
1652    quoting characters and spaces so that the next line begins in the same column
1653    as it was. This is useful when breaking up paragraphs in replies."
1654    (interactive)    (interactive)
1655    (let ((column (current-column))    (let ((column (current-column))
1656          (prefix (mh-current-fill-prefix)))          (prefix (mh-current-fill-prefix)))
# Line 1707  Any match found replaces the text from B Line 1738  Any match found replaces the text from B
1738    
1739  (defun mh-letter-complete (arg)  (defun mh-letter-complete (arg)
1740    "Perform completion on header field or word preceding point.    "Perform completion on header field or word preceding point.
1741  If the field contains addresses (for example, `To:' or `Cc:') or folders (for  If the field contains addresses (for example, \"To:\" or \"Cc:\") or folders
1742  example, `Fcc:') then this function will provide alias completion. Elsewhere,  \(for example, \"Fcc:\") then this command will provide alias completion. In
1743  this function runs `mh-letter-complete-function' instead and passes the prefix  the body of the message, this command runs `mh-letter-complete-function'
1744  ARG, if present."  instead, which is set to \"'ispell-complete-word\" by default. This command
1745    takes a prefix argument ARG that is passed to the
1746    `mh-letter-complete-function'."
1747    (interactive "P")    (interactive "P")
1748    (let ((func nil))    (let ((func nil))
1749      (cond ((not (mh-in-header-p))      (cond ((not (mh-in-header-p))
# Line 1722  ARG, if present." Line 1755  ARG, if present."
1755    
1756  (defun mh-letter-complete-or-space (arg)  (defun mh-letter-complete-or-space (arg)
1757    "Perform completion or insert space.    "Perform completion or insert space.
1758  If `mh-compose-space-does-completion-flag' is nil (the default) a space is  Turn on the `mh-compose-space-does-completion-flag' option to use this command
1759  inserted.  to perform completion in the header. Otherwise, a space is inserted.
   
 Otherwise, if point is in the message header and the preceding character is  
 not whitespace then do completion. Otherwise insert a space character.  
1760    
1761  ARG is the number of spaces inserted."  ARG is the number of spaces inserted."
1762    (interactive "p")    (interactive "p")
# Line 1744  ARG is the number of spaces inserted." Line 1774  ARG is the number of spaces inserted."
1774            (t (self-insert-command arg)))))            (t (self-insert-command arg)))))
1775    
1776  (defun mh-letter-confirm-address ()  (defun mh-letter-confirm-address ()
1777    "Flash alias expansion if `mh-alias-flash-on-comma' is non-nil."    "Flash alias expansion.
1778    Addresses are separated by a comma\; and when you press the comma, this
1779    command flashes the alias expansion in the minibuffer if
1780    `mh-alias-flash-on-comma' is turned on."
1781    (interactive)    (interactive)
1782    (cond ((not (mh-in-header-p)) (self-insert-command 1))    (cond ((not (mh-in-header-p)) (self-insert-command 1))
1783          ((eq (cdr (assoc (mh-letter-header-field-at-point)          ((eq (cdr (assoc (mh-letter-header-field-at-point)
# Line 1768  name." Line 1801  name."
1801  ;;;###mh-autoload  ;;;###mh-autoload
1802  (defun mh-letter-next-header-field-or-indent (arg)  (defun mh-letter-next-header-field-or-indent (arg)
1803    "Move to next field or indent depending on point.    "Move to next field or indent depending on point.
1804  In the message header, go to the next field. Elsewhere call  Within the header of the message, this command moves between fields, but skips
1805  `indent-relative' as usual with optional prefix ARG."  those fields listed in `mh-compose-skipped-header-fields'. After the last
1806    field, this command then moves point to the message body before cycling back
1807    to the first field. If point is already past the first line of the message
1808    body, then this command indents by calling `indent-relative' with the given
1809    prefix argument ARG."
1810    (interactive "P")    (interactive "P")
1811    (let ((header-end (save-excursion    (let ((header-end (save-excursion
1812                        (goto-char (mh-mail-header-end))                        (goto-char (mh-mail-header-end))
# Line 1801  If we are at the last header field go to Line 1838  If we are at the last header field go to
1838  ;;;###mh-autoload  ;;;###mh-autoload
1839  (defun mh-letter-previous-header-field ()  (defun mh-letter-previous-header-field ()
1840    "Cycle to the previous header field.    "Cycle to the previous header field.
1841  If we are at the first header field go to the start of the message body."  This command moves backwards between the fields and cycles to the body of the
1842    message after the first field. Unlike the
1843    \\[mh-letter-next-header-field-or-indent] command, it will always take point
1844    to the last field from anywhere in the body."
1845    (interactive)    (interactive)
1846    (let ((header-end (mh-mail-header-end)))    (let ((header-end (mh-mail-header-end)))
1847      (if (>= (point) header-end)      (if (>= (point) header-end)
# Line 1851  except that it is callable from a mouse Line 1891  except that it is callable from a mouse
1891    
1892  (defun mh-letter-toggle-header-field-display (arg)  (defun mh-letter-toggle-header-field-display (arg)
1893    "Toggle display of header field at point.    "Toggle display of header field at point.
 If the header is long or spread over multiple lines then hiding it will show  
 the first few characters and replace the rest with an ellipsis.  
1894    
1895  If ARG is negative then header is hidden, if positive it is displayed. If ARG  Use this command to display ellipsed header fields. This command is a toggle
1896  is the symbol `long' then keep at most the first 4 lines."  so entering it again will hide the field. This command takes a prefix argument
1897    ARG: if negative then the field is hidden, if positive then the field is
1898    displayed."
1899    (interactive (list nil))    (interactive (list nil))
1900    (when (and (mh-in-header-p)    (when (and (mh-in-header-p)
1901               (progn               (progn
# Line 1881  is the symbol `long' then keep at most t Line 1921  is the symbol `long' then keep at most t
1921                   (remove-text-properties begin end '(invisible nil))                   (remove-text-properties begin end '(invisible nil))
1922                   (search-forward ":" (line-end-position) t)                   (search-forward ":" (line-end-position) t)
1923                   (mh-letter-skip-leading-whitespace-in-header-field))                   (mh-letter-skip-leading-whitespace-in-header-field))
1924                    ;; XXX Redesign to make usable by user. Perhaps use a positive
1925                    ;; numeric prefix to make that many lines visible.
1926                  ((eq arg 'long)                  ((eq arg 'long)
1927                   (end-of-line 4)                   (end-of-line 4)
1928                   (mh-letter-truncate-header-field end)                   (mh-letter-truncate-header-field end)
# Line 1939  Otherwise return the empty string." Line 1981  Otherwise return the empty string."
1981    "\C-c\C-^"            mh-insert-signature ;if no C-s    "\C-c\C-^"            mh-insert-signature ;if no C-s
1982    "\C-c\C-c"            mh-send-letter    "\C-c\C-c"            mh-send-letter
1983    "\C-c\C-d"            mh-insert-identity    "\C-c\C-d"            mh-insert-identity
1984    "\C-c\C-e"            mh-edit-mhn    "\C-c\C-e"            mh-mh-to-mime
1985    "\C-c\C-f\C-b"        mh-to-field    "\C-c\C-f\C-b"        mh-to-field
1986    "\C-c\C-f\C-c"        mh-to-field    "\C-c\C-f\C-c"        mh-to-field
1987    "\C-c\C-f\C-d"        mh-to-field    "\C-c\C-f\C-d"        mh-to-field
# Line 1957  Otherwise return the empty string." Line 1999  Otherwise return the empty string."
1999    "\C-c\C-i"            mh-insert-letter    "\C-c\C-i"            mh-insert-letter
2000    "\C-c\C-m\C-e"        mh-mml-secure-message-encrypt    "\C-c\C-m\C-e"        mh-mml-secure-message-encrypt
2001    "\C-c\C-m\C-f"        mh-compose-forward    "\C-c\C-m\C-f"        mh-compose-forward
2002    "\C-c\C-m\C-g"        mh-mhn-compose-anon-ftp    "\C-c\C-m\C-g"        mh-mh-compose-anon-ftp
2003    "\C-c\C-m\C-i"        mh-compose-insertion    "\C-c\C-m\C-i"        mh-compose-insertion
2004    "\C-c\C-m\C-m"        mh-mml-to-mime    "\C-c\C-m\C-m"        mh-mml-to-mime
2005    "\C-c\C-m\C-n"        mh-mml-unsecure-message    "\C-c\C-m\C-n"        mh-mml-unsecure-message
2006    "\C-c\C-m\C-s"        mh-mml-secure-message-sign    "\C-c\C-m\C-s"        mh-mml-secure-message-sign
2007    "\C-c\C-m\C-t"        mh-mhn-compose-external-compressed-tar    "\C-c\C-m\C-t"        mh-mh-compose-external-compressed-tar
2008    "\C-c\C-m\C-u"        mh-revert-mhn-edit    "\C-c\C-m\C-u"        mh-mh-to-mime-undo
2009    "\C-c\C-m\C-x"        mh-mhn-compose-external-type    "\C-c\C-m\C-x"        mh-mh-compose-external-type
2010    "\C-c\C-mee"          mh-mml-secure-message-encrypt    "\C-c\C-mee"          mh-mml-secure-message-encrypt
2011    "\C-c\C-mes"          mh-mml-secure-message-signencrypt    "\C-c\C-mes"          mh-mml-secure-message-signencrypt
2012    "\C-c\C-mf"           mh-compose-forward    "\C-c\C-mf"           mh-compose-forward
2013    "\C-c\C-mg"           mh-mhn-compose-anon-ftp    "\C-c\C-mg"           mh-mh-compose-anon-ftp
2014    "\C-c\C-mi"           mh-compose-insertion    "\C-c\C-mi"           mh-compose-insertion
2015    "\C-c\C-mm"           mh-mml-to-mime    "\C-c\C-mm"           mh-mml-to-mime
2016    "\C-c\C-mn"           mh-mml-unsecure-message    "\C-c\C-mn"           mh-mml-unsecure-message
2017    "\C-c\C-mse"          mh-mml-secure-message-signencrypt    "\C-c\C-mse"          mh-mml-secure-message-signencrypt
2018    "\C-c\C-mss"          mh-mml-secure-message-sign    "\C-c\C-mss"          mh-mml-secure-message-sign
2019    "\C-c\C-mt"           mh-mhn-compose-external-compressed-tar    "\C-c\C-mt"           mh-mh-compose-external-compressed-tar
2020    "\C-c\C-mu"           mh-revert-mhn-edit    "\C-c\C-mu"           mh-mh-to-mime-undo
2021    "\C-c\C-mx"           mh-mhn-compose-external-type    "\C-c\C-mx"           mh-mh-compose-external-type
2022    "\C-c\C-o"            mh-open-line    "\C-c\C-o"            mh-open-line
2023    "\C-c\C-q"            mh-fully-kill-draft    "\C-c\C-q"            mh-fully-kill-draft
2024    "\C-c\C-s"            mh-insert-signature    "\C-c\C-s"            mh-insert-signature

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26