From: morioka Date: Mon, 31 Aug 1998 13:26:29 +0000 (+0000) Subject: (eword-encode-default-start-column): New user option. X-Git-Tag: flim-1_9_1~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25e54826d8893998e1484a7ed1bc00eab2e14227;p=elisp%2Fflim.git (eword-encode-default-start-column): New user option. (eword-encode-string): Use `eword-encode-default-start-column'. (eword-encode-address-list): Likewise. (eword-encode-structured-field-body): Likewise. (eword-encode-unstructured-field-body): Likewise. --- diff --git a/eword-encode.el b/eword-encode.el index 2c7017d..7b2c1b9 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -533,35 +533,43 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is ;;; @ application interfaces ;;; +(defcustom eword-encode-default-start-column 10 + "Default start column if it is omitted." + :group 'eword-encode + :type 'integer) + (defun eword-encode-string (string &optional column mode) "Encode STRING as encoded-words, and return the result. Optional argument COLUMN is start-position of the field. Optional argument MODE allows `text', `comment', `phrase' or nil. Default value is `phrase'." - (car (eword-encode-rword-list (or column 0) - (eword-encode-split-string string mode)))) + (car (eword-encode-rword-list + (or column eword-encode-default-start-column) + (eword-encode-split-string string mode)))) (defun eword-encode-address-list (string &optional column) "Encode header field STRING as list of address, and return the result. Optional argument COLUMN is start-position of the field." - (car (eword-encode-rword-list (or column 0) - (eword-encode-addresses-to-rword-list - (std11-parse-addresses-string string)) - ))) + (car (eword-encode-rword-list + (or column eword-encode-default-start-column) + (eword-encode-addresses-to-rword-list + (std11-parse-addresses-string string)) + ))) (defun eword-encode-structured-field-body (string &optional column) "Encode header field STRING as structured field, and return the result. Optional argument COLUMN is start-position of the field." (car (eword-encode-rword-list - (or column 0) + (or column eword-encode-default-start-column) (eword-encode-addr-seq-to-rword-list (std11-lexical-analyze string)) ))) (defun eword-encode-unstructured-field-body (string &optional column) "Encode header field STRING as unstructured field, and return the result. Optional argument COLUMN is start-position of the field." - (car (eword-encode-rword-list (or column 0) - (eword-encode-split-string string 'text)))) + (car (eword-encode-rword-list + (or column eword-encode-default-start-column) + (eword-encode-split-string string 'text)))) (defun eword-encode-field (string) "Encode header field STRING, and return the result.