aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-04-24 17:56:54 +0000
committerStefan Monnier2008-04-24 17:56:54 +0000
commit2136a8a7aa9f89f9d031552bf6d1fe2abd173dbc (patch)
tree7a9fd6cd811eaf3f034a98b1c139dfe73d94cd5e
parentf753f75d3107fc76a0bd0340923bd136bbf96bca (diff)
downloademacs-2136a8a7aa9f89f9d031552bf6d1fe2abd173dbc.tar.gz
emacs-2136a8a7aa9f89f9d031552bf6d1fe2abd173dbc.zip
(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.
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/sieve-manage.el11
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 070ef6e886c..a89db8569a5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,10 @@
12008-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * sieve-manage.el (sieve-string-bytes): Remove.
4 (sieve-manage-putscript): Use length instead: `string-bytes' gives the
5 correct byte-length only if the process's coding-system is the same as
6 the one used internally by Emacs to represent strings.
7
12008-04-22 Juri Linkov <juri@jurta.org> 82008-04-22 Juri Linkov <juri@jurta.org>
2 9
3 * mailcap.el (mailcap-file-default-commands): New function. 10 * mailcap.el (mailcap-file-default-commands): New function.
@@ -24,7 +31,7 @@
242008-04-09 Teodor Zlatanov <tzz@lifelogs.com> 312008-04-09 Teodor Zlatanov <tzz@lifelogs.com>
25 32
26 * auth-source.el: Added docs. 33 * auth-source.el: Added docs.
27 (auth-sources): Modified format to support server. 34 (auth-sources): Modify format to support server.
28 (auth-source-pick, auth-source-user-or-password) 35 (auth-source-pick, auth-source-user-or-password)
29 (auth-source-user-or-password-imap) 36 (auth-source-user-or-password-imap)
30 (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) 37 (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el
index c39a6bb3356..d32888479cf 100644
--- a/lisp/gnus/sieve-manage.el
+++ b/lisp/gnus/sieve-manage.el
@@ -570,15 +570,14 @@ password is remembered in the buffer."
570 (sieve-manage-send (format "HAVESPACE \"%s\" %s" name size)) 570 (sieve-manage-send (format "HAVESPACE \"%s\" %s" name size))
571 (sieve-manage-parse-okno))) 571 (sieve-manage-parse-okno)))
572 572
573(eval-and-compile
574 (if (fboundp 'string-bytes)
575 (defalias 'sieve-string-bytes 'string-bytes)
576 (defalias 'sieve-string-bytes 'length)))
577
578(defun sieve-manage-putscript (name content &optional buffer) 573(defun sieve-manage-putscript (name content &optional buffer)
579 (with-current-buffer (or buffer (current-buffer)) 574 (with-current-buffer (or buffer (current-buffer))
580 (sieve-manage-send (format "PUTSCRIPT \"%s\" {%d+}%s%s" name 575 (sieve-manage-send (format "PUTSCRIPT \"%s\" {%d+}%s%s" name
581 (sieve-string-bytes content) 576 ;; Here we assume that the coding-system will
577 ;; replace each char with a single byte.
578 ;; This is always the case if `content' is
579 ;; a unibyte string.
580 (length content)
582 sieve-manage-client-eol content)) 581 sieve-manage-client-eol content))
583 (sieve-manage-parse-okno))) 582 (sieve-manage-parse-okno)))
584 583