]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Sun, 15 Oct 2006 02:54:13 +0000 (02:54 +0000)
committerMiles Bader <miles@gnu.org>
Sun, 15 Oct 2006 02:54:13 +0000 (02:54 +0000)
Patches applied:

 * emacs--devo--0  (patch 460-475)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 145-152)

   - Merge from emacs--devo--0
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118

30 files changed:
1  2 
etc/NEWS
leim/Makefile.in
lib-src/makefile.w32-in
lisp/ChangeLog
lisp/dnd.el
lisp/gnus/mm-util.el
lisp/international/mule-cmds.el
lisp/isearch.el
lisp/mail/rmail.el
lisp/progmodes/sh-script.el
lisp/simple.el
lisp/subr.el
lisp/wid-edit.el
src/ChangeLog
src/dispextern.h
src/dispnew.c
src/frame.c
src/keyboard.c
src/keymap.c
src/lisp.h
src/macterm.c
src/minibuf.c
src/process.c
src/regex.c
src/regex.h
src/search.c
src/w32fns.c
src/xdisp.c
src/xmenu.c
src/xterm.c

diff --cc etc/NEWS
Simple merge
Simple merge
Simple merge
diff --cc lisp/ChangeLog
Simple merge
diff --cc lisp/dnd.el
Simple merge
Simple merge
Simple merge
diff --cc lisp/isearch.el
Simple merge
Simple merge
Simple merge
diff --cc lisp/simple.el
Simple merge
diff --cc lisp/subr.el
Simple merge
Simple merge
diff --cc src/ChangeLog
Simple merge
Simple merge
diff --cc src/dispnew.c
Simple merge
diff --cc src/frame.c
index c57618696eb14b8cfaae0565b51d85b825e7b629,0b835ffd3b9b6fb198bc56096f617d423c9b6950..f431dc4946df9f7f24c943cb630c1f09d27468d1
@@@ -112,10 -108,8 +112,11 @@@ Lisp_Object Qbuffer_predicate, Qbuffer_
  Lisp_Object Qtty_color_mode;
  
  Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
 +#ifdef USE_FONT_BACKEND
 +Lisp_Object Qfont_backend;
 +#endif        /* USE_FONT_BACKEND */
  
+ Lisp_Object Qinhibit_face_set_after_frame_default;
  Lisp_Object Qface_set_after_frame_default;
  
  
diff --cc src/keyboard.c
Simple merge
diff --cc src/keymap.c
Simple merge
diff --cc src/lisp.h
Simple merge
diff --cc src/macterm.c
Simple merge
diff --cc src/minibuf.c
Simple merge
diff --cc src/process.c
Simple merge
diff --cc src/regex.c
index 0977684822082e0949d0f752f1a7f66a1a858ab0,ae80ad0cee8b7e56be1624732ac8932f45a9e789..2eca58c23e88dd6394a14e7c50b430c7301f3411
@@@ -2987,33 -2932,25 +2988,41 @@@ regex_compile (pattern, size, syntax, b
                           don't need to handle them for multibyte.
                           They are distinguished by a negative wctype.  */
  
 -                      if (multibyte)
 -                        SET_RANGE_TABLE_WORK_AREA_BIT (range_table_work,
 -                                                       re_wctype_to_bit (cc));
 +                      for (ch = 0; ch < 128; ++ch)
 +                        if (re_iswctype (btowc (ch), cc))
 +                          {
 +                            c = TRANSLATE (ch);
 +                            SET_LIST_BIT (c);
 +                          }
  
 -                        for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
 +                      if (target_multibyte)
 +                        {
 +                          SET_RANGE_TABLE_WORK_AREA_BIT
 +                            (range_table_work, re_wctype_to_bit (cc));
 +                        }
 +                      else
                          {
 -                          int translated = TRANSLATE (ch);
 -                          if (re_iswctype (btowc (ch), cc))
 -                            SET_LIST_BIT (translated);
 +                          for (ch = 0; ch < (1 << BYTEWIDTH); ++ch)
 +                            {
 +                              c = ch;
 +                              MAKE_CHAR_MULTIBYTE (c);
 +                              if (re_iswctype (btowc (c), cc))
 +                                {
 +                                  c = TRANSLATE (c);
 +                                  MAKE_CHAR_UNIBYTE (c);
 +                                  SET_LIST_BIT (c);
 +                                }
 +                            }
                          }
  
+                       /* In most cases the matching rule for char classes
+                          only uses the syntax table for multibyte chars,
+                          so that the content of the syntax-table it is not
+                          hardcoded in the range_table.  SPACE and WORD are
+                          the two exceptions.  */
+                       if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD)))
+                         bufp->used_syntax = 1;
                        /* Repeat the loop. */
                        continue;
                      }
