From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#5984: Crash displaying composed characters Date: Tue, 20 Apr 2010 22:38:47 +0200 Message-ID: References: <831vea5fjh.fsf@gnu.org> <83vdbm3udi.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271797260 2067 80.91.229.12 (20 Apr 2010 21:01:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Apr 2010 21:01:00 +0000 (UTC) Cc: lekktu@gmail.com, 5984@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 20 23:00:52 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O4KYt-0007FF-KH for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Apr 2010 23:00:51 +0200 Original-Received: from localhost ([127.0.0.1]:54911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4KYt-0004oQ-6w for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Apr 2010 17:00:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4KXR-0004HS-HS for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 16:59:21 -0400 Original-Received: from [140.186.70.92] (port=51846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4KXP-0004Gh-AE for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 16:59:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4KXN-0002Xv-Gx for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 16:59:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38455) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4KXN-0002Xo-FS for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 16:59:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O4KDm-0002DF-0G; Tue, 20 Apr 2010 16:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Apr 2010 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5984-submit@debbugs.gnu.org id=B5984.12717959378499 (code B ref 5984); Tue, 20 Apr 2010 20:39:01 +0000 Original-Received: (at 5984) by debbugs.gnu.org; 20 Apr 2010 20:38:57 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4KDg-0002D1-Tc for submit@debbugs.gnu.org; Tue, 20 Apr 2010 16:38:57 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4KDd-0002Cv-ON for 5984@debbugs.gnu.org; Tue, 20 Apr 2010 16:38:55 -0400 Original-Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 5E4541C0030A; Tue, 20 Apr 2010 22:38:49 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 4AF289021B; Tue, 20 Apr 2010 22:38:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id nrRHzehkzRwn; Tue, 20 Apr 2010 22:38:48 +0200 (CEST) Original-Received: from igel.home (ppp-88-217-122-104.dynamic.mnet-online.de [88.217.122.104]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 20 Apr 2010 22:38:48 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 501) id 326B9CA297; Tue, 20 Apr 2010 22:38:48 +0200 (CEST) X-Yow: Someone is DROOLING on my collar!! In-Reply-To: <83vdbm3udi.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Apr 2010 20:29:29 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 20 Apr 2010 16:39:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36380 Archived-At: Please try this patch. Andreas. === modified file 'src/composite.c' --- src/composite.c 2010-01-14 03:54:04 +0000 +++ src/composite.c 2010-04-20 20:27:46 +0000 @@ -986,6 +986,14 @@ autocmp_chars (cft_element, charpos, byt font_object = win->frame; gstring = Fcomposition_get_gstring (pos, make_number (to), font_object, string); + /* Calling auto-composition-function may modify the current + buffer, save point as marker. */ + if (NILP (string)) + { + Lisp_Object m = Fmake_marker (); + set_marker_both (m, current_buffer, pt, pt_byte); + record_unwind_protect (restore_point_unwind, m); + } if (NILP (LGSTRING_ID (gstring))) { Lisp_Object args[6]; @@ -998,8 +1006,6 @@ autocmp_chars (cft_element, charpos, byt args[5] = string; gstring = safe_call (6, args); } - if (NILP (string)) - TEMP_SET_PT_BOTH (pt, pt_byte); return unbind_to (count, gstring); } } === modified file 'src/fileio.c' --- src/fileio.c 2010-02-18 09:02:04 +0000 +++ src/fileio.c 2010-04-20 20:27:46 +0000 @@ -302,7 +302,7 @@ close_file_unwind (fd) /* Restore point, having saved it as a marker. */ -static Lisp_Object +Lisp_Object restore_point_unwind (location) Lisp_Object location; { === modified file 'src/lisp.h' --- src/lisp.h 2010-03-05 23:08:18 +0000 +++ src/lisp.h 2010-04-20 20:27:46 +0000 @@ -3018,6 +3018,7 @@ EXFUN (Ffile_readable_p, 1); EXFUN (Ffile_executable_p, 1); EXFUN (Fread_file_name, 6); extern Lisp_Object close_file_unwind P_ ((Lisp_Object)); +extern Lisp_Object restore_point_unwind P_ ((Lisp_Object)); extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN; extern int internal_delete_file P_ ((Lisp_Object)); extern void syms_of_fileio P_ ((void)); -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."