From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Can we run Lisp function in encode_terminal_code of term.c? Date: Mon, 29 Nov 2004 01:12:31 -0500 Message-ID: References: <200411261215.VAA22895@etlken.m17n.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1101709033 6031 80.91.229.6 (29 Nov 2004 06:17:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Nov 2004 06:17:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 29 07:17:08 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CYeqS-0007he-00 for ; Mon, 29 Nov 2004 07:17:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYezq-00069c-3B for ged-emacs-devel@m.gmane.org; Mon, 29 Nov 2004 01:26:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYexw-0004yB-Fm for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:24:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYexu-0004wY-KK for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:24:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYexu-0004wA-F7 for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:24:50 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYeoQ-0000II-1t for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:15:02 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CYelz-0002T8-FZ; Mon, 29 Nov 2004 01:12:31 -0500 Original-To: Kenichi Handa In-reply-to: <200411261215.VAA22895@etlken.m17n.org> (message from Kenichi Handa on Fri, 26 Nov 2004 21:15:14 +0900 (JST)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30477 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30477 This is because encode_terminal_code (that is called from write_glyphs) doesn't run pre-write-conversion of utf-8. I don't remember why I didn't do that. There's a possibility that running Lisp here is not safe. As write_glyphs is called from various places in dispnew.c, I can't tell easily whether it is safe or not. In general, running Lisp code from redisplay is safe nowadays. I looked at the callers of write_glyphs, and it seems to be safe to run Lisp code there. I am not quite certain it is ok to get an error from there, but it looks safe. Anyway, if you make sure this particular Lisp code will never get an error unless Emacs is badly screwed, then we don't have to worry about the issue of what happens if it gets an error.