Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
367aa646
Commit
367aa646
authored
Jan 10, 2009
by
Richard M. Stallman
Browse files
(mail-quote-printable-region): New function.
parent
841a91fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
lisp/mail/mail-utils.el
lisp/mail/mail-utils.el
+20
-0
No files found.
lisp/mail/mail-utils.el
View file @
367aa646
...
...
@@ -77,6 +77,26 @@ we add the wrapper characters =?ISO-8859-1?Q?....?=."
"
?=
")
(concat result (substring string i))))))
;;;###autoload
(defun mail-quote-printable-region (beg end &optional wrapper)
"
Convert
the
region
to
the
\"quoted
printable\"
Q
encoding.
If
the
optional
argument
WRAPPER
is
non-nil,
we
add
the
wrapper
characters
=?ISO-8859-1?Q?....?=.
"
(interactive "
r\nP
")
(save-match-data
(save-excursion
(goto-char beg)
(save-restriction
(narrow-to-region beg end)
(while (re-search-forward "
[?=\"\200-\377]
" nil t)
(replace-match (upcase (format "
=%02x
" (preceding-char)))
t t))
(when wrapper
(goto-char beg)
(insert "
=?ISO-8859-1?Q?
")
(goto-char end)
(insert "
?=
"))))))
(defun mail-unquote-printable-hexdigit (char)
(setq char (upcase char))
(if (>= char ?A)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment