annotate src/syntax.h @ 976:cbdfc337ec8f

* xterm.c (x_wm_hints): New variable. (x_wm_set_window_state, x_wm_set_icon_pixmap, x_wm_set_icon_position): Use x_wm_hints. (x_term_init): Set the `input' field of x_wm_hints, and its flag. * xterm.c (x_text_icon): Call x_wm_set_icon_pixmap with a pixmap of zero, to clear the pixmap. (x_wm_set_icon_pixmap): Accept this protocol; if pixmap is zero, specify no pixmap for the icon. * xterm.c (x_set_window_size): Call check_frame_size to make sure that the requested dimensions are within acceptable limits. Store the new size information in the frame structure. * xterm.c (x_wm_set_size_hint): Don't try to set the base_height and base_width elements of size_hints if PBaseSize is not #defined. Set the minimum frame size according to the information returned by check_frame_size. * xterm.c (XTread_socket, x_do_pending_expose): Call change_frame_size with a DELAY of 1. * xterm.c (in_display): Deleted this; it's never used in xterm.c, and there is another variable by the same name in dispnew.c. * xterm.c (FRAME_IS_TERMCAP, FRAME_IS_X, FRAME_HAS_MINIBUF): Renamed these to FRAME_TERMCAP_P, FRAME_X_P, and FRAME_HAS_MINIBUF_P, for consistency with the rest of the frame macros.
author Jim Blandy <jimb@redhat.com>
date Wed, 12 Aug 1992 14:40:00 +0000
parents 2d227cb41a0a
children 721e4f57c8b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Declarations having to do with GNU Emacs syntax tables.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 Copyright (C) 1985 Free Software Foundation, Inc.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 the Free Software Foundation; either version 1, or (at your option)
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 extern Lisp_Object Qsyntax_table_p;
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 extern Lisp_Object Fsyntax_table_p (), Fsyntax_table (), Fset_syntax_table ();
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 /* The standard syntax table is stored where it will automatically
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 be used in all new buffers. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 #define Vstandard_syntax_table buffer_defaults.syntax_table
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 /* A syntax table is a Lisp vector of length 0400, whose elements are integers.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 The low 8 bits of the integer is a code, as follows:
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 enum syntaxcode
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 {
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 Swhitespace, /* for a whitespace character */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 Spunct, /* for random punctuation characters */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 Sword, /* for a word constituent */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 Ssymbol, /* symbol constituent but not word constituent */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 Sopen, /* for a beginning delimiter */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 Sclose, /* for an ending delimiter */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 Squote, /* for a prefix character like Lisp ' */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 Sstring, /* for a string-grouping character like Lisp " */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 Smath, /* for delimiters like $ in Tex. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 Sescape, /* for a character that begins a C-style escape */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 Scharquote, /* for a character that quotes the following character */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 Scomment, /* for a comment-starting character */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 Sendcomment, /* for a comment-ending character */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 Smax /* Upper bound on codes that are meaningful */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 };
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 #define SYNTAX(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
52 ((enum syntaxcode) (XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) & 0377))
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 /* The next 8 bits of the number is a character,
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 the matching delimiter in the case of Sopen or Sclose. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 #define SYNTAX_MATCH(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
58 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 8) & 0377)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 /* Then there are five single-bit flags that have the following meanings:
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 1. This character is the first of a two-character comment-start sequence.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 2. This character is the second of a two-character comment-start sequence.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 3. This character is the first of a two-character comment-end sequence.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 4. This character is the second of a two-character comment-end sequence.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 5. This character is a prefix, for backward-prefix-chars.
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 Note that any two-character sequence whose first character has flag 1
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 and whose second character has flag 2 will be interpreted as a comment start. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 #define SYNTAX_COMSTART_FIRST(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
70 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 16) & 1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 #define SYNTAX_COMSTART_SECOND(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
73 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 17) & 1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 #define SYNTAX_COMEND_FIRST(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
76 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 18) & 1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 #define SYNTAX_COMEND_SECOND(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
79 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 19) & 1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 #define SYNTAX_PREFIX(c) \
720
2d227cb41a0a *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 486
diff changeset
82 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 20) & 1)
486
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 /* This array, indexed by a character, contains the syntax code which that
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 character signifies (as a char). For example,
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 (enum syntaxcode) syntax_spec_code['w'] is Sword. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 extern unsigned char syntax_spec_code[0400];
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 /* Indexed by syntax code, give the letter that describes it. */
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91
80cdb2387043 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 extern char syntax_code_spec[13];