From: Eli Zaretskii <eliz@gnu.org>
Cc: handa@m17n.org
Subject: safe_call1 considered harmful
Date: Fri, 21 Jul 2006 12:36:48 +0300 [thread overview]
Message-ID: <uirlrguz3.fsf@gnu.org> (raw)
The change below was presumably made to avoid errors in functions that
are put on the various *-coding-system-alist variables. Those errors
might have been caused by the recent changes in several modes that now
use a cons cell `(FILENAME . BUFFER)' instead of just the file name as
the argument to find-operation-coding-system (when the operation is
insert-file-contents), because some packages put functions on the
file-coding-system-alist that are not ready for the cons cell.
I think the change in coding.c is for the worse: it masks such
problems from us, so instead of seeing bug reports, we sweep the
problems under the carpet, where they run risk to be left undetected
until after the release.
A case in point is the function find-buffer-file-type-coding-system
that dos-w32.el adds to file-coding-system-alist: it was not modified
to support the change in the find-operation-coding-system's interface,
and caused files with DOS EOLs uncompressed from archives to be shown
with the ^M characters. This happened because
find-buffer-file-type-coding-system throws an error, but safe_call1
silently ignores it.
So how about if we undo the change below?
2006-05-29 Kenichi Handa <handa@m17n.org>
* coding.c (Ffind_operation_coding_system): Call a function by
safe_call1 instead of call1.
Index: src/coding.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/coding.c,v
retrieving revision 1.338
retrieving revision 1.339
diff -u -r1.338 -r1.339
--- src/coding.c 26 May 2006 04:48:21 -0000 1.338
+++ src/coding.c 29 May 2006 00:54:27 -0000 1.339
@@ -7539,7 +7539,7 @@
return Fcons (val, val);
if (! NILP (Ffboundp (val)))
{
- val = call1 (val, Flist (nargs, args));
+ val = safe_call1 (val, Flist (nargs, args));
if (CONSP (val))
return val;
if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val)))
next reply other threads:[~2006-07-21 9:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-21 9:36 Eli Zaretskii [this message]
2006-07-21 11:34 ` safe_call1 considered harmful Kenichi Handa
2006-07-21 15:49 ` Eli Zaretskii
2006-07-24 1:36 ` Kenichi Handa
2006-07-29 11:00 ` Eli Zaretskii
2006-07-31 3:04 ` Kenichi Handa
2006-07-21 19:37 ` Richard Stallman
2006-07-24 1:44 ` Kenichi Handa
2006-07-24 18:22 ` Richard Stallman
2006-07-30 9:18 ` Kenichi Handa
2006-07-31 4:38 ` Richard Stallman
2006-07-31 5:14 ` Kenichi Handa
2006-07-31 22:16 ` Richard Stallman
2006-08-01 0:50 ` Kenichi Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uirlrguz3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=handa@m17n.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.