# HG changeset patch # User Aidan Kehoe # Date 1234943614 0 # Node ID 8cbca852bcd4a64915155e8ee26c5616dd34d623 # Parent 127dbf03e1af1acd6796b7e66bc35b6628d91886 #'check-coding-systems-region: return nil on success, not t. lisp/ChangeLog addition: 2009-02-18 Aidan Kehoe * coding.el (check-coding-systems-region): Return null on success, not t. See http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1723 tests/ChangeLog addition: 2009-02-18 Aidan Kehoe * automated/query-coding-tests.el : Check that #'check-coding-systems-region returns null on success here, not t. diff -r 127dbf03e1af -r 8cbca852bcd4 lisp/ChangeLog --- a/lisp/ChangeLog Tue Feb 17 13:42:36 2009 +0000 +++ b/lisp/ChangeLog Wed Feb 18 07:53:34 2009 +0000 @@ -1,3 +1,9 @@ +2009-02-18 Aidan Kehoe + + * coding.el (check-coding-systems-region): + Return null on success, not t. See + http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1723 + 2009-02-17 Aidan Kehoe * mule/mule-cmds.el (finish-set-language-environment): diff -r 127dbf03e1af -r 8cbca852bcd4 lisp/coding.el --- a/lisp/coding.el Tue Feb 17 13:42:36 2009 +0000 +++ b/lisp/coding.el Wed Feb 18 07:53:34 2009 +0000 @@ -589,8 +589,7 @@ encode. If all coding systems in CODING-SYSTEM-LIST can encode the region, -this function returns t. This conflicts with the documented, but not -with the observed, GNU behavior. +this function returns nil. If BEGIN is a string, `check-coding-systems-region' ignores END, and checks whether the coding systems can encode BEGIN. The alist that is returned @@ -619,7 +618,7 @@ (setq intermediate (list (coding-system-name coding-system))) (map-range-table range-lambda ranges) (push (nreverse intermediate) result))) - finally return (or result t))))) + finally return result)))) (if (stringp begin) (with-temp-buffer (insert begin) diff -r 127dbf03e1af -r 8cbca852bcd4 tests/ChangeLog --- a/tests/ChangeLog Tue Feb 17 13:42:36 2009 +0000 +++ b/tests/ChangeLog Wed Feb 18 07:53:34 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-18 Aidan Kehoe + + * automated/query-coding-tests.el : Check that + #'check-coding-systems-region returns null on success here, not t. + 2009-02-17 Aidan Kehoe * automated/mule-tests.el (featurep): diff -r 127dbf03e1af -r 8cbca852bcd4 tests/automated/query-coding-tests.el --- a/tests/automated/query-coding-tests.el Tue Feb 17 13:42:36 2009 +0000 +++ b/tests/automated/query-coding-tests.el Wed Feb 18 07:53:34 2009 +0000 @@ -413,9 +413,9 @@ "check #'unencodable-char-position stops at 7 if 2000 asked for") ;; Now, #'check-coding-systems-region. ;; UTF-8 should certainly be able to encode these characters: - (Assert (eq t (check-coding-systems-region (point-min) (point-max) + (Assert (null (check-coding-systems-region (point-min) (point-max) '(utf-8))) - "check #'check-coding-systems-region gives t if encoding works") + "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal '((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136