# HG changeset patch # User Karoly Lorentey # Date 1085266363 0 # Node ID 14e5707213a6197c2fea1a5549fc3018914f5c99 # Parent b545019c77b07f466ead6a9cddbccce810d19632# Parent 269004c18108cc808caeb871df6b349c153151f2 Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-325 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-326 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328 Update from CVS: src/.gdbinit (xsymbol): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-166 diff -r b545019c77b0 -r 14e5707213a6 lisp/ChangeLog --- a/lisp/ChangeLog Tue May 18 20:30:43 2004 +0000 +++ b/lisp/ChangeLog Sat May 22 22:52:43 2004 +0000 @@ -1,18 +1,61 @@ +2004-05-19 Stefan Monnier + + * simple.el (do-auto-fill): Remove unused vars `bol' and `opoint'. + (completion-setup-function): Use with-current-buffer. + Properly save excursion. Simplify. + Don't assume there is necessarily a `mouse-face' property somewhere. + + * progmodes/gud.el (gud-reset): Use unless & with-current-buffer. + + * progmodes/gdb-ui.el (gdb-reset): Use unless. Fix regexp. + + * emacs-lisp/bytecomp.el (byte-compile-log): Use backquotes. + (byte-compile-log-1): Don't call (byte-goto-log-buffer). + Use with-current-buffer. + (byte-goto-log-buffer): Delete. + (byte-compile-log-file): Call compilation-forget-errors. + +2004-05-19 Takaaki Ota (tiny change) + + * net/ldap.el (ldap-search-internal): Avoid mixing standard error + output messages into the search result. + +2004-05-19 Masatake YAMATO + + * wid-edit.el (widget-radio-button-notify): Revert my last + change. Reported by Katsumi Yamaoka . + +2004-05-19 Kenichi Handa + + * international/characters.el: Fix syntax (open/close) of CJK chars. + +2004-05-18 Karl Chen (tiny change) + + * help-mode.el (help-go-back): Don't depend on position of back button. + +2004-05-18 Stefan Monnier + + * files.el (auto-save-file-name-transforms): Make sure ange-ftp temp + files files don't contain an accidental additional /. + + * textmodes/tex-mode.el (tex-compilation-parse-errors): Save excursion + in source buffer. + 2004-05-18 Masatake YAMATO * wid-edit.el (widget-radio-button-notify): Don't pass `widget' - to widget-apply. :action method assumes 2 arguments, not 3. + to widget-apply. :action method assumes 2 arguments, not 3. 2004-05-17 Glenn Morris - * progmodes/f90.el (f90-end-block-re, f90-start-block-re): New - constants. + * progmodes/f90.el (f90-end-block-re, f90-start-block-re): + New constants. (hs-special-modes-alist): Add an f90-mode entry. 2004-05-17 Sam Steingold - * emacs-lisp/cl-indent.el (common-lisp-indent-function-1): Indent - "without-" forms just like "with-" and "do-". Use regexp-opt. + * emacs-lisp/cl-indent.el (common-lisp-indent-function-1): + Indent "without-" forms just like "with-" and "do-". Use regexp-opt. 2004-05-16 Kim F. Storm @@ -20,15 +63,14 @@ 2004-05-15 John Wiegley - * eshell/esh-io.el (eshell-get-target): whitespace changes. + * eshell/esh-io.el (eshell-get-target): Whitespace changes. (eshell-output-object-to-target): Improve output speed 20% by not - calling `eshell-stringify' if something is already known to be a - string. + calling `eshell-stringify' if something is already known to be a string. 2004-05-15 Alex Ott - * textmodes/ispell.el (ispell-local-dictionary-alist): Add - windows-1251 to the choice of coding systems. + * textmodes/ispell.el (ispell-local-dictionary-alist): + Add windows-1251 to the choice of coding systems. (ispell-dictionary-alist-6): Add support for "russianw.aff", encoded in cp1251. @@ -75,7 +117,7 @@ 2004-05-13 Marcelo Toledo - * language/european.el ("Brazilian Portuguese"): Added support for + * language/european.el ("Brazilian Portuguese"): Add support for Brazilian Portuguese. 2004-05-13 John Wiegley @@ -84,8 +126,7 @@ `recentf-mode' if this variable has been customized to t. * eshell/esh-test.el (eshell-test): Call the function - `emacs-version' rather than trying to build a custom version - string. + `emacs-version' rather than trying to build a custom version string. 2004-05-13 Stefan Monnier @@ -775,18 +816,17 @@ * progmodes/fortran.el (fortran-fill): Use local var `bol' rather than duplicate call to `line-beginning-position'. - * progmodes/f90.el (f90-get-present-comment-type): Return - whitespace, as well as comment chars, for consistent filling + * progmodes/f90.el (f90-get-present-comment-type): + Return whitespace, as well as comment chars, for consistent filling of comment blocks. Use `match-string-no-properties'. - (f90-break-line): Do not leave trailing whitespace when filling - comments. + (f90-break-line): Trim trailing whitespace when filling comments. 2004-04-30 Dave Love * calendar/diary-lib.el (diary-outlook-formats): New variable. (diary-from-outlook-internal, diary-from-outlook) - (diary-from-outlook-gnus, diary-from-outlook-rmail): New - functions to import diary entries from Outlook-format + (diary-from-outlook-gnus, diary-from-outlook-rmail): + New functions to import diary entries from Outlook-format appointments in mail messages. 2004-04-29 Stefan Monnier @@ -814,8 +854,7 @@ * progmodes/sql.el (sql-product-alist): Rename variable `sql-product-support'. Add Postgres login parameters. - (sql-set-product, sql-product-feature): Update with renamed - variable. + (sql-set-product, sql-product-feature): Update with renamed variable. (sql-connect-postgres): Add username prompt. (sql-imenu-generic-expression, sql-mode-font-lock-object-name): Make patterns less product specific. @@ -837,8 +876,7 @@ (sql-mode-sqlite-font-lock-keywords) (sql-mode-db2-font-lock-keywords): Default to nil. (sql-product-font-lock): Always highlight ANSI keywords. - (sql-add-product-keywords): Made similar to - `font-lock-add-keywords'. + (sql-add-product-keywords): Made similar to `font-lock-add-keywords'. (sql-send-string): Add function. 2004-04-29 Dave Love @@ -7391,7 +7429,7 @@ ;; coding: iso-2022-7bit ;; End: - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 02, 04 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. diff -r b545019c77b0 -r 14e5707213a6 lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Tue May 18 20:30:43 2004 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Sat May 22 22:52:43 2004 +0000 @@ -832,24 +832,22 @@ ;; Log something that isn't a warning. (defmacro byte-compile-log (format-string &rest args) - (list 'and - 'byte-optimize - '(memq byte-optimize-log '(t source)) - (list 'let '((print-escape-newlines t) - (print-level 4) - (print-length 4)) - (list 'byte-compile-log-1 - (cons 'format - (cons format-string - (mapcar - (lambda (x) - (if (symbolp x) (list 'prin1-to-string x) x)) - args))))))) + `(and + byte-optimize + (memq byte-optimize-log '(t source)) + (let ((print-escape-newlines t) + (print-level 4) + (print-length 4)) + (byte-compile-log-1 + (format + ,format-string + ,@(mapcar + (lambda (x) (if (symbolp x) (list 'prin1-to-string x) x)) + args)))))) ;; Log something that isn't a warning. (defun byte-compile-log-1 (string) - (save-excursion - (byte-goto-log-buffer) + (with-current-buffer "*Compile-Log*" (goto-char (point-max)) (byte-compile-warning-prefix nil nil) (cond (noninteractive @@ -903,11 +901,6 @@ (defvar byte-compile-last-warned-form nil) (defvar byte-compile-last-logged-file nil) -(defun byte-goto-log-buffer () - (set-buffer (get-buffer-create "*Compile-Log*")) - (unless (eq major-mode 'compilation-mode) - (compilation-mode))) - ;; This is used as warning-prefix for the compiler. ;; It is always called with the warnings buffer current. (defun byte-compile-warning-prefix (level entry) @@ -983,6 +976,7 @@ ;; Do this after setting default-directory. (unless (eq major-mode 'compilation-mode) (compilation-mode)) + (compilation-forget-errors) pt)))) ;; Log a message STRING in *Compile-Log*. diff -r b545019c77b0 -r 14e5707213a6 lisp/files.el --- a/lisp/files.el Tue May 18 20:30:43 2004 +0000 +++ b/lisp/files.el Sat May 22 22:52:43 2004 +0000 @@ -293,7 +293,7 @@ :group 'auto-save) (defcustom auto-save-file-name-transforms - `(("\\`/[^/]*:\\(.+/\\)*\\(.*\\)" + `(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'" ;; Don't put "\\2" inside expand-file-name, since it will be ;; transformed to "/2" on DOS/Windows. ,(concat temporary-file-directory "\\2") t)) diff -r b545019c77b0 -r 14e5707213a6 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Tue May 18 20:30:43 2004 +0000 +++ b/lisp/gnus/ChangeLog Sat May 22 22:52:43 2004 +0000 @@ -1,5 +1,7 @@ 2004-05-18 Stefan Monnier + * mm-view.el (mm-insert-inline): Make it work in read-only buffer. + * gnus-win.el (gnus-all-windows-visible-p): Don't consider non-visible windows. diff -r b545019c77b0 -r 14e5707213a6 lisp/gnus/mm-view.el --- a/lisp/gnus/mm-view.el Tue May 18 20:30:43 2004 +0000 +++ b/lisp/gnus/mm-view.el Sat May 22 22:52:43 2004 +0000 @@ -1,5 +1,5 @@ ;;; mm-view.el --- functions for viewing MIME objects -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 01, 2004 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -197,7 +197,8 @@ (defun mm-insert-inline (handle text) "Insert TEXT inline from HANDLE." - (let ((b (point))) + (let ((b (point)) + (inhibit-read-only t)) (insert text) (mm-handle-set-undisplayer handle diff -r b545019c77b0 -r 14e5707213a6 lisp/help-mode.el --- a/lisp/help-mode.el Tue May 18 20:30:43 2004 +0000 +++ b/lisp/help-mode.el Sat May 22 22:52:43 2004 +0000 @@ -577,12 +577,11 @@ (goto-char position))))) (defun help-go-back () - "Invoke the [back] button (if any) in the Help mode buffer." + "Go back to previous topic in this help buffer." (interactive) - (let ((back-button (button-at (1- (point-max))))) - (if back-button - (button-activate back-button) - (error "No [back] button")))) + (if help-xref-stack + (help-xref-go-back (current-buffer)) + (error "No previous help buffer."))) (defun help-do-xref (pos function args) "Call the help cross-reference function FUNCTION with args ARGS. diff -r b545019c77b0 -r 14e5707213a6 lisp/international/characters.el --- a/lisp/international/characters.el Tue May 18 20:30:43 2004 +0000 +++ b/lisp/international/characters.el Sat May 22 22:52:43 2004 +0000 @@ -229,6 +229,14 @@ (modify-category-entry generic-char ?|) (setq cns-list (cdr cns-list)))) +(let ((parens "$(G!>!?!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!Y!Z![!\!]!^!_!`!a!b!c(B") + open close) + (dotimes (i (/ (length parens) 2)) + (setq open (aref parens (* i 2)) + close (aref parens (1+ (* i 2)))) + (modify-syntax-entry open (format "(%c" close)) + (modify-syntax-entry close (format ")%c" open)))) + ;; Cyrillic character set (ISO-8859-5) (modify-category-entry (make-char 'cyrillic-iso8859-5) ?y) @@ -584,16 +592,13 @@ (while chars (modify-syntax-entry (car chars) "w") (setq chars (cdr chars)))) -(modify-syntax-entry ?\$B!J(B "($B!K(B") -(modify-syntax-entry ?\$B!N(B "($B!O(B") -(modify-syntax-entry ?\$B!P(B "($B!Q(B") -(modify-syntax-entry ?\$B!V(B "($B!W(B") -(modify-syntax-entry ?\$B!X(B "($B!Y(B") -(modify-syntax-entry ?\$B!K(B ")$B!J(B") -(modify-syntax-entry ?\$B!O(B ")$B!N(B") -(modify-syntax-entry ?\$B!Q(B ")$B!P(B") -(modify-syntax-entry ?\$B!W(B ")$B!V(B") -(modify-syntax-entry ?\$B!Y(B ")$B!X(B") +(let ((parens "$B!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!Y!Z![(B" ) + open close) + (dotimes (i (/ (length parens) 2)) + (setq open (aref parens (* i 2)) + close (aref parens (1+ (* i 2)))) + (modify-syntax-entry open (format "(%c" close)) + (modify-syntax-entry close (format ")%c" open)))) (modify-category-entry (make-char 'japanese-jisx0208 35) ?A) (modify-category-entry (make-char 'japanese-jisx0208 36) ?H) @@ -652,6 +657,14 @@ (modify-category-entry (make-char 'korean-ksc5601 43) ?K) (modify-category-entry (make-char 'korean-ksc5601 44) ?Y) +(let ((parens "$(C!2!3!4!5!6!7!8!9!:!;! + + * modes.texi (Search-based Fontification): Fix typo. + 2004-05-10 Juanma Barranquero * modes.texi (Mode Line Variables): Fix description of diff -r b545019c77b0 -r 14e5707213a6 lispref/modes.texi --- a/lispref/modes.texi Tue May 18 20:30:43 2004 +0000 +++ b/lispref/modes.texi Sat May 22 22:52:43 2004 +0000 @@ -2001,7 +2001,7 @@ it finds using @code{font-lock-keyword-face}. When @var{function} is called, it receives one argument, the limit of -the search; it should searching at point, and not search beyond the +the search; it should begin searching at point, and not search beyond the limit. It should return non-@code{nil} if it succeeds, and set the match data to describe the match that was found. Returning @code{nil} indicates failure of the search. diff -r b545019c77b0 -r 14e5707213a6 man/search.texi --- a/man/search.texi Tue May 18 20:30:43 2004 +0000 +++ b/man/search.texi Sat May 22 22:52:43 2004 +0000 @@ -724,6 +724,18 @@ @item \W matches any character that is not a word-constituent. +@item \_< +matches the empty string, but only at the beginning of a symbol. A +symbol is a sequence of one or more word or symbol constituent +characters. @samp{\_<} matches at the beginning of the buffer only if +a symbol-constituent character follows. + +@item \_> +matches the empty string, but only at the end of a symbol. A symbol +is a sequence of one or more word or symbol constituent characters. +@samp{\_>} matches at the end of the buffer only if the contents end +with a symbol-constituent character. + @item \s@var{c} matches any character whose syntax is @var{c}. Here @var{c} is a character that designates a particular syntax class: thus, @samp{w} diff -r b545019c77b0 -r 14e5707213a6 src/.gdbinit --- a/src/.gdbinit Tue May 18 20:30:43 2004 +0000 +++ b/src/.gdbinit Sat May 22 22:52:43 2004 +0000 @@ -186,9 +186,10 @@ end define xsymbol - xgetptr $ + set $sym = $ + xgetptr $sym print (struct Lisp_Symbol *) $ptr - xprintsym $ + xprintsym $sym echo \n end document xsymbol @@ -199,7 +200,7 @@ define xstring xgetptr $ print (struct Lisp_String *) $ptr - output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size & ~gdb_array_mark_flag : $->size_byte) + xprintstr $ echo \n end document xstring @@ -372,12 +373,17 @@ Print $ as a scrollbar pointer. end +define xprintstr + set $data = $arg0->data + output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) +end + define xprintsym xgetptr $arg0 set $sym = (struct Lisp_Symbol *) $ptr xgetptr $sym->xname set $sym_name = (struct Lisp_String *) $ptr - output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size & ~gdb_array_mark_flag : $sym_name->size_byte) + xprintstr $sym_name end document xprintsym Print argument as a symbol. diff -r b545019c77b0 -r 14e5707213a6 src/ChangeLog --- a/src/ChangeLog Tue May 18 20:30:43 2004 +0000 +++ b/src/ChangeLog Sat May 22 22:52:43 2004 +0000 @@ -1,3 +1,47 @@ +2004-05-19 Jim Blandy + + Add support for new '\_<' and '\_>' regexp operators, matching the + beginning and ends of symbols. + * regex.c (enum syntaxcode): Add Ssymbol. + (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword. + (re_opcode_t): New opcodes `symbeg' and `symend'. + (print_partial_compiled_pattern): Print the new opcodes properly. + (regex_compile): Parse the new operators. + (analyse_first): Skip symbeg and symend (they match only the empty string). + (mutually_exclusive_p): `symend' is mutually exclusive with \s_ and + \sw; `symbeg' is mutually exclusive with \S_ and \Sw. + (re_match_2_internal): Match symbeg and symend. + + * search.c (trivial_regexp_p): \_ is no longer a trivial regexp. + +2004-05-19 Kim F. Storm + + * .gdbinit (xsymbol): Fix last change. + +2004-05-18 Stefan Monnier + + * .gdbinit (xprintstr): New fun. + (xstring, xprintsym): Use it. + + * w32proc.c (create_child): Use INTMASK. + + * alloc.c (Fgarbage_collect): Do all the marking before flushing + unmarked elements of the undo list. + +2004-05-18 David Ponce + + * print.c (print): Reset print_depth before to call print_object. + +2004-05-18 Jason Rumney + + * w32console.c: Prefix RIF functions with w32con_ to avoid + namespace clash with functions in term.c and w32term.c. + + * w32menu.c (add_menu_item, w32_menu_display_help) + [USE_LISP_UNION_TYPE]: Cast from Lisp_Object using i member. + + * w32term.h (display_x_get_resource, vga_stdcolor_name): Add prototype. + 2004-05-18 Eli Zaretskii * lisp.h (DECL_ALIGN): Remove restriction on MS-DOS systems. @@ -97,12 +141,16 @@ section to frame.c section. (Fxw_display_color_p, Fx_file_dialog): Declare if HAVE_WINDOW_SYSTEM defined. + * macfns.c (Fx_create_frame): Fix int/Lisp_Object mixup. + * macmenu.c (set_frame_menubar): Use NILP to test a lisp value. + * macterm.c (mac_get_emulated_btn, mac_event_to_emacs_modifiers) (mac_get_mouse_btn): Use NILP and EQ to test/compare lisp values. (XTread_socket): Fix int/Lisp_Object mixup. (mac_check_for_quit_char): Fix pointer/Lisp_Object mixup. + * macterm.h (struct frame, struct face, struct image) (display_x_get_resource, Fx_display_color_p) (Fx_display_grayscale_p, Fx_display_planes, x_free_gcs): @@ -246,6 +294,7 @@ around call to ReceiveEvent to avoid certain crashes. 2004-05-07 YAMAMOTO Mitsuharu + * macterm.c (mac_draw_line_to_pixmap, XCreatePixmapFromBitmapData) (mac_fill_rectangle_to_pixmap, mac_draw_rectangle_to_pixmap) (mac_copy_area_to_pixmap, mac_copy_area_with_mask_to_pixmap): diff -r b545019c77b0 -r 14e5707213a6 src/print.c --- a/src/print.c Tue May 18 20:30:43 2004 +0000 +++ b/src/print.c Sat May 22 22:52:43 2004 +0000 @@ -1220,7 +1220,6 @@ register Lisp_Object printcharfun; int escapeflag; { - print_depth = 0; old_backquote_output = 0; /* Reset print_number_index and Vprint_number_table only when @@ -1240,6 +1239,7 @@ start = index = print_number_index; /* Construct Vprint_number_table. This increments print_number_index for the objects added. */ + print_depth = 0; print_preprocess (obj); /* Remove unnecessary objects, which appear only once in OBJ; @@ -1264,6 +1264,7 @@ print_number_index = index; } + print_depth = 0; print_object (obj, printcharfun, escapeflag); } diff -r b545019c77b0 -r 14e5707213a6 src/regex.c --- a/src/regex.c Tue May 18 20:30:43 2004 +0000 +++ b/src/regex.c Sat May 22 22:52:43 2004 +0000 @@ -2,7 +2,7 @@ 0.12. (Implements POSIX draft P1003.2/D11.2, except for some of the internationalization features.) - Copyright (C) 1993,94,95,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,97,98,99,2000,04 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -217,7 +217,7 @@ /* Define the syntax stuff for \<, \>, etc. */ /* Sword must be nonzero for the wordchar pattern commands in re_match_2. */ -enum syntaxcode { Swhitespace = 0, Sword = 1 }; +enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; # ifdef SWITCH_ENUM_BUG # define SWITCH_ENUM_CAST(x) ((int)(x)) @@ -398,7 +398,7 @@ if (ISALNUM (c)) re_syntax_table[c] = Sword; - re_syntax_table['_'] = Sword; + re_syntax_table['_'] = Ssymbol; done = 1; } @@ -655,6 +655,9 @@ wordbound, /* Succeeds if at a word boundary. */ notwordbound, /* Succeeds if not at a word boundary. */ + symbeg, /* Succeeds if at symbol beginning. */ + symend, /* Succeeds if at symbol end. */ + /* Matches any character whose syntax is specified. Followed by a byte which contains a syntax code, e.g., Sword. */ syntaxspec, @@ -1094,6 +1097,14 @@ case wordend: fprintf (stderr, "/wordend"); + case symbeg: + printf ("/symbeg"); + break; + + case symend: + printf ("/symend"); + break; + case syntaxspec: fprintf (stderr, "/syntaxspec"); mcnt = *p++; @@ -3398,6 +3409,19 @@ BUF_PUSH (wordend); break; + case '_': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; + laststart = b; + PATFETCH (c); + if (c == '<') + BUF_PUSH (symbeg); + else if (c == '>') + BUF_PUSH (symend); + else + FREE_STACK_RETURN (REG_BADPAT); + break; + case 'b': if (syntax & RE_NO_GNU_OPS) goto normal_char; @@ -3890,6 +3914,8 @@ case notwordbound: case wordbeg: case wordend: + case symbeg: + case symend: continue; @@ -4654,14 +4680,20 @@ break; case wordend: - case notsyntaxspec: + return ((re_opcode_t) *p1 == syntaxspec && p1[1] == Sword); + case symend: return ((re_opcode_t) *p1 == syntaxspec - && p1[1] == (op2 == wordend ? Sword : p2[1])); + && (p1[1] == Ssymbol || p1[1] == Sword)); + case notsyntaxspec: + return ((re_opcode_t) *p1 == syntaxspec && p1[1] == p2[1]); case wordbeg: - case syntaxspec: + return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == Sword); + case symbeg: return ((re_opcode_t) *p1 == notsyntaxspec - && p1[1] == (op2 == wordbeg ? Sword : p2[1])); + && (p1[1] == Ssymbol || p1[1] == Sword)); + case syntaxspec: + return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == p2[1]); case wordbound: return (((re_opcode_t) *p1 == notsyntaxspec @@ -5803,6 +5835,92 @@ } break; + case symbeg: + DEBUG_PRINT1 ("EXECUTING symbeg.\n"); + + /* We FAIL in one of the following cases: */ + + /* Case 1: D is at the end of string. */ + if (AT_STRINGS_END (d)) + goto fail; + else + { + /* C1 is the character before D, S1 is the syntax of C1, C2 + is the character at D, and S2 is the syntax of C2. */ + re_wchar_t c1, c2; + int s1, s2; +#ifdef emacs + int offset = PTR_TO_OFFSET (d); + int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset); + UPDATE_SYNTAX_TABLE (charpos); +#endif + PREFETCH (); + c2 = RE_STRING_CHAR (d, dend - d); + s2 = SYNTAX (c2); + + /* Case 2: S2 is neither Sword nor Ssymbol. */ + if (s2 != Sword && s2 != Ssymbol) + goto fail; + + /* Case 3: D is not at the beginning of string ... */ + if (!AT_STRINGS_BEG (d)) + { + GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); +#ifdef emacs + UPDATE_SYNTAX_TABLE_BACKWARD (charpos - 1); +#endif + s1 = SYNTAX (c1); + + /* ... and S1 is Sword or Ssymbol. */ + if (s1 == Sword || s1 == Ssymbol) + goto fail; + } + } + break; + + case symend: + DEBUG_PRINT1 ("EXECUTING symend.\n"); + + /* We FAIL in one of the following cases: */ + + /* Case 1: D is at the beginning of string. */ + if (AT_STRINGS_BEG (d)) + goto fail; + else + { + /* C1 is the character before D, S1 is the syntax of C1, C2 + is the character at D, and S2 is the syntax of C2. */ + re_wchar_t c1, c2; + int s1, s2; +#ifdef emacs + int offset = PTR_TO_OFFSET (d) - 1; + int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset); + UPDATE_SYNTAX_TABLE (charpos); +#endif + GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); + s1 = SYNTAX (c1); + + /* Case 2: S1 is neither Ssymbol nor Sword. */ + if (s1 != Sword && s1 != Ssymbol) + goto fail; + + /* Case 3: D is not at the end of string ... */ + if (!AT_STRINGS_END (d)) + { + PREFETCH_NOLIMIT (); + c2 = RE_STRING_CHAR (d, dend - d); +#ifdef emacs + UPDATE_SYNTAX_TABLE_FORWARD (charpos); +#endif + s2 = SYNTAX (c2); + + /* ... and S2 is Sword or Ssymbol. */ + if (s2 == Sword || s2 == Ssymbol) + goto fail; + } + } + break; + case syntaxspec: case notsyntaxspec: not = (re_opcode_t) *(p - 1) == notsyntaxspec; diff -r b545019c77b0 -r 14e5707213a6 src/search.c --- a/src/search.c Tue May 18 20:30:43 2004 +0000 +++ b/src/search.c Sat May 22 22:52:43 2004 +0000 @@ -957,7 +957,7 @@ { case '|': case '(': case ')': case '`': case '\'': case 'b': case 'B': case '<': case '>': case 'w': case 'W': case 's': - case 'S': case '=': case '{': case '}': + case 'S': case '=': case '{': case '}': case '_': case 'c': case 'C': /* for categoryspec and notcategoryspec */ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': diff -r b545019c77b0 -r 14e5707213a6 src/w32console.c --- a/src/w32console.c Tue May 18 20:30:43 2004 +0000 +++ b/src/w32console.c Sat May 22 22:52:43 2004 +0000 @@ -53,20 +53,20 @@ extern struct frame * updating_frame; extern int meta_key; -static void move_cursor (int row, int col); -static void clear_to_end (void); -void clear_frame (void); -void clear_end_of_line (int); -static void ins_del_lines (int vpos, int n); -void insert_glyphs (struct glyph *start, int len); -void write_glyphs (struct glyph *string, int len); -void delete_glyphs (int n); +static void w32con_move_cursor (int row, int col); +static void w32con_clear_to_end (void); +static void w32con_clear_frame (void); +static void w32con_clear_end_of_line (int); +static void w32con_ins_del_lines (int vpos, int n); +static void w32con_insert_glyphs (struct glyph *start, int len); +static void w32con_write_glyphs (struct glyph *string, int len); +static void w32con_delete_glyphs (int n); void w32_sys_ring_bell (void); -void reset_terminal_modes (void); -void set_terminal_modes (void); -void set_terminal_window (int size); -void update_begin (struct frame * f); -void update_end (struct frame * f); +static void w32con_reset_terminal_modes (void); +static void w32con_set_terminal_modes (void); +static void w32con_set_terminal_window (int size); +static void w32con_update_begin (struct frame * f); +static void w32con_update_end (struct frame * f); static WORD w32_face_attributes (struct frame *f, int face_id); static COORD cursor_coords; @@ -104,7 +104,7 @@ /* Move the cursor to (row, col). */ static void -move_cursor (int row, int col) +w32con_move_cursor (int row, int col) { cursor_coords.X = col; cursor_coords.Y = row; @@ -117,17 +117,17 @@ /* Clear from cursor to end of screen. */ static void -clear_to_end (void) +w32con_clear_to_end (void) { struct frame * f = PICK_FRAME (); - clear_end_of_line (FRAME_COLS (f) - 1); - ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1); + w32con_clear_end_of_line (FRAME_COLS (f) - 1); + w32con_ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1); } /* Clear the frame. */ -void -clear_frame (void) +static void +w32con_clear_frame (void) { struct frame * f = PICK_FRAME (); COORD dest; @@ -144,7 +144,7 @@ FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r); FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); - move_cursor (0, 0); + w32con_move_cursor (0, 0); } @@ -152,8 +152,8 @@ static BOOL ceol_initialized = FALSE; /* Clear from Cursor to end (what's "standout marker"?). */ -void -clear_end_of_line (int end) +static void +w32con_clear_end_of_line (int end) { if (!ceol_initialized) { @@ -164,12 +164,12 @@ } ceol_initialized = TRUE; } - write_glyphs (glyph_base, end - cursor_coords.X); /* fencepost ? */ + w32con_write_glyphs (glyph_base, end - cursor_coords.X); /* fencepost ? */ } /* Insert n lines at vpos. if n is negative delete -n lines. */ -void -ins_del_lines (int vpos, int n) +static void +w32con_ins_del_lines (int vpos, int n) { int i, nb; SMALL_RECT scroll; @@ -212,8 +212,8 @@ { for (i = scroll.Bottom; i < dest.Y; i++) { - move_cursor (i, 0); - clear_end_of_line (FRAME_COLS (f)); + w32con_move_cursor (i, 0); + w32con_clear_end_of_line (FRAME_COLS (f)); } } } @@ -225,8 +225,8 @@ { for (i = nb; i < scroll.Top; i++) { - move_cursor (i, 0); - clear_end_of_line (FRAME_COLS (f)); + w32con_move_cursor (i, 0); + w32con_clear_end_of_line (FRAME_COLS (f)); } } } @@ -275,8 +275,8 @@ /* If start is zero insert blanks instead of a string at start ?. */ -void -insert_glyphs (register struct glyph *start, register int len) +static void +w32con_insert_glyphs (register struct glyph *start, register int len) { scroll_line (len, RIGHT); @@ -286,16 +286,16 @@ /* Print the first len characters of start, cursor_coords.X adjusted by write_glyphs. */ - write_glyphs (start, len); + w32con_write_glyphs (start, len); } else { - clear_end_of_line (cursor_coords.X + len); + w32con_clear_end_of_line (cursor_coords.X + len); } } -void -write_glyphs (register struct glyph *string, register int len) +static void +w32con_write_glyphs (register struct glyph *string, register int len) { int produced, consumed; DWORD r; @@ -353,7 +353,7 @@ } cursor_coords.X += produced; - move_cursor (cursor_coords.Y, cursor_coords.X); + w32con_move_cursor (cursor_coords.Y, cursor_coords.X); } len -= consumed; n -= consumed; @@ -391,8 +391,8 @@ } -void -delete_glyphs (int n) +static void +w32con_delete_glyphs (int n) { /* delete chars means scroll chars from cursor_coords.X + n to cursor_coords.X, anything beyond the edge of the screen should @@ -450,8 +450,8 @@ return sound; } -void -reset_terminal_modes (void) +static void +w32con_reset_terminal_modes (void) { #ifdef USE_SEPARATE_SCREEN SetConsoleActiveScreenBuffer (prev_screen); @@ -461,8 +461,8 @@ SetConsoleMode (keyboard_handle, prev_console_mode); } -void -set_terminal_modes (void) +static void +w32con_set_terminal_modes (void) { CONSOLE_CURSOR_INFO cci; @@ -484,19 +484,19 @@ clumps rather than one-character-at-a-time... we'll start with not moving the cursor while an update is in progress. */ -void -update_begin (struct frame * f) +static void +w32con_update_begin (struct frame * f) { } -void -update_end (struct frame * f) +static void +w32con_update_end (struct frame * f) { SetConsoleCursorPosition (cur_screen, cursor_coords); } -void -set_terminal_window (int size) +static void +w32con_set_terminal_window (int size) { } @@ -574,21 +574,21 @@ { CONSOLE_SCREEN_BUFFER_INFO info; - cursor_to_hook = move_cursor; - raw_cursor_to_hook = move_cursor; - clear_to_end_hook = clear_to_end; - clear_frame_hook = clear_frame; - clear_end_of_line_hook = clear_end_of_line; - ins_del_lines_hook = ins_del_lines; - insert_glyphs_hook = insert_glyphs; - write_glyphs_hook = write_glyphs; - delete_glyphs_hook = delete_glyphs; + cursor_to_hook = w32con_move_cursor; + raw_cursor_to_hook = w32con_move_cursor; + clear_to_end_hook = w32con_clear_to_end; + clear_frame_hook = w32con_clear_frame; + clear_end_of_line_hook = w32con_clear_end_of_line; + ins_del_lines_hook = w32con_ins_del_lines; + insert_glyphs_hook = w32con_insert_glyphs; + write_glyphs_hook = w32con_write_glyphs; + delete_glyphs_hook = w32con_delete_glyphs; ring_bell_hook = w32_sys_ring_bell; - reset_terminal_modes_hook = reset_terminal_modes; - set_terminal_modes_hook = set_terminal_modes; - set_terminal_window_hook = set_terminal_window; - update_begin_hook = update_begin; - update_end_hook = update_end; + reset_terminal_modes_hook = w32con_reset_terminal_modes; + set_terminal_modes_hook = w32con_set_terminal_modes; + set_terminal_window_hook = w32con_set_terminal_window; + update_begin_hook = w32con_update_begin; + update_end_hook = w32con_update_end; read_socket_hook = w32_console_read_socket; mouse_position_hook = w32_console_mouse_position; diff -r b545019c77b0 -r 14e5707213a6 src/w32fns.c --- a/src/w32fns.c Tue May 18 20:30:43 2004 +0000 +++ b/src/w32fns.c Sat May 22 22:52:43 2004 +0000 @@ -8090,7 +8090,7 @@ (WPARAM) XINT (XCAR (item)), (LPARAM) item.i)) #else if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY, - (WPARAM) XINT (XCAR (item)), (LPARAM) item.i)) + (WPARAM) XINT (XCAR (item)), (LPARAM) item)) #endif { @@ -8170,7 +8170,7 @@ (WPARAM) vk_code, (LPARAM) new_state.i)) #else if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY, - (WPARAM) vk_code, (LPARAM) new_state.i)) + (WPARAM) vk_code, (LPARAM) new_state)) #endif { MSG msg; diff -r b545019c77b0 -r 14e5707213a6 src/w32menu.c --- a/src/w32menu.c Tue May 18 20:30:43 2004 +0000 +++ b/src/w32menu.c Sat May 22 22:52:43 2004 +0000 @@ -2225,9 +2225,12 @@ /* Set help string for menu item. Leave it as a Lisp_Object until it is ready to be displayed, since GC can happen while menus are active. */ - if (wv->help) - info.dwItemData = (DWORD) wv->help; - + if (!NILP (wv->help)) +#ifdef USE_LISP_UNION_TYPE + info.dwItemData = (DWORD) (wv->help).i; +#else + info.dwItemData = (DWORD) (wv->help); +#endif if (wv->button_type == BUTTON_TYPE_RADIO) { /* CheckMenuRadioItem allows us to differentiate TOGGLE and @@ -2307,7 +2310,12 @@ info.fMask = MIIM_DATA; get_menu_item_info (menu, item, FALSE, &info); +#ifdef USE_LISP_UNION_TYPE + help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData) + : Qnil; +#else help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil; +#endif } /* Store the help echo in the keyboard buffer as the X toolkit diff -r b545019c77b0 -r 14e5707213a6 src/w32proc.c --- a/src/w32proc.c Tue May 18 20:30:43 2004 +0000 +++ b/src/w32proc.c Sat May 22 22:52:43 2004 +0000 @@ -1,5 +1,5 @@ /* Process support for GNU Emacs on the Microsoft W32 API. - Copyright (C) 1992, 1995, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1992, 95, 99, 2000, 01, 04 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -367,7 +367,7 @@ cp->pid = -cp->pid; /* pid must fit in a Lisp_Int */ - cp->pid = XUINT (make_number (cp->pid)); + cp->pid = cp->pid & INTMASK; *pPid = cp->pid; diff -r b545019c77b0 -r 14e5707213a6 src/w32term.h --- a/src/w32term.h Tue May 18 20:30:43 2004 +0000 +++ b/src/w32term.h Sat May 22 22:52:43 2004 +0000 @@ -252,6 +252,10 @@ struct w32_display_info *x_display_info_for_name (); +Lisp_Object display_x_get_resource P_ ((struct w32_display_info *, + Lisp_Object, Lisp_Object, + Lisp_Object, Lisp_Object)); + extern struct w32_display_info *w32_term_init (); extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); @@ -717,6 +721,8 @@ XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *); struct frame * check_x_frame (Lisp_Object); +Lisp_Object vga_stdcolor_name (int); + EXFUN (Fx_display_color_p, 1); EXFUN (Fx_display_grayscale_p, 1);