diff --cc src/regex.h
index efae7749f31f0fda386a0426de339477e76bdd1a,14817c35e90b211cc59aeab172baef162c812b6b..e065c597d4981bbd675fad582e9064c131631045
@@@ -392,16 -392,14 +392,20 @@@ struct re_pattern_buffe
          /* Similarly for an end-of-line anchor.  */
    unsigned not_eol : 1;
  
+   /* If true, the compilation of the pattern had to look up the syntax table,
+      so the compiled pattern is only valid for the current syntax table.  */
+   unsigned used_syntax : 1;
  #ifdef emacs
 -  /* If true, multi-byte form in the `buffer' should be recognized as a
 -     multibyte character. */
 +  /* If true, multi-byte form in the regexp pattern should be
 +     recognized as a multibyte character.  When the pattern is
 +     compiled, this is set to the same value as target_multibyte
 +     below.  */
    unsigned multibyte : 1;
 +
 +  /* If true, multi-byte form in the target of match should be
 +     recognized as a multibyte character.  */
 +  unsigned target_multibyte : 1;
  #endif
  
  /* [[[end pattern_buffer]]] */
diff --cc src/search.c
index 5f3f953595bf91d2bffac25017f80bc04fc19237,7c3151b76b8475df0bd7c161be0542c9e767f35a..7c1090aa2bf34607ef52faa07b7ed527f8c645be
@@@ -134,10 -138,39 +135,9 @@@ compile_pattern_1 (cp, pattern, transla
    cp->regexp = Qnil;
    cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
    cp->posix = posix;
 -  cp->buf.multibyte = multibyte;
 +  cp->buf.multibyte = STRING_MULTIBYTE (pattern);
 +  cp->buf.target_multibyte = multibyte;
    cp->whitespace_regexp = Vsearch_spaces_regexp;
-   cp->syntax_table = current_buffer->syntax_table;
    /* rms: I think BLOCK_INPUT is not needed here any more,
       because regex.c defines malloc to call xmalloc.
       Using BLOCK_INPUT here means the debugger won't run if an error occurs.
    re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL
                            : SDATA (Vsearch_spaces_regexp));
  
 -  val = (char *) re_compile_pattern ((char *)raw_pattern,
 -                                   raw_pattern_size, &cp->buf);
 +  val = (char *) re_compile_pattern ((char *) SDATA (pattern),
 +                                   SBYTES (pattern), &cp->buf);
  
+   /* If the compiled pattern hard codes some of the contents of the
+      syntax-table, it can only be reused with *this* syntax table.  */
+   cp->syntax_table = cp->buf.used_syntax ? current_buffer->syntax_table : Qt;
    re_set_whitespace_regexp (NULL);
  
    re_set_syntax (old);
@@@ -226,11 -269,9 +235,9 @@@ compile_pattern (pattern, regp, transla
          && !NILP (Fstring_equal (cp->regexp, pattern))
          && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
          && cp->posix == posix
 -        && cp->buf.multibyte == multibyte
 +        && cp->buf.target_multibyte == multibyte
-         /* TODO: Strictly speaking, we only need to match syntax
-            tables when a character class like [[:space:]] occurs in
-            the pattern. -- cyd*/
-         && EQ (cp->syntax_table, current_buffer->syntax_table)
+         && (EQ (cp->syntax_table, Qt)
+             || EQ (cp->syntax_table, current_buffer->syntax_table))
          && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)))
        break;
  
diff --cc src/w32fns.c
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xmenu.c
Simple merge
diff --cc src/xterm.c
Simple merge