mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-17 03:10:58 -08:00
(sieve-string-bytes): Remove.
(sieve-manage-putscript): Use length instead: `string-bytes' gives the correct byte-length only if the process's coding-system is the same as the one used internally by Emacs to represent strings.
This commit is contained in:
parent
f753f75d31
commit
2136a8a7aa
2 changed files with 13 additions and 7 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2008-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* sieve-manage.el (sieve-string-bytes): Remove.
|
||||||
|
(sieve-manage-putscript): Use length instead: `string-bytes' gives the
|
||||||
|
correct byte-length only if the process's coding-system is the same as
|
||||||
|
the one used internally by Emacs to represent strings.
|
||||||
|
|
||||||
2008-04-22 Juri Linkov <juri@jurta.org>
|
2008-04-22 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
* mailcap.el (mailcap-file-default-commands): New function.
|
* mailcap.el (mailcap-file-default-commands): New function.
|
||||||
|
|
@ -24,7 +31,7 @@
|
||||||
2008-04-09 Teodor Zlatanov <tzz@lifelogs.com>
|
2008-04-09 Teodor Zlatanov <tzz@lifelogs.com>
|
||||||
|
|
||||||
* auth-source.el: Added docs.
|
* auth-source.el: Added docs.
|
||||||
(auth-sources): Modified format to support server.
|
(auth-sources): Modify format to support server.
|
||||||
(auth-source-pick, auth-source-user-or-password)
|
(auth-source-pick, auth-source-user-or-password)
|
||||||
(auth-source-user-or-password-imap)
|
(auth-source-user-or-password-imap)
|
||||||
(auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
|
(auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
|
||||||
|
|
|
||||||
|
|
@ -570,15 +570,14 @@ password is remembered in the buffer."
|
||||||
(sieve-manage-send (format "HAVESPACE \"%s\" %s" name size))
|
(sieve-manage-send (format "HAVESPACE \"%s\" %s" name size))
|
||||||
(sieve-manage-parse-okno)))
|
(sieve-manage-parse-okno)))
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
(if (fboundp 'string-bytes)
|
|
||||||
(defalias 'sieve-string-bytes 'string-bytes)
|
|
||||||
(defalias 'sieve-string-bytes 'length)))
|
|
||||||
|
|
||||||
(defun sieve-manage-putscript (name content &optional buffer)
|
(defun sieve-manage-putscript (name content &optional buffer)
|
||||||
(with-current-buffer (or buffer (current-buffer))
|
(with-current-buffer (or buffer (current-buffer))
|
||||||
(sieve-manage-send (format "PUTSCRIPT \"%s\" {%d+}%s%s" name
|
(sieve-manage-send (format "PUTSCRIPT \"%s\" {%d+}%s%s" name
|
||||||
(sieve-string-bytes content)
|
;; Here we assume that the coding-system will
|
||||||
|
;; replace each char with a single byte.
|
||||||
|
;; This is always the case if `content' is
|
||||||
|
;; a unibyte string.
|
||||||
|
(length content)
|
||||||
sieve-manage-client-eol content))
|
sieve-manage-client-eol content))
|
||||||
(sieve-manage-parse-okno)))
|
(sieve-manage-parse-okno)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue