all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8738: 23.3.50; encode-coding-string does not set last-coding-system-used
@ 2011-05-27  9:50 Kazuhiro Ito
  2011-07-01 11:04 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Kazuhiro Ito @ 2011-05-27  9:50 UTC (permalink / raw)
  To: 8738

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

When I start emacs (emacs-23 branch and trunk) with -Q and evaluate
below code, I receive unexpected result.

(list
 (progn
   (decode-coding-string "" 'iso-8859-1)
   last-coding-system-used)
 (progn
   (encode-coding-string "" 'no-conversion)
   last-coding-system-used))

It returns

(iso-8859-1 iso-8859-1)

But I expect below result

(iso-8859-1 no-conversion)

Please see the attached patch.
-- 
Kazuhiro Ito

[-- Attachment #2: coding.c.diff --]
[-- Type: application/octet-stream, Size: 340 bytes --]

=== modified file 'src/coding.c'
--- src/coding.c	2011-05-09 09:59:23 +0000
+++ src/coding.c	2011-05-27 09:36:05 +0000
@@ -9263,7 +9263,7 @@
      Lisp_Object string, coding_system, nocopy, buffer;
 {
   return code_convert_string (string, coding_system, buffer,
-			      1, ! NILP (nocopy), 1);
+			      1, ! NILP (nocopy), 0);
 }
 
 \f


^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#8738: 23.3.50; encode-coding-string does not set last-coding-system-used
  2011-05-27  9:50 bug#8738: 23.3.50; encode-coding-string does not set last-coding-system-used Kazuhiro Ito
@ 2011-07-01 11:04 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-01 11:04 UTC (permalink / raw)
  To: Kazuhiro Ito; +Cc: 8738-close

Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:

> It returns
>
> (iso-8859-1 iso-8859-1)
>
> But I expect below result
>
> (iso-8859-1 no-conversion)

Thanks; I've applied your patch to Emacs 24.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-01 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27  9:50 bug#8738: 23.3.50; encode-coding-string does not set last-coding-system-used Kazuhiro Ito
2011-07-01 11:04 ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.