emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99789: Fix for Bug#5984.


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99789: Fix for Bug#5984.
Date: Fri, 30 Apr 2010 12:00:48 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99789
author: Andreas Schwab  <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Fri 2010-04-30 12:00:48 -0400
message:
  Fix for Bug#5984.
  
  * composite.c (autocmp_chars): Save point as marker before calling
  auto-composition-function.
  
  * lisp.h (restore_point_unwind): Add prototype.
  
  * fileio.c (restore_point_unwind): Remove static attribute.
modified:
  src/ChangeLog
  src/composite.c
  src/fileio.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-04-23 12:29:11 +0000
+++ b/src/ChangeLog     2010-04-30 16:00:48 +0000
@@ -1,3 +1,12 @@
+2010-04-30  Andreas Schwab  <address@hidden>
+
+       * composite.c (autocmp_chars): Save point as marker before calling
+       auto-composition-function (Bug#5984).
+
+       * lisp.h (restore_point_unwind): Add prototype.
+
+       * fileio.c (restore_point_unwind): Remove static attribute.
+
 2010-04-23  Kenichi Handa  <address@hidden>
 
        * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the

=== modified file 'src/composite.c'
--- a/src/composite.c   2010-01-14 03:54:04 +0000
+++ b/src/composite.c   2010-04-30 16:00:48 +0000
@@ -990,6 +990,14 @@
            {
              Lisp_Object args[6];
 
+             /* Save point as marker before calling out to lisp.  */
+             if (NILP (string))
+               {
+                 Lisp_Object m = Fmake_marker ();
+                 set_marker_both (m, Qnil, pt, pt_byte);
+                 record_unwind_protect (restore_point_unwind, m);
+               }
+
              args[0] = Vauto_composition_function;
              args[1] = AREF (elt, 2);
              args[2] = pos;
@@ -998,8 +1006,10 @@
              args[5] = string;
              gstring = safe_call (6, args);
            }
-         if (NILP (string))
-           TEMP_SET_PT_BOTH (pt, pt_byte);
+         else if (NILP (string))
+           {
+             TEMP_SET_PT_BOTH (pt, pt_byte);
+           }
          return unbind_to (count, gstring);
        }
     }

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2010-02-18 09:02:04 +0000
+++ b/src/fileio.c      2010-04-30 16:00:48 +0000
@@ -302,7 +302,7 @@
 
 /* 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'
--- a/src/lisp.h        2010-03-05 23:08:18 +0000
+++ b/src/lisp.h        2010-04-30 16:00:48 +0000
@@ -3018,6 +3018,7 @@
 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));


reply via email to

[Prev in Thread] Current Thread [Next in Thread]